quickvo-sdk-js 0.4.2 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4600 -4589
- package/dist/index.umd.cjs +2 -2
- package/dist/room/RoomBase.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.umd.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(function(ct,ot){typeof exports=="object"&&typeof module<"u"?ot(exports):typeof define=="function"&&define.amd?define(["exports"],ot):(ct=typeof globalThis<"u"?globalThis:ct||self,ot(ct["snqu-calls-sdk-js"]={}))})(this,function(exports){"use strict";var Qt=Object.defineProperty;var Wt=ct=>{throw TypeError(ct)};var Gt=(ct,ot,lt)=>ot in ct?Qt(ct,ot,{enumerable:!0,configurable:!0,writable:!0,value:lt}):ct[ot]=lt;var F=(ct,ot,lt)=>Gt(ct,typeof ot!="symbol"?ot+"":ot,lt),Kt=(ct,ot,lt)=>ot.has(ct)||Wt("Cannot "+lt);var W=(ct,ot,lt)=>(Kt(ct,ot,"read from private field"),lt?lt.call(ct):ot.get(ct)),st=(ct,ot,lt)=>ot.has(ct)?Wt("Cannot add the same private member more than once"):ot instanceof WeakSet?ot.add(ct):ot.set(ct,lt),kt=(ct,ot,lt,ft)=>(Kt(ct,ot,"write to private field"),ft?ft.call(ct,lt):ot.set(ct,lt),lt);var ct,ot,lt,ft,dt,$t,Tt,It,Rt,Ot,Et,xt,Nt,yt,_t,ht,gt,At,qt,Dt,wt,Ct,Ut,Mt,Pt,Bt,St,bt,Lt,jt,Zt,Ft;const v$1=(u,A=[])=>{const _={...u},q=Object.keys(_);for(const k of q)A.findIndex($=>String($)===k)===-1&&delete _[k];return _},it=(u,A=[],_=!0)=>{const q=new Map;for(const $ of u){const e=[];for(const I of A)e.push($[I]);const o=`map-${e.join("-")}`;if(!q.has(o)){q.set(o,$);continue}_&&q.set(o,$)}const k=q.entries();return Array.from(k,([$,e])=>e)},mt=(u,A=[])=>{const _=[];for(const q of u){const k=v$1(q,A);_.push(k)}return _},ut=(u,A="value",_="label")=>{const q=[],k=Object.entries(u);for(const[$,e]of k){const o={[_]:e,[A]:$};q.push(o)}return q},O=(u=0,A=1)=>{const _=Math.max(0,u),q=Math.max(1,A),k=Math.random()*(q-_+1)+_;return parseInt(`${k}`,10)},pt=(u=16,A=16)=>{const _="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),q=Math.min(_.length,A),k=Date.now().toString(q),$=k.split(""),e=Math.max(4,u-k.length);for(let o=0;o<e;o++){const I=O(0,q-1),N=_[I];$.push(N)}return $.join("").toUpperCase()},j$1=(u,A)=>{try{let _=Number(u);if(isNaN(_)){const q=new Date(`${u}`);if(`${q}`=="Invalid Date")return 0;_=q.getTime()}if(A!==void 0){const q=new Date().getTimezoneOffset();_+=(q+A)*60*1e3}return _}catch(_){return console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->timeStamp:err",{_val:u,_offset:A,error:_}),0}},Q={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6","00":"日","01":"一","02":"二","03":"三","04":"四","05":"五","06":"六"},E=(u,A="YYYY-MM-DD hh:mm:ss",_={})=>{const q={empty_str:"-",..._},{empty_str:k,offset:$}=q,e=j$1(u,$);if(Number(u)!==0&&e===0)return k;const o=new Date(e),I=[{k:"Y+",v:`${o.getFullYear()}`},{k:"M+",v:`${o.getMonth()+1}`},{k:"D+",v:`${o.getDate()}`},{k:"W+",v:`${o.getDay()}`},{k:"h+",v:`${o.getHours()}`},{k:"m+",v:`${o.getMinutes()}`},{k:"s+",v:`${o.getSeconds()}`}];let N;for(let{k:D,v:P}of I)if(N=new RegExp(`(${D})`).exec(A),N){const U=N[1];let L=P.padStart(U.length,"0");U.includes("W")&&(L=Q[L.slice(0,2)]),A=A.replace(U,L)}return A},enum_mediaType={microphoneCamera_audio:"麦克风-默认轨道",microphoneCamera_video:"摄像头-默认轨道",screenSharing_video:"屏幕共享-视频轨道",screenSharing_audio:"屏幕共享-音频轨道"};ut(enum_mediaType);const mediaType_keys=Object.keys(enum_mediaType);var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},lib={},parser={},grammar={exports:{}},hasRequiredGrammar;function requireGrammar(){if(hasRequiredGrammar)return grammar.exports;hasRequiredGrammar=1;var u=grammar.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(A){return A.encoding?"rtpmap:%d %s/%s/%s":A.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(A){return A.address!=null?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(A){return A.subtype!=null?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(A){return"extmap:%d"+(A.direction?"/%s":"%v")+(A["encrypt-uri"]?" %s":"%v")+" %s"+(A.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(A){return A.sessionConfig!=null?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(A){var _="candidate:%s %d %s %d %s %d typ %s";return _+=A.raddr!=null?" raddr %s rport %d":"%v%v",_+=A.tcptype!=null?" tcptype %s":"%v",A.generation!=null&&(_+=" generation %d"),_+=A["network-id"]!=null?" network-id %d":"%v",_+=A["network-cost"]!=null?" network-cost %d":"%v",_}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(A){var _="ssrc:%d";return A.attribute!=null&&(_+=" %s",A.value!=null&&(_+=":%s")),_}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(A){return A.maxMessageSize!=null?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(A){return A.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(A){return"imageattr:%s %s %s"+(A.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(A){return"simulcast:%s %s"+(A.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(A){return"ts-refclk:%s"+(A.clksrcExt!=null?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(A){var _="mediaclk:";return _+=A.id!=null?"id=%s %s":"%v%s",_+=A.mediaClockValue!=null?"=%s":"",_+=A.rateNumerator!=null?" rate=%s":"",_+=A.rateDenominator!=null?"/%s":"",_}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};return Object.keys(u).forEach(function(A){var _=u[A];_.forEach(function(q){q.reg||(q.reg=/(.*)/),q.format||(q.format="%s")})}),grammar.exports}var hasRequiredParser;function requireParser(){return hasRequiredParser||(hasRequiredParser=1,function(u){var A=function(o){return String(Number(o))===o?Number(o):o},_=function(o,I,N,D){if(D&&!N)I[D]=A(o[1]);else for(var P=0;P<N.length;P+=1)o[P+1]!=null&&(I[N[P]]=A(o[P+1]))},q=function(o,I,N){var D=o.name&&o.names;o.push&&!I[o.push]?I[o.push]=[]:D&&!I[o.name]&&(I[o.name]={});var P=o.push?{}:D?I[o.name]:I;_(N.match(o.reg),P,o.names,o.name),o.push&&I[o.push].push(P)},k=requireGrammar(),$=RegExp.prototype.test.bind(/^([a-z])=(.*)/);u.parse=function(o){var I={},N=[],D=I;return o.split(/(\r\n|\r|\n)/).filter($).forEach(function(P){var U=P[0],L=P.slice(2);U==="m"&&(N.push({rtp:[],fmtp:[]}),D=N[N.length-1]);for(var Z=0;Z<(k[U]||[]).length;Z+=1){var J=k[U][Z];if(J.reg.test(L))return q(J,D,L)}}),I.media=N,I};var e=function(o,I){var N=I.split(/=(.+)/,2);return N.length===2?o[N[0]]=A(N[1]):N.length===1&&I.length>1&&(o[N[0]]=void 0),o};u.parseParams=function(o){return o.split(/;\s?/).reduce(e,{})},u.parseFmtpConfig=u.parseParams,u.parsePayloads=function(o){return o.toString().split(" ").map(Number)},u.parseRemoteCandidates=function(o){for(var I=[],N=o.split(" ").map(A),D=0;D<N.length;D+=3)I.push({component:N[D],ip:N[D+1],port:N[D+2]});return I},u.parseImageAttributes=function(o){return o.split(" ").map(function(I){return I.substring(1,I.length-1).split(",").reduce(e,{})})},u.parseSimulcastStreamList=function(o){return o.split(";").map(function(I){return I.split(",").map(function(N){var D,P=!1;return N[0]!=="~"?D=A(N):(D=A(N.substring(1,N.length)),P=!0),{scid:D,paused:P}})})}}(parser)),parser}var writer$1,hasRequiredWriter$1;function requireWriter$1(){if(hasRequiredWriter$1)return writer$1;hasRequiredWriter$1=1;var u=requireGrammar(),A=/%[sdv%]/g,_=function(e){var o=1,I=arguments,N=I.length;return e.replace(A,function(D){if(o>=N)return D;var P=I[o];switch(o+=1,D){case"%%":return"%";case"%s":return String(P);case"%d":return Number(P);case"%v":return""}})},q=function(e,o,I){var N=o.format instanceof Function?o.format(o.push?I:I[o.name]):o.format,D=[e+"="+N];if(o.names)for(var P=0;P<o.names.length;P+=1){var U=o.names[P];o.name?D.push(I[o.name][U]):D.push(I[o.names[P]])}else D.push(I[o.name]);return _.apply(null,D)},k=["v","o","s","i","u","e","p","c","b","t","r","z","a"],$=["i","c","b","a"];return writer$1=function(e,o){o=o||{},e.version==null&&(e.version=0),e.name==null&&(e.name=" "),e.media.forEach(function(P){P.payloads==null&&(P.payloads="")});var I=o.outerOrder||k,N=o.innerOrder||$,D=[];return I.forEach(function(P){u[P].forEach(function(U){U.name in e&&e[U.name]!=null?D.push(q(P,U,e)):U.push in e&&e[U.push]!=null&&e[U.push].forEach(function(L){D.push(q(P,U,L))})})}),e.media.forEach(function(P){D.push(q("m",u.m[0],P)),N.forEach(function(U){u[U].forEach(function(L){L.name in P&&P[L.name]!=null?D.push(q(U,L,P)):L.push in P&&P[L.push]!=null&&P[L.push].forEach(function(Z){D.push(q(U,L,Z))})})})}),D.join(`\r
|
|
1
|
+
(function(at,ct){typeof exports=="object"&&typeof module<"u"?ct(exports):typeof define=="function"&&define.amd?define(["exports"],ct):(at=typeof globalThis<"u"?globalThis:at||self,ct(at["snqu-calls-sdk-js"]={}))})(this,function(exports){"use strict";var Vt=Object.defineProperty;var Qt=at=>{throw TypeError(at)};var Yt=(at,ct,dt)=>ct in at?Vt(at,ct,{enumerable:!0,configurable:!0,writable:!0,value:dt}):at[ct]=dt;var H=(at,ct,dt)=>Yt(at,typeof ct!="symbol"?ct+"":ct,dt),Gt=(at,ct,dt)=>ct.has(at)||Qt("Cannot "+dt);var G=(at,ct,dt)=>(Gt(at,ct,"read from private field"),dt?dt.call(at):ct.get(at)),lt=(at,ct,dt)=>ct.has(at)?Qt("Cannot add the same private member more than once"):ct instanceof WeakSet?ct.add(at):ct.set(at,dt),vt=(at,ct,dt,ht)=>(Gt(at,ct,"write to private field"),ht?ht.call(at,dt):ct.set(at,dt),dt);var at,ct,dt,ht,yt,It,Rt,Et,xt,$t,Nt,At,qt,kt,bt,_t,Tt,Dt,Ct,Ut,Ot,Mt,Pt,Bt,Lt,jt,gt,wt,Zt,Ft,Ht,zt;const v$1=(_,q=[])=>{const k={..._},D=Object.keys(k);for(const $ of D)q.findIndex(I=>String(I)===$)===-1&&delete k[$];return k},it=(_,q=[],k=!0)=>{const D=new Map;for(const I of _){const e=[];for(const N of q)e.push(I[N]);const u=`map-${e.join("-")}`;if(!D.has(u)){D.set(u,I);continue}k&&D.set(u,I)}const $=D.entries();return Array.from($,([I,e])=>e)},mt=(_,q=[])=>{const k=[];for(const D of _){const $=v$1(D,q);k.push($)}return k},ut=(_,q="value",k="label")=>{const D=[],$=Object.entries(_);for(const[I,e]of $){const u={[k]:e,[q]:I};D.push(u)}return D},O=(_=0,q=1)=>{const k=Math.max(0,_),D=Math.max(1,q),$=Math.random()*(D-k+1)+k;return parseInt(`${$}`,10)},pt=(_=16,q=16)=>{const k="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),D=Math.min(k.length,q),$=Date.now().toString(D),I=$.split(""),e=Math.max(4,_-$.length);for(let u=0;u<e;u++){const N=O(0,D-1),A=k[N];I.push(A)}return I.join("").toUpperCase()},j=(_,q)=>{try{let k=Number(_);if(isNaN(k)){const D=new Date(`${_}`);if(`${D}`=="Invalid Date")return 0;k=D.getTime()}if(q!==void 0){const D=new Date().getTimezoneOffset();k+=(D+q)*60*1e3}return k}catch(k){return console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->timeStamp:err",{_val:_,_offset:q,error:k}),0}},Q={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6","00":"日","01":"一","02":"二","03":"三","04":"四","05":"五","06":"六"},E=(_,q="YYYY-MM-DD hh:mm:ss",k={})=>{const D={empty_str:"-",...k},{empty_str:$,offset:I}=D,e=j(_,I);if(Number(_)!==0&&e===0)return $;const u=new Date(e),N=[{k:"Y+",v:`${u.getFullYear()}`},{k:"M+",v:`${u.getMonth()+1}`},{k:"D+",v:`${u.getDate()}`},{k:"W+",v:`${u.getDay()}`},{k:"h+",v:`${u.getHours()}`},{k:"m+",v:`${u.getMinutes()}`},{k:"s+",v:`${u.getSeconds()}`}];let A;for(let{k:U,v:L}of N)if(A=new RegExp(`(${U})`).exec(q),A){const P=A[1];let Z=L.padStart(P.length,"0");P.includes("W")&&(Z=Q[Z.slice(0,2)]),q=q.replace(P,Z)}return q},enum_mediaType={microphoneCamera_audio:"麦克风-默认轨道",microphoneCamera_video:"摄像头-默认轨道",screenSharing_video:"屏幕共享-视频轨道",screenSharing_audio:"屏幕共享-音频轨道"};ut(enum_mediaType);const mediaType_keys=Object.keys(enum_mediaType);var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},lib={},parser={},grammar={exports:{}},hasRequiredGrammar;function requireGrammar(){if(hasRequiredGrammar)return grammar.exports;hasRequiredGrammar=1;var _=grammar.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(q){return q.encoding?"rtpmap:%d %s/%s/%s":q.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(q){return q.address!=null?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(q){return q.subtype!=null?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(q){return"extmap:%d"+(q.direction?"/%s":"%v")+(q["encrypt-uri"]?" %s":"%v")+" %s"+(q.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(q){return q.sessionConfig!=null?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(q){var k="candidate:%s %d %s %d %s %d typ %s";return k+=q.raddr!=null?" raddr %s rport %d":"%v%v",k+=q.tcptype!=null?" tcptype %s":"%v",q.generation!=null&&(k+=" generation %d"),k+=q["network-id"]!=null?" network-id %d":"%v",k+=q["network-cost"]!=null?" network-cost %d":"%v",k}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(q){var k="ssrc:%d";return q.attribute!=null&&(k+=" %s",q.value!=null&&(k+=":%s")),k}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(q){return q.maxMessageSize!=null?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(q){return q.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(q){return"imageattr:%s %s %s"+(q.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(q){return"simulcast:%s %s"+(q.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(q){return"ts-refclk:%s"+(q.clksrcExt!=null?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(q){var k="mediaclk:";return k+=q.id!=null?"id=%s %s":"%v%s",k+=q.mediaClockValue!=null?"=%s":"",k+=q.rateNumerator!=null?" rate=%s":"",k+=q.rateDenominator!=null?"/%s":"",k}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};return Object.keys(_).forEach(function(q){var k=_[q];k.forEach(function(D){D.reg||(D.reg=/(.*)/),D.format||(D.format="%s")})}),grammar.exports}var hasRequiredParser;function requireParser(){return hasRequiredParser||(hasRequiredParser=1,function(_){var q=function(u){return String(Number(u))===u?Number(u):u},k=function(u,N,A,U){if(U&&!A)N[U]=q(u[1]);else for(var L=0;L<A.length;L+=1)u[L+1]!=null&&(N[A[L]]=q(u[L+1]))},D=function(u,N,A){var U=u.name&&u.names;u.push&&!N[u.push]?N[u.push]=[]:U&&!N[u.name]&&(N[u.name]={});var L=u.push?{}:U?N[u.name]:N;k(A.match(u.reg),L,u.names,u.name),u.push&&N[u.push].push(L)},$=requireGrammar(),I=RegExp.prototype.test.bind(/^([a-z])=(.*)/);_.parse=function(u){var N={},A=[],U=N;return u.split(/(\r\n|\r|\n)/).filter(I).forEach(function(L){var P=L[0],Z=L.slice(2);P==="m"&&(A.push({rtp:[],fmtp:[]}),U=A[A.length-1]);for(var F=0;F<($[P]||[]).length;F+=1){var W=$[P][F];if(W.reg.test(Z))return D(W,U,Z)}}),N.media=A,N};var e=function(u,N){var A=N.split(/=(.+)/,2);return A.length===2?u[A[0]]=q(A[1]):A.length===1&&N.length>1&&(u[A[0]]=void 0),u};_.parseParams=function(u){return u.split(/;\s?/).reduce(e,{})},_.parseFmtpConfig=_.parseParams,_.parsePayloads=function(u){return u.toString().split(" ").map(Number)},_.parseRemoteCandidates=function(u){for(var N=[],A=u.split(" ").map(q),U=0;U<A.length;U+=3)N.push({component:A[U],ip:A[U+1],port:A[U+2]});return N},_.parseImageAttributes=function(u){return u.split(" ").map(function(N){return N.substring(1,N.length-1).split(",").reduce(e,{})})},_.parseSimulcastStreamList=function(u){return u.split(";").map(function(N){return N.split(",").map(function(A){var U,L=!1;return A[0]!=="~"?U=q(A):(U=q(A.substring(1,A.length)),L=!0),{scid:U,paused:L}})})}}(parser)),parser}var writer$1,hasRequiredWriter$1;function requireWriter$1(){if(hasRequiredWriter$1)return writer$1;hasRequiredWriter$1=1;var _=requireGrammar(),q=/%[sdv%]/g,k=function(e){var u=1,N=arguments,A=N.length;return e.replace(q,function(U){if(u>=A)return U;var L=N[u];switch(u+=1,U){case"%%":return"%";case"%s":return String(L);case"%d":return Number(L);case"%v":return""}})},D=function(e,u,N){var A=u.format instanceof Function?u.format(u.push?N:N[u.name]):u.format,U=[e+"="+A];if(u.names)for(var L=0;L<u.names.length;L+=1){var P=u.names[L];u.name?U.push(N[u.name][P]):U.push(N[u.names[L]])}else U.push(N[u.name]);return k.apply(null,U)},$=["v","o","s","i","u","e","p","c","b","t","r","z","a"],I=["i","c","b","a"];return writer$1=function(e,u){u=u||{},e.version==null&&(e.version=0),e.name==null&&(e.name=" "),e.media.forEach(function(L){L.payloads==null&&(L.payloads="")});var N=u.outerOrder||$,A=u.innerOrder||I,U=[];return N.forEach(function(L){_[L].forEach(function(P){P.name in e&&e[P.name]!=null?U.push(D(L,P,e)):P.push in e&&e[P.push]!=null&&e[P.push].forEach(function(Z){U.push(D(L,P,Z))})})}),e.media.forEach(function(L){U.push(D("m",_.m[0],L)),A.forEach(function(P){_[P].forEach(function(Z){Z.name in L&&L[Z.name]!=null?U.push(D(P,Z,L)):Z.push in L&&L[Z.push]!=null&&L[Z.push].forEach(function(F){U.push(D(P,Z,F))})})})}),U.join(`\r
|
|
2
2
|
`)+`\r
|
|
3
|
-
`},writer$1}var hasRequiredLib;function requireLib(){if(hasRequiredLib)return lib;hasRequiredLib=1;var u=requireParser(),A=requireWriter$1(),_=requireGrammar();return lib.grammar=_,lib.write=A,lib.parse=u.parse,lib.parseParams=u.parseParams,lib.parseFmtpConfig=u.parseFmtpConfig,lib.parsePayloads=u.parsePayloads,lib.parseRemoteCandidates=u.parseRemoteCandidates,lib.parseImageAttributes=u.parseImageAttributes,lib.parseSimulcastStreamList=u.parseSimulcastStreamList,lib}var libExports=requireLib();class AudioMediaContext{constructor(A){F(this,"options",{autoGainControl:!1,noiseSuppression:!1,echoCancellation:!1});F(this,"kind","audio");F(this,"stream",new MediaStream);F(this,"audio",new Audio);F(this,"audioContext",new(window.AudioContext||window.webkitAudioContext));F(this,"mediaStreamAudioSourceNode");F(this,"autoGainNode");F(this,"biquadFilterNode");F(this,"delayNode");F(this,"gainNode");F(this,"analyserNode");F(this,"analyserArrayData");F(this,"stop",()=>{const A=this.stream.getTracks();for(const _ of A)_.enabled=!1,_.stop(),this.stream.removeTrack(_)});F(this,"replaceStream",A=>{this.stop();const[_]=A.getAudioTracks();this.stream.addTrack(_)});F(this,"getStream",()=>this.mediaStreamAudioSourceNode.mediaStream);F(this,"setMute",(A=!0)=>{A?this.analyserNode.disconnect(this.audioContext.destination):this.analyserNode.connect(this.audioContext.destination)});F(this,"setVolumeGain",A=>{this.gainNode.gain.setValueAtTime(A,this.audioContext.currentTime)});F(this,"getVolume",()=>{const{analyserNode:A,analyserArrayData:_}=this;A.getByteFrequencyData(_);let q=0;for(let $=0;$<_.length;$++)q+=_[$];return Math.ceil(q/_.length)});F(this,"setFilter",(A={})=>{this.options={...this.options,...A};const{autoGainControl:_,noiseSuppression:q,echoCancellation:k}=this.options,{mediaStreamAudioSourceNode:$,autoGainNode:e,biquadFilterNode:o,delayNode:I,gainNode:N}=this,D=$;return _&&D.connect(e),q&&D.connect(o),k&&D.connect(I),D.connect(N),A});this.stream.addTrack(A),this.audio.srcObject=this.stream,this.audioContext=new(window.AudioContext||window.webkitAudioContext),this.mediaStreamAudioSourceNode=this.audioContext.createMediaStreamSource(this.stream),this.autoGainNode=this.audioContext.createGain(),this.autoGainNode.gain.setValueAtTime(.8,this.audioContext.currentTime),this.biquadFilterNode=this.audioContext.createBiquadFilter(),this.biquadFilterNode.type="lowpass",this.biquadFilterNode.frequency.value=1e3,this.delayNode=this.audioContext.createDelay(),this.delayNode.delayTime.value=.5,this.gainNode=this.audioContext.createGain(),this.gainNode.gain.setValueAtTime(1,this.audioContext.currentTime),this.analyserNode=this.audioContext.createAnalyser(),this.analyserNode.fftSize=512,this.analyserArrayData=new Uint8Array(this.analyserNode.frequencyBinCount);const{gainNode:_,analyserNode:q}=this;_.connect(q),this.audioContext.state==="suspended"&&(this.audioContext.resume(),document.addEventListener("click",()=>this.audioContext.resume(),{once:!0})),this.setFilter()}}class VideoMediaContext{constructor(A){F(this,"kind","video");F(this,"stream",new MediaStream);F(this,"stop",()=>{const A=this.stream.getTracks();for(const _ of A)_.enabled=!1,_.stop(),this.stream.removeTrack(_)});F(this,"replaceStream",A=>{this.stop();const[_]=A.getVideoTracks();this.stream.addTrack(_)});F(this,"getStream",()=>this.stream);F(this,"getTrack",()=>this.stream.getTracks()[0]);this.stream.addTrack(A)}}const enum_roomState={ready:"已就绪",checkAuth:"正在鉴权",connecting:"连接中",connected:"已连接",reconnect:"正在重新连接",disconnected:"已断开",closed:"已关闭"};ut(enum_roomState);var C=Object.defineProperty,R=u=>{throw TypeError(u)},S=(u,A,_)=>A in u?C(u,A,{enumerable:!0,configurable:!0,writable:!0,value:_}):u[A]=_,l$1=(u,A,_)=>S(u,typeof A!="symbol"?A+"":A,_),v=(u,A,_)=>A.has(u)||R("Cannot "+_),t=(u,A,_)=>(v(u,A,"read from private field"),_?_.call(u):A.get(u)),c=(u,A,_)=>A.has(u)?R("Cannot add the same private member more than once"):A instanceof WeakSet?A.add(u):A.set(u,_),i$1=(u,A,_,q)=>(v(u,A,"write to private field"),A.set(u,_),_),s,r,h$1,p$1,m,f$1,w,x$1,g$1,b$1,B,y$1,T,d$1;class M{constructor(A){c(this,s,{url:"",binaryType:"blob",timeout:6*1e3,debug:!1,sendBeforAutoConnect:!1,reconnectCount:-1,reconnectTime:60*1e3,reconnectIntervalTime:5e3,heartbeatIntervalTime:1e4,checkReconnect:_=>!0,onReconnectSuccess:async _=>{},onReconnectStop:async _=>{},getHeartbeatMsg:()=>JSON.stringify({event:"heartbeat"}),onMessage:_=>{}}),l$1(this,"ws"),c(this,r,-1),c(this,h$1,-1),c(this,p$1,0),c(this,m,0),c(this,f$1,!1),c(this,w,_=>{}),l$1(this,"close",async(_=1e3,q="correctly close.")=>{var k;this.ws&&(i$1(this,f$1,!0),t(this,d$1).call(this),(k=this.ws)==null||k.close(_,q))}),l$1(this,"connect",()=>new Promise(async _=>{i$1(this,w,_),this.ws=new WebSocket(t(this,s).url),this.ws.binaryType=t(this,s).binaryType,this.ws.onopen=t(this,b$1),this.ws.onmessage=t(this,g$1),this.ws.onerror=t(this,B),this.ws.onclose=t(this,y$1)})),l$1(this,"reconnect",async _=>new Promise(q=>{t(this,s).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: await reconnect.");const k=$=>{t(this,s).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;",`------->pr-ws: ${$}`),t(this,s).onReconnectStop({msg:$}),q($)};if(t(this,x$1).call(this)===!1)return k("stop reconnect. exceed maxReconnectionTime.");if(t(this,r)!==-1&&t(this,r)===0)return k("stop reconnect. surplusReconnectCount is 0.");if(!t(this,s).checkReconnect(_))return k("stop reconnect. checkReconnect is false.");t(this,s).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;",`------->pr-ws: await ${t(this,s).reconnectIntervalTime}ms run reconnect. surplusReconnectCount is ${t(this,r)}`,_),i$1(this,p$1,setTimeout(async()=>{i$1(this,r,Math.max(-1,t(this,r)-1)),await this.connect();try{await t(this,s).onReconnectSuccess(this.ws)}catch($){console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->pr-ws: onReconnectSuccess is error",$)}q(!0)},t(this,s).reconnectIntervalTime))})),l$1(this,"sendMessage",async _=>{var q;(!this.ws||this.ws.readyState!==1)&&(t(this,s).debug&&console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: ws is not ready."),t(this,s).sendBeforAutoConnect&&(t(this,s).debug&&console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: await ws connect."),await this.connect())),(q=this.ws)==null||q.send(_)}),c(this,x$1,()=>{const _=Date.now();return t(this,h$1)===-1&&i$1(this,h$1,_+t(this,s).reconnectTime),!(_>t(this,h$1))}),c(this,g$1,_=>{const{data:q}=_;t(this,s).onMessage(q)}),c(this,b$1,()=>{t(this,s).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: connect is success.",this.ws),i$1(this,r,t(this,s).reconnectCount),i$1(this,h$1,-1),t(this,T).call(this),t(this,w).call(this,this.ws)}),c(this,B,_=>{t(this,s).debug&&console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: connect is error.",_)}),c(this,y$1,_=>{if(t(this,s).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;",`------->pr-ws: connect is close. code: ${_.code}, permanentClosed is ${t(this,f$1)}.`,_),t(this,d$1).call(this),!t(this,f$1))return this.reconnect(_);this.ws=void 0}),c(this,T,()=>{i$1(this,m,setInterval(()=>{const _=t(this,s).getHeartbeatMsg();_&&this.sendMessage(_)},t(this,s).heartbeatIntervalTime))}),c(this,d$1,()=>{clearInterval(t(this,p$1)),clearInterval(t(this,m))}),i$1(this,s,{...t(this,s),...A}),i$1(this,r,t(this,s).reconnectCount)}}s=new WeakMap,r=new WeakMap,h$1=new WeakMap,p$1=new WeakMap,m=new WeakMap,f$1=new WeakMap,w=new WeakMap,x$1=new WeakMap,g$1=new WeakMap,b$1=new WeakMap,B=new WeakMap,y$1=new WeakMap,T=new WeakMap,d$1=new WeakMap;var indexMinimal={},minimal$1={},aspromise,hasRequiredAspromise;function requireAspromise(){if(hasRequiredAspromise)return aspromise;hasRequiredAspromise=1,aspromise=u;function u(A,_){for(var q=new Array(arguments.length-1),k=0,$=2,e=!0;$<arguments.length;)q[k++]=arguments[$++];return new Promise(function(I,N){q[k]=function(P){if(e)if(e=!1,P)N(P);else{for(var U=new Array(arguments.length-1),L=0;L<U.length;)U[L++]=arguments[L];I.apply(null,U)}};try{A.apply(_||null,q)}catch(D){e&&(e=!1,N(D))}})}return aspromise}var base64={},hasRequiredBase64;function requireBase64(){return hasRequiredBase64||(hasRequiredBase64=1,function(u){var A=u;A.length=function(o){var I=o.length;if(!I)return 0;for(var N=0;--I%4>1&&o.charAt(I)==="=";)++N;return Math.ceil(o.length*3)/4-N};for(var _=new Array(64),q=new Array(123),k=0;k<64;)q[_[k]=k<26?k+65:k<52?k+71:k<62?k-4:k-59|43]=k++;A.encode=function(o,I,N){for(var D=null,P=[],U=0,L=0,Z;I<N;){var J=o[I++];switch(L){case 0:P[U++]=_[J>>2],Z=(J&3)<<4,L=1;break;case 1:P[U++]=_[Z|J>>4],Z=(J&15)<<2,L=2;break;case 2:P[U++]=_[Z|J>>6],P[U++]=_[J&63],L=0;break}U>8191&&((D||(D=[])).push(String.fromCharCode.apply(String,P)),U=0)}return L&&(P[U++]=_[Z],P[U++]=61,L===1&&(P[U++]=61)),D?(U&&D.push(String.fromCharCode.apply(String,P.slice(0,U))),D.join("")):String.fromCharCode.apply(String,P.slice(0,U))};var $="invalid encoding";A.decode=function(o,I,N){for(var D=N,P=0,U,L=0;L<o.length;){var Z=o.charCodeAt(L++);if(Z===61&&P>1)break;if((Z=q[Z])===void 0)throw Error($);switch(P){case 0:U=Z,P=1;break;case 1:I[N++]=U<<2|(Z&48)>>4,U=Z,P=2;break;case 2:I[N++]=(U&15)<<4|(Z&60)>>2,U=Z,P=3;break;case 3:I[N++]=(U&3)<<6|Z,P=0;break}}if(P===1)throw Error($);return N-D},A.test=function(o){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(o)}}(base64)),base64}var eventemitter,hasRequiredEventemitter;function requireEventemitter(){if(hasRequiredEventemitter)return eventemitter;hasRequiredEventemitter=1,eventemitter=u;function u(){this._listeners={}}return u.prototype.on=function(_,q,k){return(this._listeners[_]||(this._listeners[_]=[])).push({fn:q,ctx:k||this}),this},u.prototype.off=function(_,q){if(_===void 0)this._listeners={};else if(q===void 0)this._listeners[_]=[];else for(var k=this._listeners[_],$=0;$<k.length;)k[$].fn===q?k.splice($,1):++$;return this},u.prototype.emit=function(_){var q=this._listeners[_];if(q){for(var k=[],$=1;$<arguments.length;)k.push(arguments[$++]);for($=0;$<q.length;)q[$].fn.apply(q[$++].ctx,k)}return this},eventemitter}var float,hasRequiredFloat;function requireFloat(){if(hasRequiredFloat)return float;hasRequiredFloat=1,float=u(u);function u($){return typeof Float32Array<"u"?function(){var e=new Float32Array([-0]),o=new Uint8Array(e.buffer),I=o[3]===128;function N(L,Z,J){e[0]=L,Z[J]=o[0],Z[J+1]=o[1],Z[J+2]=o[2],Z[J+3]=o[3]}function D(L,Z,J){e[0]=L,Z[J]=o[3],Z[J+1]=o[2],Z[J+2]=o[1],Z[J+3]=o[0]}$.writeFloatLE=I?N:D,$.writeFloatBE=I?D:N;function P(L,Z){return o[0]=L[Z],o[1]=L[Z+1],o[2]=L[Z+2],o[3]=L[Z+3],e[0]}function U(L,Z){return o[3]=L[Z],o[2]=L[Z+1],o[1]=L[Z+2],o[0]=L[Z+3],e[0]}$.readFloatLE=I?P:U,$.readFloatBE=I?U:P}():function(){function e(I,N,D,P){var U=N<0?1:0;if(U&&(N=-N),N===0)I(1/N>0?0:2147483648,D,P);else if(isNaN(N))I(2143289344,D,P);else if(N>34028234663852886e22)I((U<<31|2139095040)>>>0,D,P);else if(N<11754943508222875e-54)I((U<<31|Math.round(N/1401298464324817e-60))>>>0,D,P);else{var L=Math.floor(Math.log(N)/Math.LN2),Z=Math.round(N*Math.pow(2,-L)*8388608)&8388607;I((U<<31|L+127<<23|Z)>>>0,D,P)}}$.writeFloatLE=e.bind(null,A),$.writeFloatBE=e.bind(null,_);function o(I,N,D){var P=I(N,D),U=(P>>31)*2+1,L=P>>>23&255,Z=P&8388607;return L===255?Z?NaN:U*(1/0):L===0?U*1401298464324817e-60*Z:U*Math.pow(2,L-150)*(Z+8388608)}$.readFloatLE=o.bind(null,q),$.readFloatBE=o.bind(null,k)}(),typeof Float64Array<"u"?function(){var e=new Float64Array([-0]),o=new Uint8Array(e.buffer),I=o[7]===128;function N(L,Z,J){e[0]=L,Z[J]=o[0],Z[J+1]=o[1],Z[J+2]=o[2],Z[J+3]=o[3],Z[J+4]=o[4],Z[J+5]=o[5],Z[J+6]=o[6],Z[J+7]=o[7]}function D(L,Z,J){e[0]=L,Z[J]=o[7],Z[J+1]=o[6],Z[J+2]=o[5],Z[J+3]=o[4],Z[J+4]=o[3],Z[J+5]=o[2],Z[J+6]=o[1],Z[J+7]=o[0]}$.writeDoubleLE=I?N:D,$.writeDoubleBE=I?D:N;function P(L,Z){return o[0]=L[Z],o[1]=L[Z+1],o[2]=L[Z+2],o[3]=L[Z+3],o[4]=L[Z+4],o[5]=L[Z+5],o[6]=L[Z+6],o[7]=L[Z+7],e[0]}function U(L,Z){return o[7]=L[Z],o[6]=L[Z+1],o[5]=L[Z+2],o[4]=L[Z+3],o[3]=L[Z+4],o[2]=L[Z+5],o[1]=L[Z+6],o[0]=L[Z+7],e[0]}$.readDoubleLE=I?P:U,$.readDoubleBE=I?U:P}():function(){function e(I,N,D,P,U,L){var Z=P<0?1:0;if(Z&&(P=-P),P===0)I(0,U,L+N),I(1/P>0?0:2147483648,U,L+D);else if(isNaN(P))I(0,U,L+N),I(2146959360,U,L+D);else if(P>17976931348623157e292)I(0,U,L+N),I((Z<<31|2146435072)>>>0,U,L+D);else{var J;if(P<22250738585072014e-324)J=P/5e-324,I(J>>>0,U,L+N),I((Z<<31|J/4294967296)>>>0,U,L+D);else{var z=Math.floor(Math.log(P)/Math.LN2);z===1024&&(z=1023),J=P*Math.pow(2,-z),I(J*4503599627370496>>>0,U,L+N),I((Z<<31|z+1023<<20|J*1048576&1048575)>>>0,U,L+D)}}}$.writeDoubleLE=e.bind(null,A,0,4),$.writeDoubleBE=e.bind(null,_,4,0);function o(I,N,D,P,U){var L=I(P,U+N),Z=I(P,U+D),J=(Z>>31)*2+1,z=Z>>>20&2047,H=4294967296*(Z&1048575)+L;return z===2047?H?NaN:J*(1/0):z===0?J*5e-324*H:J*Math.pow(2,z-1075)*(H+4503599627370496)}$.readDoubleLE=o.bind(null,q,0,4),$.readDoubleBE=o.bind(null,k,4,0)}(),$}function A($,e,o){e[o]=$&255,e[o+1]=$>>>8&255,e[o+2]=$>>>16&255,e[o+3]=$>>>24}function _($,e,o){e[o]=$>>>24,e[o+1]=$>>>16&255,e[o+2]=$>>>8&255,e[o+3]=$&255}function q($,e){return($[e]|$[e+1]<<8|$[e+2]<<16|$[e+3]<<24)>>>0}function k($,e){return($[e]<<24|$[e+1]<<16|$[e+2]<<8|$[e+3])>>>0}return float}var inquire_1,hasRequiredInquire;function requireInquire(){if(hasRequiredInquire)return inquire_1;hasRequiredInquire=1,inquire_1=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(u){}return null}return inquire_1}var utf8={},hasRequiredUtf8;function requireUtf8(){return hasRequiredUtf8||(hasRequiredUtf8=1,function(u){var A=u;A.length=function(q){for(var k=0,$=0,e=0;e<q.length;++e)$=q.charCodeAt(e),$<128?k+=1:$<2048?k+=2:($&64512)===55296&&(q.charCodeAt(e+1)&64512)===56320?(++e,k+=4):k+=3;return k},A.read=function(q,k,$){var e=$-k;if(e<1)return"";for(var o=null,I=[],N=0,D;k<$;)D=q[k++],D<128?I[N++]=D:D>191&&D<224?I[N++]=(D&31)<<6|q[k++]&63:D>239&&D<365?(D=((D&7)<<18|(q[k++]&63)<<12|(q[k++]&63)<<6|q[k++]&63)-65536,I[N++]=55296+(D>>10),I[N++]=56320+(D&1023)):I[N++]=(D&15)<<12|(q[k++]&63)<<6|q[k++]&63,N>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,I)),N=0);return o?(N&&o.push(String.fromCharCode.apply(String,I.slice(0,N))),o.join("")):String.fromCharCode.apply(String,I.slice(0,N))},A.write=function(q,k,$){for(var e=$,o,I,N=0;N<q.length;++N)o=q.charCodeAt(N),o<128?k[$++]=o:o<2048?(k[$++]=o>>6|192,k[$++]=o&63|128):(o&64512)===55296&&((I=q.charCodeAt(N+1))&64512)===56320?(o=65536+((o&1023)<<10)+(I&1023),++N,k[$++]=o>>18|240,k[$++]=o>>12&63|128,k[$++]=o>>6&63|128,k[$++]=o&63|128):(k[$++]=o>>12|224,k[$++]=o>>6&63|128,k[$++]=o&63|128);return $-e}}(utf8)),utf8}var pool_1,hasRequiredPool;function requirePool(){if(hasRequiredPool)return pool_1;hasRequiredPool=1,pool_1=u;function u(A,_,q){var k=q||8192,$=k>>>1,e=null,o=k;return function(N){if(N<1||N>$)return A(N);o+N>k&&(e=A(k),o=0);var D=_.call(e,o,o+=N);return o&7&&(o=(o|7)+1),D}}return pool_1}var longbits,hasRequiredLongbits;function requireLongbits(){if(hasRequiredLongbits)return longbits;hasRequiredLongbits=1,longbits=A;var u=requireMinimal$1();function A($,e){this.lo=$>>>0,this.hi=e>>>0}var _=A.zero=new A(0,0);_.toNumber=function(){return 0},_.zzEncode=_.zzDecode=function(){return this},_.length=function(){return 1};var q=A.zeroHash="\0\0\0\0\0\0\0\0";A.fromNumber=function(e){if(e===0)return _;var o=e<0;o&&(e=-e);var I=e>>>0,N=(e-I)/4294967296>>>0;return o&&(N=~N>>>0,I=~I>>>0,++I>4294967295&&(I=0,++N>4294967295&&(N=0))),new A(I,N)},A.from=function(e){if(typeof e=="number")return A.fromNumber(e);if(u.isString(e))if(u.Long)e=u.Long.fromString(e);else return A.fromNumber(parseInt(e,10));return e.low||e.high?new A(e.low>>>0,e.high>>>0):_},A.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var o=~this.lo+1>>>0,I=~this.hi>>>0;return o||(I=I+1>>>0),-(o+I*4294967296)}return this.lo+this.hi*4294967296},A.prototype.toLong=function(e){return u.Long?new u.Long(this.lo|0,this.hi|0,!!e):{low:this.lo|0,high:this.hi|0,unsigned:!!e}};var k=String.prototype.charCodeAt;return A.fromHash=function(e){return e===q?_:new A((k.call(e,0)|k.call(e,1)<<8|k.call(e,2)<<16|k.call(e,3)<<24)>>>0,(k.call(e,4)|k.call(e,5)<<8|k.call(e,6)<<16|k.call(e,7)<<24)>>>0)},A.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},A.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},A.prototype.zzDecode=function(){var e=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},A.prototype.length=function(){var e=this.lo,o=(this.lo>>>28|this.hi<<4)>>>0,I=this.hi>>>24;return I===0?o===0?e<16384?e<128?1:2:e<2097152?3:4:o<16384?o<128?5:6:o<2097152?7:8:I<128?9:10},longbits}var hasRequiredMinimal$1;function requireMinimal$1(){return hasRequiredMinimal$1||(hasRequiredMinimal$1=1,function(u){var A=u;A.asPromise=requireAspromise(),A.base64=requireBase64(),A.EventEmitter=requireEventemitter(),A.float=requireFloat(),A.inquire=requireInquire(),A.utf8=requireUtf8(),A.pool=requirePool(),A.LongBits=requireLongbits(),A.isNode=!!(typeof commonjsGlobal<"u"&&commonjsGlobal&&commonjsGlobal.process&&commonjsGlobal.process.versions&&commonjsGlobal.process.versions.node),A.global=A.isNode&&commonjsGlobal||typeof window<"u"&&window||typeof self<"u"&&self||minimal$1,A.emptyArray=Object.freeze?Object.freeze([]):[],A.emptyObject=Object.freeze?Object.freeze({}):{},A.isInteger=Number.isInteger||function($){return typeof $=="number"&&isFinite($)&&Math.floor($)===$},A.isString=function($){return typeof $=="string"||$ instanceof String},A.isObject=function($){return $&&typeof $=="object"},A.isset=A.isSet=function($,e){var o=$[e];return o!=null&&$.hasOwnProperty(e)?typeof o!="object"||(Array.isArray(o)?o.length:Object.keys(o).length)>0:!1},A.Buffer=function(){try{var k=A.inquire("buffer").Buffer;return k.prototype.utf8Write?k:null}catch{return null}}(),A._Buffer_from=null,A._Buffer_allocUnsafe=null,A.newBuffer=function($){return typeof $=="number"?A.Buffer?A._Buffer_allocUnsafe($):new A.Array($):A.Buffer?A._Buffer_from($):typeof Uint8Array>"u"?$:new Uint8Array($)},A.Array=typeof Uint8Array<"u"?Uint8Array:Array,A.Long=A.global.dcodeIO&&A.global.dcodeIO.Long||A.global.Long||A.inquire("long"),A.key2Re=/^true|false|0|1$/,A.key32Re=/^-?(?:0|[1-9][0-9]*)$/,A.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,A.longToHash=function($){return $?A.LongBits.from($).toHash():A.LongBits.zeroHash},A.longFromHash=function($,e){var o=A.LongBits.fromHash($);return A.Long?A.Long.fromBits(o.lo,o.hi,e):o.toNumber(!!e)};function _(k,$,e){for(var o=Object.keys($),I=0;I<o.length;++I)(k[o[I]]===void 0||!e)&&(k[o[I]]=$[o[I]]);return k}A.merge=_,A.lcFirst=function($){return $.charAt(0).toLowerCase()+$.substring(1)};function q(k){function $(e,o){if(!(this instanceof $))return new $(e,o);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,$):Object.defineProperty(this,"stack",{value:new Error().stack||""}),o&&_(this,o)}return $.prototype=Object.create(Error.prototype,{constructor:{value:$,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return k},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),$}A.newError=q,A.ProtocolError=q("ProtocolError"),A.oneOfGetter=function($){for(var e={},o=0;o<$.length;++o)e[$[o]]=1;return function(){for(var I=Object.keys(this),N=I.length-1;N>-1;--N)if(e[I[N]]===1&&this[I[N]]!==void 0&&this[I[N]]!==null)return I[N]}},A.oneOfSetter=function($){return function(e){for(var o=0;o<$.length;++o)$[o]!==e&&delete this[$[o]]}},A.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},A._configure=function(){var k=A.Buffer;if(!k){A._Buffer_from=A._Buffer_allocUnsafe=null;return}A._Buffer_from=k.from!==Uint8Array.from&&k.from||function(e,o){return new k(e,o)},A._Buffer_allocUnsafe=k.allocUnsafe||function(e){return new k(e)}}}(minimal$1)),minimal$1}var writer,hasRequiredWriter;function requireWriter(){if(hasRequiredWriter)return writer;hasRequiredWriter=1,writer=I;var u=requireMinimal$1(),A,_=u.LongBits,q=u.base64,k=u.utf8;function $(z,H,K){this.fn=z,this.len=H,this.next=void 0,this.val=K}function e(){}function o(z){this.head=z.head,this.tail=z.tail,this.len=z.len,this.next=z.states}function I(){this.len=0,this.head=new $(e,0,0),this.tail=this.head,this.states=null}var N=function(){return u.Buffer?function(){return(I.create=function(){return new A})()}:function(){return new I}};I.create=N(),I.alloc=function(H){return new u.Array(H)},u.Array!==Array&&(I.alloc=u.pool(I.alloc,u.Array.prototype.subarray)),I.prototype._push=function(H,K,V){return this.tail=this.tail.next=new $(H,K,V),this.len+=K,this};function D(z,H,K){H[K]=z&255}function P(z,H,K){for(;z>127;)H[K++]=z&127|128,z>>>=7;H[K]=z}function U(z,H){this.len=z,this.next=void 0,this.val=H}U.prototype=Object.create($.prototype),U.prototype.fn=P,I.prototype.uint32=function(H){return this.len+=(this.tail=this.tail.next=new U((H=H>>>0)<128?1:H<16384?2:H<2097152?3:H<268435456?4:5,H)).len,this},I.prototype.int32=function(H){return H<0?this._push(L,10,_.fromNumber(H)):this.uint32(H)},I.prototype.sint32=function(H){return this.uint32((H<<1^H>>31)>>>0)};function L(z,H,K){for(;z.hi;)H[K++]=z.lo&127|128,z.lo=(z.lo>>>7|z.hi<<25)>>>0,z.hi>>>=7;for(;z.lo>127;)H[K++]=z.lo&127|128,z.lo=z.lo>>>7;H[K++]=z.lo}I.prototype.uint64=function(H){var K=_.from(H);return this._push(L,K.length(),K)},I.prototype.int64=I.prototype.uint64,I.prototype.sint64=function(H){var K=_.from(H).zzEncode();return this._push(L,K.length(),K)},I.prototype.bool=function(H){return this._push(D,1,H?1:0)};function Z(z,H,K){H[K]=z&255,H[K+1]=z>>>8&255,H[K+2]=z>>>16&255,H[K+3]=z>>>24}I.prototype.fixed32=function(H){return this._push(Z,4,H>>>0)},I.prototype.sfixed32=I.prototype.fixed32,I.prototype.fixed64=function(H){var K=_.from(H);return this._push(Z,4,K.lo)._push(Z,4,K.hi)},I.prototype.sfixed64=I.prototype.fixed64,I.prototype.float=function(H){return this._push(u.float.writeFloatLE,4,H)},I.prototype.double=function(H){return this._push(u.float.writeDoubleLE,8,H)};var J=u.Array.prototype.set?function(H,K,V){K.set(H,V)}:function(H,K,V){for(var G=0;G<H.length;++G)K[V+G]=H[G]};return I.prototype.bytes=function(H){var K=H.length>>>0;if(!K)return this._push(D,1,0);if(u.isString(H)){var V=I.alloc(K=q.length(H));q.decode(H,V,0),H=V}return this.uint32(K)._push(J,K,H)},I.prototype.string=function(H){var K=k.length(H);return K?this.uint32(K)._push(k.write,K,H):this._push(D,1,0)},I.prototype.fork=function(){return this.states=new o(this),this.head=this.tail=new $(e,0,0),this.len=0,this},I.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new $(e,0,0),this.len=0),this},I.prototype.ldelim=function(){var H=this.head,K=this.tail,V=this.len;return this.reset().uint32(V),V&&(this.tail.next=H.next,this.tail=K,this.len+=V),this},I.prototype.finish=function(){for(var H=this.head.next,K=this.constructor.alloc(this.len),V=0;H;)H.fn(H.val,K,V),V+=H.len,H=H.next;return K},I._configure=function(z){A=z,I.create=N(),A._configure()},writer}var writer_buffer,hasRequiredWriter_buffer;function requireWriter_buffer(){if(hasRequiredWriter_buffer)return writer_buffer;hasRequiredWriter_buffer=1,writer_buffer=_;var u=requireWriter();(_.prototype=Object.create(u.prototype)).constructor=_;var A=requireMinimal$1();function _(){u.call(this)}_._configure=function(){_.alloc=A._Buffer_allocUnsafe,_.writeBytesBuffer=A.Buffer&&A.Buffer.prototype instanceof Uint8Array&&A.Buffer.prototype.set.name==="set"?function($,e,o){e.set($,o)}:function($,e,o){if($.copy)$.copy(e,o,0,$.length);else for(var I=0;I<$.length;)e[o++]=$[I++]}},_.prototype.bytes=function($){A.isString($)&&($=A._Buffer_from($,"base64"));var e=$.length>>>0;return this.uint32(e),e&&this._push(_.writeBytesBuffer,e,$),this};function q(k,$,e){k.length<40?A.utf8.write(k,$,e):$.utf8Write?$.utf8Write(k,e):$.write(k,e)}return _.prototype.string=function($){var e=A.Buffer.byteLength($);return this.uint32(e),e&&this._push(q,e,$),this},_._configure(),writer_buffer}var reader,hasRequiredReader;function requireReader(){if(hasRequiredReader)return reader;hasRequiredReader=1,reader=$;var u=requireMinimal$1(),A,_=u.LongBits,q=u.utf8;function k(P,U){return RangeError("index out of range: "+P.pos+" + "+(U||1)+" > "+P.len)}function $(P){this.buf=P,this.pos=0,this.len=P.length}var e=typeof Uint8Array<"u"?function(U){if(U instanceof Uint8Array||Array.isArray(U))return new $(U);throw Error("illegal buffer")}:function(U){if(Array.isArray(U))return new $(U);throw Error("illegal buffer")},o=function(){return u.Buffer?function(L){return($.create=function(J){return u.Buffer.isBuffer(J)?new A(J):e(J)})(L)}:e};$.create=o(),$.prototype._slice=u.Array.prototype.subarray||u.Array.prototype.slice,$.prototype.uint32=function(){var U=4294967295;return function(){if(U=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(U=(U|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(U=(U|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(U=(U|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(U=(U|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return U;if((this.pos+=5)>this.len)throw this.pos=this.len,k(this,10);return U}}(),$.prototype.int32=function(){return this.uint32()|0},$.prototype.sint32=function(){var U=this.uint32();return U>>>1^-(U&1)|0};function I(){var P=new _(0,0),U=0;if(this.len-this.pos>4){for(;U<4;++U)if(P.lo=(P.lo|(this.buf[this.pos]&127)<<U*7)>>>0,this.buf[this.pos++]<128)return P;if(P.lo=(P.lo|(this.buf[this.pos]&127)<<28)>>>0,P.hi=(P.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return P;U=0}else{for(;U<3;++U){if(this.pos>=this.len)throw k(this);if(P.lo=(P.lo|(this.buf[this.pos]&127)<<U*7)>>>0,this.buf[this.pos++]<128)return P}return P.lo=(P.lo|(this.buf[this.pos++]&127)<<U*7)>>>0,P}if(this.len-this.pos>4){for(;U<5;++U)if(P.hi=(P.hi|(this.buf[this.pos]&127)<<U*7+3)>>>0,this.buf[this.pos++]<128)return P}else for(;U<5;++U){if(this.pos>=this.len)throw k(this);if(P.hi=(P.hi|(this.buf[this.pos]&127)<<U*7+3)>>>0,this.buf[this.pos++]<128)return P}throw Error("invalid varint encoding")}$.prototype.bool=function(){return this.uint32()!==0};function N(P,U){return(P[U-4]|P[U-3]<<8|P[U-2]<<16|P[U-1]<<24)>>>0}$.prototype.fixed32=function(){if(this.pos+4>this.len)throw k(this,4);return N(this.buf,this.pos+=4)},$.prototype.sfixed32=function(){if(this.pos+4>this.len)throw k(this,4);return N(this.buf,this.pos+=4)|0};function D(){if(this.pos+8>this.len)throw k(this,8);return new _(N(this.buf,this.pos+=4),N(this.buf,this.pos+=4))}return $.prototype.float=function(){if(this.pos+4>this.len)throw k(this,4);var U=u.float.readFloatLE(this.buf,this.pos);return this.pos+=4,U},$.prototype.double=function(){if(this.pos+8>this.len)throw k(this,4);var U=u.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,U},$.prototype.bytes=function(){var U=this.uint32(),L=this.pos,Z=this.pos+U;if(Z>this.len)throw k(this,U);if(this.pos+=U,Array.isArray(this.buf))return this.buf.slice(L,Z);if(L===Z){var J=u.Buffer;return J?J.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,L,Z)},$.prototype.string=function(){var U=this.bytes();return q.read(U,0,U.length)},$.prototype.skip=function(U){if(typeof U=="number"){if(this.pos+U>this.len)throw k(this,U);this.pos+=U}else do if(this.pos>=this.len)throw k(this);while(this.buf[this.pos++]&128);return this},$.prototype.skipType=function(P){switch(P){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(P=this.uint32()&7)!==4;)this.skipType(P);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+P+" at offset "+this.pos)}return this},$._configure=function(P){A=P,$.create=o(),A._configure();var U=u.Long?"toLong":"toNumber";u.merge($.prototype,{int64:function(){return I.call(this)[U](!1)},uint64:function(){return I.call(this)[U](!0)},sint64:function(){return I.call(this).zzDecode()[U](!1)},fixed64:function(){return D.call(this)[U](!0)},sfixed64:function(){return D.call(this)[U](!1)}})},reader}var reader_buffer,hasRequiredReader_buffer;function requireReader_buffer(){if(hasRequiredReader_buffer)return reader_buffer;hasRequiredReader_buffer=1,reader_buffer=_;var u=requireReader();(_.prototype=Object.create(u.prototype)).constructor=_;var A=requireMinimal$1();function _(q){u.call(this,q)}return _._configure=function(){A.Buffer&&(_.prototype._slice=A.Buffer.prototype.slice)},_.prototype.string=function(){var k=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+k,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+k,this.len))},_._configure(),reader_buffer}var rpc={},service,hasRequiredService;function requireService(){if(hasRequiredService)return service;hasRequiredService=1,service=A;var u=requireMinimal$1();(A.prototype=Object.create(u.EventEmitter.prototype)).constructor=A;function A(_,q,k){if(typeof _!="function")throw TypeError("rpcImpl must be a function");u.EventEmitter.call(this),this.rpcImpl=_,this.requestDelimited=!!q,this.responseDelimited=!!k}return A.prototype.rpcCall=function _(q,k,$,e,o){if(!e)throw TypeError("request must be specified");var I=this;if(!o)return u.asPromise(_,I,q,k,$,e);if(!I.rpcImpl){setTimeout(function(){o(Error("already ended"))},0);return}try{return I.rpcImpl(q,k[I.requestDelimited?"encodeDelimited":"encode"](e).finish(),function(D,P){if(D)return I.emit("error",D,q),o(D);if(P===null){I.end(!0);return}if(!(P instanceof $))try{P=$[I.responseDelimited?"decodeDelimited":"decode"](P)}catch(U){return I.emit("error",U,q),o(U)}return I.emit("data",P,q),o(null,P)})}catch(N){I.emit("error",N,q),setTimeout(function(){o(N)},0);return}},A.prototype.end=function(q){return this.rpcImpl&&(q||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this},service}var hasRequiredRpc;function requireRpc(){return hasRequiredRpc||(hasRequiredRpc=1,function(u){var A=u;A.Service=requireService()}(rpc)),rpc}var roots,hasRequiredRoots;function requireRoots(){return hasRequiredRoots||(hasRequiredRoots=1,roots={}),roots}var hasRequiredIndexMinimal;function requireIndexMinimal(){return hasRequiredIndexMinimal||(hasRequiredIndexMinimal=1,function(u){var A=u;A.build="minimal",A.Writer=requireWriter(),A.BufferWriter=requireWriter_buffer(),A.Reader=requireReader(),A.BufferReader=requireReader_buffer(),A.util=requireMinimal$1(),A.rpc=requireRpc(),A.roots=requireRoots(),A.configure=_;function _(){A.util._configure(),A.Writer._configure(A.BufferWriter),A.Reader._configure(A.BufferReader)}_()}(indexMinimal)),indexMinimal}var minimal,hasRequiredMinimal;function requireMinimal(){return hasRequiredMinimal||(hasRequiredMinimal=1,minimal=requireIndexMinimal()),minimal}var minimalExports=requireMinimal();const $Reader=minimalExports.Reader,$Writer=minimalExports.Writer,$util=minimalExports.util,$root=minimalExports.roots.default||(minimalExports.roots.default={}),com=$root.com=(()=>{const u={};return u.quick=function(){const A={};return A.voice=function(){const _={};return _.proto=function(){const q={};return q.CommonReq=function(){function k($){if($)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.event="",k.prototype.data=$util.newBuffer([]),k.prototype.sn=$util.Long?$util.Long.fromBits(0,0,!1):0,k.prototype.time=$util.Long?$util.Long.fromBits(0,0,!1):0,k.prototype.valid=$util.Long?$util.Long.fromBits(0,0,!1):0,k.prototype.version=0,k.prototype.compress=!1,k.create=function(e){return new k(e)},k.encode=function(e,o){return o||(o=$Writer.create()),e.event!=null&&Object.hasOwnProperty.call(e,"event")&&o.uint32(10).string(e.event),e.data!=null&&Object.hasOwnProperty.call(e,"data")&&o.uint32(18).bytes(e.data),e.sn!=null&&Object.hasOwnProperty.call(e,"sn")&&o.uint32(24).int64(e.sn),e.time!=null&&Object.hasOwnProperty.call(e,"time")&&o.uint32(32).int64(e.time),e.valid!=null&&Object.hasOwnProperty.call(e,"valid")&&o.uint32(40).int64(e.valid),e.version!=null&&Object.hasOwnProperty.call(e,"version")&&o.uint32(48).int32(e.version),e.compress!=null&&Object.hasOwnProperty.call(e,"compress")&&o.uint32(56).bool(e.compress),o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.CommonReq;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.event=e.string();break}case 2:{N.data=e.bytes();break}case 3:{N.sn=e.int64();break}case 4:{N.time=e.int64();break}case 5:{N.valid=e.int64();break}case 6:{N.version=e.int32();break}case 7:{N.compress=e.bool();break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){return typeof e!="object"||e===null?"object expected":e.event!=null&&e.hasOwnProperty("event")&&!$util.isString(e.event)?"event: string expected":e.data!=null&&e.hasOwnProperty("data")&&!(e.data&&typeof e.data.length=="number"||$util.isString(e.data))?"data: buffer expected":e.sn!=null&&e.hasOwnProperty("sn")&&!$util.isInteger(e.sn)&&!(e.sn&&$util.isInteger(e.sn.low)&&$util.isInteger(e.sn.high))?"sn: integer|Long expected":e.time!=null&&e.hasOwnProperty("time")&&!$util.isInteger(e.time)&&!(e.time&&$util.isInteger(e.time.low)&&$util.isInteger(e.time.high))?"time: integer|Long expected":e.valid!=null&&e.hasOwnProperty("valid")&&!$util.isInteger(e.valid)&&!(e.valid&&$util.isInteger(e.valid.low)&&$util.isInteger(e.valid.high))?"valid: integer|Long expected":e.version!=null&&e.hasOwnProperty("version")&&!$util.isInteger(e.version)?"version: integer expected":e.compress!=null&&e.hasOwnProperty("compress")&&typeof e.compress!="boolean"?"compress: boolean expected":null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.CommonReq)return e;let o=new $root.com.quick.voice.proto.CommonReq;return e.event!=null&&(o.event=String(e.event)),e.data!=null&&(typeof e.data=="string"?$util.base64.decode(e.data,o.data=$util.newBuffer($util.base64.length(e.data)),0):e.data.length>=0&&(o.data=e.data)),e.sn!=null&&($util.Long?(o.sn=$util.Long.fromValue(e.sn)).unsigned=!1:typeof e.sn=="string"?o.sn=parseInt(e.sn,10):typeof e.sn=="number"?o.sn=e.sn:typeof e.sn=="object"&&(o.sn=new $util.LongBits(e.sn.low>>>0,e.sn.high>>>0).toNumber())),e.time!=null&&($util.Long?(o.time=$util.Long.fromValue(e.time)).unsigned=!1:typeof e.time=="string"?o.time=parseInt(e.time,10):typeof e.time=="number"?o.time=e.time:typeof e.time=="object"&&(o.time=new $util.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber())),e.valid!=null&&($util.Long?(o.valid=$util.Long.fromValue(e.valid)).unsigned=!1:typeof e.valid=="string"?o.valid=parseInt(e.valid,10):typeof e.valid=="number"?o.valid=e.valid:typeof e.valid=="object"&&(o.valid=new $util.LongBits(e.valid.low>>>0,e.valid.high>>>0).toNumber())),e.version!=null&&(o.version=e.version|0),e.compress!=null&&(o.compress=!!e.compress),o},k.toObject=function(e,o){o||(o={});let I={};if(o.defaults){if(I.event="",o.bytes===String?I.data="":(I.data=[],o.bytes!==Array&&(I.data=$util.newBuffer(I.data))),$util.Long){let N=new $util.Long(0,0,!1);I.sn=o.longs===String?N.toString():o.longs===Number?N.toNumber():N}else I.sn=o.longs===String?"0":0;if($util.Long){let N=new $util.Long(0,0,!1);I.time=o.longs===String?N.toString():o.longs===Number?N.toNumber():N}else I.time=o.longs===String?"0":0;if($util.Long){let N=new $util.Long(0,0,!1);I.valid=o.longs===String?N.toString():o.longs===Number?N.toNumber():N}else I.valid=o.longs===String?"0":0;I.version=0,I.compress=!1}return e.event!=null&&e.hasOwnProperty("event")&&(I.event=e.event),e.data!=null&&e.hasOwnProperty("data")&&(I.data=o.bytes===String?$util.base64.encode(e.data,0,e.data.length):o.bytes===Array?Array.prototype.slice.call(e.data):e.data),e.sn!=null&&e.hasOwnProperty("sn")&&(typeof e.sn=="number"?I.sn=o.longs===String?String(e.sn):e.sn:I.sn=o.longs===String?$util.Long.prototype.toString.call(e.sn):o.longs===Number?new $util.LongBits(e.sn.low>>>0,e.sn.high>>>0).toNumber():e.sn),e.time!=null&&e.hasOwnProperty("time")&&(typeof e.time=="number"?I.time=o.longs===String?String(e.time):e.time:I.time=o.longs===String?$util.Long.prototype.toString.call(e.time):o.longs===Number?new $util.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber():e.time),e.valid!=null&&e.hasOwnProperty("valid")&&(typeof e.valid=="number"?I.valid=o.longs===String?String(e.valid):e.valid:I.valid=o.longs===String?$util.Long.prototype.toString.call(e.valid):o.longs===Number?new $util.LongBits(e.valid.low>>>0,e.valid.high>>>0).toNumber():e.valid),e.version!=null&&e.hasOwnProperty("version")&&(I.version=e.version),e.compress!=null&&e.hasOwnProperty("compress")&&(I.compress=e.compress),I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.CommonReq"},k}(),q.CommonRsp=function(){function k($){if($)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.event="",k.prototype.data=$util.newBuffer([]),k.prototype.sn=$util.Long?$util.Long.fromBits(0,0,!1):0,k.prototype.time=$util.Long?$util.Long.fromBits(0,0,!1):0,k.prototype.valid=$util.Long?$util.Long.fromBits(0,0,!1):0,k.prototype.code=0,k.prototype.desc="",k.prototype.version=0,k.prototype.compress=!1,k.create=function(e){return new k(e)},k.encode=function(e,o){return o||(o=$Writer.create()),e.event!=null&&Object.hasOwnProperty.call(e,"event")&&o.uint32(10).string(e.event),e.data!=null&&Object.hasOwnProperty.call(e,"data")&&o.uint32(18).bytes(e.data),e.sn!=null&&Object.hasOwnProperty.call(e,"sn")&&o.uint32(24).int64(e.sn),e.time!=null&&Object.hasOwnProperty.call(e,"time")&&o.uint32(32).int64(e.time),e.valid!=null&&Object.hasOwnProperty.call(e,"valid")&&o.uint32(40).int64(e.valid),e.code!=null&&Object.hasOwnProperty.call(e,"code")&&o.uint32(48).int32(e.code),e.desc!=null&&Object.hasOwnProperty.call(e,"desc")&&o.uint32(58).string(e.desc),e.version!=null&&Object.hasOwnProperty.call(e,"version")&&o.uint32(64).int32(e.version),e.compress!=null&&Object.hasOwnProperty.call(e,"compress")&&o.uint32(72).bool(e.compress),o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.CommonRsp;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.event=e.string();break}case 2:{N.data=e.bytes();break}case 3:{N.sn=e.int64();break}case 4:{N.time=e.int64();break}case 5:{N.valid=e.int64();break}case 6:{N.code=e.int32();break}case 7:{N.desc=e.string();break}case 8:{N.version=e.int32();break}case 9:{N.compress=e.bool();break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){return typeof e!="object"||e===null?"object expected":e.event!=null&&e.hasOwnProperty("event")&&!$util.isString(e.event)?"event: string expected":e.data!=null&&e.hasOwnProperty("data")&&!(e.data&&typeof e.data.length=="number"||$util.isString(e.data))?"data: buffer expected":e.sn!=null&&e.hasOwnProperty("sn")&&!$util.isInteger(e.sn)&&!(e.sn&&$util.isInteger(e.sn.low)&&$util.isInteger(e.sn.high))?"sn: integer|Long expected":e.time!=null&&e.hasOwnProperty("time")&&!$util.isInteger(e.time)&&!(e.time&&$util.isInteger(e.time.low)&&$util.isInteger(e.time.high))?"time: integer|Long expected":e.valid!=null&&e.hasOwnProperty("valid")&&!$util.isInteger(e.valid)&&!(e.valid&&$util.isInteger(e.valid.low)&&$util.isInteger(e.valid.high))?"valid: integer|Long expected":e.code!=null&&e.hasOwnProperty("code")&&!$util.isInteger(e.code)?"code: integer expected":e.desc!=null&&e.hasOwnProperty("desc")&&!$util.isString(e.desc)?"desc: string expected":e.version!=null&&e.hasOwnProperty("version")&&!$util.isInteger(e.version)?"version: integer expected":e.compress!=null&&e.hasOwnProperty("compress")&&typeof e.compress!="boolean"?"compress: boolean expected":null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.CommonRsp)return e;let o=new $root.com.quick.voice.proto.CommonRsp;return e.event!=null&&(o.event=String(e.event)),e.data!=null&&(typeof e.data=="string"?$util.base64.decode(e.data,o.data=$util.newBuffer($util.base64.length(e.data)),0):e.data.length>=0&&(o.data=e.data)),e.sn!=null&&($util.Long?(o.sn=$util.Long.fromValue(e.sn)).unsigned=!1:typeof e.sn=="string"?o.sn=parseInt(e.sn,10):typeof e.sn=="number"?o.sn=e.sn:typeof e.sn=="object"&&(o.sn=new $util.LongBits(e.sn.low>>>0,e.sn.high>>>0).toNumber())),e.time!=null&&($util.Long?(o.time=$util.Long.fromValue(e.time)).unsigned=!1:typeof e.time=="string"?o.time=parseInt(e.time,10):typeof e.time=="number"?o.time=e.time:typeof e.time=="object"&&(o.time=new $util.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber())),e.valid!=null&&($util.Long?(o.valid=$util.Long.fromValue(e.valid)).unsigned=!1:typeof e.valid=="string"?o.valid=parseInt(e.valid,10):typeof e.valid=="number"?o.valid=e.valid:typeof e.valid=="object"&&(o.valid=new $util.LongBits(e.valid.low>>>0,e.valid.high>>>0).toNumber())),e.code!=null&&(o.code=e.code|0),e.desc!=null&&(o.desc=String(e.desc)),e.version!=null&&(o.version=e.version|0),e.compress!=null&&(o.compress=!!e.compress),o},k.toObject=function(e,o){o||(o={});let I={};if(o.defaults){if(I.event="",o.bytes===String?I.data="":(I.data=[],o.bytes!==Array&&(I.data=$util.newBuffer(I.data))),$util.Long){let N=new $util.Long(0,0,!1);I.sn=o.longs===String?N.toString():o.longs===Number?N.toNumber():N}else I.sn=o.longs===String?"0":0;if($util.Long){let N=new $util.Long(0,0,!1);I.time=o.longs===String?N.toString():o.longs===Number?N.toNumber():N}else I.time=o.longs===String?"0":0;if($util.Long){let N=new $util.Long(0,0,!1);I.valid=o.longs===String?N.toString():o.longs===Number?N.toNumber():N}else I.valid=o.longs===String?"0":0;I.code=0,I.desc="",I.version=0,I.compress=!1}return e.event!=null&&e.hasOwnProperty("event")&&(I.event=e.event),e.data!=null&&e.hasOwnProperty("data")&&(I.data=o.bytes===String?$util.base64.encode(e.data,0,e.data.length):o.bytes===Array?Array.prototype.slice.call(e.data):e.data),e.sn!=null&&e.hasOwnProperty("sn")&&(typeof e.sn=="number"?I.sn=o.longs===String?String(e.sn):e.sn:I.sn=o.longs===String?$util.Long.prototype.toString.call(e.sn):o.longs===Number?new $util.LongBits(e.sn.low>>>0,e.sn.high>>>0).toNumber():e.sn),e.time!=null&&e.hasOwnProperty("time")&&(typeof e.time=="number"?I.time=o.longs===String?String(e.time):e.time:I.time=o.longs===String?$util.Long.prototype.toString.call(e.time):o.longs===Number?new $util.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber():e.time),e.valid!=null&&e.hasOwnProperty("valid")&&(typeof e.valid=="number"?I.valid=o.longs===String?String(e.valid):e.valid:I.valid=o.longs===String?$util.Long.prototype.toString.call(e.valid):o.longs===Number?new $util.LongBits(e.valid.low>>>0,e.valid.high>>>0).toNumber():e.valid),e.code!=null&&e.hasOwnProperty("code")&&(I.code=e.code),e.desc!=null&&e.hasOwnProperty("desc")&&(I.desc=e.desc),e.version!=null&&e.hasOwnProperty("version")&&(I.version=e.version),e.compress!=null&&e.hasOwnProperty("compress")&&(I.compress=e.compress),I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.CommonRsp"},k}(),q.User=function(){function k(e){if(this.tracks=[],e)for(let o=Object.keys(e),I=0;I<o.length;++I)e[o[I]]!=null&&(this[o[I]]=e[o[I]])}k.prototype.id="",k.prototype.callAction=null,k.prototype.callState=null,k.prototype.joinTime=null,k.prototype.tracks=$util.emptyArray,k.prototype.permissions=null,k.prototype.isPublished=null,k.prototype.behavior=null;let $;return Object.defineProperty(k.prototype,"_callAction",{get:$util.oneOfGetter($=["callAction"]),set:$util.oneOfSetter($)}),Object.defineProperty(k.prototype,"_callState",{get:$util.oneOfGetter($=["callState"]),set:$util.oneOfSetter($)}),Object.defineProperty(k.prototype,"_joinTime",{get:$util.oneOfGetter($=["joinTime"]),set:$util.oneOfSetter($)}),Object.defineProperty(k.prototype,"_permissions",{get:$util.oneOfGetter($=["permissions"]),set:$util.oneOfSetter($)}),Object.defineProperty(k.prototype,"_isPublished",{get:$util.oneOfGetter($=["isPublished"]),set:$util.oneOfSetter($)}),Object.defineProperty(k.prototype,"_behavior",{get:$util.oneOfGetter($=["behavior"]),set:$util.oneOfSetter($)}),k.create=function(o){return new k(o)},k.encode=function(o,I){if(I||(I=$Writer.create()),o.id!=null&&Object.hasOwnProperty.call(o,"id")&&I.uint32(10).string(o.id),o.callAction!=null&&Object.hasOwnProperty.call(o,"callAction")&&I.uint32(16).int32(o.callAction),o.callState!=null&&Object.hasOwnProperty.call(o,"callState")&&I.uint32(24).int32(o.callState),o.joinTime!=null&&Object.hasOwnProperty.call(o,"joinTime")&&I.uint32(32).int64(o.joinTime),o.tracks!=null&&o.tracks.length)for(let N=0;N<o.tracks.length;++N)$root.com.quick.voice.proto.Track.encode(o.tracks[N],I.uint32(42).fork()).ldelim();return o.permissions!=null&&Object.hasOwnProperty.call(o,"permissions")&&I.uint32(48).int32(o.permissions),o.isPublished!=null&&Object.hasOwnProperty.call(o,"isPublished")&&I.uint32(56).bool(o.isPublished),o.behavior!=null&&Object.hasOwnProperty.call(o,"behavior")&&I.uint32(64).int32(o.behavior),I},k.encodeDelimited=function(o,I){return this.encode(o,I).ldelim()},k.decode=function(o,I){o instanceof $Reader||(o=$Reader.create(o));let N=I===void 0?o.len:o.pos+I,D=new $root.com.quick.voice.proto.User;for(;o.pos<N;){let P=o.uint32();switch(P>>>3){case 1:{D.id=o.string();break}case 2:{D.callAction=o.int32();break}case 3:{D.callState=o.int32();break}case 4:{D.joinTime=o.int64();break}case 5:{D.tracks&&D.tracks.length||(D.tracks=[]),D.tracks.push($root.com.quick.voice.proto.Track.decode(o,o.uint32()));break}case 6:{D.permissions=o.int32();break}case 7:{D.isPublished=o.bool();break}case 8:{D.behavior=o.int32();break}default:o.skipType(P&7);break}}return D},k.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},k.verify=function(o){if(typeof o!="object"||o===null)return"object expected";if(o.id!=null&&o.hasOwnProperty("id")&&!$util.isString(o.id))return"id: string expected";if(o.callAction!=null&&o.hasOwnProperty("callAction")&&!$util.isInteger(o.callAction))return"callAction: integer expected";if(o.callState!=null&&o.hasOwnProperty("callState")&&!$util.isInteger(o.callState))return"callState: integer expected";if(o.joinTime!=null&&o.hasOwnProperty("joinTime")&&!$util.isInteger(o.joinTime)&&!(o.joinTime&&$util.isInteger(o.joinTime.low)&&$util.isInteger(o.joinTime.high)))return"joinTime: integer|Long expected";if(o.tracks!=null&&o.hasOwnProperty("tracks")){if(!Array.isArray(o.tracks))return"tracks: array expected";for(let I=0;I<o.tracks.length;++I){let N=$root.com.quick.voice.proto.Track.verify(o.tracks[I]);if(N)return"tracks."+N}}return o.permissions!=null&&o.hasOwnProperty("permissions")&&!$util.isInteger(o.permissions)?"permissions: integer expected":o.isPublished!=null&&o.hasOwnProperty("isPublished")&&typeof o.isPublished!="boolean"?"isPublished: boolean expected":o.behavior!=null&&o.hasOwnProperty("behavior")&&!$util.isInteger(o.behavior)?"behavior: integer expected":null},k.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.User)return o;let I=new $root.com.quick.voice.proto.User;if(o.id!=null&&(I.id=String(o.id)),o.callAction!=null&&(I.callAction=o.callAction|0),o.callState!=null&&(I.callState=o.callState|0),o.joinTime!=null&&($util.Long?(I.joinTime=$util.Long.fromValue(o.joinTime)).unsigned=!1:typeof o.joinTime=="string"?I.joinTime=parseInt(o.joinTime,10):typeof o.joinTime=="number"?I.joinTime=o.joinTime:typeof o.joinTime=="object"&&(I.joinTime=new $util.LongBits(o.joinTime.low>>>0,o.joinTime.high>>>0).toNumber())),o.tracks){if(!Array.isArray(o.tracks))throw TypeError(".com.quick.voice.proto.User.tracks: array expected");I.tracks=[];for(let N=0;N<o.tracks.length;++N){if(typeof o.tracks[N]!="object")throw TypeError(".com.quick.voice.proto.User.tracks: object expected");I.tracks[N]=$root.com.quick.voice.proto.Track.fromObject(o.tracks[N])}}return o.permissions!=null&&(I.permissions=o.permissions|0),o.isPublished!=null&&(I.isPublished=!!o.isPublished),o.behavior!=null&&(I.behavior=o.behavior|0),I},k.toObject=function(o,I){I||(I={});let N={};if((I.arrays||I.defaults)&&(N.tracks=[]),I.defaults&&(N.id=""),o.id!=null&&o.hasOwnProperty("id")&&(N.id=o.id),o.callAction!=null&&o.hasOwnProperty("callAction")&&(N.callAction=o.callAction,I.oneofs&&(N._callAction="callAction")),o.callState!=null&&o.hasOwnProperty("callState")&&(N.callState=o.callState,I.oneofs&&(N._callState="callState")),o.joinTime!=null&&o.hasOwnProperty("joinTime")&&(typeof o.joinTime=="number"?N.joinTime=I.longs===String?String(o.joinTime):o.joinTime:N.joinTime=I.longs===String?$util.Long.prototype.toString.call(o.joinTime):I.longs===Number?new $util.LongBits(o.joinTime.low>>>0,o.joinTime.high>>>0).toNumber():o.joinTime,I.oneofs&&(N._joinTime="joinTime")),o.tracks&&o.tracks.length){N.tracks=[];for(let D=0;D<o.tracks.length;++D)N.tracks[D]=$root.com.quick.voice.proto.Track.toObject(o.tracks[D],I)}return o.permissions!=null&&o.hasOwnProperty("permissions")&&(N.permissions=o.permissions,I.oneofs&&(N._permissions="permissions")),o.isPublished!=null&&o.hasOwnProperty("isPublished")&&(N.isPublished=o.isPublished,I.oneofs&&(N._isPublished="isPublished")),o.behavior!=null&&o.hasOwnProperty("behavior")&&(N.behavior=o.behavior,I.oneofs&&(N._behavior="behavior")),N},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.User"},k}(),q.Login=function(){function k($){if($)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.appid="",k.prototype.userId="",k.prototype.sdkToken="",k.create=function(e){return new k(e)},k.encode=function(e,o){return o||(o=$Writer.create()),e.appid!=null&&Object.hasOwnProperty.call(e,"appid")&&o.uint32(10).string(e.appid),e.userId!=null&&Object.hasOwnProperty.call(e,"userId")&&o.uint32(18).string(e.userId),e.sdkToken!=null&&Object.hasOwnProperty.call(e,"sdkToken")&&o.uint32(26).string(e.sdkToken),o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.Login;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.appid=e.string();break}case 2:{N.userId=e.string();break}case 3:{N.sdkToken=e.string();break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){return typeof e!="object"||e===null?"object expected":e.appid!=null&&e.hasOwnProperty("appid")&&!$util.isString(e.appid)?"appid: string expected":e.userId!=null&&e.hasOwnProperty("userId")&&!$util.isString(e.userId)?"userId: string expected":e.sdkToken!=null&&e.hasOwnProperty("sdkToken")&&!$util.isString(e.sdkToken)?"sdkToken: string expected":null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.Login)return e;let o=new $root.com.quick.voice.proto.Login;return e.appid!=null&&(o.appid=String(e.appid)),e.userId!=null&&(o.userId=String(e.userId)),e.sdkToken!=null&&(o.sdkToken=String(e.sdkToken)),o},k.toObject=function(e,o){o||(o={});let I={};return o.defaults&&(I.appid="",I.userId="",I.sdkToken=""),e.appid!=null&&e.hasOwnProperty("appid")&&(I.appid=e.appid),e.userId!=null&&e.hasOwnProperty("userId")&&(I.userId=e.userId),e.sdkToken!=null&&e.hasOwnProperty("sdkToken")&&(I.sdkToken=e.sdkToken),I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.Login"},k}(),q.Track=function(){function k(e){if(e)for(let o=Object.keys(e),I=0;I<o.length;++I)e[o[I]]!=null&&(this[o[I]]=e[o[I]])}k.prototype.mid="",k.prototype.trackName=null,k.prototype.location=null,k.prototype.userId=null,k.prototype.code=null,k.prototype.desc=null,k.prototype.type=null,k.prototype.isValid=null;let $;return Object.defineProperty(k.prototype,"_trackName",{get:$util.oneOfGetter($=["trackName"]),set:$util.oneOfSetter($)}),Object.defineProperty(k.prototype,"_location",{get:$util.oneOfGetter($=["location"]),set:$util.oneOfSetter($)}),Object.defineProperty(k.prototype,"_userId",{get:$util.oneOfGetter($=["userId"]),set:$util.oneOfSetter($)}),Object.defineProperty(k.prototype,"_code",{get:$util.oneOfGetter($=["code"]),set:$util.oneOfSetter($)}),Object.defineProperty(k.prototype,"_desc",{get:$util.oneOfGetter($=["desc"]),set:$util.oneOfSetter($)}),Object.defineProperty(k.prototype,"_type",{get:$util.oneOfGetter($=["type"]),set:$util.oneOfSetter($)}),Object.defineProperty(k.prototype,"_isValid",{get:$util.oneOfGetter($=["isValid"]),set:$util.oneOfSetter($)}),k.create=function(o){return new k(o)},k.encode=function(o,I){return I||(I=$Writer.create()),o.mid!=null&&Object.hasOwnProperty.call(o,"mid")&&I.uint32(10).string(o.mid),o.trackName!=null&&Object.hasOwnProperty.call(o,"trackName")&&I.uint32(18).string(o.trackName),o.location!=null&&Object.hasOwnProperty.call(o,"location")&&I.uint32(26).string(o.location),o.userId!=null&&Object.hasOwnProperty.call(o,"userId")&&I.uint32(34).string(o.userId),o.code!=null&&Object.hasOwnProperty.call(o,"code")&&I.uint32(40).int32(o.code),o.desc!=null&&Object.hasOwnProperty.call(o,"desc")&&I.uint32(50).string(o.desc),o.type!=null&&Object.hasOwnProperty.call(o,"type")&&I.uint32(56).int32(o.type),o.isValid!=null&&Object.hasOwnProperty.call(o,"isValid")&&I.uint32(64).bool(o.isValid),I},k.encodeDelimited=function(o,I){return this.encode(o,I).ldelim()},k.decode=function(o,I){o instanceof $Reader||(o=$Reader.create(o));let N=I===void 0?o.len:o.pos+I,D=new $root.com.quick.voice.proto.Track;for(;o.pos<N;){let P=o.uint32();switch(P>>>3){case 1:{D.mid=o.string();break}case 2:{D.trackName=o.string();break}case 3:{D.location=o.string();break}case 4:{D.userId=o.string();break}case 5:{D.code=o.int32();break}case 6:{D.desc=o.string();break}case 7:{D.type=o.int32();break}case 8:{D.isValid=o.bool();break}default:o.skipType(P&7);break}}return D},k.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},k.verify=function(o){if(typeof o!="object"||o===null)return"object expected";if(o.mid!=null&&o.hasOwnProperty("mid")&&!$util.isString(o.mid))return"mid: string expected";if(o.trackName!=null&&o.hasOwnProperty("trackName")&&!$util.isString(o.trackName))return"trackName: string expected";if(o.location!=null&&o.hasOwnProperty("location")&&!$util.isString(o.location))return"location: string expected";if(o.userId!=null&&o.hasOwnProperty("userId")&&!$util.isString(o.userId))return"userId: string expected";if(o.code!=null&&o.hasOwnProperty("code")&&!$util.isInteger(o.code))return"code: integer expected";if(o.desc!=null&&o.hasOwnProperty("desc")&&!$util.isString(o.desc))return"desc: string expected";if(o.type!=null&&o.hasOwnProperty("type"))switch(o.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:break}return o.isValid!=null&&o.hasOwnProperty("isValid")&&typeof o.isValid!="boolean"?"isValid: boolean expected":null},k.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.Track)return o;let I=new $root.com.quick.voice.proto.Track;switch(o.mid!=null&&(I.mid=String(o.mid)),o.trackName!=null&&(I.trackName=String(o.trackName)),o.location!=null&&(I.location=String(o.location)),o.userId!=null&&(I.userId=String(o.userId)),o.code!=null&&(I.code=o.code|0),o.desc!=null&&(I.desc=String(o.desc)),o.type){default:if(typeof o.type=="number"){I.type=o.type;break}break;case"Microphone":case 0:I.type=0;break;case"Camera":case 1:I.type=1;break;case"Screen":case 2:I.type=2;break;case"SystemVoice":case 3:I.type=3;break}return o.isValid!=null&&(I.isValid=!!o.isValid),I},k.toObject=function(o,I){I||(I={});let N={};return I.defaults&&(N.mid=""),o.mid!=null&&o.hasOwnProperty("mid")&&(N.mid=o.mid),o.trackName!=null&&o.hasOwnProperty("trackName")&&(N.trackName=o.trackName,I.oneofs&&(N._trackName="trackName")),o.location!=null&&o.hasOwnProperty("location")&&(N.location=o.location,I.oneofs&&(N._location="location")),o.userId!=null&&o.hasOwnProperty("userId")&&(N.userId=o.userId,I.oneofs&&(N._userId="userId")),o.code!=null&&o.hasOwnProperty("code")&&(N.code=o.code,I.oneofs&&(N._code="code")),o.desc!=null&&o.hasOwnProperty("desc")&&(N.desc=o.desc,I.oneofs&&(N._desc="desc")),o.type!=null&&o.hasOwnProperty("type")&&(N.type=I.enums===String?$root.com.quick.voice.proto.TrackType[o.type]===void 0?o.type:$root.com.quick.voice.proto.TrackType[o.type]:o.type,I.oneofs&&(N._type="type")),o.isValid!=null&&o.hasOwnProperty("isValid")&&(N.isValid=o.isValid,I.oneofs&&(N._isValid="isValid")),N},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.Track"},k}(),q.JoinReq=function(){function k($){if($)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.roomId="",k.prototype.user=null,k.prototype.callType=0,k.create=function(e){return new k(e)},k.encode=function(e,o){return o||(o=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&o.uint32(10).string(e.roomId),e.user!=null&&Object.hasOwnProperty.call(e,"user")&&$root.com.quick.voice.proto.User.encode(e.user,o.uint32(18).fork()).ldelim(),e.callType!=null&&Object.hasOwnProperty.call(e,"callType")&&o.uint32(24).int32(e.callType),o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.JoinReq;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.roomId=e.string();break}case 2:{N.user=$root.com.quick.voice.proto.User.decode(e,e.uint32());break}case 3:{N.callType=e.int32();break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId))return"roomId: string expected";if(e.user!=null&&e.hasOwnProperty("user")){let o=$root.com.quick.voice.proto.User.verify(e.user);if(o)return"user."+o}if(e.callType!=null&&e.hasOwnProperty("callType"))switch(e.callType){default:return"callType: enum value expected";case 0:case 1:case 2:break}return null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.JoinReq)return e;let o=new $root.com.quick.voice.proto.JoinReq;if(e.roomId!=null&&(o.roomId=String(e.roomId)),e.user!=null){if(typeof e.user!="object")throw TypeError(".com.quick.voice.proto.JoinReq.user: object expected");o.user=$root.com.quick.voice.proto.User.fromObject(e.user)}switch(e.callType){default:if(typeof e.callType=="number"){o.callType=e.callType;break}break;case"Normal":case 0:o.callType=0;break;case"Meeting":case 1:o.callType=1;break;case"Live":case 2:o.callType=2;break}return o},k.toObject=function(e,o){o||(o={});let I={};return o.defaults&&(I.roomId="",I.user=null,I.callType=o.enums===String?"Normal":0),e.roomId!=null&&e.hasOwnProperty("roomId")&&(I.roomId=e.roomId),e.user!=null&&e.hasOwnProperty("user")&&(I.user=$root.com.quick.voice.proto.User.toObject(e.user,o)),e.callType!=null&&e.hasOwnProperty("callType")&&(I.callType=o.enums===String?$root.com.quick.voice.proto.CallType[e.callType]===void 0?e.callType:$root.com.quick.voice.proto.CallType[e.callType]:e.callType),I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.JoinReq"},k}(),q.JoinRsp=function(){function k($){if(this.roomUsers=[],$)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.roomId="",k.prototype.roomUsers=$util.emptyArray,k.prototype.callType=0,k.create=function(e){return new k(e)},k.encode=function(e,o){if(o||(o=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&o.uint32(10).string(e.roomId),e.roomUsers!=null&&e.roomUsers.length)for(let I=0;I<e.roomUsers.length;++I)$root.com.quick.voice.proto.User.encode(e.roomUsers[I],o.uint32(18).fork()).ldelim();return e.callType!=null&&Object.hasOwnProperty.call(e,"callType")&&o.uint32(24).int32(e.callType),o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.JoinRsp;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.roomId=e.string();break}case 2:{N.roomUsers&&N.roomUsers.length||(N.roomUsers=[]),N.roomUsers.push($root.com.quick.voice.proto.User.decode(e,e.uint32()));break}case 3:{N.callType=e.int32();break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId))return"roomId: string expected";if(e.roomUsers!=null&&e.hasOwnProperty("roomUsers")){if(!Array.isArray(e.roomUsers))return"roomUsers: array expected";for(let o=0;o<e.roomUsers.length;++o){let I=$root.com.quick.voice.proto.User.verify(e.roomUsers[o]);if(I)return"roomUsers."+I}}if(e.callType!=null&&e.hasOwnProperty("callType"))switch(e.callType){default:return"callType: enum value expected";case 0:case 1:case 2:break}return null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.JoinRsp)return e;let o=new $root.com.quick.voice.proto.JoinRsp;if(e.roomId!=null&&(o.roomId=String(e.roomId)),e.roomUsers){if(!Array.isArray(e.roomUsers))throw TypeError(".com.quick.voice.proto.JoinRsp.roomUsers: array expected");o.roomUsers=[];for(let I=0;I<e.roomUsers.length;++I){if(typeof e.roomUsers[I]!="object")throw TypeError(".com.quick.voice.proto.JoinRsp.roomUsers: object expected");o.roomUsers[I]=$root.com.quick.voice.proto.User.fromObject(e.roomUsers[I])}}switch(e.callType){default:if(typeof e.callType=="number"){o.callType=e.callType;break}break;case"Normal":case 0:o.callType=0;break;case"Meeting":case 1:o.callType=1;break;case"Live":case 2:o.callType=2;break}return o},k.toObject=function(e,o){o||(o={});let I={};if((o.arrays||o.defaults)&&(I.roomUsers=[]),o.defaults&&(I.roomId="",I.callType=o.enums===String?"Normal":0),e.roomId!=null&&e.hasOwnProperty("roomId")&&(I.roomId=e.roomId),e.roomUsers&&e.roomUsers.length){I.roomUsers=[];for(let N=0;N<e.roomUsers.length;++N)I.roomUsers[N]=$root.com.quick.voice.proto.User.toObject(e.roomUsers[N],o)}return e.callType!=null&&e.hasOwnProperty("callType")&&(I.callType=o.enums===String?$root.com.quick.voice.proto.CallType[e.callType]===void 0?e.callType:$root.com.quick.voice.proto.CallType[e.callType]:e.callType),I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.JoinRsp"},k}(),q.JoinNotify=function(){function k($){if($)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.roomId="",k.prototype.user=null,k.create=function(e){return new k(e)},k.encode=function(e,o){return o||(o=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&o.uint32(10).string(e.roomId),e.user!=null&&Object.hasOwnProperty.call(e,"user")&&$root.com.quick.voice.proto.User.encode(e.user,o.uint32(18).fork()).ldelim(),o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.JoinNotify;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.roomId=e.string();break}case 2:{N.user=$root.com.quick.voice.proto.User.decode(e,e.uint32());break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId))return"roomId: string expected";if(e.user!=null&&e.hasOwnProperty("user")){let o=$root.com.quick.voice.proto.User.verify(e.user);if(o)return"user."+o}return null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.JoinNotify)return e;let o=new $root.com.quick.voice.proto.JoinNotify;if(e.roomId!=null&&(o.roomId=String(e.roomId)),e.user!=null){if(typeof e.user!="object")throw TypeError(".com.quick.voice.proto.JoinNotify.user: object expected");o.user=$root.com.quick.voice.proto.User.fromObject(e.user)}return o},k.toObject=function(e,o){o||(o={});let I={};return o.defaults&&(I.roomId="",I.user=null),e.roomId!=null&&e.hasOwnProperty("roomId")&&(I.roomId=e.roomId),e.user!=null&&e.hasOwnProperty("user")&&(I.user=$root.com.quick.voice.proto.User.toObject(e.user,o)),I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.JoinNotify"},k}(),q.ConnectCFReq=function(){function k($){if($)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.sdp="",k.create=function(e){return new k(e)},k.encode=function(e,o){return o||(o=$Writer.create()),e.sdp!=null&&Object.hasOwnProperty.call(e,"sdp")&&o.uint32(10).string(e.sdp),o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.ConnectCFReq;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.sdp=e.string();break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){return typeof e!="object"||e===null?"object expected":e.sdp!=null&&e.hasOwnProperty("sdp")&&!$util.isString(e.sdp)?"sdp: string expected":null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.ConnectCFReq)return e;let o=new $root.com.quick.voice.proto.ConnectCFReq;return e.sdp!=null&&(o.sdp=String(e.sdp)),o},k.toObject=function(e,o){o||(o={});let I={};return o.defaults&&(I.sdp=""),e.sdp!=null&&e.hasOwnProperty("sdp")&&(I.sdp=e.sdp),I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.ConnectCFReq"},k}(),q.ConnectCFRsp=function(){function k($){if(this.subscribeUsers=[],$)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.remoteSdp="",k.prototype.subscribeUsers=$util.emptyArray,k.create=function(e){return new k(e)},k.encode=function(e,o){if(o||(o=$Writer.create()),e.remoteSdp!=null&&Object.hasOwnProperty.call(e,"remoteSdp")&&o.uint32(10).string(e.remoteSdp),e.subscribeUsers!=null&&e.subscribeUsers.length)for(let I=0;I<e.subscribeUsers.length;++I)$root.com.quick.voice.proto.User.encode(e.subscribeUsers[I],o.uint32(18).fork()).ldelim();return o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.ConnectCFRsp;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.remoteSdp=e.string();break}case 2:{N.subscribeUsers&&N.subscribeUsers.length||(N.subscribeUsers=[]),N.subscribeUsers.push($root.com.quick.voice.proto.User.decode(e,e.uint32()));break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.remoteSdp!=null&&e.hasOwnProperty("remoteSdp")&&!$util.isString(e.remoteSdp))return"remoteSdp: string expected";if(e.subscribeUsers!=null&&e.hasOwnProperty("subscribeUsers")){if(!Array.isArray(e.subscribeUsers))return"subscribeUsers: array expected";for(let o=0;o<e.subscribeUsers.length;++o){let I=$root.com.quick.voice.proto.User.verify(e.subscribeUsers[o]);if(I)return"subscribeUsers."+I}}return null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.ConnectCFRsp)return e;let o=new $root.com.quick.voice.proto.ConnectCFRsp;if(e.remoteSdp!=null&&(o.remoteSdp=String(e.remoteSdp)),e.subscribeUsers){if(!Array.isArray(e.subscribeUsers))throw TypeError(".com.quick.voice.proto.ConnectCFRsp.subscribeUsers: array expected");o.subscribeUsers=[];for(let I=0;I<e.subscribeUsers.length;++I){if(typeof e.subscribeUsers[I]!="object")throw TypeError(".com.quick.voice.proto.ConnectCFRsp.subscribeUsers: object expected");o.subscribeUsers[I]=$root.com.quick.voice.proto.User.fromObject(e.subscribeUsers[I])}}return o},k.toObject=function(e,o){o||(o={});let I={};if((o.arrays||o.defaults)&&(I.subscribeUsers=[]),o.defaults&&(I.remoteSdp=""),e.remoteSdp!=null&&e.hasOwnProperty("remoteSdp")&&(I.remoteSdp=e.remoteSdp),e.subscribeUsers&&e.subscribeUsers.length){I.subscribeUsers=[];for(let N=0;N<e.subscribeUsers.length;++N)I.subscribeUsers[N]=$root.com.quick.voice.proto.User.toObject(e.subscribeUsers[N],o)}return I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.ConnectCFRsp"},k}(),q.PublishReq=function(){function k(e){if(this.tracks=[],e)for(let o=Object.keys(e),I=0;I<o.length;++I)e[o[I]]!=null&&(this[o[I]]=e[o[I]])}k.prototype.sdp="",k.prototype.tracks=$util.emptyArray,k.prototype.callAction=0,k.prototype.recreate=null;let $;return Object.defineProperty(k.prototype,"_recreate",{get:$util.oneOfGetter($=["recreate"]),set:$util.oneOfSetter($)}),k.create=function(o){return new k(o)},k.encode=function(o,I){if(I||(I=$Writer.create()),o.sdp!=null&&Object.hasOwnProperty.call(o,"sdp")&&I.uint32(10).string(o.sdp),o.tracks!=null&&o.tracks.length)for(let N=0;N<o.tracks.length;++N)$root.com.quick.voice.proto.Track.encode(o.tracks[N],I.uint32(18).fork()).ldelim();return o.callAction!=null&&Object.hasOwnProperty.call(o,"callAction")&&I.uint32(24).int32(o.callAction),o.recreate!=null&&Object.hasOwnProperty.call(o,"recreate")&&I.uint32(32).bool(o.recreate),I},k.encodeDelimited=function(o,I){return this.encode(o,I).ldelim()},k.decode=function(o,I){o instanceof $Reader||(o=$Reader.create(o));let N=I===void 0?o.len:o.pos+I,D=new $root.com.quick.voice.proto.PublishReq;for(;o.pos<N;){let P=o.uint32();switch(P>>>3){case 1:{D.sdp=o.string();break}case 2:{D.tracks&&D.tracks.length||(D.tracks=[]),D.tracks.push($root.com.quick.voice.proto.Track.decode(o,o.uint32()));break}case 3:{D.callAction=o.int32();break}case 4:{D.recreate=o.bool();break}default:o.skipType(P&7);break}}return D},k.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},k.verify=function(o){if(typeof o!="object"||o===null)return"object expected";if(o.sdp!=null&&o.hasOwnProperty("sdp")&&!$util.isString(o.sdp))return"sdp: string expected";if(o.tracks!=null&&o.hasOwnProperty("tracks")){if(!Array.isArray(o.tracks))return"tracks: array expected";for(let I=0;I<o.tracks.length;++I){let N=$root.com.quick.voice.proto.Track.verify(o.tracks[I]);if(N)return"tracks."+N}}return o.callAction!=null&&o.hasOwnProperty("callAction")&&!$util.isInteger(o.callAction)?"callAction: integer expected":o.recreate!=null&&o.hasOwnProperty("recreate")&&typeof o.recreate!="boolean"?"recreate: boolean expected":null},k.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.PublishReq)return o;let I=new $root.com.quick.voice.proto.PublishReq;if(o.sdp!=null&&(I.sdp=String(o.sdp)),o.tracks){if(!Array.isArray(o.tracks))throw TypeError(".com.quick.voice.proto.PublishReq.tracks: array expected");I.tracks=[];for(let N=0;N<o.tracks.length;++N){if(typeof o.tracks[N]!="object")throw TypeError(".com.quick.voice.proto.PublishReq.tracks: object expected");I.tracks[N]=$root.com.quick.voice.proto.Track.fromObject(o.tracks[N])}}return o.callAction!=null&&(I.callAction=o.callAction|0),o.recreate!=null&&(I.recreate=!!o.recreate),I},k.toObject=function(o,I){I||(I={});let N={};if((I.arrays||I.defaults)&&(N.tracks=[]),I.defaults&&(N.sdp="",N.callAction=0),o.sdp!=null&&o.hasOwnProperty("sdp")&&(N.sdp=o.sdp),o.tracks&&o.tracks.length){N.tracks=[];for(let D=0;D<o.tracks.length;++D)N.tracks[D]=$root.com.quick.voice.proto.Track.toObject(o.tracks[D],I)}return o.callAction!=null&&o.hasOwnProperty("callAction")&&(N.callAction=o.callAction),o.recreate!=null&&o.hasOwnProperty("recreate")&&(N.recreate=o.recreate,I.oneofs&&(N._recreate="recreate")),N},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.PublishReq"},k}(),q.PublishRsp=function(){function k($){if($)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.remoteSdp="",k.create=function(e){return new k(e)},k.encode=function(e,o){return o||(o=$Writer.create()),e.remoteSdp!=null&&Object.hasOwnProperty.call(e,"remoteSdp")&&o.uint32(10).string(e.remoteSdp),o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.PublishRsp;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.remoteSdp=e.string();break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){return typeof e!="object"||e===null?"object expected":e.remoteSdp!=null&&e.hasOwnProperty("remoteSdp")&&!$util.isString(e.remoteSdp)?"remoteSdp: string expected":null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.PublishRsp)return e;let o=new $root.com.quick.voice.proto.PublishRsp;return e.remoteSdp!=null&&(o.remoteSdp=String(e.remoteSdp)),o},k.toObject=function(e,o){o||(o={});let I={};return o.defaults&&(I.remoteSdp=""),e.remoteSdp!=null&&e.hasOwnProperty("remoteSdp")&&(I.remoteSdp=e.remoteSdp),I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.PublishRsp"},k}(),q.PublishNotify=function(){function k($){if($)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.roomId="",k.prototype.user=null,k.create=function(e){return new k(e)},k.encode=function(e,o){return o||(o=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&o.uint32(10).string(e.roomId),e.user!=null&&Object.hasOwnProperty.call(e,"user")&&$root.com.quick.voice.proto.User.encode(e.user,o.uint32(18).fork()).ldelim(),o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.PublishNotify;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.roomId=e.string();break}case 2:{N.user=$root.com.quick.voice.proto.User.decode(e,e.uint32());break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId))return"roomId: string expected";if(e.user!=null&&e.hasOwnProperty("user")){let o=$root.com.quick.voice.proto.User.verify(e.user);if(o)return"user."+o}return null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.PublishNotify)return e;let o=new $root.com.quick.voice.proto.PublishNotify;if(e.roomId!=null&&(o.roomId=String(e.roomId)),e.user!=null){if(typeof e.user!="object")throw TypeError(".com.quick.voice.proto.PublishNotify.user: object expected");o.user=$root.com.quick.voice.proto.User.fromObject(e.user)}return o},k.toObject=function(e,o){o||(o={});let I={};return o.defaults&&(I.roomId="",I.user=null),e.roomId!=null&&e.hasOwnProperty("roomId")&&(I.roomId=e.roomId),e.user!=null&&e.hasOwnProperty("user")&&(I.user=$root.com.quick.voice.proto.User.toObject(e.user,o)),I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.PublishNotify"},k}(),q.SubscribeReq=function(){function k($){if(this.users=[],$)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.users=$util.emptyArray,k.create=function(e){return new k(e)},k.encode=function(e,o){if(o||(o=$Writer.create()),e.users!=null&&e.users.length)for(let I=0;I<e.users.length;++I)$root.com.quick.voice.proto.User.encode(e.users[I],o.uint32(10).fork()).ldelim();return o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.SubscribeReq;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.users&&N.users.length||(N.users=[]),N.users.push($root.com.quick.voice.proto.User.decode(e,e.uint32()));break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.users!=null&&e.hasOwnProperty("users")){if(!Array.isArray(e.users))return"users: array expected";for(let o=0;o<e.users.length;++o){let I=$root.com.quick.voice.proto.User.verify(e.users[o]);if(I)return"users."+I}}return null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.SubscribeReq)return e;let o=new $root.com.quick.voice.proto.SubscribeReq;if(e.users){if(!Array.isArray(e.users))throw TypeError(".com.quick.voice.proto.SubscribeReq.users: array expected");o.users=[];for(let I=0;I<e.users.length;++I){if(typeof e.users[I]!="object")throw TypeError(".com.quick.voice.proto.SubscribeReq.users: object expected");o.users[I]=$root.com.quick.voice.proto.User.fromObject(e.users[I])}}return o},k.toObject=function(e,o){o||(o={});let I={};if((o.arrays||o.defaults)&&(I.users=[]),e.users&&e.users.length){I.users=[];for(let N=0;N<e.users.length;++N)I.users[N]=$root.com.quick.voice.proto.User.toObject(e.users[N],o)}return I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.SubscribeReq"},k}(),q.SubscribeRsp=function(){function k($){if(this.users=[],$)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.remoteSdp="",k.prototype.users=$util.emptyArray,k.create=function(e){return new k(e)},k.encode=function(e,o){if(o||(o=$Writer.create()),e.remoteSdp!=null&&Object.hasOwnProperty.call(e,"remoteSdp")&&o.uint32(10).string(e.remoteSdp),e.users!=null&&e.users.length)for(let I=0;I<e.users.length;++I)$root.com.quick.voice.proto.User.encode(e.users[I],o.uint32(18).fork()).ldelim();return o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.SubscribeRsp;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.remoteSdp=e.string();break}case 2:{N.users&&N.users.length||(N.users=[]),N.users.push($root.com.quick.voice.proto.User.decode(e,e.uint32()));break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.remoteSdp!=null&&e.hasOwnProperty("remoteSdp")&&!$util.isString(e.remoteSdp))return"remoteSdp: string expected";if(e.users!=null&&e.hasOwnProperty("users")){if(!Array.isArray(e.users))return"users: array expected";for(let o=0;o<e.users.length;++o){let I=$root.com.quick.voice.proto.User.verify(e.users[o]);if(I)return"users."+I}}return null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.SubscribeRsp)return e;let o=new $root.com.quick.voice.proto.SubscribeRsp;if(e.remoteSdp!=null&&(o.remoteSdp=String(e.remoteSdp)),e.users){if(!Array.isArray(e.users))throw TypeError(".com.quick.voice.proto.SubscribeRsp.users: array expected");o.users=[];for(let I=0;I<e.users.length;++I){if(typeof e.users[I]!="object")throw TypeError(".com.quick.voice.proto.SubscribeRsp.users: object expected");o.users[I]=$root.com.quick.voice.proto.User.fromObject(e.users[I])}}return o},k.toObject=function(e,o){o||(o={});let I={};if((o.arrays||o.defaults)&&(I.users=[]),o.defaults&&(I.remoteSdp=""),e.remoteSdp!=null&&e.hasOwnProperty("remoteSdp")&&(I.remoteSdp=e.remoteSdp),e.users&&e.users.length){I.users=[];for(let N=0;N<e.users.length;++N)I.users[N]=$root.com.quick.voice.proto.User.toObject(e.users[N],o)}return I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.SubscribeRsp"},k}(),q.RenegotiateReq=function(){function k($){if($)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.userId="",k.prototype.sdp="",k.create=function(e){return new k(e)},k.encode=function(e,o){return o||(o=$Writer.create()),e.userId!=null&&Object.hasOwnProperty.call(e,"userId")&&o.uint32(10).string(e.userId),e.sdp!=null&&Object.hasOwnProperty.call(e,"sdp")&&o.uint32(18).string(e.sdp),o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.RenegotiateReq;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.userId=e.string();break}case 2:{N.sdp=e.string();break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){return typeof e!="object"||e===null?"object expected":e.userId!=null&&e.hasOwnProperty("userId")&&!$util.isString(e.userId)?"userId: string expected":e.sdp!=null&&e.hasOwnProperty("sdp")&&!$util.isString(e.sdp)?"sdp: string expected":null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.RenegotiateReq)return e;let o=new $root.com.quick.voice.proto.RenegotiateReq;return e.userId!=null&&(o.userId=String(e.userId)),e.sdp!=null&&(o.sdp=String(e.sdp)),o},k.toObject=function(e,o){o||(o={});let I={};return o.defaults&&(I.userId="",I.sdp=""),e.userId!=null&&e.hasOwnProperty("userId")&&(I.userId=e.userId),e.sdp!=null&&e.hasOwnProperty("sdp")&&(I.sdp=e.sdp),I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.RenegotiateReq"},k}(),q.QuitReq=function(){function k($){if($)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.userId="",k.prototype.roomId="",k.create=function(e){return new k(e)},k.encode=function(e,o){return o||(o=$Writer.create()),e.userId!=null&&Object.hasOwnProperty.call(e,"userId")&&o.uint32(10).string(e.userId),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&o.uint32(18).string(e.roomId),o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.QuitReq;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.userId=e.string();break}case 2:{N.roomId=e.string();break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){return typeof e!="object"||e===null?"object expected":e.userId!=null&&e.hasOwnProperty("userId")&&!$util.isString(e.userId)?"userId: string expected":e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId)?"roomId: string expected":null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.QuitReq)return e;let o=new $root.com.quick.voice.proto.QuitReq;return e.userId!=null&&(o.userId=String(e.userId)),e.roomId!=null&&(o.roomId=String(e.roomId)),o},k.toObject=function(e,o){o||(o={});let I={};return o.defaults&&(I.userId="",I.roomId=""),e.userId!=null&&e.hasOwnProperty("userId")&&(I.userId=e.userId),e.roomId!=null&&e.hasOwnProperty("roomId")&&(I.roomId=e.roomId),I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.QuitReq"},k}(),q.QuitNotify=function(){function k(e){if(e)for(let o=Object.keys(e),I=0;I<o.length;++I)e[o[I]]!=null&&(this[o[I]]=e[o[I]])}k.prototype.roomId="",k.prototype.user=null,k.prototype.code=null,k.prototype.desc=null;let $;return Object.defineProperty(k.prototype,"_code",{get:$util.oneOfGetter($=["code"]),set:$util.oneOfSetter($)}),Object.defineProperty(k.prototype,"_desc",{get:$util.oneOfGetter($=["desc"]),set:$util.oneOfSetter($)}),k.create=function(o){return new k(o)},k.encode=function(o,I){return I||(I=$Writer.create()),o.roomId!=null&&Object.hasOwnProperty.call(o,"roomId")&&I.uint32(10).string(o.roomId),o.user!=null&&Object.hasOwnProperty.call(o,"user")&&$root.com.quick.voice.proto.User.encode(o.user,I.uint32(18).fork()).ldelim(),o.code!=null&&Object.hasOwnProperty.call(o,"code")&&I.uint32(24).int32(o.code),o.desc!=null&&Object.hasOwnProperty.call(o,"desc")&&I.uint32(34).string(o.desc),I},k.encodeDelimited=function(o,I){return this.encode(o,I).ldelim()},k.decode=function(o,I){o instanceof $Reader||(o=$Reader.create(o));let N=I===void 0?o.len:o.pos+I,D=new $root.com.quick.voice.proto.QuitNotify;for(;o.pos<N;){let P=o.uint32();switch(P>>>3){case 1:{D.roomId=o.string();break}case 2:{D.user=$root.com.quick.voice.proto.User.decode(o,o.uint32());break}case 3:{D.code=o.int32();break}case 4:{D.desc=o.string();break}default:o.skipType(P&7);break}}return D},k.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},k.verify=function(o){if(typeof o!="object"||o===null)return"object expected";if(o.roomId!=null&&o.hasOwnProperty("roomId")&&!$util.isString(o.roomId))return"roomId: string expected";if(o.user!=null&&o.hasOwnProperty("user")){let I=$root.com.quick.voice.proto.User.verify(o.user);if(I)return"user."+I}return o.code!=null&&o.hasOwnProperty("code")&&!$util.isInteger(o.code)?"code: integer expected":o.desc!=null&&o.hasOwnProperty("desc")&&!$util.isString(o.desc)?"desc: string expected":null},k.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.QuitNotify)return o;let I=new $root.com.quick.voice.proto.QuitNotify;if(o.roomId!=null&&(I.roomId=String(o.roomId)),o.user!=null){if(typeof o.user!="object")throw TypeError(".com.quick.voice.proto.QuitNotify.user: object expected");I.user=$root.com.quick.voice.proto.User.fromObject(o.user)}return o.code!=null&&(I.code=o.code|0),o.desc!=null&&(I.desc=String(o.desc)),I},k.toObject=function(o,I){I||(I={});let N={};return I.defaults&&(N.roomId="",N.user=null),o.roomId!=null&&o.hasOwnProperty("roomId")&&(N.roomId=o.roomId),o.user!=null&&o.hasOwnProperty("user")&&(N.user=$root.com.quick.voice.proto.User.toObject(o.user,I)),o.code!=null&&o.hasOwnProperty("code")&&(N.code=o.code,I.oneofs&&(N._code="code")),o.desc!=null&&o.hasOwnProperty("desc")&&(N.desc=o.desc,I.oneofs&&(N._desc="desc")),N},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.QuitNotify"},k}(),q.TokenExpireNotify=function(){function k($){if($)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.roomId="",k.create=function(e){return new k(e)},k.encode=function(e,o){return o||(o=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&o.uint32(10).string(e.roomId),o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.TokenExpireNotify;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.roomId=e.string();break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){return typeof e!="object"||e===null?"object expected":e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId)?"roomId: string expected":null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.TokenExpireNotify)return e;let o=new $root.com.quick.voice.proto.TokenExpireNotify;return e.roomId!=null&&(o.roomId=String(e.roomId)),o},k.toObject=function(e,o){o||(o={});let I={};return o.defaults&&(I.roomId=""),e.roomId!=null&&e.hasOwnProperty("roomId")&&(I.roomId=e.roomId),I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.TokenExpireNotify"},k}(),q.UpdateTokenReq=function(){function k($){if($)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.roomId="",k.prototype.sdkToken="",k.create=function(e){return new k(e)},k.encode=function(e,o){return o||(o=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&o.uint32(10).string(e.roomId),e.sdkToken!=null&&Object.hasOwnProperty.call(e,"sdkToken")&&o.uint32(18).string(e.sdkToken),o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.UpdateTokenReq;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.roomId=e.string();break}case 2:{N.sdkToken=e.string();break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){return typeof e!="object"||e===null?"object expected":e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId)?"roomId: string expected":e.sdkToken!=null&&e.hasOwnProperty("sdkToken")&&!$util.isString(e.sdkToken)?"sdkToken: string expected":null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.UpdateTokenReq)return e;let o=new $root.com.quick.voice.proto.UpdateTokenReq;return e.roomId!=null&&(o.roomId=String(e.roomId)),e.sdkToken!=null&&(o.sdkToken=String(e.sdkToken)),o},k.toObject=function(e,o){o||(o={});let I={};return o.defaults&&(I.roomId="",I.sdkToken=""),e.roomId!=null&&e.hasOwnProperty("roomId")&&(I.roomId=e.roomId),e.sdkToken!=null&&e.hasOwnProperty("sdkToken")&&(I.sdkToken=e.sdkToken),I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.UpdateTokenReq"},k}(),q.NetQualityChange=function(){function k($){if($)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.userId="",k.prototype.roomId="",k.prototype.egress=0,k.prototype.ingress=0,k.create=function(e){return new k(e)},k.encode=function(e,o){return o||(o=$Writer.create()),e.userId!=null&&Object.hasOwnProperty.call(e,"userId")&&o.uint32(10).string(e.userId),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&o.uint32(18).string(e.roomId),e.egress!=null&&Object.hasOwnProperty.call(e,"egress")&&o.uint32(24).int32(e.egress),e.ingress!=null&&Object.hasOwnProperty.call(e,"ingress")&&o.uint32(32).int32(e.ingress),o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.NetQualityChange;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.userId=e.string();break}case 2:{N.roomId=e.string();break}case 3:{N.egress=e.int32();break}case 4:{N.ingress=e.int32();break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){return typeof e!="object"||e===null?"object expected":e.userId!=null&&e.hasOwnProperty("userId")&&!$util.isString(e.userId)?"userId: string expected":e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId)?"roomId: string expected":e.egress!=null&&e.hasOwnProperty("egress")&&!$util.isInteger(e.egress)?"egress: integer expected":e.ingress!=null&&e.hasOwnProperty("ingress")&&!$util.isInteger(e.ingress)?"ingress: integer expected":null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.NetQualityChange)return e;let o=new $root.com.quick.voice.proto.NetQualityChange;return e.userId!=null&&(o.userId=String(e.userId)),e.roomId!=null&&(o.roomId=String(e.roomId)),e.egress!=null&&(o.egress=e.egress|0),e.ingress!=null&&(o.ingress=e.ingress|0),o},k.toObject=function(e,o){o||(o={});let I={};return o.defaults&&(I.userId="",I.roomId="",I.egress=0,I.ingress=0),e.userId!=null&&e.hasOwnProperty("userId")&&(I.userId=e.userId),e.roomId!=null&&e.hasOwnProperty("roomId")&&(I.roomId=e.roomId),e.egress!=null&&e.hasOwnProperty("egress")&&(I.egress=e.egress),e.ingress!=null&&e.hasOwnProperty("ingress")&&(I.ingress=e.ingress),I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.NetQualityChange"},k}(),q.NetQualityNotify=function(){function k($){if(this.qualities=[],$)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.qualities=$util.emptyArray,k.create=function(e){return new k(e)},k.encode=function(e,o){if(o||(o=$Writer.create()),e.qualities!=null&&e.qualities.length)for(let I=0;I<e.qualities.length;++I)$root.com.quick.voice.proto.NetQualityChange.encode(e.qualities[I],o.uint32(10).fork()).ldelim();return o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.NetQualityNotify;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.qualities&&N.qualities.length||(N.qualities=[]),N.qualities.push($root.com.quick.voice.proto.NetQualityChange.decode(e,e.uint32()));break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.qualities!=null&&e.hasOwnProperty("qualities")){if(!Array.isArray(e.qualities))return"qualities: array expected";for(let o=0;o<e.qualities.length;++o){let I=$root.com.quick.voice.proto.NetQualityChange.verify(e.qualities[o]);if(I)return"qualities."+I}}return null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.NetQualityNotify)return e;let o=new $root.com.quick.voice.proto.NetQualityNotify;if(e.qualities){if(!Array.isArray(e.qualities))throw TypeError(".com.quick.voice.proto.NetQualityNotify.qualities: array expected");o.qualities=[];for(let I=0;I<e.qualities.length;++I){if(typeof e.qualities[I]!="object")throw TypeError(".com.quick.voice.proto.NetQualityNotify.qualities: object expected");o.qualities[I]=$root.com.quick.voice.proto.NetQualityChange.fromObject(e.qualities[I])}}return o},k.toObject=function(e,o){o||(o={});let I={};if((o.arrays||o.defaults)&&(I.qualities=[]),e.qualities&&e.qualities.length){I.qualities=[];for(let N=0;N<e.qualities.length;++N)I.qualities[N]=$root.com.quick.voice.proto.NetQualityChange.toObject(e.qualities[N],o)}return I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.NetQualityNotify"},k}(),q.UpdateCall=function(){function k($){if($)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.roomId="",k.prototype.user=null,k.create=function(e){return new k(e)},k.encode=function(e,o){return o||(o=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&o.uint32(10).string(e.roomId),e.user!=null&&Object.hasOwnProperty.call(e,"user")&&$root.com.quick.voice.proto.User.encode(e.user,o.uint32(18).fork()).ldelim(),o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.UpdateCall;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.roomId=e.string();break}case 2:{N.user=$root.com.quick.voice.proto.User.decode(e,e.uint32());break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId))return"roomId: string expected";if(e.user!=null&&e.hasOwnProperty("user")){let o=$root.com.quick.voice.proto.User.verify(e.user);if(o)return"user."+o}return null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.UpdateCall)return e;let o=new $root.com.quick.voice.proto.UpdateCall;if(e.roomId!=null&&(o.roomId=String(e.roomId)),e.user!=null){if(typeof e.user!="object")throw TypeError(".com.quick.voice.proto.UpdateCall.user: object expected");o.user=$root.com.quick.voice.proto.User.fromObject(e.user)}return o},k.toObject=function(e,o){o||(o={});let I={};return o.defaults&&(I.roomId="",I.user=null),e.roomId!=null&&e.hasOwnProperty("roomId")&&(I.roomId=e.roomId),e.user!=null&&e.hasOwnProperty("user")&&(I.user=$root.com.quick.voice.proto.User.toObject(e.user,o)),I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.UpdateCall"},k}(),q.SyncRoomInfoReq=function(){function k($){if($)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.roomId="",k.prototype.user=null,k.create=function(e){return new k(e)},k.encode=function(e,o){return o||(o=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&o.uint32(10).string(e.roomId),e.user!=null&&Object.hasOwnProperty.call(e,"user")&&$root.com.quick.voice.proto.User.encode(e.user,o.uint32(18).fork()).ldelim(),o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.SyncRoomInfoReq;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.roomId=e.string();break}case 2:{N.user=$root.com.quick.voice.proto.User.decode(e,e.uint32());break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId))return"roomId: string expected";if(e.user!=null&&e.hasOwnProperty("user")){let o=$root.com.quick.voice.proto.User.verify(e.user);if(o)return"user."+o}return null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.SyncRoomInfoReq)return e;let o=new $root.com.quick.voice.proto.SyncRoomInfoReq;if(e.roomId!=null&&(o.roomId=String(e.roomId)),e.user!=null){if(typeof e.user!="object")throw TypeError(".com.quick.voice.proto.SyncRoomInfoReq.user: object expected");o.user=$root.com.quick.voice.proto.User.fromObject(e.user)}return o},k.toObject=function(e,o){o||(o={});let I={};return o.defaults&&(I.roomId="",I.user=null),e.roomId!=null&&e.hasOwnProperty("roomId")&&(I.roomId=e.roomId),e.user!=null&&e.hasOwnProperty("user")&&(I.user=$root.com.quick.voice.proto.User.toObject(e.user,o)),I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.SyncRoomInfoReq"},k}(),q.SyncRoomInfoRsp=function(){function k($){if(this.users=[],$)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.roomId="",k.prototype.isValid=!1,k.prototype.users=$util.emptyArray,k.prototype.isActive=!1,k.create=function(e){return new k(e)},k.encode=function(e,o){if(o||(o=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&o.uint32(10).string(e.roomId),e.isValid!=null&&Object.hasOwnProperty.call(e,"isValid")&&o.uint32(16).bool(e.isValid),e.users!=null&&e.users.length)for(let I=0;I<e.users.length;++I)$root.com.quick.voice.proto.User.encode(e.users[I],o.uint32(26).fork()).ldelim();return e.isActive!=null&&Object.hasOwnProperty.call(e,"isActive")&&o.uint32(32).bool(e.isActive),o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.SyncRoomInfoRsp;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.roomId=e.string();break}case 2:{N.isValid=e.bool();break}case 3:{N.users&&N.users.length||(N.users=[]),N.users.push($root.com.quick.voice.proto.User.decode(e,e.uint32()));break}case 4:{N.isActive=e.bool();break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId))return"roomId: string expected";if(e.isValid!=null&&e.hasOwnProperty("isValid")&&typeof e.isValid!="boolean")return"isValid: boolean expected";if(e.users!=null&&e.hasOwnProperty("users")){if(!Array.isArray(e.users))return"users: array expected";for(let o=0;o<e.users.length;++o){let I=$root.com.quick.voice.proto.User.verify(e.users[o]);if(I)return"users."+I}}return e.isActive!=null&&e.hasOwnProperty("isActive")&&typeof e.isActive!="boolean"?"isActive: boolean expected":null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.SyncRoomInfoRsp)return e;let o=new $root.com.quick.voice.proto.SyncRoomInfoRsp;if(e.roomId!=null&&(o.roomId=String(e.roomId)),e.isValid!=null&&(o.isValid=!!e.isValid),e.users){if(!Array.isArray(e.users))throw TypeError(".com.quick.voice.proto.SyncRoomInfoRsp.users: array expected");o.users=[];for(let I=0;I<e.users.length;++I){if(typeof e.users[I]!="object")throw TypeError(".com.quick.voice.proto.SyncRoomInfoRsp.users: object expected");o.users[I]=$root.com.quick.voice.proto.User.fromObject(e.users[I])}}return e.isActive!=null&&(o.isActive=!!e.isActive),o},k.toObject=function(e,o){o||(o={});let I={};if((o.arrays||o.defaults)&&(I.users=[]),o.defaults&&(I.roomId="",I.isValid=!1,I.isActive=!1),e.roomId!=null&&e.hasOwnProperty("roomId")&&(I.roomId=e.roomId),e.isValid!=null&&e.hasOwnProperty("isValid")&&(I.isValid=e.isValid),e.users&&e.users.length){I.users=[];for(let N=0;N<e.users.length;++N)I.users[N]=$root.com.quick.voice.proto.User.toObject(e.users[N],o)}return e.isActive!=null&&e.hasOwnProperty("isActive")&&(I.isActive=e.isActive),I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.SyncRoomInfoRsp"},k}(),q.UpdateTime=function(){function k($){if($)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.time=$util.Long?$util.Long.fromBits(0,0,!1):0,k.create=function(e){return new k(e)},k.encode=function(e,o){return o||(o=$Writer.create()),e.time!=null&&Object.hasOwnProperty.call(e,"time")&&o.uint32(8).int64(e.time),o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.UpdateTime;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.time=e.int64();break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){return typeof e!="object"||e===null?"object expected":e.time!=null&&e.hasOwnProperty("time")&&!$util.isInteger(e.time)&&!(e.time&&$util.isInteger(e.time.low)&&$util.isInteger(e.time.high))?"time: integer|Long expected":null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.UpdateTime)return e;let o=new $root.com.quick.voice.proto.UpdateTime;return e.time!=null&&($util.Long?(o.time=$util.Long.fromValue(e.time)).unsigned=!1:typeof e.time=="string"?o.time=parseInt(e.time,10):typeof e.time=="number"?o.time=e.time:typeof e.time=="object"&&(o.time=new $util.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber())),o},k.toObject=function(e,o){o||(o={});let I={};if(o.defaults)if($util.Long){let N=new $util.Long(0,0,!1);I.time=o.longs===String?N.toString():o.longs===Number?N.toNumber():N}else I.time=o.longs===String?"0":0;return e.time!=null&&e.hasOwnProperty("time")&&(typeof e.time=="number"?I.time=o.longs===String?String(e.time):e.time:I.time=o.longs===String?$util.Long.prototype.toString.call(e.time):o.longs===Number?new $util.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber():e.time),I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.UpdateTime"},k}(),q.CloseTrackReq=function(){function k($){if(this.tracks=[],$)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.sdp="",k.prototype.tracks=$util.emptyArray,k.prototype.roomId="",k.create=function(e){return new k(e)},k.encode=function(e,o){if(o||(o=$Writer.create()),e.sdp!=null&&Object.hasOwnProperty.call(e,"sdp")&&o.uint32(10).string(e.sdp),e.tracks!=null&&e.tracks.length)for(let I=0;I<e.tracks.length;++I)$root.com.quick.voice.proto.Track.encode(e.tracks[I],o.uint32(18).fork()).ldelim();return e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&o.uint32(26).string(e.roomId),o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.CloseTrackReq;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.sdp=e.string();break}case 2:{N.tracks&&N.tracks.length||(N.tracks=[]),N.tracks.push($root.com.quick.voice.proto.Track.decode(e,e.uint32()));break}case 3:{N.roomId=e.string();break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.sdp!=null&&e.hasOwnProperty("sdp")&&!$util.isString(e.sdp))return"sdp: string expected";if(e.tracks!=null&&e.hasOwnProperty("tracks")){if(!Array.isArray(e.tracks))return"tracks: array expected";for(let o=0;o<e.tracks.length;++o){let I=$root.com.quick.voice.proto.Track.verify(e.tracks[o]);if(I)return"tracks."+I}}return e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId)?"roomId: string expected":null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.CloseTrackReq)return e;let o=new $root.com.quick.voice.proto.CloseTrackReq;if(e.sdp!=null&&(o.sdp=String(e.sdp)),e.tracks){if(!Array.isArray(e.tracks))throw TypeError(".com.quick.voice.proto.CloseTrackReq.tracks: array expected");o.tracks=[];for(let I=0;I<e.tracks.length;++I){if(typeof e.tracks[I]!="object")throw TypeError(".com.quick.voice.proto.CloseTrackReq.tracks: object expected");o.tracks[I]=$root.com.quick.voice.proto.Track.fromObject(e.tracks[I])}}return e.roomId!=null&&(o.roomId=String(e.roomId)),o},k.toObject=function(e,o){o||(o={});let I={};if((o.arrays||o.defaults)&&(I.tracks=[]),o.defaults&&(I.sdp="",I.roomId=""),e.sdp!=null&&e.hasOwnProperty("sdp")&&(I.sdp=e.sdp),e.tracks&&e.tracks.length){I.tracks=[];for(let N=0;N<e.tracks.length;++N)I.tracks[N]=$root.com.quick.voice.proto.Track.toObject(e.tracks[N],o)}return e.roomId!=null&&e.hasOwnProperty("roomId")&&(I.roomId=e.roomId),I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.CloseTrackReq"},k}(),q.CloseTrackRsp=function(){function k($){if(this.tracks=[],$)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.remoteSdp="",k.prototype.tracks=$util.emptyArray,k.create=function(e){return new k(e)},k.encode=function(e,o){if(o||(o=$Writer.create()),e.remoteSdp!=null&&Object.hasOwnProperty.call(e,"remoteSdp")&&o.uint32(10).string(e.remoteSdp),e.tracks!=null&&e.tracks.length)for(let I=0;I<e.tracks.length;++I)$root.com.quick.voice.proto.Track.encode(e.tracks[I],o.uint32(18).fork()).ldelim();return o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.CloseTrackRsp;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.remoteSdp=e.string();break}case 2:{N.tracks&&N.tracks.length||(N.tracks=[]),N.tracks.push($root.com.quick.voice.proto.Track.decode(e,e.uint32()));break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.remoteSdp!=null&&e.hasOwnProperty("remoteSdp")&&!$util.isString(e.remoteSdp))return"remoteSdp: string expected";if(e.tracks!=null&&e.hasOwnProperty("tracks")){if(!Array.isArray(e.tracks))return"tracks: array expected";for(let o=0;o<e.tracks.length;++o){let I=$root.com.quick.voice.proto.Track.verify(e.tracks[o]);if(I)return"tracks."+I}}return null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.CloseTrackRsp)return e;let o=new $root.com.quick.voice.proto.CloseTrackRsp;if(e.remoteSdp!=null&&(o.remoteSdp=String(e.remoteSdp)),e.tracks){if(!Array.isArray(e.tracks))throw TypeError(".com.quick.voice.proto.CloseTrackRsp.tracks: array expected");o.tracks=[];for(let I=0;I<e.tracks.length;++I){if(typeof e.tracks[I]!="object")throw TypeError(".com.quick.voice.proto.CloseTrackRsp.tracks: object expected");o.tracks[I]=$root.com.quick.voice.proto.Track.fromObject(e.tracks[I])}}return o},k.toObject=function(e,o){o||(o={});let I={};if((o.arrays||o.defaults)&&(I.tracks=[]),o.defaults&&(I.remoteSdp=""),e.remoteSdp!=null&&e.hasOwnProperty("remoteSdp")&&(I.remoteSdp=e.remoteSdp),e.tracks&&e.tracks.length){I.tracks=[];for(let N=0;N<e.tracks.length;++N)I.tracks[N]=$root.com.quick.voice.proto.Track.toObject(e.tracks[N],o)}return I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.CloseTrackRsp"},k}(),q.CloseTrackNotify=function(){function k($){if($)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.user=null,k.create=function(e){return new k(e)},k.encode=function(e,o){return o||(o=$Writer.create()),e.user!=null&&Object.hasOwnProperty.call(e,"user")&&$root.com.quick.voice.proto.User.encode(e.user,o.uint32(10).fork()).ldelim(),o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.CloseTrackNotify;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.user=$root.com.quick.voice.proto.User.decode(e,e.uint32());break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.user!=null&&e.hasOwnProperty("user")){let o=$root.com.quick.voice.proto.User.verify(e.user);if(o)return"user."+o}return null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.CloseTrackNotify)return e;let o=new $root.com.quick.voice.proto.CloseTrackNotify;if(e.user!=null){if(typeof e.user!="object")throw TypeError(".com.quick.voice.proto.CloseTrackNotify.user: object expected");o.user=$root.com.quick.voice.proto.User.fromObject(e.user)}return o},k.toObject=function(e,o){o||(o={});let I={};return o.defaults&&(I.user=null),e.user!=null&&e.hasOwnProperty("user")&&(I.user=$root.com.quick.voice.proto.User.toObject(e.user,o)),I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.CloseTrackNotify"},k}(),q.ToggleLiveRoomReq=function(){function k($){if($)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.roomId="",k.create=function(e){return new k(e)},k.encode=function(e,o){return o||(o=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&o.uint32(10).string(e.roomId),o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.ToggleLiveRoomReq;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.roomId=e.string();break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){return typeof e!="object"||e===null?"object expected":e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId)?"roomId: string expected":null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.ToggleLiveRoomReq)return e;let o=new $root.com.quick.voice.proto.ToggleLiveRoomReq;return e.roomId!=null&&(o.roomId=String(e.roomId)),o},k.toObject=function(e,o){o||(o={});let I={};return o.defaults&&(I.roomId=""),e.roomId!=null&&e.hasOwnProperty("roomId")&&(I.roomId=e.roomId),I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.ToggleLiveRoomReq"},k}(),q.ToggleLiveRoomRsq=function(){function k($){if(this.roomUsers=[],$)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.roomId="",k.prototype.hash="",k.prototype.roomUsers=$util.emptyArray,k.create=function(e){return new k(e)},k.encode=function(e,o){if(o||(o=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&o.uint32(10).string(e.roomId),e.hash!=null&&Object.hasOwnProperty.call(e,"hash")&&o.uint32(18).string(e.hash),e.roomUsers!=null&&e.roomUsers.length)for(let I=0;I<e.roomUsers.length;++I)$root.com.quick.voice.proto.User.encode(e.roomUsers[I],o.uint32(26).fork()).ldelim();return o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.ToggleLiveRoomRsq;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.roomId=e.string();break}case 2:{N.hash=e.string();break}case 3:{N.roomUsers&&N.roomUsers.length||(N.roomUsers=[]),N.roomUsers.push($root.com.quick.voice.proto.User.decode(e,e.uint32()));break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId))return"roomId: string expected";if(e.hash!=null&&e.hasOwnProperty("hash")&&!$util.isString(e.hash))return"hash: string expected";if(e.roomUsers!=null&&e.hasOwnProperty("roomUsers")){if(!Array.isArray(e.roomUsers))return"roomUsers: array expected";for(let o=0;o<e.roomUsers.length;++o){let I=$root.com.quick.voice.proto.User.verify(e.roomUsers[o]);if(I)return"roomUsers."+I}}return null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.ToggleLiveRoomRsq)return e;let o=new $root.com.quick.voice.proto.ToggleLiveRoomRsq;if(e.roomId!=null&&(o.roomId=String(e.roomId)),e.hash!=null&&(o.hash=String(e.hash)),e.roomUsers){if(!Array.isArray(e.roomUsers))throw TypeError(".com.quick.voice.proto.ToggleLiveRoomRsq.roomUsers: array expected");o.roomUsers=[];for(let I=0;I<e.roomUsers.length;++I){if(typeof e.roomUsers[I]!="object")throw TypeError(".com.quick.voice.proto.ToggleLiveRoomRsq.roomUsers: object expected");o.roomUsers[I]=$root.com.quick.voice.proto.User.fromObject(e.roomUsers[I])}}return o},k.toObject=function(e,o){o||(o={});let I={};if((o.arrays||o.defaults)&&(I.roomUsers=[]),o.defaults&&(I.roomId="",I.hash=""),e.roomId!=null&&e.hasOwnProperty("roomId")&&(I.roomId=e.roomId),e.hash!=null&&e.hasOwnProperty("hash")&&(I.hash=e.hash),e.roomUsers&&e.roomUsers.length){I.roomUsers=[];for(let N=0;N<e.roomUsers.length;++N)I.roomUsers[N]=$root.com.quick.voice.proto.User.toObject(e.roomUsers[N],o)}return I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.ToggleLiveRoomRsq"},k}(),q.TrackType=function(){const k={},$=Object.create(k);return $[k[0]="Microphone"]=0,$[k[1]="Camera"]=1,$[k[2]="Screen"]=2,$[k[3]="SystemVoice"]=3,$}(),q.ReportInfoReq=function(){function k($){if($)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.actionEvent="",k.prototype.userId="",k.prototype.platform="",k.prototype.time=$util.Long?$util.Long.fromBits(0,0,!1):0,k.prototype.actionData="",k.create=function(e){return new k(e)},k.encode=function(e,o){return o||(o=$Writer.create()),e.actionEvent!=null&&Object.hasOwnProperty.call(e,"actionEvent")&&o.uint32(10).string(e.actionEvent),e.userId!=null&&Object.hasOwnProperty.call(e,"userId")&&o.uint32(18).string(e.userId),e.platform!=null&&Object.hasOwnProperty.call(e,"platform")&&o.uint32(26).string(e.platform),e.time!=null&&Object.hasOwnProperty.call(e,"time")&&o.uint32(32).int64(e.time),e.actionData!=null&&Object.hasOwnProperty.call(e,"actionData")&&o.uint32(42).string(e.actionData),o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.ReportInfoReq;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.actionEvent=e.string();break}case 2:{N.userId=e.string();break}case 3:{N.platform=e.string();break}case 4:{N.time=e.int64();break}case 5:{N.actionData=e.string();break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){return typeof e!="object"||e===null?"object expected":e.actionEvent!=null&&e.hasOwnProperty("actionEvent")&&!$util.isString(e.actionEvent)?"actionEvent: string expected":e.userId!=null&&e.hasOwnProperty("userId")&&!$util.isString(e.userId)?"userId: string expected":e.platform!=null&&e.hasOwnProperty("platform")&&!$util.isString(e.platform)?"platform: string expected":e.time!=null&&e.hasOwnProperty("time")&&!$util.isInteger(e.time)&&!(e.time&&$util.isInteger(e.time.low)&&$util.isInteger(e.time.high))?"time: integer|Long expected":e.actionData!=null&&e.hasOwnProperty("actionData")&&!$util.isString(e.actionData)?"actionData: string expected":null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.ReportInfoReq)return e;let o=new $root.com.quick.voice.proto.ReportInfoReq;return e.actionEvent!=null&&(o.actionEvent=String(e.actionEvent)),e.userId!=null&&(o.userId=String(e.userId)),e.platform!=null&&(o.platform=String(e.platform)),e.time!=null&&($util.Long?(o.time=$util.Long.fromValue(e.time)).unsigned=!1:typeof e.time=="string"?o.time=parseInt(e.time,10):typeof e.time=="number"?o.time=e.time:typeof e.time=="object"&&(o.time=new $util.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber())),e.actionData!=null&&(o.actionData=String(e.actionData)),o},k.toObject=function(e,o){o||(o={});let I={};if(o.defaults){if(I.actionEvent="",I.userId="",I.platform="",$util.Long){let N=new $util.Long(0,0,!1);I.time=o.longs===String?N.toString():o.longs===Number?N.toNumber():N}else I.time=o.longs===String?"0":0;I.actionData=""}return e.actionEvent!=null&&e.hasOwnProperty("actionEvent")&&(I.actionEvent=e.actionEvent),e.userId!=null&&e.hasOwnProperty("userId")&&(I.userId=e.userId),e.platform!=null&&e.hasOwnProperty("platform")&&(I.platform=e.platform),e.time!=null&&e.hasOwnProperty("time")&&(typeof e.time=="number"?I.time=o.longs===String?String(e.time):e.time:I.time=o.longs===String?$util.Long.prototype.toString.call(e.time):o.longs===Number?new $util.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber():e.time),e.actionData!=null&&e.hasOwnProperty("actionData")&&(I.actionData=e.actionData),I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.ReportInfoReq"},k}(),q.UpdatePermissions=function(){function k($){if($)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.roomId="",k.prototype.user=null,k.create=function(e){return new k(e)},k.encode=function(e,o){return o||(o=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&o.uint32(10).string(e.roomId),e.user!=null&&Object.hasOwnProperty.call(e,"user")&&$root.com.quick.voice.proto.User.encode(e.user,o.uint32(18).fork()).ldelim(),o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.UpdatePermissions;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.roomId=e.string();break}case 2:{N.user=$root.com.quick.voice.proto.User.decode(e,e.uint32());break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId))return"roomId: string expected";if(e.user!=null&&e.hasOwnProperty("user")){let o=$root.com.quick.voice.proto.User.verify(e.user);if(o)return"user."+o}return null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.UpdatePermissions)return e;let o=new $root.com.quick.voice.proto.UpdatePermissions;if(e.roomId!=null&&(o.roomId=String(e.roomId)),e.user!=null){if(typeof e.user!="object")throw TypeError(".com.quick.voice.proto.UpdatePermissions.user: object expected");o.user=$root.com.quick.voice.proto.User.fromObject(e.user)}return o},k.toObject=function(e,o){o||(o={});let I={};return o.defaults&&(I.roomId="",I.user=null),e.roomId!=null&&e.hasOwnProperty("roomId")&&(I.roomId=e.roomId),e.user!=null&&e.hasOwnProperty("user")&&(I.user=$root.com.quick.voice.proto.User.toObject(e.user,o)),I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.UpdatePermissions"},k}(),q.CallType=function(){const k={},$=Object.create(k);return $[k[0]="Normal"]=0,$[k[1]="Meeting"]=1,$[k[2]="Live"]=2,$}(),q.QuitNotifyCode=function(){const k={},$=Object.create(k);return $[k[0]="NormalQuit"]=0,$[k[2021]="Timeout"]=2021,$[k[2011]="TokenExpired"]=2011,$[k[2022]="KickOut"]=2022,$[k[2023]="EndPk"]=2023,$[k[2024]="EndLive"]=2024,$}(),q.UserBehavior=function(){function k($){if($)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.type=0,k.prototype.behavior=!1,k.create=function(e){return new k(e)},k.encode=function(e,o){return o||(o=$Writer.create()),e.type!=null&&Object.hasOwnProperty.call(e,"type")&&o.uint32(8).int32(e.type),e.behavior!=null&&Object.hasOwnProperty.call(e,"behavior")&&o.uint32(16).bool(e.behavior),o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.UserBehavior;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.type=e.int32();break}case 2:{N.behavior=e.bool();break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.type!=null&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:break}return e.behavior!=null&&e.hasOwnProperty("behavior")&&typeof e.behavior!="boolean"?"behavior: boolean expected":null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.UserBehavior)return e;let o=new $root.com.quick.voice.proto.UserBehavior;switch(e.type){default:if(typeof e.type=="number"){o.type=e.type;break}break;case"Microphone":case 0:o.type=0;break;case"Camera":case 1:o.type=1;break;case"Screen":case 2:o.type=2;break;case"SystemVoice":case 3:o.type=3;break}return e.behavior!=null&&(o.behavior=!!e.behavior),o},k.toObject=function(e,o){o||(o={});let I={};return o.defaults&&(I.type=o.enums===String?"Microphone":0,I.behavior=!1),e.type!=null&&e.hasOwnProperty("type")&&(I.type=o.enums===String?$root.com.quick.voice.proto.TrackType[e.type]===void 0?e.type:$root.com.quick.voice.proto.TrackType[e.type]:e.type),e.behavior!=null&&e.hasOwnProperty("behavior")&&(I.behavior=e.behavior),I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.UserBehavior"},k}(),q.PreventUser=function(){function k($){if(this.behaviors=[],$)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.id="",k.prototype.behaviors=$util.emptyArray,k.create=function(e){return new k(e)},k.encode=function(e,o){if(o||(o=$Writer.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&o.uint32(10).string(e.id),e.behaviors!=null&&e.behaviors.length)for(let I=0;I<e.behaviors.length;++I)$root.com.quick.voice.proto.UserBehavior.encode(e.behaviors[I],o.uint32(18).fork()).ldelim();return o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.PreventUser;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.id=e.string();break}case 2:{N.behaviors&&N.behaviors.length||(N.behaviors=[]),N.behaviors.push($root.com.quick.voice.proto.UserBehavior.decode(e,e.uint32()));break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.id!=null&&e.hasOwnProperty("id")&&!$util.isString(e.id))return"id: string expected";if(e.behaviors!=null&&e.hasOwnProperty("behaviors")){if(!Array.isArray(e.behaviors))return"behaviors: array expected";for(let o=0;o<e.behaviors.length;++o){let I=$root.com.quick.voice.proto.UserBehavior.verify(e.behaviors[o]);if(I)return"behaviors."+I}}return null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.PreventUser)return e;let o=new $root.com.quick.voice.proto.PreventUser;if(e.id!=null&&(o.id=String(e.id)),e.behaviors){if(!Array.isArray(e.behaviors))throw TypeError(".com.quick.voice.proto.PreventUser.behaviors: array expected");o.behaviors=[];for(let I=0;I<e.behaviors.length;++I){if(typeof e.behaviors[I]!="object")throw TypeError(".com.quick.voice.proto.PreventUser.behaviors: object expected");o.behaviors[I]=$root.com.quick.voice.proto.UserBehavior.fromObject(e.behaviors[I])}}return o},k.toObject=function(e,o){o||(o={});let I={};if((o.arrays||o.defaults)&&(I.behaviors=[]),o.defaults&&(I.id=""),e.id!=null&&e.hasOwnProperty("id")&&(I.id=e.id),e.behaviors&&e.behaviors.length){I.behaviors=[];for(let N=0;N<e.behaviors.length;++N)I.behaviors[N]=$root.com.quick.voice.proto.UserBehavior.toObject(e.behaviors[N],o)}return I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.PreventUser"},k}(),q.PreventUsersBehaviorReq=function(){function k($){if(this.users=[],$)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.roomId="",k.prototype.users=$util.emptyArray,k.create=function(e){return new k(e)},k.encode=function(e,o){if(o||(o=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&o.uint32(10).string(e.roomId),e.users!=null&&e.users.length)for(let I=0;I<e.users.length;++I)$root.com.quick.voice.proto.PreventUser.encode(e.users[I],o.uint32(18).fork()).ldelim();return o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.PreventUsersBehaviorReq;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.roomId=e.string();break}case 2:{N.users&&N.users.length||(N.users=[]),N.users.push($root.com.quick.voice.proto.PreventUser.decode(e,e.uint32()));break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId))return"roomId: string expected";if(e.users!=null&&e.hasOwnProperty("users")){if(!Array.isArray(e.users))return"users: array expected";for(let o=0;o<e.users.length;++o){let I=$root.com.quick.voice.proto.PreventUser.verify(e.users[o]);if(I)return"users."+I}}return null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.PreventUsersBehaviorReq)return e;let o=new $root.com.quick.voice.proto.PreventUsersBehaviorReq;if(e.roomId!=null&&(o.roomId=String(e.roomId)),e.users){if(!Array.isArray(e.users))throw TypeError(".com.quick.voice.proto.PreventUsersBehaviorReq.users: array expected");o.users=[];for(let I=0;I<e.users.length;++I){if(typeof e.users[I]!="object")throw TypeError(".com.quick.voice.proto.PreventUsersBehaviorReq.users: object expected");o.users[I]=$root.com.quick.voice.proto.PreventUser.fromObject(e.users[I])}}return o},k.toObject=function(e,o){o||(o={});let I={};if((o.arrays||o.defaults)&&(I.users=[]),o.defaults&&(I.roomId=""),e.roomId!=null&&e.hasOwnProperty("roomId")&&(I.roomId=e.roomId),e.users&&e.users.length){I.users=[];for(let N=0;N<e.users.length;++N)I.users[N]=$root.com.quick.voice.proto.PreventUser.toObject(e.users[N],o)}return I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.PreventUsersBehaviorReq"},k}(),q.PreventUsersBehaviorNotify=function(){function k($){if(this.users=[],$)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.roomId="",k.prototype.users=$util.emptyArray,k.create=function(e){return new k(e)},k.encode=function(e,o){if(o||(o=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&o.uint32(10).string(e.roomId),e.users!=null&&e.users.length)for(let I=0;I<e.users.length;++I)$root.com.quick.voice.proto.User.encode(e.users[I],o.uint32(18).fork()).ldelim();return o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.PreventUsersBehaviorNotify;for(;e.pos<I;){let D=e.uint32();switch(D>>>3){case 1:{N.roomId=e.string();break}case 2:{N.users&&N.users.length||(N.users=[]),N.users.push($root.com.quick.voice.proto.User.decode(e,e.uint32()));break}default:e.skipType(D&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId))return"roomId: string expected";if(e.users!=null&&e.hasOwnProperty("users")){if(!Array.isArray(e.users))return"users: array expected";for(let o=0;o<e.users.length;++o){let I=$root.com.quick.voice.proto.User.verify(e.users[o]);if(I)return"users."+I}}return null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.PreventUsersBehaviorNotify)return e;let o=new $root.com.quick.voice.proto.PreventUsersBehaviorNotify;if(e.roomId!=null&&(o.roomId=String(e.roomId)),e.users){if(!Array.isArray(e.users))throw TypeError(".com.quick.voice.proto.PreventUsersBehaviorNotify.users: array expected");o.users=[];for(let I=0;I<e.users.length;++I){if(typeof e.users[I]!="object")throw TypeError(".com.quick.voice.proto.PreventUsersBehaviorNotify.users: object expected");o.users[I]=$root.com.quick.voice.proto.User.fromObject(e.users[I])}}return o},k.toObject=function(e,o){o||(o={});let I={};if((o.arrays||o.defaults)&&(I.users=[]),o.defaults&&(I.roomId=""),e.roomId!=null&&e.hasOwnProperty("roomId")&&(I.roomId=e.roomId),e.users&&e.users.length){I.users=[];for(let N=0;N<e.users.length;++N)I.users[N]=$root.com.quick.voice.proto.User.toObject(e.users[N],o)}return I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.PreventUsersBehaviorNotify"},k}(),q.AccelerationAreas=function(){const k={},$=Object.create(k);return $[k[0]="chinaMainland"]=0,$[k[1]="global"]=1,$[k[2]="overseas"]=2,$}(),q.CountMethods=function(){const k={},$=Object.create(k);return $[k[0]="flow"]=0,$[k[1]="minutes"]=1,$}(),q.BaseCDNAddress=function(){function k($){if(this.urlMap={},$)for(let e=Object.keys($),o=0;o<e.length;++o)$[e[o]]!=null&&(this[e[o]]=$[e[o]])}return k.prototype.area=0,k.prototype.countType=0,k.prototype.urlMap=$util.emptyObject,k.create=function(e){return new k(e)},k.encode=function(e,o){if(o||(o=$Writer.create()),e.area!=null&&Object.hasOwnProperty.call(e,"area")&&o.uint32(8).int32(e.area),e.countType!=null&&Object.hasOwnProperty.call(e,"countType")&&o.uint32(16).int32(e.countType),e.urlMap!=null&&Object.hasOwnProperty.call(e,"urlMap"))for(let I=Object.keys(e.urlMap),N=0;N<I.length;++N)o.uint32(26).fork().uint32(10).string(I[N]).uint32(18).string(e.urlMap[I[N]]).ldelim();return o},k.encodeDelimited=function(e,o){return this.encode(e,o).ldelim()},k.decode=function(e,o){e instanceof $Reader||(e=$Reader.create(e));let I=o===void 0?e.len:e.pos+o,N=new $root.com.quick.voice.proto.BaseCDNAddress,D,P;for(;e.pos<I;){let U=e.uint32();switch(U>>>3){case 1:{N.area=e.int32();break}case 2:{N.countType=e.int32();break}case 3:{N.urlMap===$util.emptyObject&&(N.urlMap={});let L=e.uint32()+e.pos;for(D="",P="";e.pos<L;){let Z=e.uint32();switch(Z>>>3){case 1:D=e.string();break;case 2:P=e.string();break;default:e.skipType(Z&7);break}}N.urlMap[D]=P;break}default:e.skipType(U&7);break}}return N},k.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},k.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.area!=null&&e.hasOwnProperty("area"))switch(e.area){default:return"area: enum value expected";case 0:case 1:case 2:break}if(e.countType!=null&&e.hasOwnProperty("countType"))switch(e.countType){default:return"countType: enum value expected";case 0:case 1:break}if(e.urlMap!=null&&e.hasOwnProperty("urlMap")){if(!$util.isObject(e.urlMap))return"urlMap: object expected";let o=Object.keys(e.urlMap);for(let I=0;I<o.length;++I)if(!$util.isString(e.urlMap[o[I]]))return"urlMap: string{k:string} expected"}return null},k.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.BaseCDNAddress)return e;let o=new $root.com.quick.voice.proto.BaseCDNAddress;switch(e.area){default:if(typeof e.area=="number"){o.area=e.area;break}break;case"chinaMainland":case 0:o.area=0;break;case"global":case 1:o.area=1;break;case"overseas":case 2:o.area=2;break}switch(e.countType){default:if(typeof e.countType=="number"){o.countType=e.countType;break}break;case"flow":case 0:o.countType=0;break;case"minutes":case 1:o.countType=1;break}if(e.urlMap){if(typeof e.urlMap!="object")throw TypeError(".com.quick.voice.proto.BaseCDNAddress.urlMap: object expected");o.urlMap={};for(let I=Object.keys(e.urlMap),N=0;N<I.length;++N)o.urlMap[I[N]]=String(e.urlMap[I[N]])}return o},k.toObject=function(e,o){o||(o={});let I={};(o.objects||o.defaults)&&(I.urlMap={}),o.defaults&&(I.area=o.enums===String?"chinaMainland":0,I.countType=o.enums===String?"flow":0),e.area!=null&&e.hasOwnProperty("area")&&(I.area=o.enums===String?$root.com.quick.voice.proto.AccelerationAreas[e.area]===void 0?e.area:$root.com.quick.voice.proto.AccelerationAreas[e.area]:e.area),e.countType!=null&&e.hasOwnProperty("countType")&&(I.countType=o.enums===String?$root.com.quick.voice.proto.CountMethods[e.countType]===void 0?e.countType:$root.com.quick.voice.proto.CountMethods[e.countType]:e.countType);let N;if(e.urlMap&&(N=Object.keys(e.urlMap)).length){I.urlMap={};for(let D=0;D<N.length;++D)I.urlMap[N[D]]=e.urlMap[N[D]]}return I},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.BaseCDNAddress"},k}(),q.CDNPlayAddressNotify=function(){function k(e){if(this.standLines=[],e)for(let o=Object.keys(e),I=0;I<o.length;++I)e[o[I]]!=null&&(this[o[I]]=e[o[I]])}k.prototype.roomId="",k.prototype.m3u8=null,k.prototype.rtmp=null,k.prototype.flv=null,k.prototype.rtmps=null,k.prototype.mainLine=null,k.prototype.standLines=$util.emptyArray;let $;return Object.defineProperty(k.prototype,"_m3u8",{get:$util.oneOfGetter($=["m3u8"]),set:$util.oneOfSetter($)}),Object.defineProperty(k.prototype,"_rtmp",{get:$util.oneOfGetter($=["rtmp"]),set:$util.oneOfSetter($)}),Object.defineProperty(k.prototype,"_flv",{get:$util.oneOfGetter($=["flv"]),set:$util.oneOfSetter($)}),Object.defineProperty(k.prototype,"_rtmps",{get:$util.oneOfGetter($=["rtmps"]),set:$util.oneOfSetter($)}),Object.defineProperty(k.prototype,"_mainLine",{get:$util.oneOfGetter($=["mainLine"]),set:$util.oneOfSetter($)}),k.create=function(o){return new k(o)},k.encode=function(o,I){if(I||(I=$Writer.create()),o.roomId!=null&&Object.hasOwnProperty.call(o,"roomId")&&I.uint32(10).string(o.roomId),o.m3u8!=null&&Object.hasOwnProperty.call(o,"m3u8")&&I.uint32(18).string(o.m3u8),o.rtmp!=null&&Object.hasOwnProperty.call(o,"rtmp")&&I.uint32(26).string(o.rtmp),o.flv!=null&&Object.hasOwnProperty.call(o,"flv")&&I.uint32(34).string(o.flv),o.rtmps!=null&&Object.hasOwnProperty.call(o,"rtmps")&&I.uint32(42).string(o.rtmps),o.mainLine!=null&&Object.hasOwnProperty.call(o,"mainLine")&&$root.com.quick.voice.proto.BaseCDNAddress.encode(o.mainLine,I.uint32(50).fork()).ldelim(),o.standLines!=null&&o.standLines.length)for(let N=0;N<o.standLines.length;++N)$root.com.quick.voice.proto.BaseCDNAddress.encode(o.standLines[N],I.uint32(58).fork()).ldelim();return I},k.encodeDelimited=function(o,I){return this.encode(o,I).ldelim()},k.decode=function(o,I){o instanceof $Reader||(o=$Reader.create(o));let N=I===void 0?o.len:o.pos+I,D=new $root.com.quick.voice.proto.CDNPlayAddressNotify;for(;o.pos<N;){let P=o.uint32();switch(P>>>3){case 1:{D.roomId=o.string();break}case 2:{D.m3u8=o.string();break}case 3:{D.rtmp=o.string();break}case 4:{D.flv=o.string();break}case 5:{D.rtmps=o.string();break}case 6:{D.mainLine=$root.com.quick.voice.proto.BaseCDNAddress.decode(o,o.uint32());break}case 7:{D.standLines&&D.standLines.length||(D.standLines=[]),D.standLines.push($root.com.quick.voice.proto.BaseCDNAddress.decode(o,o.uint32()));break}default:o.skipType(P&7);break}}return D},k.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},k.verify=function(o){if(typeof o!="object"||o===null)return"object expected";if(o.roomId!=null&&o.hasOwnProperty("roomId")&&!$util.isString(o.roomId))return"roomId: string expected";if(o.m3u8!=null&&o.hasOwnProperty("m3u8")&&!$util.isString(o.m3u8))return"m3u8: string expected";if(o.rtmp!=null&&o.hasOwnProperty("rtmp")&&!$util.isString(o.rtmp))return"rtmp: string expected";if(o.flv!=null&&o.hasOwnProperty("flv")&&!$util.isString(o.flv))return"flv: string expected";if(o.rtmps!=null&&o.hasOwnProperty("rtmps")&&!$util.isString(o.rtmps))return"rtmps: string expected";if(o.mainLine!=null&&o.hasOwnProperty("mainLine")){let I=$root.com.quick.voice.proto.BaseCDNAddress.verify(o.mainLine);if(I)return"mainLine."+I}if(o.standLines!=null&&o.hasOwnProperty("standLines")){if(!Array.isArray(o.standLines))return"standLines: array expected";for(let I=0;I<o.standLines.length;++I){let N=$root.com.quick.voice.proto.BaseCDNAddress.verify(o.standLines[I]);if(N)return"standLines."+N}}return null},k.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.CDNPlayAddressNotify)return o;let I=new $root.com.quick.voice.proto.CDNPlayAddressNotify;if(o.roomId!=null&&(I.roomId=String(o.roomId)),o.m3u8!=null&&(I.m3u8=String(o.m3u8)),o.rtmp!=null&&(I.rtmp=String(o.rtmp)),o.flv!=null&&(I.flv=String(o.flv)),o.rtmps!=null&&(I.rtmps=String(o.rtmps)),o.mainLine!=null){if(typeof o.mainLine!="object")throw TypeError(".com.quick.voice.proto.CDNPlayAddressNotify.mainLine: object expected");I.mainLine=$root.com.quick.voice.proto.BaseCDNAddress.fromObject(o.mainLine)}if(o.standLines){if(!Array.isArray(o.standLines))throw TypeError(".com.quick.voice.proto.CDNPlayAddressNotify.standLines: array expected");I.standLines=[];for(let N=0;N<o.standLines.length;++N){if(typeof o.standLines[N]!="object")throw TypeError(".com.quick.voice.proto.CDNPlayAddressNotify.standLines: object expected");I.standLines[N]=$root.com.quick.voice.proto.BaseCDNAddress.fromObject(o.standLines[N])}}return I},k.toObject=function(o,I){I||(I={});let N={};if((I.arrays||I.defaults)&&(N.standLines=[]),I.defaults&&(N.roomId=""),o.roomId!=null&&o.hasOwnProperty("roomId")&&(N.roomId=o.roomId),o.m3u8!=null&&o.hasOwnProperty("m3u8")&&(N.m3u8=o.m3u8,I.oneofs&&(N._m3u8="m3u8")),o.rtmp!=null&&o.hasOwnProperty("rtmp")&&(N.rtmp=o.rtmp,I.oneofs&&(N._rtmp="rtmp")),o.flv!=null&&o.hasOwnProperty("flv")&&(N.flv=o.flv,I.oneofs&&(N._flv="flv")),o.rtmps!=null&&o.hasOwnProperty("rtmps")&&(N.rtmps=o.rtmps,I.oneofs&&(N._rtmps="rtmps")),o.mainLine!=null&&o.hasOwnProperty("mainLine")&&(N.mainLine=$root.com.quick.voice.proto.BaseCDNAddress.toObject(o.mainLine,I),I.oneofs&&(N._mainLine="mainLine")),o.standLines&&o.standLines.length){N.standLines=[];for(let D=0;D<o.standLines.length;++D)N.standLines[D]=$root.com.quick.voice.proto.BaseCDNAddress.toObject(o.standLines[D],I)}return N},k.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},k.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.CDNPlayAddressNotify"},k}(),q}(),_}(),A}(),u})(),ignoreEvent=["networkQualityChange","onNetQuality"],enum_notifyName={onChangeNetwork:"网络情况变更",healthCheck:"心跳检测",onNetQuality:"网络质量回调",onLogin:"登录回调",onLocalStream:"本地媒体流发生变化",onDevicechange:"媒体设备发生变化",onRoomUser:"房间用户变化",onRoomUsers:"房间所有用户所有变化",onRoomUsersStreams:"房间某些用户媒体流变化",onRoomState:"房间状态变化",onJoinRoom:"加入房间回调",onQuitRoom:"退出房间回调",onPublish:"监听到流发布",onCloseTrack:"关闭轨道",onUpdateCall:"更新通讯状态",onUpdateStreams:"更新媒体流",onUpdatePermissions:"更新推流权限通知",onTokenExpired:"Token已过期",onDestroyRoom:"直播模式房间销毁",destroyRoom:"服务器要求销毁房间",onCDNPlayUrlAdd:"cdn播放地址变化",onDestroy:"SDK销毁"};ut(enum_notifyName);const notifyName_keys=Object.keys(enum_notifyName);/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const Z_FIXED$1=4,Z_BINARY=0,Z_TEXT=1,Z_UNKNOWN$1=2;function zero$1(u){let A=u.length;for(;--A>=0;)u[A]=0}const STORED_BLOCK=0,STATIC_TREES=1,DYN_TREES=2,MIN_MATCH$1=3,MAX_MATCH$1=258,LENGTH_CODES$1=29,LITERALS$1=256,L_CODES$1=LITERALS$1+1+LENGTH_CODES$1,D_CODES$1=30,BL_CODES$1=19,HEAP_SIZE$1=2*L_CODES$1+1,MAX_BITS$1=15,Buf_size=16,MAX_BL_BITS=7,END_BLOCK=256,REP_3_6=16,REPZ_3_10=17,REPZ_11_138=18,extra_lbits=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),extra_dbits=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),extra_blbits=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),bl_order=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),DIST_CODE_LEN=512,static_ltree=new Array((L_CODES$1+2)*2);zero$1(static_ltree);const static_dtree=new Array(D_CODES$1*2);zero$1(static_dtree);const _dist_code=new Array(DIST_CODE_LEN);zero$1(_dist_code);const _length_code=new Array(MAX_MATCH$1-MIN_MATCH$1+1);zero$1(_length_code);const base_length=new Array(LENGTH_CODES$1);zero$1(base_length);const base_dist=new Array(D_CODES$1);zero$1(base_dist);function StaticTreeDesc(u,A,_,q,k){this.static_tree=u,this.extra_bits=A,this.extra_base=_,this.elems=q,this.max_length=k,this.has_stree=u&&u.length}let static_l_desc,static_d_desc,static_bl_desc;function TreeDesc(u,A){this.dyn_tree=u,this.max_code=0,this.stat_desc=A}const d_code=u=>u<256?_dist_code[u]:_dist_code[256+(u>>>7)],put_short=(u,A)=>{u.pending_buf[u.pending++]=A&255,u.pending_buf[u.pending++]=A>>>8&255},send_bits=(u,A,_)=>{u.bi_valid>Buf_size-_?(u.bi_buf|=A<<u.bi_valid&65535,put_short(u,u.bi_buf),u.bi_buf=A>>Buf_size-u.bi_valid,u.bi_valid+=_-Buf_size):(u.bi_buf|=A<<u.bi_valid&65535,u.bi_valid+=_)},send_code=(u,A,_)=>{send_bits(u,_[A*2],_[A*2+1])},bi_reverse=(u,A)=>{let _=0;do _|=u&1,u>>>=1,_<<=1;while(--A>0);return _>>>1},bi_flush=u=>{u.bi_valid===16?(put_short(u,u.bi_buf),u.bi_buf=0,u.bi_valid=0):u.bi_valid>=8&&(u.pending_buf[u.pending++]=u.bi_buf&255,u.bi_buf>>=8,u.bi_valid-=8)},gen_bitlen=(u,A)=>{const _=A.dyn_tree,q=A.max_code,k=A.stat_desc.static_tree,$=A.stat_desc.has_stree,e=A.stat_desc.extra_bits,o=A.stat_desc.extra_base,I=A.stat_desc.max_length;let N,D,P,U,L,Z,J=0;for(U=0;U<=MAX_BITS$1;U++)u.bl_count[U]=0;for(_[u.heap[u.heap_max]*2+1]=0,N=u.heap_max+1;N<HEAP_SIZE$1;N++)D=u.heap[N],U=_[_[D*2+1]*2+1]+1,U>I&&(U=I,J++),_[D*2+1]=U,!(D>q)&&(u.bl_count[U]++,L=0,D>=o&&(L=e[D-o]),Z=_[D*2],u.opt_len+=Z*(U+L),$&&(u.static_len+=Z*(k[D*2+1]+L)));if(J!==0){do{for(U=I-1;u.bl_count[U]===0;)U--;u.bl_count[U]--,u.bl_count[U+1]+=2,u.bl_count[I]--,J-=2}while(J>0);for(U=I;U!==0;U--)for(D=u.bl_count[U];D!==0;)P=u.heap[--N],!(P>q)&&(_[P*2+1]!==U&&(u.opt_len+=(U-_[P*2+1])*_[P*2],_[P*2+1]=U),D--)}},gen_codes=(u,A,_)=>{const q=new Array(MAX_BITS$1+1);let k=0,$,e;for($=1;$<=MAX_BITS$1;$++)k=k+_[$-1]<<1,q[$]=k;for(e=0;e<=A;e++){let o=u[e*2+1];o!==0&&(u[e*2]=bi_reverse(q[o]++,o))}},tr_static_init=()=>{let u,A,_,q,k;const $=new Array(MAX_BITS$1+1);for(_=0,q=0;q<LENGTH_CODES$1-1;q++)for(base_length[q]=_,u=0;u<1<<extra_lbits[q];u++)_length_code[_++]=q;for(_length_code[_-1]=q,k=0,q=0;q<16;q++)for(base_dist[q]=k,u=0;u<1<<extra_dbits[q];u++)_dist_code[k++]=q;for(k>>=7;q<D_CODES$1;q++)for(base_dist[q]=k<<7,u=0;u<1<<extra_dbits[q]-7;u++)_dist_code[256+k++]=q;for(A=0;A<=MAX_BITS$1;A++)$[A]=0;for(u=0;u<=143;)static_ltree[u*2+1]=8,u++,$[8]++;for(;u<=255;)static_ltree[u*2+1]=9,u++,$[9]++;for(;u<=279;)static_ltree[u*2+1]=7,u++,$[7]++;for(;u<=287;)static_ltree[u*2+1]=8,u++,$[8]++;for(gen_codes(static_ltree,L_CODES$1+1,$),u=0;u<D_CODES$1;u++)static_dtree[u*2+1]=5,static_dtree[u*2]=bi_reverse(u,5);static_l_desc=new StaticTreeDesc(static_ltree,extra_lbits,LITERALS$1+1,L_CODES$1,MAX_BITS$1),static_d_desc=new StaticTreeDesc(static_dtree,extra_dbits,0,D_CODES$1,MAX_BITS$1),static_bl_desc=new StaticTreeDesc(new Array(0),extra_blbits,0,BL_CODES$1,MAX_BL_BITS)},init_block=u=>{let A;for(A=0;A<L_CODES$1;A++)u.dyn_ltree[A*2]=0;for(A=0;A<D_CODES$1;A++)u.dyn_dtree[A*2]=0;for(A=0;A<BL_CODES$1;A++)u.bl_tree[A*2]=0;u.dyn_ltree[END_BLOCK*2]=1,u.opt_len=u.static_len=0,u.sym_next=u.matches=0},bi_windup=u=>{u.bi_valid>8?put_short(u,u.bi_buf):u.bi_valid>0&&(u.pending_buf[u.pending++]=u.bi_buf),u.bi_buf=0,u.bi_valid=0},smaller=(u,A,_,q)=>{const k=A*2,$=_*2;return u[k]<u[$]||u[k]===u[$]&&q[A]<=q[_]},pqdownheap=(u,A,_)=>{const q=u.heap[_];let k=_<<1;for(;k<=u.heap_len&&(k<u.heap_len&&smaller(A,u.heap[k+1],u.heap[k],u.depth)&&k++,!smaller(A,q,u.heap[k],u.depth));)u.heap[_]=u.heap[k],_=k,k<<=1;u.heap[_]=q},compress_block=(u,A,_)=>{let q,k,$=0,e,o;if(u.sym_next!==0)do q=u.pending_buf[u.sym_buf+$++]&255,q+=(u.pending_buf[u.sym_buf+$++]&255)<<8,k=u.pending_buf[u.sym_buf+$++],q===0?send_code(u,k,A):(e=_length_code[k],send_code(u,e+LITERALS$1+1,A),o=extra_lbits[e],o!==0&&(k-=base_length[e],send_bits(u,k,o)),q--,e=d_code(q),send_code(u,e,_),o=extra_dbits[e],o!==0&&(q-=base_dist[e],send_bits(u,q,o)));while($<u.sym_next);send_code(u,END_BLOCK,A)},build_tree=(u,A)=>{const _=A.dyn_tree,q=A.stat_desc.static_tree,k=A.stat_desc.has_stree,$=A.stat_desc.elems;let e,o,I=-1,N;for(u.heap_len=0,u.heap_max=HEAP_SIZE$1,e=0;e<$;e++)_[e*2]!==0?(u.heap[++u.heap_len]=I=e,u.depth[e]=0):_[e*2+1]=0;for(;u.heap_len<2;)N=u.heap[++u.heap_len]=I<2?++I:0,_[N*2]=1,u.depth[N]=0,u.opt_len--,k&&(u.static_len-=q[N*2+1]);for(A.max_code=I,e=u.heap_len>>1;e>=1;e--)pqdownheap(u,_,e);N=$;do e=u.heap[1],u.heap[1]=u.heap[u.heap_len--],pqdownheap(u,_,1),o=u.heap[1],u.heap[--u.heap_max]=e,u.heap[--u.heap_max]=o,_[N*2]=_[e*2]+_[o*2],u.depth[N]=(u.depth[e]>=u.depth[o]?u.depth[e]:u.depth[o])+1,_[e*2+1]=_[o*2+1]=N,u.heap[1]=N++,pqdownheap(u,_,1);while(u.heap_len>=2);u.heap[--u.heap_max]=u.heap[1],gen_bitlen(u,A),gen_codes(_,I,u.bl_count)},scan_tree=(u,A,_)=>{let q,k=-1,$,e=A[0*2+1],o=0,I=7,N=4;for(e===0&&(I=138,N=3),A[(_+1)*2+1]=65535,q=0;q<=_;q++)$=e,e=A[(q+1)*2+1],!(++o<I&&$===e)&&(o<N?u.bl_tree[$*2]+=o:$!==0?($!==k&&u.bl_tree[$*2]++,u.bl_tree[REP_3_6*2]++):o<=10?u.bl_tree[REPZ_3_10*2]++:u.bl_tree[REPZ_11_138*2]++,o=0,k=$,e===0?(I=138,N=3):$===e?(I=6,N=3):(I=7,N=4))},send_tree=(u,A,_)=>{let q,k=-1,$,e=A[0*2+1],o=0,I=7,N=4;for(e===0&&(I=138,N=3),q=0;q<=_;q++)if($=e,e=A[(q+1)*2+1],!(++o<I&&$===e)){if(o<N)do send_code(u,$,u.bl_tree);while(--o!==0);else $!==0?($!==k&&(send_code(u,$,u.bl_tree),o--),send_code(u,REP_3_6,u.bl_tree),send_bits(u,o-3,2)):o<=10?(send_code(u,REPZ_3_10,u.bl_tree),send_bits(u,o-3,3)):(send_code(u,REPZ_11_138,u.bl_tree),send_bits(u,o-11,7));o=0,k=$,e===0?(I=138,N=3):$===e?(I=6,N=3):(I=7,N=4)}},build_bl_tree=u=>{let A;for(scan_tree(u,u.dyn_ltree,u.l_desc.max_code),scan_tree(u,u.dyn_dtree,u.d_desc.max_code),build_tree(u,u.bl_desc),A=BL_CODES$1-1;A>=3&&u.bl_tree[bl_order[A]*2+1]===0;A--);return u.opt_len+=3*(A+1)+5+5+4,A},send_all_trees=(u,A,_,q)=>{let k;for(send_bits(u,A-257,5),send_bits(u,_-1,5),send_bits(u,q-4,4),k=0;k<q;k++)send_bits(u,u.bl_tree[bl_order[k]*2+1],3);send_tree(u,u.dyn_ltree,A-1),send_tree(u,u.dyn_dtree,_-1)},detect_data_type=u=>{let A=4093624447,_;for(_=0;_<=31;_++,A>>>=1)if(A&1&&u.dyn_ltree[_*2]!==0)return Z_BINARY;if(u.dyn_ltree[9*2]!==0||u.dyn_ltree[10*2]!==0||u.dyn_ltree[13*2]!==0)return Z_TEXT;for(_=32;_<LITERALS$1;_++)if(u.dyn_ltree[_*2]!==0)return Z_TEXT;return Z_BINARY};let static_init_done=!1;const _tr_init$1=u=>{static_init_done||(tr_static_init(),static_init_done=!0),u.l_desc=new TreeDesc(u.dyn_ltree,static_l_desc),u.d_desc=new TreeDesc(u.dyn_dtree,static_d_desc),u.bl_desc=new TreeDesc(u.bl_tree,static_bl_desc),u.bi_buf=0,u.bi_valid=0,init_block(u)},_tr_stored_block$1=(u,A,_,q)=>{send_bits(u,(STORED_BLOCK<<1)+(q?1:0),3),bi_windup(u),put_short(u,_),put_short(u,~_),_&&u.pending_buf.set(u.window.subarray(A,A+_),u.pending),u.pending+=_},_tr_align$1=u=>{send_bits(u,STATIC_TREES<<1,3),send_code(u,END_BLOCK,static_ltree),bi_flush(u)},_tr_flush_block$1=(u,A,_,q)=>{let k,$,e=0;u.level>0?(u.strm.data_type===Z_UNKNOWN$1&&(u.strm.data_type=detect_data_type(u)),build_tree(u,u.l_desc),build_tree(u,u.d_desc),e=build_bl_tree(u),k=u.opt_len+3+7>>>3,$=u.static_len+3+7>>>3,$<=k&&(k=$)):k=$=_+5,_+4<=k&&A!==-1?_tr_stored_block$1(u,A,_,q):u.strategy===Z_FIXED$1||$===k?(send_bits(u,(STATIC_TREES<<1)+(q?1:0),3),compress_block(u,static_ltree,static_dtree)):(send_bits(u,(DYN_TREES<<1)+(q?1:0),3),send_all_trees(u,u.l_desc.max_code+1,u.d_desc.max_code+1,e+1),compress_block(u,u.dyn_ltree,u.dyn_dtree)),init_block(u),q&&bi_windup(u)},_tr_tally$1=(u,A,_)=>(u.pending_buf[u.sym_buf+u.sym_next++]=A,u.pending_buf[u.sym_buf+u.sym_next++]=A>>8,u.pending_buf[u.sym_buf+u.sym_next++]=_,A===0?u.dyn_ltree[_*2]++:(u.matches++,A--,u.dyn_ltree[(_length_code[_]+LITERALS$1+1)*2]++,u.dyn_dtree[d_code(A)*2]++),u.sym_next===u.sym_end);var _tr_init_1=_tr_init$1,_tr_stored_block_1=_tr_stored_block$1,_tr_flush_block_1=_tr_flush_block$1,_tr_tally_1=_tr_tally$1,_tr_align_1=_tr_align$1,trees={_tr_init:_tr_init_1,_tr_stored_block:_tr_stored_block_1,_tr_flush_block:_tr_flush_block_1,_tr_tally:_tr_tally_1,_tr_align:_tr_align_1};const adler32=(u,A,_,q)=>{let k=u&65535|0,$=u>>>16&65535|0,e=0;for(;_!==0;){e=_>2e3?2e3:_,_-=e;do k=k+A[q++]|0,$=$+k|0;while(--e);k%=65521,$%=65521}return k|$<<16|0};var adler32_1=adler32;const makeTable=()=>{let u,A=[];for(var _=0;_<256;_++){u=_;for(var q=0;q<8;q++)u=u&1?3988292384^u>>>1:u>>>1;A[_]=u}return A},crcTable=new Uint32Array(makeTable()),crc32=(u,A,_,q)=>{const k=crcTable,$=q+_;u^=-1;for(let e=q;e<$;e++)u=u>>>8^k[(u^A[e])&255];return u^-1};var crc32_1=crc32,messages={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},constants$2={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init,_tr_stored_block,_tr_flush_block,_tr_tally,_tr_align}=trees,{Z_NO_FLUSH:Z_NO_FLUSH$2,Z_PARTIAL_FLUSH,Z_FULL_FLUSH:Z_FULL_FLUSH$1,Z_FINISH:Z_FINISH$3,Z_BLOCK:Z_BLOCK$1,Z_OK:Z_OK$3,Z_STREAM_END:Z_STREAM_END$3,Z_STREAM_ERROR:Z_STREAM_ERROR$2,Z_DATA_ERROR:Z_DATA_ERROR$2,Z_BUF_ERROR:Z_BUF_ERROR$1,Z_DEFAULT_COMPRESSION:Z_DEFAULT_COMPRESSION$1,Z_FILTERED,Z_HUFFMAN_ONLY,Z_RLE,Z_FIXED,Z_DEFAULT_STRATEGY:Z_DEFAULT_STRATEGY$1,Z_UNKNOWN,Z_DEFLATED:Z_DEFLATED$2}=constants$2,MAX_MEM_LEVEL=9,MAX_WBITS$1=15,DEF_MEM_LEVEL=8,LENGTH_CODES=29,LITERALS=256,L_CODES=LITERALS+1+LENGTH_CODES,D_CODES=30,BL_CODES=19,HEAP_SIZE=2*L_CODES+1,MAX_BITS=15,MIN_MATCH=3,MAX_MATCH=258,MIN_LOOKAHEAD=MAX_MATCH+MIN_MATCH+1,PRESET_DICT=32,INIT_STATE=42,GZIP_STATE=57,EXTRA_STATE=69,NAME_STATE=73,COMMENT_STATE=91,HCRC_STATE=103,BUSY_STATE=113,FINISH_STATE=666,BS_NEED_MORE=1,BS_BLOCK_DONE=2,BS_FINISH_STARTED=3,BS_FINISH_DONE=4,OS_CODE=3,err=(u,A)=>(u.msg=messages[A],A),rank=u=>u*2-(u>4?9:0),zero=u=>{let A=u.length;for(;--A>=0;)u[A]=0},slide_hash=u=>{let A,_,q,k=u.w_size;A=u.hash_size,q=A;do _=u.head[--q],u.head[q]=_>=k?_-k:0;while(--A);A=k,q=A;do _=u.prev[--q],u.prev[q]=_>=k?_-k:0;while(--A)};let HASH_ZLIB=(u,A,_)=>(A<<u.hash_shift^_)&u.hash_mask,HASH=HASH_ZLIB;const flush_pending=u=>{const A=u.state;let _=A.pending;_>u.avail_out&&(_=u.avail_out),_!==0&&(u.output.set(A.pending_buf.subarray(A.pending_out,A.pending_out+_),u.next_out),u.next_out+=_,A.pending_out+=_,u.total_out+=_,u.avail_out-=_,A.pending-=_,A.pending===0&&(A.pending_out=0))},flush_block_only=(u,A)=>{_tr_flush_block(u,u.block_start>=0?u.block_start:-1,u.strstart-u.block_start,A),u.block_start=u.strstart,flush_pending(u.strm)},put_byte=(u,A)=>{u.pending_buf[u.pending++]=A},putShortMSB=(u,A)=>{u.pending_buf[u.pending++]=A>>>8&255,u.pending_buf[u.pending++]=A&255},read_buf=(u,A,_,q)=>{let k=u.avail_in;return k>q&&(k=q),k===0?0:(u.avail_in-=k,A.set(u.input.subarray(u.next_in,u.next_in+k),_),u.state.wrap===1?u.adler=adler32_1(u.adler,A,k,_):u.state.wrap===2&&(u.adler=crc32_1(u.adler,A,k,_)),u.next_in+=k,u.total_in+=k,k)},longest_match=(u,A)=>{let _=u.max_chain_length,q=u.strstart,k,$,e=u.prev_length,o=u.nice_match;const I=u.strstart>u.w_size-MIN_LOOKAHEAD?u.strstart-(u.w_size-MIN_LOOKAHEAD):0,N=u.window,D=u.w_mask,P=u.prev,U=u.strstart+MAX_MATCH;let L=N[q+e-1],Z=N[q+e];u.prev_length>=u.good_match&&(_>>=2),o>u.lookahead&&(o=u.lookahead);do if(k=A,!(N[k+e]!==Z||N[k+e-1]!==L||N[k]!==N[q]||N[++k]!==N[q+1])){q+=2,k++;do;while(N[++q]===N[++k]&&N[++q]===N[++k]&&N[++q]===N[++k]&&N[++q]===N[++k]&&N[++q]===N[++k]&&N[++q]===N[++k]&&N[++q]===N[++k]&&N[++q]===N[++k]&&q<U);if($=MAX_MATCH-(U-q),q=U-MAX_MATCH,$>e){if(u.match_start=A,e=$,$>=o)break;L=N[q+e-1],Z=N[q+e]}}while((A=P[A&D])>I&&--_!==0);return e<=u.lookahead?e:u.lookahead},fill_window=u=>{const A=u.w_size;let _,q,k;do{if(q=u.window_size-u.lookahead-u.strstart,u.strstart>=A+(A-MIN_LOOKAHEAD)&&(u.window.set(u.window.subarray(A,A+A-q),0),u.match_start-=A,u.strstart-=A,u.block_start-=A,u.insert>u.strstart&&(u.insert=u.strstart),slide_hash(u),q+=A),u.strm.avail_in===0)break;if(_=read_buf(u.strm,u.window,u.strstart+u.lookahead,q),u.lookahead+=_,u.lookahead+u.insert>=MIN_MATCH)for(k=u.strstart-u.insert,u.ins_h=u.window[k],u.ins_h=HASH(u,u.ins_h,u.window[k+1]);u.insert&&(u.ins_h=HASH(u,u.ins_h,u.window[k+MIN_MATCH-1]),u.prev[k&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=k,k++,u.insert--,!(u.lookahead+u.insert<MIN_MATCH)););}while(u.lookahead<MIN_LOOKAHEAD&&u.strm.avail_in!==0)},deflate_stored=(u,A)=>{let _=u.pending_buf_size-5>u.w_size?u.w_size:u.pending_buf_size-5,q,k,$,e=0,o=u.strm.avail_in;do{if(q=65535,$=u.bi_valid+42>>3,u.strm.avail_out<$||($=u.strm.avail_out-$,k=u.strstart-u.block_start,q>k+u.strm.avail_in&&(q=k+u.strm.avail_in),q>$&&(q=$),q<_&&(q===0&&A!==Z_FINISH$3||A===Z_NO_FLUSH$2||q!==k+u.strm.avail_in)))break;e=A===Z_FINISH$3&&q===k+u.strm.avail_in?1:0,_tr_stored_block(u,0,0,e),u.pending_buf[u.pending-4]=q,u.pending_buf[u.pending-3]=q>>8,u.pending_buf[u.pending-2]=~q,u.pending_buf[u.pending-1]=~q>>8,flush_pending(u.strm),k&&(k>q&&(k=q),u.strm.output.set(u.window.subarray(u.block_start,u.block_start+k),u.strm.next_out),u.strm.next_out+=k,u.strm.avail_out-=k,u.strm.total_out+=k,u.block_start+=k,q-=k),q&&(read_buf(u.strm,u.strm.output,u.strm.next_out,q),u.strm.next_out+=q,u.strm.avail_out-=q,u.strm.total_out+=q)}while(e===0);return o-=u.strm.avail_in,o&&(o>=u.w_size?(u.matches=2,u.window.set(u.strm.input.subarray(u.strm.next_in-u.w_size,u.strm.next_in),0),u.strstart=u.w_size,u.insert=u.strstart):(u.window_size-u.strstart<=o&&(u.strstart-=u.w_size,u.window.set(u.window.subarray(u.w_size,u.w_size+u.strstart),0),u.matches<2&&u.matches++,u.insert>u.strstart&&(u.insert=u.strstart)),u.window.set(u.strm.input.subarray(u.strm.next_in-o,u.strm.next_in),u.strstart),u.strstart+=o,u.insert+=o>u.w_size-u.insert?u.w_size-u.insert:o),u.block_start=u.strstart),u.high_water<u.strstart&&(u.high_water=u.strstart),e?BS_FINISH_DONE:A!==Z_NO_FLUSH$2&&A!==Z_FINISH$3&&u.strm.avail_in===0&&u.strstart===u.block_start?BS_BLOCK_DONE:($=u.window_size-u.strstart,u.strm.avail_in>$&&u.block_start>=u.w_size&&(u.block_start-=u.w_size,u.strstart-=u.w_size,u.window.set(u.window.subarray(u.w_size,u.w_size+u.strstart),0),u.matches<2&&u.matches++,$+=u.w_size,u.insert>u.strstart&&(u.insert=u.strstart)),$>u.strm.avail_in&&($=u.strm.avail_in),$&&(read_buf(u.strm,u.window,u.strstart,$),u.strstart+=$,u.insert+=$>u.w_size-u.insert?u.w_size-u.insert:$),u.high_water<u.strstart&&(u.high_water=u.strstart),$=u.bi_valid+42>>3,$=u.pending_buf_size-$>65535?65535:u.pending_buf_size-$,_=$>u.w_size?u.w_size:$,k=u.strstart-u.block_start,(k>=_||(k||A===Z_FINISH$3)&&A!==Z_NO_FLUSH$2&&u.strm.avail_in===0&&k<=$)&&(q=k>$?$:k,e=A===Z_FINISH$3&&u.strm.avail_in===0&&q===k?1:0,_tr_stored_block(u,u.block_start,q,e),u.block_start+=q,flush_pending(u.strm)),e?BS_FINISH_STARTED:BS_NEED_MORE)},deflate_fast=(u,A)=>{let _,q;for(;;){if(u.lookahead<MIN_LOOKAHEAD){if(fill_window(u),u.lookahead<MIN_LOOKAHEAD&&A===Z_NO_FLUSH$2)return BS_NEED_MORE;if(u.lookahead===0)break}if(_=0,u.lookahead>=MIN_MATCH&&(u.ins_h=HASH(u,u.ins_h,u.window[u.strstart+MIN_MATCH-1]),_=u.prev[u.strstart&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=u.strstart),_!==0&&u.strstart-_<=u.w_size-MIN_LOOKAHEAD&&(u.match_length=longest_match(u,_)),u.match_length>=MIN_MATCH)if(q=_tr_tally(u,u.strstart-u.match_start,u.match_length-MIN_MATCH),u.lookahead-=u.match_length,u.match_length<=u.max_lazy_match&&u.lookahead>=MIN_MATCH){u.match_length--;do u.strstart++,u.ins_h=HASH(u,u.ins_h,u.window[u.strstart+MIN_MATCH-1]),_=u.prev[u.strstart&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=u.strstart;while(--u.match_length!==0);u.strstart++}else u.strstart+=u.match_length,u.match_length=0,u.ins_h=u.window[u.strstart],u.ins_h=HASH(u,u.ins_h,u.window[u.strstart+1]);else q=_tr_tally(u,0,u.window[u.strstart]),u.lookahead--,u.strstart++;if(q&&(flush_block_only(u,!1),u.strm.avail_out===0))return BS_NEED_MORE}return u.insert=u.strstart<MIN_MATCH-1?u.strstart:MIN_MATCH-1,A===Z_FINISH$3?(flush_block_only(u,!0),u.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):u.sym_next&&(flush_block_only(u,!1),u.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_slow=(u,A)=>{let _,q,k;for(;;){if(u.lookahead<MIN_LOOKAHEAD){if(fill_window(u),u.lookahead<MIN_LOOKAHEAD&&A===Z_NO_FLUSH$2)return BS_NEED_MORE;if(u.lookahead===0)break}if(_=0,u.lookahead>=MIN_MATCH&&(u.ins_h=HASH(u,u.ins_h,u.window[u.strstart+MIN_MATCH-1]),_=u.prev[u.strstart&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=u.strstart),u.prev_length=u.match_length,u.prev_match=u.match_start,u.match_length=MIN_MATCH-1,_!==0&&u.prev_length<u.max_lazy_match&&u.strstart-_<=u.w_size-MIN_LOOKAHEAD&&(u.match_length=longest_match(u,_),u.match_length<=5&&(u.strategy===Z_FILTERED||u.match_length===MIN_MATCH&&u.strstart-u.match_start>4096)&&(u.match_length=MIN_MATCH-1)),u.prev_length>=MIN_MATCH&&u.match_length<=u.prev_length){k=u.strstart+u.lookahead-MIN_MATCH,q=_tr_tally(u,u.strstart-1-u.prev_match,u.prev_length-MIN_MATCH),u.lookahead-=u.prev_length-1,u.prev_length-=2;do++u.strstart<=k&&(u.ins_h=HASH(u,u.ins_h,u.window[u.strstart+MIN_MATCH-1]),_=u.prev[u.strstart&u.w_mask]=u.head[u.ins_h],u.head[u.ins_h]=u.strstart);while(--u.prev_length!==0);if(u.match_available=0,u.match_length=MIN_MATCH-1,u.strstart++,q&&(flush_block_only(u,!1),u.strm.avail_out===0))return BS_NEED_MORE}else if(u.match_available){if(q=_tr_tally(u,0,u.window[u.strstart-1]),q&&flush_block_only(u,!1),u.strstart++,u.lookahead--,u.strm.avail_out===0)return BS_NEED_MORE}else u.match_available=1,u.strstart++,u.lookahead--}return u.match_available&&(q=_tr_tally(u,0,u.window[u.strstart-1]),u.match_available=0),u.insert=u.strstart<MIN_MATCH-1?u.strstart:MIN_MATCH-1,A===Z_FINISH$3?(flush_block_only(u,!0),u.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):u.sym_next&&(flush_block_only(u,!1),u.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_rle=(u,A)=>{let _,q,k,$;const e=u.window;for(;;){if(u.lookahead<=MAX_MATCH){if(fill_window(u),u.lookahead<=MAX_MATCH&&A===Z_NO_FLUSH$2)return BS_NEED_MORE;if(u.lookahead===0)break}if(u.match_length=0,u.lookahead>=MIN_MATCH&&u.strstart>0&&(k=u.strstart-1,q=e[k],q===e[++k]&&q===e[++k]&&q===e[++k])){$=u.strstart+MAX_MATCH;do;while(q===e[++k]&&q===e[++k]&&q===e[++k]&&q===e[++k]&&q===e[++k]&&q===e[++k]&&q===e[++k]&&q===e[++k]&&k<$);u.match_length=MAX_MATCH-($-k),u.match_length>u.lookahead&&(u.match_length=u.lookahead)}if(u.match_length>=MIN_MATCH?(_=_tr_tally(u,1,u.match_length-MIN_MATCH),u.lookahead-=u.match_length,u.strstart+=u.match_length,u.match_length=0):(_=_tr_tally(u,0,u.window[u.strstart]),u.lookahead--,u.strstart++),_&&(flush_block_only(u,!1),u.strm.avail_out===0))return BS_NEED_MORE}return u.insert=0,A===Z_FINISH$3?(flush_block_only(u,!0),u.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):u.sym_next&&(flush_block_only(u,!1),u.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_huff=(u,A)=>{let _;for(;;){if(u.lookahead===0&&(fill_window(u),u.lookahead===0)){if(A===Z_NO_FLUSH$2)return BS_NEED_MORE;break}if(u.match_length=0,_=_tr_tally(u,0,u.window[u.strstart]),u.lookahead--,u.strstart++,_&&(flush_block_only(u,!1),u.strm.avail_out===0))return BS_NEED_MORE}return u.insert=0,A===Z_FINISH$3?(flush_block_only(u,!0),u.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):u.sym_next&&(flush_block_only(u,!1),u.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE};function Config(u,A,_,q,k){this.good_length=u,this.max_lazy=A,this.nice_length=_,this.max_chain=q,this.func=k}const configuration_table=[new Config(0,0,0,0,deflate_stored),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)],lm_init=u=>{u.window_size=2*u.w_size,zero(u.head),u.max_lazy_match=configuration_table[u.level].max_lazy,u.good_match=configuration_table[u.level].good_length,u.nice_match=configuration_table[u.level].nice_length,u.max_chain_length=configuration_table[u.level].max_chain,u.strstart=0,u.block_start=0,u.lookahead=0,u.insert=0,u.match_length=u.prev_length=MIN_MATCH-1,u.match_available=0,u.ins_h=0};function DeflateState(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Z_DEFLATED$2,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(HEAP_SIZE*2),this.dyn_dtree=new Uint16Array((2*D_CODES+1)*2),this.bl_tree=new Uint16Array((2*BL_CODES+1)*2),zero(this.dyn_ltree),zero(this.dyn_dtree),zero(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(MAX_BITS+1),this.heap=new Uint16Array(2*L_CODES+1),zero(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*L_CODES+1),zero(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const deflateStateCheck=u=>{if(!u)return 1;const A=u.state;return!A||A.strm!==u||A.status!==INIT_STATE&&A.status!==GZIP_STATE&&A.status!==EXTRA_STATE&&A.status!==NAME_STATE&&A.status!==COMMENT_STATE&&A.status!==HCRC_STATE&&A.status!==BUSY_STATE&&A.status!==FINISH_STATE?1:0},deflateResetKeep=u=>{if(deflateStateCheck(u))return err(u,Z_STREAM_ERROR$2);u.total_in=u.total_out=0,u.data_type=Z_UNKNOWN;const A=u.state;return A.pending=0,A.pending_out=0,A.wrap<0&&(A.wrap=-A.wrap),A.status=A.wrap===2?GZIP_STATE:A.wrap?INIT_STATE:BUSY_STATE,u.adler=A.wrap===2?0:1,A.last_flush=-2,_tr_init(A),Z_OK$3},deflateReset=u=>{const A=deflateResetKeep(u);return A===Z_OK$3&&lm_init(u.state),A},deflateSetHeader=(u,A)=>deflateStateCheck(u)||u.state.wrap!==2?Z_STREAM_ERROR$2:(u.state.gzhead=A,Z_OK$3),deflateInit2=(u,A,_,q,k,$)=>{if(!u)return Z_STREAM_ERROR$2;let e=1;if(A===Z_DEFAULT_COMPRESSION$1&&(A=6),q<0?(e=0,q=-q):q>15&&(e=2,q-=16),k<1||k>MAX_MEM_LEVEL||_!==Z_DEFLATED$2||q<8||q>15||A<0||A>9||$<0||$>Z_FIXED||q===8&&e!==1)return err(u,Z_STREAM_ERROR$2);q===8&&(q=9);const o=new DeflateState;return u.state=o,o.strm=u,o.status=INIT_STATE,o.wrap=e,o.gzhead=null,o.w_bits=q,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=k+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+MIN_MATCH-1)/MIN_MATCH),o.window=new Uint8Array(o.w_size*2),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<k+6,o.pending_buf_size=o.lit_bufsize*4,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=(o.lit_bufsize-1)*3,o.level=A,o.strategy=$,o.method=_,deflateReset(u)},deflateInit=(u,A)=>deflateInit2(u,A,Z_DEFLATED$2,MAX_WBITS$1,DEF_MEM_LEVEL,Z_DEFAULT_STRATEGY$1),deflate$2=(u,A)=>{if(deflateStateCheck(u)||A>Z_BLOCK$1||A<0)return u?err(u,Z_STREAM_ERROR$2):Z_STREAM_ERROR$2;const _=u.state;if(!u.output||u.avail_in!==0&&!u.input||_.status===FINISH_STATE&&A!==Z_FINISH$3)return err(u,u.avail_out===0?Z_BUF_ERROR$1:Z_STREAM_ERROR$2);const q=_.last_flush;if(_.last_flush=A,_.pending!==0){if(flush_pending(u),u.avail_out===0)return _.last_flush=-1,Z_OK$3}else if(u.avail_in===0&&rank(A)<=rank(q)&&A!==Z_FINISH$3)return err(u,Z_BUF_ERROR$1);if(_.status===FINISH_STATE&&u.avail_in!==0)return err(u,Z_BUF_ERROR$1);if(_.status===INIT_STATE&&_.wrap===0&&(_.status=BUSY_STATE),_.status===INIT_STATE){let k=Z_DEFLATED$2+(_.w_bits-8<<4)<<8,$=-1;if(_.strategy>=Z_HUFFMAN_ONLY||_.level<2?$=0:_.level<6?$=1:_.level===6?$=2:$=3,k|=$<<6,_.strstart!==0&&(k|=PRESET_DICT),k+=31-k%31,putShortMSB(_,k),_.strstart!==0&&(putShortMSB(_,u.adler>>>16),putShortMSB(_,u.adler&65535)),u.adler=1,_.status=BUSY_STATE,flush_pending(u),_.pending!==0)return _.last_flush=-1,Z_OK$3}if(_.status===GZIP_STATE){if(u.adler=0,put_byte(_,31),put_byte(_,139),put_byte(_,8),_.gzhead)put_byte(_,(_.gzhead.text?1:0)+(_.gzhead.hcrc?2:0)+(_.gzhead.extra?4:0)+(_.gzhead.name?8:0)+(_.gzhead.comment?16:0)),put_byte(_,_.gzhead.time&255),put_byte(_,_.gzhead.time>>8&255),put_byte(_,_.gzhead.time>>16&255),put_byte(_,_.gzhead.time>>24&255),put_byte(_,_.level===9?2:_.strategy>=Z_HUFFMAN_ONLY||_.level<2?4:0),put_byte(_,_.gzhead.os&255),_.gzhead.extra&&_.gzhead.extra.length&&(put_byte(_,_.gzhead.extra.length&255),put_byte(_,_.gzhead.extra.length>>8&255)),_.gzhead.hcrc&&(u.adler=crc32_1(u.adler,_.pending_buf,_.pending,0)),_.gzindex=0,_.status=EXTRA_STATE;else if(put_byte(_,0),put_byte(_,0),put_byte(_,0),put_byte(_,0),put_byte(_,0),put_byte(_,_.level===9?2:_.strategy>=Z_HUFFMAN_ONLY||_.level<2?4:0),put_byte(_,OS_CODE),_.status=BUSY_STATE,flush_pending(u),_.pending!==0)return _.last_flush=-1,Z_OK$3}if(_.status===EXTRA_STATE){if(_.gzhead.extra){let k=_.pending,$=(_.gzhead.extra.length&65535)-_.gzindex;for(;_.pending+$>_.pending_buf_size;){let o=_.pending_buf_size-_.pending;if(_.pending_buf.set(_.gzhead.extra.subarray(_.gzindex,_.gzindex+o),_.pending),_.pending=_.pending_buf_size,_.gzhead.hcrc&&_.pending>k&&(u.adler=crc32_1(u.adler,_.pending_buf,_.pending-k,k)),_.gzindex+=o,flush_pending(u),_.pending!==0)return _.last_flush=-1,Z_OK$3;k=0,$-=o}let e=new Uint8Array(_.gzhead.extra);_.pending_buf.set(e.subarray(_.gzindex,_.gzindex+$),_.pending),_.pending+=$,_.gzhead.hcrc&&_.pending>k&&(u.adler=crc32_1(u.adler,_.pending_buf,_.pending-k,k)),_.gzindex=0}_.status=NAME_STATE}if(_.status===NAME_STATE){if(_.gzhead.name){let k=_.pending,$;do{if(_.pending===_.pending_buf_size){if(_.gzhead.hcrc&&_.pending>k&&(u.adler=crc32_1(u.adler,_.pending_buf,_.pending-k,k)),flush_pending(u),_.pending!==0)return _.last_flush=-1,Z_OK$3;k=0}_.gzindex<_.gzhead.name.length?$=_.gzhead.name.charCodeAt(_.gzindex++)&255:$=0,put_byte(_,$)}while($!==0);_.gzhead.hcrc&&_.pending>k&&(u.adler=crc32_1(u.adler,_.pending_buf,_.pending-k,k)),_.gzindex=0}_.status=COMMENT_STATE}if(_.status===COMMENT_STATE){if(_.gzhead.comment){let k=_.pending,$;do{if(_.pending===_.pending_buf_size){if(_.gzhead.hcrc&&_.pending>k&&(u.adler=crc32_1(u.adler,_.pending_buf,_.pending-k,k)),flush_pending(u),_.pending!==0)return _.last_flush=-1,Z_OK$3;k=0}_.gzindex<_.gzhead.comment.length?$=_.gzhead.comment.charCodeAt(_.gzindex++)&255:$=0,put_byte(_,$)}while($!==0);_.gzhead.hcrc&&_.pending>k&&(u.adler=crc32_1(u.adler,_.pending_buf,_.pending-k,k))}_.status=HCRC_STATE}if(_.status===HCRC_STATE){if(_.gzhead.hcrc){if(_.pending+2>_.pending_buf_size&&(flush_pending(u),_.pending!==0))return _.last_flush=-1,Z_OK$3;put_byte(_,u.adler&255),put_byte(_,u.adler>>8&255),u.adler=0}if(_.status=BUSY_STATE,flush_pending(u),_.pending!==0)return _.last_flush=-1,Z_OK$3}if(u.avail_in!==0||_.lookahead!==0||A!==Z_NO_FLUSH$2&&_.status!==FINISH_STATE){let k=_.level===0?deflate_stored(_,A):_.strategy===Z_HUFFMAN_ONLY?deflate_huff(_,A):_.strategy===Z_RLE?deflate_rle(_,A):configuration_table[_.level].func(_,A);if((k===BS_FINISH_STARTED||k===BS_FINISH_DONE)&&(_.status=FINISH_STATE),k===BS_NEED_MORE||k===BS_FINISH_STARTED)return u.avail_out===0&&(_.last_flush=-1),Z_OK$3;if(k===BS_BLOCK_DONE&&(A===Z_PARTIAL_FLUSH?_tr_align(_):A!==Z_BLOCK$1&&(_tr_stored_block(_,0,0,!1),A===Z_FULL_FLUSH$1&&(zero(_.head),_.lookahead===0&&(_.strstart=0,_.block_start=0,_.insert=0))),flush_pending(u),u.avail_out===0))return _.last_flush=-1,Z_OK$3}return A!==Z_FINISH$3?Z_OK$3:_.wrap<=0?Z_STREAM_END$3:(_.wrap===2?(put_byte(_,u.adler&255),put_byte(_,u.adler>>8&255),put_byte(_,u.adler>>16&255),put_byte(_,u.adler>>24&255),put_byte(_,u.total_in&255),put_byte(_,u.total_in>>8&255),put_byte(_,u.total_in>>16&255),put_byte(_,u.total_in>>24&255)):(putShortMSB(_,u.adler>>>16),putShortMSB(_,u.adler&65535)),flush_pending(u),_.wrap>0&&(_.wrap=-_.wrap),_.pending!==0?Z_OK$3:Z_STREAM_END$3)},deflateEnd=u=>{if(deflateStateCheck(u))return Z_STREAM_ERROR$2;const A=u.state.status;return u.state=null,A===BUSY_STATE?err(u,Z_DATA_ERROR$2):Z_OK$3},deflateSetDictionary=(u,A)=>{let _=A.length;if(deflateStateCheck(u))return Z_STREAM_ERROR$2;const q=u.state,k=q.wrap;if(k===2||k===1&&q.status!==INIT_STATE||q.lookahead)return Z_STREAM_ERROR$2;if(k===1&&(u.adler=adler32_1(u.adler,A,_,0)),q.wrap=0,_>=q.w_size){k===0&&(zero(q.head),q.strstart=0,q.block_start=0,q.insert=0);let I=new Uint8Array(q.w_size);I.set(A.subarray(_-q.w_size,_),0),A=I,_=q.w_size}const $=u.avail_in,e=u.next_in,o=u.input;for(u.avail_in=_,u.next_in=0,u.input=A,fill_window(q);q.lookahead>=MIN_MATCH;){let I=q.strstart,N=q.lookahead-(MIN_MATCH-1);do q.ins_h=HASH(q,q.ins_h,q.window[I+MIN_MATCH-1]),q.prev[I&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=I,I++;while(--N);q.strstart=I,q.lookahead=MIN_MATCH-1,fill_window(q)}return q.strstart+=q.lookahead,q.block_start=q.strstart,q.insert=q.lookahead,q.lookahead=0,q.match_length=q.prev_length=MIN_MATCH-1,q.match_available=0,u.next_in=e,u.input=o,u.avail_in=$,q.wrap=k,Z_OK$3};var deflateInit_1=deflateInit,deflateInit2_1=deflateInit2,deflateReset_1=deflateReset,deflateResetKeep_1=deflateResetKeep,deflateSetHeader_1=deflateSetHeader,deflate_2$1=deflate$2,deflateEnd_1=deflateEnd,deflateSetDictionary_1=deflateSetDictionary,deflateInfo="pako deflate (from Nodeca project)",deflate_1$2={deflateInit:deflateInit_1,deflateInit2:deflateInit2_1,deflateReset:deflateReset_1,deflateResetKeep:deflateResetKeep_1,deflateSetHeader:deflateSetHeader_1,deflate:deflate_2$1,deflateEnd:deflateEnd_1,deflateSetDictionary:deflateSetDictionary_1,deflateInfo};const _has=(u,A)=>Object.prototype.hasOwnProperty.call(u,A);var assign=function(u){const A=Array.prototype.slice.call(arguments,1);for(;A.length;){const _=A.shift();if(_){if(typeof _!="object")throw new TypeError(_+"must be non-object");for(const q in _)_has(_,q)&&(u[q]=_[q])}}return u},flattenChunks=u=>{let A=0;for(let q=0,k=u.length;q<k;q++)A+=u[q].length;const _=new Uint8Array(A);for(let q=0,k=0,$=u.length;q<$;q++){let e=u[q];_.set(e,k),k+=e.length}return _},common={assign,flattenChunks};let STR_APPLY_UIA_OK=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(u){STR_APPLY_UIA_OK=!1}const _utf8len=new Uint8Array(256);for(let u=0;u<256;u++)_utf8len[u]=u>=252?6:u>=248?5:u>=240?4:u>=224?3:u>=192?2:1;_utf8len[254]=_utf8len[254]=1;var string2buf=u=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(u);let A,_,q,k,$,e=u.length,o=0;for(k=0;k<e;k++)_=u.charCodeAt(k),(_&64512)===55296&&k+1<e&&(q=u.charCodeAt(k+1),(q&64512)===56320&&(_=65536+(_-55296<<10)+(q-56320),k++)),o+=_<128?1:_<2048?2:_<65536?3:4;for(A=new Uint8Array(o),$=0,k=0;$<o;k++)_=u.charCodeAt(k),(_&64512)===55296&&k+1<e&&(q=u.charCodeAt(k+1),(q&64512)===56320&&(_=65536+(_-55296<<10)+(q-56320),k++)),_<128?A[$++]=_:_<2048?(A[$++]=192|_>>>6,A[$++]=128|_&63):_<65536?(A[$++]=224|_>>>12,A[$++]=128|_>>>6&63,A[$++]=128|_&63):(A[$++]=240|_>>>18,A[$++]=128|_>>>12&63,A[$++]=128|_>>>6&63,A[$++]=128|_&63);return A};const buf2binstring=(u,A)=>{if(A<65534&&u.subarray&&STR_APPLY_UIA_OK)return String.fromCharCode.apply(null,u.length===A?u:u.subarray(0,A));let _="";for(let q=0;q<A;q++)_+=String.fromCharCode(u[q]);return _};var buf2string=(u,A)=>{const _=A||u.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(u.subarray(0,A));let q,k;const $=new Array(_*2);for(k=0,q=0;q<_;){let e=u[q++];if(e<128){$[k++]=e;continue}let o=_utf8len[e];if(o>4){$[k++]=65533,q+=o-1;continue}for(e&=o===2?31:o===3?15:7;o>1&&q<_;)e=e<<6|u[q++]&63,o--;if(o>1){$[k++]=65533;continue}e<65536?$[k++]=e:(e-=65536,$[k++]=55296|e>>10&1023,$[k++]=56320|e&1023)}return buf2binstring($,k)},utf8border=(u,A)=>{A=A||u.length,A>u.length&&(A=u.length);let _=A-1;for(;_>=0&&(u[_]&192)===128;)_--;return _<0||_===0?A:_+_utf8len[u[_]]>A?_:A},strings={string2buf,buf2string,utf8border};function ZStream(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var zstream=ZStream;const toString$1=Object.prototype.toString,{Z_NO_FLUSH:Z_NO_FLUSH$1,Z_SYNC_FLUSH,Z_FULL_FLUSH,Z_FINISH:Z_FINISH$2,Z_OK:Z_OK$2,Z_STREAM_END:Z_STREAM_END$2,Z_DEFAULT_COMPRESSION,Z_DEFAULT_STRATEGY,Z_DEFLATED:Z_DEFLATED$1}=constants$2;function Deflate$1(u){this.options=common.assign({level:Z_DEFAULT_COMPRESSION,method:Z_DEFLATED$1,chunkSize:16384,windowBits:15,memLevel:8,strategy:Z_DEFAULT_STRATEGY},u||{});let A=this.options;A.raw&&A.windowBits>0?A.windowBits=-A.windowBits:A.gzip&&A.windowBits>0&&A.windowBits<16&&(A.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let _=deflate_1$2.deflateInit2(this.strm,A.level,A.method,A.windowBits,A.memLevel,A.strategy);if(_!==Z_OK$2)throw new Error(messages[_]);if(A.header&&deflate_1$2.deflateSetHeader(this.strm,A.header),A.dictionary){let q;if(typeof A.dictionary=="string"?q=strings.string2buf(A.dictionary):toString$1.call(A.dictionary)==="[object ArrayBuffer]"?q=new Uint8Array(A.dictionary):q=A.dictionary,_=deflate_1$2.deflateSetDictionary(this.strm,q),_!==Z_OK$2)throw new Error(messages[_]);this._dict_set=!0}}Deflate$1.prototype.push=function(u,A){const _=this.strm,q=this.options.chunkSize;let k,$;if(this.ended)return!1;for(A===~~A?$=A:$=A===!0?Z_FINISH$2:Z_NO_FLUSH$1,typeof u=="string"?_.input=strings.string2buf(u):toString$1.call(u)==="[object ArrayBuffer]"?_.input=new Uint8Array(u):_.input=u,_.next_in=0,_.avail_in=_.input.length;;){if(_.avail_out===0&&(_.output=new Uint8Array(q),_.next_out=0,_.avail_out=q),($===Z_SYNC_FLUSH||$===Z_FULL_FLUSH)&&_.avail_out<=6){this.onData(_.output.subarray(0,_.next_out)),_.avail_out=0;continue}if(k=deflate_1$2.deflate(_,$),k===Z_STREAM_END$2)return _.next_out>0&&this.onData(_.output.subarray(0,_.next_out)),k=deflate_1$2.deflateEnd(this.strm),this.onEnd(k),this.ended=!0,k===Z_OK$2;if(_.avail_out===0){this.onData(_.output);continue}if($>0&&_.next_out>0){this.onData(_.output.subarray(0,_.next_out)),_.avail_out=0;continue}if(_.avail_in===0)break}return!0},Deflate$1.prototype.onData=function(u){this.chunks.push(u)},Deflate$1.prototype.onEnd=function(u){u===Z_OK$2&&(this.result=common.flattenChunks(this.chunks)),this.chunks=[],this.err=u,this.msg=this.strm.msg};function deflate$1(u,A){const _=new Deflate$1(A);if(_.push(u,!0),_.err)throw _.msg||messages[_.err];return _.result}function deflateRaw$1(u,A){return A=A||{},A.raw=!0,deflate$1(u,A)}function gzip$1(u,A){return A=A||{},A.gzip=!0,deflate$1(u,A)}var Deflate_1$1=Deflate$1,deflate_2=deflate$1,deflateRaw_1$1=deflateRaw$1,gzip_1$1=gzip$1,deflate_1$1={Deflate:Deflate_1$1,deflate:deflate_2,deflateRaw:deflateRaw_1$1,gzip:gzip_1$1};const BAD$1=16209,TYPE$1=16191;var inffast=function u(A,_){let q,k,$,e,o,I,N,D,P,U,L,Z,J,z,H,K,V,G,X,at,Y,rt,nt,tt;const et=A.state;q=A.next_in,nt=A.input,k=q+(A.avail_in-5),$=A.next_out,tt=A.output,e=$-(_-A.avail_out),o=$+(A.avail_out-257),I=et.dmax,N=et.wsize,D=et.whave,P=et.wnext,U=et.window,L=et.hold,Z=et.bits,J=et.lencode,z=et.distcode,H=(1<<et.lenbits)-1,K=(1<<et.distbits)-1;t:do{Z<15&&(L+=nt[q++]<<Z,Z+=8,L+=nt[q++]<<Z,Z+=8),V=J[L&H];e:for(;;){if(G=V>>>24,L>>>=G,Z-=G,G=V>>>16&255,G===0)tt[$++]=V&65535;else if(G&16){X=V&65535,G&=15,G&&(Z<G&&(L+=nt[q++]<<Z,Z+=8),X+=L&(1<<G)-1,L>>>=G,Z-=G),Z<15&&(L+=nt[q++]<<Z,Z+=8,L+=nt[q++]<<Z,Z+=8),V=z[L&K];i:for(;;){if(G=V>>>24,L>>>=G,Z-=G,G=V>>>16&255,G&16){if(at=V&65535,G&=15,Z<G&&(L+=nt[q++]<<Z,Z+=8,Z<G&&(L+=nt[q++]<<Z,Z+=8)),at+=L&(1<<G)-1,at>I){A.msg="invalid distance too far back",et.mode=BAD$1;break t}if(L>>>=G,Z-=G,G=$-e,at>G){if(G=at-G,G>D&&et.sane){A.msg="invalid distance too far back",et.mode=BAD$1;break t}if(Y=0,rt=U,P===0){if(Y+=N-G,G<X){X-=G;do tt[$++]=U[Y++];while(--G);Y=$-at,rt=tt}}else if(P<G){if(Y+=N+P-G,G-=P,G<X){X-=G;do tt[$++]=U[Y++];while(--G);if(Y=0,P<X){G=P,X-=G;do tt[$++]=U[Y++];while(--G);Y=$-at,rt=tt}}}else if(Y+=P-G,G<X){X-=G;do tt[$++]=U[Y++];while(--G);Y=$-at,rt=tt}for(;X>2;)tt[$++]=rt[Y++],tt[$++]=rt[Y++],tt[$++]=rt[Y++],X-=3;X&&(tt[$++]=rt[Y++],X>1&&(tt[$++]=rt[Y++]))}else{Y=$-at;do tt[$++]=tt[Y++],tt[$++]=tt[Y++],tt[$++]=tt[Y++],X-=3;while(X>2);X&&(tt[$++]=tt[Y++],X>1&&(tt[$++]=tt[Y++]))}}else if((G&64)===0){V=z[(V&65535)+(L&(1<<G)-1)];continue i}else{A.msg="invalid distance code",et.mode=BAD$1;break t}break}}else if((G&64)===0){V=J[(V&65535)+(L&(1<<G)-1)];continue e}else if(G&32){et.mode=TYPE$1;break t}else{A.msg="invalid literal/length code",et.mode=BAD$1;break t}break}}while(q<k&&$<o);X=Z>>3,q-=X,Z-=X<<3,L&=(1<<Z)-1,A.next_in=q,A.next_out=$,A.avail_in=q<k?5+(k-q):5-(q-k),A.avail_out=$<o?257+(o-$):257-($-o),et.hold=L,et.bits=Z};const MAXBITS=15,ENOUGH_LENS$1=852,ENOUGH_DISTS$1=592,CODES$1=0,LENS$1=1,DISTS$1=2,lbase=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),lext=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),dbase=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),dext=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),inflate_table=(u,A,_,q,k,$,e,o)=>{const I=o.bits;let N=0,D=0,P=0,U=0,L=0,Z=0,J=0,z=0,H=0,K=0,V,G,X,at,Y,rt=null,nt;const tt=new Uint16Array(MAXBITS+1),et=new Uint16Array(MAXBITS+1);let vt=null,Jt,Ht,zt;for(N=0;N<=MAXBITS;N++)tt[N]=0;for(D=0;D<q;D++)tt[A[_+D]]++;for(L=I,U=MAXBITS;U>=1&&tt[U]===0;U--);if(L>U&&(L=U),U===0)return k[$++]=1<<24|64<<16|0,k[$++]=1<<24|64<<16|0,o.bits=1,0;for(P=1;P<U&&tt[P]===0;P++);for(L<P&&(L=P),z=1,N=1;N<=MAXBITS;N++)if(z<<=1,z-=tt[N],z<0)return-1;if(z>0&&(u===CODES$1||U!==1))return-1;for(et[1]=0,N=1;N<MAXBITS;N++)et[N+1]=et[N]+tt[N];for(D=0;D<q;D++)A[_+D]!==0&&(e[et[A[_+D]]++]=D);if(u===CODES$1?(rt=vt=e,nt=20):u===LENS$1?(rt=lbase,vt=lext,nt=257):(rt=dbase,vt=dext,nt=0),K=0,D=0,N=P,Y=$,Z=L,J=0,X=-1,H=1<<L,at=H-1,u===LENS$1&&H>ENOUGH_LENS$1||u===DISTS$1&&H>ENOUGH_DISTS$1)return 1;for(;;){Jt=N-J,e[D]+1<nt?(Ht=0,zt=e[D]):e[D]>=nt?(Ht=vt[e[D]-nt],zt=rt[e[D]-nt]):(Ht=96,zt=0),V=1<<N-J,G=1<<Z,P=G;do G-=V,k[Y+(K>>J)+G]=Jt<<24|Ht<<16|zt|0;while(G!==0);for(V=1<<N-1;K&V;)V>>=1;if(V!==0?(K&=V-1,K+=V):K=0,D++,--tt[N]===0){if(N===U)break;N=A[_+e[D]]}if(N>L&&(K&at)!==X){for(J===0&&(J=L),Y+=P,Z=N-J,z=1<<Z;Z+J<U&&(z-=tt[Z+J],!(z<=0));)Z++,z<<=1;if(H+=1<<Z,u===LENS$1&&H>ENOUGH_LENS$1||u===DISTS$1&&H>ENOUGH_DISTS$1)return 1;X=K&at,k[X]=L<<24|Z<<16|Y-$|0}}return K!==0&&(k[Y+K]=N-J<<24|64<<16|0),o.bits=L,0};var inftrees=inflate_table;const CODES=0,LENS=1,DISTS=2,{Z_FINISH:Z_FINISH$1,Z_BLOCK,Z_TREES,Z_OK:Z_OK$1,Z_STREAM_END:Z_STREAM_END$1,Z_NEED_DICT:Z_NEED_DICT$1,Z_STREAM_ERROR:Z_STREAM_ERROR$1,Z_DATA_ERROR:Z_DATA_ERROR$1,Z_MEM_ERROR:Z_MEM_ERROR$1,Z_BUF_ERROR,Z_DEFLATED}=constants$2,HEAD=16180,FLAGS=16181,TIME=16182,OS=16183,EXLEN=16184,EXTRA=16185,NAME=16186,COMMENT=16187,HCRC=16188,DICTID=16189,DICT=16190,TYPE=16191,TYPEDO=16192,STORED=16193,COPY_=16194,COPY=16195,TABLE=16196,LENLENS=16197,CODELENS=16198,LEN_=16199,LEN=16200,LENEXT=16201,DIST=16202,DISTEXT=16203,MATCH=16204,LIT=16205,CHECK=16206,LENGTH=16207,DONE=16208,BAD=16209,MEM=16210,SYNC=16211,ENOUGH_LENS=852,ENOUGH_DISTS=592,MAX_WBITS=15,DEF_WBITS=MAX_WBITS,zswap32=u=>(u>>>24&255)+(u>>>8&65280)+((u&65280)<<8)+((u&255)<<24);function InflateState(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const inflateStateCheck=u=>{if(!u)return 1;const A=u.state;return!A||A.strm!==u||A.mode<HEAD||A.mode>SYNC?1:0},inflateResetKeep=u=>{if(inflateStateCheck(u))return Z_STREAM_ERROR$1;const A=u.state;return u.total_in=u.total_out=A.total=0,u.msg="",A.wrap&&(u.adler=A.wrap&1),A.mode=HEAD,A.last=0,A.havedict=0,A.flags=-1,A.dmax=32768,A.head=null,A.hold=0,A.bits=0,A.lencode=A.lendyn=new Int32Array(ENOUGH_LENS),A.distcode=A.distdyn=new Int32Array(ENOUGH_DISTS),A.sane=1,A.back=-1,Z_OK$1},inflateReset=u=>{if(inflateStateCheck(u))return Z_STREAM_ERROR$1;const A=u.state;return A.wsize=0,A.whave=0,A.wnext=0,inflateResetKeep(u)},inflateReset2=(u,A)=>{let _;if(inflateStateCheck(u))return Z_STREAM_ERROR$1;const q=u.state;return A<0?(_=0,A=-A):(_=(A>>4)+5,A<48&&(A&=15)),A&&(A<8||A>15)?Z_STREAM_ERROR$1:(q.window!==null&&q.wbits!==A&&(q.window=null),q.wrap=_,q.wbits=A,inflateReset(u))},inflateInit2=(u,A)=>{if(!u)return Z_STREAM_ERROR$1;const _=new InflateState;u.state=_,_.strm=u,_.window=null,_.mode=HEAD;const q=inflateReset2(u,A);return q!==Z_OK$1&&(u.state=null),q},inflateInit=u=>inflateInit2(u,DEF_WBITS);let virgin=!0,lenfix,distfix;const fixedtables=u=>{if(virgin){lenfix=new Int32Array(512),distfix=new Int32Array(32);let A=0;for(;A<144;)u.lens[A++]=8;for(;A<256;)u.lens[A++]=9;for(;A<280;)u.lens[A++]=7;for(;A<288;)u.lens[A++]=8;for(inftrees(LENS,u.lens,0,288,lenfix,0,u.work,{bits:9}),A=0;A<32;)u.lens[A++]=5;inftrees(DISTS,u.lens,0,32,distfix,0,u.work,{bits:5}),virgin=!1}u.lencode=lenfix,u.lenbits=9,u.distcode=distfix,u.distbits=5},updatewindow=(u,A,_,q)=>{let k;const $=u.state;return $.window===null&&($.wsize=1<<$.wbits,$.wnext=0,$.whave=0,$.window=new Uint8Array($.wsize)),q>=$.wsize?($.window.set(A.subarray(_-$.wsize,_),0),$.wnext=0,$.whave=$.wsize):(k=$.wsize-$.wnext,k>q&&(k=q),$.window.set(A.subarray(_-q,_-q+k),$.wnext),q-=k,q?($.window.set(A.subarray(_-q,_),0),$.wnext=q,$.whave=$.wsize):($.wnext+=k,$.wnext===$.wsize&&($.wnext=0),$.whave<$.wsize&&($.whave+=k))),0},inflate$2=(u,A)=>{let _,q,k,$,e,o,I,N,D,P,U,L,Z,J,z=0,H,K,V,G,X,at,Y,rt;const nt=new Uint8Array(4);let tt,et;const vt=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(inflateStateCheck(u)||!u.output||!u.input&&u.avail_in!==0)return Z_STREAM_ERROR$1;_=u.state,_.mode===TYPE&&(_.mode=TYPEDO),e=u.next_out,k=u.output,I=u.avail_out,$=u.next_in,q=u.input,o=u.avail_in,N=_.hold,D=_.bits,P=o,U=I,rt=Z_OK$1;t:for(;;)switch(_.mode){case HEAD:if(_.wrap===0){_.mode=TYPEDO;break}for(;D<16;){if(o===0)break t;o--,N+=q[$++]<<D,D+=8}if(_.wrap&2&&N===35615){_.wbits===0&&(_.wbits=15),_.check=0,nt[0]=N&255,nt[1]=N>>>8&255,_.check=crc32_1(_.check,nt,2,0),N=0,D=0,_.mode=FLAGS;break}if(_.head&&(_.head.done=!1),!(_.wrap&1)||(((N&255)<<8)+(N>>8))%31){u.msg="incorrect header check",_.mode=BAD;break}if((N&15)!==Z_DEFLATED){u.msg="unknown compression method",_.mode=BAD;break}if(N>>>=4,D-=4,Y=(N&15)+8,_.wbits===0&&(_.wbits=Y),Y>15||Y>_.wbits){u.msg="invalid window size",_.mode=BAD;break}_.dmax=1<<_.wbits,_.flags=0,u.adler=_.check=1,_.mode=N&512?DICTID:TYPE,N=0,D=0;break;case FLAGS:for(;D<16;){if(o===0)break t;o--,N+=q[$++]<<D,D+=8}if(_.flags=N,(_.flags&255)!==Z_DEFLATED){u.msg="unknown compression method",_.mode=BAD;break}if(_.flags&57344){u.msg="unknown header flags set",_.mode=BAD;break}_.head&&(_.head.text=N>>8&1),_.flags&512&&_.wrap&4&&(nt[0]=N&255,nt[1]=N>>>8&255,_.check=crc32_1(_.check,nt,2,0)),N=0,D=0,_.mode=TIME;case TIME:for(;D<32;){if(o===0)break t;o--,N+=q[$++]<<D,D+=8}_.head&&(_.head.time=N),_.flags&512&&_.wrap&4&&(nt[0]=N&255,nt[1]=N>>>8&255,nt[2]=N>>>16&255,nt[3]=N>>>24&255,_.check=crc32_1(_.check,nt,4,0)),N=0,D=0,_.mode=OS;case OS:for(;D<16;){if(o===0)break t;o--,N+=q[$++]<<D,D+=8}_.head&&(_.head.xflags=N&255,_.head.os=N>>8),_.flags&512&&_.wrap&4&&(nt[0]=N&255,nt[1]=N>>>8&255,_.check=crc32_1(_.check,nt,2,0)),N=0,D=0,_.mode=EXLEN;case EXLEN:if(_.flags&1024){for(;D<16;){if(o===0)break t;o--,N+=q[$++]<<D,D+=8}_.length=N,_.head&&(_.head.extra_len=N),_.flags&512&&_.wrap&4&&(nt[0]=N&255,nt[1]=N>>>8&255,_.check=crc32_1(_.check,nt,2,0)),N=0,D=0}else _.head&&(_.head.extra=null);_.mode=EXTRA;case EXTRA:if(_.flags&1024&&(L=_.length,L>o&&(L=o),L&&(_.head&&(Y=_.head.extra_len-_.length,_.head.extra||(_.head.extra=new Uint8Array(_.head.extra_len)),_.head.extra.set(q.subarray($,$+L),Y)),_.flags&512&&_.wrap&4&&(_.check=crc32_1(_.check,q,L,$)),o-=L,$+=L,_.length-=L),_.length))break t;_.length=0,_.mode=NAME;case NAME:if(_.flags&2048){if(o===0)break t;L=0;do Y=q[$+L++],_.head&&Y&&_.length<65536&&(_.head.name+=String.fromCharCode(Y));while(Y&&L<o);if(_.flags&512&&_.wrap&4&&(_.check=crc32_1(_.check,q,L,$)),o-=L,$+=L,Y)break t}else _.head&&(_.head.name=null);_.length=0,_.mode=COMMENT;case COMMENT:if(_.flags&4096){if(o===0)break t;L=0;do Y=q[$+L++],_.head&&Y&&_.length<65536&&(_.head.comment+=String.fromCharCode(Y));while(Y&&L<o);if(_.flags&512&&_.wrap&4&&(_.check=crc32_1(_.check,q,L,$)),o-=L,$+=L,Y)break t}else _.head&&(_.head.comment=null);_.mode=HCRC;case HCRC:if(_.flags&512){for(;D<16;){if(o===0)break t;o--,N+=q[$++]<<D,D+=8}if(_.wrap&4&&N!==(_.check&65535)){u.msg="header crc mismatch",_.mode=BAD;break}N=0,D=0}_.head&&(_.head.hcrc=_.flags>>9&1,_.head.done=!0),u.adler=_.check=0,_.mode=TYPE;break;case DICTID:for(;D<32;){if(o===0)break t;o--,N+=q[$++]<<D,D+=8}u.adler=_.check=zswap32(N),N=0,D=0,_.mode=DICT;case DICT:if(_.havedict===0)return u.next_out=e,u.avail_out=I,u.next_in=$,u.avail_in=o,_.hold=N,_.bits=D,Z_NEED_DICT$1;u.adler=_.check=1,_.mode=TYPE;case TYPE:if(A===Z_BLOCK||A===Z_TREES)break t;case TYPEDO:if(_.last){N>>>=D&7,D-=D&7,_.mode=CHECK;break}for(;D<3;){if(o===0)break t;o--,N+=q[$++]<<D,D+=8}switch(_.last=N&1,N>>>=1,D-=1,N&3){case 0:_.mode=STORED;break;case 1:if(fixedtables(_),_.mode=LEN_,A===Z_TREES){N>>>=2,D-=2;break t}break;case 2:_.mode=TABLE;break;case 3:u.msg="invalid block type",_.mode=BAD}N>>>=2,D-=2;break;case STORED:for(N>>>=D&7,D-=D&7;D<32;){if(o===0)break t;o--,N+=q[$++]<<D,D+=8}if((N&65535)!==(N>>>16^65535)){u.msg="invalid stored block lengths",_.mode=BAD;break}if(_.length=N&65535,N=0,D=0,_.mode=COPY_,A===Z_TREES)break t;case COPY_:_.mode=COPY;case COPY:if(L=_.length,L){if(L>o&&(L=o),L>I&&(L=I),L===0)break t;k.set(q.subarray($,$+L),e),o-=L,$+=L,I-=L,e+=L,_.length-=L;break}_.mode=TYPE;break;case TABLE:for(;D<14;){if(o===0)break t;o--,N+=q[$++]<<D,D+=8}if(_.nlen=(N&31)+257,N>>>=5,D-=5,_.ndist=(N&31)+1,N>>>=5,D-=5,_.ncode=(N&15)+4,N>>>=4,D-=4,_.nlen>286||_.ndist>30){u.msg="too many length or distance symbols",_.mode=BAD;break}_.have=0,_.mode=LENLENS;case LENLENS:for(;_.have<_.ncode;){for(;D<3;){if(o===0)break t;o--,N+=q[$++]<<D,D+=8}_.lens[vt[_.have++]]=N&7,N>>>=3,D-=3}for(;_.have<19;)_.lens[vt[_.have++]]=0;if(_.lencode=_.lendyn,_.lenbits=7,tt={bits:_.lenbits},rt=inftrees(CODES,_.lens,0,19,_.lencode,0,_.work,tt),_.lenbits=tt.bits,rt){u.msg="invalid code lengths set",_.mode=BAD;break}_.have=0,_.mode=CODELENS;case CODELENS:for(;_.have<_.nlen+_.ndist;){for(;z=_.lencode[N&(1<<_.lenbits)-1],H=z>>>24,K=z>>>16&255,V=z&65535,!(H<=D);){if(o===0)break t;o--,N+=q[$++]<<D,D+=8}if(V<16)N>>>=H,D-=H,_.lens[_.have++]=V;else{if(V===16){for(et=H+2;D<et;){if(o===0)break t;o--,N+=q[$++]<<D,D+=8}if(N>>>=H,D-=H,_.have===0){u.msg="invalid bit length repeat",_.mode=BAD;break}Y=_.lens[_.have-1],L=3+(N&3),N>>>=2,D-=2}else if(V===17){for(et=H+3;D<et;){if(o===0)break t;o--,N+=q[$++]<<D,D+=8}N>>>=H,D-=H,Y=0,L=3+(N&7),N>>>=3,D-=3}else{for(et=H+7;D<et;){if(o===0)break t;o--,N+=q[$++]<<D,D+=8}N>>>=H,D-=H,Y=0,L=11+(N&127),N>>>=7,D-=7}if(_.have+L>_.nlen+_.ndist){u.msg="invalid bit length repeat",_.mode=BAD;break}for(;L--;)_.lens[_.have++]=Y}}if(_.mode===BAD)break;if(_.lens[256]===0){u.msg="invalid code -- missing end-of-block",_.mode=BAD;break}if(_.lenbits=9,tt={bits:_.lenbits},rt=inftrees(LENS,_.lens,0,_.nlen,_.lencode,0,_.work,tt),_.lenbits=tt.bits,rt){u.msg="invalid literal/lengths set",_.mode=BAD;break}if(_.distbits=6,_.distcode=_.distdyn,tt={bits:_.distbits},rt=inftrees(DISTS,_.lens,_.nlen,_.ndist,_.distcode,0,_.work,tt),_.distbits=tt.bits,rt){u.msg="invalid distances set",_.mode=BAD;break}if(_.mode=LEN_,A===Z_TREES)break t;case LEN_:_.mode=LEN;case LEN:if(o>=6&&I>=258){u.next_out=e,u.avail_out=I,u.next_in=$,u.avail_in=o,_.hold=N,_.bits=D,inffast(u,U),e=u.next_out,k=u.output,I=u.avail_out,$=u.next_in,q=u.input,o=u.avail_in,N=_.hold,D=_.bits,_.mode===TYPE&&(_.back=-1);break}for(_.back=0;z=_.lencode[N&(1<<_.lenbits)-1],H=z>>>24,K=z>>>16&255,V=z&65535,!(H<=D);){if(o===0)break t;o--,N+=q[$++]<<D,D+=8}if(K&&(K&240)===0){for(G=H,X=K,at=V;z=_.lencode[at+((N&(1<<G+X)-1)>>G)],H=z>>>24,K=z>>>16&255,V=z&65535,!(G+H<=D);){if(o===0)break t;o--,N+=q[$++]<<D,D+=8}N>>>=G,D-=G,_.back+=G}if(N>>>=H,D-=H,_.back+=H,_.length=V,K===0){_.mode=LIT;break}if(K&32){_.back=-1,_.mode=TYPE;break}if(K&64){u.msg="invalid literal/length code",_.mode=BAD;break}_.extra=K&15,_.mode=LENEXT;case LENEXT:if(_.extra){for(et=_.extra;D<et;){if(o===0)break t;o--,N+=q[$++]<<D,D+=8}_.length+=N&(1<<_.extra)-1,N>>>=_.extra,D-=_.extra,_.back+=_.extra}_.was=_.length,_.mode=DIST;case DIST:for(;z=_.distcode[N&(1<<_.distbits)-1],H=z>>>24,K=z>>>16&255,V=z&65535,!(H<=D);){if(o===0)break t;o--,N+=q[$++]<<D,D+=8}if((K&240)===0){for(G=H,X=K,at=V;z=_.distcode[at+((N&(1<<G+X)-1)>>G)],H=z>>>24,K=z>>>16&255,V=z&65535,!(G+H<=D);){if(o===0)break t;o--,N+=q[$++]<<D,D+=8}N>>>=G,D-=G,_.back+=G}if(N>>>=H,D-=H,_.back+=H,K&64){u.msg="invalid distance code",_.mode=BAD;break}_.offset=V,_.extra=K&15,_.mode=DISTEXT;case DISTEXT:if(_.extra){for(et=_.extra;D<et;){if(o===0)break t;o--,N+=q[$++]<<D,D+=8}_.offset+=N&(1<<_.extra)-1,N>>>=_.extra,D-=_.extra,_.back+=_.extra}if(_.offset>_.dmax){u.msg="invalid distance too far back",_.mode=BAD;break}_.mode=MATCH;case MATCH:if(I===0)break t;if(L=U-I,_.offset>L){if(L=_.offset-L,L>_.whave&&_.sane){u.msg="invalid distance too far back",_.mode=BAD;break}L>_.wnext?(L-=_.wnext,Z=_.wsize-L):Z=_.wnext-L,L>_.length&&(L=_.length),J=_.window}else J=k,Z=e-_.offset,L=_.length;L>I&&(L=I),I-=L,_.length-=L;do k[e++]=J[Z++];while(--L);_.length===0&&(_.mode=LEN);break;case LIT:if(I===0)break t;k[e++]=_.length,I--,_.mode=LEN;break;case CHECK:if(_.wrap){for(;D<32;){if(o===0)break t;o--,N|=q[$++]<<D,D+=8}if(U-=I,u.total_out+=U,_.total+=U,_.wrap&4&&U&&(u.adler=_.check=_.flags?crc32_1(_.check,k,U,e-U):adler32_1(_.check,k,U,e-U)),U=I,_.wrap&4&&(_.flags?N:zswap32(N))!==_.check){u.msg="incorrect data check",_.mode=BAD;break}N=0,D=0}_.mode=LENGTH;case LENGTH:if(_.wrap&&_.flags){for(;D<32;){if(o===0)break t;o--,N+=q[$++]<<D,D+=8}if(_.wrap&4&&N!==(_.total&4294967295)){u.msg="incorrect length check",_.mode=BAD;break}N=0,D=0}_.mode=DONE;case DONE:rt=Z_STREAM_END$1;break t;case BAD:rt=Z_DATA_ERROR$1;break t;case MEM:return Z_MEM_ERROR$1;case SYNC:default:return Z_STREAM_ERROR$1}return u.next_out=e,u.avail_out=I,u.next_in=$,u.avail_in=o,_.hold=N,_.bits=D,(_.wsize||U!==u.avail_out&&_.mode<BAD&&(_.mode<CHECK||A!==Z_FINISH$1))&&updatewindow(u,u.output,u.next_out,U-u.avail_out),P-=u.avail_in,U-=u.avail_out,u.total_in+=P,u.total_out+=U,_.total+=U,_.wrap&4&&U&&(u.adler=_.check=_.flags?crc32_1(_.check,k,U,u.next_out-U):adler32_1(_.check,k,U,u.next_out-U)),u.data_type=_.bits+(_.last?64:0)+(_.mode===TYPE?128:0)+(_.mode===LEN_||_.mode===COPY_?256:0),(P===0&&U===0||A===Z_FINISH$1)&&rt===Z_OK$1&&(rt=Z_BUF_ERROR),rt},inflateEnd=u=>{if(inflateStateCheck(u))return Z_STREAM_ERROR$1;let A=u.state;return A.window&&(A.window=null),u.state=null,Z_OK$1},inflateGetHeader=(u,A)=>{if(inflateStateCheck(u))return Z_STREAM_ERROR$1;const _=u.state;return(_.wrap&2)===0?Z_STREAM_ERROR$1:(_.head=A,A.done=!1,Z_OK$1)},inflateSetDictionary=(u,A)=>{const _=A.length;let q,k,$;return inflateStateCheck(u)||(q=u.state,q.wrap!==0&&q.mode!==DICT)?Z_STREAM_ERROR$1:q.mode===DICT&&(k=1,k=adler32_1(k,A,_,0),k!==q.check)?Z_DATA_ERROR$1:($=updatewindow(u,A,_,_),$?(q.mode=MEM,Z_MEM_ERROR$1):(q.havedict=1,Z_OK$1))};var inflateReset_1=inflateReset,inflateReset2_1=inflateReset2,inflateResetKeep_1=inflateResetKeep,inflateInit_1=inflateInit,inflateInit2_1=inflateInit2,inflate_2$1=inflate$2,inflateEnd_1=inflateEnd,inflateGetHeader_1=inflateGetHeader,inflateSetDictionary_1=inflateSetDictionary,inflateInfo="pako inflate (from Nodeca project)",inflate_1$2={inflateReset:inflateReset_1,inflateReset2:inflateReset2_1,inflateResetKeep:inflateResetKeep_1,inflateInit:inflateInit_1,inflateInit2:inflateInit2_1,inflate:inflate_2$1,inflateEnd:inflateEnd_1,inflateGetHeader:inflateGetHeader_1,inflateSetDictionary:inflateSetDictionary_1,inflateInfo};function GZheader(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var gzheader=GZheader;const toString=Object.prototype.toString,{Z_NO_FLUSH,Z_FINISH,Z_OK,Z_STREAM_END,Z_NEED_DICT,Z_STREAM_ERROR,Z_DATA_ERROR,Z_MEM_ERROR}=constants$2;function Inflate$1(u){this.options=common.assign({chunkSize:1024*64,windowBits:15,to:""},u||{});const A=this.options;A.raw&&A.windowBits>=0&&A.windowBits<16&&(A.windowBits=-A.windowBits,A.windowBits===0&&(A.windowBits=-15)),A.windowBits>=0&&A.windowBits<16&&!(u&&u.windowBits)&&(A.windowBits+=32),A.windowBits>15&&A.windowBits<48&&(A.windowBits&15)===0&&(A.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let _=inflate_1$2.inflateInit2(this.strm,A.windowBits);if(_!==Z_OK)throw new Error(messages[_]);if(this.header=new gzheader,inflate_1$2.inflateGetHeader(this.strm,this.header),A.dictionary&&(typeof A.dictionary=="string"?A.dictionary=strings.string2buf(A.dictionary):toString.call(A.dictionary)==="[object ArrayBuffer]"&&(A.dictionary=new Uint8Array(A.dictionary)),A.raw&&(_=inflate_1$2.inflateSetDictionary(this.strm,A.dictionary),_!==Z_OK)))throw new Error(messages[_])}Inflate$1.prototype.push=function(u,A){const _=this.strm,q=this.options.chunkSize,k=this.options.dictionary;let $,e,o;if(this.ended)return!1;for(A===~~A?e=A:e=A===!0?Z_FINISH:Z_NO_FLUSH,toString.call(u)==="[object ArrayBuffer]"?_.input=new Uint8Array(u):_.input=u,_.next_in=0,_.avail_in=_.input.length;;){for(_.avail_out===0&&(_.output=new Uint8Array(q),_.next_out=0,_.avail_out=q),$=inflate_1$2.inflate(_,e),$===Z_NEED_DICT&&k&&($=inflate_1$2.inflateSetDictionary(_,k),$===Z_OK?$=inflate_1$2.inflate(_,e):$===Z_DATA_ERROR&&($=Z_NEED_DICT));_.avail_in>0&&$===Z_STREAM_END&&_.state.wrap>0&&u[_.next_in]!==0;)inflate_1$2.inflateReset(_),$=inflate_1$2.inflate(_,e);switch($){case Z_STREAM_ERROR:case Z_DATA_ERROR:case Z_NEED_DICT:case Z_MEM_ERROR:return this.onEnd($),this.ended=!0,!1}if(o=_.avail_out,_.next_out&&(_.avail_out===0||$===Z_STREAM_END))if(this.options.to==="string"){let I=strings.utf8border(_.output,_.next_out),N=_.next_out-I,D=strings.buf2string(_.output,I);_.next_out=N,_.avail_out=q-N,N&&_.output.set(_.output.subarray(I,I+N),0),this.onData(D)}else this.onData(_.output.length===_.next_out?_.output:_.output.subarray(0,_.next_out));if(!($===Z_OK&&o===0)){if($===Z_STREAM_END)return $=inflate_1$2.inflateEnd(this.strm),this.onEnd($),this.ended=!0,!0;if(_.avail_in===0)break}}return!0},Inflate$1.prototype.onData=function(u){this.chunks.push(u)},Inflate$1.prototype.onEnd=function(u){u===Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=common.flattenChunks(this.chunks)),this.chunks=[],this.err=u,this.msg=this.strm.msg};function inflate$1(u,A){const _=new Inflate$1(A);if(_.push(u),_.err)throw _.msg||messages[_.err];return _.result}function inflateRaw$1(u,A){return A=A||{},A.raw=!0,inflate$1(u,A)}var Inflate_1$1=Inflate$1,inflate_2=inflate$1,inflateRaw_1$1=inflateRaw$1,ungzip$1=inflate$1,inflate_1$1={Inflate:Inflate_1$1,inflate:inflate_2,inflateRaw:inflateRaw_1$1,ungzip:ungzip$1};const{Deflate,deflate,deflateRaw,gzip}=deflate_1$1,{Inflate,inflate,inflateRaw,ungzip}=inflate_1$1;var Deflate_1=Deflate,deflate_1=deflate,deflateRaw_1=deflateRaw,gzip_1=gzip,Inflate_1=Inflate,inflate_1=inflate,inflateRaw_1=inflateRaw,ungzip_1=ungzip,constants_1=constants$2,pako={Deflate:Deflate_1,deflate:deflate_1,deflateRaw:deflateRaw_1,gzip:gzip_1,Inflate:Inflate_1,inflate:inflate_1,inflateRaw:inflateRaw_1,ungzip:ungzip_1,constants:constants_1};const noLogEvents=["heartbeat","onNetQuality","networkQualityChange"],compressArrayBuffer=u=>{const A=new Uint8Array(u),_=pako.deflate(A,{gzip:!0});return new Uint8Array(_==null?void 0:_.buffer)},decompressArrayBuffer=u=>{const A=new Uint8Array(u),_=pako.inflate(A,{gzip:!0});return new Uint8Array(_==null?void 0:_.buffer)},sendMessageFormat=u=>{const{event:A}=u;switch(u.data_original=u.data,u.time&&(u.timeStr=E(u.time,"YYYY-MM-DD hh:mm:ss",{offset:480})),A){case"login":u.data=com.quick.voice.proto.Login.encode(u.data).finish();break;case"joinRoom":case"joinRoomEx":u.data=com.quick.voice.proto.JoinReq.encode(u.data).finish();break;case"quitRoom":u.data=com.quick.voice.proto.QuitReq.encode(u.data).finish();break;case"connectCF":u.data=com.quick.voice.proto.ConnectCFReq.encode(u.data).finish(),u.data=compressArrayBuffer(u.data),u.compress=!0;break;case"publish":u.data=com.quick.voice.proto.PublishReq.encode(u.data).finish(),u.data=compressArrayBuffer(u.data),u.compress=!0;break;case"subscribe":u.data=com.quick.voice.proto.SubscribeReq.encode(u.data).finish();break;case"closeTrack":u.data=com.quick.voice.proto.CloseTrackReq.encode(u.data).finish(),u.data=compressArrayBuffer(u.data),u.compress=!0;break;case"renegotiate":u.data=com.quick.voice.proto.RenegotiateReq.encode(u.data).finish(),u.data=compressArrayBuffer(u.data),u.compress=!0;break;case"syncRoomInfo":u.data=com.quick.voice.proto.SyncRoomInfoReq.encode(u.data).finish();break;case"updateCall":u.data=com.quick.voice.proto.UpdateCall.encode(u.data).finish();break;case"networkQualityChange":u.data=com.quick.voice.proto.NetQualityChange.encode(u.data).finish();break;case"pubNotify":u.data=com.quick.voice.proto.PublishNotify.encode(u.data).finish();break;default:u.data=new Uint8Array;break}return u},onMessageFormat=u=>{const{event:A,compress:_=!1}=u;if(u.data_remote=u.data,u.time&&(u.timeStr=E(u.time,"YYYY-MM-DD hh:mm:ss",{offset:480})),_)try{u.data=decompressArrayBuffer(u.data)}catch(q){console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo:消息解压错误",q)}switch(A){case"login":u.data=com.quick.voice.proto.Login.decode(u.data);break;case"joinRoom":case"joinRoomEx":u.data=com.quick.voice.proto.JoinRsp.decode(u.data);break;case"onJoinRoom":u.data=com.quick.voice.proto.JoinNotify.decode(u.data);break;case"onQuitRoom":u.data=com.quick.voice.proto.QuitNotify.decode(u.data);break;case"connectCF":u.data=com.quick.voice.proto.ConnectCFRsp.decode(u.data);break;case"publish":u.data=com.quick.voice.proto.PublishRsp.decode(u.data);break;case"onPublish":u.data=com.quick.voice.proto.PublishNotify.decode(u.data);break;case"subscribe":u.data=com.quick.voice.proto.SubscribeRsp.decode(u.data);break;case"closeTrack":u.data=com.quick.voice.proto.CloseTrackRsp.decode(u.data);break;case"onCloseTrack":u.data=com.quick.voice.proto.CloseTrackNotify.decode(u.data);break;case"onUpdateCall":u.data=com.quick.voice.proto.UpdateCall.decode(u.data);break;case"onDestroyRoom":u.data=com.quick.voice.proto.QuitNotify.decode(u.data);break;case"onUpdatePermissions":u.data=com.quick.voice.proto.UpdatePermissions.decode(u.data);break;case"onNetQuality":u.data=com.quick.voice.proto.NetQualityNotify.decode(u.data);break;case"syncRoomInfo":u.data=com.quick.voice.proto.SyncRoomInfoRsp.decode(u.data);break;case"onCDNPlayUrlAdd":u.data=com.quick.voice.proto.CDNPlayAddressNotify.decode(u.data);break;case"debugger":u.data=JSON.parse(new TextDecoder().decode(u.data));break}return u};class CallsWebSocket{constructor(A){st(this,ct);st(this,ot,{url:"wss://demo.putplay.cc/websocket",debug:!1,reconnectCount:10,timeout:30*1e3});st(this,lt,"");st(this,ft,{});st(this,dt,{});F(this,"state","closed");F(this,"sendMessageBefore",async()=>{});F(this,"onReconnectSuccess",A=>{});F(this,"onReconnectStop",A=>{});st(this,$t,A=>{let _=!0;const{code:q=1e3,reason:k=""}=A;return q===1e3&&(k==="quit success!"||k==="replace old connection!")&&(_=!1),_});st(this,Tt,async A=>{W(this,ot).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 重连成功",A),this.state="connected",this.onReconnectSuccess(A)});st(this,It,async A=>{W(this,ot).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 重连停止",A),this.close(),this.state="closed",this.onReconnectStop(A)});st(this,Rt,()=>{const A={event:"heartbeat",sn:+`${O(1e5,999999)}`};return com.quick.voice.proto.CommonReq.encode(A).finish()});st(this,Ot,(A,_={})=>{try{const{time:q,event:k,data:$={},data_original:e={},data_remote:o,...I}=_,N=E(q,"YYYY-MM-DD hh:mm:ss",{offset:480});let D={};const P=(K={})=>{const V=JSON.parse(JSON.stringify(K)),G=Object.keys(V);for(const X of G)(X.includes("sdp")||X.includes("Sdp"))&&(V[X]="");return V};let U="res ↓";switch(A){case"res":U="res ↓",D=P($);break;case"req":U="req ↑",D=P(e);break}let L="#quickvo.logs";ignoreEvent.includes(k)&&(L="#quickvo.ignoreEvents");const Z={"#action":U,timeStr:N,event:k,data:D,time:q,...I},J=localStorage.getItem(L)||JSON.stringify([]),z=JSON.parse(J),H=[Z,...z].slice(0,500);localStorage.setItem(L,JSON.stringify(H))}catch(q){console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: updataLogs is error",q)}});st(this,Et,(A,{resolve:_,reject:q})=>{const{sn:k}=A,$=()=>{const o=W(this,ft)[k];clearTimeout(o.destructionTimer),delete W(this,ft)[k]},e=setTimeout(()=>{const o=W(this,ft)[k];console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo:event is timeout",o.message),$(),q("event is timeout")},W(this,ot).timeout);W(this,ft)[k]={message:A,resolve:_,reject:q,destruction:$,destructionTimer:e}});st(this,xt,A=>W(this,ft)[A]);st(this,Nt,async A=>{const _=new Uint8Array(A),q=com.quick.voice.proto.CommonRsp.decode(_),{sn:k,event:$}=q,e=onMessageFormat(q);if(W(this,ot).debug&&(noLogEvents.includes($)||console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ff0097;padding:16px 0;","------->quickvo: 响应消息↓",e),ignoreEvent.includes($)||W(this,Ot).call(this,"res",e)),notifyName_keys.includes($))return this.emitNotify($,v$1(e,["code","data","desc"]));const I=W(this,xt).call(this,k);if(I){const{resolve:N=P=>{},destruction:D=()=>{}}=I;N(v$1(e,["code","data","desc"])),D()}});F(this,"clearEvents",(A=[])=>{const _=Object.keys(W(this,ft));A.length===0&&(A=_);for(const q of _){if(!A.includes(q))continue;const k=W(this,ft)[q];clearTimeout(k.destructionTimer),delete W(this,ft)[q]}});F(this,"connect",async(A="")=>new Promise(async _=>{A&&kt(this,lt,A),W(this,ct)&&(await W(this,ct).close(),this.state="closed");const q=`${W(this,ot).url}?s=${W(this,lt)}&t=${Date.now()}`;kt(this,ct,new M({...W(this,ot),url:q,binaryType:"arraybuffer",onMessage:W(this,Nt),checkReconnect:W(this,$t),getHeartbeatMsg:W(this,Rt),onReconnectSuccess:W(this,Tt),onReconnectStop:W(this,It)})),this.state="connecting",await W(this,ct).connect(),this.state="connected",W(this,ot).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 当前广播事件",W(this,dt)),_(W(this,ct))}));F(this,"close",async()=>{var _;W(this,ot).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: cws is close.");const A=Object.keys(W(this,ft));for(const q of A){const{destructionTimer:k}=W(this,ft)[q];clearTimeout(k)}kt(this,ft,{}),kt(this,dt,{}),await((_=W(this,ct))==null?void 0:_.close()),kt(this,ct,void 0),this.state="closed"});F(this,"sendMessage",(A,_=!0)=>new Promise(async(q,k)=>{var D;await this.sendMessageBefore();const{event:$,...e}=A,o=Date.now(),I=sendMessageFormat({event:$,sn:+`${o}${O(1e3,9999)}`,time:o,valid:W(this,ot).timeout,version:1,compress:!1,...e});W(this,ot).debug&&(noLogEvents.includes($)||console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ff9700;padding:16px 0;","------->quickvo: 发送消息↑",I),ignoreEvent.includes($)||W(this,Ot).call(this,"req",I)),_&&W(this,Et).call(this,I,{resolve:q,reject:k});const N=com.quick.voice.proto.CommonReq.encode(I).finish();(D=W(this,ct))==null||D.sendMessage(N)}));F(this,"emitNotify",async(A,_)=>{const q=W(this,dt)[A]||[];for(const k of q){const{callback:$=async()=>{}}=k;await $(_)}});F(this,"addNotify",(A,_=!1)=>{const{event:q,sn:k=pt(32)}=A;W(this,dt)[q]||(W(this,dt)[q]=[]);const $=W(this,dt)[q],e=$.findIndex(o=>o.sn===k);return e!==-1&&$.splice(e,1),_?$.unshift(A):$.push(A),k});F(this,"removeNotify",(A=[])=>{if(A.length===0)kt(this,dt,{});else{const _=Object.keys(W(this,dt));for(const q of _)W(this,dt)[q]=W(this,dt)[q].filter(k=>!A.includes(k.sn||""))}W(this,ot).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 移除广播事件",W(this,dt))});kt(this,ot,{...W(this,ot),...A})}}ct=new WeakMap,ot=new WeakMap,lt=new WeakMap,ft=new WeakMap,dt=new WeakMap,$t=new WeakMap,Tt=new WeakMap,It=new WeakMap,Rt=new WeakMap,Ot=new WeakMap,Et=new WeakMap,xt=new WeakMap,Nt=new WeakMap;var p=Object.defineProperty,x=u=>{throw TypeError(u)},g=(u,A,_)=>A in u?p(u,A,{enumerable:!0,configurable:!0,writable:!0,value:_}):u[A]=_,h=(u,A,_)=>g(u,typeof A!="symbol"?A+"":A,_),y=(u,A,_)=>A.has(u)||x("Cannot "+_),i=(u,A,_)=>(y(u,A,"read from private field"),_?_.call(u):A.get(u)),f=(u,A,_)=>A.has(u)?x("Cannot add the same private member more than once"):A instanceof WeakSet?A.add(u):A.set(u,_),b=(u,A,_,q)=>(y(u,A,"write to private field"),A.set(u,_),_),d,n,l,a;class j{constructor(A){f(this,d,new Map),f(this,n,[]),h(this,"index"),h(this,"setCondition",(_,q)=>{i(this,d).set(_,q),q&&i(this,a).call(this)}),h(this,"addTask",(_,q,k={})=>{const $={key:"",describe:"",...k};let{key:e,describe:o}=$;e?this.clear([e]):e=`${this.index++}`;{const I={key:e,func:_,conditionKeys:q,describe:o};i(this,n).unshift(I)}i(this,a).call(this)}),h(this,"clear",(_=[])=>{if(_.length===0){b(this,n,[]);return}for(const q of _){const k=i(this,n).findIndex($=>$.key===q);k!==-1&&i(this,n).splice(k,1)}}),h(this,"getConditions",()=>Object.fromEntries(i(this,d))),h(this,"getTasks",()=>{const _=[];for(const q of i(this,n)){const{key:k,describe:$,conditionKeys:e}=q;_.push({key:k,describe:$,conditionKeys:e})}return _}),f(this,l,_=>{let q=!0;for(const k of _)if(i(this,d).get(k)===!1){q=!1;break}return q}),f(this,a,()=>{const _=i(this,n).length;for(let q=_;q>0;q--){const k=q-1,$=i(this,n)[k],{conditionKeys:e,func:o}=$;i(this,l).call(this,e)&&(o(),i(this,n).splice(k,1))}}),this.index=0;for(const _ of A)i(this,d).set(_,!1)}}d=new WeakMap,n=new WeakMap,l=new WeakMap,a=new WeakMap;class RoomBase{constructor(){F(this,"options",{appid:"",sdkToken:"",roomId:"",userId:"",callType:0,debug:!1,newPublishAutoSubscribe:!0});F(this,"prohibitNotify",!1);F(this,"isEarly",!1);F(this,"taskQueue",new j(["createWs","createSession","ice","createTrack","subscribe","closeTrack","publish"]));F(this,"roomState","ready");F(this,"createAt",Date.now());F(this,"cwsIns",new CallsWebSocket);F(this,"peerIns",new RTCPeerConnection({bundlePolicy:"max-bundle"}));F(this,"transceiverMap",new Map);F(this,"userMap",new Map);F(this,"mediaDevicesErrInfo",{microphoneCamera_audio:"",microphoneCamera_video:"",screenSharing_video:"",screenSharing_audio:""});F(this,"initAsyncQueue",()=>{this.taskQueue.clear(),this.taskQueue.setCondition("createTrack",!0),this.taskQueue.setCondition("closeTrack",!0),this.taskQueue.setCondition("subscribe",!0),this.taskQueue.setCondition("publish",!0)});F(this,"getRoomInfo",()=>{const{options:A,roomState:_,createAt:q}=this;return{...A,roomState:_,createAt:q}});F(this,"setRoomState",A=>{this.roomState=A;const _=enum_roomState[A],q={state:A,stateStr:_};this.cwsIns.emitNotify("onRoomState",{code:200,data:q,desc:"room state is change."})});F(this,"setOptions",async A=>{const _={...this.options,...A};this.options=_});F(this,"initCwsCall",()=>{this.cwsIns=new CallsWebSocket({...this.options})});F(this,"getMediaDevicesErrInfo",async()=>{try{const A=await navigator.mediaDevices.enumerateDevices();A.find(q=>q.kind==="audioinput")||(this.mediaDevicesErrInfo.microphoneCamera_audio="audioinput is not available."),A.find(q=>q.kind==="videoinput")||(this.mediaDevicesErrInfo.microphoneCamera_video="videoinput is not available.")}catch(A){console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->Breathe:error",A)}return this.mediaDevicesErrInfo});F(this,"getUserMediaKey",(A,_)=>`${A}-${_}`);F(this,"getCallActionMap",(A=0)=>{const q=Number(A).toString(2).padStart(4,"0").split(""),[k,$,e,o]=q;return{microphoneCamera_audio:!!Number(o),microphoneCamera_video:!!Number(e),screenSharing_video:!!Number($),screenSharing_audio:!!Number(k)}});F(this,"getAverageVolume",(A,_)=>{A.getByteFrequencyData(_);let q=0;for(let $=0;$<_.length;$++)q+=_[$];return Math.ceil(q/_.length)});F(this,"getCallAction",async A=>{let _="";const q=$=>A.findIndex(({type:o,enabled:I=!0})=>o===$&&I)===-1?"0":"1";return _=`${q(0)}${_}`,_=`${q(1)}${_}`,_=`${q(2)}${_}`,_=`${q(3)}${_}`,parseInt(_,2)});F(this,"getTrackNamesFormTracks",(A,_=[],q="trackName")=>{const k=[];for(const $ of A){const{type:e}=$;if(_.length===0||_.includes(e)){const o=$[q];o&&k.push(`${o}`)}}return k});F(this,"usersFilter",A=>mt(A,["id","isSelf","joinTime","tracks","callAction","callActionStr","callActionMap","network","updateStreams","permissions","isPublished"]).sort((k,$)=>k.id.localeCompare($.id,"en")));this.initAsyncQueue()}}const createMutedAudioStream=()=>{const u=new AudioContext,A=u.createOscillator();A.type="sine",A.frequency.setValueAtTime(0,u.currentTime);const _=u.createGain();_.gain.value=0,A.connect(_),_.connect(u.destination),A.start();const q=u.createMediaStreamDestination();return _.disconnect(),A.connect(q),q.stream},createFakeVideoStream=(u=10,A=10,_=30)=>{const q=document.createElement("canvas"),k=q.getContext("2d");q.width=u,q.height=A;let $=0;return setInterval(()=>{k.clearRect(0,0,q.width,q.height);const I=k.createLinearGradient(0,0,q.width,q.height);I.addColorStop(0,`hsla(${$}, 100%, 50%, 0)`),I.addColorStop(1,`hsla(${$+120}, 100%, 50%, 0)`),k.fillStyle=I,k.fillRect(0,0,q.width,q.height),$=($+1)%360},100),q.captureStream(_)},phoneyStreams={microphoneCamera_audio:createMutedAudioStream(),microphoneCamera_video:createFakeVideoStream(),screenSharing_video:createFakeVideoStream(),screenSharing_audio:createMutedAudioStream()};class RoomMedias extends RoomBase{constructor(){super();F(this,"mediaDevices",[]);st(this,yt,new Map);st(this,_t,new Map);st(this,ht,new Map);st(this,gt,new Map);st(this,At,()=>{for(const _ of mediaType_keys)W(this,gt).set(_,phoneyStreams[_])});F(this,"getPhoneyStreams",_=>W(this,gt).get(_));st(this,qt,()=>{W(this,_t).set("microphoneCamera_audio",{}),W(this,_t).set("microphoneCamera_video",{width:{ideal:1920},height:{ideal:1080},frameRate:{min:10,ideal:30}}),W(this,_t).set("screenSharing_video",{width:{ideal:1920},height:{ideal:1080},frameRate:{min:10,ideal:30}}),W(this,_t).set("screenSharing_audio",{})});st(this,Dt,()=>{W(this,yt).set("audioinput","default"),W(this,yt).set("videoinput","default"),W(this,yt).set("audiooutput","default")});F(this,"emitNotifyUpdateUsersStreams",async _=>{this.cwsIns.emitNotify("onRoomUsersStreams",{code:200,data:_,desc:"users streams is change."})});F(this,"initUserMediaStreamContext",async(_,q,k)=>{var I;const[$]=k.getTracks();if(!$){console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: tracks.length is 0.",{userId:_,mediaType:q,stream:k});return}this.removeUserMediaStreamContext(_,q);const e=this.getUserMediaKey(_,q),{kind:o}=$;switch(o){case"audio":{const N=new AudioMediaContext($);W(this,ht).set(e,N)}break;case"video":{const N=new VideoMediaContext($);W(this,ht).set(e,N)}break}{const N=this.getUserMediaStreamContext(_,q);if(N&&N.kind==="audio")try{const D=W(this,yt).get("audiooutput");(I=N.audioContext)==null||I.setSinkId(D)}catch(D){console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: setSinkId is error",D)}}});F(this,"getUserMediaStreamContext",(_,q)=>{const k=this.getUserMediaKey(_,q);return W(this,ht).get(k)});F(this,"getUserAudioMediaStreamContext",(_,q)=>{const k=this.getUserMediaKey(_,q);return W(this,ht).get(k)});F(this,"removeUserMediaStreamContext",(_,q)=>{const k=this.getUserMediaKey(_,q),$=W(this,ht).get(k);$==null||$.stop(),W(this,ht).delete(k)});F(this,"getUserStream",(_,q)=>{const k=this.getUserMediaStreamContext(_,q);return(k==null?void 0:k.getStream())||new MediaStream});F(this,"getUserStreams",(_,q=[])=>{q.length===0&&(q=mediaType_keys);const k={};for(const $ of q){const e=this.getUserStream(_,$);k[$]=e}return k});F(this,"removeUserStreams",async(_,q=[])=>{q.length===0&&(q=mediaType_keys);for(const k of q)this.removeUserMediaStreamContext(_,k)});F(this,"clearUserStreams",()=>{const _=W(this,ht).values();for(const q of _)q.stop();kt(this,ht,new Map)});F(this,"setMediaTrackConstraints",async(_,q)=>{W(this,_t).set(_,q);const $=this.getUserStream(this.options.userId,_).getTracks();if($.length!==0)for(const e of $){const I={...e.getConstraints(),...q};await e.applyConstraints(I)}});F(this,"initLocalStream",async _=>{const{userId:q}=this.options,k=W(this,_t).get(_);switch(_){case"microphoneCamera_audio":{const $=W(this,yt).get("audioinput"),e=await navigator.mediaDevices.getUserMedia({audio:{deviceId:$,...k},video:!1});await this.initUserMediaStreamContext(q,"microphoneCamera_audio",e)}break;case"microphoneCamera_video":{const $=W(this,yt).get("videoinput"),e=await navigator.mediaDevices.getUserMedia({audio:!1,video:{deviceId:$,...k}});await this.initUserMediaStreamContext(q,"microphoneCamera_video",e)}break;case"screenSharing_audio":{const $=await navigator.mediaDevices.getDisplayMedia({audio:!0,video:!0,...k}),e=$.getTracks();for(const o of e){const{kind:I}=o,N=new MediaStream;N.addTrack(o),$.removeTrack(o),I==="audio"&&await this.initUserMediaStreamContext(q,"screenSharing_audio",N),I==="video"&&await this.initUserMediaStreamContext(q,"screenSharing_video",N)}}break;case"screenSharing_video":{const $=await navigator.mediaDevices.getDisplayMedia({audio:!1,video:!0,...k});await this.initUserMediaStreamContext(q,"screenSharing_video",$)}break}this.emitNotifyUpdateUsersStreams([{userId:q,updateStreams:{[_]:!0}}])});st(this,wt,async()=>!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices?(console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 不支持 enumerateDevices"),[]):(await navigator.mediaDevices.enumerateDevices().then(_=>{this.mediaDevices=_}).catch(function(_){console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: getEnumerateDevices is err",_)}),this.mediaDevices));st(this,Ct,()=>{navigator.mediaDevices&&(navigator.mediaDevices.ondevicechange=async()=>{await W(this,wt).call(this),this.cwsIns.emitNotify("onDevicechange",{code:200,data:{},desc:"device is change."})}),W(this,wt).call(this)});F(this,"getMediaDeviceKind",_=>W(this,yt).get(_));F(this,"replaceSenderStream",async(_=[],q)=>{const{userId:k}=this.options;_.length===0&&(_=mediaType_keys);for(const $ of _){const e=this.transceiverMap.get($);let o;if(e){const{sender:I}=e;q?o=this.getUserStream(k,$):o=this.getPhoneyStreams($);const[N]=o.getTracks();I.replaceTrack(N)}}});F(this,"setMediaDeviceKind",async(_,q)=>{W(this,yt).set(_,q);const{userId:k}=this.options;if(_==="audioinput"&&this.getUserMediaStreamContext(k,"microphoneCamera_audio")&&(await this.initLocalStream("microphoneCamera_audio"),await this.replaceSenderStream(["microphoneCamera_audio"],!0)),_==="videoinput"&&this.getUserMediaStreamContext(k,"microphoneCamera_video")&&(await this.initLocalStream("microphoneCamera_video"),await this.replaceSenderStream(["microphoneCamera_video"],!0)),_==="audiooutput"){const $=W(this,ht).values();for(const e of $)e.kind==="audio"&&"setSinkId"in HTMLMediaElement.prototype&&e.audioContext.setSinkId(q)}});F(this,"setAudioOutputDevice",_=>this.setMediaDeviceKind("audiooutput",_));F(this,"getEnumerateDevices",async _=>(await W(this,wt).call(this),this.mediaDevices.filter(k=>k.kind===_)));F(this,"getEnumerateAudioinputDevices",()=>this.getEnumerateDevices("audioinput"));F(this,"getEnumerateAudioOutputDevices",()=>this.getEnumerateDevices("audiooutput"));F(this,"getEnumerateVideoinputDevices",()=>this.getEnumerateDevices("videoinput"));W(this,Ct).call(this),W(this,Dt).call(this),W(this,qt).call(this),W(this,At).call(this)}}yt=new WeakMap,_t=new WeakMap,ht=new WeakMap,gt=new WeakMap,At=new WeakMap,qt=new WeakMap,Dt=new WeakMap,wt=new WeakMap,Ct=new WeakMap;class RoomUsers extends RoomMedias{constructor(){super();F(this,"getMaxVolumeUser",()=>{const _=Array.from(this.userMap.values(),({id:k})=>k);if(_.length===0)return;let q=[];for(const k of _){const $=this.getUserMediaStreamContext(k,"microphoneCamera_audio");if(!$||$.kind!=="audio")continue;const e=$.getVolume();q.push({id:k,volume:e})}return q=q.sort((k,$)=>k.volume-$.volume>0?-1:1),q[0]});F(this,"setAudioFilter",async(_={})=>{const q=await this.getUsersId();for(const k of q){{const $=this.getUserMediaStreamContext(k,"microphoneCamera_audio");($==null?void 0:$.kind)==="audio"&&($==null||$.setFilter(_))}{const $=this.getUserMediaStreamContext(k,"screenSharing_audio");($==null?void 0:$.kind)==="audio"&&($==null||$.setFilter(_))}}});F(this,"setVolume",(_,q,k)=>{const $=this.getUserMediaStreamContext(_,q);($==null?void 0:$.kind)==="audio"&&($==null||$.setVolumeGain(k))});F(this,"getVolume",(_,q)=>{const k=this.getUserMediaStreamContext(_,q);let $=0;return(k==null?void 0:k.kind)==="audio"&&($=k==null?void 0:k.getVolume()),$});F(this,"clearUsers",()=>{this.userMap=new Map});F(this,"removeUsers",async _=>{for(const q of _)this.userMap.delete(q),await this.removeUserStreams(q)});F(this,"createUser",async _=>{const q=Date.now(),k={id:_,permissions:0,callAction:0,callActionStr:"",callActionMap:{microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1},callState:0,isSelf:_===this.options.userId,isPublished:!1,joinTime:q,updateAt:q,network:{egress:0,ingress:0},tracks:[],updateStreams:{microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1}};this.userMap.set(_,k)});F(this,"getUser",async _=>(this.userMap.has(_)||await this.createUser(_),this.userMap.get(_)));F(this,"getUsers",async(_=[])=>{_.length===0&&(_=[...this.userMap.keys()]);const q=[];for(const k of _){const $=await this.getUser(k);q.push($)}return q});F(this,"getAllUserTrackMids",async()=>{const _=await this.getUsers(),q=[];for(const k of _){const{tracks:$=[]}=k;for(const e of $)q.push(e.mid)}return q});F(this,"getUserTrackByTrackName",async _=>{const q=await this.getUsers(),k=[];for(const $ of q){const{tracks:e=[]}=$;for(const o of e){const{trackName:I}=o;_.includes(I)&&k.push(o)}}return k});F(this,"getUserTrackFromMid",async _=>{const q=await this.getUsers();let k;for(const $ of q){const{tracks:e=[]}=$;for(const o of e)if(o.mid===_){k=o;break}}return k});F(this,"checkUserInRoom",_=>this.userMap.has(_));F(this,"getUsersId",async()=>[...this.userMap.keys()]);F(this,"getCaller",async()=>await this.getUser(this.options.userId));F(this,"updateIsPublished",async(_,q=!1)=>{const k=await this.getUser(_);k.isPublished=q});F(this,"setUserUpdateStreams",async(_,q,k=!0)=>{const $=await this.getUser(_),e={microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1};e[q]=k,$.updateStreams=e});F(this,"updateUsertracks",async(_,q=[],k)=>{const $=await this.getUser(_);k&&(q=[...$.tracks,...q]),q=q.filter(({mid:I=""})=>I!==""),q=it(q,["type"]),q=q.sort((I,N)=>I.type-N.type<0?-1:1);for(const I of q)I.userId=_,I.mediaType=mediaType_keys[I.type],I.enabled===void 0&&(I.enabled=!0);$.updateStreams={microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1};const e=mt($.tracks,["mediaType","enabled","mid","msid","trackName"]),o=mt(q,["mediaType","enabled","mid","msid","trackName"]);{const I="microphoneCamera_audio",N=o.find(U=>U.mediaType===I),D=e.find(U=>U.mediaType===I),P=JSON.stringify(N)!==JSON.stringify(D);$.updateStreams[I]=P}{const I="microphoneCamera_video",N=o.find(U=>U.mediaType===I),D=e.find(U=>U.mediaType===I),P=JSON.stringify(N)!==JSON.stringify(D);$.updateStreams[I]=P}{const I="screenSharing_audio",N=o.find(U=>U.mediaType===I),D=e.find(U=>U.mediaType===I),P=JSON.stringify(N)!==JSON.stringify(D);$.updateStreams[I]=P}{const I="screenSharing_video",N=o.find(U=>U.mediaType===I),D=e.find(U=>U.mediaType===I),P=JSON.stringify(N)!==JSON.stringify(D);$.updateStreams[I]=P}$.tracks=q});F(this,"updateUserCallAction",async(_,q=0)=>{const k=await this.getUser(_);k.callAction=q,k.callActionStr=q.toString(2).padStart(4,"0"),k.callActionMap=this.getCallActionMap(q)});F(this,"updateUserNetwork",async(_,q={egress:5,ingress:5})=>{const k=await this.getUser(_);k.network=q});F(this,"updateUserPermissions",async(_,q)=>{if(q){const k=await this.getUser(_);k.permissions=q}});F(this,"updateUserBase",async _=>{const q=await this.getUser(_);q.isSelf=_===this.options.userId,q.updateAt=Date.now()});F(this,"updateUsers",async _=>{for(const q of _){const{id:k,tracks:$,callAction:e,permissions:o,isPublished:I}=q;await this.updateUserBase(k),await this.updateIsPublished(k,I),await this.updateUserPermissions(k,o),await this.updateUsertracks(k,$,!0),await this.updateUserCallAction(k,e),await this.updateUserNetwork(k)}});F(this,"emitNotifyUpdateUser",async _=>{const q=await this.getUsers([_]),[k]=this.usersFilter(q);this.cwsIns.emitNotify("onRoomUser",{code:200,data:k,desc:"user info is change."})});F(this,"emitNotifyUpdateUsers",async()=>{const _=await this.getUsers(),q=this.usersFilter(_);this.cwsIns.emitNotify("onRoomUsers",{code:200,data:q,desc:"all users info is change."})})}}class RoomPeer extends RoomUsers{constructor(){super();F(this,"getPeerStatsTimer",0);F(this,"reports",[]);F(this,"peerNetwork",{inboundBytes:0,outboundBytes:0,lostRate:"0.00",roundTripTime:"0",jitter:"0"});F(this,"connectedResolveMap",new Map);F(this,"initPeer",()=>{this.peerIns=new RTCPeerConnection({bundlePolicy:"max-bundle"}),this.transceiverMap=new Map,W(this,Ut).call(this),W(this,Pt).call(this)});F(this,"getSenderTracks",(_=[])=>{const q=[];for(const k of _){const $=this.transceiverMap.get(k);if(!$)continue;const{mid:e,sender:o}=$,{track:I}=o;if(!I)continue;const{id:N,enabled:D}=I,U={type:mediaType_keys.findIndex(L=>L===k),enabled:D,trackName:N,location:"local",mid:e};q.push(U)}return q});F(this,"addSenders",async(_=[])=>{_.length===0&&this.peerIns.addTransceiver("audio",{direction:"sendonly"});const q=[];for(const k of _){if(this.transceiverMap.has(k))continue;const $=this.getPhoneyStreams(k),[e]=$.getTracks(),o=this.peerIns.addTransceiver(e,{direction:"sendonly"});this.transceiverMap.set(k,o),q.push(k)}if(_.length===0||q.length){const k=await this.peerIns.createOffer();if(this.options.debug){const $=libExports.parse(k.sdp),e=mt($.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->Breathe: setLocalDescription",{msidArr:e,sdpJson:$,description:k})}await this.peerIns.setLocalDescription(k)}return q});F(this,"removeSenders",async(_=[])=>{for(const q of _)this.transceiverMap.has(q)&&this.transceiverMap.delete(q)});F(this,"clearTransceivers",async()=>{const _=await this.getAllUserTrackMids(),q=this.peerIns.getTransceivers();for(const k of q){const{mid:$}=k;Number($)===0||_.includes($)||(k.stop(),console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;",`------->Breathe: clearTransceivers: ${$} is stop.`,k))}});F(this,"onSubscribeUserTracks",_=>{let q=0;return new Promise(async k=>{const $=[];for(const e of _){const{tracks:o=[]}=e;for(const I of o){const{trackName:N,mid:D}=I,[P]=await this.getUserTrackByTrackName([N]);$.push({...P,mid:D})}}{let e=[];const o=async()=>{clearTimeout(q);const N=new Map;for(const P of e){const{userId:U,mediaType:L}=P;if(!U||!L)continue;N.has(U)||N.set(U,{userId:U,tracks:[],updateStreams:{}});const J=N.get(U);J.tracks.push(P),J.updateStreams[L]=!0}const D=[...N.values()];for(const P of D){const{userId:U,tracks:L}=P;await this.updateUsertracks(U,L,!0)}await this.emitNotifyUpdateUsersStreams(D),this.peerIns.removeEventListener("track",I),k(!0)},I=async N=>{const{streams:D,transceiver:P}=N,[U]=D,{mid:L,receiver:Z}=P,{track:J}=Z,{id:z,kind:H}=J,K=$.find(X=>X.mid===`${L}`);if(!K)return;const{userId:V,mediaType:G}=K;if(!(!V||!G)){if(await this.initUserMediaStreamContext(V,G,U),H==="audio"){const X=this.getUserMediaStreamContext(V,G);(X==null?void 0:X.kind)==="audio"&&X.setMute(!1)}{const X={...K,mid:L,msid:z};e.push(X)}this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#00b60f;",`------->Breathe: await subscribe ${e.length}/${$.length}`,{mediaType:G,mid:L,userTrack:K,e:N}),$.length===e.length&&o()}};this.peerIns.addEventListener("track",I),q=setTimeout(()=>o(),5*1e3)}})});st(this,Ut,()=>{let _=0;const q=()=>{this.setRoomState("closed")};this.peerIns.onconnectionstatechange=()=>{const k=this.peerIns.connectionState;switch(clearTimeout(_),this.taskQueue.setCondition("ice",!1),k){case"connected":this.taskQueue.setCondition("ice",!0),this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#00b60f;",`------->quickvo: connectionState:${k}`);break;case"disconnected":_=setTimeout(q,30*1e3),this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#b60000;",`------->quickvo: connectionState:${k}`);break;case"failed":this.peerIns.restartIce();break;case"closed":q(),this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#b60000;",`------->quickvo: connectionState:${k}`);break;default:this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#b64900;",`------->quickvo: connectionState:${k}`);break}}});F(this,"closeUserTracks",async(_,q=[],k=!1)=>{const $=[];for(const N of q){const{trackName:D,msid:P}=N;$.push(D),P&&$.push(P)}const e=N=>$.includes(N),o=await this.getUser(_);if(!o)return;for(const N of o.tracks){const{trackName:D,msid:P,userId:U,mediaType:L}=N;!U||!L||!e(D)||(this.removeUserMediaStreamContext(U,L),P&&delete N.msid)}if(k){const N=o.tracks.filter(({trackName:D})=>!e(D));await this.updateUsertracks(_,N,!1)}const I=this.peerIns.getTransceivers();for(const N of I){const{sender:D,receiver:P}=N;D.track&&e(D.track.id)&&(console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;",`------->Breathe: sender: ${D.track.id} is stop.`,N),D.track.enabled=!1,D.track.stop(),this.peerIns.removeTrack(D),N.stop()),P.track&&e(P.track.id)&&(console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;",`------->Breathe: receiver: ${P.track.id} is stop.`,N),P.track.enabled=!1,P.track.stop(),N.stop())}});F(this,"createOffer",async()=>{const _=await this.peerIns.createOffer();if(this.options.debug){const q=libExports.parse(_.sdp),k=mt(q.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->Breathe: createOffer",{msidArr:k,sdpJson:q,description:_})}await this.peerIns.setLocalDescription(_)});F(this,"createAnswer",async()=>{const _=await this.peerIns.createAnswer();if(this.options.debug){const q=libExports.parse(_.sdp),k=mt(q.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->Breathe: createAnswer",{msidArr:k,sdpJson:q,description:_})}await this.peerIns.setLocalDescription(_)});F(this,"getSdp",()=>{var _;return(_=this.peerIns.localDescription)==null?void 0:_.sdp});F(this,"setRemoteDescription",async _=>{if(this.options.debug){const q=libExports.parse(_.sdp),k=mt(q.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->Breathe: setRemoteDescription",{msidArr:k,sdpJson:q,description:_})}return await this.peerIns.setRemoteDescription(_),_});F(this,"getPeerNetwork",()=>this.peerNetwork);F(this,"setCallStrategy",async(_,q=[])=>{q.length===0&&(q=mediaType_keys);let k="balanced";switch(_){case"qualityPriority":k="maintain-resolution";break;case"fluencyPriority":k="maintain-framerate";break;case"balancedDowngrade":k="balanced";break}const $=await this.getCaller(),e=Array.from($.tracks,({trackName:I})=>I),o=this.peerIns.getSenders();for(const I of o){const{track:N}=I;if(!N||!e.includes(N.id))continue;const D=I.getParameters();I.setParameters({...D,degradationPreference:k})}});F(this,"setRTCRtpSenderParameters",_=>{try{const q=this.peerIns.getSenders();for(const k of q){const $=k.getParameters();k.setParameters({...$,..._})}}catch(q){console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: setRTCRtpSenderParameters is error.",q)}});F(this,"getReportsByMid",async(_=[])=>_.length===0?this.reports:this.reports.filter(q=>_.includes(q.mid)));F(this,"getRoomNetwork",()=>this.peerNetwork);st(this,Mt,async()=>{try{const _=await this.peerIns.getStats(),q=["inbound-rtp","remote-inbound-rtp","outbound-rtp"],$=[..._.values()].filter(X=>q.includes(X.type));let e=0,o=0,I=0,N=0,D=0,P=0,U=[],L=[];for(const X of this.reports){const{packetsSent:at,packetsLost:Y}=X;at&&(I+=at),Y&&(N+=Y)}this.reports=$;for(const X of this.reports){const{bytesReceived:at,bytesSent:Y,packetsSent:rt,packetsLost:nt,jitter:tt,roundTripTime:et}=X;at&&(e=at),Y&&(o=Y),rt&&(D+=rt),nt&&(P+=nt),et&&U.push((et*100).toFixed(2)),tt&&L.push(tt.toFixed(2))}L.sort().reverse(),U.sort().reverse();const Z=D-I,J=P-N,z=Z===0?"0.00":(J/Z).toFixed(2),[H="0"]=U,[K="0"]=L,V={inboundBytes:e,outboundBytes:o,lostRate:z,roundTripTime:H,jitter:K};this.peerNetwork=V;const G=(X,at,Y)=>{const rt=Number(X),nt=Number(at),tt=Number(Y);let et="0";return rt<.03&&nt<100&&tt<.05?et="5":rt<.06&&nt<160&&tt<.1?et="4":rt<.1&&nt<250&&tt<.15?et="3":rt<.15&&nt<400&&tt<.2?et="2":et="1",Number(et)};{const X=G(z,H,K),at=await this.getCaller(),{network:Y}=at,rt={egress:X,ingress:X},nt=JSON.stringify(Y)!==JSON.stringify(rt);if(await this.updateUserNetwork(this.options.userId,rt),nt){this.emitNotifyUpdateUsers();const{userId:tt,roomId:et}=this.options;this.cwsIns.sendMessage({event:"networkQualityChange",data:{...rt,userId:tt,roomId:et}},!1)}}}catch(_){console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->Breathe: setNetQuality is err.",_)}});st(this,Pt,()=>{const _=async()=>{this.peerIns.connectionState!=="connected"||!this.options.roomId||W(this,Mt).call(this)};this.getPeerStatsTimer=setInterval(_,1*1e3)});F(this,"stopGetPeerStats",()=>clearInterval(this.getPeerStatsTimer))}}Ut=new WeakMap,Mt=new WeakMap,Pt=new WeakMap;class RoomCalls extends RoomPeer{constructor(){super();F(this,"sdk_service_version","1.0.5");F(this,"setLocalStream",(_,q)=>new Promise(async(k,$)=>{try{const{userId:e}=this.options;if(q?await this.initLocalStream(_):this.removeUserMediaStreamContext(e,_),_==="screenSharing_audio"||_==="screenSharing_video"){{const N=this.getUserStream(e,"screenSharing_audio").getTracks();for(const D of N)D.onended=()=>this.stopPublish(["screenSharing_audio","screenSharing_video"])}{const N=this.getUserStream(e,"screenSharing_video").getTracks();for(const D of N)D.onended=()=>this.stopPublish(["screenSharing_audio","screenSharing_video"])}}const o=this.getUserStreams(e);this.cwsIns.emitNotify("onLocalStream",{code:200,data:o,desc:"local stream is change."}),k(o)}catch(e){$(e)}}));F(this,"addNotify",_=>this.cwsIns.addNotify(_));st(this,Bt,async _=>{const{roomId:q}=this.options;if(!q)return;const{id:k,tracks:$=[]}=await this.getCaller();if($.length===0)return;const e=$.filter(o=>o.mediaType&&_.includes(o.mediaType));this.cwsIns.sendMessage({event:"pubNotify",data:{roomId:q,user:{id:k,tracks:e}}})});F(this,"joinRoom",async _=>new Promise((q,k)=>{this.setOptions(_),this.clearUsers(),this.createWs();const $=async()=>{try{const{roomId:e,userId:o,callType:I}=this.options;this.cwsIns.sendMessage({event:this.isEarly?"joinRoomEx":"joinRoom",data:{callType:I,roomId:e,user:{id:o,tracks:[],callAction:0}}}).then(async N=>{const{code:D=0,desc:P="服务器繁忙",data:U}=N;if(D!==200)return k(P);const{roomId:L="",roomUsers:Z=[]}=U;if(L!==e)return k("加入的房间不匹配");this.createSession(),await this.updateUsers(Z),await this.emitNotifyUpdateUsers();const J=await this.getUsers();q(J)})}catch(e){k(`加入房间失败: ${e.message||e||"服务器繁忙"}`)}};this.taskQueue.addTask($,["createWs"],{describe:"joinRoom"})}));F(this,"quitRoom",()=>new Promise(async _=>{const{roomId:q,userId:k}=this.options,$={roomId:q,user:{id:k}};try{this.stopSubscribe(),this.stopGetPeerStats(),this.initAsyncQueue(),this.clearUsers(),this.clearUserStreams(),this.cwsIns.clearEvents(),this.setRoomState("ready")}catch{}await new Promise(e=>setTimeout(()=>e(!0),300)),this.cwsIns.sendMessage({event:"quitRoom",data:$}),_(!0)}));F(this,"quitRoomEx",()=>new Promise(async _=>{const{roomId:q,userId:k}=this.options,$={roomId:q,user:{id:k}};try{this.stopSubscribe(),this.stopGetPeerStats(),this.initAsyncQueue(),this.clearUsers(),this.clearUserStreams(),await this.replaceSenderStream([],!1)}catch{}await new Promise(e=>setTimeout(()=>e(!0),300)),this.cwsIns.sendMessage({event:"quitRoomEx",data:$}),_(!0)}));F(this,"syncRoomInfo",()=>new Promise((_,q)=>{const k=async()=>{const{userId:$}=this.options,e=await this.getUser($),{id:o=$,callAction:I=0}=e;await this.cwsIns.sendMessage({event:"syncRoomInfo",data:{user:{id:o,callAction:I}}}).then(async N=>{if(N.code!==200)return q(N.desc);const D=N.data.users;this.clearUsers(),await this.updateUsers(D),await this.updateUsertracks(e.id,e.tracks,!1),await this.subscribe();{const P=await this.getUsers();_(P)}}).catch(N=>q(N))};this.taskQueue.addTask(k,["createWs"],{describe:"syncRoomInfo"})}));F(this,"publish",_=>new Promise(async(q,k)=>{const $=async()=>{try{this.taskQueue.setCondition("publish",!1),_.includes("screenSharing_audio")&&!_.includes("screenSharing_video")&&(_=[..._,"screenSharing_video"]),await this.replaceSenderStream(_,!1);const e=await this.getCaller();for(const P of _)this.getUserStream(e.id,P).getTracks().length===0&&await this.setLocalStream(P,!0);const o=[];for(const P of _)this.getUserStream(e.id,P).getTracks().length!==0&&o.push(P);await this.createTrack(o),await this.replaceSenderStream(o,!0);const I=this.getSenderTracks(_),N=[...e.tracks,...I],D=await this.getCallAction(N);await this.updateUsertracks(e.id,N,!0),W(this,Bt).call(this,_),await W(this,St).call(this,D);{await this.emitNotifyUpdateUsers();const P=await this.getCaller();this.taskQueue.setCondition("publish",!0),q(P)}}catch(e){console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->Breathe: error",e);for(const o of _)await this.setLocalStream(o,!1);this.taskQueue.setCondition("publish",!0),k(`publish is error: ${e.message||e}`)}};this.taskQueue.addTask($,["createWs","createSession","ice","createTrack","subscribe","publish"],{describe:"publish"})}));F(this,"stopPublish",(_=[])=>new Promise((q,k)=>{const $=async()=>{try{this.taskQueue.setCondition("closeTrack",!1);const e=await this.getCaller();_.length===0&&(_=mediaType_keys);const o=e.tracks.filter(({mediaType:N})=>N&&_.includes(N)),I=async()=>{this.taskQueue.setCondition("closeTrack",!0);const N=await this.getCaller();await this.emitNotifyUpdateUsers(),q(N)};if(o.length===0)return I();await this.replaceSenderStream(_,!0),await this.removeSenders(_),await this.closeUserTracks(e.id,o,!0);{const N=await this.getCallAction(e.tracks);await W(this,St).call(this,N)}await this.createOffer(),await this.cwsIns.sendMessage({event:"closeTrack",data:{roomId:this.options.roomId,sdp:this.getSdp(),tracks:o}}).then(async N=>{const{remoteSdp:D}=N.data;await this.setRemoteDescription({type:"answer",sdp:D})}),I()}catch(e){this.taskQueue.setCondition("closeTrack",!0),k(`stop publish is error: ${e.message||e}`)}};this.taskQueue.addTask($,["createWs","createSession","ice","createTrack","subscribe"],{describe:"stopPublish"})}));F(this,"subscribe",(_=[],q=3)=>new Promise(async(k,$)=>{this.taskQueue.setCondition("subscribe",!1);const e=await this.getUsers();let o=[];for(const D of e){const{isSelf:P,tracks:U=[]}=D;if(!P){const L=U.filter(({trackName:Z,mid:J=""})=>J!==""&&(_.includes(Z)||_.length===0));L.length!==0&&o.push({...D,tracks:L})}}const I=async()=>{const D=Array.from(o,({id:U})=>U),P=await this.getUsers(D);await this.emitNotifyUpdateUsers(),this.taskQueue.setCondition("subscribe",!0),k(P)};if(o.length===0)return I();const N=async()=>{try{const D=[];for(const U of o){const{id:L,tracks:Z}=U,J=mt(Z,["type","trackName"]),z={id:L,tracks:J};D.push(z)}const P=async()=>{this.options.debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;",`------->quickvo: surplus subscribe count is ${q}`),await this.cwsIns.sendMessage({event:"subscribe",data:{users:D}}).then(async U=>{const{code:L=0,data:Z,desc:J}=U;if(L!==200){if(q>0)return await new Promise(K=>setTimeout(()=>K(!0),300)),q=q-1,P();throw this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: subscribe is error. count 0",{trackNames:_}),new Error(J)}const{remoteSdp:z,users:H=[]}=Z;this.onSubscribeUserTracks(H).then(async()=>{await this.renegotiate(),I()}),await this.setRemoteDescription({type:"offer",sdp:z})})};await P()}catch(D){this.taskQueue.setCondition("subscribe",!0),$(`subscribe is error: ${D.message||D}`)}};this.taskQueue.addTask(N,["createWs","createSession","ice","createTrack","closeTrack"],{describe:"subscribe"})}));F(this,"stopSubscribe",(_=[])=>new Promise((q,k)=>{const $=async()=>{try{this.taskQueue.setCondition("closeTrack",!1);const e=await this.getUsers(),o=[];for(const N of e){const{tracks:D=[]}=N;for(const P of D){const{type:U,mid:L,trackName:Z,mediaType:J,msid:z}=P;if(!(!J||!z)&&(_.length===0||_.includes(Z))){const H={type:U,mid:L,trackName:z};o.push(H),await this.closeUserTracks(N.id,[P])}}}const I=async()=>{await this.emitNotifyUpdateUsers(),this.taskQueue.setCondition("closeTrack",!0),q(!0)};if(o.length===0)return I();await this.createOffer(),await this.cwsIns.sendMessage({event:"closeTrack",data:{roomId:this.options.roomId,sdp:this.getSdp(),tracks:o}}).then(async N=>{const{remoteSdp:D}=N.data;await this.setRemoteDescription({type:"answer",sdp:D})}),I()}catch(e){this.taskQueue.setCondition("closeTrack",!0),k(`stop subscribe is error: ${e.message||e}`)}};this.taskQueue.addTask($,["createWs","createSession","ice","createTrack","subscribe"],{describe:"closeTrack"})}));F(this,"inactiveTracks",async(_,q)=>new Promise(async k=>{const $=await this.getCaller();if(!$)return;const{tracks:e=[]}=$,o=[...e];await this.replaceSenderStream(_,!0);for(let N of o){const{mediaType:D}=N;if(D&&_.includes(D)){N.enabled=q;const U=this.getUserStream($.id,D).getTracks();for(const L of U)L.enabled=q}}const I=await this.getCallAction(o);await W(this,St).call(this,I),await this.emitNotifyUpdateUsers(),k(!0)}));F(this,"debugger",()=>new Promise(async(_,q)=>{await this.cwsIns.sendMessage({event:"debugger"},!1).then(async k=>{if(k.code!==200)return q(k.desc);_(!0)}).catch(k=>{q(k)})}));st(this,St,async _=>new Promise(async(q,k)=>{const{roomId:$,userId:e}=this.options,o={roomId:$,user:{id:e,callAction:_}};await this.cwsIns.sendMessage({event:"updateCall",data:o}).then(async I=>{const{code:N=0}=I;if(N!==200)return k(I);await this.updateUserCallAction(e,_),q(_)}).catch(I=>k(I))}));F(this,"renegotiate",()=>new Promise(async(_,q)=>{await this.createAnswer(),await this.cwsIns.sendMessage({event:"renegotiate",data:{sdp:this.getSdp()}}).then(k=>{if(k.code!==200)return q("协商流错误");_(!0)}).catch(k=>{console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->Breathe:error",k),q(`协商流错误: ${k.message||k}`)})}));F(this,"createWs",()=>new Promise(async(_,q)=>{try{if(["connecting","connected"].includes(this.cwsIns.state))return _(!0);this.taskQueue.setCondition("createWs",!1),this.cwsIns.clearEvents(),this.initPeer();const{appid:k}=this.options,{userId:$,sdkToken:e,roomId:o}=this.options;if(!$)return q("You must first use QuickVO.setOptions to set the userId.");const I={a:e,b:$,c:k,r:o,v:this.sdk_service_version};this.isEarly&&(I.i=pt()),this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->Breathe: createWs",I);const N=btoa(encodeURI(JSON.stringify(I)));await this.cwsIns.connect(N),this.taskQueue.setCondition("createWs",!0),_(!0)}catch(k){console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->Breathe:error",k),q(k)}}));F(this,"createSession",()=>new Promise(_=>{const q=async()=>["connecting","connected"].includes(this.roomState)?_(!0):(this.setRoomState("connecting"),this.taskQueue.setCondition("ice",!1),this.taskQueue.setCondition("createSession",!1),await this.addSenders(),this.cwsIns.sendMessage({event:"connectCF",data:{sdp:this.getSdp()}}).then(async k=>{const{code:$=0,desc:e,data:o}=k;if($!==200)throw new Error(e);const{remoteSdp:I}=o;await this.setRemoteDescription({type:"answer",sdp:I}),this.taskQueue.setCondition("createSession",!0),_(!0)}));this.taskQueue.addTask(q,["createWs"],{describe:"createSession"})}));F(this,"createTrack",async _=>new Promise(q=>{const k=async()=>{try{this.taskQueue.setCondition("createTrack",!1);const $=await this.addSenders(_),e=this.getSenderTracks($);if(e.length===0)return this.taskQueue.setCondition("createTrack",!0),q(!0);await this.cwsIns.sendMessage({event:"publish",data:{sdp:this.getSdp(),tracks:e,callAction:0}}).then(async o=>{const{code:I=0,desc:N,data:D}=o;if(I!==200)throw this.options.debug&&console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: createTrack is error.",{mediaTypes:_}),new Error(N);const{remoteSdp:P}=D;await this.setRemoteDescription({type:"answer",sdp:P}),this.taskQueue.setCondition("createTrack",!0),q(!0)})}catch{await this.removeSenders(_),this.taskQueue.setCondition("createTrack",!0),q(!0)}};this.taskQueue.addTask(k,["createWs","createSession","ice","subscribe","closeTrack"],{describe:"createTrack"})}));F(this,"earlyConnect",()=>{this.isEarly=!0,this.createWs(),this.createSession(),this.createTrack(["microphoneCamera_audio","microphoneCamera_video"])});this.setRoomState("ready")}}Bt=new WeakMap,St=new WeakMap;class Room extends RoomCalls{constructor(){super()}}class QuickVO extends Room{constructor(_){super();st(this,bt,new Map);st(this,Lt,()=>{{const _=async q=>{const{qualities:k=[]}=q.data,[$]=k;if(!($&&$.userId===this.options.userId&&k.length===1)){for(const e of k){const{userId:o,egress:I,ingress:N}=e;this.checkUserInRoom(o)&&await this.updateUserNetwork(o,{egress:I,ingress:N})}await this.emitNotifyUpdateUsers()}};this.cwsIns.addNotify({event:"onNetQuality",callback:_},!0)}{const _=async q=>{const k=q.data.user;await this.updateUsers([k]),await this.updateUsertracks(k.id,k.track,!1),await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onJoinRoom",callback:_},!0)}{const _=async q=>{await this.removeUsers([q.data.user.id]),await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onQuitRoom",callback:_},!0)}{const _=async q=>{const{user:k}=q.data,{id:$,tracks:e=[]}=k;await this.updateUserPermissions($,3);const o=[];{const{tracks:I}=await this.getUser($);for(const N of e){const{mid:D,trackName:P}=N;if(I.find(L=>L.mid===D&&L.trackName===P))continue;o.push(N)}}if(o.length!==0)if(await this.updateUsertracks($,o,!0),this.options.newPublishAutoSubscribe){const I=this.getTrackNamesFormTracks(o);await this.subscribe(I)}else await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onPublish",callback:_},!0)}{const _=async q=>{const{id:k,tracks:$}=q.data.user;k!==this.options.userId&&(await this.closeUserTracks(k,$,!0),await this.emitNotifyUpdateUsers())};this.cwsIns.addNotify({event:"onCloseTrack",callback:_},!0)}{const _=async q=>{const{id:k,callAction:$}=q.data.user;this.checkUserInRoom(k)&&(await this.updateUserCallAction(k,$),this.emitNotifyUpdateUsers())};this.cwsIns.addNotify({event:"onUpdateCall",callback:_},!0)}{const _=async q=>{const{user:k}=q.data,{id:$,permissions:e=1}=k;e===1?await this.removeUsers([$]):e===3&&await this.updateUsers([k]),await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onUpdatePermissions",callback:_},!0)}this.cwsIns.addNotify({event:"onTokenExpired",callback:async _=>this.destroy()},!0),this.cwsIns.addNotify({event:"destroyRoom",callback:this.destroy},!0)});st(this,jt,()=>{this.cwsIns.sendMessageBefore=async()=>{}});st(this,Zt,()=>{this.cwsIns.onReconnectSuccess=async()=>{this.syncRoomInfo()}});st(this,Ft,async()=>{});F(this,"addRequestAnimationFrame",async(_,q)=>{{const $=W(this,bt).get(_);$&&cancelAnimationFrame($)}const k=($=Date.now())=>{q($);const e=requestAnimationFrame(k);W(this,bt).set(_,e)};k()});F(this,"clearRequestAnimationFrame",async(_=[])=>{_.length===0&&(_=[...W(this,bt).keys()]);const q=[];for(const k of _){const $=W(this,bt).get(k);$&&(cancelAnimationFrame($),q.push($))}return q});F(this,"destroy",async()=>{this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 销毁SDK"),this.stopGetPeerStats(),this.initAsyncQueue(),this.clearUsers(),this.clearUserStreams(),this.cwsIns.clearEvents(),this.cwsIns.emitNotify("onDestroy",{code:200,data:{},desc:"sdk is destroy."}),await this.cwsIns.close()});this.setOptions(_),this.initCwsCall(),W(this,jt).call(this),W(this,Zt).call(this),W(this,Ft).call(this),W(this,Lt).call(this)}}bt=new WeakMap,Lt=new WeakMap,jt=new WeakMap,Zt=new WeakMap,Ft=new WeakMap,exports.QuickVO=QuickVO,exports.ignoreEvent=ignoreEvent,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})});
|
|
3
|
+
`},writer$1}var hasRequiredLib;function requireLib(){if(hasRequiredLib)return lib;hasRequiredLib=1;var _=requireParser(),q=requireWriter$1(),k=requireGrammar();return lib.grammar=k,lib.write=q,lib.parse=_.parse,lib.parseParams=_.parseParams,lib.parseFmtpConfig=_.parseFmtpConfig,lib.parsePayloads=_.parsePayloads,lib.parseRemoteCandidates=_.parseRemoteCandidates,lib.parseImageAttributes=_.parseImageAttributes,lib.parseSimulcastStreamList=_.parseSimulcastStreamList,lib}var libExports=requireLib();class AudioMediaContext{constructor(q){H(this,"options",{autoGainControl:!1,noiseSuppression:!1,echoCancellation:!1});H(this,"kind","audio");H(this,"stream",new MediaStream);H(this,"audio",new Audio);H(this,"audioContext",new(window.AudioContext||window.webkitAudioContext));H(this,"mediaStreamAudioSourceNode");H(this,"autoGainNode");H(this,"biquadFilterNode");H(this,"delayNode");H(this,"gainNode");H(this,"analyserNode");H(this,"analyserArrayData");H(this,"stop",()=>{const q=this.stream.getTracks();for(const k of q)k.enabled=!1,k.stop(),this.stream.removeTrack(k)});H(this,"replaceStream",q=>{this.stop();const[k]=q.getAudioTracks();this.stream.addTrack(k)});H(this,"getStream",()=>this.mediaStreamAudioSourceNode.mediaStream);H(this,"setMute",(q=!0)=>{q?this.analyserNode.disconnect(this.audioContext.destination):this.analyserNode.connect(this.audioContext.destination)});H(this,"setVolumeGain",q=>{this.gainNode.gain.setValueAtTime(q,this.audioContext.currentTime)});H(this,"getVolume",()=>{const{analyserNode:q,analyserArrayData:k}=this;q.getByteFrequencyData(k);let D=0;for(let I=0;I<k.length;I++)D+=k[I];return Math.ceil(D/k.length)});H(this,"setFilter",(q={})=>{this.options={...this.options,...q};const{autoGainControl:k,noiseSuppression:D,echoCancellation:$}=this.options,{mediaStreamAudioSourceNode:I,autoGainNode:e,biquadFilterNode:u,delayNode:N,gainNode:A}=this,U=I;return k&&U.connect(e),D&&U.connect(u),$&&U.connect(N),U.connect(A),q});this.stream.addTrack(q),this.audio.srcObject=this.stream,this.audioContext=new(window.AudioContext||window.webkitAudioContext),this.mediaStreamAudioSourceNode=this.audioContext.createMediaStreamSource(this.stream),this.autoGainNode=this.audioContext.createGain(),this.autoGainNode.gain.setValueAtTime(.8,this.audioContext.currentTime),this.biquadFilterNode=this.audioContext.createBiquadFilter(),this.biquadFilterNode.type="lowpass",this.biquadFilterNode.frequency.value=1e3,this.delayNode=this.audioContext.createDelay(),this.delayNode.delayTime.value=.5,this.gainNode=this.audioContext.createGain(),this.gainNode.gain.setValueAtTime(1,this.audioContext.currentTime),this.analyserNode=this.audioContext.createAnalyser(),this.analyserNode.fftSize=512,this.analyserArrayData=new Uint8Array(this.analyserNode.frequencyBinCount);const{gainNode:k,analyserNode:D}=this;k.connect(D),this.audioContext.state==="suspended"&&(this.audioContext.resume(),document.addEventListener("click",()=>this.audioContext.resume(),{once:!0})),this.setFilter()}}class VideoMediaContext{constructor(q){H(this,"kind","video");H(this,"stream",new MediaStream);H(this,"stop",()=>{const q=this.stream.getTracks();for(const k of q)k.enabled=!1,k.stop(),this.stream.removeTrack(k)});H(this,"replaceStream",q=>{this.stop();const[k]=q.getVideoTracks();this.stream.addTrack(k)});H(this,"getStream",()=>this.stream);H(this,"getTrack",()=>this.stream.getTracks()[0]);this.stream.addTrack(q)}}const enum_roomState={ready:"已就绪",checkAuth:"正在鉴权",connecting:"连接中",connected:"已连接",reconnect:"正在重新连接",disconnected:"已断开",closed:"已关闭"};ut(enum_roomState);var C=Object.defineProperty,R=_=>{throw TypeError(_)},S=(_,q,k)=>q in _?C(_,q,{enumerable:!0,configurable:!0,writable:!0,value:k}):_[q]=k,l=(_,q,k)=>S(_,typeof q!="symbol"?q+"":q,k),v=(_,q,k)=>q.has(_)||R("Cannot "+k),t=(_,q,k)=>(v(_,q,"read from private field"),k?k.call(_):q.get(_)),c=(_,q,k)=>q.has(_)?R("Cannot add the same private member more than once"):q instanceof WeakSet?q.add(_):q.set(_,k),i=(_,q,k,D)=>(v(_,q,"write to private field"),q.set(_,k),k),s,r,h$1,p$1,m,f$1,w,x$1,g$1,b$1,B,y$1,T,d$1;class M{constructor(q){c(this,s,{url:"",binaryType:"blob",timeout:6*1e3,debug:!1,sendBeforAutoConnect:!1,reconnectCount:-1,reconnectTime:60*1e3,reconnectIntervalTime:5e3,heartbeatIntervalTime:1e4,checkReconnect:k=>!0,onReconnectSuccess:async k=>{},onReconnectStop:async k=>{},getHeartbeatMsg:()=>JSON.stringify({event:"heartbeat"}),onMessage:k=>{}}),l(this,"ws"),c(this,r,-1),c(this,h$1,-1),c(this,p$1,0),c(this,m,0),c(this,f$1,!1),c(this,w,k=>{}),l(this,"close",async(k=1e3,D="correctly close.")=>{var $;this.ws&&(i(this,f$1,!0),t(this,d$1).call(this),($=this.ws)==null||$.close(k,D))}),l(this,"connect",()=>new Promise(async k=>{i(this,w,k),this.ws=new WebSocket(t(this,s).url),this.ws.binaryType=t(this,s).binaryType,this.ws.onopen=t(this,b$1),this.ws.onmessage=t(this,g$1),this.ws.onerror=t(this,B),this.ws.onclose=t(this,y$1)})),l(this,"reconnect",async k=>new Promise(D=>{t(this,s).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: await reconnect.");const $=I=>{t(this,s).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;",`------->pr-ws: ${I}`),t(this,s).onReconnectStop({msg:I}),D(I)};if(t(this,x$1).call(this)===!1)return $("stop reconnect. exceed maxReconnectionTime.");if(t(this,r)!==-1&&t(this,r)===0)return $("stop reconnect. surplusReconnectCount is 0.");if(!t(this,s).checkReconnect(k))return $("stop reconnect. checkReconnect is false.");t(this,s).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;",`------->pr-ws: await ${t(this,s).reconnectIntervalTime}ms run reconnect. surplusReconnectCount is ${t(this,r)}`,k),i(this,p$1,setTimeout(async()=>{i(this,r,Math.max(-1,t(this,r)-1)),await this.connect();try{await t(this,s).onReconnectSuccess(this.ws)}catch(I){console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->pr-ws: onReconnectSuccess is error",I)}D(!0)},t(this,s).reconnectIntervalTime))})),l(this,"sendMessage",async k=>{var D;(!this.ws||this.ws.readyState!==1)&&(t(this,s).debug&&console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: ws is not ready."),t(this,s).sendBeforAutoConnect&&(t(this,s).debug&&console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: await ws connect."),await this.connect())),(D=this.ws)==null||D.send(k)}),c(this,x$1,()=>{const k=Date.now();return t(this,h$1)===-1&&i(this,h$1,k+t(this,s).reconnectTime),!(k>t(this,h$1))}),c(this,g$1,k=>{const{data:D}=k;t(this,s).onMessage(D)}),c(this,b$1,()=>{t(this,s).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: connect is success.",this.ws),i(this,r,t(this,s).reconnectCount),i(this,h$1,-1),t(this,T).call(this),t(this,w).call(this,this.ws)}),c(this,B,k=>{t(this,s).debug&&console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: connect is error.",k)}),c(this,y$1,k=>{if(t(this,s).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;",`------->pr-ws: connect is close. code: ${k.code}, permanentClosed is ${t(this,f$1)}.`,k),t(this,d$1).call(this),!t(this,f$1))return this.reconnect(k);this.ws=void 0}),c(this,T,()=>{i(this,m,setInterval(()=>{const k=t(this,s).getHeartbeatMsg();k&&this.sendMessage(k)},t(this,s).heartbeatIntervalTime))}),c(this,d$1,()=>{clearInterval(t(this,p$1)),clearInterval(t(this,m))}),i(this,s,{...t(this,s),...q}),i(this,r,t(this,s).reconnectCount)}}s=new WeakMap,r=new WeakMap,h$1=new WeakMap,p$1=new WeakMap,m=new WeakMap,f$1=new WeakMap,w=new WeakMap,x$1=new WeakMap,g$1=new WeakMap,b$1=new WeakMap,B=new WeakMap,y$1=new WeakMap,T=new WeakMap,d$1=new WeakMap;var indexMinimal={},minimal$1={},aspromise,hasRequiredAspromise;function requireAspromise(){if(hasRequiredAspromise)return aspromise;hasRequiredAspromise=1,aspromise=_;function _(q,k){for(var D=new Array(arguments.length-1),$=0,I=2,e=!0;I<arguments.length;)D[$++]=arguments[I++];return new Promise(function(N,A){D[$]=function(L){if(e)if(e=!1,L)A(L);else{for(var P=new Array(arguments.length-1),Z=0;Z<P.length;)P[Z++]=arguments[Z];N.apply(null,P)}};try{q.apply(k||null,D)}catch(U){e&&(e=!1,A(U))}})}return aspromise}var base64={},hasRequiredBase64;function requireBase64(){return hasRequiredBase64||(hasRequiredBase64=1,function(_){var q=_;q.length=function(u){var N=u.length;if(!N)return 0;for(var A=0;--N%4>1&&u.charAt(N)==="=";)++A;return Math.ceil(u.length*3)/4-A};for(var k=new Array(64),D=new Array(123),$=0;$<64;)D[k[$]=$<26?$+65:$<52?$+71:$<62?$-4:$-59|43]=$++;q.encode=function(u,N,A){for(var U=null,L=[],P=0,Z=0,F;N<A;){var W=u[N++];switch(Z){case 0:L[P++]=k[W>>2],F=(W&3)<<4,Z=1;break;case 1:L[P++]=k[F|W>>4],F=(W&15)<<2,Z=2;break;case 2:L[P++]=k[F|W>>6],L[P++]=k[W&63],Z=0;break}P>8191&&((U||(U=[])).push(String.fromCharCode.apply(String,L)),P=0)}return Z&&(L[P++]=k[F],L[P++]=61,Z===1&&(L[P++]=61)),U?(P&&U.push(String.fromCharCode.apply(String,L.slice(0,P))),U.join("")):String.fromCharCode.apply(String,L.slice(0,P))};var I="invalid encoding";q.decode=function(u,N,A){for(var U=A,L=0,P,Z=0;Z<u.length;){var F=u.charCodeAt(Z++);if(F===61&&L>1)break;if((F=D[F])===void 0)throw Error(I);switch(L){case 0:P=F,L=1;break;case 1:N[A++]=P<<2|(F&48)>>4,P=F,L=2;break;case 2:N[A++]=(P&15)<<4|(F&60)>>2,P=F,L=3;break;case 3:N[A++]=(P&3)<<6|F,L=0;break}}if(L===1)throw Error(I);return A-U},q.test=function(u){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(u)}}(base64)),base64}var eventemitter,hasRequiredEventemitter;function requireEventemitter(){if(hasRequiredEventemitter)return eventemitter;hasRequiredEventemitter=1,eventemitter=_;function _(){this._listeners={}}return _.prototype.on=function(k,D,$){return(this._listeners[k]||(this._listeners[k]=[])).push({fn:D,ctx:$||this}),this},_.prototype.off=function(k,D){if(k===void 0)this._listeners={};else if(D===void 0)this._listeners[k]=[];else for(var $=this._listeners[k],I=0;I<$.length;)$[I].fn===D?$.splice(I,1):++I;return this},_.prototype.emit=function(k){var D=this._listeners[k];if(D){for(var $=[],I=1;I<arguments.length;)$.push(arguments[I++]);for(I=0;I<D.length;)D[I].fn.apply(D[I++].ctx,$)}return this},eventemitter}var float,hasRequiredFloat;function requireFloat(){if(hasRequiredFloat)return float;hasRequiredFloat=1,float=_(_);function _(I){return typeof Float32Array<"u"?function(){var e=new Float32Array([-0]),u=new Uint8Array(e.buffer),N=u[3]===128;function A(Z,F,W){e[0]=Z,F[W]=u[0],F[W+1]=u[1],F[W+2]=u[2],F[W+3]=u[3]}function U(Z,F,W){e[0]=Z,F[W]=u[3],F[W+1]=u[2],F[W+2]=u[1],F[W+3]=u[0]}I.writeFloatLE=N?A:U,I.writeFloatBE=N?U:A;function L(Z,F){return u[0]=Z[F],u[1]=Z[F+1],u[2]=Z[F+2],u[3]=Z[F+3],e[0]}function P(Z,F){return u[3]=Z[F],u[2]=Z[F+1],u[1]=Z[F+2],u[0]=Z[F+3],e[0]}I.readFloatLE=N?L:P,I.readFloatBE=N?P:L}():function(){function e(N,A,U,L){var P=A<0?1:0;if(P&&(A=-A),A===0)N(1/A>0?0:2147483648,U,L);else if(isNaN(A))N(2143289344,U,L);else if(A>34028234663852886e22)N((P<<31|2139095040)>>>0,U,L);else if(A<11754943508222875e-54)N((P<<31|Math.round(A/1401298464324817e-60))>>>0,U,L);else{var Z=Math.floor(Math.log(A)/Math.LN2),F=Math.round(A*Math.pow(2,-Z)*8388608)&8388607;N((P<<31|Z+127<<23|F)>>>0,U,L)}}I.writeFloatLE=e.bind(null,q),I.writeFloatBE=e.bind(null,k);function u(N,A,U){var L=N(A,U),P=(L>>31)*2+1,Z=L>>>23&255,F=L&8388607;return Z===255?F?NaN:P*(1/0):Z===0?P*1401298464324817e-60*F:P*Math.pow(2,Z-150)*(F+8388608)}I.readFloatLE=u.bind(null,D),I.readFloatBE=u.bind(null,$)}(),typeof Float64Array<"u"?function(){var e=new Float64Array([-0]),u=new Uint8Array(e.buffer),N=u[7]===128;function A(Z,F,W){e[0]=Z,F[W]=u[0],F[W+1]=u[1],F[W+2]=u[2],F[W+3]=u[3],F[W+4]=u[4],F[W+5]=u[5],F[W+6]=u[6],F[W+7]=u[7]}function U(Z,F,W){e[0]=Z,F[W]=u[7],F[W+1]=u[6],F[W+2]=u[5],F[W+3]=u[4],F[W+4]=u[3],F[W+5]=u[2],F[W+6]=u[1],F[W+7]=u[0]}I.writeDoubleLE=N?A:U,I.writeDoubleBE=N?U:A;function L(Z,F){return u[0]=Z[F],u[1]=Z[F+1],u[2]=Z[F+2],u[3]=Z[F+3],u[4]=Z[F+4],u[5]=Z[F+5],u[6]=Z[F+6],u[7]=Z[F+7],e[0]}function P(Z,F){return u[7]=Z[F],u[6]=Z[F+1],u[5]=Z[F+2],u[4]=Z[F+3],u[3]=Z[F+4],u[2]=Z[F+5],u[1]=Z[F+6],u[0]=Z[F+7],e[0]}I.readDoubleLE=N?L:P,I.readDoubleBE=N?P:L}():function(){function e(N,A,U,L,P,Z){var F=L<0?1:0;if(F&&(L=-L),L===0)N(0,P,Z+A),N(1/L>0?0:2147483648,P,Z+U);else if(isNaN(L))N(0,P,Z+A),N(2146959360,P,Z+U);else if(L>17976931348623157e292)N(0,P,Z+A),N((F<<31|2146435072)>>>0,P,Z+U);else{var W;if(L<22250738585072014e-324)W=L/5e-324,N(W>>>0,P,Z+A),N((F<<31|W/4294967296)>>>0,P,Z+U);else{var J=Math.floor(Math.log(L)/Math.LN2);J===1024&&(J=1023),W=L*Math.pow(2,-J),N(W*4503599627370496>>>0,P,Z+A),N((F<<31|J+1023<<20|W*1048576&1048575)>>>0,P,Z+U)}}}I.writeDoubleLE=e.bind(null,q,0,4),I.writeDoubleBE=e.bind(null,k,4,0);function u(N,A,U,L,P){var Z=N(L,P+A),F=N(L,P+U),W=(F>>31)*2+1,J=F>>>20&2047,z=4294967296*(F&1048575)+Z;return J===2047?z?NaN:W*(1/0):J===0?W*5e-324*z:W*Math.pow(2,J-1075)*(z+4503599627370496)}I.readDoubleLE=u.bind(null,D,0,4),I.readDoubleBE=u.bind(null,$,4,0)}(),I}function q(I,e,u){e[u]=I&255,e[u+1]=I>>>8&255,e[u+2]=I>>>16&255,e[u+3]=I>>>24}function k(I,e,u){e[u]=I>>>24,e[u+1]=I>>>16&255,e[u+2]=I>>>8&255,e[u+3]=I&255}function D(I,e){return(I[e]|I[e+1]<<8|I[e+2]<<16|I[e+3]<<24)>>>0}function $(I,e){return(I[e]<<24|I[e+1]<<16|I[e+2]<<8|I[e+3])>>>0}return float}var inquire_1,hasRequiredInquire;function requireInquire(){if(hasRequiredInquire)return inquire_1;hasRequiredInquire=1,inquire_1=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(_){}return null}return inquire_1}var utf8={},hasRequiredUtf8;function requireUtf8(){return hasRequiredUtf8||(hasRequiredUtf8=1,function(_){var q=_;q.length=function(D){for(var $=0,I=0,e=0;e<D.length;++e)I=D.charCodeAt(e),I<128?$+=1:I<2048?$+=2:(I&64512)===55296&&(D.charCodeAt(e+1)&64512)===56320?(++e,$+=4):$+=3;return $},q.read=function(D,$,I){var e=I-$;if(e<1)return"";for(var u=null,N=[],A=0,U;$<I;)U=D[$++],U<128?N[A++]=U:U>191&&U<224?N[A++]=(U&31)<<6|D[$++]&63:U>239&&U<365?(U=((U&7)<<18|(D[$++]&63)<<12|(D[$++]&63)<<6|D[$++]&63)-65536,N[A++]=55296+(U>>10),N[A++]=56320+(U&1023)):N[A++]=(U&15)<<12|(D[$++]&63)<<6|D[$++]&63,A>8191&&((u||(u=[])).push(String.fromCharCode.apply(String,N)),A=0);return u?(A&&u.push(String.fromCharCode.apply(String,N.slice(0,A))),u.join("")):String.fromCharCode.apply(String,N.slice(0,A))},q.write=function(D,$,I){for(var e=I,u,N,A=0;A<D.length;++A)u=D.charCodeAt(A),u<128?$[I++]=u:u<2048?($[I++]=u>>6|192,$[I++]=u&63|128):(u&64512)===55296&&((N=D.charCodeAt(A+1))&64512)===56320?(u=65536+((u&1023)<<10)+(N&1023),++A,$[I++]=u>>18|240,$[I++]=u>>12&63|128,$[I++]=u>>6&63|128,$[I++]=u&63|128):($[I++]=u>>12|224,$[I++]=u>>6&63|128,$[I++]=u&63|128);return I-e}}(utf8)),utf8}var pool_1,hasRequiredPool;function requirePool(){if(hasRequiredPool)return pool_1;hasRequiredPool=1,pool_1=_;function _(q,k,D){var $=D||8192,I=$>>>1,e=null,u=$;return function(A){if(A<1||A>I)return q(A);u+A>$&&(e=q($),u=0);var U=k.call(e,u,u+=A);return u&7&&(u=(u|7)+1),U}}return pool_1}var longbits,hasRequiredLongbits;function requireLongbits(){if(hasRequiredLongbits)return longbits;hasRequiredLongbits=1,longbits=q;var _=requireMinimal$1();function q(I,e){this.lo=I>>>0,this.hi=e>>>0}var k=q.zero=new q(0,0);k.toNumber=function(){return 0},k.zzEncode=k.zzDecode=function(){return this},k.length=function(){return 1};var D=q.zeroHash="\0\0\0\0\0\0\0\0";q.fromNumber=function(e){if(e===0)return k;var u=e<0;u&&(e=-e);var N=e>>>0,A=(e-N)/4294967296>>>0;return u&&(A=~A>>>0,N=~N>>>0,++N>4294967295&&(N=0,++A>4294967295&&(A=0))),new q(N,A)},q.from=function(e){if(typeof e=="number")return q.fromNumber(e);if(_.isString(e))if(_.Long)e=_.Long.fromString(e);else return q.fromNumber(parseInt(e,10));return e.low||e.high?new q(e.low>>>0,e.high>>>0):k},q.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var u=~this.lo+1>>>0,N=~this.hi>>>0;return u||(N=N+1>>>0),-(u+N*4294967296)}return this.lo+this.hi*4294967296},q.prototype.toLong=function(e){return _.Long?new _.Long(this.lo|0,this.hi|0,!!e):{low:this.lo|0,high:this.hi|0,unsigned:!!e}};var $=String.prototype.charCodeAt;return q.fromHash=function(e){return e===D?k:new q(($.call(e,0)|$.call(e,1)<<8|$.call(e,2)<<16|$.call(e,3)<<24)>>>0,($.call(e,4)|$.call(e,5)<<8|$.call(e,6)<<16|$.call(e,7)<<24)>>>0)},q.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},q.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},q.prototype.zzDecode=function(){var e=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},q.prototype.length=function(){var e=this.lo,u=(this.lo>>>28|this.hi<<4)>>>0,N=this.hi>>>24;return N===0?u===0?e<16384?e<128?1:2:e<2097152?3:4:u<16384?u<128?5:6:u<2097152?7:8:N<128?9:10},longbits}var hasRequiredMinimal$1;function requireMinimal$1(){return hasRequiredMinimal$1||(hasRequiredMinimal$1=1,function(_){var q=_;q.asPromise=requireAspromise(),q.base64=requireBase64(),q.EventEmitter=requireEventemitter(),q.float=requireFloat(),q.inquire=requireInquire(),q.utf8=requireUtf8(),q.pool=requirePool(),q.LongBits=requireLongbits(),q.isNode=!!(typeof commonjsGlobal<"u"&&commonjsGlobal&&commonjsGlobal.process&&commonjsGlobal.process.versions&&commonjsGlobal.process.versions.node),q.global=q.isNode&&commonjsGlobal||typeof window<"u"&&window||typeof self<"u"&&self||minimal$1,q.emptyArray=Object.freeze?Object.freeze([]):[],q.emptyObject=Object.freeze?Object.freeze({}):{},q.isInteger=Number.isInteger||function(I){return typeof I=="number"&&isFinite(I)&&Math.floor(I)===I},q.isString=function(I){return typeof I=="string"||I instanceof String},q.isObject=function(I){return I&&typeof I=="object"},q.isset=q.isSet=function(I,e){var u=I[e];return u!=null&&I.hasOwnProperty(e)?typeof u!="object"||(Array.isArray(u)?u.length:Object.keys(u).length)>0:!1},q.Buffer=function(){try{var $=q.inquire("buffer").Buffer;return $.prototype.utf8Write?$:null}catch{return null}}(),q._Buffer_from=null,q._Buffer_allocUnsafe=null,q.newBuffer=function(I){return typeof I=="number"?q.Buffer?q._Buffer_allocUnsafe(I):new q.Array(I):q.Buffer?q._Buffer_from(I):typeof Uint8Array>"u"?I:new Uint8Array(I)},q.Array=typeof Uint8Array<"u"?Uint8Array:Array,q.Long=q.global.dcodeIO&&q.global.dcodeIO.Long||q.global.Long||q.inquire("long"),q.key2Re=/^true|false|0|1$/,q.key32Re=/^-?(?:0|[1-9][0-9]*)$/,q.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,q.longToHash=function(I){return I?q.LongBits.from(I).toHash():q.LongBits.zeroHash},q.longFromHash=function(I,e){var u=q.LongBits.fromHash(I);return q.Long?q.Long.fromBits(u.lo,u.hi,e):u.toNumber(!!e)};function k($,I,e){for(var u=Object.keys(I),N=0;N<u.length;++N)($[u[N]]===void 0||!e)&&($[u[N]]=I[u[N]]);return $}q.merge=k,q.lcFirst=function(I){return I.charAt(0).toLowerCase()+I.substring(1)};function D($){function I(e,u){if(!(this instanceof I))return new I(e,u);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,I):Object.defineProperty(this,"stack",{value:new Error().stack||""}),u&&k(this,u)}return I.prototype=Object.create(Error.prototype,{constructor:{value:I,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return $},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),I}q.newError=D,q.ProtocolError=D("ProtocolError"),q.oneOfGetter=function(I){for(var e={},u=0;u<I.length;++u)e[I[u]]=1;return function(){for(var N=Object.keys(this),A=N.length-1;A>-1;--A)if(e[N[A]]===1&&this[N[A]]!==void 0&&this[N[A]]!==null)return N[A]}},q.oneOfSetter=function(I){return function(e){for(var u=0;u<I.length;++u)I[u]!==e&&delete this[I[u]]}},q.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},q._configure=function(){var $=q.Buffer;if(!$){q._Buffer_from=q._Buffer_allocUnsafe=null;return}q._Buffer_from=$.from!==Uint8Array.from&&$.from||function(e,u){return new $(e,u)},q._Buffer_allocUnsafe=$.allocUnsafe||function(e){return new $(e)}}}(minimal$1)),minimal$1}var writer,hasRequiredWriter;function requireWriter(){if(hasRequiredWriter)return writer;hasRequiredWriter=1,writer=N;var _=requireMinimal$1(),q,k=_.LongBits,D=_.base64,$=_.utf8;function I(J,z,V){this.fn=J,this.len=z,this.next=void 0,this.val=V}function e(){}function u(J){this.head=J.head,this.tail=J.tail,this.len=J.len,this.next=J.states}function N(){this.len=0,this.head=new I(e,0,0),this.tail=this.head,this.states=null}var A=function(){return _.Buffer?function(){return(N.create=function(){return new q})()}:function(){return new N}};N.create=A(),N.alloc=function(z){return new _.Array(z)},_.Array!==Array&&(N.alloc=_.pool(N.alloc,_.Array.prototype.subarray)),N.prototype._push=function(z,V,X){return this.tail=this.tail.next=new I(z,V,X),this.len+=V,this};function U(J,z,V){z[V]=J&255}function L(J,z,V){for(;J>127;)z[V++]=J&127|128,J>>>=7;z[V]=J}function P(J,z){this.len=J,this.next=void 0,this.val=z}P.prototype=Object.create(I.prototype),P.prototype.fn=L,N.prototype.uint32=function(z){return this.len+=(this.tail=this.tail.next=new P((z=z>>>0)<128?1:z<16384?2:z<2097152?3:z<268435456?4:5,z)).len,this},N.prototype.int32=function(z){return z<0?this._push(Z,10,k.fromNumber(z)):this.uint32(z)},N.prototype.sint32=function(z){return this.uint32((z<<1^z>>31)>>>0)};function Z(J,z,V){for(;J.hi;)z[V++]=J.lo&127|128,J.lo=(J.lo>>>7|J.hi<<25)>>>0,J.hi>>>=7;for(;J.lo>127;)z[V++]=J.lo&127|128,J.lo=J.lo>>>7;z[V++]=J.lo}N.prototype.uint64=function(z){var V=k.from(z);return this._push(Z,V.length(),V)},N.prototype.int64=N.prototype.uint64,N.prototype.sint64=function(z){var V=k.from(z).zzEncode();return this._push(Z,V.length(),V)},N.prototype.bool=function(z){return this._push(U,1,z?1:0)};function F(J,z,V){z[V]=J&255,z[V+1]=J>>>8&255,z[V+2]=J>>>16&255,z[V+3]=J>>>24}N.prototype.fixed32=function(z){return this._push(F,4,z>>>0)},N.prototype.sfixed32=N.prototype.fixed32,N.prototype.fixed64=function(z){var V=k.from(z);return this._push(F,4,V.lo)._push(F,4,V.hi)},N.prototype.sfixed64=N.prototype.fixed64,N.prototype.float=function(z){return this._push(_.float.writeFloatLE,4,z)},N.prototype.double=function(z){return this._push(_.float.writeDoubleLE,8,z)};var W=_.Array.prototype.set?function(z,V,X){V.set(z,X)}:function(z,V,X){for(var Y=0;Y<z.length;++Y)V[X+Y]=z[Y]};return N.prototype.bytes=function(z){var V=z.length>>>0;if(!V)return this._push(U,1,0);if(_.isString(z)){var X=N.alloc(V=D.length(z));D.decode(z,X,0),z=X}return this.uint32(V)._push(W,V,z)},N.prototype.string=function(z){var V=$.length(z);return V?this.uint32(V)._push($.write,V,z):this._push(U,1,0)},N.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new I(e,0,0),this.len=0,this},N.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new I(e,0,0),this.len=0),this},N.prototype.ldelim=function(){var z=this.head,V=this.tail,X=this.len;return this.reset().uint32(X),X&&(this.tail.next=z.next,this.tail=V,this.len+=X),this},N.prototype.finish=function(){for(var z=this.head.next,V=this.constructor.alloc(this.len),X=0;z;)z.fn(z.val,V,X),X+=z.len,z=z.next;return V},N._configure=function(J){q=J,N.create=A(),q._configure()},writer}var writer_buffer,hasRequiredWriter_buffer;function requireWriter_buffer(){if(hasRequiredWriter_buffer)return writer_buffer;hasRequiredWriter_buffer=1,writer_buffer=k;var _=requireWriter();(k.prototype=Object.create(_.prototype)).constructor=k;var q=requireMinimal$1();function k(){_.call(this)}k._configure=function(){k.alloc=q._Buffer_allocUnsafe,k.writeBytesBuffer=q.Buffer&&q.Buffer.prototype instanceof Uint8Array&&q.Buffer.prototype.set.name==="set"?function(I,e,u){e.set(I,u)}:function(I,e,u){if(I.copy)I.copy(e,u,0,I.length);else for(var N=0;N<I.length;)e[u++]=I[N++]}},k.prototype.bytes=function(I){q.isString(I)&&(I=q._Buffer_from(I,"base64"));var e=I.length>>>0;return this.uint32(e),e&&this._push(k.writeBytesBuffer,e,I),this};function D($,I,e){$.length<40?q.utf8.write($,I,e):I.utf8Write?I.utf8Write($,e):I.write($,e)}return k.prototype.string=function(I){var e=q.Buffer.byteLength(I);return this.uint32(e),e&&this._push(D,e,I),this},k._configure(),writer_buffer}var reader,hasRequiredReader;function requireReader(){if(hasRequiredReader)return reader;hasRequiredReader=1,reader=I;var _=requireMinimal$1(),q,k=_.LongBits,D=_.utf8;function $(L,P){return RangeError("index out of range: "+L.pos+" + "+(P||1)+" > "+L.len)}function I(L){this.buf=L,this.pos=0,this.len=L.length}var e=typeof Uint8Array<"u"?function(P){if(P instanceof Uint8Array||Array.isArray(P))return new I(P);throw Error("illegal buffer")}:function(P){if(Array.isArray(P))return new I(P);throw Error("illegal buffer")},u=function(){return _.Buffer?function(Z){return(I.create=function(W){return _.Buffer.isBuffer(W)?new q(W):e(W)})(Z)}:e};I.create=u(),I.prototype._slice=_.Array.prototype.subarray||_.Array.prototype.slice,I.prototype.uint32=function(){var P=4294967295;return function(){if(P=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(P=(P|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(P=(P|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(P=(P|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(P=(P|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return P;if((this.pos+=5)>this.len)throw this.pos=this.len,$(this,10);return P}}(),I.prototype.int32=function(){return this.uint32()|0},I.prototype.sint32=function(){var P=this.uint32();return P>>>1^-(P&1)|0};function N(){var L=new k(0,0),P=0;if(this.len-this.pos>4){for(;P<4;++P)if(L.lo=(L.lo|(this.buf[this.pos]&127)<<P*7)>>>0,this.buf[this.pos++]<128)return L;if(L.lo=(L.lo|(this.buf[this.pos]&127)<<28)>>>0,L.hi=(L.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return L;P=0}else{for(;P<3;++P){if(this.pos>=this.len)throw $(this);if(L.lo=(L.lo|(this.buf[this.pos]&127)<<P*7)>>>0,this.buf[this.pos++]<128)return L}return L.lo=(L.lo|(this.buf[this.pos++]&127)<<P*7)>>>0,L}if(this.len-this.pos>4){for(;P<5;++P)if(L.hi=(L.hi|(this.buf[this.pos]&127)<<P*7+3)>>>0,this.buf[this.pos++]<128)return L}else for(;P<5;++P){if(this.pos>=this.len)throw $(this);if(L.hi=(L.hi|(this.buf[this.pos]&127)<<P*7+3)>>>0,this.buf[this.pos++]<128)return L}throw Error("invalid varint encoding")}I.prototype.bool=function(){return this.uint32()!==0};function A(L,P){return(L[P-4]|L[P-3]<<8|L[P-2]<<16|L[P-1]<<24)>>>0}I.prototype.fixed32=function(){if(this.pos+4>this.len)throw $(this,4);return A(this.buf,this.pos+=4)},I.prototype.sfixed32=function(){if(this.pos+4>this.len)throw $(this,4);return A(this.buf,this.pos+=4)|0};function U(){if(this.pos+8>this.len)throw $(this,8);return new k(A(this.buf,this.pos+=4),A(this.buf,this.pos+=4))}return I.prototype.float=function(){if(this.pos+4>this.len)throw $(this,4);var P=_.float.readFloatLE(this.buf,this.pos);return this.pos+=4,P},I.prototype.double=function(){if(this.pos+8>this.len)throw $(this,4);var P=_.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,P},I.prototype.bytes=function(){var P=this.uint32(),Z=this.pos,F=this.pos+P;if(F>this.len)throw $(this,P);if(this.pos+=P,Array.isArray(this.buf))return this.buf.slice(Z,F);if(Z===F){var W=_.Buffer;return W?W.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,Z,F)},I.prototype.string=function(){var P=this.bytes();return D.read(P,0,P.length)},I.prototype.skip=function(P){if(typeof P=="number"){if(this.pos+P>this.len)throw $(this,P);this.pos+=P}else do if(this.pos>=this.len)throw $(this);while(this.buf[this.pos++]&128);return this},I.prototype.skipType=function(L){switch(L){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(L=this.uint32()&7)!==4;)this.skipType(L);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+L+" at offset "+this.pos)}return this},I._configure=function(L){q=L,I.create=u(),q._configure();var P=_.Long?"toLong":"toNumber";_.merge(I.prototype,{int64:function(){return N.call(this)[P](!1)},uint64:function(){return N.call(this)[P](!0)},sint64:function(){return N.call(this).zzDecode()[P](!1)},fixed64:function(){return U.call(this)[P](!0)},sfixed64:function(){return U.call(this)[P](!1)}})},reader}var reader_buffer,hasRequiredReader_buffer;function requireReader_buffer(){if(hasRequiredReader_buffer)return reader_buffer;hasRequiredReader_buffer=1,reader_buffer=k;var _=requireReader();(k.prototype=Object.create(_.prototype)).constructor=k;var q=requireMinimal$1();function k(D){_.call(this,D)}return k._configure=function(){q.Buffer&&(k.prototype._slice=q.Buffer.prototype.slice)},k.prototype.string=function(){var $=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+$,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+$,this.len))},k._configure(),reader_buffer}var rpc={},service,hasRequiredService;function requireService(){if(hasRequiredService)return service;hasRequiredService=1,service=q;var _=requireMinimal$1();(q.prototype=Object.create(_.EventEmitter.prototype)).constructor=q;function q(k,D,$){if(typeof k!="function")throw TypeError("rpcImpl must be a function");_.EventEmitter.call(this),this.rpcImpl=k,this.requestDelimited=!!D,this.responseDelimited=!!$}return q.prototype.rpcCall=function k(D,$,I,e,u){if(!e)throw TypeError("request must be specified");var N=this;if(!u)return _.asPromise(k,N,D,$,I,e);if(!N.rpcImpl){setTimeout(function(){u(Error("already ended"))},0);return}try{return N.rpcImpl(D,$[N.requestDelimited?"encodeDelimited":"encode"](e).finish(),function(U,L){if(U)return N.emit("error",U,D),u(U);if(L===null){N.end(!0);return}if(!(L instanceof I))try{L=I[N.responseDelimited?"decodeDelimited":"decode"](L)}catch(P){return N.emit("error",P,D),u(P)}return N.emit("data",L,D),u(null,L)})}catch(A){N.emit("error",A,D),setTimeout(function(){u(A)},0);return}},q.prototype.end=function(D){return this.rpcImpl&&(D||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this},service}var hasRequiredRpc;function requireRpc(){return hasRequiredRpc||(hasRequiredRpc=1,function(_){var q=_;q.Service=requireService()}(rpc)),rpc}var roots,hasRequiredRoots;function requireRoots(){return hasRequiredRoots||(hasRequiredRoots=1,roots={}),roots}var hasRequiredIndexMinimal;function requireIndexMinimal(){return hasRequiredIndexMinimal||(hasRequiredIndexMinimal=1,function(_){var q=_;q.build="minimal",q.Writer=requireWriter(),q.BufferWriter=requireWriter_buffer(),q.Reader=requireReader(),q.BufferReader=requireReader_buffer(),q.util=requireMinimal$1(),q.rpc=requireRpc(),q.roots=requireRoots(),q.configure=k;function k(){q.util._configure(),q.Writer._configure(q.BufferWriter),q.Reader._configure(q.BufferReader)}k()}(indexMinimal)),indexMinimal}var minimal,hasRequiredMinimal;function requireMinimal(){return hasRequiredMinimal||(hasRequiredMinimal=1,minimal=requireIndexMinimal()),minimal}var minimalExports=requireMinimal();const $Reader=minimalExports.Reader,$Writer=minimalExports.Writer,$util=minimalExports.util,$root=minimalExports.roots.default||(minimalExports.roots.default={}),com=$root.com=(()=>{const _={};return _.quick=function(){const q={};return q.voice=function(){const k={};return k.proto=function(){const D={};return D.CommonReq=function(){function $(I){if(I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.event="",$.prototype.data=$util.newBuffer([]),$.prototype.sn=$util.Long?$util.Long.fromBits(0,0,!1):0,$.prototype.time=$util.Long?$util.Long.fromBits(0,0,!1):0,$.prototype.valid=$util.Long?$util.Long.fromBits(0,0,!1):0,$.prototype.version=0,$.prototype.compress=!1,$.create=function(e){return new $(e)},$.encode=function(e,u){return u||(u=$Writer.create()),e.event!=null&&Object.hasOwnProperty.call(e,"event")&&u.uint32(10).string(e.event),e.data!=null&&Object.hasOwnProperty.call(e,"data")&&u.uint32(18).bytes(e.data),e.sn!=null&&Object.hasOwnProperty.call(e,"sn")&&u.uint32(24).int64(e.sn),e.time!=null&&Object.hasOwnProperty.call(e,"time")&&u.uint32(32).int64(e.time),e.valid!=null&&Object.hasOwnProperty.call(e,"valid")&&u.uint32(40).int64(e.valid),e.version!=null&&Object.hasOwnProperty.call(e,"version")&&u.uint32(48).int32(e.version),e.compress!=null&&Object.hasOwnProperty.call(e,"compress")&&u.uint32(56).bool(e.compress),u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.CommonReq;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.event=e.string();break}case 2:{A.data=e.bytes();break}case 3:{A.sn=e.int64();break}case 4:{A.time=e.int64();break}case 5:{A.valid=e.int64();break}case 6:{A.version=e.int32();break}case 7:{A.compress=e.bool();break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){return typeof e!="object"||e===null?"object expected":e.event!=null&&e.hasOwnProperty("event")&&!$util.isString(e.event)?"event: string expected":e.data!=null&&e.hasOwnProperty("data")&&!(e.data&&typeof e.data.length=="number"||$util.isString(e.data))?"data: buffer expected":e.sn!=null&&e.hasOwnProperty("sn")&&!$util.isInteger(e.sn)&&!(e.sn&&$util.isInteger(e.sn.low)&&$util.isInteger(e.sn.high))?"sn: integer|Long expected":e.time!=null&&e.hasOwnProperty("time")&&!$util.isInteger(e.time)&&!(e.time&&$util.isInteger(e.time.low)&&$util.isInteger(e.time.high))?"time: integer|Long expected":e.valid!=null&&e.hasOwnProperty("valid")&&!$util.isInteger(e.valid)&&!(e.valid&&$util.isInteger(e.valid.low)&&$util.isInteger(e.valid.high))?"valid: integer|Long expected":e.version!=null&&e.hasOwnProperty("version")&&!$util.isInteger(e.version)?"version: integer expected":e.compress!=null&&e.hasOwnProperty("compress")&&typeof e.compress!="boolean"?"compress: boolean expected":null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.CommonReq)return e;let u=new $root.com.quick.voice.proto.CommonReq;return e.event!=null&&(u.event=String(e.event)),e.data!=null&&(typeof e.data=="string"?$util.base64.decode(e.data,u.data=$util.newBuffer($util.base64.length(e.data)),0):e.data.length>=0&&(u.data=e.data)),e.sn!=null&&($util.Long?(u.sn=$util.Long.fromValue(e.sn)).unsigned=!1:typeof e.sn=="string"?u.sn=parseInt(e.sn,10):typeof e.sn=="number"?u.sn=e.sn:typeof e.sn=="object"&&(u.sn=new $util.LongBits(e.sn.low>>>0,e.sn.high>>>0).toNumber())),e.time!=null&&($util.Long?(u.time=$util.Long.fromValue(e.time)).unsigned=!1:typeof e.time=="string"?u.time=parseInt(e.time,10):typeof e.time=="number"?u.time=e.time:typeof e.time=="object"&&(u.time=new $util.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber())),e.valid!=null&&($util.Long?(u.valid=$util.Long.fromValue(e.valid)).unsigned=!1:typeof e.valid=="string"?u.valid=parseInt(e.valid,10):typeof e.valid=="number"?u.valid=e.valid:typeof e.valid=="object"&&(u.valid=new $util.LongBits(e.valid.low>>>0,e.valid.high>>>0).toNumber())),e.version!=null&&(u.version=e.version|0),e.compress!=null&&(u.compress=!!e.compress),u},$.toObject=function(e,u){u||(u={});let N={};if(u.defaults){if(N.event="",u.bytes===String?N.data="":(N.data=[],u.bytes!==Array&&(N.data=$util.newBuffer(N.data))),$util.Long){let A=new $util.Long(0,0,!1);N.sn=u.longs===String?A.toString():u.longs===Number?A.toNumber():A}else N.sn=u.longs===String?"0":0;if($util.Long){let A=new $util.Long(0,0,!1);N.time=u.longs===String?A.toString():u.longs===Number?A.toNumber():A}else N.time=u.longs===String?"0":0;if($util.Long){let A=new $util.Long(0,0,!1);N.valid=u.longs===String?A.toString():u.longs===Number?A.toNumber():A}else N.valid=u.longs===String?"0":0;N.version=0,N.compress=!1}return e.event!=null&&e.hasOwnProperty("event")&&(N.event=e.event),e.data!=null&&e.hasOwnProperty("data")&&(N.data=u.bytes===String?$util.base64.encode(e.data,0,e.data.length):u.bytes===Array?Array.prototype.slice.call(e.data):e.data),e.sn!=null&&e.hasOwnProperty("sn")&&(typeof e.sn=="number"?N.sn=u.longs===String?String(e.sn):e.sn:N.sn=u.longs===String?$util.Long.prototype.toString.call(e.sn):u.longs===Number?new $util.LongBits(e.sn.low>>>0,e.sn.high>>>0).toNumber():e.sn),e.time!=null&&e.hasOwnProperty("time")&&(typeof e.time=="number"?N.time=u.longs===String?String(e.time):e.time:N.time=u.longs===String?$util.Long.prototype.toString.call(e.time):u.longs===Number?new $util.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber():e.time),e.valid!=null&&e.hasOwnProperty("valid")&&(typeof e.valid=="number"?N.valid=u.longs===String?String(e.valid):e.valid:N.valid=u.longs===String?$util.Long.prototype.toString.call(e.valid):u.longs===Number?new $util.LongBits(e.valid.low>>>0,e.valid.high>>>0).toNumber():e.valid),e.version!=null&&e.hasOwnProperty("version")&&(N.version=e.version),e.compress!=null&&e.hasOwnProperty("compress")&&(N.compress=e.compress),N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.CommonReq"},$}(),D.CommonRsp=function(){function $(I){if(I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.event="",$.prototype.data=$util.newBuffer([]),$.prototype.sn=$util.Long?$util.Long.fromBits(0,0,!1):0,$.prototype.time=$util.Long?$util.Long.fromBits(0,0,!1):0,$.prototype.valid=$util.Long?$util.Long.fromBits(0,0,!1):0,$.prototype.code=0,$.prototype.desc="",$.prototype.version=0,$.prototype.compress=!1,$.create=function(e){return new $(e)},$.encode=function(e,u){return u||(u=$Writer.create()),e.event!=null&&Object.hasOwnProperty.call(e,"event")&&u.uint32(10).string(e.event),e.data!=null&&Object.hasOwnProperty.call(e,"data")&&u.uint32(18).bytes(e.data),e.sn!=null&&Object.hasOwnProperty.call(e,"sn")&&u.uint32(24).int64(e.sn),e.time!=null&&Object.hasOwnProperty.call(e,"time")&&u.uint32(32).int64(e.time),e.valid!=null&&Object.hasOwnProperty.call(e,"valid")&&u.uint32(40).int64(e.valid),e.code!=null&&Object.hasOwnProperty.call(e,"code")&&u.uint32(48).int32(e.code),e.desc!=null&&Object.hasOwnProperty.call(e,"desc")&&u.uint32(58).string(e.desc),e.version!=null&&Object.hasOwnProperty.call(e,"version")&&u.uint32(64).int32(e.version),e.compress!=null&&Object.hasOwnProperty.call(e,"compress")&&u.uint32(72).bool(e.compress),u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.CommonRsp;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.event=e.string();break}case 2:{A.data=e.bytes();break}case 3:{A.sn=e.int64();break}case 4:{A.time=e.int64();break}case 5:{A.valid=e.int64();break}case 6:{A.code=e.int32();break}case 7:{A.desc=e.string();break}case 8:{A.version=e.int32();break}case 9:{A.compress=e.bool();break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){return typeof e!="object"||e===null?"object expected":e.event!=null&&e.hasOwnProperty("event")&&!$util.isString(e.event)?"event: string expected":e.data!=null&&e.hasOwnProperty("data")&&!(e.data&&typeof e.data.length=="number"||$util.isString(e.data))?"data: buffer expected":e.sn!=null&&e.hasOwnProperty("sn")&&!$util.isInteger(e.sn)&&!(e.sn&&$util.isInteger(e.sn.low)&&$util.isInteger(e.sn.high))?"sn: integer|Long expected":e.time!=null&&e.hasOwnProperty("time")&&!$util.isInteger(e.time)&&!(e.time&&$util.isInteger(e.time.low)&&$util.isInteger(e.time.high))?"time: integer|Long expected":e.valid!=null&&e.hasOwnProperty("valid")&&!$util.isInteger(e.valid)&&!(e.valid&&$util.isInteger(e.valid.low)&&$util.isInteger(e.valid.high))?"valid: integer|Long expected":e.code!=null&&e.hasOwnProperty("code")&&!$util.isInteger(e.code)?"code: integer expected":e.desc!=null&&e.hasOwnProperty("desc")&&!$util.isString(e.desc)?"desc: string expected":e.version!=null&&e.hasOwnProperty("version")&&!$util.isInteger(e.version)?"version: integer expected":e.compress!=null&&e.hasOwnProperty("compress")&&typeof e.compress!="boolean"?"compress: boolean expected":null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.CommonRsp)return e;let u=new $root.com.quick.voice.proto.CommonRsp;return e.event!=null&&(u.event=String(e.event)),e.data!=null&&(typeof e.data=="string"?$util.base64.decode(e.data,u.data=$util.newBuffer($util.base64.length(e.data)),0):e.data.length>=0&&(u.data=e.data)),e.sn!=null&&($util.Long?(u.sn=$util.Long.fromValue(e.sn)).unsigned=!1:typeof e.sn=="string"?u.sn=parseInt(e.sn,10):typeof e.sn=="number"?u.sn=e.sn:typeof e.sn=="object"&&(u.sn=new $util.LongBits(e.sn.low>>>0,e.sn.high>>>0).toNumber())),e.time!=null&&($util.Long?(u.time=$util.Long.fromValue(e.time)).unsigned=!1:typeof e.time=="string"?u.time=parseInt(e.time,10):typeof e.time=="number"?u.time=e.time:typeof e.time=="object"&&(u.time=new $util.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber())),e.valid!=null&&($util.Long?(u.valid=$util.Long.fromValue(e.valid)).unsigned=!1:typeof e.valid=="string"?u.valid=parseInt(e.valid,10):typeof e.valid=="number"?u.valid=e.valid:typeof e.valid=="object"&&(u.valid=new $util.LongBits(e.valid.low>>>0,e.valid.high>>>0).toNumber())),e.code!=null&&(u.code=e.code|0),e.desc!=null&&(u.desc=String(e.desc)),e.version!=null&&(u.version=e.version|0),e.compress!=null&&(u.compress=!!e.compress),u},$.toObject=function(e,u){u||(u={});let N={};if(u.defaults){if(N.event="",u.bytes===String?N.data="":(N.data=[],u.bytes!==Array&&(N.data=$util.newBuffer(N.data))),$util.Long){let A=new $util.Long(0,0,!1);N.sn=u.longs===String?A.toString():u.longs===Number?A.toNumber():A}else N.sn=u.longs===String?"0":0;if($util.Long){let A=new $util.Long(0,0,!1);N.time=u.longs===String?A.toString():u.longs===Number?A.toNumber():A}else N.time=u.longs===String?"0":0;if($util.Long){let A=new $util.Long(0,0,!1);N.valid=u.longs===String?A.toString():u.longs===Number?A.toNumber():A}else N.valid=u.longs===String?"0":0;N.code=0,N.desc="",N.version=0,N.compress=!1}return e.event!=null&&e.hasOwnProperty("event")&&(N.event=e.event),e.data!=null&&e.hasOwnProperty("data")&&(N.data=u.bytes===String?$util.base64.encode(e.data,0,e.data.length):u.bytes===Array?Array.prototype.slice.call(e.data):e.data),e.sn!=null&&e.hasOwnProperty("sn")&&(typeof e.sn=="number"?N.sn=u.longs===String?String(e.sn):e.sn:N.sn=u.longs===String?$util.Long.prototype.toString.call(e.sn):u.longs===Number?new $util.LongBits(e.sn.low>>>0,e.sn.high>>>0).toNumber():e.sn),e.time!=null&&e.hasOwnProperty("time")&&(typeof e.time=="number"?N.time=u.longs===String?String(e.time):e.time:N.time=u.longs===String?$util.Long.prototype.toString.call(e.time):u.longs===Number?new $util.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber():e.time),e.valid!=null&&e.hasOwnProperty("valid")&&(typeof e.valid=="number"?N.valid=u.longs===String?String(e.valid):e.valid:N.valid=u.longs===String?$util.Long.prototype.toString.call(e.valid):u.longs===Number?new $util.LongBits(e.valid.low>>>0,e.valid.high>>>0).toNumber():e.valid),e.code!=null&&e.hasOwnProperty("code")&&(N.code=e.code),e.desc!=null&&e.hasOwnProperty("desc")&&(N.desc=e.desc),e.version!=null&&e.hasOwnProperty("version")&&(N.version=e.version),e.compress!=null&&e.hasOwnProperty("compress")&&(N.compress=e.compress),N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.CommonRsp"},$}(),D.User=function(){function $(e){if(this.tracks=[],e)for(let u=Object.keys(e),N=0;N<u.length;++N)e[u[N]]!=null&&(this[u[N]]=e[u[N]])}$.prototype.id="",$.prototype.callAction=null,$.prototype.callState=null,$.prototype.joinTime=null,$.prototype.tracks=$util.emptyArray,$.prototype.permissions=null,$.prototype.isPublished=null,$.prototype.behavior=null;let I;return Object.defineProperty($.prototype,"_callAction",{get:$util.oneOfGetter(I=["callAction"]),set:$util.oneOfSetter(I)}),Object.defineProperty($.prototype,"_callState",{get:$util.oneOfGetter(I=["callState"]),set:$util.oneOfSetter(I)}),Object.defineProperty($.prototype,"_joinTime",{get:$util.oneOfGetter(I=["joinTime"]),set:$util.oneOfSetter(I)}),Object.defineProperty($.prototype,"_permissions",{get:$util.oneOfGetter(I=["permissions"]),set:$util.oneOfSetter(I)}),Object.defineProperty($.prototype,"_isPublished",{get:$util.oneOfGetter(I=["isPublished"]),set:$util.oneOfSetter(I)}),Object.defineProperty($.prototype,"_behavior",{get:$util.oneOfGetter(I=["behavior"]),set:$util.oneOfSetter(I)}),$.create=function(u){return new $(u)},$.encode=function(u,N){if(N||(N=$Writer.create()),u.id!=null&&Object.hasOwnProperty.call(u,"id")&&N.uint32(10).string(u.id),u.callAction!=null&&Object.hasOwnProperty.call(u,"callAction")&&N.uint32(16).int32(u.callAction),u.callState!=null&&Object.hasOwnProperty.call(u,"callState")&&N.uint32(24).int32(u.callState),u.joinTime!=null&&Object.hasOwnProperty.call(u,"joinTime")&&N.uint32(32).int64(u.joinTime),u.tracks!=null&&u.tracks.length)for(let A=0;A<u.tracks.length;++A)$root.com.quick.voice.proto.Track.encode(u.tracks[A],N.uint32(42).fork()).ldelim();return u.permissions!=null&&Object.hasOwnProperty.call(u,"permissions")&&N.uint32(48).int32(u.permissions),u.isPublished!=null&&Object.hasOwnProperty.call(u,"isPublished")&&N.uint32(56).bool(u.isPublished),u.behavior!=null&&Object.hasOwnProperty.call(u,"behavior")&&N.uint32(64).int32(u.behavior),N},$.encodeDelimited=function(u,N){return this.encode(u,N).ldelim()},$.decode=function(u,N){u instanceof $Reader||(u=$Reader.create(u));let A=N===void 0?u.len:u.pos+N,U=new $root.com.quick.voice.proto.User;for(;u.pos<A;){let L=u.uint32();switch(L>>>3){case 1:{U.id=u.string();break}case 2:{U.callAction=u.int32();break}case 3:{U.callState=u.int32();break}case 4:{U.joinTime=u.int64();break}case 5:{U.tracks&&U.tracks.length||(U.tracks=[]),U.tracks.push($root.com.quick.voice.proto.Track.decode(u,u.uint32()));break}case 6:{U.permissions=u.int32();break}case 7:{U.isPublished=u.bool();break}case 8:{U.behavior=u.int32();break}default:u.skipType(L&7);break}}return U},$.decodeDelimited=function(u){return u instanceof $Reader||(u=new $Reader(u)),this.decode(u,u.uint32())},$.verify=function(u){if(typeof u!="object"||u===null)return"object expected";if(u.id!=null&&u.hasOwnProperty("id")&&!$util.isString(u.id))return"id: string expected";if(u.callAction!=null&&u.hasOwnProperty("callAction")&&!$util.isInteger(u.callAction))return"callAction: integer expected";if(u.callState!=null&&u.hasOwnProperty("callState")&&!$util.isInteger(u.callState))return"callState: integer expected";if(u.joinTime!=null&&u.hasOwnProperty("joinTime")&&!$util.isInteger(u.joinTime)&&!(u.joinTime&&$util.isInteger(u.joinTime.low)&&$util.isInteger(u.joinTime.high)))return"joinTime: integer|Long expected";if(u.tracks!=null&&u.hasOwnProperty("tracks")){if(!Array.isArray(u.tracks))return"tracks: array expected";for(let N=0;N<u.tracks.length;++N){let A=$root.com.quick.voice.proto.Track.verify(u.tracks[N]);if(A)return"tracks."+A}}return u.permissions!=null&&u.hasOwnProperty("permissions")&&!$util.isInteger(u.permissions)?"permissions: integer expected":u.isPublished!=null&&u.hasOwnProperty("isPublished")&&typeof u.isPublished!="boolean"?"isPublished: boolean expected":u.behavior!=null&&u.hasOwnProperty("behavior")&&!$util.isInteger(u.behavior)?"behavior: integer expected":null},$.fromObject=function(u){if(u instanceof $root.com.quick.voice.proto.User)return u;let N=new $root.com.quick.voice.proto.User;if(u.id!=null&&(N.id=String(u.id)),u.callAction!=null&&(N.callAction=u.callAction|0),u.callState!=null&&(N.callState=u.callState|0),u.joinTime!=null&&($util.Long?(N.joinTime=$util.Long.fromValue(u.joinTime)).unsigned=!1:typeof u.joinTime=="string"?N.joinTime=parseInt(u.joinTime,10):typeof u.joinTime=="number"?N.joinTime=u.joinTime:typeof u.joinTime=="object"&&(N.joinTime=new $util.LongBits(u.joinTime.low>>>0,u.joinTime.high>>>0).toNumber())),u.tracks){if(!Array.isArray(u.tracks))throw TypeError(".com.quick.voice.proto.User.tracks: array expected");N.tracks=[];for(let A=0;A<u.tracks.length;++A){if(typeof u.tracks[A]!="object")throw TypeError(".com.quick.voice.proto.User.tracks: object expected");N.tracks[A]=$root.com.quick.voice.proto.Track.fromObject(u.tracks[A])}}return u.permissions!=null&&(N.permissions=u.permissions|0),u.isPublished!=null&&(N.isPublished=!!u.isPublished),u.behavior!=null&&(N.behavior=u.behavior|0),N},$.toObject=function(u,N){N||(N={});let A={};if((N.arrays||N.defaults)&&(A.tracks=[]),N.defaults&&(A.id=""),u.id!=null&&u.hasOwnProperty("id")&&(A.id=u.id),u.callAction!=null&&u.hasOwnProperty("callAction")&&(A.callAction=u.callAction,N.oneofs&&(A._callAction="callAction")),u.callState!=null&&u.hasOwnProperty("callState")&&(A.callState=u.callState,N.oneofs&&(A._callState="callState")),u.joinTime!=null&&u.hasOwnProperty("joinTime")&&(typeof u.joinTime=="number"?A.joinTime=N.longs===String?String(u.joinTime):u.joinTime:A.joinTime=N.longs===String?$util.Long.prototype.toString.call(u.joinTime):N.longs===Number?new $util.LongBits(u.joinTime.low>>>0,u.joinTime.high>>>0).toNumber():u.joinTime,N.oneofs&&(A._joinTime="joinTime")),u.tracks&&u.tracks.length){A.tracks=[];for(let U=0;U<u.tracks.length;++U)A.tracks[U]=$root.com.quick.voice.proto.Track.toObject(u.tracks[U],N)}return u.permissions!=null&&u.hasOwnProperty("permissions")&&(A.permissions=u.permissions,N.oneofs&&(A._permissions="permissions")),u.isPublished!=null&&u.hasOwnProperty("isPublished")&&(A.isPublished=u.isPublished,N.oneofs&&(A._isPublished="isPublished")),u.behavior!=null&&u.hasOwnProperty("behavior")&&(A.behavior=u.behavior,N.oneofs&&(A._behavior="behavior")),A},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/com.quick.voice.proto.User"},$}(),D.Login=function(){function $(I){if(I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.appid="",$.prototype.userId="",$.prototype.sdkToken="",$.create=function(e){return new $(e)},$.encode=function(e,u){return u||(u=$Writer.create()),e.appid!=null&&Object.hasOwnProperty.call(e,"appid")&&u.uint32(10).string(e.appid),e.userId!=null&&Object.hasOwnProperty.call(e,"userId")&&u.uint32(18).string(e.userId),e.sdkToken!=null&&Object.hasOwnProperty.call(e,"sdkToken")&&u.uint32(26).string(e.sdkToken),u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.Login;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.appid=e.string();break}case 2:{A.userId=e.string();break}case 3:{A.sdkToken=e.string();break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){return typeof e!="object"||e===null?"object expected":e.appid!=null&&e.hasOwnProperty("appid")&&!$util.isString(e.appid)?"appid: string expected":e.userId!=null&&e.hasOwnProperty("userId")&&!$util.isString(e.userId)?"userId: string expected":e.sdkToken!=null&&e.hasOwnProperty("sdkToken")&&!$util.isString(e.sdkToken)?"sdkToken: string expected":null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.Login)return e;let u=new $root.com.quick.voice.proto.Login;return e.appid!=null&&(u.appid=String(e.appid)),e.userId!=null&&(u.userId=String(e.userId)),e.sdkToken!=null&&(u.sdkToken=String(e.sdkToken)),u},$.toObject=function(e,u){u||(u={});let N={};return u.defaults&&(N.appid="",N.userId="",N.sdkToken=""),e.appid!=null&&e.hasOwnProperty("appid")&&(N.appid=e.appid),e.userId!=null&&e.hasOwnProperty("userId")&&(N.userId=e.userId),e.sdkToken!=null&&e.hasOwnProperty("sdkToken")&&(N.sdkToken=e.sdkToken),N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.Login"},$}(),D.Track=function(){function $(e){if(e)for(let u=Object.keys(e),N=0;N<u.length;++N)e[u[N]]!=null&&(this[u[N]]=e[u[N]])}$.prototype.mid="",$.prototype.trackName=null,$.prototype.location=null,$.prototype.userId=null,$.prototype.code=null,$.prototype.desc=null,$.prototype.type=null,$.prototype.isValid=null;let I;return Object.defineProperty($.prototype,"_trackName",{get:$util.oneOfGetter(I=["trackName"]),set:$util.oneOfSetter(I)}),Object.defineProperty($.prototype,"_location",{get:$util.oneOfGetter(I=["location"]),set:$util.oneOfSetter(I)}),Object.defineProperty($.prototype,"_userId",{get:$util.oneOfGetter(I=["userId"]),set:$util.oneOfSetter(I)}),Object.defineProperty($.prototype,"_code",{get:$util.oneOfGetter(I=["code"]),set:$util.oneOfSetter(I)}),Object.defineProperty($.prototype,"_desc",{get:$util.oneOfGetter(I=["desc"]),set:$util.oneOfSetter(I)}),Object.defineProperty($.prototype,"_type",{get:$util.oneOfGetter(I=["type"]),set:$util.oneOfSetter(I)}),Object.defineProperty($.prototype,"_isValid",{get:$util.oneOfGetter(I=["isValid"]),set:$util.oneOfSetter(I)}),$.create=function(u){return new $(u)},$.encode=function(u,N){return N||(N=$Writer.create()),u.mid!=null&&Object.hasOwnProperty.call(u,"mid")&&N.uint32(10).string(u.mid),u.trackName!=null&&Object.hasOwnProperty.call(u,"trackName")&&N.uint32(18).string(u.trackName),u.location!=null&&Object.hasOwnProperty.call(u,"location")&&N.uint32(26).string(u.location),u.userId!=null&&Object.hasOwnProperty.call(u,"userId")&&N.uint32(34).string(u.userId),u.code!=null&&Object.hasOwnProperty.call(u,"code")&&N.uint32(40).int32(u.code),u.desc!=null&&Object.hasOwnProperty.call(u,"desc")&&N.uint32(50).string(u.desc),u.type!=null&&Object.hasOwnProperty.call(u,"type")&&N.uint32(56).int32(u.type),u.isValid!=null&&Object.hasOwnProperty.call(u,"isValid")&&N.uint32(64).bool(u.isValid),N},$.encodeDelimited=function(u,N){return this.encode(u,N).ldelim()},$.decode=function(u,N){u instanceof $Reader||(u=$Reader.create(u));let A=N===void 0?u.len:u.pos+N,U=new $root.com.quick.voice.proto.Track;for(;u.pos<A;){let L=u.uint32();switch(L>>>3){case 1:{U.mid=u.string();break}case 2:{U.trackName=u.string();break}case 3:{U.location=u.string();break}case 4:{U.userId=u.string();break}case 5:{U.code=u.int32();break}case 6:{U.desc=u.string();break}case 7:{U.type=u.int32();break}case 8:{U.isValid=u.bool();break}default:u.skipType(L&7);break}}return U},$.decodeDelimited=function(u){return u instanceof $Reader||(u=new $Reader(u)),this.decode(u,u.uint32())},$.verify=function(u){if(typeof u!="object"||u===null)return"object expected";if(u.mid!=null&&u.hasOwnProperty("mid")&&!$util.isString(u.mid))return"mid: string expected";if(u.trackName!=null&&u.hasOwnProperty("trackName")&&!$util.isString(u.trackName))return"trackName: string expected";if(u.location!=null&&u.hasOwnProperty("location")&&!$util.isString(u.location))return"location: string expected";if(u.userId!=null&&u.hasOwnProperty("userId")&&!$util.isString(u.userId))return"userId: string expected";if(u.code!=null&&u.hasOwnProperty("code")&&!$util.isInteger(u.code))return"code: integer expected";if(u.desc!=null&&u.hasOwnProperty("desc")&&!$util.isString(u.desc))return"desc: string expected";if(u.type!=null&&u.hasOwnProperty("type"))switch(u.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:break}return u.isValid!=null&&u.hasOwnProperty("isValid")&&typeof u.isValid!="boolean"?"isValid: boolean expected":null},$.fromObject=function(u){if(u instanceof $root.com.quick.voice.proto.Track)return u;let N=new $root.com.quick.voice.proto.Track;switch(u.mid!=null&&(N.mid=String(u.mid)),u.trackName!=null&&(N.trackName=String(u.trackName)),u.location!=null&&(N.location=String(u.location)),u.userId!=null&&(N.userId=String(u.userId)),u.code!=null&&(N.code=u.code|0),u.desc!=null&&(N.desc=String(u.desc)),u.type){default:if(typeof u.type=="number"){N.type=u.type;break}break;case"Microphone":case 0:N.type=0;break;case"Camera":case 1:N.type=1;break;case"Screen":case 2:N.type=2;break;case"SystemVoice":case 3:N.type=3;break}return u.isValid!=null&&(N.isValid=!!u.isValid),N},$.toObject=function(u,N){N||(N={});let A={};return N.defaults&&(A.mid=""),u.mid!=null&&u.hasOwnProperty("mid")&&(A.mid=u.mid),u.trackName!=null&&u.hasOwnProperty("trackName")&&(A.trackName=u.trackName,N.oneofs&&(A._trackName="trackName")),u.location!=null&&u.hasOwnProperty("location")&&(A.location=u.location,N.oneofs&&(A._location="location")),u.userId!=null&&u.hasOwnProperty("userId")&&(A.userId=u.userId,N.oneofs&&(A._userId="userId")),u.code!=null&&u.hasOwnProperty("code")&&(A.code=u.code,N.oneofs&&(A._code="code")),u.desc!=null&&u.hasOwnProperty("desc")&&(A.desc=u.desc,N.oneofs&&(A._desc="desc")),u.type!=null&&u.hasOwnProperty("type")&&(A.type=N.enums===String?$root.com.quick.voice.proto.TrackType[u.type]===void 0?u.type:$root.com.quick.voice.proto.TrackType[u.type]:u.type,N.oneofs&&(A._type="type")),u.isValid!=null&&u.hasOwnProperty("isValid")&&(A.isValid=u.isValid,N.oneofs&&(A._isValid="isValid")),A},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/com.quick.voice.proto.Track"},$}(),D.JoinReq=function(){function $(I){if(I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.roomId="",$.prototype.user=null,$.prototype.callType=0,$.create=function(e){return new $(e)},$.encode=function(e,u){return u||(u=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&u.uint32(10).string(e.roomId),e.user!=null&&Object.hasOwnProperty.call(e,"user")&&$root.com.quick.voice.proto.User.encode(e.user,u.uint32(18).fork()).ldelim(),e.callType!=null&&Object.hasOwnProperty.call(e,"callType")&&u.uint32(24).int32(e.callType),u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.JoinReq;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.roomId=e.string();break}case 2:{A.user=$root.com.quick.voice.proto.User.decode(e,e.uint32());break}case 3:{A.callType=e.int32();break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId))return"roomId: string expected";if(e.user!=null&&e.hasOwnProperty("user")){let u=$root.com.quick.voice.proto.User.verify(e.user);if(u)return"user."+u}if(e.callType!=null&&e.hasOwnProperty("callType"))switch(e.callType){default:return"callType: enum value expected";case 0:case 1:case 2:break}return null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.JoinReq)return e;let u=new $root.com.quick.voice.proto.JoinReq;if(e.roomId!=null&&(u.roomId=String(e.roomId)),e.user!=null){if(typeof e.user!="object")throw TypeError(".com.quick.voice.proto.JoinReq.user: object expected");u.user=$root.com.quick.voice.proto.User.fromObject(e.user)}switch(e.callType){default:if(typeof e.callType=="number"){u.callType=e.callType;break}break;case"Normal":case 0:u.callType=0;break;case"Meeting":case 1:u.callType=1;break;case"Live":case 2:u.callType=2;break}return u},$.toObject=function(e,u){u||(u={});let N={};return u.defaults&&(N.roomId="",N.user=null,N.callType=u.enums===String?"Normal":0),e.roomId!=null&&e.hasOwnProperty("roomId")&&(N.roomId=e.roomId),e.user!=null&&e.hasOwnProperty("user")&&(N.user=$root.com.quick.voice.proto.User.toObject(e.user,u)),e.callType!=null&&e.hasOwnProperty("callType")&&(N.callType=u.enums===String?$root.com.quick.voice.proto.CallType[e.callType]===void 0?e.callType:$root.com.quick.voice.proto.CallType[e.callType]:e.callType),N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.JoinReq"},$}(),D.JoinRsp=function(){function $(I){if(this.roomUsers=[],I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.roomId="",$.prototype.roomUsers=$util.emptyArray,$.prototype.callType=0,$.create=function(e){return new $(e)},$.encode=function(e,u){if(u||(u=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&u.uint32(10).string(e.roomId),e.roomUsers!=null&&e.roomUsers.length)for(let N=0;N<e.roomUsers.length;++N)$root.com.quick.voice.proto.User.encode(e.roomUsers[N],u.uint32(18).fork()).ldelim();return e.callType!=null&&Object.hasOwnProperty.call(e,"callType")&&u.uint32(24).int32(e.callType),u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.JoinRsp;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.roomId=e.string();break}case 2:{A.roomUsers&&A.roomUsers.length||(A.roomUsers=[]),A.roomUsers.push($root.com.quick.voice.proto.User.decode(e,e.uint32()));break}case 3:{A.callType=e.int32();break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId))return"roomId: string expected";if(e.roomUsers!=null&&e.hasOwnProperty("roomUsers")){if(!Array.isArray(e.roomUsers))return"roomUsers: array expected";for(let u=0;u<e.roomUsers.length;++u){let N=$root.com.quick.voice.proto.User.verify(e.roomUsers[u]);if(N)return"roomUsers."+N}}if(e.callType!=null&&e.hasOwnProperty("callType"))switch(e.callType){default:return"callType: enum value expected";case 0:case 1:case 2:break}return null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.JoinRsp)return e;let u=new $root.com.quick.voice.proto.JoinRsp;if(e.roomId!=null&&(u.roomId=String(e.roomId)),e.roomUsers){if(!Array.isArray(e.roomUsers))throw TypeError(".com.quick.voice.proto.JoinRsp.roomUsers: array expected");u.roomUsers=[];for(let N=0;N<e.roomUsers.length;++N){if(typeof e.roomUsers[N]!="object")throw TypeError(".com.quick.voice.proto.JoinRsp.roomUsers: object expected");u.roomUsers[N]=$root.com.quick.voice.proto.User.fromObject(e.roomUsers[N])}}switch(e.callType){default:if(typeof e.callType=="number"){u.callType=e.callType;break}break;case"Normal":case 0:u.callType=0;break;case"Meeting":case 1:u.callType=1;break;case"Live":case 2:u.callType=2;break}return u},$.toObject=function(e,u){u||(u={});let N={};if((u.arrays||u.defaults)&&(N.roomUsers=[]),u.defaults&&(N.roomId="",N.callType=u.enums===String?"Normal":0),e.roomId!=null&&e.hasOwnProperty("roomId")&&(N.roomId=e.roomId),e.roomUsers&&e.roomUsers.length){N.roomUsers=[];for(let A=0;A<e.roomUsers.length;++A)N.roomUsers[A]=$root.com.quick.voice.proto.User.toObject(e.roomUsers[A],u)}return e.callType!=null&&e.hasOwnProperty("callType")&&(N.callType=u.enums===String?$root.com.quick.voice.proto.CallType[e.callType]===void 0?e.callType:$root.com.quick.voice.proto.CallType[e.callType]:e.callType),N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.JoinRsp"},$}(),D.JoinNotify=function(){function $(I){if(I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.roomId="",$.prototype.user=null,$.create=function(e){return new $(e)},$.encode=function(e,u){return u||(u=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&u.uint32(10).string(e.roomId),e.user!=null&&Object.hasOwnProperty.call(e,"user")&&$root.com.quick.voice.proto.User.encode(e.user,u.uint32(18).fork()).ldelim(),u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.JoinNotify;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.roomId=e.string();break}case 2:{A.user=$root.com.quick.voice.proto.User.decode(e,e.uint32());break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId))return"roomId: string expected";if(e.user!=null&&e.hasOwnProperty("user")){let u=$root.com.quick.voice.proto.User.verify(e.user);if(u)return"user."+u}return null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.JoinNotify)return e;let u=new $root.com.quick.voice.proto.JoinNotify;if(e.roomId!=null&&(u.roomId=String(e.roomId)),e.user!=null){if(typeof e.user!="object")throw TypeError(".com.quick.voice.proto.JoinNotify.user: object expected");u.user=$root.com.quick.voice.proto.User.fromObject(e.user)}return u},$.toObject=function(e,u){u||(u={});let N={};return u.defaults&&(N.roomId="",N.user=null),e.roomId!=null&&e.hasOwnProperty("roomId")&&(N.roomId=e.roomId),e.user!=null&&e.hasOwnProperty("user")&&(N.user=$root.com.quick.voice.proto.User.toObject(e.user,u)),N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.JoinNotify"},$}(),D.ConnectCFReq=function(){function $(I){if(I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.sdp="",$.create=function(e){return new $(e)},$.encode=function(e,u){return u||(u=$Writer.create()),e.sdp!=null&&Object.hasOwnProperty.call(e,"sdp")&&u.uint32(10).string(e.sdp),u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.ConnectCFReq;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.sdp=e.string();break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){return typeof e!="object"||e===null?"object expected":e.sdp!=null&&e.hasOwnProperty("sdp")&&!$util.isString(e.sdp)?"sdp: string expected":null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.ConnectCFReq)return e;let u=new $root.com.quick.voice.proto.ConnectCFReq;return e.sdp!=null&&(u.sdp=String(e.sdp)),u},$.toObject=function(e,u){u||(u={});let N={};return u.defaults&&(N.sdp=""),e.sdp!=null&&e.hasOwnProperty("sdp")&&(N.sdp=e.sdp),N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.ConnectCFReq"},$}(),D.ConnectCFRsp=function(){function $(I){if(this.subscribeUsers=[],I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.remoteSdp="",$.prototype.subscribeUsers=$util.emptyArray,$.create=function(e){return new $(e)},$.encode=function(e,u){if(u||(u=$Writer.create()),e.remoteSdp!=null&&Object.hasOwnProperty.call(e,"remoteSdp")&&u.uint32(10).string(e.remoteSdp),e.subscribeUsers!=null&&e.subscribeUsers.length)for(let N=0;N<e.subscribeUsers.length;++N)$root.com.quick.voice.proto.User.encode(e.subscribeUsers[N],u.uint32(18).fork()).ldelim();return u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.ConnectCFRsp;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.remoteSdp=e.string();break}case 2:{A.subscribeUsers&&A.subscribeUsers.length||(A.subscribeUsers=[]),A.subscribeUsers.push($root.com.quick.voice.proto.User.decode(e,e.uint32()));break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.remoteSdp!=null&&e.hasOwnProperty("remoteSdp")&&!$util.isString(e.remoteSdp))return"remoteSdp: string expected";if(e.subscribeUsers!=null&&e.hasOwnProperty("subscribeUsers")){if(!Array.isArray(e.subscribeUsers))return"subscribeUsers: array expected";for(let u=0;u<e.subscribeUsers.length;++u){let N=$root.com.quick.voice.proto.User.verify(e.subscribeUsers[u]);if(N)return"subscribeUsers."+N}}return null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.ConnectCFRsp)return e;let u=new $root.com.quick.voice.proto.ConnectCFRsp;if(e.remoteSdp!=null&&(u.remoteSdp=String(e.remoteSdp)),e.subscribeUsers){if(!Array.isArray(e.subscribeUsers))throw TypeError(".com.quick.voice.proto.ConnectCFRsp.subscribeUsers: array expected");u.subscribeUsers=[];for(let N=0;N<e.subscribeUsers.length;++N){if(typeof e.subscribeUsers[N]!="object")throw TypeError(".com.quick.voice.proto.ConnectCFRsp.subscribeUsers: object expected");u.subscribeUsers[N]=$root.com.quick.voice.proto.User.fromObject(e.subscribeUsers[N])}}return u},$.toObject=function(e,u){u||(u={});let N={};if((u.arrays||u.defaults)&&(N.subscribeUsers=[]),u.defaults&&(N.remoteSdp=""),e.remoteSdp!=null&&e.hasOwnProperty("remoteSdp")&&(N.remoteSdp=e.remoteSdp),e.subscribeUsers&&e.subscribeUsers.length){N.subscribeUsers=[];for(let A=0;A<e.subscribeUsers.length;++A)N.subscribeUsers[A]=$root.com.quick.voice.proto.User.toObject(e.subscribeUsers[A],u)}return N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.ConnectCFRsp"},$}(),D.PublishReq=function(){function $(e){if(this.tracks=[],e)for(let u=Object.keys(e),N=0;N<u.length;++N)e[u[N]]!=null&&(this[u[N]]=e[u[N]])}$.prototype.sdp="",$.prototype.tracks=$util.emptyArray,$.prototype.callAction=0,$.prototype.recreate=null;let I;return Object.defineProperty($.prototype,"_recreate",{get:$util.oneOfGetter(I=["recreate"]),set:$util.oneOfSetter(I)}),$.create=function(u){return new $(u)},$.encode=function(u,N){if(N||(N=$Writer.create()),u.sdp!=null&&Object.hasOwnProperty.call(u,"sdp")&&N.uint32(10).string(u.sdp),u.tracks!=null&&u.tracks.length)for(let A=0;A<u.tracks.length;++A)$root.com.quick.voice.proto.Track.encode(u.tracks[A],N.uint32(18).fork()).ldelim();return u.callAction!=null&&Object.hasOwnProperty.call(u,"callAction")&&N.uint32(24).int32(u.callAction),u.recreate!=null&&Object.hasOwnProperty.call(u,"recreate")&&N.uint32(32).bool(u.recreate),N},$.encodeDelimited=function(u,N){return this.encode(u,N).ldelim()},$.decode=function(u,N){u instanceof $Reader||(u=$Reader.create(u));let A=N===void 0?u.len:u.pos+N,U=new $root.com.quick.voice.proto.PublishReq;for(;u.pos<A;){let L=u.uint32();switch(L>>>3){case 1:{U.sdp=u.string();break}case 2:{U.tracks&&U.tracks.length||(U.tracks=[]),U.tracks.push($root.com.quick.voice.proto.Track.decode(u,u.uint32()));break}case 3:{U.callAction=u.int32();break}case 4:{U.recreate=u.bool();break}default:u.skipType(L&7);break}}return U},$.decodeDelimited=function(u){return u instanceof $Reader||(u=new $Reader(u)),this.decode(u,u.uint32())},$.verify=function(u){if(typeof u!="object"||u===null)return"object expected";if(u.sdp!=null&&u.hasOwnProperty("sdp")&&!$util.isString(u.sdp))return"sdp: string expected";if(u.tracks!=null&&u.hasOwnProperty("tracks")){if(!Array.isArray(u.tracks))return"tracks: array expected";for(let N=0;N<u.tracks.length;++N){let A=$root.com.quick.voice.proto.Track.verify(u.tracks[N]);if(A)return"tracks."+A}}return u.callAction!=null&&u.hasOwnProperty("callAction")&&!$util.isInteger(u.callAction)?"callAction: integer expected":u.recreate!=null&&u.hasOwnProperty("recreate")&&typeof u.recreate!="boolean"?"recreate: boolean expected":null},$.fromObject=function(u){if(u instanceof $root.com.quick.voice.proto.PublishReq)return u;let N=new $root.com.quick.voice.proto.PublishReq;if(u.sdp!=null&&(N.sdp=String(u.sdp)),u.tracks){if(!Array.isArray(u.tracks))throw TypeError(".com.quick.voice.proto.PublishReq.tracks: array expected");N.tracks=[];for(let A=0;A<u.tracks.length;++A){if(typeof u.tracks[A]!="object")throw TypeError(".com.quick.voice.proto.PublishReq.tracks: object expected");N.tracks[A]=$root.com.quick.voice.proto.Track.fromObject(u.tracks[A])}}return u.callAction!=null&&(N.callAction=u.callAction|0),u.recreate!=null&&(N.recreate=!!u.recreate),N},$.toObject=function(u,N){N||(N={});let A={};if((N.arrays||N.defaults)&&(A.tracks=[]),N.defaults&&(A.sdp="",A.callAction=0),u.sdp!=null&&u.hasOwnProperty("sdp")&&(A.sdp=u.sdp),u.tracks&&u.tracks.length){A.tracks=[];for(let U=0;U<u.tracks.length;++U)A.tracks[U]=$root.com.quick.voice.proto.Track.toObject(u.tracks[U],N)}return u.callAction!=null&&u.hasOwnProperty("callAction")&&(A.callAction=u.callAction),u.recreate!=null&&u.hasOwnProperty("recreate")&&(A.recreate=u.recreate,N.oneofs&&(A._recreate="recreate")),A},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/com.quick.voice.proto.PublishReq"},$}(),D.PublishRsp=function(){function $(I){if(I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.remoteSdp="",$.create=function(e){return new $(e)},$.encode=function(e,u){return u||(u=$Writer.create()),e.remoteSdp!=null&&Object.hasOwnProperty.call(e,"remoteSdp")&&u.uint32(10).string(e.remoteSdp),u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.PublishRsp;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.remoteSdp=e.string();break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){return typeof e!="object"||e===null?"object expected":e.remoteSdp!=null&&e.hasOwnProperty("remoteSdp")&&!$util.isString(e.remoteSdp)?"remoteSdp: string expected":null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.PublishRsp)return e;let u=new $root.com.quick.voice.proto.PublishRsp;return e.remoteSdp!=null&&(u.remoteSdp=String(e.remoteSdp)),u},$.toObject=function(e,u){u||(u={});let N={};return u.defaults&&(N.remoteSdp=""),e.remoteSdp!=null&&e.hasOwnProperty("remoteSdp")&&(N.remoteSdp=e.remoteSdp),N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.PublishRsp"},$}(),D.PublishNotify=function(){function $(I){if(I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.roomId="",$.prototype.user=null,$.create=function(e){return new $(e)},$.encode=function(e,u){return u||(u=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&u.uint32(10).string(e.roomId),e.user!=null&&Object.hasOwnProperty.call(e,"user")&&$root.com.quick.voice.proto.User.encode(e.user,u.uint32(18).fork()).ldelim(),u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.PublishNotify;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.roomId=e.string();break}case 2:{A.user=$root.com.quick.voice.proto.User.decode(e,e.uint32());break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId))return"roomId: string expected";if(e.user!=null&&e.hasOwnProperty("user")){let u=$root.com.quick.voice.proto.User.verify(e.user);if(u)return"user."+u}return null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.PublishNotify)return e;let u=new $root.com.quick.voice.proto.PublishNotify;if(e.roomId!=null&&(u.roomId=String(e.roomId)),e.user!=null){if(typeof e.user!="object")throw TypeError(".com.quick.voice.proto.PublishNotify.user: object expected");u.user=$root.com.quick.voice.proto.User.fromObject(e.user)}return u},$.toObject=function(e,u){u||(u={});let N={};return u.defaults&&(N.roomId="",N.user=null),e.roomId!=null&&e.hasOwnProperty("roomId")&&(N.roomId=e.roomId),e.user!=null&&e.hasOwnProperty("user")&&(N.user=$root.com.quick.voice.proto.User.toObject(e.user,u)),N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.PublishNotify"},$}(),D.SubscribeReq=function(){function $(I){if(this.users=[],I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.users=$util.emptyArray,$.create=function(e){return new $(e)},$.encode=function(e,u){if(u||(u=$Writer.create()),e.users!=null&&e.users.length)for(let N=0;N<e.users.length;++N)$root.com.quick.voice.proto.User.encode(e.users[N],u.uint32(10).fork()).ldelim();return u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.SubscribeReq;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.users&&A.users.length||(A.users=[]),A.users.push($root.com.quick.voice.proto.User.decode(e,e.uint32()));break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.users!=null&&e.hasOwnProperty("users")){if(!Array.isArray(e.users))return"users: array expected";for(let u=0;u<e.users.length;++u){let N=$root.com.quick.voice.proto.User.verify(e.users[u]);if(N)return"users."+N}}return null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.SubscribeReq)return e;let u=new $root.com.quick.voice.proto.SubscribeReq;if(e.users){if(!Array.isArray(e.users))throw TypeError(".com.quick.voice.proto.SubscribeReq.users: array expected");u.users=[];for(let N=0;N<e.users.length;++N){if(typeof e.users[N]!="object")throw TypeError(".com.quick.voice.proto.SubscribeReq.users: object expected");u.users[N]=$root.com.quick.voice.proto.User.fromObject(e.users[N])}}return u},$.toObject=function(e,u){u||(u={});let N={};if((u.arrays||u.defaults)&&(N.users=[]),e.users&&e.users.length){N.users=[];for(let A=0;A<e.users.length;++A)N.users[A]=$root.com.quick.voice.proto.User.toObject(e.users[A],u)}return N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.SubscribeReq"},$}(),D.SubscribeRsp=function(){function $(I){if(this.users=[],I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.remoteSdp="",$.prototype.users=$util.emptyArray,$.create=function(e){return new $(e)},$.encode=function(e,u){if(u||(u=$Writer.create()),e.remoteSdp!=null&&Object.hasOwnProperty.call(e,"remoteSdp")&&u.uint32(10).string(e.remoteSdp),e.users!=null&&e.users.length)for(let N=0;N<e.users.length;++N)$root.com.quick.voice.proto.User.encode(e.users[N],u.uint32(18).fork()).ldelim();return u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.SubscribeRsp;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.remoteSdp=e.string();break}case 2:{A.users&&A.users.length||(A.users=[]),A.users.push($root.com.quick.voice.proto.User.decode(e,e.uint32()));break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.remoteSdp!=null&&e.hasOwnProperty("remoteSdp")&&!$util.isString(e.remoteSdp))return"remoteSdp: string expected";if(e.users!=null&&e.hasOwnProperty("users")){if(!Array.isArray(e.users))return"users: array expected";for(let u=0;u<e.users.length;++u){let N=$root.com.quick.voice.proto.User.verify(e.users[u]);if(N)return"users."+N}}return null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.SubscribeRsp)return e;let u=new $root.com.quick.voice.proto.SubscribeRsp;if(e.remoteSdp!=null&&(u.remoteSdp=String(e.remoteSdp)),e.users){if(!Array.isArray(e.users))throw TypeError(".com.quick.voice.proto.SubscribeRsp.users: array expected");u.users=[];for(let N=0;N<e.users.length;++N){if(typeof e.users[N]!="object")throw TypeError(".com.quick.voice.proto.SubscribeRsp.users: object expected");u.users[N]=$root.com.quick.voice.proto.User.fromObject(e.users[N])}}return u},$.toObject=function(e,u){u||(u={});let N={};if((u.arrays||u.defaults)&&(N.users=[]),u.defaults&&(N.remoteSdp=""),e.remoteSdp!=null&&e.hasOwnProperty("remoteSdp")&&(N.remoteSdp=e.remoteSdp),e.users&&e.users.length){N.users=[];for(let A=0;A<e.users.length;++A)N.users[A]=$root.com.quick.voice.proto.User.toObject(e.users[A],u)}return N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.SubscribeRsp"},$}(),D.RenegotiateReq=function(){function $(I){if(I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.userId="",$.prototype.sdp="",$.create=function(e){return new $(e)},$.encode=function(e,u){return u||(u=$Writer.create()),e.userId!=null&&Object.hasOwnProperty.call(e,"userId")&&u.uint32(10).string(e.userId),e.sdp!=null&&Object.hasOwnProperty.call(e,"sdp")&&u.uint32(18).string(e.sdp),u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.RenegotiateReq;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.userId=e.string();break}case 2:{A.sdp=e.string();break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){return typeof e!="object"||e===null?"object expected":e.userId!=null&&e.hasOwnProperty("userId")&&!$util.isString(e.userId)?"userId: string expected":e.sdp!=null&&e.hasOwnProperty("sdp")&&!$util.isString(e.sdp)?"sdp: string expected":null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.RenegotiateReq)return e;let u=new $root.com.quick.voice.proto.RenegotiateReq;return e.userId!=null&&(u.userId=String(e.userId)),e.sdp!=null&&(u.sdp=String(e.sdp)),u},$.toObject=function(e,u){u||(u={});let N={};return u.defaults&&(N.userId="",N.sdp=""),e.userId!=null&&e.hasOwnProperty("userId")&&(N.userId=e.userId),e.sdp!=null&&e.hasOwnProperty("sdp")&&(N.sdp=e.sdp),N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.RenegotiateReq"},$}(),D.QuitReq=function(){function $(I){if(I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.userId="",$.prototype.roomId="",$.create=function(e){return new $(e)},$.encode=function(e,u){return u||(u=$Writer.create()),e.userId!=null&&Object.hasOwnProperty.call(e,"userId")&&u.uint32(10).string(e.userId),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&u.uint32(18).string(e.roomId),u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.QuitReq;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.userId=e.string();break}case 2:{A.roomId=e.string();break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){return typeof e!="object"||e===null?"object expected":e.userId!=null&&e.hasOwnProperty("userId")&&!$util.isString(e.userId)?"userId: string expected":e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId)?"roomId: string expected":null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.QuitReq)return e;let u=new $root.com.quick.voice.proto.QuitReq;return e.userId!=null&&(u.userId=String(e.userId)),e.roomId!=null&&(u.roomId=String(e.roomId)),u},$.toObject=function(e,u){u||(u={});let N={};return u.defaults&&(N.userId="",N.roomId=""),e.userId!=null&&e.hasOwnProperty("userId")&&(N.userId=e.userId),e.roomId!=null&&e.hasOwnProperty("roomId")&&(N.roomId=e.roomId),N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.QuitReq"},$}(),D.QuitNotify=function(){function $(e){if(e)for(let u=Object.keys(e),N=0;N<u.length;++N)e[u[N]]!=null&&(this[u[N]]=e[u[N]])}$.prototype.roomId="",$.prototype.user=null,$.prototype.code=null,$.prototype.desc=null;let I;return Object.defineProperty($.prototype,"_code",{get:$util.oneOfGetter(I=["code"]),set:$util.oneOfSetter(I)}),Object.defineProperty($.prototype,"_desc",{get:$util.oneOfGetter(I=["desc"]),set:$util.oneOfSetter(I)}),$.create=function(u){return new $(u)},$.encode=function(u,N){return N||(N=$Writer.create()),u.roomId!=null&&Object.hasOwnProperty.call(u,"roomId")&&N.uint32(10).string(u.roomId),u.user!=null&&Object.hasOwnProperty.call(u,"user")&&$root.com.quick.voice.proto.User.encode(u.user,N.uint32(18).fork()).ldelim(),u.code!=null&&Object.hasOwnProperty.call(u,"code")&&N.uint32(24).int32(u.code),u.desc!=null&&Object.hasOwnProperty.call(u,"desc")&&N.uint32(34).string(u.desc),N},$.encodeDelimited=function(u,N){return this.encode(u,N).ldelim()},$.decode=function(u,N){u instanceof $Reader||(u=$Reader.create(u));let A=N===void 0?u.len:u.pos+N,U=new $root.com.quick.voice.proto.QuitNotify;for(;u.pos<A;){let L=u.uint32();switch(L>>>3){case 1:{U.roomId=u.string();break}case 2:{U.user=$root.com.quick.voice.proto.User.decode(u,u.uint32());break}case 3:{U.code=u.int32();break}case 4:{U.desc=u.string();break}default:u.skipType(L&7);break}}return U},$.decodeDelimited=function(u){return u instanceof $Reader||(u=new $Reader(u)),this.decode(u,u.uint32())},$.verify=function(u){if(typeof u!="object"||u===null)return"object expected";if(u.roomId!=null&&u.hasOwnProperty("roomId")&&!$util.isString(u.roomId))return"roomId: string expected";if(u.user!=null&&u.hasOwnProperty("user")){let N=$root.com.quick.voice.proto.User.verify(u.user);if(N)return"user."+N}return u.code!=null&&u.hasOwnProperty("code")&&!$util.isInteger(u.code)?"code: integer expected":u.desc!=null&&u.hasOwnProperty("desc")&&!$util.isString(u.desc)?"desc: string expected":null},$.fromObject=function(u){if(u instanceof $root.com.quick.voice.proto.QuitNotify)return u;let N=new $root.com.quick.voice.proto.QuitNotify;if(u.roomId!=null&&(N.roomId=String(u.roomId)),u.user!=null){if(typeof u.user!="object")throw TypeError(".com.quick.voice.proto.QuitNotify.user: object expected");N.user=$root.com.quick.voice.proto.User.fromObject(u.user)}return u.code!=null&&(N.code=u.code|0),u.desc!=null&&(N.desc=String(u.desc)),N},$.toObject=function(u,N){N||(N={});let A={};return N.defaults&&(A.roomId="",A.user=null),u.roomId!=null&&u.hasOwnProperty("roomId")&&(A.roomId=u.roomId),u.user!=null&&u.hasOwnProperty("user")&&(A.user=$root.com.quick.voice.proto.User.toObject(u.user,N)),u.code!=null&&u.hasOwnProperty("code")&&(A.code=u.code,N.oneofs&&(A._code="code")),u.desc!=null&&u.hasOwnProperty("desc")&&(A.desc=u.desc,N.oneofs&&(A._desc="desc")),A},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/com.quick.voice.proto.QuitNotify"},$}(),D.TokenExpireNotify=function(){function $(I){if(I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.roomId="",$.create=function(e){return new $(e)},$.encode=function(e,u){return u||(u=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&u.uint32(10).string(e.roomId),u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.TokenExpireNotify;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.roomId=e.string();break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){return typeof e!="object"||e===null?"object expected":e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId)?"roomId: string expected":null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.TokenExpireNotify)return e;let u=new $root.com.quick.voice.proto.TokenExpireNotify;return e.roomId!=null&&(u.roomId=String(e.roomId)),u},$.toObject=function(e,u){u||(u={});let N={};return u.defaults&&(N.roomId=""),e.roomId!=null&&e.hasOwnProperty("roomId")&&(N.roomId=e.roomId),N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.TokenExpireNotify"},$}(),D.UpdateTokenReq=function(){function $(I){if(I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.roomId="",$.prototype.sdkToken="",$.create=function(e){return new $(e)},$.encode=function(e,u){return u||(u=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&u.uint32(10).string(e.roomId),e.sdkToken!=null&&Object.hasOwnProperty.call(e,"sdkToken")&&u.uint32(18).string(e.sdkToken),u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.UpdateTokenReq;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.roomId=e.string();break}case 2:{A.sdkToken=e.string();break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){return typeof e!="object"||e===null?"object expected":e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId)?"roomId: string expected":e.sdkToken!=null&&e.hasOwnProperty("sdkToken")&&!$util.isString(e.sdkToken)?"sdkToken: string expected":null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.UpdateTokenReq)return e;let u=new $root.com.quick.voice.proto.UpdateTokenReq;return e.roomId!=null&&(u.roomId=String(e.roomId)),e.sdkToken!=null&&(u.sdkToken=String(e.sdkToken)),u},$.toObject=function(e,u){u||(u={});let N={};return u.defaults&&(N.roomId="",N.sdkToken=""),e.roomId!=null&&e.hasOwnProperty("roomId")&&(N.roomId=e.roomId),e.sdkToken!=null&&e.hasOwnProperty("sdkToken")&&(N.sdkToken=e.sdkToken),N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.UpdateTokenReq"},$}(),D.NetQualityChange=function(){function $(I){if(I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.userId="",$.prototype.roomId="",$.prototype.egress=0,$.prototype.ingress=0,$.create=function(e){return new $(e)},$.encode=function(e,u){return u||(u=$Writer.create()),e.userId!=null&&Object.hasOwnProperty.call(e,"userId")&&u.uint32(10).string(e.userId),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&u.uint32(18).string(e.roomId),e.egress!=null&&Object.hasOwnProperty.call(e,"egress")&&u.uint32(24).int32(e.egress),e.ingress!=null&&Object.hasOwnProperty.call(e,"ingress")&&u.uint32(32).int32(e.ingress),u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.NetQualityChange;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.userId=e.string();break}case 2:{A.roomId=e.string();break}case 3:{A.egress=e.int32();break}case 4:{A.ingress=e.int32();break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){return typeof e!="object"||e===null?"object expected":e.userId!=null&&e.hasOwnProperty("userId")&&!$util.isString(e.userId)?"userId: string expected":e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId)?"roomId: string expected":e.egress!=null&&e.hasOwnProperty("egress")&&!$util.isInteger(e.egress)?"egress: integer expected":e.ingress!=null&&e.hasOwnProperty("ingress")&&!$util.isInteger(e.ingress)?"ingress: integer expected":null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.NetQualityChange)return e;let u=new $root.com.quick.voice.proto.NetQualityChange;return e.userId!=null&&(u.userId=String(e.userId)),e.roomId!=null&&(u.roomId=String(e.roomId)),e.egress!=null&&(u.egress=e.egress|0),e.ingress!=null&&(u.ingress=e.ingress|0),u},$.toObject=function(e,u){u||(u={});let N={};return u.defaults&&(N.userId="",N.roomId="",N.egress=0,N.ingress=0),e.userId!=null&&e.hasOwnProperty("userId")&&(N.userId=e.userId),e.roomId!=null&&e.hasOwnProperty("roomId")&&(N.roomId=e.roomId),e.egress!=null&&e.hasOwnProperty("egress")&&(N.egress=e.egress),e.ingress!=null&&e.hasOwnProperty("ingress")&&(N.ingress=e.ingress),N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.NetQualityChange"},$}(),D.NetQualityNotify=function(){function $(I){if(this.qualities=[],I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.qualities=$util.emptyArray,$.create=function(e){return new $(e)},$.encode=function(e,u){if(u||(u=$Writer.create()),e.qualities!=null&&e.qualities.length)for(let N=0;N<e.qualities.length;++N)$root.com.quick.voice.proto.NetQualityChange.encode(e.qualities[N],u.uint32(10).fork()).ldelim();return u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.NetQualityNotify;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.qualities&&A.qualities.length||(A.qualities=[]),A.qualities.push($root.com.quick.voice.proto.NetQualityChange.decode(e,e.uint32()));break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.qualities!=null&&e.hasOwnProperty("qualities")){if(!Array.isArray(e.qualities))return"qualities: array expected";for(let u=0;u<e.qualities.length;++u){let N=$root.com.quick.voice.proto.NetQualityChange.verify(e.qualities[u]);if(N)return"qualities."+N}}return null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.NetQualityNotify)return e;let u=new $root.com.quick.voice.proto.NetQualityNotify;if(e.qualities){if(!Array.isArray(e.qualities))throw TypeError(".com.quick.voice.proto.NetQualityNotify.qualities: array expected");u.qualities=[];for(let N=0;N<e.qualities.length;++N){if(typeof e.qualities[N]!="object")throw TypeError(".com.quick.voice.proto.NetQualityNotify.qualities: object expected");u.qualities[N]=$root.com.quick.voice.proto.NetQualityChange.fromObject(e.qualities[N])}}return u},$.toObject=function(e,u){u||(u={});let N={};if((u.arrays||u.defaults)&&(N.qualities=[]),e.qualities&&e.qualities.length){N.qualities=[];for(let A=0;A<e.qualities.length;++A)N.qualities[A]=$root.com.quick.voice.proto.NetQualityChange.toObject(e.qualities[A],u)}return N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.NetQualityNotify"},$}(),D.UpdateCall=function(){function $(I){if(I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.roomId="",$.prototype.user=null,$.create=function(e){return new $(e)},$.encode=function(e,u){return u||(u=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&u.uint32(10).string(e.roomId),e.user!=null&&Object.hasOwnProperty.call(e,"user")&&$root.com.quick.voice.proto.User.encode(e.user,u.uint32(18).fork()).ldelim(),u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.UpdateCall;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.roomId=e.string();break}case 2:{A.user=$root.com.quick.voice.proto.User.decode(e,e.uint32());break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId))return"roomId: string expected";if(e.user!=null&&e.hasOwnProperty("user")){let u=$root.com.quick.voice.proto.User.verify(e.user);if(u)return"user."+u}return null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.UpdateCall)return e;let u=new $root.com.quick.voice.proto.UpdateCall;if(e.roomId!=null&&(u.roomId=String(e.roomId)),e.user!=null){if(typeof e.user!="object")throw TypeError(".com.quick.voice.proto.UpdateCall.user: object expected");u.user=$root.com.quick.voice.proto.User.fromObject(e.user)}return u},$.toObject=function(e,u){u||(u={});let N={};return u.defaults&&(N.roomId="",N.user=null),e.roomId!=null&&e.hasOwnProperty("roomId")&&(N.roomId=e.roomId),e.user!=null&&e.hasOwnProperty("user")&&(N.user=$root.com.quick.voice.proto.User.toObject(e.user,u)),N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.UpdateCall"},$}(),D.SyncRoomInfoReq=function(){function $(I){if(I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.roomId="",$.prototype.user=null,$.create=function(e){return new $(e)},$.encode=function(e,u){return u||(u=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&u.uint32(10).string(e.roomId),e.user!=null&&Object.hasOwnProperty.call(e,"user")&&$root.com.quick.voice.proto.User.encode(e.user,u.uint32(18).fork()).ldelim(),u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.SyncRoomInfoReq;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.roomId=e.string();break}case 2:{A.user=$root.com.quick.voice.proto.User.decode(e,e.uint32());break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId))return"roomId: string expected";if(e.user!=null&&e.hasOwnProperty("user")){let u=$root.com.quick.voice.proto.User.verify(e.user);if(u)return"user."+u}return null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.SyncRoomInfoReq)return e;let u=new $root.com.quick.voice.proto.SyncRoomInfoReq;if(e.roomId!=null&&(u.roomId=String(e.roomId)),e.user!=null){if(typeof e.user!="object")throw TypeError(".com.quick.voice.proto.SyncRoomInfoReq.user: object expected");u.user=$root.com.quick.voice.proto.User.fromObject(e.user)}return u},$.toObject=function(e,u){u||(u={});let N={};return u.defaults&&(N.roomId="",N.user=null),e.roomId!=null&&e.hasOwnProperty("roomId")&&(N.roomId=e.roomId),e.user!=null&&e.hasOwnProperty("user")&&(N.user=$root.com.quick.voice.proto.User.toObject(e.user,u)),N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.SyncRoomInfoReq"},$}(),D.SyncRoomInfoRsp=function(){function $(I){if(this.users=[],I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.roomId="",$.prototype.isValid=!1,$.prototype.users=$util.emptyArray,$.prototype.isActive=!1,$.create=function(e){return new $(e)},$.encode=function(e,u){if(u||(u=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&u.uint32(10).string(e.roomId),e.isValid!=null&&Object.hasOwnProperty.call(e,"isValid")&&u.uint32(16).bool(e.isValid),e.users!=null&&e.users.length)for(let N=0;N<e.users.length;++N)$root.com.quick.voice.proto.User.encode(e.users[N],u.uint32(26).fork()).ldelim();return e.isActive!=null&&Object.hasOwnProperty.call(e,"isActive")&&u.uint32(32).bool(e.isActive),u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.SyncRoomInfoRsp;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.roomId=e.string();break}case 2:{A.isValid=e.bool();break}case 3:{A.users&&A.users.length||(A.users=[]),A.users.push($root.com.quick.voice.proto.User.decode(e,e.uint32()));break}case 4:{A.isActive=e.bool();break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId))return"roomId: string expected";if(e.isValid!=null&&e.hasOwnProperty("isValid")&&typeof e.isValid!="boolean")return"isValid: boolean expected";if(e.users!=null&&e.hasOwnProperty("users")){if(!Array.isArray(e.users))return"users: array expected";for(let u=0;u<e.users.length;++u){let N=$root.com.quick.voice.proto.User.verify(e.users[u]);if(N)return"users."+N}}return e.isActive!=null&&e.hasOwnProperty("isActive")&&typeof e.isActive!="boolean"?"isActive: boolean expected":null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.SyncRoomInfoRsp)return e;let u=new $root.com.quick.voice.proto.SyncRoomInfoRsp;if(e.roomId!=null&&(u.roomId=String(e.roomId)),e.isValid!=null&&(u.isValid=!!e.isValid),e.users){if(!Array.isArray(e.users))throw TypeError(".com.quick.voice.proto.SyncRoomInfoRsp.users: array expected");u.users=[];for(let N=0;N<e.users.length;++N){if(typeof e.users[N]!="object")throw TypeError(".com.quick.voice.proto.SyncRoomInfoRsp.users: object expected");u.users[N]=$root.com.quick.voice.proto.User.fromObject(e.users[N])}}return e.isActive!=null&&(u.isActive=!!e.isActive),u},$.toObject=function(e,u){u||(u={});let N={};if((u.arrays||u.defaults)&&(N.users=[]),u.defaults&&(N.roomId="",N.isValid=!1,N.isActive=!1),e.roomId!=null&&e.hasOwnProperty("roomId")&&(N.roomId=e.roomId),e.isValid!=null&&e.hasOwnProperty("isValid")&&(N.isValid=e.isValid),e.users&&e.users.length){N.users=[];for(let A=0;A<e.users.length;++A)N.users[A]=$root.com.quick.voice.proto.User.toObject(e.users[A],u)}return e.isActive!=null&&e.hasOwnProperty("isActive")&&(N.isActive=e.isActive),N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.SyncRoomInfoRsp"},$}(),D.UpdateTime=function(){function $(I){if(I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.time=$util.Long?$util.Long.fromBits(0,0,!1):0,$.create=function(e){return new $(e)},$.encode=function(e,u){return u||(u=$Writer.create()),e.time!=null&&Object.hasOwnProperty.call(e,"time")&&u.uint32(8).int64(e.time),u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.UpdateTime;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.time=e.int64();break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){return typeof e!="object"||e===null?"object expected":e.time!=null&&e.hasOwnProperty("time")&&!$util.isInteger(e.time)&&!(e.time&&$util.isInteger(e.time.low)&&$util.isInteger(e.time.high))?"time: integer|Long expected":null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.UpdateTime)return e;let u=new $root.com.quick.voice.proto.UpdateTime;return e.time!=null&&($util.Long?(u.time=$util.Long.fromValue(e.time)).unsigned=!1:typeof e.time=="string"?u.time=parseInt(e.time,10):typeof e.time=="number"?u.time=e.time:typeof e.time=="object"&&(u.time=new $util.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber())),u},$.toObject=function(e,u){u||(u={});let N={};if(u.defaults)if($util.Long){let A=new $util.Long(0,0,!1);N.time=u.longs===String?A.toString():u.longs===Number?A.toNumber():A}else N.time=u.longs===String?"0":0;return e.time!=null&&e.hasOwnProperty("time")&&(typeof e.time=="number"?N.time=u.longs===String?String(e.time):e.time:N.time=u.longs===String?$util.Long.prototype.toString.call(e.time):u.longs===Number?new $util.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber():e.time),N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.UpdateTime"},$}(),D.CloseTrackReq=function(){function $(I){if(this.tracks=[],I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.sdp="",$.prototype.tracks=$util.emptyArray,$.prototype.roomId="",$.create=function(e){return new $(e)},$.encode=function(e,u){if(u||(u=$Writer.create()),e.sdp!=null&&Object.hasOwnProperty.call(e,"sdp")&&u.uint32(10).string(e.sdp),e.tracks!=null&&e.tracks.length)for(let N=0;N<e.tracks.length;++N)$root.com.quick.voice.proto.Track.encode(e.tracks[N],u.uint32(18).fork()).ldelim();return e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&u.uint32(26).string(e.roomId),u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.CloseTrackReq;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.sdp=e.string();break}case 2:{A.tracks&&A.tracks.length||(A.tracks=[]),A.tracks.push($root.com.quick.voice.proto.Track.decode(e,e.uint32()));break}case 3:{A.roomId=e.string();break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.sdp!=null&&e.hasOwnProperty("sdp")&&!$util.isString(e.sdp))return"sdp: string expected";if(e.tracks!=null&&e.hasOwnProperty("tracks")){if(!Array.isArray(e.tracks))return"tracks: array expected";for(let u=0;u<e.tracks.length;++u){let N=$root.com.quick.voice.proto.Track.verify(e.tracks[u]);if(N)return"tracks."+N}}return e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId)?"roomId: string expected":null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.CloseTrackReq)return e;let u=new $root.com.quick.voice.proto.CloseTrackReq;if(e.sdp!=null&&(u.sdp=String(e.sdp)),e.tracks){if(!Array.isArray(e.tracks))throw TypeError(".com.quick.voice.proto.CloseTrackReq.tracks: array expected");u.tracks=[];for(let N=0;N<e.tracks.length;++N){if(typeof e.tracks[N]!="object")throw TypeError(".com.quick.voice.proto.CloseTrackReq.tracks: object expected");u.tracks[N]=$root.com.quick.voice.proto.Track.fromObject(e.tracks[N])}}return e.roomId!=null&&(u.roomId=String(e.roomId)),u},$.toObject=function(e,u){u||(u={});let N={};if((u.arrays||u.defaults)&&(N.tracks=[]),u.defaults&&(N.sdp="",N.roomId=""),e.sdp!=null&&e.hasOwnProperty("sdp")&&(N.sdp=e.sdp),e.tracks&&e.tracks.length){N.tracks=[];for(let A=0;A<e.tracks.length;++A)N.tracks[A]=$root.com.quick.voice.proto.Track.toObject(e.tracks[A],u)}return e.roomId!=null&&e.hasOwnProperty("roomId")&&(N.roomId=e.roomId),N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.CloseTrackReq"},$}(),D.CloseTrackRsp=function(){function $(I){if(this.tracks=[],I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.remoteSdp="",$.prototype.tracks=$util.emptyArray,$.create=function(e){return new $(e)},$.encode=function(e,u){if(u||(u=$Writer.create()),e.remoteSdp!=null&&Object.hasOwnProperty.call(e,"remoteSdp")&&u.uint32(10).string(e.remoteSdp),e.tracks!=null&&e.tracks.length)for(let N=0;N<e.tracks.length;++N)$root.com.quick.voice.proto.Track.encode(e.tracks[N],u.uint32(18).fork()).ldelim();return u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.CloseTrackRsp;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.remoteSdp=e.string();break}case 2:{A.tracks&&A.tracks.length||(A.tracks=[]),A.tracks.push($root.com.quick.voice.proto.Track.decode(e,e.uint32()));break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.remoteSdp!=null&&e.hasOwnProperty("remoteSdp")&&!$util.isString(e.remoteSdp))return"remoteSdp: string expected";if(e.tracks!=null&&e.hasOwnProperty("tracks")){if(!Array.isArray(e.tracks))return"tracks: array expected";for(let u=0;u<e.tracks.length;++u){let N=$root.com.quick.voice.proto.Track.verify(e.tracks[u]);if(N)return"tracks."+N}}return null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.CloseTrackRsp)return e;let u=new $root.com.quick.voice.proto.CloseTrackRsp;if(e.remoteSdp!=null&&(u.remoteSdp=String(e.remoteSdp)),e.tracks){if(!Array.isArray(e.tracks))throw TypeError(".com.quick.voice.proto.CloseTrackRsp.tracks: array expected");u.tracks=[];for(let N=0;N<e.tracks.length;++N){if(typeof e.tracks[N]!="object")throw TypeError(".com.quick.voice.proto.CloseTrackRsp.tracks: object expected");u.tracks[N]=$root.com.quick.voice.proto.Track.fromObject(e.tracks[N])}}return u},$.toObject=function(e,u){u||(u={});let N={};if((u.arrays||u.defaults)&&(N.tracks=[]),u.defaults&&(N.remoteSdp=""),e.remoteSdp!=null&&e.hasOwnProperty("remoteSdp")&&(N.remoteSdp=e.remoteSdp),e.tracks&&e.tracks.length){N.tracks=[];for(let A=0;A<e.tracks.length;++A)N.tracks[A]=$root.com.quick.voice.proto.Track.toObject(e.tracks[A],u)}return N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.CloseTrackRsp"},$}(),D.CloseTrackNotify=function(){function $(I){if(I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.user=null,$.create=function(e){return new $(e)},$.encode=function(e,u){return u||(u=$Writer.create()),e.user!=null&&Object.hasOwnProperty.call(e,"user")&&$root.com.quick.voice.proto.User.encode(e.user,u.uint32(10).fork()).ldelim(),u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.CloseTrackNotify;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.user=$root.com.quick.voice.proto.User.decode(e,e.uint32());break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.user!=null&&e.hasOwnProperty("user")){let u=$root.com.quick.voice.proto.User.verify(e.user);if(u)return"user."+u}return null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.CloseTrackNotify)return e;let u=new $root.com.quick.voice.proto.CloseTrackNotify;if(e.user!=null){if(typeof e.user!="object")throw TypeError(".com.quick.voice.proto.CloseTrackNotify.user: object expected");u.user=$root.com.quick.voice.proto.User.fromObject(e.user)}return u},$.toObject=function(e,u){u||(u={});let N={};return u.defaults&&(N.user=null),e.user!=null&&e.hasOwnProperty("user")&&(N.user=$root.com.quick.voice.proto.User.toObject(e.user,u)),N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.CloseTrackNotify"},$}(),D.ToggleLiveRoomReq=function(){function $(I){if(I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.roomId="",$.create=function(e){return new $(e)},$.encode=function(e,u){return u||(u=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&u.uint32(10).string(e.roomId),u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.ToggleLiveRoomReq;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.roomId=e.string();break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){return typeof e!="object"||e===null?"object expected":e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId)?"roomId: string expected":null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.ToggleLiveRoomReq)return e;let u=new $root.com.quick.voice.proto.ToggleLiveRoomReq;return e.roomId!=null&&(u.roomId=String(e.roomId)),u},$.toObject=function(e,u){u||(u={});let N={};return u.defaults&&(N.roomId=""),e.roomId!=null&&e.hasOwnProperty("roomId")&&(N.roomId=e.roomId),N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.ToggleLiveRoomReq"},$}(),D.ToggleLiveRoomRsq=function(){function $(I){if(this.roomUsers=[],I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.roomId="",$.prototype.hash="",$.prototype.roomUsers=$util.emptyArray,$.create=function(e){return new $(e)},$.encode=function(e,u){if(u||(u=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&u.uint32(10).string(e.roomId),e.hash!=null&&Object.hasOwnProperty.call(e,"hash")&&u.uint32(18).string(e.hash),e.roomUsers!=null&&e.roomUsers.length)for(let N=0;N<e.roomUsers.length;++N)$root.com.quick.voice.proto.User.encode(e.roomUsers[N],u.uint32(26).fork()).ldelim();return u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.ToggleLiveRoomRsq;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.roomId=e.string();break}case 2:{A.hash=e.string();break}case 3:{A.roomUsers&&A.roomUsers.length||(A.roomUsers=[]),A.roomUsers.push($root.com.quick.voice.proto.User.decode(e,e.uint32()));break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId))return"roomId: string expected";if(e.hash!=null&&e.hasOwnProperty("hash")&&!$util.isString(e.hash))return"hash: string expected";if(e.roomUsers!=null&&e.hasOwnProperty("roomUsers")){if(!Array.isArray(e.roomUsers))return"roomUsers: array expected";for(let u=0;u<e.roomUsers.length;++u){let N=$root.com.quick.voice.proto.User.verify(e.roomUsers[u]);if(N)return"roomUsers."+N}}return null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.ToggleLiveRoomRsq)return e;let u=new $root.com.quick.voice.proto.ToggleLiveRoomRsq;if(e.roomId!=null&&(u.roomId=String(e.roomId)),e.hash!=null&&(u.hash=String(e.hash)),e.roomUsers){if(!Array.isArray(e.roomUsers))throw TypeError(".com.quick.voice.proto.ToggleLiveRoomRsq.roomUsers: array expected");u.roomUsers=[];for(let N=0;N<e.roomUsers.length;++N){if(typeof e.roomUsers[N]!="object")throw TypeError(".com.quick.voice.proto.ToggleLiveRoomRsq.roomUsers: object expected");u.roomUsers[N]=$root.com.quick.voice.proto.User.fromObject(e.roomUsers[N])}}return u},$.toObject=function(e,u){u||(u={});let N={};if((u.arrays||u.defaults)&&(N.roomUsers=[]),u.defaults&&(N.roomId="",N.hash=""),e.roomId!=null&&e.hasOwnProperty("roomId")&&(N.roomId=e.roomId),e.hash!=null&&e.hasOwnProperty("hash")&&(N.hash=e.hash),e.roomUsers&&e.roomUsers.length){N.roomUsers=[];for(let A=0;A<e.roomUsers.length;++A)N.roomUsers[A]=$root.com.quick.voice.proto.User.toObject(e.roomUsers[A],u)}return N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.ToggleLiveRoomRsq"},$}(),D.TrackType=function(){const $={},I=Object.create($);return I[$[0]="Microphone"]=0,I[$[1]="Camera"]=1,I[$[2]="Screen"]=2,I[$[3]="SystemVoice"]=3,I}(),D.ReportInfoReq=function(){function $(I){if(I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.actionEvent="",$.prototype.userId="",$.prototype.platform="",$.prototype.time=$util.Long?$util.Long.fromBits(0,0,!1):0,$.prototype.actionData="",$.create=function(e){return new $(e)},$.encode=function(e,u){return u||(u=$Writer.create()),e.actionEvent!=null&&Object.hasOwnProperty.call(e,"actionEvent")&&u.uint32(10).string(e.actionEvent),e.userId!=null&&Object.hasOwnProperty.call(e,"userId")&&u.uint32(18).string(e.userId),e.platform!=null&&Object.hasOwnProperty.call(e,"platform")&&u.uint32(26).string(e.platform),e.time!=null&&Object.hasOwnProperty.call(e,"time")&&u.uint32(32).int64(e.time),e.actionData!=null&&Object.hasOwnProperty.call(e,"actionData")&&u.uint32(42).string(e.actionData),u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.ReportInfoReq;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.actionEvent=e.string();break}case 2:{A.userId=e.string();break}case 3:{A.platform=e.string();break}case 4:{A.time=e.int64();break}case 5:{A.actionData=e.string();break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){return typeof e!="object"||e===null?"object expected":e.actionEvent!=null&&e.hasOwnProperty("actionEvent")&&!$util.isString(e.actionEvent)?"actionEvent: string expected":e.userId!=null&&e.hasOwnProperty("userId")&&!$util.isString(e.userId)?"userId: string expected":e.platform!=null&&e.hasOwnProperty("platform")&&!$util.isString(e.platform)?"platform: string expected":e.time!=null&&e.hasOwnProperty("time")&&!$util.isInteger(e.time)&&!(e.time&&$util.isInteger(e.time.low)&&$util.isInteger(e.time.high))?"time: integer|Long expected":e.actionData!=null&&e.hasOwnProperty("actionData")&&!$util.isString(e.actionData)?"actionData: string expected":null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.ReportInfoReq)return e;let u=new $root.com.quick.voice.proto.ReportInfoReq;return e.actionEvent!=null&&(u.actionEvent=String(e.actionEvent)),e.userId!=null&&(u.userId=String(e.userId)),e.platform!=null&&(u.platform=String(e.platform)),e.time!=null&&($util.Long?(u.time=$util.Long.fromValue(e.time)).unsigned=!1:typeof e.time=="string"?u.time=parseInt(e.time,10):typeof e.time=="number"?u.time=e.time:typeof e.time=="object"&&(u.time=new $util.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber())),e.actionData!=null&&(u.actionData=String(e.actionData)),u},$.toObject=function(e,u){u||(u={});let N={};if(u.defaults){if(N.actionEvent="",N.userId="",N.platform="",$util.Long){let A=new $util.Long(0,0,!1);N.time=u.longs===String?A.toString():u.longs===Number?A.toNumber():A}else N.time=u.longs===String?"0":0;N.actionData=""}return e.actionEvent!=null&&e.hasOwnProperty("actionEvent")&&(N.actionEvent=e.actionEvent),e.userId!=null&&e.hasOwnProperty("userId")&&(N.userId=e.userId),e.platform!=null&&e.hasOwnProperty("platform")&&(N.platform=e.platform),e.time!=null&&e.hasOwnProperty("time")&&(typeof e.time=="number"?N.time=u.longs===String?String(e.time):e.time:N.time=u.longs===String?$util.Long.prototype.toString.call(e.time):u.longs===Number?new $util.LongBits(e.time.low>>>0,e.time.high>>>0).toNumber():e.time),e.actionData!=null&&e.hasOwnProperty("actionData")&&(N.actionData=e.actionData),N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.ReportInfoReq"},$}(),D.UpdatePermissions=function(){function $(I){if(I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.roomId="",$.prototype.user=null,$.create=function(e){return new $(e)},$.encode=function(e,u){return u||(u=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&u.uint32(10).string(e.roomId),e.user!=null&&Object.hasOwnProperty.call(e,"user")&&$root.com.quick.voice.proto.User.encode(e.user,u.uint32(18).fork()).ldelim(),u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.UpdatePermissions;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.roomId=e.string();break}case 2:{A.user=$root.com.quick.voice.proto.User.decode(e,e.uint32());break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId))return"roomId: string expected";if(e.user!=null&&e.hasOwnProperty("user")){let u=$root.com.quick.voice.proto.User.verify(e.user);if(u)return"user."+u}return null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.UpdatePermissions)return e;let u=new $root.com.quick.voice.proto.UpdatePermissions;if(e.roomId!=null&&(u.roomId=String(e.roomId)),e.user!=null){if(typeof e.user!="object")throw TypeError(".com.quick.voice.proto.UpdatePermissions.user: object expected");u.user=$root.com.quick.voice.proto.User.fromObject(e.user)}return u},$.toObject=function(e,u){u||(u={});let N={};return u.defaults&&(N.roomId="",N.user=null),e.roomId!=null&&e.hasOwnProperty("roomId")&&(N.roomId=e.roomId),e.user!=null&&e.hasOwnProperty("user")&&(N.user=$root.com.quick.voice.proto.User.toObject(e.user,u)),N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.UpdatePermissions"},$}(),D.CallType=function(){const $={},I=Object.create($);return I[$[0]="Normal"]=0,I[$[1]="Meeting"]=1,I[$[2]="Live"]=2,I}(),D.QuitNotifyCode=function(){const $={},I=Object.create($);return I[$[0]="NormalQuit"]=0,I[$[2021]="Timeout"]=2021,I[$[2011]="TokenExpired"]=2011,I[$[2022]="KickOut"]=2022,I[$[2023]="EndPk"]=2023,I[$[2024]="EndLive"]=2024,I}(),D.UserBehavior=function(){function $(I){if(I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.type=0,$.prototype.behavior=!1,$.create=function(e){return new $(e)},$.encode=function(e,u){return u||(u=$Writer.create()),e.type!=null&&Object.hasOwnProperty.call(e,"type")&&u.uint32(8).int32(e.type),e.behavior!=null&&Object.hasOwnProperty.call(e,"behavior")&&u.uint32(16).bool(e.behavior),u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.UserBehavior;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.type=e.int32();break}case 2:{A.behavior=e.bool();break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.type!=null&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:break}return e.behavior!=null&&e.hasOwnProperty("behavior")&&typeof e.behavior!="boolean"?"behavior: boolean expected":null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.UserBehavior)return e;let u=new $root.com.quick.voice.proto.UserBehavior;switch(e.type){default:if(typeof e.type=="number"){u.type=e.type;break}break;case"Microphone":case 0:u.type=0;break;case"Camera":case 1:u.type=1;break;case"Screen":case 2:u.type=2;break;case"SystemVoice":case 3:u.type=3;break}return e.behavior!=null&&(u.behavior=!!e.behavior),u},$.toObject=function(e,u){u||(u={});let N={};return u.defaults&&(N.type=u.enums===String?"Microphone":0,N.behavior=!1),e.type!=null&&e.hasOwnProperty("type")&&(N.type=u.enums===String?$root.com.quick.voice.proto.TrackType[e.type]===void 0?e.type:$root.com.quick.voice.proto.TrackType[e.type]:e.type),e.behavior!=null&&e.hasOwnProperty("behavior")&&(N.behavior=e.behavior),N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.UserBehavior"},$}(),D.PreventUser=function(){function $(I){if(this.behaviors=[],I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.id="",$.prototype.behaviors=$util.emptyArray,$.create=function(e){return new $(e)},$.encode=function(e,u){if(u||(u=$Writer.create()),e.id!=null&&Object.hasOwnProperty.call(e,"id")&&u.uint32(10).string(e.id),e.behaviors!=null&&e.behaviors.length)for(let N=0;N<e.behaviors.length;++N)$root.com.quick.voice.proto.UserBehavior.encode(e.behaviors[N],u.uint32(18).fork()).ldelim();return u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.PreventUser;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.id=e.string();break}case 2:{A.behaviors&&A.behaviors.length||(A.behaviors=[]),A.behaviors.push($root.com.quick.voice.proto.UserBehavior.decode(e,e.uint32()));break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.id!=null&&e.hasOwnProperty("id")&&!$util.isString(e.id))return"id: string expected";if(e.behaviors!=null&&e.hasOwnProperty("behaviors")){if(!Array.isArray(e.behaviors))return"behaviors: array expected";for(let u=0;u<e.behaviors.length;++u){let N=$root.com.quick.voice.proto.UserBehavior.verify(e.behaviors[u]);if(N)return"behaviors."+N}}return null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.PreventUser)return e;let u=new $root.com.quick.voice.proto.PreventUser;if(e.id!=null&&(u.id=String(e.id)),e.behaviors){if(!Array.isArray(e.behaviors))throw TypeError(".com.quick.voice.proto.PreventUser.behaviors: array expected");u.behaviors=[];for(let N=0;N<e.behaviors.length;++N){if(typeof e.behaviors[N]!="object")throw TypeError(".com.quick.voice.proto.PreventUser.behaviors: object expected");u.behaviors[N]=$root.com.quick.voice.proto.UserBehavior.fromObject(e.behaviors[N])}}return u},$.toObject=function(e,u){u||(u={});let N={};if((u.arrays||u.defaults)&&(N.behaviors=[]),u.defaults&&(N.id=""),e.id!=null&&e.hasOwnProperty("id")&&(N.id=e.id),e.behaviors&&e.behaviors.length){N.behaviors=[];for(let A=0;A<e.behaviors.length;++A)N.behaviors[A]=$root.com.quick.voice.proto.UserBehavior.toObject(e.behaviors[A],u)}return N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.PreventUser"},$}(),D.PreventUsersBehaviorReq=function(){function $(I){if(this.users=[],I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.roomId="",$.prototype.users=$util.emptyArray,$.create=function(e){return new $(e)},$.encode=function(e,u){if(u||(u=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&u.uint32(10).string(e.roomId),e.users!=null&&e.users.length)for(let N=0;N<e.users.length;++N)$root.com.quick.voice.proto.PreventUser.encode(e.users[N],u.uint32(18).fork()).ldelim();return u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.PreventUsersBehaviorReq;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.roomId=e.string();break}case 2:{A.users&&A.users.length||(A.users=[]),A.users.push($root.com.quick.voice.proto.PreventUser.decode(e,e.uint32()));break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId))return"roomId: string expected";if(e.users!=null&&e.hasOwnProperty("users")){if(!Array.isArray(e.users))return"users: array expected";for(let u=0;u<e.users.length;++u){let N=$root.com.quick.voice.proto.PreventUser.verify(e.users[u]);if(N)return"users."+N}}return null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.PreventUsersBehaviorReq)return e;let u=new $root.com.quick.voice.proto.PreventUsersBehaviorReq;if(e.roomId!=null&&(u.roomId=String(e.roomId)),e.users){if(!Array.isArray(e.users))throw TypeError(".com.quick.voice.proto.PreventUsersBehaviorReq.users: array expected");u.users=[];for(let N=0;N<e.users.length;++N){if(typeof e.users[N]!="object")throw TypeError(".com.quick.voice.proto.PreventUsersBehaviorReq.users: object expected");u.users[N]=$root.com.quick.voice.proto.PreventUser.fromObject(e.users[N])}}return u},$.toObject=function(e,u){u||(u={});let N={};if((u.arrays||u.defaults)&&(N.users=[]),u.defaults&&(N.roomId=""),e.roomId!=null&&e.hasOwnProperty("roomId")&&(N.roomId=e.roomId),e.users&&e.users.length){N.users=[];for(let A=0;A<e.users.length;++A)N.users[A]=$root.com.quick.voice.proto.PreventUser.toObject(e.users[A],u)}return N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.PreventUsersBehaviorReq"},$}(),D.PreventUsersBehaviorNotify=function(){function $(I){if(this.users=[],I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.roomId="",$.prototype.users=$util.emptyArray,$.create=function(e){return new $(e)},$.encode=function(e,u){if(u||(u=$Writer.create()),e.roomId!=null&&Object.hasOwnProperty.call(e,"roomId")&&u.uint32(10).string(e.roomId),e.users!=null&&e.users.length)for(let N=0;N<e.users.length;++N)$root.com.quick.voice.proto.User.encode(e.users[N],u.uint32(18).fork()).ldelim();return u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.PreventUsersBehaviorNotify;for(;e.pos<N;){let U=e.uint32();switch(U>>>3){case 1:{A.roomId=e.string();break}case 2:{A.users&&A.users.length||(A.users=[]),A.users.push($root.com.quick.voice.proto.User.decode(e,e.uint32()));break}default:e.skipType(U&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.roomId!=null&&e.hasOwnProperty("roomId")&&!$util.isString(e.roomId))return"roomId: string expected";if(e.users!=null&&e.hasOwnProperty("users")){if(!Array.isArray(e.users))return"users: array expected";for(let u=0;u<e.users.length;++u){let N=$root.com.quick.voice.proto.User.verify(e.users[u]);if(N)return"users."+N}}return null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.PreventUsersBehaviorNotify)return e;let u=new $root.com.quick.voice.proto.PreventUsersBehaviorNotify;if(e.roomId!=null&&(u.roomId=String(e.roomId)),e.users){if(!Array.isArray(e.users))throw TypeError(".com.quick.voice.proto.PreventUsersBehaviorNotify.users: array expected");u.users=[];for(let N=0;N<e.users.length;++N){if(typeof e.users[N]!="object")throw TypeError(".com.quick.voice.proto.PreventUsersBehaviorNotify.users: object expected");u.users[N]=$root.com.quick.voice.proto.User.fromObject(e.users[N])}}return u},$.toObject=function(e,u){u||(u={});let N={};if((u.arrays||u.defaults)&&(N.users=[]),u.defaults&&(N.roomId=""),e.roomId!=null&&e.hasOwnProperty("roomId")&&(N.roomId=e.roomId),e.users&&e.users.length){N.users=[];for(let A=0;A<e.users.length;++A)N.users[A]=$root.com.quick.voice.proto.User.toObject(e.users[A],u)}return N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.PreventUsersBehaviorNotify"},$}(),D.AccelerationAreas=function(){const $={},I=Object.create($);return I[$[0]="chinaMainland"]=0,I[$[1]="global"]=1,I[$[2]="overseas"]=2,I}(),D.CountMethods=function(){const $={},I=Object.create($);return I[$[0]="flow"]=0,I[$[1]="minutes"]=1,I}(),D.BaseCDNAddress=function(){function $(I){if(this.urlMap={},I)for(let e=Object.keys(I),u=0;u<e.length;++u)I[e[u]]!=null&&(this[e[u]]=I[e[u]])}return $.prototype.area=0,$.prototype.countType=0,$.prototype.urlMap=$util.emptyObject,$.create=function(e){return new $(e)},$.encode=function(e,u){if(u||(u=$Writer.create()),e.area!=null&&Object.hasOwnProperty.call(e,"area")&&u.uint32(8).int32(e.area),e.countType!=null&&Object.hasOwnProperty.call(e,"countType")&&u.uint32(16).int32(e.countType),e.urlMap!=null&&Object.hasOwnProperty.call(e,"urlMap"))for(let N=Object.keys(e.urlMap),A=0;A<N.length;++A)u.uint32(26).fork().uint32(10).string(N[A]).uint32(18).string(e.urlMap[N[A]]).ldelim();return u},$.encodeDelimited=function(e,u){return this.encode(e,u).ldelim()},$.decode=function(e,u){e instanceof $Reader||(e=$Reader.create(e));let N=u===void 0?e.len:e.pos+u,A=new $root.com.quick.voice.proto.BaseCDNAddress,U,L;for(;e.pos<N;){let P=e.uint32();switch(P>>>3){case 1:{A.area=e.int32();break}case 2:{A.countType=e.int32();break}case 3:{A.urlMap===$util.emptyObject&&(A.urlMap={});let Z=e.uint32()+e.pos;for(U="",L="";e.pos<Z;){let F=e.uint32();switch(F>>>3){case 1:U=e.string();break;case 2:L=e.string();break;default:e.skipType(F&7);break}}A.urlMap[U]=L;break}default:e.skipType(P&7);break}}return A},$.decodeDelimited=function(e){return e instanceof $Reader||(e=new $Reader(e)),this.decode(e,e.uint32())},$.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.area!=null&&e.hasOwnProperty("area"))switch(e.area){default:return"area: enum value expected";case 0:case 1:case 2:break}if(e.countType!=null&&e.hasOwnProperty("countType"))switch(e.countType){default:return"countType: enum value expected";case 0:case 1:break}if(e.urlMap!=null&&e.hasOwnProperty("urlMap")){if(!$util.isObject(e.urlMap))return"urlMap: object expected";let u=Object.keys(e.urlMap);for(let N=0;N<u.length;++N)if(!$util.isString(e.urlMap[u[N]]))return"urlMap: string{k:string} expected"}return null},$.fromObject=function(e){if(e instanceof $root.com.quick.voice.proto.BaseCDNAddress)return e;let u=new $root.com.quick.voice.proto.BaseCDNAddress;switch(e.area){default:if(typeof e.area=="number"){u.area=e.area;break}break;case"chinaMainland":case 0:u.area=0;break;case"global":case 1:u.area=1;break;case"overseas":case 2:u.area=2;break}switch(e.countType){default:if(typeof e.countType=="number"){u.countType=e.countType;break}break;case"flow":case 0:u.countType=0;break;case"minutes":case 1:u.countType=1;break}if(e.urlMap){if(typeof e.urlMap!="object")throw TypeError(".com.quick.voice.proto.BaseCDNAddress.urlMap: object expected");u.urlMap={};for(let N=Object.keys(e.urlMap),A=0;A<N.length;++A)u.urlMap[N[A]]=String(e.urlMap[N[A]])}return u},$.toObject=function(e,u){u||(u={});let N={};(u.objects||u.defaults)&&(N.urlMap={}),u.defaults&&(N.area=u.enums===String?"chinaMainland":0,N.countType=u.enums===String?"flow":0),e.area!=null&&e.hasOwnProperty("area")&&(N.area=u.enums===String?$root.com.quick.voice.proto.AccelerationAreas[e.area]===void 0?e.area:$root.com.quick.voice.proto.AccelerationAreas[e.area]:e.area),e.countType!=null&&e.hasOwnProperty("countType")&&(N.countType=u.enums===String?$root.com.quick.voice.proto.CountMethods[e.countType]===void 0?e.countType:$root.com.quick.voice.proto.CountMethods[e.countType]:e.countType);let A;if(e.urlMap&&(A=Object.keys(e.urlMap)).length){N.urlMap={};for(let U=0;U<A.length;++U)N.urlMap[A[U]]=e.urlMap[A[U]]}return N},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(e){return e===void 0&&(e="type.googleapis.com"),e+"/com.quick.voice.proto.BaseCDNAddress"},$}(),D.CDNPlayAddressNotify=function(){function $(e){if(this.standLines=[],e)for(let u=Object.keys(e),N=0;N<u.length;++N)e[u[N]]!=null&&(this[u[N]]=e[u[N]])}$.prototype.roomId="",$.prototype.m3u8=null,$.prototype.rtmp=null,$.prototype.flv=null,$.prototype.rtmps=null,$.prototype.mainLine=null,$.prototype.standLines=$util.emptyArray;let I;return Object.defineProperty($.prototype,"_m3u8",{get:$util.oneOfGetter(I=["m3u8"]),set:$util.oneOfSetter(I)}),Object.defineProperty($.prototype,"_rtmp",{get:$util.oneOfGetter(I=["rtmp"]),set:$util.oneOfSetter(I)}),Object.defineProperty($.prototype,"_flv",{get:$util.oneOfGetter(I=["flv"]),set:$util.oneOfSetter(I)}),Object.defineProperty($.prototype,"_rtmps",{get:$util.oneOfGetter(I=["rtmps"]),set:$util.oneOfSetter(I)}),Object.defineProperty($.prototype,"_mainLine",{get:$util.oneOfGetter(I=["mainLine"]),set:$util.oneOfSetter(I)}),$.create=function(u){return new $(u)},$.encode=function(u,N){if(N||(N=$Writer.create()),u.roomId!=null&&Object.hasOwnProperty.call(u,"roomId")&&N.uint32(10).string(u.roomId),u.m3u8!=null&&Object.hasOwnProperty.call(u,"m3u8")&&N.uint32(18).string(u.m3u8),u.rtmp!=null&&Object.hasOwnProperty.call(u,"rtmp")&&N.uint32(26).string(u.rtmp),u.flv!=null&&Object.hasOwnProperty.call(u,"flv")&&N.uint32(34).string(u.flv),u.rtmps!=null&&Object.hasOwnProperty.call(u,"rtmps")&&N.uint32(42).string(u.rtmps),u.mainLine!=null&&Object.hasOwnProperty.call(u,"mainLine")&&$root.com.quick.voice.proto.BaseCDNAddress.encode(u.mainLine,N.uint32(50).fork()).ldelim(),u.standLines!=null&&u.standLines.length)for(let A=0;A<u.standLines.length;++A)$root.com.quick.voice.proto.BaseCDNAddress.encode(u.standLines[A],N.uint32(58).fork()).ldelim();return N},$.encodeDelimited=function(u,N){return this.encode(u,N).ldelim()},$.decode=function(u,N){u instanceof $Reader||(u=$Reader.create(u));let A=N===void 0?u.len:u.pos+N,U=new $root.com.quick.voice.proto.CDNPlayAddressNotify;for(;u.pos<A;){let L=u.uint32();switch(L>>>3){case 1:{U.roomId=u.string();break}case 2:{U.m3u8=u.string();break}case 3:{U.rtmp=u.string();break}case 4:{U.flv=u.string();break}case 5:{U.rtmps=u.string();break}case 6:{U.mainLine=$root.com.quick.voice.proto.BaseCDNAddress.decode(u,u.uint32());break}case 7:{U.standLines&&U.standLines.length||(U.standLines=[]),U.standLines.push($root.com.quick.voice.proto.BaseCDNAddress.decode(u,u.uint32()));break}default:u.skipType(L&7);break}}return U},$.decodeDelimited=function(u){return u instanceof $Reader||(u=new $Reader(u)),this.decode(u,u.uint32())},$.verify=function(u){if(typeof u!="object"||u===null)return"object expected";if(u.roomId!=null&&u.hasOwnProperty("roomId")&&!$util.isString(u.roomId))return"roomId: string expected";if(u.m3u8!=null&&u.hasOwnProperty("m3u8")&&!$util.isString(u.m3u8))return"m3u8: string expected";if(u.rtmp!=null&&u.hasOwnProperty("rtmp")&&!$util.isString(u.rtmp))return"rtmp: string expected";if(u.flv!=null&&u.hasOwnProperty("flv")&&!$util.isString(u.flv))return"flv: string expected";if(u.rtmps!=null&&u.hasOwnProperty("rtmps")&&!$util.isString(u.rtmps))return"rtmps: string expected";if(u.mainLine!=null&&u.hasOwnProperty("mainLine")){let N=$root.com.quick.voice.proto.BaseCDNAddress.verify(u.mainLine);if(N)return"mainLine."+N}if(u.standLines!=null&&u.hasOwnProperty("standLines")){if(!Array.isArray(u.standLines))return"standLines: array expected";for(let N=0;N<u.standLines.length;++N){let A=$root.com.quick.voice.proto.BaseCDNAddress.verify(u.standLines[N]);if(A)return"standLines."+A}}return null},$.fromObject=function(u){if(u instanceof $root.com.quick.voice.proto.CDNPlayAddressNotify)return u;let N=new $root.com.quick.voice.proto.CDNPlayAddressNotify;if(u.roomId!=null&&(N.roomId=String(u.roomId)),u.m3u8!=null&&(N.m3u8=String(u.m3u8)),u.rtmp!=null&&(N.rtmp=String(u.rtmp)),u.flv!=null&&(N.flv=String(u.flv)),u.rtmps!=null&&(N.rtmps=String(u.rtmps)),u.mainLine!=null){if(typeof u.mainLine!="object")throw TypeError(".com.quick.voice.proto.CDNPlayAddressNotify.mainLine: object expected");N.mainLine=$root.com.quick.voice.proto.BaseCDNAddress.fromObject(u.mainLine)}if(u.standLines){if(!Array.isArray(u.standLines))throw TypeError(".com.quick.voice.proto.CDNPlayAddressNotify.standLines: array expected");N.standLines=[];for(let A=0;A<u.standLines.length;++A){if(typeof u.standLines[A]!="object")throw TypeError(".com.quick.voice.proto.CDNPlayAddressNotify.standLines: object expected");N.standLines[A]=$root.com.quick.voice.proto.BaseCDNAddress.fromObject(u.standLines[A])}}return N},$.toObject=function(u,N){N||(N={});let A={};if((N.arrays||N.defaults)&&(A.standLines=[]),N.defaults&&(A.roomId=""),u.roomId!=null&&u.hasOwnProperty("roomId")&&(A.roomId=u.roomId),u.m3u8!=null&&u.hasOwnProperty("m3u8")&&(A.m3u8=u.m3u8,N.oneofs&&(A._m3u8="m3u8")),u.rtmp!=null&&u.hasOwnProperty("rtmp")&&(A.rtmp=u.rtmp,N.oneofs&&(A._rtmp="rtmp")),u.flv!=null&&u.hasOwnProperty("flv")&&(A.flv=u.flv,N.oneofs&&(A._flv="flv")),u.rtmps!=null&&u.hasOwnProperty("rtmps")&&(A.rtmps=u.rtmps,N.oneofs&&(A._rtmps="rtmps")),u.mainLine!=null&&u.hasOwnProperty("mainLine")&&(A.mainLine=$root.com.quick.voice.proto.BaseCDNAddress.toObject(u.mainLine,N),N.oneofs&&(A._mainLine="mainLine")),u.standLines&&u.standLines.length){A.standLines=[];for(let U=0;U<u.standLines.length;++U)A.standLines[U]=$root.com.quick.voice.proto.BaseCDNAddress.toObject(u.standLines[U],N)}return A},$.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},$.getTypeUrl=function(u){return u===void 0&&(u="type.googleapis.com"),u+"/com.quick.voice.proto.CDNPlayAddressNotify"},$}(),D}(),k}(),q}(),_})(),ignoreEvent=["networkQualityChange","onNetQuality"],enum_notifyName={onChangeNetwork:"网络情况变更",healthCheck:"心跳检测",onNetQuality:"网络质量回调",onLogin:"登录回调",onLocalStream:"本地媒体流发生变化",onDevicechange:"媒体设备发生变化",onRoomUser:"房间用户变化",onRoomUsers:"房间所有用户所有变化",onRoomUsersStreams:"房间某些用户媒体流变化",onRoomState:"房间状态变化",onJoinRoom:"加入房间回调",onQuitRoom:"退出房间回调",onPublish:"监听到流发布",onCloseTrack:"关闭轨道",onUpdateCall:"更新通讯状态",onUpdateStreams:"更新媒体流",onUpdatePermissions:"更新推流权限通知",onTokenExpired:"Token已过期",onDestroyRoom:"直播模式房间销毁",destroyRoom:"服务器要求销毁房间",onCDNPlayUrlAdd:"cdn播放地址变化",onDestroy:"SDK销毁"};ut(enum_notifyName);const notifyName_keys=Object.keys(enum_notifyName);/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const Z_FIXED$1=4,Z_BINARY=0,Z_TEXT=1,Z_UNKNOWN$1=2;function zero$1(_){let q=_.length;for(;--q>=0;)_[q]=0}const STORED_BLOCK=0,STATIC_TREES=1,DYN_TREES=2,MIN_MATCH$1=3,MAX_MATCH$1=258,LENGTH_CODES$1=29,LITERALS$1=256,L_CODES$1=LITERALS$1+1+LENGTH_CODES$1,D_CODES$1=30,BL_CODES$1=19,HEAP_SIZE$1=2*L_CODES$1+1,MAX_BITS$1=15,Buf_size=16,MAX_BL_BITS=7,END_BLOCK=256,REP_3_6=16,REPZ_3_10=17,REPZ_11_138=18,extra_lbits=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),extra_dbits=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),extra_blbits=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),bl_order=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),DIST_CODE_LEN=512,static_ltree=new Array((L_CODES$1+2)*2);zero$1(static_ltree);const static_dtree=new Array(D_CODES$1*2);zero$1(static_dtree);const _dist_code=new Array(DIST_CODE_LEN);zero$1(_dist_code);const _length_code=new Array(MAX_MATCH$1-MIN_MATCH$1+1);zero$1(_length_code);const base_length=new Array(LENGTH_CODES$1);zero$1(base_length);const base_dist=new Array(D_CODES$1);zero$1(base_dist);function StaticTreeDesc(_,q,k,D,$){this.static_tree=_,this.extra_bits=q,this.extra_base=k,this.elems=D,this.max_length=$,this.has_stree=_&&_.length}let static_l_desc,static_d_desc,static_bl_desc;function TreeDesc(_,q){this.dyn_tree=_,this.max_code=0,this.stat_desc=q}const d_code=_=>_<256?_dist_code[_]:_dist_code[256+(_>>>7)],put_short=(_,q)=>{_.pending_buf[_.pending++]=q&255,_.pending_buf[_.pending++]=q>>>8&255},send_bits=(_,q,k)=>{_.bi_valid>Buf_size-k?(_.bi_buf|=q<<_.bi_valid&65535,put_short(_,_.bi_buf),_.bi_buf=q>>Buf_size-_.bi_valid,_.bi_valid+=k-Buf_size):(_.bi_buf|=q<<_.bi_valid&65535,_.bi_valid+=k)},send_code=(_,q,k)=>{send_bits(_,k[q*2],k[q*2+1])},bi_reverse=(_,q)=>{let k=0;do k|=_&1,_>>>=1,k<<=1;while(--q>0);return k>>>1},bi_flush=_=>{_.bi_valid===16?(put_short(_,_.bi_buf),_.bi_buf=0,_.bi_valid=0):_.bi_valid>=8&&(_.pending_buf[_.pending++]=_.bi_buf&255,_.bi_buf>>=8,_.bi_valid-=8)},gen_bitlen=(_,q)=>{const k=q.dyn_tree,D=q.max_code,$=q.stat_desc.static_tree,I=q.stat_desc.has_stree,e=q.stat_desc.extra_bits,u=q.stat_desc.extra_base,N=q.stat_desc.max_length;let A,U,L,P,Z,F,W=0;for(P=0;P<=MAX_BITS$1;P++)_.bl_count[P]=0;for(k[_.heap[_.heap_max]*2+1]=0,A=_.heap_max+1;A<HEAP_SIZE$1;A++)U=_.heap[A],P=k[k[U*2+1]*2+1]+1,P>N&&(P=N,W++),k[U*2+1]=P,!(U>D)&&(_.bl_count[P]++,Z=0,U>=u&&(Z=e[U-u]),F=k[U*2],_.opt_len+=F*(P+Z),I&&(_.static_len+=F*($[U*2+1]+Z)));if(W!==0){do{for(P=N-1;_.bl_count[P]===0;)P--;_.bl_count[P]--,_.bl_count[P+1]+=2,_.bl_count[N]--,W-=2}while(W>0);for(P=N;P!==0;P--)for(U=_.bl_count[P];U!==0;)L=_.heap[--A],!(L>D)&&(k[L*2+1]!==P&&(_.opt_len+=(P-k[L*2+1])*k[L*2],k[L*2+1]=P),U--)}},gen_codes=(_,q,k)=>{const D=new Array(MAX_BITS$1+1);let $=0,I,e;for(I=1;I<=MAX_BITS$1;I++)$=$+k[I-1]<<1,D[I]=$;for(e=0;e<=q;e++){let u=_[e*2+1];u!==0&&(_[e*2]=bi_reverse(D[u]++,u))}},tr_static_init=()=>{let _,q,k,D,$;const I=new Array(MAX_BITS$1+1);for(k=0,D=0;D<LENGTH_CODES$1-1;D++)for(base_length[D]=k,_=0;_<1<<extra_lbits[D];_++)_length_code[k++]=D;for(_length_code[k-1]=D,$=0,D=0;D<16;D++)for(base_dist[D]=$,_=0;_<1<<extra_dbits[D];_++)_dist_code[$++]=D;for($>>=7;D<D_CODES$1;D++)for(base_dist[D]=$<<7,_=0;_<1<<extra_dbits[D]-7;_++)_dist_code[256+$++]=D;for(q=0;q<=MAX_BITS$1;q++)I[q]=0;for(_=0;_<=143;)static_ltree[_*2+1]=8,_++,I[8]++;for(;_<=255;)static_ltree[_*2+1]=9,_++,I[9]++;for(;_<=279;)static_ltree[_*2+1]=7,_++,I[7]++;for(;_<=287;)static_ltree[_*2+1]=8,_++,I[8]++;for(gen_codes(static_ltree,L_CODES$1+1,I),_=0;_<D_CODES$1;_++)static_dtree[_*2+1]=5,static_dtree[_*2]=bi_reverse(_,5);static_l_desc=new StaticTreeDesc(static_ltree,extra_lbits,LITERALS$1+1,L_CODES$1,MAX_BITS$1),static_d_desc=new StaticTreeDesc(static_dtree,extra_dbits,0,D_CODES$1,MAX_BITS$1),static_bl_desc=new StaticTreeDesc(new Array(0),extra_blbits,0,BL_CODES$1,MAX_BL_BITS)},init_block=_=>{let q;for(q=0;q<L_CODES$1;q++)_.dyn_ltree[q*2]=0;for(q=0;q<D_CODES$1;q++)_.dyn_dtree[q*2]=0;for(q=0;q<BL_CODES$1;q++)_.bl_tree[q*2]=0;_.dyn_ltree[END_BLOCK*2]=1,_.opt_len=_.static_len=0,_.sym_next=_.matches=0},bi_windup=_=>{_.bi_valid>8?put_short(_,_.bi_buf):_.bi_valid>0&&(_.pending_buf[_.pending++]=_.bi_buf),_.bi_buf=0,_.bi_valid=0},smaller=(_,q,k,D)=>{const $=q*2,I=k*2;return _[$]<_[I]||_[$]===_[I]&&D[q]<=D[k]},pqdownheap=(_,q,k)=>{const D=_.heap[k];let $=k<<1;for(;$<=_.heap_len&&($<_.heap_len&&smaller(q,_.heap[$+1],_.heap[$],_.depth)&&$++,!smaller(q,D,_.heap[$],_.depth));)_.heap[k]=_.heap[$],k=$,$<<=1;_.heap[k]=D},compress_block=(_,q,k)=>{let D,$,I=0,e,u;if(_.sym_next!==0)do D=_.pending_buf[_.sym_buf+I++]&255,D+=(_.pending_buf[_.sym_buf+I++]&255)<<8,$=_.pending_buf[_.sym_buf+I++],D===0?send_code(_,$,q):(e=_length_code[$],send_code(_,e+LITERALS$1+1,q),u=extra_lbits[e],u!==0&&($-=base_length[e],send_bits(_,$,u)),D--,e=d_code(D),send_code(_,e,k),u=extra_dbits[e],u!==0&&(D-=base_dist[e],send_bits(_,D,u)));while(I<_.sym_next);send_code(_,END_BLOCK,q)},build_tree=(_,q)=>{const k=q.dyn_tree,D=q.stat_desc.static_tree,$=q.stat_desc.has_stree,I=q.stat_desc.elems;let e,u,N=-1,A;for(_.heap_len=0,_.heap_max=HEAP_SIZE$1,e=0;e<I;e++)k[e*2]!==0?(_.heap[++_.heap_len]=N=e,_.depth[e]=0):k[e*2+1]=0;for(;_.heap_len<2;)A=_.heap[++_.heap_len]=N<2?++N:0,k[A*2]=1,_.depth[A]=0,_.opt_len--,$&&(_.static_len-=D[A*2+1]);for(q.max_code=N,e=_.heap_len>>1;e>=1;e--)pqdownheap(_,k,e);A=I;do e=_.heap[1],_.heap[1]=_.heap[_.heap_len--],pqdownheap(_,k,1),u=_.heap[1],_.heap[--_.heap_max]=e,_.heap[--_.heap_max]=u,k[A*2]=k[e*2]+k[u*2],_.depth[A]=(_.depth[e]>=_.depth[u]?_.depth[e]:_.depth[u])+1,k[e*2+1]=k[u*2+1]=A,_.heap[1]=A++,pqdownheap(_,k,1);while(_.heap_len>=2);_.heap[--_.heap_max]=_.heap[1],gen_bitlen(_,q),gen_codes(k,N,_.bl_count)},scan_tree=(_,q,k)=>{let D,$=-1,I,e=q[0*2+1],u=0,N=7,A=4;for(e===0&&(N=138,A=3),q[(k+1)*2+1]=65535,D=0;D<=k;D++)I=e,e=q[(D+1)*2+1],!(++u<N&&I===e)&&(u<A?_.bl_tree[I*2]+=u:I!==0?(I!==$&&_.bl_tree[I*2]++,_.bl_tree[REP_3_6*2]++):u<=10?_.bl_tree[REPZ_3_10*2]++:_.bl_tree[REPZ_11_138*2]++,u=0,$=I,e===0?(N=138,A=3):I===e?(N=6,A=3):(N=7,A=4))},send_tree=(_,q,k)=>{let D,$=-1,I,e=q[0*2+1],u=0,N=7,A=4;for(e===0&&(N=138,A=3),D=0;D<=k;D++)if(I=e,e=q[(D+1)*2+1],!(++u<N&&I===e)){if(u<A)do send_code(_,I,_.bl_tree);while(--u!==0);else I!==0?(I!==$&&(send_code(_,I,_.bl_tree),u--),send_code(_,REP_3_6,_.bl_tree),send_bits(_,u-3,2)):u<=10?(send_code(_,REPZ_3_10,_.bl_tree),send_bits(_,u-3,3)):(send_code(_,REPZ_11_138,_.bl_tree),send_bits(_,u-11,7));u=0,$=I,e===0?(N=138,A=3):I===e?(N=6,A=3):(N=7,A=4)}},build_bl_tree=_=>{let q;for(scan_tree(_,_.dyn_ltree,_.l_desc.max_code),scan_tree(_,_.dyn_dtree,_.d_desc.max_code),build_tree(_,_.bl_desc),q=BL_CODES$1-1;q>=3&&_.bl_tree[bl_order[q]*2+1]===0;q--);return _.opt_len+=3*(q+1)+5+5+4,q},send_all_trees=(_,q,k,D)=>{let $;for(send_bits(_,q-257,5),send_bits(_,k-1,5),send_bits(_,D-4,4),$=0;$<D;$++)send_bits(_,_.bl_tree[bl_order[$]*2+1],3);send_tree(_,_.dyn_ltree,q-1),send_tree(_,_.dyn_dtree,k-1)},detect_data_type=_=>{let q=4093624447,k;for(k=0;k<=31;k++,q>>>=1)if(q&1&&_.dyn_ltree[k*2]!==0)return Z_BINARY;if(_.dyn_ltree[9*2]!==0||_.dyn_ltree[10*2]!==0||_.dyn_ltree[13*2]!==0)return Z_TEXT;for(k=32;k<LITERALS$1;k++)if(_.dyn_ltree[k*2]!==0)return Z_TEXT;return Z_BINARY};let static_init_done=!1;const _tr_init$1=_=>{static_init_done||(tr_static_init(),static_init_done=!0),_.l_desc=new TreeDesc(_.dyn_ltree,static_l_desc),_.d_desc=new TreeDesc(_.dyn_dtree,static_d_desc),_.bl_desc=new TreeDesc(_.bl_tree,static_bl_desc),_.bi_buf=0,_.bi_valid=0,init_block(_)},_tr_stored_block$1=(_,q,k,D)=>{send_bits(_,(STORED_BLOCK<<1)+(D?1:0),3),bi_windup(_),put_short(_,k),put_short(_,~k),k&&_.pending_buf.set(_.window.subarray(q,q+k),_.pending),_.pending+=k},_tr_align$1=_=>{send_bits(_,STATIC_TREES<<1,3),send_code(_,END_BLOCK,static_ltree),bi_flush(_)},_tr_flush_block$1=(_,q,k,D)=>{let $,I,e=0;_.level>0?(_.strm.data_type===Z_UNKNOWN$1&&(_.strm.data_type=detect_data_type(_)),build_tree(_,_.l_desc),build_tree(_,_.d_desc),e=build_bl_tree(_),$=_.opt_len+3+7>>>3,I=_.static_len+3+7>>>3,I<=$&&($=I)):$=I=k+5,k+4<=$&&q!==-1?_tr_stored_block$1(_,q,k,D):_.strategy===Z_FIXED$1||I===$?(send_bits(_,(STATIC_TREES<<1)+(D?1:0),3),compress_block(_,static_ltree,static_dtree)):(send_bits(_,(DYN_TREES<<1)+(D?1:0),3),send_all_trees(_,_.l_desc.max_code+1,_.d_desc.max_code+1,e+1),compress_block(_,_.dyn_ltree,_.dyn_dtree)),init_block(_),D&&bi_windup(_)},_tr_tally$1=(_,q,k)=>(_.pending_buf[_.sym_buf+_.sym_next++]=q,_.pending_buf[_.sym_buf+_.sym_next++]=q>>8,_.pending_buf[_.sym_buf+_.sym_next++]=k,q===0?_.dyn_ltree[k*2]++:(_.matches++,q--,_.dyn_ltree[(_length_code[k]+LITERALS$1+1)*2]++,_.dyn_dtree[d_code(q)*2]++),_.sym_next===_.sym_end);var _tr_init_1=_tr_init$1,_tr_stored_block_1=_tr_stored_block$1,_tr_flush_block_1=_tr_flush_block$1,_tr_tally_1=_tr_tally$1,_tr_align_1=_tr_align$1,trees={_tr_init:_tr_init_1,_tr_stored_block:_tr_stored_block_1,_tr_flush_block:_tr_flush_block_1,_tr_tally:_tr_tally_1,_tr_align:_tr_align_1};const adler32=(_,q,k,D)=>{let $=_&65535|0,I=_>>>16&65535|0,e=0;for(;k!==0;){e=k>2e3?2e3:k,k-=e;do $=$+q[D++]|0,I=I+$|0;while(--e);$%=65521,I%=65521}return $|I<<16|0};var adler32_1=adler32;const makeTable=()=>{let _,q=[];for(var k=0;k<256;k++){_=k;for(var D=0;D<8;D++)_=_&1?3988292384^_>>>1:_>>>1;q[k]=_}return q},crcTable=new Uint32Array(makeTable()),crc32=(_,q,k,D)=>{const $=crcTable,I=D+k;_^=-1;for(let e=D;e<I;e++)_=_>>>8^$[(_^q[e])&255];return _^-1};var crc32_1=crc32,messages={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},constants$2={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init,_tr_stored_block,_tr_flush_block,_tr_tally,_tr_align}=trees,{Z_NO_FLUSH:Z_NO_FLUSH$2,Z_PARTIAL_FLUSH,Z_FULL_FLUSH:Z_FULL_FLUSH$1,Z_FINISH:Z_FINISH$3,Z_BLOCK:Z_BLOCK$1,Z_OK:Z_OK$3,Z_STREAM_END:Z_STREAM_END$3,Z_STREAM_ERROR:Z_STREAM_ERROR$2,Z_DATA_ERROR:Z_DATA_ERROR$2,Z_BUF_ERROR:Z_BUF_ERROR$1,Z_DEFAULT_COMPRESSION:Z_DEFAULT_COMPRESSION$1,Z_FILTERED,Z_HUFFMAN_ONLY,Z_RLE,Z_FIXED,Z_DEFAULT_STRATEGY:Z_DEFAULT_STRATEGY$1,Z_UNKNOWN,Z_DEFLATED:Z_DEFLATED$2}=constants$2,MAX_MEM_LEVEL=9,MAX_WBITS$1=15,DEF_MEM_LEVEL=8,LENGTH_CODES=29,LITERALS=256,L_CODES=LITERALS+1+LENGTH_CODES,D_CODES=30,BL_CODES=19,HEAP_SIZE=2*L_CODES+1,MAX_BITS=15,MIN_MATCH=3,MAX_MATCH=258,MIN_LOOKAHEAD=MAX_MATCH+MIN_MATCH+1,PRESET_DICT=32,INIT_STATE=42,GZIP_STATE=57,EXTRA_STATE=69,NAME_STATE=73,COMMENT_STATE=91,HCRC_STATE=103,BUSY_STATE=113,FINISH_STATE=666,BS_NEED_MORE=1,BS_BLOCK_DONE=2,BS_FINISH_STARTED=3,BS_FINISH_DONE=4,OS_CODE=3,err=(_,q)=>(_.msg=messages[q],q),rank=_=>_*2-(_>4?9:0),zero=_=>{let q=_.length;for(;--q>=0;)_[q]=0},slide_hash=_=>{let q,k,D,$=_.w_size;q=_.hash_size,D=q;do k=_.head[--D],_.head[D]=k>=$?k-$:0;while(--q);q=$,D=q;do k=_.prev[--D],_.prev[D]=k>=$?k-$:0;while(--q)};let HASH_ZLIB=(_,q,k)=>(q<<_.hash_shift^k)&_.hash_mask,HASH=HASH_ZLIB;const flush_pending=_=>{const q=_.state;let k=q.pending;k>_.avail_out&&(k=_.avail_out),k!==0&&(_.output.set(q.pending_buf.subarray(q.pending_out,q.pending_out+k),_.next_out),_.next_out+=k,q.pending_out+=k,_.total_out+=k,_.avail_out-=k,q.pending-=k,q.pending===0&&(q.pending_out=0))},flush_block_only=(_,q)=>{_tr_flush_block(_,_.block_start>=0?_.block_start:-1,_.strstart-_.block_start,q),_.block_start=_.strstart,flush_pending(_.strm)},put_byte=(_,q)=>{_.pending_buf[_.pending++]=q},putShortMSB=(_,q)=>{_.pending_buf[_.pending++]=q>>>8&255,_.pending_buf[_.pending++]=q&255},read_buf=(_,q,k,D)=>{let $=_.avail_in;return $>D&&($=D),$===0?0:(_.avail_in-=$,q.set(_.input.subarray(_.next_in,_.next_in+$),k),_.state.wrap===1?_.adler=adler32_1(_.adler,q,$,k):_.state.wrap===2&&(_.adler=crc32_1(_.adler,q,$,k)),_.next_in+=$,_.total_in+=$,$)},longest_match=(_,q)=>{let k=_.max_chain_length,D=_.strstart,$,I,e=_.prev_length,u=_.nice_match;const N=_.strstart>_.w_size-MIN_LOOKAHEAD?_.strstart-(_.w_size-MIN_LOOKAHEAD):0,A=_.window,U=_.w_mask,L=_.prev,P=_.strstart+MAX_MATCH;let Z=A[D+e-1],F=A[D+e];_.prev_length>=_.good_match&&(k>>=2),u>_.lookahead&&(u=_.lookahead);do if($=q,!(A[$+e]!==F||A[$+e-1]!==Z||A[$]!==A[D]||A[++$]!==A[D+1])){D+=2,$++;do;while(A[++D]===A[++$]&&A[++D]===A[++$]&&A[++D]===A[++$]&&A[++D]===A[++$]&&A[++D]===A[++$]&&A[++D]===A[++$]&&A[++D]===A[++$]&&A[++D]===A[++$]&&D<P);if(I=MAX_MATCH-(P-D),D=P-MAX_MATCH,I>e){if(_.match_start=q,e=I,I>=u)break;Z=A[D+e-1],F=A[D+e]}}while((q=L[q&U])>N&&--k!==0);return e<=_.lookahead?e:_.lookahead},fill_window=_=>{const q=_.w_size;let k,D,$;do{if(D=_.window_size-_.lookahead-_.strstart,_.strstart>=q+(q-MIN_LOOKAHEAD)&&(_.window.set(_.window.subarray(q,q+q-D),0),_.match_start-=q,_.strstart-=q,_.block_start-=q,_.insert>_.strstart&&(_.insert=_.strstart),slide_hash(_),D+=q),_.strm.avail_in===0)break;if(k=read_buf(_.strm,_.window,_.strstart+_.lookahead,D),_.lookahead+=k,_.lookahead+_.insert>=MIN_MATCH)for($=_.strstart-_.insert,_.ins_h=_.window[$],_.ins_h=HASH(_,_.ins_h,_.window[$+1]);_.insert&&(_.ins_h=HASH(_,_.ins_h,_.window[$+MIN_MATCH-1]),_.prev[$&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=$,$++,_.insert--,!(_.lookahead+_.insert<MIN_MATCH)););}while(_.lookahead<MIN_LOOKAHEAD&&_.strm.avail_in!==0)},deflate_stored=(_,q)=>{let k=_.pending_buf_size-5>_.w_size?_.w_size:_.pending_buf_size-5,D,$,I,e=0,u=_.strm.avail_in;do{if(D=65535,I=_.bi_valid+42>>3,_.strm.avail_out<I||(I=_.strm.avail_out-I,$=_.strstart-_.block_start,D>$+_.strm.avail_in&&(D=$+_.strm.avail_in),D>I&&(D=I),D<k&&(D===0&&q!==Z_FINISH$3||q===Z_NO_FLUSH$2||D!==$+_.strm.avail_in)))break;e=q===Z_FINISH$3&&D===$+_.strm.avail_in?1:0,_tr_stored_block(_,0,0,e),_.pending_buf[_.pending-4]=D,_.pending_buf[_.pending-3]=D>>8,_.pending_buf[_.pending-2]=~D,_.pending_buf[_.pending-1]=~D>>8,flush_pending(_.strm),$&&($>D&&($=D),_.strm.output.set(_.window.subarray(_.block_start,_.block_start+$),_.strm.next_out),_.strm.next_out+=$,_.strm.avail_out-=$,_.strm.total_out+=$,_.block_start+=$,D-=$),D&&(read_buf(_.strm,_.strm.output,_.strm.next_out,D),_.strm.next_out+=D,_.strm.avail_out-=D,_.strm.total_out+=D)}while(e===0);return u-=_.strm.avail_in,u&&(u>=_.w_size?(_.matches=2,_.window.set(_.strm.input.subarray(_.strm.next_in-_.w_size,_.strm.next_in),0),_.strstart=_.w_size,_.insert=_.strstart):(_.window_size-_.strstart<=u&&(_.strstart-=_.w_size,_.window.set(_.window.subarray(_.w_size,_.w_size+_.strstart),0),_.matches<2&&_.matches++,_.insert>_.strstart&&(_.insert=_.strstart)),_.window.set(_.strm.input.subarray(_.strm.next_in-u,_.strm.next_in),_.strstart),_.strstart+=u,_.insert+=u>_.w_size-_.insert?_.w_size-_.insert:u),_.block_start=_.strstart),_.high_water<_.strstart&&(_.high_water=_.strstart),e?BS_FINISH_DONE:q!==Z_NO_FLUSH$2&&q!==Z_FINISH$3&&_.strm.avail_in===0&&_.strstart===_.block_start?BS_BLOCK_DONE:(I=_.window_size-_.strstart,_.strm.avail_in>I&&_.block_start>=_.w_size&&(_.block_start-=_.w_size,_.strstart-=_.w_size,_.window.set(_.window.subarray(_.w_size,_.w_size+_.strstart),0),_.matches<2&&_.matches++,I+=_.w_size,_.insert>_.strstart&&(_.insert=_.strstart)),I>_.strm.avail_in&&(I=_.strm.avail_in),I&&(read_buf(_.strm,_.window,_.strstart,I),_.strstart+=I,_.insert+=I>_.w_size-_.insert?_.w_size-_.insert:I),_.high_water<_.strstart&&(_.high_water=_.strstart),I=_.bi_valid+42>>3,I=_.pending_buf_size-I>65535?65535:_.pending_buf_size-I,k=I>_.w_size?_.w_size:I,$=_.strstart-_.block_start,($>=k||($||q===Z_FINISH$3)&&q!==Z_NO_FLUSH$2&&_.strm.avail_in===0&&$<=I)&&(D=$>I?I:$,e=q===Z_FINISH$3&&_.strm.avail_in===0&&D===$?1:0,_tr_stored_block(_,_.block_start,D,e),_.block_start+=D,flush_pending(_.strm)),e?BS_FINISH_STARTED:BS_NEED_MORE)},deflate_fast=(_,q)=>{let k,D;for(;;){if(_.lookahead<MIN_LOOKAHEAD){if(fill_window(_),_.lookahead<MIN_LOOKAHEAD&&q===Z_NO_FLUSH$2)return BS_NEED_MORE;if(_.lookahead===0)break}if(k=0,_.lookahead>=MIN_MATCH&&(_.ins_h=HASH(_,_.ins_h,_.window[_.strstart+MIN_MATCH-1]),k=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart),k!==0&&_.strstart-k<=_.w_size-MIN_LOOKAHEAD&&(_.match_length=longest_match(_,k)),_.match_length>=MIN_MATCH)if(D=_tr_tally(_,_.strstart-_.match_start,_.match_length-MIN_MATCH),_.lookahead-=_.match_length,_.match_length<=_.max_lazy_match&&_.lookahead>=MIN_MATCH){_.match_length--;do _.strstart++,_.ins_h=HASH(_,_.ins_h,_.window[_.strstart+MIN_MATCH-1]),k=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart;while(--_.match_length!==0);_.strstart++}else _.strstart+=_.match_length,_.match_length=0,_.ins_h=_.window[_.strstart],_.ins_h=HASH(_,_.ins_h,_.window[_.strstart+1]);else D=_tr_tally(_,0,_.window[_.strstart]),_.lookahead--,_.strstart++;if(D&&(flush_block_only(_,!1),_.strm.avail_out===0))return BS_NEED_MORE}return _.insert=_.strstart<MIN_MATCH-1?_.strstart:MIN_MATCH-1,q===Z_FINISH$3?(flush_block_only(_,!0),_.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):_.sym_next&&(flush_block_only(_,!1),_.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_slow=(_,q)=>{let k,D,$;for(;;){if(_.lookahead<MIN_LOOKAHEAD){if(fill_window(_),_.lookahead<MIN_LOOKAHEAD&&q===Z_NO_FLUSH$2)return BS_NEED_MORE;if(_.lookahead===0)break}if(k=0,_.lookahead>=MIN_MATCH&&(_.ins_h=HASH(_,_.ins_h,_.window[_.strstart+MIN_MATCH-1]),k=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart),_.prev_length=_.match_length,_.prev_match=_.match_start,_.match_length=MIN_MATCH-1,k!==0&&_.prev_length<_.max_lazy_match&&_.strstart-k<=_.w_size-MIN_LOOKAHEAD&&(_.match_length=longest_match(_,k),_.match_length<=5&&(_.strategy===Z_FILTERED||_.match_length===MIN_MATCH&&_.strstart-_.match_start>4096)&&(_.match_length=MIN_MATCH-1)),_.prev_length>=MIN_MATCH&&_.match_length<=_.prev_length){$=_.strstart+_.lookahead-MIN_MATCH,D=_tr_tally(_,_.strstart-1-_.prev_match,_.prev_length-MIN_MATCH),_.lookahead-=_.prev_length-1,_.prev_length-=2;do++_.strstart<=$&&(_.ins_h=HASH(_,_.ins_h,_.window[_.strstart+MIN_MATCH-1]),k=_.prev[_.strstart&_.w_mask]=_.head[_.ins_h],_.head[_.ins_h]=_.strstart);while(--_.prev_length!==0);if(_.match_available=0,_.match_length=MIN_MATCH-1,_.strstart++,D&&(flush_block_only(_,!1),_.strm.avail_out===0))return BS_NEED_MORE}else if(_.match_available){if(D=_tr_tally(_,0,_.window[_.strstart-1]),D&&flush_block_only(_,!1),_.strstart++,_.lookahead--,_.strm.avail_out===0)return BS_NEED_MORE}else _.match_available=1,_.strstart++,_.lookahead--}return _.match_available&&(D=_tr_tally(_,0,_.window[_.strstart-1]),_.match_available=0),_.insert=_.strstart<MIN_MATCH-1?_.strstart:MIN_MATCH-1,q===Z_FINISH$3?(flush_block_only(_,!0),_.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):_.sym_next&&(flush_block_only(_,!1),_.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_rle=(_,q)=>{let k,D,$,I;const e=_.window;for(;;){if(_.lookahead<=MAX_MATCH){if(fill_window(_),_.lookahead<=MAX_MATCH&&q===Z_NO_FLUSH$2)return BS_NEED_MORE;if(_.lookahead===0)break}if(_.match_length=0,_.lookahead>=MIN_MATCH&&_.strstart>0&&($=_.strstart-1,D=e[$],D===e[++$]&&D===e[++$]&&D===e[++$])){I=_.strstart+MAX_MATCH;do;while(D===e[++$]&&D===e[++$]&&D===e[++$]&&D===e[++$]&&D===e[++$]&&D===e[++$]&&D===e[++$]&&D===e[++$]&&$<I);_.match_length=MAX_MATCH-(I-$),_.match_length>_.lookahead&&(_.match_length=_.lookahead)}if(_.match_length>=MIN_MATCH?(k=_tr_tally(_,1,_.match_length-MIN_MATCH),_.lookahead-=_.match_length,_.strstart+=_.match_length,_.match_length=0):(k=_tr_tally(_,0,_.window[_.strstart]),_.lookahead--,_.strstart++),k&&(flush_block_only(_,!1),_.strm.avail_out===0))return BS_NEED_MORE}return _.insert=0,q===Z_FINISH$3?(flush_block_only(_,!0),_.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):_.sym_next&&(flush_block_only(_,!1),_.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_huff=(_,q)=>{let k;for(;;){if(_.lookahead===0&&(fill_window(_),_.lookahead===0)){if(q===Z_NO_FLUSH$2)return BS_NEED_MORE;break}if(_.match_length=0,k=_tr_tally(_,0,_.window[_.strstart]),_.lookahead--,_.strstart++,k&&(flush_block_only(_,!1),_.strm.avail_out===0))return BS_NEED_MORE}return _.insert=0,q===Z_FINISH$3?(flush_block_only(_,!0),_.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):_.sym_next&&(flush_block_only(_,!1),_.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE};function Config(_,q,k,D,$){this.good_length=_,this.max_lazy=q,this.nice_length=k,this.max_chain=D,this.func=$}const configuration_table=[new Config(0,0,0,0,deflate_stored),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)],lm_init=_=>{_.window_size=2*_.w_size,zero(_.head),_.max_lazy_match=configuration_table[_.level].max_lazy,_.good_match=configuration_table[_.level].good_length,_.nice_match=configuration_table[_.level].nice_length,_.max_chain_length=configuration_table[_.level].max_chain,_.strstart=0,_.block_start=0,_.lookahead=0,_.insert=0,_.match_length=_.prev_length=MIN_MATCH-1,_.match_available=0,_.ins_h=0};function DeflateState(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Z_DEFLATED$2,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(HEAP_SIZE*2),this.dyn_dtree=new Uint16Array((2*D_CODES+1)*2),this.bl_tree=new Uint16Array((2*BL_CODES+1)*2),zero(this.dyn_ltree),zero(this.dyn_dtree),zero(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(MAX_BITS+1),this.heap=new Uint16Array(2*L_CODES+1),zero(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*L_CODES+1),zero(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const deflateStateCheck=_=>{if(!_)return 1;const q=_.state;return!q||q.strm!==_||q.status!==INIT_STATE&&q.status!==GZIP_STATE&&q.status!==EXTRA_STATE&&q.status!==NAME_STATE&&q.status!==COMMENT_STATE&&q.status!==HCRC_STATE&&q.status!==BUSY_STATE&&q.status!==FINISH_STATE?1:0},deflateResetKeep=_=>{if(deflateStateCheck(_))return err(_,Z_STREAM_ERROR$2);_.total_in=_.total_out=0,_.data_type=Z_UNKNOWN;const q=_.state;return q.pending=0,q.pending_out=0,q.wrap<0&&(q.wrap=-q.wrap),q.status=q.wrap===2?GZIP_STATE:q.wrap?INIT_STATE:BUSY_STATE,_.adler=q.wrap===2?0:1,q.last_flush=-2,_tr_init(q),Z_OK$3},deflateReset=_=>{const q=deflateResetKeep(_);return q===Z_OK$3&&lm_init(_.state),q},deflateSetHeader=(_,q)=>deflateStateCheck(_)||_.state.wrap!==2?Z_STREAM_ERROR$2:(_.state.gzhead=q,Z_OK$3),deflateInit2=(_,q,k,D,$,I)=>{if(!_)return Z_STREAM_ERROR$2;let e=1;if(q===Z_DEFAULT_COMPRESSION$1&&(q=6),D<0?(e=0,D=-D):D>15&&(e=2,D-=16),$<1||$>MAX_MEM_LEVEL||k!==Z_DEFLATED$2||D<8||D>15||q<0||q>9||I<0||I>Z_FIXED||D===8&&e!==1)return err(_,Z_STREAM_ERROR$2);D===8&&(D=9);const u=new DeflateState;return _.state=u,u.strm=_,u.status=INIT_STATE,u.wrap=e,u.gzhead=null,u.w_bits=D,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=$+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+MIN_MATCH-1)/MIN_MATCH),u.window=new Uint8Array(u.w_size*2),u.head=new Uint16Array(u.hash_size),u.prev=new Uint16Array(u.w_size),u.lit_bufsize=1<<$+6,u.pending_buf_size=u.lit_bufsize*4,u.pending_buf=new Uint8Array(u.pending_buf_size),u.sym_buf=u.lit_bufsize,u.sym_end=(u.lit_bufsize-1)*3,u.level=q,u.strategy=I,u.method=k,deflateReset(_)},deflateInit=(_,q)=>deflateInit2(_,q,Z_DEFLATED$2,MAX_WBITS$1,DEF_MEM_LEVEL,Z_DEFAULT_STRATEGY$1),deflate$2=(_,q)=>{if(deflateStateCheck(_)||q>Z_BLOCK$1||q<0)return _?err(_,Z_STREAM_ERROR$2):Z_STREAM_ERROR$2;const k=_.state;if(!_.output||_.avail_in!==0&&!_.input||k.status===FINISH_STATE&&q!==Z_FINISH$3)return err(_,_.avail_out===0?Z_BUF_ERROR$1:Z_STREAM_ERROR$2);const D=k.last_flush;if(k.last_flush=q,k.pending!==0){if(flush_pending(_),_.avail_out===0)return k.last_flush=-1,Z_OK$3}else if(_.avail_in===0&&rank(q)<=rank(D)&&q!==Z_FINISH$3)return err(_,Z_BUF_ERROR$1);if(k.status===FINISH_STATE&&_.avail_in!==0)return err(_,Z_BUF_ERROR$1);if(k.status===INIT_STATE&&k.wrap===0&&(k.status=BUSY_STATE),k.status===INIT_STATE){let $=Z_DEFLATED$2+(k.w_bits-8<<4)<<8,I=-1;if(k.strategy>=Z_HUFFMAN_ONLY||k.level<2?I=0:k.level<6?I=1:k.level===6?I=2:I=3,$|=I<<6,k.strstart!==0&&($|=PRESET_DICT),$+=31-$%31,putShortMSB(k,$),k.strstart!==0&&(putShortMSB(k,_.adler>>>16),putShortMSB(k,_.adler&65535)),_.adler=1,k.status=BUSY_STATE,flush_pending(_),k.pending!==0)return k.last_flush=-1,Z_OK$3}if(k.status===GZIP_STATE){if(_.adler=0,put_byte(k,31),put_byte(k,139),put_byte(k,8),k.gzhead)put_byte(k,(k.gzhead.text?1:0)+(k.gzhead.hcrc?2:0)+(k.gzhead.extra?4:0)+(k.gzhead.name?8:0)+(k.gzhead.comment?16:0)),put_byte(k,k.gzhead.time&255),put_byte(k,k.gzhead.time>>8&255),put_byte(k,k.gzhead.time>>16&255),put_byte(k,k.gzhead.time>>24&255),put_byte(k,k.level===9?2:k.strategy>=Z_HUFFMAN_ONLY||k.level<2?4:0),put_byte(k,k.gzhead.os&255),k.gzhead.extra&&k.gzhead.extra.length&&(put_byte(k,k.gzhead.extra.length&255),put_byte(k,k.gzhead.extra.length>>8&255)),k.gzhead.hcrc&&(_.adler=crc32_1(_.adler,k.pending_buf,k.pending,0)),k.gzindex=0,k.status=EXTRA_STATE;else if(put_byte(k,0),put_byte(k,0),put_byte(k,0),put_byte(k,0),put_byte(k,0),put_byte(k,k.level===9?2:k.strategy>=Z_HUFFMAN_ONLY||k.level<2?4:0),put_byte(k,OS_CODE),k.status=BUSY_STATE,flush_pending(_),k.pending!==0)return k.last_flush=-1,Z_OK$3}if(k.status===EXTRA_STATE){if(k.gzhead.extra){let $=k.pending,I=(k.gzhead.extra.length&65535)-k.gzindex;for(;k.pending+I>k.pending_buf_size;){let u=k.pending_buf_size-k.pending;if(k.pending_buf.set(k.gzhead.extra.subarray(k.gzindex,k.gzindex+u),k.pending),k.pending=k.pending_buf_size,k.gzhead.hcrc&&k.pending>$&&(_.adler=crc32_1(_.adler,k.pending_buf,k.pending-$,$)),k.gzindex+=u,flush_pending(_),k.pending!==0)return k.last_flush=-1,Z_OK$3;$=0,I-=u}let e=new Uint8Array(k.gzhead.extra);k.pending_buf.set(e.subarray(k.gzindex,k.gzindex+I),k.pending),k.pending+=I,k.gzhead.hcrc&&k.pending>$&&(_.adler=crc32_1(_.adler,k.pending_buf,k.pending-$,$)),k.gzindex=0}k.status=NAME_STATE}if(k.status===NAME_STATE){if(k.gzhead.name){let $=k.pending,I;do{if(k.pending===k.pending_buf_size){if(k.gzhead.hcrc&&k.pending>$&&(_.adler=crc32_1(_.adler,k.pending_buf,k.pending-$,$)),flush_pending(_),k.pending!==0)return k.last_flush=-1,Z_OK$3;$=0}k.gzindex<k.gzhead.name.length?I=k.gzhead.name.charCodeAt(k.gzindex++)&255:I=0,put_byte(k,I)}while(I!==0);k.gzhead.hcrc&&k.pending>$&&(_.adler=crc32_1(_.adler,k.pending_buf,k.pending-$,$)),k.gzindex=0}k.status=COMMENT_STATE}if(k.status===COMMENT_STATE){if(k.gzhead.comment){let $=k.pending,I;do{if(k.pending===k.pending_buf_size){if(k.gzhead.hcrc&&k.pending>$&&(_.adler=crc32_1(_.adler,k.pending_buf,k.pending-$,$)),flush_pending(_),k.pending!==0)return k.last_flush=-1,Z_OK$3;$=0}k.gzindex<k.gzhead.comment.length?I=k.gzhead.comment.charCodeAt(k.gzindex++)&255:I=0,put_byte(k,I)}while(I!==0);k.gzhead.hcrc&&k.pending>$&&(_.adler=crc32_1(_.adler,k.pending_buf,k.pending-$,$))}k.status=HCRC_STATE}if(k.status===HCRC_STATE){if(k.gzhead.hcrc){if(k.pending+2>k.pending_buf_size&&(flush_pending(_),k.pending!==0))return k.last_flush=-1,Z_OK$3;put_byte(k,_.adler&255),put_byte(k,_.adler>>8&255),_.adler=0}if(k.status=BUSY_STATE,flush_pending(_),k.pending!==0)return k.last_flush=-1,Z_OK$3}if(_.avail_in!==0||k.lookahead!==0||q!==Z_NO_FLUSH$2&&k.status!==FINISH_STATE){let $=k.level===0?deflate_stored(k,q):k.strategy===Z_HUFFMAN_ONLY?deflate_huff(k,q):k.strategy===Z_RLE?deflate_rle(k,q):configuration_table[k.level].func(k,q);if(($===BS_FINISH_STARTED||$===BS_FINISH_DONE)&&(k.status=FINISH_STATE),$===BS_NEED_MORE||$===BS_FINISH_STARTED)return _.avail_out===0&&(k.last_flush=-1),Z_OK$3;if($===BS_BLOCK_DONE&&(q===Z_PARTIAL_FLUSH?_tr_align(k):q!==Z_BLOCK$1&&(_tr_stored_block(k,0,0,!1),q===Z_FULL_FLUSH$1&&(zero(k.head),k.lookahead===0&&(k.strstart=0,k.block_start=0,k.insert=0))),flush_pending(_),_.avail_out===0))return k.last_flush=-1,Z_OK$3}return q!==Z_FINISH$3?Z_OK$3:k.wrap<=0?Z_STREAM_END$3:(k.wrap===2?(put_byte(k,_.adler&255),put_byte(k,_.adler>>8&255),put_byte(k,_.adler>>16&255),put_byte(k,_.adler>>24&255),put_byte(k,_.total_in&255),put_byte(k,_.total_in>>8&255),put_byte(k,_.total_in>>16&255),put_byte(k,_.total_in>>24&255)):(putShortMSB(k,_.adler>>>16),putShortMSB(k,_.adler&65535)),flush_pending(_),k.wrap>0&&(k.wrap=-k.wrap),k.pending!==0?Z_OK$3:Z_STREAM_END$3)},deflateEnd=_=>{if(deflateStateCheck(_))return Z_STREAM_ERROR$2;const q=_.state.status;return _.state=null,q===BUSY_STATE?err(_,Z_DATA_ERROR$2):Z_OK$3},deflateSetDictionary=(_,q)=>{let k=q.length;if(deflateStateCheck(_))return Z_STREAM_ERROR$2;const D=_.state,$=D.wrap;if($===2||$===1&&D.status!==INIT_STATE||D.lookahead)return Z_STREAM_ERROR$2;if($===1&&(_.adler=adler32_1(_.adler,q,k,0)),D.wrap=0,k>=D.w_size){$===0&&(zero(D.head),D.strstart=0,D.block_start=0,D.insert=0);let N=new Uint8Array(D.w_size);N.set(q.subarray(k-D.w_size,k),0),q=N,k=D.w_size}const I=_.avail_in,e=_.next_in,u=_.input;for(_.avail_in=k,_.next_in=0,_.input=q,fill_window(D);D.lookahead>=MIN_MATCH;){let N=D.strstart,A=D.lookahead-(MIN_MATCH-1);do D.ins_h=HASH(D,D.ins_h,D.window[N+MIN_MATCH-1]),D.prev[N&D.w_mask]=D.head[D.ins_h],D.head[D.ins_h]=N,N++;while(--A);D.strstart=N,D.lookahead=MIN_MATCH-1,fill_window(D)}return D.strstart+=D.lookahead,D.block_start=D.strstart,D.insert=D.lookahead,D.lookahead=0,D.match_length=D.prev_length=MIN_MATCH-1,D.match_available=0,_.next_in=e,_.input=u,_.avail_in=I,D.wrap=$,Z_OK$3};var deflateInit_1=deflateInit,deflateInit2_1=deflateInit2,deflateReset_1=deflateReset,deflateResetKeep_1=deflateResetKeep,deflateSetHeader_1=deflateSetHeader,deflate_2$1=deflate$2,deflateEnd_1=deflateEnd,deflateSetDictionary_1=deflateSetDictionary,deflateInfo="pako deflate (from Nodeca project)",deflate_1$2={deflateInit:deflateInit_1,deflateInit2:deflateInit2_1,deflateReset:deflateReset_1,deflateResetKeep:deflateResetKeep_1,deflateSetHeader:deflateSetHeader_1,deflate:deflate_2$1,deflateEnd:deflateEnd_1,deflateSetDictionary:deflateSetDictionary_1,deflateInfo};const _has=(_,q)=>Object.prototype.hasOwnProperty.call(_,q);var assign=function(_){const q=Array.prototype.slice.call(arguments,1);for(;q.length;){const k=q.shift();if(k){if(typeof k!="object")throw new TypeError(k+"must be non-object");for(const D in k)_has(k,D)&&(_[D]=k[D])}}return _},flattenChunks=_=>{let q=0;for(let D=0,$=_.length;D<$;D++)q+=_[D].length;const k=new Uint8Array(q);for(let D=0,$=0,I=_.length;D<I;D++){let e=_[D];k.set(e,$),$+=e.length}return k},common={assign,flattenChunks};let STR_APPLY_UIA_OK=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(_){STR_APPLY_UIA_OK=!1}const _utf8len=new Uint8Array(256);for(let _=0;_<256;_++)_utf8len[_]=_>=252?6:_>=248?5:_>=240?4:_>=224?3:_>=192?2:1;_utf8len[254]=_utf8len[254]=1;var string2buf=_=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(_);let q,k,D,$,I,e=_.length,u=0;for($=0;$<e;$++)k=_.charCodeAt($),(k&64512)===55296&&$+1<e&&(D=_.charCodeAt($+1),(D&64512)===56320&&(k=65536+(k-55296<<10)+(D-56320),$++)),u+=k<128?1:k<2048?2:k<65536?3:4;for(q=new Uint8Array(u),I=0,$=0;I<u;$++)k=_.charCodeAt($),(k&64512)===55296&&$+1<e&&(D=_.charCodeAt($+1),(D&64512)===56320&&(k=65536+(k-55296<<10)+(D-56320),$++)),k<128?q[I++]=k:k<2048?(q[I++]=192|k>>>6,q[I++]=128|k&63):k<65536?(q[I++]=224|k>>>12,q[I++]=128|k>>>6&63,q[I++]=128|k&63):(q[I++]=240|k>>>18,q[I++]=128|k>>>12&63,q[I++]=128|k>>>6&63,q[I++]=128|k&63);return q};const buf2binstring=(_,q)=>{if(q<65534&&_.subarray&&STR_APPLY_UIA_OK)return String.fromCharCode.apply(null,_.length===q?_:_.subarray(0,q));let k="";for(let D=0;D<q;D++)k+=String.fromCharCode(_[D]);return k};var buf2string=(_,q)=>{const k=q||_.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(_.subarray(0,q));let D,$;const I=new Array(k*2);for($=0,D=0;D<k;){let e=_[D++];if(e<128){I[$++]=e;continue}let u=_utf8len[e];if(u>4){I[$++]=65533,D+=u-1;continue}for(e&=u===2?31:u===3?15:7;u>1&&D<k;)e=e<<6|_[D++]&63,u--;if(u>1){I[$++]=65533;continue}e<65536?I[$++]=e:(e-=65536,I[$++]=55296|e>>10&1023,I[$++]=56320|e&1023)}return buf2binstring(I,$)},utf8border=(_,q)=>{q=q||_.length,q>_.length&&(q=_.length);let k=q-1;for(;k>=0&&(_[k]&192)===128;)k--;return k<0||k===0?q:k+_utf8len[_[k]]>q?k:q},strings={string2buf,buf2string,utf8border};function ZStream(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var zstream=ZStream;const toString$1=Object.prototype.toString,{Z_NO_FLUSH:Z_NO_FLUSH$1,Z_SYNC_FLUSH,Z_FULL_FLUSH,Z_FINISH:Z_FINISH$2,Z_OK:Z_OK$2,Z_STREAM_END:Z_STREAM_END$2,Z_DEFAULT_COMPRESSION,Z_DEFAULT_STRATEGY,Z_DEFLATED:Z_DEFLATED$1}=constants$2;function Deflate$1(_){this.options=common.assign({level:Z_DEFAULT_COMPRESSION,method:Z_DEFLATED$1,chunkSize:16384,windowBits:15,memLevel:8,strategy:Z_DEFAULT_STRATEGY},_||{});let q=this.options;q.raw&&q.windowBits>0?q.windowBits=-q.windowBits:q.gzip&&q.windowBits>0&&q.windowBits<16&&(q.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let k=deflate_1$2.deflateInit2(this.strm,q.level,q.method,q.windowBits,q.memLevel,q.strategy);if(k!==Z_OK$2)throw new Error(messages[k]);if(q.header&&deflate_1$2.deflateSetHeader(this.strm,q.header),q.dictionary){let D;if(typeof q.dictionary=="string"?D=strings.string2buf(q.dictionary):toString$1.call(q.dictionary)==="[object ArrayBuffer]"?D=new Uint8Array(q.dictionary):D=q.dictionary,k=deflate_1$2.deflateSetDictionary(this.strm,D),k!==Z_OK$2)throw new Error(messages[k]);this._dict_set=!0}}Deflate$1.prototype.push=function(_,q){const k=this.strm,D=this.options.chunkSize;let $,I;if(this.ended)return!1;for(q===~~q?I=q:I=q===!0?Z_FINISH$2:Z_NO_FLUSH$1,typeof _=="string"?k.input=strings.string2buf(_):toString$1.call(_)==="[object ArrayBuffer]"?k.input=new Uint8Array(_):k.input=_,k.next_in=0,k.avail_in=k.input.length;;){if(k.avail_out===0&&(k.output=new Uint8Array(D),k.next_out=0,k.avail_out=D),(I===Z_SYNC_FLUSH||I===Z_FULL_FLUSH)&&k.avail_out<=6){this.onData(k.output.subarray(0,k.next_out)),k.avail_out=0;continue}if($=deflate_1$2.deflate(k,I),$===Z_STREAM_END$2)return k.next_out>0&&this.onData(k.output.subarray(0,k.next_out)),$=deflate_1$2.deflateEnd(this.strm),this.onEnd($),this.ended=!0,$===Z_OK$2;if(k.avail_out===0){this.onData(k.output);continue}if(I>0&&k.next_out>0){this.onData(k.output.subarray(0,k.next_out)),k.avail_out=0;continue}if(k.avail_in===0)break}return!0},Deflate$1.prototype.onData=function(_){this.chunks.push(_)},Deflate$1.prototype.onEnd=function(_){_===Z_OK$2&&(this.result=common.flattenChunks(this.chunks)),this.chunks=[],this.err=_,this.msg=this.strm.msg};function deflate$1(_,q){const k=new Deflate$1(q);if(k.push(_,!0),k.err)throw k.msg||messages[k.err];return k.result}function deflateRaw$1(_,q){return q=q||{},q.raw=!0,deflate$1(_,q)}function gzip$1(_,q){return q=q||{},q.gzip=!0,deflate$1(_,q)}var Deflate_1$1=Deflate$1,deflate_2=deflate$1,deflateRaw_1$1=deflateRaw$1,gzip_1$1=gzip$1,deflate_1$1={Deflate:Deflate_1$1,deflate:deflate_2,deflateRaw:deflateRaw_1$1,gzip:gzip_1$1};const BAD$1=16209,TYPE$1=16191;var inffast=function _(q,k){let D,$,I,e,u,N,A,U,L,P,Z,F,W,J,z,V,X,Y,et,ft,tt,st,rt,nt;const ot=q.state;D=q.next_in,rt=q.input,$=D+(q.avail_in-5),I=q.next_out,nt=q.output,e=I-(k-q.avail_out),u=I+(q.avail_out-257),N=ot.dmax,A=ot.wsize,U=ot.whave,L=ot.wnext,P=ot.window,Z=ot.hold,F=ot.bits,W=ot.lencode,J=ot.distcode,z=(1<<ot.lenbits)-1,V=(1<<ot.distbits)-1;t:do{F<15&&(Z+=rt[D++]<<F,F+=8,Z+=rt[D++]<<F,F+=8),X=W[Z&z];e:for(;;){if(Y=X>>>24,Z>>>=Y,F-=Y,Y=X>>>16&255,Y===0)nt[I++]=X&65535;else if(Y&16){et=X&65535,Y&=15,Y&&(F<Y&&(Z+=rt[D++]<<F,F+=8),et+=Z&(1<<Y)-1,Z>>>=Y,F-=Y),F<15&&(Z+=rt[D++]<<F,F+=8,Z+=rt[D++]<<F,F+=8),X=J[Z&V];i:for(;;){if(Y=X>>>24,Z>>>=Y,F-=Y,Y=X>>>16&255,Y&16){if(ft=X&65535,Y&=15,F<Y&&(Z+=rt[D++]<<F,F+=8,F<Y&&(Z+=rt[D++]<<F,F+=8)),ft+=Z&(1<<Y)-1,ft>N){q.msg="invalid distance too far back",ot.mode=BAD$1;break t}if(Z>>>=Y,F-=Y,Y=I-e,ft>Y){if(Y=ft-Y,Y>U&&ot.sane){q.msg="invalid distance too far back",ot.mode=BAD$1;break t}if(tt=0,st=P,L===0){if(tt+=A-Y,Y<et){et-=Y;do nt[I++]=P[tt++];while(--Y);tt=I-ft,st=nt}}else if(L<Y){if(tt+=A+L-Y,Y-=L,Y<et){et-=Y;do nt[I++]=P[tt++];while(--Y);if(tt=0,L<et){Y=L,et-=Y;do nt[I++]=P[tt++];while(--Y);tt=I-ft,st=nt}}}else if(tt+=L-Y,Y<et){et-=Y;do nt[I++]=P[tt++];while(--Y);tt=I-ft,st=nt}for(;et>2;)nt[I++]=st[tt++],nt[I++]=st[tt++],nt[I++]=st[tt++],et-=3;et&&(nt[I++]=st[tt++],et>1&&(nt[I++]=st[tt++]))}else{tt=I-ft;do nt[I++]=nt[tt++],nt[I++]=nt[tt++],nt[I++]=nt[tt++],et-=3;while(et>2);et&&(nt[I++]=nt[tt++],et>1&&(nt[I++]=nt[tt++]))}}else if((Y&64)===0){X=J[(X&65535)+(Z&(1<<Y)-1)];continue i}else{q.msg="invalid distance code",ot.mode=BAD$1;break t}break}}else if((Y&64)===0){X=W[(X&65535)+(Z&(1<<Y)-1)];continue e}else if(Y&32){ot.mode=TYPE$1;break t}else{q.msg="invalid literal/length code",ot.mode=BAD$1;break t}break}}while(D<$&&I<u);et=F>>3,D-=et,F-=et<<3,Z&=(1<<F)-1,q.next_in=D,q.next_out=I,q.avail_in=D<$?5+($-D):5-(D-$),q.avail_out=I<u?257+(u-I):257-(I-u),ot.hold=Z,ot.bits=F};const MAXBITS=15,ENOUGH_LENS$1=852,ENOUGH_DISTS$1=592,CODES$1=0,LENS$1=1,DISTS$1=2,lbase=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),lext=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),dbase=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),dext=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),inflate_table=(_,q,k,D,$,I,e,u)=>{const N=u.bits;let A=0,U=0,L=0,P=0,Z=0,F=0,W=0,J=0,z=0,V=0,X,Y,et,ft,tt,st=null,rt;const nt=new Uint16Array(MAXBITS+1),ot=new Uint16Array(MAXBITS+1);let St=null,Kt,Jt,Wt;for(A=0;A<=MAXBITS;A++)nt[A]=0;for(U=0;U<D;U++)nt[q[k+U]]++;for(Z=N,P=MAXBITS;P>=1&&nt[P]===0;P--);if(Z>P&&(Z=P),P===0)return $[I++]=1<<24|64<<16|0,$[I++]=1<<24|64<<16|0,u.bits=1,0;for(L=1;L<P&&nt[L]===0;L++);for(Z<L&&(Z=L),J=1,A=1;A<=MAXBITS;A++)if(J<<=1,J-=nt[A],J<0)return-1;if(J>0&&(_===CODES$1||P!==1))return-1;for(ot[1]=0,A=1;A<MAXBITS;A++)ot[A+1]=ot[A]+nt[A];for(U=0;U<D;U++)q[k+U]!==0&&(e[ot[q[k+U]]++]=U);if(_===CODES$1?(st=St=e,rt=20):_===LENS$1?(st=lbase,St=lext,rt=257):(st=dbase,St=dext,rt=0),V=0,U=0,A=L,tt=I,F=Z,W=0,et=-1,z=1<<Z,ft=z-1,_===LENS$1&&z>ENOUGH_LENS$1||_===DISTS$1&&z>ENOUGH_DISTS$1)return 1;for(;;){Kt=A-W,e[U]+1<rt?(Jt=0,Wt=e[U]):e[U]>=rt?(Jt=St[e[U]-rt],Wt=st[e[U]-rt]):(Jt=96,Wt=0),X=1<<A-W,Y=1<<F,L=Y;do Y-=X,$[tt+(V>>W)+Y]=Kt<<24|Jt<<16|Wt|0;while(Y!==0);for(X=1<<A-1;V&X;)X>>=1;if(X!==0?(V&=X-1,V+=X):V=0,U++,--nt[A]===0){if(A===P)break;A=q[k+e[U]]}if(A>Z&&(V&ft)!==et){for(W===0&&(W=Z),tt+=L,F=A-W,J=1<<F;F+W<P&&(J-=nt[F+W],!(J<=0));)F++,J<<=1;if(z+=1<<F,_===LENS$1&&z>ENOUGH_LENS$1||_===DISTS$1&&z>ENOUGH_DISTS$1)return 1;et=V&ft,$[et]=Z<<24|F<<16|tt-I|0}}return V!==0&&($[tt+V]=A-W<<24|64<<16|0),u.bits=Z,0};var inftrees=inflate_table;const CODES=0,LENS=1,DISTS=2,{Z_FINISH:Z_FINISH$1,Z_BLOCK,Z_TREES,Z_OK:Z_OK$1,Z_STREAM_END:Z_STREAM_END$1,Z_NEED_DICT:Z_NEED_DICT$1,Z_STREAM_ERROR:Z_STREAM_ERROR$1,Z_DATA_ERROR:Z_DATA_ERROR$1,Z_MEM_ERROR:Z_MEM_ERROR$1,Z_BUF_ERROR,Z_DEFLATED}=constants$2,HEAD=16180,FLAGS=16181,TIME=16182,OS=16183,EXLEN=16184,EXTRA=16185,NAME=16186,COMMENT=16187,HCRC=16188,DICTID=16189,DICT=16190,TYPE=16191,TYPEDO=16192,STORED=16193,COPY_=16194,COPY=16195,TABLE=16196,LENLENS=16197,CODELENS=16198,LEN_=16199,LEN=16200,LENEXT=16201,DIST=16202,DISTEXT=16203,MATCH=16204,LIT=16205,CHECK=16206,LENGTH=16207,DONE=16208,BAD=16209,MEM=16210,SYNC=16211,ENOUGH_LENS=852,ENOUGH_DISTS=592,MAX_WBITS=15,DEF_WBITS=MAX_WBITS,zswap32=_=>(_>>>24&255)+(_>>>8&65280)+((_&65280)<<8)+((_&255)<<24);function InflateState(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const inflateStateCheck=_=>{if(!_)return 1;const q=_.state;return!q||q.strm!==_||q.mode<HEAD||q.mode>SYNC?1:0},inflateResetKeep=_=>{if(inflateStateCheck(_))return Z_STREAM_ERROR$1;const q=_.state;return _.total_in=_.total_out=q.total=0,_.msg="",q.wrap&&(_.adler=q.wrap&1),q.mode=HEAD,q.last=0,q.havedict=0,q.flags=-1,q.dmax=32768,q.head=null,q.hold=0,q.bits=0,q.lencode=q.lendyn=new Int32Array(ENOUGH_LENS),q.distcode=q.distdyn=new Int32Array(ENOUGH_DISTS),q.sane=1,q.back=-1,Z_OK$1},inflateReset=_=>{if(inflateStateCheck(_))return Z_STREAM_ERROR$1;const q=_.state;return q.wsize=0,q.whave=0,q.wnext=0,inflateResetKeep(_)},inflateReset2=(_,q)=>{let k;if(inflateStateCheck(_))return Z_STREAM_ERROR$1;const D=_.state;return q<0?(k=0,q=-q):(k=(q>>4)+5,q<48&&(q&=15)),q&&(q<8||q>15)?Z_STREAM_ERROR$1:(D.window!==null&&D.wbits!==q&&(D.window=null),D.wrap=k,D.wbits=q,inflateReset(_))},inflateInit2=(_,q)=>{if(!_)return Z_STREAM_ERROR$1;const k=new InflateState;_.state=k,k.strm=_,k.window=null,k.mode=HEAD;const D=inflateReset2(_,q);return D!==Z_OK$1&&(_.state=null),D},inflateInit=_=>inflateInit2(_,DEF_WBITS);let virgin=!0,lenfix,distfix;const fixedtables=_=>{if(virgin){lenfix=new Int32Array(512),distfix=new Int32Array(32);let q=0;for(;q<144;)_.lens[q++]=8;for(;q<256;)_.lens[q++]=9;for(;q<280;)_.lens[q++]=7;for(;q<288;)_.lens[q++]=8;for(inftrees(LENS,_.lens,0,288,lenfix,0,_.work,{bits:9}),q=0;q<32;)_.lens[q++]=5;inftrees(DISTS,_.lens,0,32,distfix,0,_.work,{bits:5}),virgin=!1}_.lencode=lenfix,_.lenbits=9,_.distcode=distfix,_.distbits=5},updatewindow=(_,q,k,D)=>{let $;const I=_.state;return I.window===null&&(I.wsize=1<<I.wbits,I.wnext=0,I.whave=0,I.window=new Uint8Array(I.wsize)),D>=I.wsize?(I.window.set(q.subarray(k-I.wsize,k),0),I.wnext=0,I.whave=I.wsize):($=I.wsize-I.wnext,$>D&&($=D),I.window.set(q.subarray(k-D,k-D+$),I.wnext),D-=$,D?(I.window.set(q.subarray(k-D,k),0),I.wnext=D,I.whave=I.wsize):(I.wnext+=$,I.wnext===I.wsize&&(I.wnext=0),I.whave<I.wsize&&(I.whave+=$))),0},inflate$2=(_,q)=>{let k,D,$,I,e,u,N,A,U,L,P,Z,F,W,J=0,z,V,X,Y,et,ft,tt,st;const rt=new Uint8Array(4);let nt,ot;const St=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(inflateStateCheck(_)||!_.output||!_.input&&_.avail_in!==0)return Z_STREAM_ERROR$1;k=_.state,k.mode===TYPE&&(k.mode=TYPEDO),e=_.next_out,$=_.output,N=_.avail_out,I=_.next_in,D=_.input,u=_.avail_in,A=k.hold,U=k.bits,L=u,P=N,st=Z_OK$1;t:for(;;)switch(k.mode){case HEAD:if(k.wrap===0){k.mode=TYPEDO;break}for(;U<16;){if(u===0)break t;u--,A+=D[I++]<<U,U+=8}if(k.wrap&2&&A===35615){k.wbits===0&&(k.wbits=15),k.check=0,rt[0]=A&255,rt[1]=A>>>8&255,k.check=crc32_1(k.check,rt,2,0),A=0,U=0,k.mode=FLAGS;break}if(k.head&&(k.head.done=!1),!(k.wrap&1)||(((A&255)<<8)+(A>>8))%31){_.msg="incorrect header check",k.mode=BAD;break}if((A&15)!==Z_DEFLATED){_.msg="unknown compression method",k.mode=BAD;break}if(A>>>=4,U-=4,tt=(A&15)+8,k.wbits===0&&(k.wbits=tt),tt>15||tt>k.wbits){_.msg="invalid window size",k.mode=BAD;break}k.dmax=1<<k.wbits,k.flags=0,_.adler=k.check=1,k.mode=A&512?DICTID:TYPE,A=0,U=0;break;case FLAGS:for(;U<16;){if(u===0)break t;u--,A+=D[I++]<<U,U+=8}if(k.flags=A,(k.flags&255)!==Z_DEFLATED){_.msg="unknown compression method",k.mode=BAD;break}if(k.flags&57344){_.msg="unknown header flags set",k.mode=BAD;break}k.head&&(k.head.text=A>>8&1),k.flags&512&&k.wrap&4&&(rt[0]=A&255,rt[1]=A>>>8&255,k.check=crc32_1(k.check,rt,2,0)),A=0,U=0,k.mode=TIME;case TIME:for(;U<32;){if(u===0)break t;u--,A+=D[I++]<<U,U+=8}k.head&&(k.head.time=A),k.flags&512&&k.wrap&4&&(rt[0]=A&255,rt[1]=A>>>8&255,rt[2]=A>>>16&255,rt[3]=A>>>24&255,k.check=crc32_1(k.check,rt,4,0)),A=0,U=0,k.mode=OS;case OS:for(;U<16;){if(u===0)break t;u--,A+=D[I++]<<U,U+=8}k.head&&(k.head.xflags=A&255,k.head.os=A>>8),k.flags&512&&k.wrap&4&&(rt[0]=A&255,rt[1]=A>>>8&255,k.check=crc32_1(k.check,rt,2,0)),A=0,U=0,k.mode=EXLEN;case EXLEN:if(k.flags&1024){for(;U<16;){if(u===0)break t;u--,A+=D[I++]<<U,U+=8}k.length=A,k.head&&(k.head.extra_len=A),k.flags&512&&k.wrap&4&&(rt[0]=A&255,rt[1]=A>>>8&255,k.check=crc32_1(k.check,rt,2,0)),A=0,U=0}else k.head&&(k.head.extra=null);k.mode=EXTRA;case EXTRA:if(k.flags&1024&&(Z=k.length,Z>u&&(Z=u),Z&&(k.head&&(tt=k.head.extra_len-k.length,k.head.extra||(k.head.extra=new Uint8Array(k.head.extra_len)),k.head.extra.set(D.subarray(I,I+Z),tt)),k.flags&512&&k.wrap&4&&(k.check=crc32_1(k.check,D,Z,I)),u-=Z,I+=Z,k.length-=Z),k.length))break t;k.length=0,k.mode=NAME;case NAME:if(k.flags&2048){if(u===0)break t;Z=0;do tt=D[I+Z++],k.head&&tt&&k.length<65536&&(k.head.name+=String.fromCharCode(tt));while(tt&&Z<u);if(k.flags&512&&k.wrap&4&&(k.check=crc32_1(k.check,D,Z,I)),u-=Z,I+=Z,tt)break t}else k.head&&(k.head.name=null);k.length=0,k.mode=COMMENT;case COMMENT:if(k.flags&4096){if(u===0)break t;Z=0;do tt=D[I+Z++],k.head&&tt&&k.length<65536&&(k.head.comment+=String.fromCharCode(tt));while(tt&&Z<u);if(k.flags&512&&k.wrap&4&&(k.check=crc32_1(k.check,D,Z,I)),u-=Z,I+=Z,tt)break t}else k.head&&(k.head.comment=null);k.mode=HCRC;case HCRC:if(k.flags&512){for(;U<16;){if(u===0)break t;u--,A+=D[I++]<<U,U+=8}if(k.wrap&4&&A!==(k.check&65535)){_.msg="header crc mismatch",k.mode=BAD;break}A=0,U=0}k.head&&(k.head.hcrc=k.flags>>9&1,k.head.done=!0),_.adler=k.check=0,k.mode=TYPE;break;case DICTID:for(;U<32;){if(u===0)break t;u--,A+=D[I++]<<U,U+=8}_.adler=k.check=zswap32(A),A=0,U=0,k.mode=DICT;case DICT:if(k.havedict===0)return _.next_out=e,_.avail_out=N,_.next_in=I,_.avail_in=u,k.hold=A,k.bits=U,Z_NEED_DICT$1;_.adler=k.check=1,k.mode=TYPE;case TYPE:if(q===Z_BLOCK||q===Z_TREES)break t;case TYPEDO:if(k.last){A>>>=U&7,U-=U&7,k.mode=CHECK;break}for(;U<3;){if(u===0)break t;u--,A+=D[I++]<<U,U+=8}switch(k.last=A&1,A>>>=1,U-=1,A&3){case 0:k.mode=STORED;break;case 1:if(fixedtables(k),k.mode=LEN_,q===Z_TREES){A>>>=2,U-=2;break t}break;case 2:k.mode=TABLE;break;case 3:_.msg="invalid block type",k.mode=BAD}A>>>=2,U-=2;break;case STORED:for(A>>>=U&7,U-=U&7;U<32;){if(u===0)break t;u--,A+=D[I++]<<U,U+=8}if((A&65535)!==(A>>>16^65535)){_.msg="invalid stored block lengths",k.mode=BAD;break}if(k.length=A&65535,A=0,U=0,k.mode=COPY_,q===Z_TREES)break t;case COPY_:k.mode=COPY;case COPY:if(Z=k.length,Z){if(Z>u&&(Z=u),Z>N&&(Z=N),Z===0)break t;$.set(D.subarray(I,I+Z),e),u-=Z,I+=Z,N-=Z,e+=Z,k.length-=Z;break}k.mode=TYPE;break;case TABLE:for(;U<14;){if(u===0)break t;u--,A+=D[I++]<<U,U+=8}if(k.nlen=(A&31)+257,A>>>=5,U-=5,k.ndist=(A&31)+1,A>>>=5,U-=5,k.ncode=(A&15)+4,A>>>=4,U-=4,k.nlen>286||k.ndist>30){_.msg="too many length or distance symbols",k.mode=BAD;break}k.have=0,k.mode=LENLENS;case LENLENS:for(;k.have<k.ncode;){for(;U<3;){if(u===0)break t;u--,A+=D[I++]<<U,U+=8}k.lens[St[k.have++]]=A&7,A>>>=3,U-=3}for(;k.have<19;)k.lens[St[k.have++]]=0;if(k.lencode=k.lendyn,k.lenbits=7,nt={bits:k.lenbits},st=inftrees(CODES,k.lens,0,19,k.lencode,0,k.work,nt),k.lenbits=nt.bits,st){_.msg="invalid code lengths set",k.mode=BAD;break}k.have=0,k.mode=CODELENS;case CODELENS:for(;k.have<k.nlen+k.ndist;){for(;J=k.lencode[A&(1<<k.lenbits)-1],z=J>>>24,V=J>>>16&255,X=J&65535,!(z<=U);){if(u===0)break t;u--,A+=D[I++]<<U,U+=8}if(X<16)A>>>=z,U-=z,k.lens[k.have++]=X;else{if(X===16){for(ot=z+2;U<ot;){if(u===0)break t;u--,A+=D[I++]<<U,U+=8}if(A>>>=z,U-=z,k.have===0){_.msg="invalid bit length repeat",k.mode=BAD;break}tt=k.lens[k.have-1],Z=3+(A&3),A>>>=2,U-=2}else if(X===17){for(ot=z+3;U<ot;){if(u===0)break t;u--,A+=D[I++]<<U,U+=8}A>>>=z,U-=z,tt=0,Z=3+(A&7),A>>>=3,U-=3}else{for(ot=z+7;U<ot;){if(u===0)break t;u--,A+=D[I++]<<U,U+=8}A>>>=z,U-=z,tt=0,Z=11+(A&127),A>>>=7,U-=7}if(k.have+Z>k.nlen+k.ndist){_.msg="invalid bit length repeat",k.mode=BAD;break}for(;Z--;)k.lens[k.have++]=tt}}if(k.mode===BAD)break;if(k.lens[256]===0){_.msg="invalid code -- missing end-of-block",k.mode=BAD;break}if(k.lenbits=9,nt={bits:k.lenbits},st=inftrees(LENS,k.lens,0,k.nlen,k.lencode,0,k.work,nt),k.lenbits=nt.bits,st){_.msg="invalid literal/lengths set",k.mode=BAD;break}if(k.distbits=6,k.distcode=k.distdyn,nt={bits:k.distbits},st=inftrees(DISTS,k.lens,k.nlen,k.ndist,k.distcode,0,k.work,nt),k.distbits=nt.bits,st){_.msg="invalid distances set",k.mode=BAD;break}if(k.mode=LEN_,q===Z_TREES)break t;case LEN_:k.mode=LEN;case LEN:if(u>=6&&N>=258){_.next_out=e,_.avail_out=N,_.next_in=I,_.avail_in=u,k.hold=A,k.bits=U,inffast(_,P),e=_.next_out,$=_.output,N=_.avail_out,I=_.next_in,D=_.input,u=_.avail_in,A=k.hold,U=k.bits,k.mode===TYPE&&(k.back=-1);break}for(k.back=0;J=k.lencode[A&(1<<k.lenbits)-1],z=J>>>24,V=J>>>16&255,X=J&65535,!(z<=U);){if(u===0)break t;u--,A+=D[I++]<<U,U+=8}if(V&&(V&240)===0){for(Y=z,et=V,ft=X;J=k.lencode[ft+((A&(1<<Y+et)-1)>>Y)],z=J>>>24,V=J>>>16&255,X=J&65535,!(Y+z<=U);){if(u===0)break t;u--,A+=D[I++]<<U,U+=8}A>>>=Y,U-=Y,k.back+=Y}if(A>>>=z,U-=z,k.back+=z,k.length=X,V===0){k.mode=LIT;break}if(V&32){k.back=-1,k.mode=TYPE;break}if(V&64){_.msg="invalid literal/length code",k.mode=BAD;break}k.extra=V&15,k.mode=LENEXT;case LENEXT:if(k.extra){for(ot=k.extra;U<ot;){if(u===0)break t;u--,A+=D[I++]<<U,U+=8}k.length+=A&(1<<k.extra)-1,A>>>=k.extra,U-=k.extra,k.back+=k.extra}k.was=k.length,k.mode=DIST;case DIST:for(;J=k.distcode[A&(1<<k.distbits)-1],z=J>>>24,V=J>>>16&255,X=J&65535,!(z<=U);){if(u===0)break t;u--,A+=D[I++]<<U,U+=8}if((V&240)===0){for(Y=z,et=V,ft=X;J=k.distcode[ft+((A&(1<<Y+et)-1)>>Y)],z=J>>>24,V=J>>>16&255,X=J&65535,!(Y+z<=U);){if(u===0)break t;u--,A+=D[I++]<<U,U+=8}A>>>=Y,U-=Y,k.back+=Y}if(A>>>=z,U-=z,k.back+=z,V&64){_.msg="invalid distance code",k.mode=BAD;break}k.offset=X,k.extra=V&15,k.mode=DISTEXT;case DISTEXT:if(k.extra){for(ot=k.extra;U<ot;){if(u===0)break t;u--,A+=D[I++]<<U,U+=8}k.offset+=A&(1<<k.extra)-1,A>>>=k.extra,U-=k.extra,k.back+=k.extra}if(k.offset>k.dmax){_.msg="invalid distance too far back",k.mode=BAD;break}k.mode=MATCH;case MATCH:if(N===0)break t;if(Z=P-N,k.offset>Z){if(Z=k.offset-Z,Z>k.whave&&k.sane){_.msg="invalid distance too far back",k.mode=BAD;break}Z>k.wnext?(Z-=k.wnext,F=k.wsize-Z):F=k.wnext-Z,Z>k.length&&(Z=k.length),W=k.window}else W=$,F=e-k.offset,Z=k.length;Z>N&&(Z=N),N-=Z,k.length-=Z;do $[e++]=W[F++];while(--Z);k.length===0&&(k.mode=LEN);break;case LIT:if(N===0)break t;$[e++]=k.length,N--,k.mode=LEN;break;case CHECK:if(k.wrap){for(;U<32;){if(u===0)break t;u--,A|=D[I++]<<U,U+=8}if(P-=N,_.total_out+=P,k.total+=P,k.wrap&4&&P&&(_.adler=k.check=k.flags?crc32_1(k.check,$,P,e-P):adler32_1(k.check,$,P,e-P)),P=N,k.wrap&4&&(k.flags?A:zswap32(A))!==k.check){_.msg="incorrect data check",k.mode=BAD;break}A=0,U=0}k.mode=LENGTH;case LENGTH:if(k.wrap&&k.flags){for(;U<32;){if(u===0)break t;u--,A+=D[I++]<<U,U+=8}if(k.wrap&4&&A!==(k.total&4294967295)){_.msg="incorrect length check",k.mode=BAD;break}A=0,U=0}k.mode=DONE;case DONE:st=Z_STREAM_END$1;break t;case BAD:st=Z_DATA_ERROR$1;break t;case MEM:return Z_MEM_ERROR$1;case SYNC:default:return Z_STREAM_ERROR$1}return _.next_out=e,_.avail_out=N,_.next_in=I,_.avail_in=u,k.hold=A,k.bits=U,(k.wsize||P!==_.avail_out&&k.mode<BAD&&(k.mode<CHECK||q!==Z_FINISH$1))&&updatewindow(_,_.output,_.next_out,P-_.avail_out),L-=_.avail_in,P-=_.avail_out,_.total_in+=L,_.total_out+=P,k.total+=P,k.wrap&4&&P&&(_.adler=k.check=k.flags?crc32_1(k.check,$,P,_.next_out-P):adler32_1(k.check,$,P,_.next_out-P)),_.data_type=k.bits+(k.last?64:0)+(k.mode===TYPE?128:0)+(k.mode===LEN_||k.mode===COPY_?256:0),(L===0&&P===0||q===Z_FINISH$1)&&st===Z_OK$1&&(st=Z_BUF_ERROR),st},inflateEnd=_=>{if(inflateStateCheck(_))return Z_STREAM_ERROR$1;let q=_.state;return q.window&&(q.window=null),_.state=null,Z_OK$1},inflateGetHeader=(_,q)=>{if(inflateStateCheck(_))return Z_STREAM_ERROR$1;const k=_.state;return(k.wrap&2)===0?Z_STREAM_ERROR$1:(k.head=q,q.done=!1,Z_OK$1)},inflateSetDictionary=(_,q)=>{const k=q.length;let D,$,I;return inflateStateCheck(_)||(D=_.state,D.wrap!==0&&D.mode!==DICT)?Z_STREAM_ERROR$1:D.mode===DICT&&($=1,$=adler32_1($,q,k,0),$!==D.check)?Z_DATA_ERROR$1:(I=updatewindow(_,q,k,k),I?(D.mode=MEM,Z_MEM_ERROR$1):(D.havedict=1,Z_OK$1))};var inflateReset_1=inflateReset,inflateReset2_1=inflateReset2,inflateResetKeep_1=inflateResetKeep,inflateInit_1=inflateInit,inflateInit2_1=inflateInit2,inflate_2$1=inflate$2,inflateEnd_1=inflateEnd,inflateGetHeader_1=inflateGetHeader,inflateSetDictionary_1=inflateSetDictionary,inflateInfo="pako inflate (from Nodeca project)",inflate_1$2={inflateReset:inflateReset_1,inflateReset2:inflateReset2_1,inflateResetKeep:inflateResetKeep_1,inflateInit:inflateInit_1,inflateInit2:inflateInit2_1,inflate:inflate_2$1,inflateEnd:inflateEnd_1,inflateGetHeader:inflateGetHeader_1,inflateSetDictionary:inflateSetDictionary_1,inflateInfo};function GZheader(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var gzheader=GZheader;const toString=Object.prototype.toString,{Z_NO_FLUSH,Z_FINISH,Z_OK,Z_STREAM_END,Z_NEED_DICT,Z_STREAM_ERROR,Z_DATA_ERROR,Z_MEM_ERROR}=constants$2;function Inflate$1(_){this.options=common.assign({chunkSize:1024*64,windowBits:15,to:""},_||{});const q=this.options;q.raw&&q.windowBits>=0&&q.windowBits<16&&(q.windowBits=-q.windowBits,q.windowBits===0&&(q.windowBits=-15)),q.windowBits>=0&&q.windowBits<16&&!(_&&_.windowBits)&&(q.windowBits+=32),q.windowBits>15&&q.windowBits<48&&(q.windowBits&15)===0&&(q.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let k=inflate_1$2.inflateInit2(this.strm,q.windowBits);if(k!==Z_OK)throw new Error(messages[k]);if(this.header=new gzheader,inflate_1$2.inflateGetHeader(this.strm,this.header),q.dictionary&&(typeof q.dictionary=="string"?q.dictionary=strings.string2buf(q.dictionary):toString.call(q.dictionary)==="[object ArrayBuffer]"&&(q.dictionary=new Uint8Array(q.dictionary)),q.raw&&(k=inflate_1$2.inflateSetDictionary(this.strm,q.dictionary),k!==Z_OK)))throw new Error(messages[k])}Inflate$1.prototype.push=function(_,q){const k=this.strm,D=this.options.chunkSize,$=this.options.dictionary;let I,e,u;if(this.ended)return!1;for(q===~~q?e=q:e=q===!0?Z_FINISH:Z_NO_FLUSH,toString.call(_)==="[object ArrayBuffer]"?k.input=new Uint8Array(_):k.input=_,k.next_in=0,k.avail_in=k.input.length;;){for(k.avail_out===0&&(k.output=new Uint8Array(D),k.next_out=0,k.avail_out=D),I=inflate_1$2.inflate(k,e),I===Z_NEED_DICT&&$&&(I=inflate_1$2.inflateSetDictionary(k,$),I===Z_OK?I=inflate_1$2.inflate(k,e):I===Z_DATA_ERROR&&(I=Z_NEED_DICT));k.avail_in>0&&I===Z_STREAM_END&&k.state.wrap>0&&_[k.next_in]!==0;)inflate_1$2.inflateReset(k),I=inflate_1$2.inflate(k,e);switch(I){case Z_STREAM_ERROR:case Z_DATA_ERROR:case Z_NEED_DICT:case Z_MEM_ERROR:return this.onEnd(I),this.ended=!0,!1}if(u=k.avail_out,k.next_out&&(k.avail_out===0||I===Z_STREAM_END))if(this.options.to==="string"){let N=strings.utf8border(k.output,k.next_out),A=k.next_out-N,U=strings.buf2string(k.output,N);k.next_out=A,k.avail_out=D-A,A&&k.output.set(k.output.subarray(N,N+A),0),this.onData(U)}else this.onData(k.output.length===k.next_out?k.output:k.output.subarray(0,k.next_out));if(!(I===Z_OK&&u===0)){if(I===Z_STREAM_END)return I=inflate_1$2.inflateEnd(this.strm),this.onEnd(I),this.ended=!0,!0;if(k.avail_in===0)break}}return!0},Inflate$1.prototype.onData=function(_){this.chunks.push(_)},Inflate$1.prototype.onEnd=function(_){_===Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=common.flattenChunks(this.chunks)),this.chunks=[],this.err=_,this.msg=this.strm.msg};function inflate$1(_,q){const k=new Inflate$1(q);if(k.push(_),k.err)throw k.msg||messages[k.err];return k.result}function inflateRaw$1(_,q){return q=q||{},q.raw=!0,inflate$1(_,q)}var Inflate_1$1=Inflate$1,inflate_2=inflate$1,inflateRaw_1$1=inflateRaw$1,ungzip$1=inflate$1,inflate_1$1={Inflate:Inflate_1$1,inflate:inflate_2,inflateRaw:inflateRaw_1$1,ungzip:ungzip$1};const{Deflate,deflate,deflateRaw,gzip}=deflate_1$1,{Inflate,inflate,inflateRaw,ungzip}=inflate_1$1;var Deflate_1=Deflate,deflate_1=deflate,deflateRaw_1=deflateRaw,gzip_1=gzip,Inflate_1=Inflate,inflate_1=inflate,inflateRaw_1=inflateRaw,ungzip_1=ungzip,constants_1=constants$2,pako={Deflate:Deflate_1,deflate:deflate_1,deflateRaw:deflateRaw_1,gzip:gzip_1,Inflate:Inflate_1,inflate:inflate_1,inflateRaw:inflateRaw_1,ungzip:ungzip_1,constants:constants_1};const noLogEvents=["heartbeat","onNetQuality","networkQualityChange"],compressArrayBuffer=_=>{const q=new Uint8Array(_),k=pako.deflate(q,{gzip:!0});return new Uint8Array(k==null?void 0:k.buffer)},decompressArrayBuffer=_=>{const q=new Uint8Array(_),k=pako.inflate(q,{gzip:!0});return new Uint8Array(k==null?void 0:k.buffer)},sendMessageFormat=_=>{const{event:q}=_;switch(_.data_original=_.data,_.time&&(_.timeStr=E(_.time,"YYYY-MM-DD hh:mm:ss",{offset:480})),q){case"login":_.data=com.quick.voice.proto.Login.encode(_.data).finish();break;case"joinRoom":case"joinRoomEx":_.data=com.quick.voice.proto.JoinReq.encode(_.data).finish();break;case"quitRoom":_.data=com.quick.voice.proto.QuitReq.encode(_.data).finish();break;case"connectCF":_.data=com.quick.voice.proto.ConnectCFReq.encode(_.data).finish(),_.data=compressArrayBuffer(_.data),_.compress=!0;break;case"publish":_.data=com.quick.voice.proto.PublishReq.encode(_.data).finish(),_.data=compressArrayBuffer(_.data),_.compress=!0;break;case"subscribe":_.data=com.quick.voice.proto.SubscribeReq.encode(_.data).finish();break;case"closeTrack":_.data=com.quick.voice.proto.CloseTrackReq.encode(_.data).finish(),_.data=compressArrayBuffer(_.data),_.compress=!0;break;case"renegotiate":_.data=com.quick.voice.proto.RenegotiateReq.encode(_.data).finish(),_.data=compressArrayBuffer(_.data),_.compress=!0;break;case"syncRoomInfo":_.data=com.quick.voice.proto.SyncRoomInfoReq.encode(_.data).finish();break;case"updateCall":_.data=com.quick.voice.proto.UpdateCall.encode(_.data).finish();break;case"networkQualityChange":_.data=com.quick.voice.proto.NetQualityChange.encode(_.data).finish();break;case"pubNotify":_.data=com.quick.voice.proto.PublishNotify.encode(_.data).finish();break;default:_.data=new Uint8Array;break}return _},onMessageFormat=_=>{const{event:q,compress:k=!1}=_;if(_.data_remote=_.data,_.time&&(_.timeStr=E(_.time,"YYYY-MM-DD hh:mm:ss",{offset:480})),k)try{_.data=decompressArrayBuffer(_.data)}catch(D){console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo:消息解压错误",D)}switch(q){case"login":_.data=com.quick.voice.proto.Login.decode(_.data);break;case"joinRoom":case"joinRoomEx":_.data=com.quick.voice.proto.JoinRsp.decode(_.data);break;case"onJoinRoom":_.data=com.quick.voice.proto.JoinNotify.decode(_.data);break;case"onQuitRoom":_.data=com.quick.voice.proto.QuitNotify.decode(_.data);break;case"connectCF":_.data=com.quick.voice.proto.ConnectCFRsp.decode(_.data);break;case"publish":_.data=com.quick.voice.proto.PublishRsp.decode(_.data);break;case"onPublish":_.data=com.quick.voice.proto.PublishNotify.decode(_.data);break;case"subscribe":_.data=com.quick.voice.proto.SubscribeRsp.decode(_.data);break;case"closeTrack":_.data=com.quick.voice.proto.CloseTrackRsp.decode(_.data);break;case"onCloseTrack":_.data=com.quick.voice.proto.CloseTrackNotify.decode(_.data);break;case"onUpdateCall":_.data=com.quick.voice.proto.UpdateCall.decode(_.data);break;case"onDestroyRoom":_.data=com.quick.voice.proto.QuitNotify.decode(_.data);break;case"onUpdatePermissions":_.data=com.quick.voice.proto.UpdatePermissions.decode(_.data);break;case"onNetQuality":_.data=com.quick.voice.proto.NetQualityNotify.decode(_.data);break;case"syncRoomInfo":_.data=com.quick.voice.proto.SyncRoomInfoRsp.decode(_.data);break;case"onCDNPlayUrlAdd":_.data=com.quick.voice.proto.CDNPlayAddressNotify.decode(_.data);break;case"debugger":_.data=JSON.parse(new TextDecoder().decode(_.data));break}return _};class CallsWebSocket{constructor(q){lt(this,at);lt(this,ct,{url:"wss://demo.putplay.cc/websocket",debug:!1,reconnectCount:10,timeout:30*1e3});lt(this,dt,"");lt(this,ht,{});lt(this,yt,{});H(this,"state","closed");H(this,"sendMessageBefore",async()=>{});H(this,"onReconnectSuccess",q=>{});H(this,"onReconnectStop",q=>{});lt(this,It,q=>{let k=!0;const{code:D=1e3,reason:$=""}=q;return D===1e3&&($==="quit success!"||$==="replace old connection!")&&(k=!1),k});lt(this,Rt,async q=>{G(this,ct).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 重连成功",q),this.state="connected",this.onReconnectSuccess(q)});lt(this,Et,async q=>{G(this,ct).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 重连停止",q),this.close(),this.state="closed",this.onReconnectStop(q)});lt(this,xt,()=>{const q={event:"heartbeat",sn:+`${O(1e5,999999)}`};return com.quick.voice.proto.CommonReq.encode(q).finish()});lt(this,$t,(q,k={})=>{try{const{time:D,event:$,data:I={},data_original:e={},data_remote:u,...N}=k,A=E(D,"YYYY-MM-DD hh:mm:ss",{offset:480});let U={};const L=(V={})=>{const X=JSON.parse(JSON.stringify(V)),Y=Object.keys(X);for(const et of Y)(et.includes("sdp")||et.includes("Sdp"))&&(X[et]="");return X};let P="res ↓";switch(q){case"res":P="res ↓",U=L(I);break;case"req":P="req ↑",U=L(e);break}let Z="#quickvo.logs";ignoreEvent.includes($)&&(Z="#quickvo.ignoreEvents");const F={"#action":P,timeStr:A,event:$,data:U,time:D,...N},W=localStorage.getItem(Z)||JSON.stringify([]),J=JSON.parse(W),z=[F,...J].slice(0,500);localStorage.setItem(Z,JSON.stringify(z))}catch(D){console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: updataLogs is error",D)}});lt(this,Nt,(q,{resolve:k,reject:D})=>{const{sn:$}=q,I=()=>{const u=G(this,ht)[$];clearTimeout(u.destructionTimer),delete G(this,ht)[$]},e=setTimeout(()=>{const u=G(this,ht)[$];console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo:event is timeout",u.message),I(),D("event is timeout")},G(this,ct).timeout);G(this,ht)[$]={message:q,resolve:k,reject:D,destruction:I,destructionTimer:e}});lt(this,At,q=>G(this,ht)[q]);lt(this,qt,async q=>{const k=new Uint8Array(q),D=com.quick.voice.proto.CommonRsp.decode(k),{sn:$,event:I}=D,e=onMessageFormat(D);if(G(this,ct).debug&&(noLogEvents.includes(I)||console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ff0097;padding:16px 0;","------->quickvo: 响应消息↓",e),ignoreEvent.includes(I)||G(this,$t).call(this,"res",e)),notifyName_keys.includes(I))return this.emitNotify(I,v$1(e,["code","data","desc"]));const N=G(this,At).call(this,$);if(N){const{resolve:A=L=>{},destruction:U=()=>{}}=N;A(v$1(e,["code","data","desc"])),U()}});H(this,"clearEvents",(q=[])=>{const k=Object.keys(G(this,ht));q.length===0&&(q=k);for(const D of k){if(!q.includes(D))continue;const $=G(this,ht)[D];clearTimeout($.destructionTimer),delete G(this,ht)[D]}});H(this,"connect",async(q="")=>new Promise(async k=>{q&&vt(this,dt,q),G(this,at)&&(await G(this,at).close(),this.state="closed");const D=`${G(this,ct).url}?s=${G(this,dt)}&t=${Date.now()}`;vt(this,at,new M({...G(this,ct),url:D,binaryType:"arraybuffer",onMessage:G(this,qt),checkReconnect:G(this,It),getHeartbeatMsg:G(this,xt),onReconnectSuccess:G(this,Rt),onReconnectStop:G(this,Et)})),this.state="connecting",await G(this,at).connect(),this.state="connected",G(this,ct).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 当前广播事件",G(this,yt)),k(G(this,at))}));H(this,"close",async()=>{var k;G(this,ct).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: cws is close.");const q=Object.keys(G(this,ht));for(const D of q){const{destructionTimer:$}=G(this,ht)[D];clearTimeout($)}vt(this,ht,{}),vt(this,yt,{}),await((k=G(this,at))==null?void 0:k.close()),vt(this,at,void 0),this.state="closed"});H(this,"sendMessage",(q,k=!0)=>new Promise(async(D,$)=>{var U;await this.sendMessageBefore();const{event:I,...e}=q,u=Date.now(),N=sendMessageFormat({event:I,sn:+`${u}${O(1e3,9999)}`,time:u,valid:G(this,ct).timeout,version:1,compress:!1,...e});G(this,ct).debug&&(noLogEvents.includes(I)||console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ff9700;padding:16px 0;","------->quickvo: 发送消息↑",N),ignoreEvent.includes(I)||G(this,$t).call(this,"req",N)),k&&G(this,Nt).call(this,N,{resolve:D,reject:$});const A=com.quick.voice.proto.CommonReq.encode(N).finish();(U=G(this,at))==null||U.sendMessage(A)}));H(this,"emitNotify",async(q,k)=>{const D=G(this,yt)[q]||[];for(const $ of D){const{callback:I=async()=>{}}=$;await I(k)}});H(this,"addNotify",(q,k=!1)=>{const{event:D,sn:$=pt(32)}=q;G(this,yt)[D]||(G(this,yt)[D]=[]);const I=G(this,yt)[D],e=I.findIndex(u=>u.sn===$);return e!==-1&&I.splice(e,1),k?I.unshift(q):I.push(q),$});H(this,"removeNotify",(q=[])=>{if(q.length===0)vt(this,yt,{});else{const k=Object.keys(G(this,yt));for(const D of k)G(this,yt)[D]=G(this,yt)[D].filter($=>!q.includes($.sn||""))}G(this,ct).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 移除广播事件",G(this,yt))});vt(this,ct,{...G(this,ct),...q})}}at=new WeakMap,ct=new WeakMap,dt=new WeakMap,ht=new WeakMap,yt=new WeakMap,It=new WeakMap,Rt=new WeakMap,Et=new WeakMap,xt=new WeakMap,$t=new WeakMap,Nt=new WeakMap,At=new WeakMap,qt=new WeakMap;var p=Object.defineProperty,x=_=>{throw TypeError(_)},g=(_,q,k)=>q in _?p(_,q,{enumerable:!0,configurable:!0,writable:!0,value:k}):_[q]=k,h=(_,q,k)=>g(_,typeof q!="symbol"?q+"":q,k),y=(_,q,k)=>q.has(_)||x("Cannot "+k),n=(_,q,k)=>(y(_,q,"read from private field"),k?k.call(_):q.get(_)),a=(_,q,k)=>q.has(_)?x("Cannot add the same private member more than once"):q instanceof WeakSet?q.add(_):q.set(_,k),b=(_,q,k,D)=>(y(_,q,"write to private field"),q.set(_,k),k),d,o,f;class K{constructor(q){a(this,d,new Map),a(this,o,[]),h(this,"index"),h(this,"setCondition",(k,D)=>{n(this,d).set(k,D),D&&n(this,f).call(this)}),h(this,"addTask",(k,D,$={})=>{const I={key:"",strict:!1,describe:"",...$};let{key:e,strict:u,describe:N}=I;e?this.clear([e]):e=`${this.index++}`;{const A={key:e,func:k,conditionKeys:D,describe:N,strict:u};n(this,o).unshift(A)}return n(this,f).call(this),e}),h(this,"clear",(k=[])=>{if(k.length===0){b(this,o,[]);return}for(const D of k){const $=n(this,o).findIndex(I=>I.key===D);$!==-1&&n(this,o).splice($,1)}}),h(this,"getConditions",()=>Object.fromEntries(n(this,d))),h(this,"getTasks",()=>{const k=[];for(const D of n(this,o)){const{key:$,describe:I,conditionKeys:e}=D;k.push({key:$,describe:I,conditionKeys:e})}return k}),h(this,"checkConditions",k=>{let D=!0;for(const $ of k)if(n(this,d).get($)===!1){D=!1;break}return D}),a(this,f,()=>{const k=n(this,o).length;for(let D=k;D>0;D--){const $=D-1,I=n(this,o)[$],{conditionKeys:e,func:u,strict:N}=I,A=this.checkConditions(e);{if(!A)return;u()}{if(N)return;n(this,o).splice($,1)}}}),this.index=0;for(const k of q)n(this,d).set(k,!1)}}d=new WeakMap,o=new WeakMap,f=new WeakMap;class RoomBase{constructor(){H(this,"options",{appid:"",sdkToken:"",roomId:"",userId:"",callType:0,debug:!1,newPublishAutoSubscribe:!0});H(this,"prohibitNotify",!1);H(this,"isEarly",!1);H(this,"taskQueue",new K(["createWs","createSession","ice","joinRoom","createTrack","subscribe","closeTrack","publish"]));H(this,"roomState","ready");H(this,"createAt",Date.now());H(this,"cwsIns",new CallsWebSocket);H(this,"peerIns",new RTCPeerConnection({bundlePolicy:"max-bundle"}));H(this,"transceiverMap",new Map);H(this,"userMap",new Map);H(this,"mediaDevicesErrInfo",{microphoneCamera_audio:"",microphoneCamera_video:"",screenSharing_video:"",screenSharing_audio:""});H(this,"initAsyncQueue",()=>{this.taskQueue.clear(),this.taskQueue.setCondition("joinRoom",!0),this.taskQueue.setCondition("createTrack",!0),this.taskQueue.setCondition("closeTrack",!0),this.taskQueue.setCondition("subscribe",!0),this.taskQueue.setCondition("publish",!0)});H(this,"getRoomInfo",()=>{const{options:q,roomState:k,createAt:D}=this;return{...q,roomState:k,createAt:D}});H(this,"setRoomState",q=>{this.roomState=q;const k=enum_roomState[q],D={state:q,stateStr:k};this.cwsIns.emitNotify("onRoomState",{code:200,data:D,desc:"room state is change."})});H(this,"setOptions",async q=>{const k={...this.options,...q};this.options=k});H(this,"initCwsCall",()=>{this.cwsIns=new CallsWebSocket({...this.options})});H(this,"getMediaDevicesErrInfo",async()=>{try{const q=await navigator.mediaDevices.enumerateDevices();q.find(D=>D.kind==="audioinput")||(this.mediaDevicesErrInfo.microphoneCamera_audio="audioinput is not available."),q.find(D=>D.kind==="videoinput")||(this.mediaDevicesErrInfo.microphoneCamera_video="videoinput is not available.")}catch(q){console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->Breathe:error",q)}return this.mediaDevicesErrInfo});H(this,"getUserMediaKey",(q,k)=>`${q}-${k}`);H(this,"getCallActionMap",(q=0)=>{const D=Number(q).toString(2).padStart(4,"0").split(""),[$,I,e,u]=D;return{microphoneCamera_audio:!!Number(u),microphoneCamera_video:!!Number(e),screenSharing_video:!!Number(I),screenSharing_audio:!!Number($)}});H(this,"getAverageVolume",(q,k)=>{q.getByteFrequencyData(k);let D=0;for(let I=0;I<k.length;I++)D+=k[I];return Math.ceil(D/k.length)});H(this,"getCallAction",async q=>{let k="";const D=I=>q.findIndex(({type:u,enabled:N=!0})=>u===I&&N)===-1?"0":"1";return k=`${D(0)}${k}`,k=`${D(1)}${k}`,k=`${D(2)}${k}`,k=`${D(3)}${k}`,parseInt(k,2)});H(this,"getTrackNamesFormTracks",(q,k=[],D="trackName")=>{const $=[];for(const I of q){const{type:e}=I;if(k.length===0||k.includes(e)){const u=I[D];u&&$.push(`${u}`)}}return $});H(this,"usersFilter",q=>mt(q,["id","isSelf","joinTime","tracks","callAction","callActionStr","callActionMap","network","updateStreams","permissions","isPublished"]).sort(($,I)=>$.id.localeCompare(I.id,"en")));this.initAsyncQueue()}}const createMutedAudioStream=()=>{const _=new AudioContext,q=_.createOscillator();q.type="sine",q.frequency.setValueAtTime(0,_.currentTime);const k=_.createGain();k.gain.value=0,q.connect(k),k.connect(_.destination),q.start();const D=_.createMediaStreamDestination();return k.disconnect(),q.connect(D),D.stream},createFakeVideoStream=(_=10,q=10,k=30)=>{const D=document.createElement("canvas"),$=D.getContext("2d");D.width=_,D.height=q;let I=0;return setInterval(()=>{$.clearRect(0,0,D.width,D.height);const N=$.createLinearGradient(0,0,D.width,D.height);N.addColorStop(0,`hsla(${I}, 100%, 50%, 0)`),N.addColorStop(1,`hsla(${I+120}, 100%, 50%, 0)`),$.fillStyle=N,$.fillRect(0,0,D.width,D.height),I=(I+1)%360},100),D.captureStream(k)},phoneyStreams={microphoneCamera_audio:createMutedAudioStream(),microphoneCamera_video:createFakeVideoStream(),screenSharing_video:createFakeVideoStream(),screenSharing_audio:createMutedAudioStream()};class RoomMedias extends RoomBase{constructor(){super();H(this,"mediaDevices",[]);lt(this,kt,new Map);lt(this,bt,new Map);lt(this,_t,new Map);lt(this,Tt,new Map);lt(this,Dt,()=>{for(const k of mediaType_keys)G(this,Tt).set(k,phoneyStreams[k])});H(this,"getPhoneyStreams",k=>G(this,Tt).get(k));lt(this,Ct,()=>{G(this,bt).set("microphoneCamera_audio",{}),G(this,bt).set("microphoneCamera_video",{width:{ideal:1920},height:{ideal:1080},frameRate:{min:10,ideal:30}}),G(this,bt).set("screenSharing_video",{width:{ideal:1920},height:{ideal:1080},frameRate:{min:10,ideal:30}}),G(this,bt).set("screenSharing_audio",{})});lt(this,Ut,()=>{G(this,kt).set("audioinput","default"),G(this,kt).set("videoinput","default"),G(this,kt).set("audiooutput","default")});H(this,"emitNotifyUpdateUsersStreams",async k=>{this.cwsIns.emitNotify("onRoomUsersStreams",{code:200,data:k,desc:"users streams is change."})});H(this,"initUserMediaStreamContext",async(k,D,$)=>{var N;const[I]=$.getTracks();if(!I){console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: tracks.length is 0.",{userId:k,mediaType:D,stream:$});return}this.removeUserMediaStreamContext(k,D);const e=this.getUserMediaKey(k,D),{kind:u}=I;switch(u){case"audio":{const A=new AudioMediaContext(I);G(this,_t).set(e,A)}break;case"video":{const A=new VideoMediaContext(I);G(this,_t).set(e,A)}break}{const A=this.getUserMediaStreamContext(k,D);if(A&&A.kind==="audio")try{const U=G(this,kt).get("audiooutput");(N=A.audioContext)==null||N.setSinkId(U)}catch(U){console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: setSinkId is error",U)}}});H(this,"getUserMediaStreamContext",(k,D)=>{const $=this.getUserMediaKey(k,D);return G(this,_t).get($)});H(this,"getUserAudioMediaStreamContext",(k,D)=>{const $=this.getUserMediaKey(k,D);return G(this,_t).get($)});H(this,"removeUserMediaStreamContext",(k,D)=>{const $=this.getUserMediaKey(k,D),I=G(this,_t).get($);I==null||I.stop(),G(this,_t).delete($)});H(this,"getUserStream",(k,D)=>{const $=this.getUserMediaStreamContext(k,D);return($==null?void 0:$.getStream())||new MediaStream});H(this,"getUserStreams",(k,D=[])=>{D.length===0&&(D=mediaType_keys);const $={};for(const I of D){const e=this.getUserStream(k,I);$[I]=e}return $});H(this,"removeUserStreams",async(k,D=[])=>{D.length===0&&(D=mediaType_keys);for(const $ of D)this.removeUserMediaStreamContext(k,$)});H(this,"clearUserStreams",()=>{const k=G(this,_t).values();for(const D of k)D.stop();vt(this,_t,new Map)});H(this,"setMediaTrackConstraints",async(k,D)=>{G(this,bt).set(k,D);const I=this.getUserStream(this.options.userId,k).getTracks();if(I.length!==0)for(const e of I){const N={...e.getConstraints(),...D};await e.applyConstraints(N)}});H(this,"initLocalStream",async k=>{const{userId:D}=this.options,$=G(this,bt).get(k);switch(k){case"microphoneCamera_audio":{const I=G(this,kt).get("audioinput"),e=await navigator.mediaDevices.getUserMedia({audio:{deviceId:I,...$},video:!1});await this.initUserMediaStreamContext(D,"microphoneCamera_audio",e)}break;case"microphoneCamera_video":{const I=G(this,kt).get("videoinput"),e=await navigator.mediaDevices.getUserMedia({audio:!1,video:{deviceId:I,...$}});await this.initUserMediaStreamContext(D,"microphoneCamera_video",e)}break;case"screenSharing_audio":{const I=await navigator.mediaDevices.getDisplayMedia({audio:!0,video:!0,...$}),e=I.getTracks();for(const u of e){const{kind:N}=u,A=new MediaStream;A.addTrack(u),I.removeTrack(u),N==="audio"&&await this.initUserMediaStreamContext(D,"screenSharing_audio",A),N==="video"&&await this.initUserMediaStreamContext(D,"screenSharing_video",A)}}break;case"screenSharing_video":{const I=await navigator.mediaDevices.getDisplayMedia({audio:!1,video:!0,...$});await this.initUserMediaStreamContext(D,"screenSharing_video",I)}break}this.emitNotifyUpdateUsersStreams([{userId:D,updateStreams:{[k]:!0}}])});lt(this,Ot,async()=>!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices?(console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 不支持 enumerateDevices"),[]):(await navigator.mediaDevices.enumerateDevices().then(k=>{this.mediaDevices=k}).catch(function(k){console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: getEnumerateDevices is err",k)}),this.mediaDevices));lt(this,Mt,()=>{navigator.mediaDevices&&(navigator.mediaDevices.ondevicechange=async()=>{await G(this,Ot).call(this),this.cwsIns.emitNotify("onDevicechange",{code:200,data:{},desc:"device is change."})}),G(this,Ot).call(this)});H(this,"getMediaDeviceKind",k=>G(this,kt).get(k));H(this,"replaceSenderStream",async(k=[],D)=>{const{userId:$}=this.options;k.length===0&&(k=mediaType_keys);for(const I of k){const e=this.transceiverMap.get(I);let u;if(e){const{sender:N}=e;D?u=this.getUserStream($,I):u=this.getPhoneyStreams(I);const[A]=u.getTracks();N.replaceTrack(A)}}});H(this,"setMediaDeviceKind",async(k,D)=>{G(this,kt).set(k,D);const{userId:$}=this.options;if(k==="audioinput"&&this.getUserMediaStreamContext($,"microphoneCamera_audio")&&(await this.initLocalStream("microphoneCamera_audio"),await this.replaceSenderStream(["microphoneCamera_audio"],!0)),k==="videoinput"&&this.getUserMediaStreamContext($,"microphoneCamera_video")&&(await this.initLocalStream("microphoneCamera_video"),await this.replaceSenderStream(["microphoneCamera_video"],!0)),k==="audiooutput"){const I=G(this,_t).values();for(const e of I)e.kind==="audio"&&"setSinkId"in HTMLMediaElement.prototype&&e.audioContext.setSinkId(D)}});H(this,"setAudioOutputDevice",k=>this.setMediaDeviceKind("audiooutput",k));H(this,"getEnumerateDevices",async k=>(await G(this,Ot).call(this),this.mediaDevices.filter($=>$.kind===k)));H(this,"getEnumerateAudioinputDevices",()=>this.getEnumerateDevices("audioinput"));H(this,"getEnumerateAudioOutputDevices",()=>this.getEnumerateDevices("audiooutput"));H(this,"getEnumerateVideoinputDevices",()=>this.getEnumerateDevices("videoinput"));G(this,Mt).call(this),G(this,Ut).call(this),G(this,Ct).call(this),G(this,Dt).call(this)}}kt=new WeakMap,bt=new WeakMap,_t=new WeakMap,Tt=new WeakMap,Dt=new WeakMap,Ct=new WeakMap,Ut=new WeakMap,Ot=new WeakMap,Mt=new WeakMap;class RoomUsers extends RoomMedias{constructor(){super();H(this,"getMaxVolumeUser",()=>{const k=Array.from(this.userMap.values(),({id:$})=>$);if(k.length===0)return;let D=[];for(const $ of k){const I=this.getUserMediaStreamContext($,"microphoneCamera_audio");if(!I||I.kind!=="audio")continue;const e=I.getVolume();D.push({id:$,volume:e})}return D=D.sort(($,I)=>$.volume-I.volume>0?-1:1),D[0]});H(this,"setAudioFilter",async(k={})=>{const D=await this.getUsersId();for(const $ of D){{const I=this.getUserMediaStreamContext($,"microphoneCamera_audio");(I==null?void 0:I.kind)==="audio"&&(I==null||I.setFilter(k))}{const I=this.getUserMediaStreamContext($,"screenSharing_audio");(I==null?void 0:I.kind)==="audio"&&(I==null||I.setFilter(k))}}});H(this,"setVolume",(k,D,$)=>{const I=this.getUserMediaStreamContext(k,D);(I==null?void 0:I.kind)==="audio"&&(I==null||I.setVolumeGain($))});H(this,"getVolume",(k,D)=>{const $=this.getUserMediaStreamContext(k,D);let I=0;return($==null?void 0:$.kind)==="audio"&&(I=$==null?void 0:$.getVolume()),I});H(this,"clearUsers",()=>{this.userMap=new Map});H(this,"removeUsers",async k=>{for(const D of k)this.userMap.delete(D),await this.removeUserStreams(D)});H(this,"createUser",async k=>{const D=Date.now(),$={id:k,permissions:0,callAction:0,callActionStr:"",callActionMap:{microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1},callState:0,isSelf:k===this.options.userId,isPublished:!1,joinTime:D,updateAt:D,network:{egress:0,ingress:0},tracks:[],updateStreams:{microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1}};this.userMap.set(k,$)});H(this,"getUser",async k=>(this.userMap.has(k)||await this.createUser(k),this.userMap.get(k)));H(this,"getUsers",async(k=[])=>{k.length===0&&(k=[...this.userMap.keys()]);const D=[];for(const $ of k){const I=await this.getUser($);D.push(I)}return D});H(this,"getAllUserTrackMids",async()=>{const k=await this.getUsers(),D=[];for(const $ of k){const{tracks:I=[]}=$;for(const e of I)D.push(e.mid)}return D});H(this,"getUserTrackByTrackName",async k=>{const D=await this.getUsers(),$=[];for(const I of D){const{tracks:e=[]}=I;for(const u of e){const{trackName:N}=u;k.includes(N)&&$.push(u)}}return $});H(this,"getUserTrackFromMid",async k=>{const D=await this.getUsers();let $;for(const I of D){const{tracks:e=[]}=I;for(const u of e)if(u.mid===k){$=u;break}}return $});H(this,"checkUserInRoom",k=>this.userMap.has(k));H(this,"getUsersId",async()=>[...this.userMap.keys()]);H(this,"getCaller",async()=>await this.getUser(this.options.userId));H(this,"updateIsPublished",async(k,D=!1)=>{const $=await this.getUser(k);$.isPublished=D});H(this,"setUserUpdateStreams",async(k,D,$=!0)=>{const I=await this.getUser(k),e={microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1};e[D]=$,I.updateStreams=e});H(this,"updateUsertracks",async(k,D=[],$)=>{const I=await this.getUser(k);$&&(D=[...I.tracks,...D]),D=D.filter(({mid:N=""})=>N!==""),D=it(D,["type"]),D=D.sort((N,A)=>N.type-A.type<0?-1:1);for(const N of D)N.userId=k,N.mediaType=mediaType_keys[N.type],N.enabled===void 0&&(N.enabled=!0);I.updateStreams={microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1};const e=mt(I.tracks,["mediaType","enabled","mid","msid","trackName"]),u=mt(D,["mediaType","enabled","mid","msid","trackName"]);{const N="microphoneCamera_audio",A=u.find(P=>P.mediaType===N),U=e.find(P=>P.mediaType===N),L=JSON.stringify(A)!==JSON.stringify(U);I.updateStreams[N]=L}{const N="microphoneCamera_video",A=u.find(P=>P.mediaType===N),U=e.find(P=>P.mediaType===N),L=JSON.stringify(A)!==JSON.stringify(U);I.updateStreams[N]=L}{const N="screenSharing_audio",A=u.find(P=>P.mediaType===N),U=e.find(P=>P.mediaType===N),L=JSON.stringify(A)!==JSON.stringify(U);I.updateStreams[N]=L}{const N="screenSharing_video",A=u.find(P=>P.mediaType===N),U=e.find(P=>P.mediaType===N),L=JSON.stringify(A)!==JSON.stringify(U);I.updateStreams[N]=L}I.tracks=D});H(this,"updateUserCallAction",async(k,D=0)=>{const $=await this.getUser(k);$.callAction=D,$.callActionStr=D.toString(2).padStart(4,"0"),$.callActionMap=this.getCallActionMap(D)});H(this,"updateUserNetwork",async(k,D={egress:5,ingress:5})=>{const $=await this.getUser(k);$.network=D});H(this,"updateUserPermissions",async(k,D)=>{if(D){const $=await this.getUser(k);$.permissions=D}});H(this,"updateUserBase",async k=>{const D=await this.getUser(k);D.isSelf=k===this.options.userId,D.updateAt=Date.now()});H(this,"updateUsers",async k=>{for(const D of k){const{id:$,tracks:I,callAction:e,permissions:u,isPublished:N}=D;await this.updateUserBase($),await this.updateIsPublished($,N),await this.updateUserPermissions($,u),await this.updateUsertracks($,I,!0),await this.updateUserCallAction($,e),await this.updateUserNetwork($)}});H(this,"emitNotifyUpdateUser",async k=>{const D=await this.getUsers([k]),[$]=this.usersFilter(D);this.cwsIns.emitNotify("onRoomUser",{code:200,data:$,desc:"user info is change."})});H(this,"emitNotifyUpdateUsers",async()=>{const k=await this.getUsers(),D=this.usersFilter(k);this.cwsIns.emitNotify("onRoomUsers",{code:200,data:D,desc:"all users info is change."})})}}class RoomPeer extends RoomUsers{constructor(){super();H(this,"getPeerStatsTimer",0);H(this,"reports",[]);H(this,"peerNetwork",{inboundBytes:0,outboundBytes:0,lostRate:"0.00",roundTripTime:"0",jitter:"0"});H(this,"connectedResolveMap",new Map);H(this,"initPeer",()=>{this.peerIns=new RTCPeerConnection({bundlePolicy:"max-bundle"}),this.transceiverMap=new Map,G(this,Pt).call(this),G(this,Lt).call(this)});H(this,"getSenderTracks",(k=[])=>{const D=[];for(const $ of k){const I=this.transceiverMap.get($);if(!I)continue;const{mid:e,sender:u}=I,{track:N}=u;if(!N)continue;const{id:A,enabled:U}=N,P={type:mediaType_keys.findIndex(Z=>Z===$),enabled:U,trackName:A,location:"local",mid:e};D.push(P)}return D});H(this,"addSenders",async(k=[])=>{k.length===0&&this.peerIns.addTransceiver("audio",{direction:"sendonly"});const D=[];for(const $ of k){if(this.transceiverMap.has($))continue;const I=this.getPhoneyStreams($),[e]=I.getTracks(),u=this.peerIns.addTransceiver(e,{direction:"sendonly"});this.transceiverMap.set($,u),D.push($)}if(k.length===0||D.length){const $=await this.peerIns.createOffer();if(this.options.debug){const I=libExports.parse($.sdp),e=mt(I.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->Breathe: setLocalDescription",{msidArr:e,sdpJson:I,description:$})}await this.peerIns.setLocalDescription($)}return D});H(this,"removeSenders",async(k=[])=>{for(const D of k)this.transceiverMap.has(D)&&this.transceiverMap.delete(D)});H(this,"clearTransceivers",async()=>{const k=await this.getAllUserTrackMids(),D=this.peerIns.getTransceivers();for(const $ of D){const{mid:I}=$;Number(I)===0||k.includes(I)||($.stop(),console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;",`------->Breathe: clearTransceivers: ${I} is stop.`,$))}});H(this,"onSubscribeUserTracks",k=>{let D=0;return new Promise(async $=>{const I=[];for(const e of k){const{tracks:u=[]}=e;for(const N of u){const{trackName:A,mid:U}=N,[L]=await this.getUserTrackByTrackName([A]);I.push({...L,mid:U})}}{let e=[];const u=async()=>{clearTimeout(D);const A=new Map;for(const L of e){const{userId:P,mediaType:Z}=L;if(!P||!Z)continue;A.has(P)||A.set(P,{userId:P,tracks:[],updateStreams:{}});const W=A.get(P);W.tracks.push(L),W.updateStreams[Z]=!0}const U=[...A.values()];for(const L of U){const{userId:P,tracks:Z}=L;await this.updateUsertracks(P,Z,!0)}await this.emitNotifyUpdateUsersStreams(U),this.peerIns.removeEventListener("track",N),$(!0)},N=async A=>{const{streams:U,transceiver:L}=A,[P]=U,{mid:Z,receiver:F}=L,{track:W}=F,{id:J,kind:z}=W,V=I.find(et=>et.mid===`${Z}`);if(!V)return;const{userId:X,mediaType:Y}=V;if(!(!X||!Y)){if(await this.initUserMediaStreamContext(X,Y,P),z==="audio"){const et=this.getUserMediaStreamContext(X,Y);(et==null?void 0:et.kind)==="audio"&&et.setMute(!1)}{const et={...V,mid:Z,msid:J};e.push(et)}this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#00b60f;",`------->Breathe: await subscribe ${e.length}/${I.length}`,{mediaType:Y,mid:Z,userTrack:V,e:A}),I.length===e.length&&u()}};this.peerIns.addEventListener("track",N),D=setTimeout(()=>u(),5*1e3)}})});lt(this,Pt,()=>{let k=0;const D=()=>{this.setRoomState("closed")};this.peerIns.onconnectionstatechange=()=>{const $=this.peerIns.connectionState;switch(clearTimeout(k),this.taskQueue.setCondition("ice",!1),$){case"connected":this.taskQueue.setCondition("ice",!0),this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#00b60f;",`------->quickvo: connectionState:${$}`);break;case"disconnected":k=setTimeout(D,30*1e3),this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#b60000;",`------->quickvo: connectionState:${$}`);break;case"failed":this.peerIns.restartIce();break;case"closed":D(),this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#b60000;",`------->quickvo: connectionState:${$}`);break;default:this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#b64900;",`------->quickvo: connectionState:${$}`);break}}});H(this,"closeUserTracks",async(k,D=[],$=!1)=>{const I=[];for(const A of D){const{trackName:U,msid:L}=A;I.push(U),L&&I.push(L)}const e=A=>I.includes(A),u=await this.getUser(k);if(!u)return;for(const A of u.tracks){const{trackName:U,msid:L,userId:P,mediaType:Z}=A;!P||!Z||!e(U)||(this.removeUserMediaStreamContext(P,Z),L&&delete A.msid)}if($){const A=u.tracks.filter(({trackName:U})=>!e(U));await this.updateUsertracks(k,A,!1)}const N=this.peerIns.getTransceivers();for(const A of N){const{sender:U,receiver:L}=A;U.track&&e(U.track.id)&&(console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;",`------->Breathe: sender: ${U.track.id} is stop.`,A),U.track.enabled=!1,U.track.stop(),this.peerIns.removeTrack(U),A.stop()),L.track&&e(L.track.id)&&(console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;",`------->Breathe: receiver: ${L.track.id} is stop.`,A),L.track.enabled=!1,L.track.stop(),A.stop())}});H(this,"createOffer",async()=>{const k=await this.peerIns.createOffer();if(this.options.debug){const D=libExports.parse(k.sdp),$=mt(D.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->Breathe: createOffer",{msidArr:$,sdpJson:D,description:k})}await this.peerIns.setLocalDescription(k)});H(this,"createAnswer",async()=>{const k=await this.peerIns.createAnswer();if(this.options.debug){const D=libExports.parse(k.sdp),$=mt(D.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->Breathe: createAnswer",{msidArr:$,sdpJson:D,description:k})}await this.peerIns.setLocalDescription(k)});H(this,"getSdp",()=>{var k;return(k=this.peerIns.localDescription)==null?void 0:k.sdp});H(this,"setRemoteDescription",async k=>{if(this.options.debug){const D=libExports.parse(k.sdp),$=mt(D.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->Breathe: setRemoteDescription",{msidArr:$,sdpJson:D,description:k})}return await this.peerIns.setRemoteDescription(k),k});H(this,"getPeerNetwork",()=>this.peerNetwork);H(this,"setCallStrategy",async(k,D=[])=>{D.length===0&&(D=mediaType_keys);let $="balanced";switch(k){case"qualityPriority":$="maintain-resolution";break;case"fluencyPriority":$="maintain-framerate";break;case"balancedDowngrade":$="balanced";break}const I=await this.getCaller(),e=Array.from(I.tracks,({trackName:N})=>N),u=this.peerIns.getSenders();for(const N of u){const{track:A}=N;if(!A||!e.includes(A.id))continue;const U=N.getParameters();N.setParameters({...U,degradationPreference:$})}});H(this,"setRTCRtpSenderParameters",k=>{try{const D=this.peerIns.getSenders();for(const $ of D){const I=$.getParameters();$.setParameters({...I,...k})}}catch(D){console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: setRTCRtpSenderParameters is error.",D)}});H(this,"getReportsByMid",async(k=[])=>k.length===0?this.reports:this.reports.filter(D=>k.includes(D.mid)));H(this,"getRoomNetwork",()=>this.peerNetwork);lt(this,Bt,async()=>{try{const k=await this.peerIns.getStats(),D=["inbound-rtp","remote-inbound-rtp","outbound-rtp"],I=[...k.values()].filter(et=>D.includes(et.type));let e=0,u=0,N=0,A=0,U=0,L=0,P=[],Z=[];for(const et of this.reports){const{packetsSent:ft,packetsLost:tt}=et;ft&&(N+=ft),tt&&(A+=tt)}this.reports=I;for(const et of this.reports){const{bytesReceived:ft,bytesSent:tt,packetsSent:st,packetsLost:rt,jitter:nt,roundTripTime:ot}=et;ft&&(e=ft),tt&&(u=tt),st&&(U+=st),rt&&(L+=rt),ot&&P.push((ot*100).toFixed(2)),nt&&Z.push(nt.toFixed(2))}Z.sort().reverse(),P.sort().reverse();const F=U-N,W=L-A,J=F===0?"0.00":(W/F).toFixed(2),[z="0"]=P,[V="0"]=Z,X={inboundBytes:e,outboundBytes:u,lostRate:J,roundTripTime:z,jitter:V};this.peerNetwork=X;const Y=(et,ft,tt)=>{const st=Number(et),rt=Number(ft),nt=Number(tt);let ot="0";return st<.03&&rt<100&&nt<.05?ot="5":st<.06&&rt<160&&nt<.1?ot="4":st<.1&&rt<250&&nt<.15?ot="3":st<.15&&rt<400&&nt<.2?ot="2":ot="1",Number(ot)};{const et=Y(J,z,V),ft=await this.getCaller(),{network:tt}=ft,st={egress:et,ingress:et},rt=JSON.stringify(tt)!==JSON.stringify(st);if(await this.updateUserNetwork(this.options.userId,st),rt){this.emitNotifyUpdateUsers();const{userId:nt,roomId:ot}=this.options;this.cwsIns.sendMessage({event:"networkQualityChange",data:{...st,userId:nt,roomId:ot}},!1)}}}catch(k){console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->Breathe: setNetQuality is err.",k)}});lt(this,Lt,()=>{const k=async()=>{this.peerIns.connectionState!=="connected"||!this.options.roomId||G(this,Bt).call(this)};this.getPeerStatsTimer=setInterval(k,1*1e3)});H(this,"stopGetPeerStats",()=>clearInterval(this.getPeerStatsTimer))}}Pt=new WeakMap,Bt=new WeakMap,Lt=new WeakMap;class RoomCalls extends RoomPeer{constructor(){super();H(this,"sdk_service_version","1.0.5");H(this,"setLocalStream",(k,D)=>new Promise(async($,I)=>{try{const{userId:e}=this.options;if(D?await this.initLocalStream(k):this.removeUserMediaStreamContext(e,k),k==="screenSharing_audio"||k==="screenSharing_video"){{const A=this.getUserStream(e,"screenSharing_audio").getTracks();for(const U of A)U.onended=()=>this.stopPublish(["screenSharing_audio","screenSharing_video"])}{const A=this.getUserStream(e,"screenSharing_video").getTracks();for(const U of A)U.onended=()=>this.stopPublish(["screenSharing_audio","screenSharing_video"])}}const u=this.getUserStreams(e);this.cwsIns.emitNotify("onLocalStream",{code:200,data:u,desc:"local stream is change."}),$(u)}catch(e){I(e)}}));H(this,"addNotify",k=>this.cwsIns.addNotify(k));lt(this,jt,async k=>{const{roomId:D}=this.options;if(!D)return;const{id:$,tracks:I=[]}=await this.getCaller();if(I.length===0)return;const e=I.filter(u=>u.mediaType&&k.includes(u.mediaType));this.cwsIns.sendMessage({event:"pubNotify",data:{roomId:D,user:{id:$,tracks:e}}})});H(this,"joinRoom",async k=>(this.setOptions(k),await this.createWs(),new Promise((D,$)=>{this.clearUsers();let I="";const e=async()=>{console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->Breathe: taskKey",I),this.taskQueue.clear([I]),await this.emitNotifyUpdateUsers();const N=await this.getUsers();this.taskQueue.setCondition("joinRoom",!0),D(N)},u=async()=>{try{this.taskQueue.setCondition("joinRoom",!1);const{roomId:N,userId:A,callType:U}=this.options;this.cwsIns.sendMessage({event:this.isEarly?"joinRoomEx":"joinRoom",data:{callType:U,roomId:N,user:{id:A,tracks:[],callAction:0}}}).then(async L=>{const{code:P=0,desc:Z="服务器繁忙",data:F}=L;if(P!==200)return $(Z);const{roomId:W="",roomUsers:J=[]}=F;if(W!==N)return $("加入的房间不匹配");this.createSession(),await this.updateUsers(J),e()})}catch(N){this.taskQueue.setCondition("joinRoom",!0),$(`加入房间失败: ${N.message||N||"服务器繁忙"}`)}};I=this.taskQueue.addTask(u,["createWs","joinRoom"],{describe:"joinRoom",strict:!0})})));H(this,"quitRoom",()=>new Promise(async k=>{const{roomId:D,userId:$}=this.options,I={roomId:D,user:{id:$}};try{this.stopSubscribe(),this.stopGetPeerStats(),this.initAsyncQueue(),this.clearUsers(),this.clearUserStreams(),this.cwsIns.clearEvents(),this.setRoomState("ready")}catch{}await new Promise(e=>setTimeout(()=>e(!0),300)),this.cwsIns.sendMessage({event:"quitRoom",data:I}),k(!0)}));H(this,"quitRoomEx",()=>new Promise(async k=>{const{roomId:D,userId:$}=this.options,I={roomId:D,user:{id:$}};try{this.stopSubscribe(),this.stopGetPeerStats(),this.initAsyncQueue(),this.clearUsers(),this.clearUserStreams(),await this.replaceSenderStream([],!1)}catch{}await new Promise(e=>setTimeout(()=>e(!0),300)),this.cwsIns.sendMessage({event:"quitRoomEx",data:I}),k(!0)}));H(this,"syncRoomInfo",()=>new Promise((k,D)=>{const $=async()=>{const{userId:I}=this.options,e=await this.getUser(I),{id:u=I,callAction:N=0}=e;await this.cwsIns.sendMessage({event:"syncRoomInfo",data:{user:{id:u,callAction:N}}}).then(async A=>{if(A.code!==200)return D(A.desc);const U=A.data.users;this.clearUsers(),await this.updateUsers(U),await this.updateUsertracks(e.id,e.tracks,!1),await this.subscribe();{const L=await this.getUsers();k(L)}}).catch(A=>D(A))};this.taskQueue.addTask($,["createWs"],{describe:"syncRoomInfo"})}));H(this,"publish",k=>new Promise(async(D,$)=>{const I=async()=>{try{this.taskQueue.setCondition("publish",!1),k.includes("screenSharing_audio")&&!k.includes("screenSharing_video")&&(k=[...k,"screenSharing_video"]),await this.replaceSenderStream(k,!1);const e=await this.getCaller();for(const L of k)this.getUserStream(e.id,L).getTracks().length===0&&await this.setLocalStream(L,!0);const u=[];for(const L of k)this.getUserStream(e.id,L).getTracks().length!==0&&u.push(L);await this.createTrack(u),await this.replaceSenderStream(u,!0);const N=this.getSenderTracks(k),A=[...e.tracks,...N],U=await this.getCallAction(A);await this.updateUsertracks(e.id,A,!0),G(this,jt).call(this,k),await G(this,gt).call(this,U);{await this.emitNotifyUpdateUsers();const L=await this.getCaller();this.taskQueue.setCondition("publish",!0),D(L)}}catch(e){console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->Breathe: error",e);for(const u of k)await this.setLocalStream(u,!1);this.taskQueue.setCondition("publish",!0),$(`publish is error: ${e.message||e}`)}};this.taskQueue.addTask(I,["createWs","createSession","ice","createTrack","subscribe","publish"],{describe:"replaceSenderStream"})}));H(this,"stopPublish",(k=[])=>new Promise((D,$)=>{const I=async()=>{try{this.taskQueue.setCondition("closeTrack",!1);const e=await this.getCaller();k.length===0&&(k=mediaType_keys);const u=e.tracks.filter(({mediaType:A})=>A&&k.includes(A)),N=async()=>{this.taskQueue.setCondition("closeTrack",!0);const A=await this.getCaller();await this.emitNotifyUpdateUsers(),D(A)};if(u.length===0)return N();await this.replaceSenderStream(k,!0),await this.removeSenders(k),await this.closeUserTracks(e.id,u,!0);{const A=await this.getCallAction(e.tracks);await G(this,gt).call(this,A)}await this.createOffer(),await this.cwsIns.sendMessage({event:"closeTrack",data:{roomId:this.options.roomId,sdp:this.getSdp(),tracks:u}}).then(async A=>{const{remoteSdp:U}=A.data;await this.setRemoteDescription({type:"answer",sdp:U})}),N()}catch(e){this.taskQueue.setCondition("closeTrack",!0),$(`stop publish is error: ${e.message||e}`)}};this.taskQueue.addTask(I,["createWs","createSession","ice","createTrack","subscribe"],{describe:"stopPublish"})}));H(this,"subscribe",(k=[],D=3)=>new Promise(($,I)=>{const e=async()=>{try{this.taskQueue.setCondition("subscribe",!1);const u=await this.getUsers();let N=[];for(const P of u){const{isSelf:Z,tracks:F=[]}=P;if(!Z){const W=F.filter(({trackName:J,mid:z=""})=>z!==""&&(k.includes(J)||k.length===0));W.length!==0&&N.push({...P,tracks:W})}}const A=async()=>{const P=Array.from(N,({id:F})=>F),Z=await this.getUsers(P);await this.emitNotifyUpdateUsers(),this.taskQueue.setCondition("subscribe",!0),$(Z)};if(N.length===0)return A();const U=[];for(const P of N){const{id:Z,tracks:F}=P,W=mt(F,["type","trackName"]),J={id:Z,tracks:W};U.push(J)}const L=async()=>{this.options.debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;",`------->quickvo: surplus subscribe count is ${D}`),await this.cwsIns.sendMessage({event:"subscribe",data:{users:U}}).then(async P=>{const{code:Z=0,data:F,desc:W}=P;if(Z!==200){if(D>0)return await new Promise(V=>setTimeout(()=>V(!0),300)),D=D-1,L();throw this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: subscribe is error. count 0",{trackNames:k}),new Error(W)}const{remoteSdp:J,users:z=[]}=F;this.onSubscribeUserTracks(z).then(async()=>{await this.renegotiate(),A()}),await this.setRemoteDescription({type:"offer",sdp:J})})};await L()}catch(u){this.taskQueue.setCondition("subscribe",!0),I(`subscribe is error: ${u.message||u}`)}};this.taskQueue.addTask(e,["createWs","createSession","ice","createTrack","closeTrack"],{describe:"subscribe"})}));H(this,"stopSubscribe",(k=[])=>new Promise((D,$)=>{const I=async()=>{try{this.taskQueue.setCondition("closeTrack",!1);const e=await this.getUsers(),u=[];for(const A of e){const{tracks:U=[]}=A;for(const L of U){const{type:P,mid:Z,trackName:F,mediaType:W,msid:J}=L;if(!(!W||!J)&&(k.length===0||k.includes(F))){const z={type:P,mid:Z,trackName:J};u.push(z),await this.closeUserTracks(A.id,[L])}}}const N=async()=>{await this.emitNotifyUpdateUsers(),this.taskQueue.setCondition("closeTrack",!0),D(!0)};if(u.length===0)return N();await this.createOffer(),await this.cwsIns.sendMessage({event:"closeTrack",data:{roomId:this.options.roomId,sdp:this.getSdp(),tracks:u}}).then(async A=>{const{remoteSdp:U}=A.data;await this.setRemoteDescription({type:"answer",sdp:U})}),N()}catch(e){this.taskQueue.setCondition("closeTrack",!0),$(`stop subscribe is error: ${e.message||e}`)}};this.taskQueue.addTask(I,["createWs","createSession","ice","createTrack","subscribe"],{describe:"closeTrack"})}));H(this,"inactiveTracks",async(k,D)=>new Promise(async $=>{const I=await this.getCaller();if(!I)return;const{tracks:e=[]}=I,u=[...e];await this.replaceSenderStream(k,!0);for(let A of u){const{mediaType:U}=A;if(U&&k.includes(U)){A.enabled=D;const P=this.getUserStream(I.id,U).getTracks();for(const Z of P)Z.enabled=D}}const N=await this.getCallAction(u);await G(this,gt).call(this,N),await this.emitNotifyUpdateUsers(),$(!0)}));H(this,"debugger",()=>new Promise(async(k,D)=>{await this.cwsIns.sendMessage({event:"debugger"},!1).then(async $=>{if($.code!==200)return D($.desc);k(!0)}).catch($=>{D($)})}));lt(this,gt,async k=>new Promise(async(D,$)=>{const{roomId:I,userId:e}=this.options,u={roomId:I,user:{id:e,callAction:k}};await this.cwsIns.sendMessage({event:"updateCall",data:u}).then(async N=>{const{code:A=0}=N;if(A!==200)return $(N);await this.updateUserCallAction(e,k),D(k)}).catch(N=>$(N))}));H(this,"renegotiate",()=>new Promise(async(k,D)=>{await this.createAnswer(),await this.cwsIns.sendMessage({event:"renegotiate",data:{sdp:this.getSdp()}}).then($=>{if($.code!==200)return D("协商流错误");k(!0)}).catch($=>{console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->Breathe:error",$),D(`协商流错误: ${$.message||$}`)})}));H(this,"createWs",()=>new Promise(async(k,D)=>{try{if(["connecting","connected"].includes(this.cwsIns.state))return k(!0);this.taskQueue.setCondition("createWs",!1),this.cwsIns.clearEvents(),this.initPeer();const{appid:$}=this.options,{userId:I,sdkToken:e,roomId:u}=this.options;if(!I)return D("You must first use QuickVO.setOptions to set the userId.");const N={a:e,b:I,c:$,r:u,v:this.sdk_service_version};this.isEarly&&(N.i=pt()),this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->Breathe: createWs",N);const A=btoa(encodeURI(JSON.stringify(N)));await this.cwsIns.connect(A),this.taskQueue.setCondition("createWs",!0),k(!0)}catch($){console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->Breathe:error",$),D($)}}));H(this,"createSession",()=>new Promise(k=>{if(["connecting","connected"].includes(this.roomState))return k(!0);const D=async()=>(this.taskQueue.setCondition("ice",!1),this.taskQueue.setCondition("createSession",!1),this.setRoomState("connecting"),await this.addSenders(),this.cwsIns.sendMessage({event:"connectCF",data:{sdp:this.getSdp()}}).then(async $=>{const{code:I=0,desc:e,data:u}=$;if(I!==200)throw new Error(e);const{remoteSdp:N}=u;await this.setRemoteDescription({type:"answer",sdp:N}),this.taskQueue.setCondition("createSession",!0),k(!0)}));this.taskQueue.addTask(D,["createWs"],{describe:"createSession"})}));H(this,"createTrack",async k=>new Promise(D=>{const $=async()=>{try{this.taskQueue.setCondition("createTrack",!1);const I=await this.addSenders(k),e=this.getSenderTracks(I);if(e.length===0)return this.taskQueue.setCondition("createTrack",!0),D(!0);await this.cwsIns.sendMessage({event:"publish",data:{sdp:this.getSdp(),tracks:e,callAction:0}}).then(async u=>{const{code:N=0,desc:A,data:U}=u;if(N!==200)throw this.options.debug&&console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: createTrack is error.",{mediaTypes:k}),new Error(A);const{remoteSdp:L}=U;await this.setRemoteDescription({type:"answer",sdp:L}),this.taskQueue.setCondition("createTrack",!0),D(!0)})}catch{await this.removeSenders(k),this.taskQueue.setCondition("createTrack",!0),D(!0)}};this.taskQueue.addTask($,["createWs","createSession","ice","subscribe","closeTrack"],{describe:"createTrack"})}));H(this,"earlyConnect",()=>{this.isEarly=!0,this.createWs(),this.createSession(),this.createTrack(["microphoneCamera_audio","microphoneCamera_video"])});this.setRoomState("ready")}}jt=new WeakMap,gt=new WeakMap;class Room extends RoomCalls{constructor(){super()}}class QuickVO extends Room{constructor(k){super();lt(this,wt,new Map);lt(this,Zt,()=>{{const k=async D=>{const{qualities:$=[]}=D.data,[I]=$;if(!(I&&I.userId===this.options.userId&&$.length===1)){for(const e of $){const{userId:u,egress:N,ingress:A}=e;this.checkUserInRoom(u)&&await this.updateUserNetwork(u,{egress:N,ingress:A})}await this.emitNotifyUpdateUsers()}};this.cwsIns.addNotify({event:"onNetQuality",callback:k},!0)}{const k=async D=>{const $=D.data.user;await this.updateUsers([$]),await this.updateUsertracks($.id,$.track,!1),await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onJoinRoom",callback:k},!0)}{const k=async D=>{await this.removeUsers([D.data.user.id]),await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onQuitRoom",callback:k},!0)}{const k=async D=>{const{user:$}=D.data,{id:I,tracks:e=[]}=$;await this.updateUserPermissions(I,3);const u=[];{const{tracks:N}=await this.getUser(I);for(const A of e){const{mid:U,trackName:L}=A;if(N.find(Z=>Z.mid===U&&Z.trackName===L))continue;u.push(A)}}if(u.length!==0)if(await this.updateUsertracks(I,u,!0),this.options.newPublishAutoSubscribe){const N=this.getTrackNamesFormTracks(u);await this.subscribe(N)}else await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onPublish",callback:k},!0)}{const k=async D=>{const{id:$,tracks:I}=D.data.user;$!==this.options.userId&&(await this.closeUserTracks($,I,!0),await this.emitNotifyUpdateUsers())};this.cwsIns.addNotify({event:"onCloseTrack",callback:k},!0)}{const k=async D=>{const{id:$,callAction:I}=D.data.user;this.checkUserInRoom($)&&(await this.updateUserCallAction($,I),this.emitNotifyUpdateUsers())};this.cwsIns.addNotify({event:"onUpdateCall",callback:k},!0)}{const k=async D=>{const{user:$}=D.data,{id:I,permissions:e=1}=$;e===1?await this.removeUsers([I]):e===3&&await this.updateUsers([$]),await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onUpdatePermissions",callback:k},!0)}this.cwsIns.addNotify({event:"onTokenExpired",callback:async k=>this.destroy()},!0),this.cwsIns.addNotify({event:"destroyRoom",callback:this.destroy},!0)});lt(this,Ft,()=>{this.cwsIns.sendMessageBefore=async()=>{}});lt(this,Ht,()=>{this.cwsIns.onReconnectSuccess=async()=>{this.syncRoomInfo()}});lt(this,zt,async()=>{});H(this,"addRequestAnimationFrame",async(k,D)=>{{const I=G(this,wt).get(k);I&&cancelAnimationFrame(I)}const $=(I=Date.now())=>{D(I);const e=requestAnimationFrame($);G(this,wt).set(k,e)};$()});H(this,"clearRequestAnimationFrame",async(k=[])=>{k.length===0&&(k=[...G(this,wt).keys()]);const D=[];for(const $ of k){const I=G(this,wt).get($);I&&(cancelAnimationFrame(I),D.push(I))}return D});H(this,"destroy",async()=>{this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 销毁SDK"),this.stopGetPeerStats(),this.initAsyncQueue(),this.clearUsers(),this.clearUserStreams(),this.cwsIns.clearEvents(),this.cwsIns.emitNotify("onDestroy",{code:200,data:{},desc:"sdk is destroy."}),await this.cwsIns.close()});this.setOptions(k),this.initCwsCall(),G(this,Ft).call(this),G(this,Ht).call(this),G(this,zt).call(this),G(this,Zt).call(this)}}wt=new WeakMap,Zt=new WeakMap,Ft=new WeakMap,Ht=new WeakMap,zt=new WeakMap,exports.QuickVO=QuickVO,exports.ignoreEvent=ignoreEvent,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})});
|