quickvo-sdk-js 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,18 @@
1
- (function(mt,ct){typeof exports=="object"&&typeof module<"u"?ct(exports):typeof define=="function"&&define.amd?define(["exports"],ct):(mt=typeof globalThis<"u"?globalThis:mt||self,ct(mt["snqu-calls-sdk-js"]={}))})(this,function(exports){"use strict";var nr=Object.defineProperty;var er=mt=>{throw TypeError(mt)};var rr=(mt,ct,Bt)=>ct in mt?nr(mt,ct,{enumerable:!0,configurable:!0,writable:!0,value:Bt}):mt[ct]=Bt;var Se=(mt,ct,Bt)=>rr(mt,typeof ct!="symbol"?ct+"":ct,Bt),tr=(mt,ct,Bt)=>ct.has(mt)||er("Cannot "+Bt);var Re=(mt,ct,Bt)=>(tr(mt,ct,"read from private field"),Bt?Bt.call(mt):ct.get(mt)),Xe=(mt,ct,Bt)=>ct.has(mt)?er("Cannot add the same private member more than once"):ct instanceof WeakSet?ct.add(mt):ct.set(mt,Bt),Et=(mt,ct,Bt,Ft)=>(tr(mt,ct,"write to private field"),Ft?Ft.call(mt,Bt):ct.set(mt,Bt),Bt);var mt,ct,Bt,Ft,Gt,$n,Dn,Bn,Sn,Nn,Mn,qn,Kt,dn,un,Tn,On,rn,an,hn,pn,En,bn,Qt,Ut,on,sn,fn,_n,Pn,Un,wn,Ln,In,Hn,Fn,jn,gn,xn,zn,kn,Rn,An,Jn,mn,Wn,Vn,Zn,Gn;const lt=($,z={})=>{const D={unit:"B",splitStr:" ",...z};let{unit:j,splitStr:O}=D;const I=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],o=I.findIndex(F=>F===j),k=I.slice(o+1,I.length);let N=$;for(const F of k)if(j=F,N=N/1024,N<1024)break;return`${N.toFixed(2)}${O}${j}`},P$1=($,z=[])=>{const D={...$},j=Object.keys(D);for(const O of j)z.findIndex(I=>String(I)===O)===-1&&delete D[O];return D},pt=($,z=[],D=!0)=>{const j=new Map;for(const I of $){const o=[];for(const N of z)o.push(I[N]);const k=`map-${o.join("-")}`;if(!j.has(k)){j.set(k,I);continue}D&&j.set(k,I)}const O=j.entries();return Array.from(O,([I,o])=>o)},dt=($,z=[])=>{const D=[];for(const j of $){const O=P$1(j,z);D.push(O)}return D},ht=($,z="value",D="label")=>{const j=[],O=Object.entries($);for(const[I,o]of O){const k={[D]:o,[z]:I};j.push(k)}return j},v$1=($=0,z=1)=>{const D=Math.max(0,$),j=Math.max(1,z),O=Math.random()*(j-D+1)+D;return parseInt(`${O}`,10)},xt=($=16,z=16)=>{const D="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),j=Math.min(D.length,z),O=Date.now().toString(j),I=O.split(""),o=Math.max(4,$-O.length);for(let k=0;k<o;k++){const N=v$1(0,j-1),F=D[N];I.push(F)}return I.join("").toUpperCase()},W=($,z)=>{try{let D=Number($);if(isNaN(D)){const j=new Date(`${$}`);if(`${j}`=="Invalid Date")return 0;D=j.getTime()}if(z!==void 0){const j=new Date().getTimezoneOffset();D+=(j+z)*60*1e3}return D}catch(D){return console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->timeStamp:err",{_val:$,_offset:z,error:D}),0}},H=1e3,R$1=6e4,U=36e5,A=864e5,_={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7","01":"一","02":"二","03":"三","04":"四","05":"五","06":"六","07":"日"},L=$=>W($),E=($,z="YYYY-MM-DD hh:mm:ss",D={})=>{const j={empty_str:"-",...D},{empty_str:O,offset:I}=j,o=W($,I);if(Number($)!==0&&o===0)return O;const k=new Date(o),N=`${k.getFullYear()}`,F=`${k.getMonth()+1}`,J=`${k.getDate()}`,X=`${k.getDay()===0?7:k.getDay()}`,Y=`${k.getHours()}`,Q=`${k.getMinutes()}`,te=`${k.getSeconds()}`,ie=`${Math.ceil((o-L(`${N}/01/01 00:00:00`)+1)/864e5)}`,ne=`${Math.ceil(((o-L(`${N}/01/01 00:00:00`))/864e5-Number(X))/7)+1}`,oe=[{k:"Y+",v:N},{k:"M+",v:F},{k:"D+",v:J},{k:"W+",v:X},{k:"h+",v:Y},{k:"m+",v:Q},{k:"s+",v:te},{k:"d+",v:ie},{k:"w+",v:ne}];let ce;for(let{k:we,v:se}of oe)if(ce=new RegExp(`(${we})`).exec(z),ce){const ye=ce[1];let fe=se.padStart(ye.length,"0");ye.includes("W")&&(fe=_[fe.slice(0,2)]),z=z.replace(ye,fe)}return z},V=new Map,$t=($,z,D)=>{const j=new Date().getTime(),O=V.get($)||0;j-D>O&&(z(),V.set($,j))},enum_mediaType={microphoneCamera_audio:"麦克风-默认轨道",microphoneCamera_video:"摄像头-默认轨道",screenSharing_video:"屏幕共享-视频轨道",screenSharing_audio:"屏幕共享-音频轨道"};ht(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:{};function getDefaultExportFromCjs($){return $&&$.__esModule&&Object.prototype.hasOwnProperty.call($,"default")?$.default:$}var lib$1={},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(z){return z.encoding?"rtpmap:%d %s/%s/%s":z.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(z){return z.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(z){return z.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(z){return"extmap:%d"+(z.direction?"/%s":"%v")+(z["encrypt-uri"]?" %s":"%v")+" %s"+(z.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(z){return z.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(z){var D="candidate:%s %d %s %d %s %d typ %s";return D+=z.raddr!=null?" raddr %s rport %d":"%v%v",D+=z.tcptype!=null?" tcptype %s":"%v",z.generation!=null&&(D+=" generation %d"),D+=z["network-id"]!=null?" network-id %d":"%v",D+=z["network-cost"]!=null?" network-cost %d":"%v",D}},{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(z){var D="ssrc:%d";return z.attribute!=null&&(D+=" %s",z.value!=null&&(D+=":%s")),D}},{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(z){return z.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(z){return z.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(z){return"imageattr:%s %s %s"+(z.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(z){return"simulcast:%s %s"+(z.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(z){return"ts-refclk:%s"+(z.clksrcExt!=null?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(z){var D="mediaclk:";return D+=z.id!=null?"id=%s %s":"%v%s",D+=z.mediaClockValue!=null?"=%s":"",D+=z.rateNumerator!=null?" rate=%s":"",D+=z.rateDenominator!=null?"/%s":"",D}},{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(z){var D=$[z];D.forEach(function(j){j.reg||(j.reg=/(.*)/),j.format||(j.format="%s")})}),grammar.exports}var hasRequiredParser;function requireParser(){return hasRequiredParser||(hasRequiredParser=1,function($){var z=function(k){return String(Number(k))===k?Number(k):k},D=function(k,N,F,J){if(J&&!F)N[J]=z(k[1]);else for(var X=0;X<F.length;X+=1)k[X+1]!=null&&(N[F[X]]=z(k[X+1]))},j=function(k,N,F){var J=k.name&&k.names;k.push&&!N[k.push]?N[k.push]=[]:J&&!N[k.name]&&(N[k.name]={});var X=k.push?{}:J?N[k.name]:N;D(F.match(k.reg),X,k.names,k.name),k.push&&N[k.push].push(X)},O=requireGrammar(),I=RegExp.prototype.test.bind(/^([a-z])=(.*)/);$.parse=function(k){var N={},F=[],J=N;return k.split(/(\r\n|\r|\n)/).filter(I).forEach(function(X){var Y=X[0],Q=X.slice(2);Y==="m"&&(F.push({rtp:[],fmtp:[]}),J=F[F.length-1]);for(var te=0;te<(O[Y]||[]).length;te+=1){var ie=O[Y][te];if(ie.reg.test(Q))return j(ie,J,Q)}}),N.media=F,N};var o=function(k,N){var F=N.split(/=(.+)/,2);return F.length===2?k[F[0]]=z(F[1]):F.length===1&&N.length>1&&(k[F[0]]=void 0),k};$.parseParams=function(k){return k.split(/;\s?/).reduce(o,{})},$.parseFmtpConfig=$.parseParams,$.parsePayloads=function(k){return k.toString().split(" ").map(Number)},$.parseRemoteCandidates=function(k){for(var N=[],F=k.split(" ").map(z),J=0;J<F.length;J+=3)N.push({component:F[J],ip:F[J+1],port:F[J+2]});return N},$.parseImageAttributes=function(k){return k.split(" ").map(function(N){return N.substring(1,N.length-1).split(",").reduce(o,{})})},$.parseSimulcastStreamList=function(k){return k.split(";").map(function(N){return N.split(",").map(function(F){var J,X=!1;return F[0]!=="~"?J=z(F):(J=z(F.substring(1,F.length)),X=!0),{scid:J,paused:X}})})}}(parser)),parser}var writer$1,hasRequiredWriter$1;function requireWriter$1(){if(hasRequiredWriter$1)return writer$1;hasRequiredWriter$1=1;var $=requireGrammar(),z=/%[sdv%]/g,D=function(o){var k=1,N=arguments,F=N.length;return o.replace(z,function(J){if(k>=F)return J;var X=N[k];switch(k+=1,J){case"%%":return"%";case"%s":return String(X);case"%d":return Number(X);case"%v":return""}})},j=function(o,k,N){var F=k.format instanceof Function?k.format(k.push?N:N[k.name]):k.format,J=[o+"="+F];if(k.names)for(var X=0;X<k.names.length;X+=1){var Y=k.names[X];k.name?J.push(N[k.name][Y]):J.push(N[k.names[X]])}else J.push(N[k.name]);return D.apply(null,J)},O=["v","o","s","i","u","e","p","c","b","t","r","z","a"],I=["i","c","b","a"];return writer$1=function(o,k){k=k||{},o.version==null&&(o.version=0),o.name==null&&(o.name=" "),o.media.forEach(function(X){X.payloads==null&&(X.payloads="")});var N=k.outerOrder||O,F=k.innerOrder||I,J=[];return N.forEach(function(X){$[X].forEach(function(Y){Y.name in o&&o[Y.name]!=null?J.push(j(X,Y,o)):Y.push in o&&o[Y.push]!=null&&o[Y.push].forEach(function(Q){J.push(j(X,Y,Q))})})}),o.media.forEach(function(X){J.push(j("m",$.m[0],X)),F.forEach(function(Y){$[Y].forEach(function(Q){Q.name in X&&X[Q.name]!=null?J.push(j(Y,Q,X)):Q.push in X&&X[Q.push]!=null&&X[Q.push].forEach(function(te){J.push(j(Y,Q,te))})})})}),J.join(`\r
1
+ (function(st,it){typeof exports=="object"&&typeof module<"u"?it(exports):typeof define=="function"&&define.amd?define(["exports"],it):(st=typeof globalThis<"u"?globalThis:st||self,it(st["snqu-calls-sdk-js"]={}))})(this,function(exports){"use strict";var Xn=Object.defineProperty;var Qn=st=>{throw TypeError(st)};var er=(st,it,Rt)=>it in st?Xn(st,it,{enumerable:!0,configurable:!0,writable:!0,value:Rt}):st[it]=Rt;var _e=(st,it,Rt)=>er(st,typeof it!="symbol"?it+"":it,Rt),Yn=(st,it,Rt)=>it.has(st)||Qn("Cannot "+Rt);var Oe=(st,it,Rt)=>(Yn(st,it,"read from private field"),Rt?Rt.call(st):it.get(st)),Ge=(st,it,Rt)=>it.has(st)?Qn("Cannot add the same private member more than once"):it instanceof WeakSet?it.add(st):it.set(st,Rt),kt=(st,it,Rt,Pt)=>(Yn(st,it,"write to private field"),Pt?Pt.call(st,Rt):it.set(st,Rt),Rt);var st,it,Rt,Pt,Jt,Rn,$n,An,wn,Cn,Dn,Bn,Wt,cn,an,gn,kn,Xt,tn,ln,un,Sn,pn,Vt,Nt,en,nn,sn,mn,Nn,Mn,yn,qn,Tn,vn,Pn,Un,Ln,bn,On,Hn,_n,En,In,Fn,fn,jn,zn,Jn,Wn;const lt=(O,N={})=>{const I={unit:"B",splitStr:" ",...N};let{unit:D,splitStr:f}=I;const k=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],i=k.findIndex(C=>C===D),c=k.slice(i+1,k.length);let $=O;for(const C of c)if(D=C,$=$/1024,$<1024)break;return`${$.toFixed(2)}${f}${D}`},P$1=(O,N=[])=>{const I={...O},D=Object.keys(I);for(const f of D)N.findIndex(k=>String(k)===f)===-1&&delete I[f];return I},pt=(O,N=[],I=!0)=>{const D=new Map;for(const k of O){const i=[];for(const $ of N)i.push(k[$]);const c=`map-${i.join("-")}`;if(!D.has(c)){D.set(c,k);continue}I&&D.set(c,k)}const f=D.entries();return Array.from(f,([k,i])=>i)},dt=(O,N=[])=>{const I=[];for(const D of O){const f=P$1(D,N);I.push(f)}return I},ht=(O,N="value",I="label")=>{const D=[],f=Object.entries(O);for(const[k,i]of f){const c={[I]:i,[N]:k};D.push(c)}return D},v$1=(O=0,N=1)=>{const I=Math.max(0,O),D=Math.max(1,N),f=Math.random()*(D-I+1)+I;return parseInt(`${f}`,10)},xt=(O=16,N=16)=>{const I="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),D=Math.min(I.length,N),f=Date.now().toString(D),k=f.split(""),i=Math.max(4,O-f.length);for(let c=0;c<i;c++){const $=v$1(0,D-1),C=I[$];k.push(C)}return k.join("").toUpperCase()},W=(O,N)=>{try{let I=Number(O);if(isNaN(I)){const D=new Date(`${O}`);if(`${D}`=="Invalid Date")return 0;I=D.getTime()}if(N!==void 0){const D=new Date().getTimezoneOffset();I+=(D+N)*60*1e3}return I}catch(I){return console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->timeStamp:err",{_val:O,_offset:N,error:I}),0}},H=1e3,R=6e4,U=36e5,A=864e5,_={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7","01":"一","02":"二","03":"三","04":"四","05":"五","06":"六","07":"日"},L=O=>W(O),E=(O,N="YYYY-MM-DD hh:mm:ss",I={})=>{const D={empty_str:"-",...I},{empty_str:f,offset:k}=D,i=W(O,k);if(Number(O)!==0&&i===0)return f;const c=new Date(i),$=`${c.getFullYear()}`,C=`${c.getMonth()+1}`,M=`${c.getDate()}`,Z=`${c.getDay()===0?7:c.getDay()}`,J=`${c.getHours()}`,z=`${c.getMinutes()}`,Q=`${c.getSeconds()}`,ee=`${Math.ceil((i-L(`${$}/01/01 00:00:00`)+1)/864e5)}`,Y=`${Math.ceil(((i-L(`${$}/01/01 00:00:00`))/864e5-Number(Z))/7)+1}`,te=[{k:"Y+",v:$},{k:"M+",v:C},{k:"D+",v:M},{k:"W+",v:Z},{k:"h+",v:J},{k:"m+",v:z},{k:"s+",v:Q},{k:"d+",v:ee},{k:"w+",v:Y}];let ie;for(let{k:ye,v:re}of te)if(ie=new RegExp(`(${ye})`).exec(N),ie){const de=ie[1];let se=re.padStart(de.length,"0");de.includes("W")&&(se=_[se.slice(0,2)]),N=N.replace(de,se)}return N},V=new Map,$t=(O,N,I)=>{const D=new Date().getTime(),f=V.get(O)||0;D-I>f&&(N(),V.set(O,D))},enum_mediaType={microphoneCamera_audio:"麦克风-默认轨道",microphoneCamera_video:"摄像头-默认轨道",screenSharing_video:"屏幕共享-视频轨道",screenSharing_audio:"屏幕共享-音频轨道"};ht(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:{};function getDefaultExportFromCjs(O){return O&&O.__esModule&&Object.prototype.hasOwnProperty.call(O,"default")?O.default:O}var lib$1={},parser={},grammar={exports:{}},hasRequiredGrammar;function requireGrammar(){if(hasRequiredGrammar)return grammar.exports;hasRequiredGrammar=1;var O=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(N){return N.encoding?"rtpmap:%d %s/%s/%s":N.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(N){return N.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(N){return N.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(N){return"extmap:%d"+(N.direction?"/%s":"%v")+(N["encrypt-uri"]?" %s":"%v")+" %s"+(N.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(N){return N.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(N){var I="candidate:%s %d %s %d %s %d typ %s";return I+=N.raddr!=null?" raddr %s rport %d":"%v%v",I+=N.tcptype!=null?" tcptype %s":"%v",N.generation!=null&&(I+=" generation %d"),I+=N["network-id"]!=null?" network-id %d":"%v",I+=N["network-cost"]!=null?" network-cost %d":"%v",I}},{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(N){var I="ssrc:%d";return N.attribute!=null&&(I+=" %s",N.value!=null&&(I+=":%s")),I}},{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(N){return N.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(N){return N.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(N){return"imageattr:%s %s %s"+(N.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(N){return"simulcast:%s %s"+(N.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(N){return"ts-refclk:%s"+(N.clksrcExt!=null?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(N){var I="mediaclk:";return I+=N.id!=null?"id=%s %s":"%v%s",I+=N.mediaClockValue!=null?"=%s":"",I+=N.rateNumerator!=null?" rate=%s":"",I+=N.rateDenominator!=null?"/%s":"",I}},{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(O).forEach(function(N){var I=O[N];I.forEach(function(D){D.reg||(D.reg=/(.*)/),D.format||(D.format="%s")})}),grammar.exports}var hasRequiredParser;function requireParser(){return hasRequiredParser||(hasRequiredParser=1,function(O){var N=function(c){return String(Number(c))===c?Number(c):c},I=function(c,$,C,M){if(M&&!C)$[M]=N(c[1]);else for(var Z=0;Z<C.length;Z+=1)c[Z+1]!=null&&($[C[Z]]=N(c[Z+1]))},D=function(c,$,C){var M=c.name&&c.names;c.push&&!$[c.push]?$[c.push]=[]:M&&!$[c.name]&&($[c.name]={});var Z=c.push?{}:M?$[c.name]:$;I(C.match(c.reg),Z,c.names,c.name),c.push&&$[c.push].push(Z)},f=requireGrammar(),k=RegExp.prototype.test.bind(/^([a-z])=(.*)/);O.parse=function(c){var $={},C=[],M=$;return c.split(/(\r\n|\r|\n)/).filter(k).forEach(function(Z){var J=Z[0],z=Z.slice(2);J==="m"&&(C.push({rtp:[],fmtp:[]}),M=C[C.length-1]);for(var Q=0;Q<(f[J]||[]).length;Q+=1){var ee=f[J][Q];if(ee.reg.test(z))return D(ee,M,z)}}),$.media=C,$};var i=function(c,$){var C=$.split(/=(.+)/,2);return C.length===2?c[C[0]]=N(C[1]):C.length===1&&$.length>1&&(c[C[0]]=void 0),c};O.parseParams=function(c){return c.split(/;\s?/).reduce(i,{})},O.parseFmtpConfig=O.parseParams,O.parsePayloads=function(c){return c.toString().split(" ").map(Number)},O.parseRemoteCandidates=function(c){for(var $=[],C=c.split(" ").map(N),M=0;M<C.length;M+=3)$.push({component:C[M],ip:C[M+1],port:C[M+2]});return $},O.parseImageAttributes=function(c){return c.split(" ").map(function($){return $.substring(1,$.length-1).split(",").reduce(i,{})})},O.parseSimulcastStreamList=function(c){return c.split(";").map(function($){return $.split(",").map(function(C){var M,Z=!1;return C[0]!=="~"?M=N(C):(M=N(C.substring(1,C.length)),Z=!0),{scid:M,paused:Z}})})}}(parser)),parser}var writer$1,hasRequiredWriter$1;function requireWriter$1(){if(hasRequiredWriter$1)return writer$1;hasRequiredWriter$1=1;var O=requireGrammar(),N=/%[sdv%]/g,I=function(i){var c=1,$=arguments,C=$.length;return i.replace(N,function(M){if(c>=C)return M;var Z=$[c];switch(c+=1,M){case"%%":return"%";case"%s":return String(Z);case"%d":return Number(Z);case"%v":return""}})},D=function(i,c,$){var C=c.format instanceof Function?c.format(c.push?$:$[c.name]):c.format,M=[i+"="+C];if(c.names)for(var Z=0;Z<c.names.length;Z+=1){var J=c.names[Z];c.name?M.push($[c.name][J]):M.push($[c.names[Z]])}else M.push($[c.name]);return I.apply(null,M)},f=["v","o","s","i","u","e","p","c","b","t","r","z","a"],k=["i","c","b","a"];return writer$1=function(i,c){c=c||{},i.version==null&&(i.version=0),i.name==null&&(i.name=" "),i.media.forEach(function(Z){Z.payloads==null&&(Z.payloads="")});var $=c.outerOrder||f,C=c.innerOrder||k,M=[];return $.forEach(function(Z){O[Z].forEach(function(J){J.name in i&&i[J.name]!=null?M.push(D(Z,J,i)):J.push in i&&i[J.push]!=null&&i[J.push].forEach(function(z){M.push(D(Z,J,z))})})}),i.media.forEach(function(Z){M.push(D("m",O.m[0],Z)),C.forEach(function(J){O[J].forEach(function(z){z.name in Z&&Z[z.name]!=null?M.push(D(J,z,Z)):z.push in Z&&Z[z.push]!=null&&Z[z.push].forEach(function(Q){M.push(D(J,z,Q))})})})}),M.join(`\r
2
2
  `)+`\r
3
- `},writer$1}var hasRequiredLib$1;function requireLib$1(){if(hasRequiredLib$1)return lib$1;hasRequiredLib$1=1;var $=requireParser(),z=requireWriter$1(),D=requireGrammar();return lib$1.grammar=D,lib$1.write=z,lib$1.parse=$.parse,lib$1.parseParams=$.parseParams,lib$1.parseFmtpConfig=$.parseFmtpConfig,lib$1.parsePayloads=$.parsePayloads,lib$1.parseRemoteCandidates=$.parseRemoteCandidates,lib$1.parseImageAttributes=$.parseImageAttributes,lib$1.parseSimulcastStreamList=$.parseSimulcastStreamList,lib$1}var libExports$1=requireLib$1();class VideoMediaContext{constructor(z){Se(this,"kind","video");Se(this,"stream",new MediaStream);Se(this,"stop",()=>{const z=this.stream.getTracks();for(const D of z)D.stop(),this.stream.removeTrack(D)});Se(this,"replaceStream",z=>{const D=this.stream,j=D.getTracks();for(const I of j)D.removeTrack(I);const[O]=z.getVideoTracks();O&&D.addTrack(O)});Se(this,"getStream",()=>this.stream);Se(this,"getTrack",()=>this.stream.getTracks()[0]);this.stream.addTrack(z)}}const enum_roomState={ready:"已就绪",checkAuth:"正在鉴权",connecting:"连接中",connected:"已连接",reconnect:"正在重新连接",disconnected:"已断开",failed:"连接错误",closed:"已关闭"};ht(enum_roomState);var C=Object.defineProperty,R=$=>{throw TypeError($)},S=($,z,D)=>z in $?C($,z,{enumerable:!0,configurable:!0,writable:!0,value:D}):$[z]=D,l$1=($,z,D)=>S($,typeof z!="symbol"?z+"":z,D),v=($,z,D)=>z.has($)||R("Cannot "+D),t$2=($,z,D)=>(v($,z,"read from private field"),D?D.call($):z.get($)),c=($,z,D)=>z.has($)?R("Cannot add the same private member more than once"):z instanceof WeakSet?z.add($):z.set($,D),i=($,z,D,j)=>(v($,z,"write to private field"),z.set($,D),D),s$1,r$1,h,p$1,m$1,f,w,x$1,g$1,b,B,y$1,T,d$1;class M{constructor(z){c(this,s$1,{url:"",binaryType:"blob",timeout:6*1e3,debug:!1,sendBeforAutoConnect:!1,reconnectCount:-1,reconnectTime:60*1e3,reconnectIntervalTime:5e3,heartbeatIntervalTime:1e4,checkReconnect:D=>!0,onReconnectSuccess:async D=>{},onReconnectStop:async D=>{},getHeartbeatMsg:()=>JSON.stringify({event:"heartbeat"}),onMessage:D=>{}}),l$1(this,"ws"),c(this,r$1,-1),c(this,h,-1),c(this,p$1,0),c(this,m$1,0),c(this,f,!1),c(this,w,D=>{}),l$1(this,"close",async(D=1e3,j="correctly close.")=>{var O;this.ws&&(i(this,f,!0),t$2(this,d$1).call(this),(O=this.ws)==null||O.close(D,j))}),l$1(this,"connect",()=>new Promise(async D=>{i(this,w,D),this.ws=new WebSocket(t$2(this,s$1).url),this.ws.binaryType=t$2(this,s$1).binaryType,this.ws.onopen=t$2(this,b),this.ws.onmessage=t$2(this,g$1),this.ws.onerror=t$2(this,B),this.ws.onclose=t$2(this,y$1)})),l$1(this,"reconnect",async D=>new Promise(j=>{t$2(this,s$1).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: await reconnect.");const O=I=>{t$2(this,s$1).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;",`------->pr-ws: ${I}`),t$2(this,s$1).onReconnectStop({msg:I}),j(I)};if(t$2(this,x$1).call(this)===!1)return O("stop reconnect. exceed maxReconnectionTime.");if(t$2(this,r$1)!==-1&&t$2(this,r$1)===0)return O("stop reconnect. surplusReconnectCount is 0.");if(!t$2(this,s$1).checkReconnect(D))return O("stop reconnect. checkReconnect is false.");t$2(this,s$1).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;",`------->pr-ws: await ${t$2(this,s$1).reconnectIntervalTime}ms run reconnect. surplusReconnectCount is ${t$2(this,r$1)}`,D),i(this,p$1,setTimeout(async()=>{i(this,r$1,Math.max(-1,t$2(this,r$1)-1)),await this.connect();try{await t$2(this,s$1).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)}j(!0)},t$2(this,s$1).reconnectIntervalTime))})),l$1(this,"sendMessage",async D=>{var j;(!this.ws||this.ws.readyState!==1)&&(t$2(this,s$1).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$2(this,s$1).sendBeforAutoConnect&&(t$2(this,s$1).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())),(j=this.ws)==null||j.send(D)}),c(this,x$1,()=>{const D=Date.now();return t$2(this,h)===-1&&i(this,h,D+t$2(this,s$1).reconnectTime),!(D>t$2(this,h))}),c(this,g$1,D=>{const{data:j}=D;t$2(this,s$1).onMessage(j)}),c(this,b,()=>{t$2(this,s$1).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$1,t$2(this,s$1).reconnectCount),i(this,h,-1),t$2(this,T).call(this),t$2(this,w).call(this,this.ws)}),c(this,B,D=>{t$2(this,s$1).debug&&console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: connect is error.",D)}),c(this,y$1,D=>{if(t$2(this,s$1).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;",`------->pr-ws: connect is close. code: ${D.code}, permanentClosed is ${t$2(this,f)}.`,D),t$2(this,d$1).call(this),!t$2(this,f))return this.reconnect(D);this.ws=void 0}),c(this,T,()=>{i(this,m$1,setInterval(()=>{const D=t$2(this,s$1).getHeartbeatMsg();D&&this.sendMessage(D)},t$2(this,s$1).heartbeatIntervalTime))}),c(this,d$1,()=>{clearInterval(t$2(this,p$1)),clearInterval(t$2(this,m$1))}),i(this,s$1,{...t$2(this,s$1),...z}),i(this,r$1,t$2(this,s$1).reconnectCount)}}s$1=new WeakMap,r$1=new WeakMap,h=new WeakMap,p$1=new WeakMap,m$1=new WeakMap,f=new WeakMap,w=new WeakMap,x$1=new WeakMap,g$1=new WeakMap,b=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 $(z,D){for(var j=new Array(arguments.length-1),O=0,I=2,o=!0;I<arguments.length;)j[O++]=arguments[I++];return new Promise(function(N,F){j[O]=function(X){if(o)if(o=!1,X)F(X);else{for(var Y=new Array(arguments.length-1),Q=0;Q<Y.length;)Y[Q++]=arguments[Q];N.apply(null,Y)}};try{z.apply(D||null,j)}catch(J){o&&(o=!1,F(J))}})}return aspromise}var base64={},hasRequiredBase64;function requireBase64(){return hasRequiredBase64||(hasRequiredBase64=1,function($){var z=$;z.length=function(k){var N=k.length;if(!N)return 0;for(var F=0;--N%4>1&&k.charAt(N)==="=";)++F;return Math.ceil(k.length*3)/4-F};for(var D=new Array(64),j=new Array(123),O=0;O<64;)j[D[O]=O<26?O+65:O<52?O+71:O<62?O-4:O-59|43]=O++;z.encode=function(k,N,F){for(var J=null,X=[],Y=0,Q=0,te;N<F;){var ie=k[N++];switch(Q){case 0:X[Y++]=D[ie>>2],te=(ie&3)<<4,Q=1;break;case 1:X[Y++]=D[te|ie>>4],te=(ie&15)<<2,Q=2;break;case 2:X[Y++]=D[te|ie>>6],X[Y++]=D[ie&63],Q=0;break}Y>8191&&((J||(J=[])).push(String.fromCharCode.apply(String,X)),Y=0)}return Q&&(X[Y++]=D[te],X[Y++]=61,Q===1&&(X[Y++]=61)),J?(Y&&J.push(String.fromCharCode.apply(String,X.slice(0,Y))),J.join("")):String.fromCharCode.apply(String,X.slice(0,Y))};var I="invalid encoding";z.decode=function(k,N,F){for(var J=F,X=0,Y,Q=0;Q<k.length;){var te=k.charCodeAt(Q++);if(te===61&&X>1)break;if((te=j[te])===void 0)throw Error(I);switch(X){case 0:Y=te,X=1;break;case 1:N[F++]=Y<<2|(te&48)>>4,Y=te,X=2;break;case 2:N[F++]=(Y&15)<<4|(te&60)>>2,Y=te,X=3;break;case 3:N[F++]=(Y&3)<<6|te,X=0;break}}if(X===1)throw Error(I);return F-J},z.test=function(k){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(k)}}(base64)),base64}var eventemitter,hasRequiredEventemitter;function requireEventemitter(){if(hasRequiredEventemitter)return eventemitter;hasRequiredEventemitter=1,eventemitter=$;function $(){this._listeners={}}return $.prototype.on=function(D,j,O){return(this._listeners[D]||(this._listeners[D]=[])).push({fn:j,ctx:O||this}),this},$.prototype.off=function(D,j){if(D===void 0)this._listeners={};else if(j===void 0)this._listeners[D]=[];else for(var O=this._listeners[D],I=0;I<O.length;)O[I].fn===j?O.splice(I,1):++I;return this},$.prototype.emit=function(D){var j=this._listeners[D];if(j){for(var O=[],I=1;I<arguments.length;)O.push(arguments[I++]);for(I=0;I<j.length;)j[I].fn.apply(j[I++].ctx,O)}return this},eventemitter}var float,hasRequiredFloat;function requireFloat(){if(hasRequiredFloat)return float;hasRequiredFloat=1,float=$($);function $(I){return typeof Float32Array<"u"?function(){var o=new Float32Array([-0]),k=new Uint8Array(o.buffer),N=k[3]===128;function F(Q,te,ie){o[0]=Q,te[ie]=k[0],te[ie+1]=k[1],te[ie+2]=k[2],te[ie+3]=k[3]}function J(Q,te,ie){o[0]=Q,te[ie]=k[3],te[ie+1]=k[2],te[ie+2]=k[1],te[ie+3]=k[0]}I.writeFloatLE=N?F:J,I.writeFloatBE=N?J:F;function X(Q,te){return k[0]=Q[te],k[1]=Q[te+1],k[2]=Q[te+2],k[3]=Q[te+3],o[0]}function Y(Q,te){return k[3]=Q[te],k[2]=Q[te+1],k[1]=Q[te+2],k[0]=Q[te+3],o[0]}I.readFloatLE=N?X:Y,I.readFloatBE=N?Y:X}():function(){function o(N,F,J,X){var Y=F<0?1:0;if(Y&&(F=-F),F===0)N(1/F>0?0:2147483648,J,X);else if(isNaN(F))N(2143289344,J,X);else if(F>34028234663852886e22)N((Y<<31|2139095040)>>>0,J,X);else if(F<11754943508222875e-54)N((Y<<31|Math.round(F/1401298464324817e-60))>>>0,J,X);else{var Q=Math.floor(Math.log(F)/Math.LN2),te=Math.round(F*Math.pow(2,-Q)*8388608)&8388607;N((Y<<31|Q+127<<23|te)>>>0,J,X)}}I.writeFloatLE=o.bind(null,z),I.writeFloatBE=o.bind(null,D);function k(N,F,J){var X=N(F,J),Y=(X>>31)*2+1,Q=X>>>23&255,te=X&8388607;return Q===255?te?NaN:Y*(1/0):Q===0?Y*1401298464324817e-60*te:Y*Math.pow(2,Q-150)*(te+8388608)}I.readFloatLE=k.bind(null,j),I.readFloatBE=k.bind(null,O)}(),typeof Float64Array<"u"?function(){var o=new Float64Array([-0]),k=new Uint8Array(o.buffer),N=k[7]===128;function F(Q,te,ie){o[0]=Q,te[ie]=k[0],te[ie+1]=k[1],te[ie+2]=k[2],te[ie+3]=k[3],te[ie+4]=k[4],te[ie+5]=k[5],te[ie+6]=k[6],te[ie+7]=k[7]}function J(Q,te,ie){o[0]=Q,te[ie]=k[7],te[ie+1]=k[6],te[ie+2]=k[5],te[ie+3]=k[4],te[ie+4]=k[3],te[ie+5]=k[2],te[ie+6]=k[1],te[ie+7]=k[0]}I.writeDoubleLE=N?F:J,I.writeDoubleBE=N?J:F;function X(Q,te){return k[0]=Q[te],k[1]=Q[te+1],k[2]=Q[te+2],k[3]=Q[te+3],k[4]=Q[te+4],k[5]=Q[te+5],k[6]=Q[te+6],k[7]=Q[te+7],o[0]}function Y(Q,te){return k[7]=Q[te],k[6]=Q[te+1],k[5]=Q[te+2],k[4]=Q[te+3],k[3]=Q[te+4],k[2]=Q[te+5],k[1]=Q[te+6],k[0]=Q[te+7],o[0]}I.readDoubleLE=N?X:Y,I.readDoubleBE=N?Y:X}():function(){function o(N,F,J,X,Y,Q){var te=X<0?1:0;if(te&&(X=-X),X===0)N(0,Y,Q+F),N(1/X>0?0:2147483648,Y,Q+J);else if(isNaN(X))N(0,Y,Q+F),N(2146959360,Y,Q+J);else if(X>17976931348623157e292)N(0,Y,Q+F),N((te<<31|2146435072)>>>0,Y,Q+J);else{var ie;if(X<22250738585072014e-324)ie=X/5e-324,N(ie>>>0,Y,Q+F),N((te<<31|ie/4294967296)>>>0,Y,Q+J);else{var ne=Math.floor(Math.log(X)/Math.LN2);ne===1024&&(ne=1023),ie=X*Math.pow(2,-ne),N(ie*4503599627370496>>>0,Y,Q+F),N((te<<31|ne+1023<<20|ie*1048576&1048575)>>>0,Y,Q+J)}}}I.writeDoubleLE=o.bind(null,z,0,4),I.writeDoubleBE=o.bind(null,D,4,0);function k(N,F,J,X,Y){var Q=N(X,Y+F),te=N(X,Y+J),ie=(te>>31)*2+1,ne=te>>>20&2047,oe=4294967296*(te&1048575)+Q;return ne===2047?oe?NaN:ie*(1/0):ne===0?ie*5e-324*oe:ie*Math.pow(2,ne-1075)*(oe+4503599627370496)}I.readDoubleLE=k.bind(null,j,0,4),I.readDoubleBE=k.bind(null,O,4,0)}(),I}function z(I,o,k){o[k]=I&255,o[k+1]=I>>>8&255,o[k+2]=I>>>16&255,o[k+3]=I>>>24}function D(I,o,k){o[k]=I>>>24,o[k+1]=I>>>16&255,o[k+2]=I>>>8&255,o[k+3]=I&255}function j(I,o){return(I[o]|I[o+1]<<8|I[o+2]<<16|I[o+3]<<24)>>>0}function O(I,o){return(I[o]<<24|I[o+1]<<16|I[o+2]<<8|I[o+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 z=$;z.length=function(j){for(var O=0,I=0,o=0;o<j.length;++o)I=j.charCodeAt(o),I<128?O+=1:I<2048?O+=2:(I&64512)===55296&&(j.charCodeAt(o+1)&64512)===56320?(++o,O+=4):O+=3;return O},z.read=function(j,O,I){var o=I-O;if(o<1)return"";for(var k=null,N=[],F=0,J;O<I;)J=j[O++],J<128?N[F++]=J:J>191&&J<224?N[F++]=(J&31)<<6|j[O++]&63:J>239&&J<365?(J=((J&7)<<18|(j[O++]&63)<<12|(j[O++]&63)<<6|j[O++]&63)-65536,N[F++]=55296+(J>>10),N[F++]=56320+(J&1023)):N[F++]=(J&15)<<12|(j[O++]&63)<<6|j[O++]&63,F>8191&&((k||(k=[])).push(String.fromCharCode.apply(String,N)),F=0);return k?(F&&k.push(String.fromCharCode.apply(String,N.slice(0,F))),k.join("")):String.fromCharCode.apply(String,N.slice(0,F))},z.write=function(j,O,I){for(var o=I,k,N,F=0;F<j.length;++F)k=j.charCodeAt(F),k<128?O[I++]=k:k<2048?(O[I++]=k>>6|192,O[I++]=k&63|128):(k&64512)===55296&&((N=j.charCodeAt(F+1))&64512)===56320?(k=65536+((k&1023)<<10)+(N&1023),++F,O[I++]=k>>18|240,O[I++]=k>>12&63|128,O[I++]=k>>6&63|128,O[I++]=k&63|128):(O[I++]=k>>12|224,O[I++]=k>>6&63|128,O[I++]=k&63|128);return I-o}}(utf8)),utf8}var pool_1,hasRequiredPool;function requirePool(){if(hasRequiredPool)return pool_1;hasRequiredPool=1,pool_1=$;function $(z,D,j){var O=j||8192,I=O>>>1,o=null,k=O;return function(F){if(F<1||F>I)return z(F);k+F>O&&(o=z(O),k=0);var J=D.call(o,k,k+=F);return k&7&&(k=(k|7)+1),J}}return pool_1}var longbits,hasRequiredLongbits;function requireLongbits(){if(hasRequiredLongbits)return longbits;hasRequiredLongbits=1,longbits=z;var $=requireMinimal$1();function z(I,o){this.lo=I>>>0,this.hi=o>>>0}var D=z.zero=new z(0,0);D.toNumber=function(){return 0},D.zzEncode=D.zzDecode=function(){return this},D.length=function(){return 1};var j=z.zeroHash="\0\0\0\0\0\0\0\0";z.fromNumber=function(o){if(o===0)return D;var k=o<0;k&&(o=-o);var N=o>>>0,F=(o-N)/4294967296>>>0;return k&&(F=~F>>>0,N=~N>>>0,++N>4294967295&&(N=0,++F>4294967295&&(F=0))),new z(N,F)},z.from=function(o){if(typeof o=="number")return z.fromNumber(o);if($.isString(o))if($.Long)o=$.Long.fromString(o);else return z.fromNumber(parseInt(o,10));return o.low||o.high?new z(o.low>>>0,o.high>>>0):D},z.prototype.toNumber=function(o){if(!o&&this.hi>>>31){var k=~this.lo+1>>>0,N=~this.hi>>>0;return k||(N=N+1>>>0),-(k+N*4294967296)}return this.lo+this.hi*4294967296},z.prototype.toLong=function(o){return $.Long?new $.Long(this.lo|0,this.hi|0,!!o):{low:this.lo|0,high:this.hi|0,unsigned:!!o}};var O=String.prototype.charCodeAt;return z.fromHash=function(o){return o===j?D:new z((O.call(o,0)|O.call(o,1)<<8|O.call(o,2)<<16|O.call(o,3)<<24)>>>0,(O.call(o,4)|O.call(o,5)<<8|O.call(o,6)<<16|O.call(o,7)<<24)>>>0)},z.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)},z.prototype.zzEncode=function(){var o=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^o)>>>0,this.lo=(this.lo<<1^o)>>>0,this},z.prototype.zzDecode=function(){var o=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^o)>>>0,this.hi=(this.hi>>>1^o)>>>0,this},z.prototype.length=function(){var o=this.lo,k=(this.lo>>>28|this.hi<<4)>>>0,N=this.hi>>>24;return N===0?k===0?o<16384?o<128?1:2:o<2097152?3:4:k<16384?k<128?5:6:k<2097152?7:8:N<128?9:10},longbits}var hasRequiredMinimal$1;function requireMinimal$1(){return hasRequiredMinimal$1||(hasRequiredMinimal$1=1,function($){var z=$;z.asPromise=requireAspromise(),z.base64=requireBase64(),z.EventEmitter=requireEventemitter(),z.float=requireFloat(),z.inquire=requireInquire(),z.utf8=requireUtf8(),z.pool=requirePool(),z.LongBits=requireLongbits(),z.isNode=!!(typeof commonjsGlobal<"u"&&commonjsGlobal&&commonjsGlobal.process&&commonjsGlobal.process.versions&&commonjsGlobal.process.versions.node),z.global=z.isNode&&commonjsGlobal||typeof window<"u"&&window||typeof self<"u"&&self||minimal$1,z.emptyArray=Object.freeze?Object.freeze([]):[],z.emptyObject=Object.freeze?Object.freeze({}):{},z.isInteger=Number.isInteger||function(I){return typeof I=="number"&&isFinite(I)&&Math.floor(I)===I},z.isString=function(I){return typeof I=="string"||I instanceof String},z.isObject=function(I){return I&&typeof I=="object"},z.isset=z.isSet=function(I,o){var k=I[o];return k!=null&&I.hasOwnProperty(o)?typeof k!="object"||(Array.isArray(k)?k.length:Object.keys(k).length)>0:!1},z.Buffer=function(){try{var O=z.inquire("buffer").Buffer;return O.prototype.utf8Write?O:null}catch{return null}}(),z._Buffer_from=null,z._Buffer_allocUnsafe=null,z.newBuffer=function(I){return typeof I=="number"?z.Buffer?z._Buffer_allocUnsafe(I):new z.Array(I):z.Buffer?z._Buffer_from(I):typeof Uint8Array>"u"?I:new Uint8Array(I)},z.Array=typeof Uint8Array<"u"?Uint8Array:Array,z.Long=z.global.dcodeIO&&z.global.dcodeIO.Long||z.global.Long||z.inquire("long"),z.key2Re=/^true|false|0|1$/,z.key32Re=/^-?(?:0|[1-9][0-9]*)$/,z.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,z.longToHash=function(I){return I?z.LongBits.from(I).toHash():z.LongBits.zeroHash},z.longFromHash=function(I,o){var k=z.LongBits.fromHash(I);return z.Long?z.Long.fromBits(k.lo,k.hi,o):k.toNumber(!!o)};function D(O,I,o){for(var k=Object.keys(I),N=0;N<k.length;++N)(O[k[N]]===void 0||!o)&&(O[k[N]]=I[k[N]]);return O}z.merge=D,z.lcFirst=function(I){return I.charAt(0).toLowerCase()+I.substring(1)};function j(O){function I(o,k){if(!(this instanceof I))return new I(o,k);Object.defineProperty(this,"message",{get:function(){return o}}),Error.captureStackTrace?Error.captureStackTrace(this,I):Object.defineProperty(this,"stack",{value:new Error().stack||""}),k&&D(this,k)}return I.prototype=Object.create(Error.prototype,{constructor:{value:I,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return O},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),I}z.newError=j,z.ProtocolError=j("ProtocolError"),z.oneOfGetter=function(I){for(var o={},k=0;k<I.length;++k)o[I[k]]=1;return function(){for(var N=Object.keys(this),F=N.length-1;F>-1;--F)if(o[N[F]]===1&&this[N[F]]!==void 0&&this[N[F]]!==null)return N[F]}},z.oneOfSetter=function(I){return function(o){for(var k=0;k<I.length;++k)I[k]!==o&&delete this[I[k]]}},z.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},z._configure=function(){var O=z.Buffer;if(!O){z._Buffer_from=z._Buffer_allocUnsafe=null;return}z._Buffer_from=O.from!==Uint8Array.from&&O.from||function(o,k){return new O(o,k)},z._Buffer_allocUnsafe=O.allocUnsafe||function(o){return new O(o)}}}(minimal$1)),minimal$1}var writer,hasRequiredWriter;function requireWriter(){if(hasRequiredWriter)return writer;hasRequiredWriter=1,writer=N;var $=requireMinimal$1(),z,D=$.LongBits,j=$.base64,O=$.utf8;function I(ne,oe,ce){this.fn=ne,this.len=oe,this.next=void 0,this.val=ce}function o(){}function k(ne){this.head=ne.head,this.tail=ne.tail,this.len=ne.len,this.next=ne.states}function N(){this.len=0,this.head=new I(o,0,0),this.tail=this.head,this.states=null}var F=function(){return $.Buffer?function(){return(N.create=function(){return new z})()}:function(){return new N}};N.create=F(),N.alloc=function(oe){return new $.Array(oe)},$.Array!==Array&&(N.alloc=$.pool(N.alloc,$.Array.prototype.subarray)),N.prototype._push=function(oe,ce,we){return this.tail=this.tail.next=new I(oe,ce,we),this.len+=ce,this};function J(ne,oe,ce){oe[ce]=ne&255}function X(ne,oe,ce){for(;ne>127;)oe[ce++]=ne&127|128,ne>>>=7;oe[ce]=ne}function Y(ne,oe){this.len=ne,this.next=void 0,this.val=oe}Y.prototype=Object.create(I.prototype),Y.prototype.fn=X,N.prototype.uint32=function(oe){return this.len+=(this.tail=this.tail.next=new Y((oe=oe>>>0)<128?1:oe<16384?2:oe<2097152?3:oe<268435456?4:5,oe)).len,this},N.prototype.int32=function(oe){return oe<0?this._push(Q,10,D.fromNumber(oe)):this.uint32(oe)},N.prototype.sint32=function(oe){return this.uint32((oe<<1^oe>>31)>>>0)};function Q(ne,oe,ce){for(;ne.hi;)oe[ce++]=ne.lo&127|128,ne.lo=(ne.lo>>>7|ne.hi<<25)>>>0,ne.hi>>>=7;for(;ne.lo>127;)oe[ce++]=ne.lo&127|128,ne.lo=ne.lo>>>7;oe[ce++]=ne.lo}N.prototype.uint64=function(oe){var ce=D.from(oe);return this._push(Q,ce.length(),ce)},N.prototype.int64=N.prototype.uint64,N.prototype.sint64=function(oe){var ce=D.from(oe).zzEncode();return this._push(Q,ce.length(),ce)},N.prototype.bool=function(oe){return this._push(J,1,oe?1:0)};function te(ne,oe,ce){oe[ce]=ne&255,oe[ce+1]=ne>>>8&255,oe[ce+2]=ne>>>16&255,oe[ce+3]=ne>>>24}N.prototype.fixed32=function(oe){return this._push(te,4,oe>>>0)},N.prototype.sfixed32=N.prototype.fixed32,N.prototype.fixed64=function(oe){var ce=D.from(oe);return this._push(te,4,ce.lo)._push(te,4,ce.hi)},N.prototype.sfixed64=N.prototype.fixed64,N.prototype.float=function(oe){return this._push($.float.writeFloatLE,4,oe)},N.prototype.double=function(oe){return this._push($.float.writeDoubleLE,8,oe)};var ie=$.Array.prototype.set?function(oe,ce,we){ce.set(oe,we)}:function(oe,ce,we){for(var se=0;se<oe.length;++se)ce[we+se]=oe[se]};return N.prototype.bytes=function(oe){var ce=oe.length>>>0;if(!ce)return this._push(J,1,0);if($.isString(oe)){var we=N.alloc(ce=j.length(oe));j.decode(oe,we,0),oe=we}return this.uint32(ce)._push(ie,ce,oe)},N.prototype.string=function(oe){var ce=O.length(oe);return ce?this.uint32(ce)._push(O.write,ce,oe):this._push(J,1,0)},N.prototype.fork=function(){return this.states=new k(this),this.head=this.tail=new I(o,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(o,0,0),this.len=0),this},N.prototype.ldelim=function(){var oe=this.head,ce=this.tail,we=this.len;return this.reset().uint32(we),we&&(this.tail.next=oe.next,this.tail=ce,this.len+=we),this},N.prototype.finish=function(){for(var oe=this.head.next,ce=this.constructor.alloc(this.len),we=0;oe;)oe.fn(oe.val,ce,we),we+=oe.len,oe=oe.next;return ce},N._configure=function(ne){z=ne,N.create=F(),z._configure()},writer}var writer_buffer,hasRequiredWriter_buffer;function requireWriter_buffer(){if(hasRequiredWriter_buffer)return writer_buffer;hasRequiredWriter_buffer=1,writer_buffer=D;var $=requireWriter();(D.prototype=Object.create($.prototype)).constructor=D;var z=requireMinimal$1();function D(){$.call(this)}D._configure=function(){D.alloc=z._Buffer_allocUnsafe,D.writeBytesBuffer=z.Buffer&&z.Buffer.prototype instanceof Uint8Array&&z.Buffer.prototype.set.name==="set"?function(I,o,k){o.set(I,k)}:function(I,o,k){if(I.copy)I.copy(o,k,0,I.length);else for(var N=0;N<I.length;)o[k++]=I[N++]}},D.prototype.bytes=function(I){z.isString(I)&&(I=z._Buffer_from(I,"base64"));var o=I.length>>>0;return this.uint32(o),o&&this._push(D.writeBytesBuffer,o,I),this};function j(O,I,o){O.length<40?z.utf8.write(O,I,o):I.utf8Write?I.utf8Write(O,o):I.write(O,o)}return D.prototype.string=function(I){var o=z.Buffer.byteLength(I);return this.uint32(o),o&&this._push(j,o,I),this},D._configure(),writer_buffer}var reader,hasRequiredReader;function requireReader(){if(hasRequiredReader)return reader;hasRequiredReader=1,reader=I;var $=requireMinimal$1(),z,D=$.LongBits,j=$.utf8;function O(X,Y){return RangeError("index out of range: "+X.pos+" + "+(Y||1)+" > "+X.len)}function I(X){this.buf=X,this.pos=0,this.len=X.length}var o=typeof Uint8Array<"u"?function(Y){if(Y instanceof Uint8Array||Array.isArray(Y))return new I(Y);throw Error("illegal buffer")}:function(Y){if(Array.isArray(Y))return new I(Y);throw Error("illegal buffer")},k=function(){return $.Buffer?function(Q){return(I.create=function(ie){return $.Buffer.isBuffer(ie)?new z(ie):o(ie)})(Q)}:o};I.create=k(),I.prototype._slice=$.Array.prototype.subarray||$.Array.prototype.slice,I.prototype.uint32=function(){var Y=4294967295;return function(){if(Y=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(Y=(Y|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(Y=(Y|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(Y=(Y|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(Y=(Y|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return Y;if((this.pos+=5)>this.len)throw this.pos=this.len,O(this,10);return Y}}(),I.prototype.int32=function(){return this.uint32()|0},I.prototype.sint32=function(){var Y=this.uint32();return Y>>>1^-(Y&1)|0};function N(){var X=new D(0,0),Y=0;if(this.len-this.pos>4){for(;Y<4;++Y)if(X.lo=(X.lo|(this.buf[this.pos]&127)<<Y*7)>>>0,this.buf[this.pos++]<128)return X;if(X.lo=(X.lo|(this.buf[this.pos]&127)<<28)>>>0,X.hi=(X.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return X;Y=0}else{for(;Y<3;++Y){if(this.pos>=this.len)throw O(this);if(X.lo=(X.lo|(this.buf[this.pos]&127)<<Y*7)>>>0,this.buf[this.pos++]<128)return X}return X.lo=(X.lo|(this.buf[this.pos++]&127)<<Y*7)>>>0,X}if(this.len-this.pos>4){for(;Y<5;++Y)if(X.hi=(X.hi|(this.buf[this.pos]&127)<<Y*7+3)>>>0,this.buf[this.pos++]<128)return X}else for(;Y<5;++Y){if(this.pos>=this.len)throw O(this);if(X.hi=(X.hi|(this.buf[this.pos]&127)<<Y*7+3)>>>0,this.buf[this.pos++]<128)return X}throw Error("invalid varint encoding")}I.prototype.bool=function(){return this.uint32()!==0};function F(X,Y){return(X[Y-4]|X[Y-3]<<8|X[Y-2]<<16|X[Y-1]<<24)>>>0}I.prototype.fixed32=function(){if(this.pos+4>this.len)throw O(this,4);return F(this.buf,this.pos+=4)},I.prototype.sfixed32=function(){if(this.pos+4>this.len)throw O(this,4);return F(this.buf,this.pos+=4)|0};function J(){if(this.pos+8>this.len)throw O(this,8);return new D(F(this.buf,this.pos+=4),F(this.buf,this.pos+=4))}return I.prototype.float=function(){if(this.pos+4>this.len)throw O(this,4);var Y=$.float.readFloatLE(this.buf,this.pos);return this.pos+=4,Y},I.prototype.double=function(){if(this.pos+8>this.len)throw O(this,4);var Y=$.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,Y},I.prototype.bytes=function(){var Y=this.uint32(),Q=this.pos,te=this.pos+Y;if(te>this.len)throw O(this,Y);if(this.pos+=Y,Array.isArray(this.buf))return this.buf.slice(Q,te);if(Q===te){var ie=$.Buffer;return ie?ie.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,Q,te)},I.prototype.string=function(){var Y=this.bytes();return j.read(Y,0,Y.length)},I.prototype.skip=function(Y){if(typeof Y=="number"){if(this.pos+Y>this.len)throw O(this,Y);this.pos+=Y}else do if(this.pos>=this.len)throw O(this);while(this.buf[this.pos++]&128);return this},I.prototype.skipType=function(X){switch(X){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(X=this.uint32()&7)!==4;)this.skipType(X);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+X+" at offset "+this.pos)}return this},I._configure=function(X){z=X,I.create=k(),z._configure();var Y=$.Long?"toLong":"toNumber";$.merge(I.prototype,{int64:function(){return N.call(this)[Y](!1)},uint64:function(){return N.call(this)[Y](!0)},sint64:function(){return N.call(this).zzDecode()[Y](!1)},fixed64:function(){return J.call(this)[Y](!0)},sfixed64:function(){return J.call(this)[Y](!1)}})},reader}var reader_buffer,hasRequiredReader_buffer;function requireReader_buffer(){if(hasRequiredReader_buffer)return reader_buffer;hasRequiredReader_buffer=1,reader_buffer=D;var $=requireReader();(D.prototype=Object.create($.prototype)).constructor=D;var z=requireMinimal$1();function D(j){$.call(this,j)}return D._configure=function(){z.Buffer&&(D.prototype._slice=z.Buffer.prototype.slice)},D.prototype.string=function(){var O=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+O,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+O,this.len))},D._configure(),reader_buffer}var rpc={},service,hasRequiredService;function requireService(){if(hasRequiredService)return service;hasRequiredService=1,service=z;var $=requireMinimal$1();(z.prototype=Object.create($.EventEmitter.prototype)).constructor=z;function z(D,j,O){if(typeof D!="function")throw TypeError("rpcImpl must be a function");$.EventEmitter.call(this),this.rpcImpl=D,this.requestDelimited=!!j,this.responseDelimited=!!O}return z.prototype.rpcCall=function D(j,O,I,o,k){if(!o)throw TypeError("request must be specified");var N=this;if(!k)return $.asPromise(D,N,j,O,I,o);if(!N.rpcImpl){setTimeout(function(){k(Error("already ended"))},0);return}try{return N.rpcImpl(j,O[N.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(J,X){if(J)return N.emit("error",J,j),k(J);if(X===null){N.end(!0);return}if(!(X instanceof I))try{X=I[N.responseDelimited?"decodeDelimited":"decode"](X)}catch(Y){return N.emit("error",Y,j),k(Y)}return N.emit("data",X,j),k(null,X)})}catch(F){N.emit("error",F,j),setTimeout(function(){k(F)},0);return}},z.prototype.end=function(j){return this.rpcImpl&&(j||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this},service}var hasRequiredRpc;function requireRpc(){return hasRequiredRpc||(hasRequiredRpc=1,function($){var z=$;z.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 z=$;z.build="minimal",z.Writer=requireWriter(),z.BufferWriter=requireWriter_buffer(),z.Reader=requireReader(),z.BufferReader=requireReader_buffer(),z.util=requireMinimal$1(),z.rpc=requireRpc(),z.roots=requireRoots(),z.configure=D;function D(){z.util._configure(),z.Writer._configure(z.BufferWriter),z.Reader._configure(z.BufferReader)}D()}(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 z={};return z.voice=function(){const D={};return D.proto=function(){const j={};return j.CommonReq=function(){function O(I){if(I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.event="",O.prototype.data=$util.newBuffer([]),O.prototype.sn=$util.Long?$util.Long.fromBits(0,0,!1):0,O.prototype.time=$util.Long?$util.Long.fromBits(0,0,!1):0,O.prototype.valid=$util.Long?$util.Long.fromBits(0,0,!1):0,O.prototype.version=0,O.prototype.compress=!1,O.create=function(o){return new O(o)},O.encode=function(o,k){return k||(k=$Writer.create()),o.event!=null&&Object.hasOwnProperty.call(o,"event")&&k.uint32(10).string(o.event),o.data!=null&&Object.hasOwnProperty.call(o,"data")&&k.uint32(18).bytes(o.data),o.sn!=null&&Object.hasOwnProperty.call(o,"sn")&&k.uint32(24).int64(o.sn),o.time!=null&&Object.hasOwnProperty.call(o,"time")&&k.uint32(32).int64(o.time),o.valid!=null&&Object.hasOwnProperty.call(o,"valid")&&k.uint32(40).int64(o.valid),o.version!=null&&Object.hasOwnProperty.call(o,"version")&&k.uint32(48).int32(o.version),o.compress!=null&&Object.hasOwnProperty.call(o,"compress")&&k.uint32(56).bool(o.compress),k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.CommonReq;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.event=o.string();break}case 2:{F.data=o.bytes();break}case 3:{F.sn=o.int64();break}case 4:{F.time=o.int64();break}case 5:{F.valid=o.int64();break}case 6:{F.version=o.int32();break}case 7:{F.compress=o.bool();break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){return typeof o!="object"||o===null?"object expected":o.event!=null&&o.hasOwnProperty("event")&&!$util.isString(o.event)?"event: string expected":o.data!=null&&o.hasOwnProperty("data")&&!(o.data&&typeof o.data.length=="number"||$util.isString(o.data))?"data: buffer expected":o.sn!=null&&o.hasOwnProperty("sn")&&!$util.isInteger(o.sn)&&!(o.sn&&$util.isInteger(o.sn.low)&&$util.isInteger(o.sn.high))?"sn: integer|Long expected":o.time!=null&&o.hasOwnProperty("time")&&!$util.isInteger(o.time)&&!(o.time&&$util.isInteger(o.time.low)&&$util.isInteger(o.time.high))?"time: integer|Long expected":o.valid!=null&&o.hasOwnProperty("valid")&&!$util.isInteger(o.valid)&&!(o.valid&&$util.isInteger(o.valid.low)&&$util.isInteger(o.valid.high))?"valid: integer|Long expected":o.version!=null&&o.hasOwnProperty("version")&&!$util.isInteger(o.version)?"version: integer expected":o.compress!=null&&o.hasOwnProperty("compress")&&typeof o.compress!="boolean"?"compress: boolean expected":null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.CommonReq)return o;let k=new $root.com.quick.voice.proto.CommonReq;return o.event!=null&&(k.event=String(o.event)),o.data!=null&&(typeof o.data=="string"?$util.base64.decode(o.data,k.data=$util.newBuffer($util.base64.length(o.data)),0):o.data.length>=0&&(k.data=o.data)),o.sn!=null&&($util.Long?(k.sn=$util.Long.fromValue(o.sn)).unsigned=!1:typeof o.sn=="string"?k.sn=parseInt(o.sn,10):typeof o.sn=="number"?k.sn=o.sn:typeof o.sn=="object"&&(k.sn=new $util.LongBits(o.sn.low>>>0,o.sn.high>>>0).toNumber())),o.time!=null&&($util.Long?(k.time=$util.Long.fromValue(o.time)).unsigned=!1:typeof o.time=="string"?k.time=parseInt(o.time,10):typeof o.time=="number"?k.time=o.time:typeof o.time=="object"&&(k.time=new $util.LongBits(o.time.low>>>0,o.time.high>>>0).toNumber())),o.valid!=null&&($util.Long?(k.valid=$util.Long.fromValue(o.valid)).unsigned=!1:typeof o.valid=="string"?k.valid=parseInt(o.valid,10):typeof o.valid=="number"?k.valid=o.valid:typeof o.valid=="object"&&(k.valid=new $util.LongBits(o.valid.low>>>0,o.valid.high>>>0).toNumber())),o.version!=null&&(k.version=o.version|0),o.compress!=null&&(k.compress=!!o.compress),k},O.toObject=function(o,k){k||(k={});let N={};if(k.defaults){if(N.event="",k.bytes===String?N.data="":(N.data=[],k.bytes!==Array&&(N.data=$util.newBuffer(N.data))),$util.Long){let F=new $util.Long(0,0,!1);N.sn=k.longs===String?F.toString():k.longs===Number?F.toNumber():F}else N.sn=k.longs===String?"0":0;if($util.Long){let F=new $util.Long(0,0,!1);N.time=k.longs===String?F.toString():k.longs===Number?F.toNumber():F}else N.time=k.longs===String?"0":0;if($util.Long){let F=new $util.Long(0,0,!1);N.valid=k.longs===String?F.toString():k.longs===Number?F.toNumber():F}else N.valid=k.longs===String?"0":0;N.version=0,N.compress=!1}return o.event!=null&&o.hasOwnProperty("event")&&(N.event=o.event),o.data!=null&&o.hasOwnProperty("data")&&(N.data=k.bytes===String?$util.base64.encode(o.data,0,o.data.length):k.bytes===Array?Array.prototype.slice.call(o.data):o.data),o.sn!=null&&o.hasOwnProperty("sn")&&(typeof o.sn=="number"?N.sn=k.longs===String?String(o.sn):o.sn:N.sn=k.longs===String?$util.Long.prototype.toString.call(o.sn):k.longs===Number?new $util.LongBits(o.sn.low>>>0,o.sn.high>>>0).toNumber():o.sn),o.time!=null&&o.hasOwnProperty("time")&&(typeof o.time=="number"?N.time=k.longs===String?String(o.time):o.time:N.time=k.longs===String?$util.Long.prototype.toString.call(o.time):k.longs===Number?new $util.LongBits(o.time.low>>>0,o.time.high>>>0).toNumber():o.time),o.valid!=null&&o.hasOwnProperty("valid")&&(typeof o.valid=="number"?N.valid=k.longs===String?String(o.valid):o.valid:N.valid=k.longs===String?$util.Long.prototype.toString.call(o.valid):k.longs===Number?new $util.LongBits(o.valid.low>>>0,o.valid.high>>>0).toNumber():o.valid),o.version!=null&&o.hasOwnProperty("version")&&(N.version=o.version),o.compress!=null&&o.hasOwnProperty("compress")&&(N.compress=o.compress),N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.CommonReq"},O}(),j.CommonRsp=function(){function O(I){if(I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.event="",O.prototype.data=$util.newBuffer([]),O.prototype.sn=$util.Long?$util.Long.fromBits(0,0,!1):0,O.prototype.time=$util.Long?$util.Long.fromBits(0,0,!1):0,O.prototype.valid=$util.Long?$util.Long.fromBits(0,0,!1):0,O.prototype.code=0,O.prototype.desc="",O.prototype.version=0,O.prototype.compress=!1,O.create=function(o){return new O(o)},O.encode=function(o,k){return k||(k=$Writer.create()),o.event!=null&&Object.hasOwnProperty.call(o,"event")&&k.uint32(10).string(o.event),o.data!=null&&Object.hasOwnProperty.call(o,"data")&&k.uint32(18).bytes(o.data),o.sn!=null&&Object.hasOwnProperty.call(o,"sn")&&k.uint32(24).int64(o.sn),o.time!=null&&Object.hasOwnProperty.call(o,"time")&&k.uint32(32).int64(o.time),o.valid!=null&&Object.hasOwnProperty.call(o,"valid")&&k.uint32(40).int64(o.valid),o.code!=null&&Object.hasOwnProperty.call(o,"code")&&k.uint32(48).int32(o.code),o.desc!=null&&Object.hasOwnProperty.call(o,"desc")&&k.uint32(58).string(o.desc),o.version!=null&&Object.hasOwnProperty.call(o,"version")&&k.uint32(64).int32(o.version),o.compress!=null&&Object.hasOwnProperty.call(o,"compress")&&k.uint32(72).bool(o.compress),k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.CommonRsp;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.event=o.string();break}case 2:{F.data=o.bytes();break}case 3:{F.sn=o.int64();break}case 4:{F.time=o.int64();break}case 5:{F.valid=o.int64();break}case 6:{F.code=o.int32();break}case 7:{F.desc=o.string();break}case 8:{F.version=o.int32();break}case 9:{F.compress=o.bool();break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){return typeof o!="object"||o===null?"object expected":o.event!=null&&o.hasOwnProperty("event")&&!$util.isString(o.event)?"event: string expected":o.data!=null&&o.hasOwnProperty("data")&&!(o.data&&typeof o.data.length=="number"||$util.isString(o.data))?"data: buffer expected":o.sn!=null&&o.hasOwnProperty("sn")&&!$util.isInteger(o.sn)&&!(o.sn&&$util.isInteger(o.sn.low)&&$util.isInteger(o.sn.high))?"sn: integer|Long expected":o.time!=null&&o.hasOwnProperty("time")&&!$util.isInteger(o.time)&&!(o.time&&$util.isInteger(o.time.low)&&$util.isInteger(o.time.high))?"time: integer|Long expected":o.valid!=null&&o.hasOwnProperty("valid")&&!$util.isInteger(o.valid)&&!(o.valid&&$util.isInteger(o.valid.low)&&$util.isInteger(o.valid.high))?"valid: integer|Long expected":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":o.version!=null&&o.hasOwnProperty("version")&&!$util.isInteger(o.version)?"version: integer expected":o.compress!=null&&o.hasOwnProperty("compress")&&typeof o.compress!="boolean"?"compress: boolean expected":null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.CommonRsp)return o;let k=new $root.com.quick.voice.proto.CommonRsp;return o.event!=null&&(k.event=String(o.event)),o.data!=null&&(typeof o.data=="string"?$util.base64.decode(o.data,k.data=$util.newBuffer($util.base64.length(o.data)),0):o.data.length>=0&&(k.data=o.data)),o.sn!=null&&($util.Long?(k.sn=$util.Long.fromValue(o.sn)).unsigned=!1:typeof o.sn=="string"?k.sn=parseInt(o.sn,10):typeof o.sn=="number"?k.sn=o.sn:typeof o.sn=="object"&&(k.sn=new $util.LongBits(o.sn.low>>>0,o.sn.high>>>0).toNumber())),o.time!=null&&($util.Long?(k.time=$util.Long.fromValue(o.time)).unsigned=!1:typeof o.time=="string"?k.time=parseInt(o.time,10):typeof o.time=="number"?k.time=o.time:typeof o.time=="object"&&(k.time=new $util.LongBits(o.time.low>>>0,o.time.high>>>0).toNumber())),o.valid!=null&&($util.Long?(k.valid=$util.Long.fromValue(o.valid)).unsigned=!1:typeof o.valid=="string"?k.valid=parseInt(o.valid,10):typeof o.valid=="number"?k.valid=o.valid:typeof o.valid=="object"&&(k.valid=new $util.LongBits(o.valid.low>>>0,o.valid.high>>>0).toNumber())),o.code!=null&&(k.code=o.code|0),o.desc!=null&&(k.desc=String(o.desc)),o.version!=null&&(k.version=o.version|0),o.compress!=null&&(k.compress=!!o.compress),k},O.toObject=function(o,k){k||(k={});let N={};if(k.defaults){if(N.event="",k.bytes===String?N.data="":(N.data=[],k.bytes!==Array&&(N.data=$util.newBuffer(N.data))),$util.Long){let F=new $util.Long(0,0,!1);N.sn=k.longs===String?F.toString():k.longs===Number?F.toNumber():F}else N.sn=k.longs===String?"0":0;if($util.Long){let F=new $util.Long(0,0,!1);N.time=k.longs===String?F.toString():k.longs===Number?F.toNumber():F}else N.time=k.longs===String?"0":0;if($util.Long){let F=new $util.Long(0,0,!1);N.valid=k.longs===String?F.toString():k.longs===Number?F.toNumber():F}else N.valid=k.longs===String?"0":0;N.code=0,N.desc="",N.version=0,N.compress=!1}return o.event!=null&&o.hasOwnProperty("event")&&(N.event=o.event),o.data!=null&&o.hasOwnProperty("data")&&(N.data=k.bytes===String?$util.base64.encode(o.data,0,o.data.length):k.bytes===Array?Array.prototype.slice.call(o.data):o.data),o.sn!=null&&o.hasOwnProperty("sn")&&(typeof o.sn=="number"?N.sn=k.longs===String?String(o.sn):o.sn:N.sn=k.longs===String?$util.Long.prototype.toString.call(o.sn):k.longs===Number?new $util.LongBits(o.sn.low>>>0,o.sn.high>>>0).toNumber():o.sn),o.time!=null&&o.hasOwnProperty("time")&&(typeof o.time=="number"?N.time=k.longs===String?String(o.time):o.time:N.time=k.longs===String?$util.Long.prototype.toString.call(o.time):k.longs===Number?new $util.LongBits(o.time.low>>>0,o.time.high>>>0).toNumber():o.time),o.valid!=null&&o.hasOwnProperty("valid")&&(typeof o.valid=="number"?N.valid=k.longs===String?String(o.valid):o.valid:N.valid=k.longs===String?$util.Long.prototype.toString.call(o.valid):k.longs===Number?new $util.LongBits(o.valid.low>>>0,o.valid.high>>>0).toNumber():o.valid),o.code!=null&&o.hasOwnProperty("code")&&(N.code=o.code),o.desc!=null&&o.hasOwnProperty("desc")&&(N.desc=o.desc),o.version!=null&&o.hasOwnProperty("version")&&(N.version=o.version),o.compress!=null&&o.hasOwnProperty("compress")&&(N.compress=o.compress),N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.CommonRsp"},O}(),j.User=function(){function O(o){if(this.tracks=[],o)for(let k=Object.keys(o),N=0;N<k.length;++N)o[k[N]]!=null&&(this[k[N]]=o[k[N]])}O.prototype.id="",O.prototype.callAction=null,O.prototype.callState=null,O.prototype.joinTime=null,O.prototype.tracks=$util.emptyArray,O.prototype.permissions=null,O.prototype.isPublished=null,O.prototype.behavior=null,O.prototype.channelCache=null;let I;return Object.defineProperty(O.prototype,"_callAction",{get:$util.oneOfGetter(I=["callAction"]),set:$util.oneOfSetter(I)}),Object.defineProperty(O.prototype,"_callState",{get:$util.oneOfGetter(I=["callState"]),set:$util.oneOfSetter(I)}),Object.defineProperty(O.prototype,"_joinTime",{get:$util.oneOfGetter(I=["joinTime"]),set:$util.oneOfSetter(I)}),Object.defineProperty(O.prototype,"_permissions",{get:$util.oneOfGetter(I=["permissions"]),set:$util.oneOfSetter(I)}),Object.defineProperty(O.prototype,"_isPublished",{get:$util.oneOfGetter(I=["isPublished"]),set:$util.oneOfSetter(I)}),Object.defineProperty(O.prototype,"_behavior",{get:$util.oneOfGetter(I=["behavior"]),set:$util.oneOfSetter(I)}),Object.defineProperty(O.prototype,"_channelCache",{get:$util.oneOfGetter(I=["channelCache"]),set:$util.oneOfSetter(I)}),O.create=function(k){return new O(k)},O.encode=function(k,N){if(N||(N=$Writer.create()),k.id!=null&&Object.hasOwnProperty.call(k,"id")&&N.uint32(10).string(k.id),k.callAction!=null&&Object.hasOwnProperty.call(k,"callAction")&&N.uint32(16).int32(k.callAction),k.callState!=null&&Object.hasOwnProperty.call(k,"callState")&&N.uint32(24).int32(k.callState),k.joinTime!=null&&Object.hasOwnProperty.call(k,"joinTime")&&N.uint32(32).int64(k.joinTime),k.tracks!=null&&k.tracks.length)for(let F=0;F<k.tracks.length;++F)$root.com.quick.voice.proto.Track.encode(k.tracks[F],N.uint32(42).fork()).ldelim();return k.permissions!=null&&Object.hasOwnProperty.call(k,"permissions")&&N.uint32(48).int32(k.permissions),k.isPublished!=null&&Object.hasOwnProperty.call(k,"isPublished")&&N.uint32(56).bool(k.isPublished),k.behavior!=null&&Object.hasOwnProperty.call(k,"behavior")&&N.uint32(64).int32(k.behavior),k.channelCache!=null&&Object.hasOwnProperty.call(k,"channelCache")&&$root.com.quick.voice.proto.DataChannelCacheInfo.encode(k.channelCache,N.uint32(74).fork()).ldelim(),N},O.encodeDelimited=function(k,N){return this.encode(k,N).ldelim()},O.decode=function(k,N){k instanceof $Reader||(k=$Reader.create(k));let F=N===void 0?k.len:k.pos+N,J=new $root.com.quick.voice.proto.User;for(;k.pos<F;){let X=k.uint32();switch(X>>>3){case 1:{J.id=k.string();break}case 2:{J.callAction=k.int32();break}case 3:{J.callState=k.int32();break}case 4:{J.joinTime=k.int64();break}case 5:{J.tracks&&J.tracks.length||(J.tracks=[]),J.tracks.push($root.com.quick.voice.proto.Track.decode(k,k.uint32()));break}case 6:{J.permissions=k.int32();break}case 7:{J.isPublished=k.bool();break}case 8:{J.behavior=k.int32();break}case 9:{J.channelCache=$root.com.quick.voice.proto.DataChannelCacheInfo.decode(k,k.uint32());break}default:k.skipType(X&7);break}}return J},O.decodeDelimited=function(k){return k instanceof $Reader||(k=new $Reader(k)),this.decode(k,k.uint32())},O.verify=function(k){if(typeof k!="object"||k===null)return"object expected";if(k.id!=null&&k.hasOwnProperty("id")&&!$util.isString(k.id))return"id: string expected";if(k.callAction!=null&&k.hasOwnProperty("callAction")&&!$util.isInteger(k.callAction))return"callAction: integer expected";if(k.callState!=null&&k.hasOwnProperty("callState")&&!$util.isInteger(k.callState))return"callState: integer expected";if(k.joinTime!=null&&k.hasOwnProperty("joinTime")&&!$util.isInteger(k.joinTime)&&!(k.joinTime&&$util.isInteger(k.joinTime.low)&&$util.isInteger(k.joinTime.high)))return"joinTime: integer|Long expected";if(k.tracks!=null&&k.hasOwnProperty("tracks")){if(!Array.isArray(k.tracks))return"tracks: array expected";for(let N=0;N<k.tracks.length;++N){let F=$root.com.quick.voice.proto.Track.verify(k.tracks[N]);if(F)return"tracks."+F}}if(k.permissions!=null&&k.hasOwnProperty("permissions")&&!$util.isInteger(k.permissions))return"permissions: integer expected";if(k.isPublished!=null&&k.hasOwnProperty("isPublished")&&typeof k.isPublished!="boolean")return"isPublished: boolean expected";if(k.behavior!=null&&k.hasOwnProperty("behavior")&&!$util.isInteger(k.behavior))return"behavior: integer expected";if(k.channelCache!=null&&k.hasOwnProperty("channelCache")){let N=$root.com.quick.voice.proto.DataChannelCacheInfo.verify(k.channelCache);if(N)return"channelCache."+N}return null},O.fromObject=function(k){if(k instanceof $root.com.quick.voice.proto.User)return k;let N=new $root.com.quick.voice.proto.User;if(k.id!=null&&(N.id=String(k.id)),k.callAction!=null&&(N.callAction=k.callAction|0),k.callState!=null&&(N.callState=k.callState|0),k.joinTime!=null&&($util.Long?(N.joinTime=$util.Long.fromValue(k.joinTime)).unsigned=!1:typeof k.joinTime=="string"?N.joinTime=parseInt(k.joinTime,10):typeof k.joinTime=="number"?N.joinTime=k.joinTime:typeof k.joinTime=="object"&&(N.joinTime=new $util.LongBits(k.joinTime.low>>>0,k.joinTime.high>>>0).toNumber())),k.tracks){if(!Array.isArray(k.tracks))throw TypeError(".com.quick.voice.proto.User.tracks: array expected");N.tracks=[];for(let F=0;F<k.tracks.length;++F){if(typeof k.tracks[F]!="object")throw TypeError(".com.quick.voice.proto.User.tracks: object expected");N.tracks[F]=$root.com.quick.voice.proto.Track.fromObject(k.tracks[F])}}if(k.permissions!=null&&(N.permissions=k.permissions|0),k.isPublished!=null&&(N.isPublished=!!k.isPublished),k.behavior!=null&&(N.behavior=k.behavior|0),k.channelCache!=null){if(typeof k.channelCache!="object")throw TypeError(".com.quick.voice.proto.User.channelCache: object expected");N.channelCache=$root.com.quick.voice.proto.DataChannelCacheInfo.fromObject(k.channelCache)}return N},O.toObject=function(k,N){N||(N={});let F={};if((N.arrays||N.defaults)&&(F.tracks=[]),N.defaults&&(F.id=""),k.id!=null&&k.hasOwnProperty("id")&&(F.id=k.id),k.callAction!=null&&k.hasOwnProperty("callAction")&&(F.callAction=k.callAction,N.oneofs&&(F._callAction="callAction")),k.callState!=null&&k.hasOwnProperty("callState")&&(F.callState=k.callState,N.oneofs&&(F._callState="callState")),k.joinTime!=null&&k.hasOwnProperty("joinTime")&&(typeof k.joinTime=="number"?F.joinTime=N.longs===String?String(k.joinTime):k.joinTime:F.joinTime=N.longs===String?$util.Long.prototype.toString.call(k.joinTime):N.longs===Number?new $util.LongBits(k.joinTime.low>>>0,k.joinTime.high>>>0).toNumber():k.joinTime,N.oneofs&&(F._joinTime="joinTime")),k.tracks&&k.tracks.length){F.tracks=[];for(let J=0;J<k.tracks.length;++J)F.tracks[J]=$root.com.quick.voice.proto.Track.toObject(k.tracks[J],N)}return k.permissions!=null&&k.hasOwnProperty("permissions")&&(F.permissions=k.permissions,N.oneofs&&(F._permissions="permissions")),k.isPublished!=null&&k.hasOwnProperty("isPublished")&&(F.isPublished=k.isPublished,N.oneofs&&(F._isPublished="isPublished")),k.behavior!=null&&k.hasOwnProperty("behavior")&&(F.behavior=k.behavior,N.oneofs&&(F._behavior="behavior")),k.channelCache!=null&&k.hasOwnProperty("channelCache")&&(F.channelCache=$root.com.quick.voice.proto.DataChannelCacheInfo.toObject(k.channelCache,N),N.oneofs&&(F._channelCache="channelCache")),F},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(k){return k===void 0&&(k="type.googleapis.com"),k+"/com.quick.voice.proto.User"},O}(),j.DataChannelCacheInfo=function(){function O(I){if(this.channels=[],I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.channels=$util.emptyArray,O.create=function(o){return new O(o)},O.encode=function(o,k){if(k||(k=$Writer.create()),o.channels!=null&&o.channels.length)for(let N=0;N<o.channels.length;++N)$root.com.quick.voice.proto.DataChannel.encode(o.channels[N],k.uint32(10).fork()).ldelim();return k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.DataChannelCacheInfo;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.channels&&F.channels.length||(F.channels=[]),F.channels.push($root.com.quick.voice.proto.DataChannel.decode(o,o.uint32()));break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){if(typeof o!="object"||o===null)return"object expected";if(o.channels!=null&&o.hasOwnProperty("channels")){if(!Array.isArray(o.channels))return"channels: array expected";for(let k=0;k<o.channels.length;++k){let N=$root.com.quick.voice.proto.DataChannel.verify(o.channels[k]);if(N)return"channels."+N}}return null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.DataChannelCacheInfo)return o;let k=new $root.com.quick.voice.proto.DataChannelCacheInfo;if(o.channels){if(!Array.isArray(o.channels))throw TypeError(".com.quick.voice.proto.DataChannelCacheInfo.channels: array expected");k.channels=[];for(let N=0;N<o.channels.length;++N){if(typeof o.channels[N]!="object")throw TypeError(".com.quick.voice.proto.DataChannelCacheInfo.channels: object expected");k.channels[N]=$root.com.quick.voice.proto.DataChannel.fromObject(o.channels[N])}}return k},O.toObject=function(o,k){k||(k={});let N={};if((k.arrays||k.defaults)&&(N.channels=[]),o.channels&&o.channels.length){N.channels=[];for(let F=0;F<o.channels.length;++F)N.channels[F]=$root.com.quick.voice.proto.DataChannel.toObject(o.channels[F],k)}return N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.DataChannelCacheInfo"},O}(),j.DataChannel=function(){function O(o){if(o)for(let k=Object.keys(o),N=0;N<k.length;++N)o[k[N]]!=null&&(this[k[N]]=o[k[N]])}O.prototype.dataChannelName="",O.prototype.id=null;let I;return Object.defineProperty(O.prototype,"_id",{get:$util.oneOfGetter(I=["id"]),set:$util.oneOfSetter(I)}),O.create=function(k){return new O(k)},O.encode=function(k,N){return N||(N=$Writer.create()),k.dataChannelName!=null&&Object.hasOwnProperty.call(k,"dataChannelName")&&N.uint32(10).string(k.dataChannelName),k.id!=null&&Object.hasOwnProperty.call(k,"id")&&N.uint32(16).int32(k.id),N},O.encodeDelimited=function(k,N){return this.encode(k,N).ldelim()},O.decode=function(k,N){k instanceof $Reader||(k=$Reader.create(k));let F=N===void 0?k.len:k.pos+N,J=new $root.com.quick.voice.proto.DataChannel;for(;k.pos<F;){let X=k.uint32();switch(X>>>3){case 1:{J.dataChannelName=k.string();break}case 2:{J.id=k.int32();break}default:k.skipType(X&7);break}}return J},O.decodeDelimited=function(k){return k instanceof $Reader||(k=new $Reader(k)),this.decode(k,k.uint32())},O.verify=function(k){return typeof k!="object"||k===null?"object expected":k.dataChannelName!=null&&k.hasOwnProperty("dataChannelName")&&!$util.isString(k.dataChannelName)?"dataChannelName: string expected":k.id!=null&&k.hasOwnProperty("id")&&!$util.isInteger(k.id)?"id: integer expected":null},O.fromObject=function(k){if(k instanceof $root.com.quick.voice.proto.DataChannel)return k;let N=new $root.com.quick.voice.proto.DataChannel;return k.dataChannelName!=null&&(N.dataChannelName=String(k.dataChannelName)),k.id!=null&&(N.id=k.id|0),N},O.toObject=function(k,N){N||(N={});let F={};return N.defaults&&(F.dataChannelName=""),k.dataChannelName!=null&&k.hasOwnProperty("dataChannelName")&&(F.dataChannelName=k.dataChannelName),k.id!=null&&k.hasOwnProperty("id")&&(F.id=k.id,N.oneofs&&(F._id="id")),F},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(k){return k===void 0&&(k="type.googleapis.com"),k+"/com.quick.voice.proto.DataChannel"},O}(),j.Login=function(){function O(I){if(I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.appid="",O.prototype.userId="",O.prototype.sdkToken="",O.create=function(o){return new O(o)},O.encode=function(o,k){return k||(k=$Writer.create()),o.appid!=null&&Object.hasOwnProperty.call(o,"appid")&&k.uint32(10).string(o.appid),o.userId!=null&&Object.hasOwnProperty.call(o,"userId")&&k.uint32(18).string(o.userId),o.sdkToken!=null&&Object.hasOwnProperty.call(o,"sdkToken")&&k.uint32(26).string(o.sdkToken),k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.Login;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.appid=o.string();break}case 2:{F.userId=o.string();break}case 3:{F.sdkToken=o.string();break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){return typeof o!="object"||o===null?"object expected":o.appid!=null&&o.hasOwnProperty("appid")&&!$util.isString(o.appid)?"appid: string expected":o.userId!=null&&o.hasOwnProperty("userId")&&!$util.isString(o.userId)?"userId: string expected":o.sdkToken!=null&&o.hasOwnProperty("sdkToken")&&!$util.isString(o.sdkToken)?"sdkToken: string expected":null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.Login)return o;let k=new $root.com.quick.voice.proto.Login;return o.appid!=null&&(k.appid=String(o.appid)),o.userId!=null&&(k.userId=String(o.userId)),o.sdkToken!=null&&(k.sdkToken=String(o.sdkToken)),k},O.toObject=function(o,k){k||(k={});let N={};return k.defaults&&(N.appid="",N.userId="",N.sdkToken=""),o.appid!=null&&o.hasOwnProperty("appid")&&(N.appid=o.appid),o.userId!=null&&o.hasOwnProperty("userId")&&(N.userId=o.userId),o.sdkToken!=null&&o.hasOwnProperty("sdkToken")&&(N.sdkToken=o.sdkToken),N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.Login"},O}(),j.Track=function(){function O(o){if(o)for(let k=Object.keys(o),N=0;N<k.length;++N)o[k[N]]!=null&&(this[k[N]]=o[k[N]])}O.prototype.mid="",O.prototype.trackName=null,O.prototype.location=null,O.prototype.userId=null,O.prototype.code=null,O.prototype.desc=null,O.prototype.type=null,O.prototype.isValid=null,O.prototype.simulcast=null;let I;return Object.defineProperty(O.prototype,"_trackName",{get:$util.oneOfGetter(I=["trackName"]),set:$util.oneOfSetter(I)}),Object.defineProperty(O.prototype,"_location",{get:$util.oneOfGetter(I=["location"]),set:$util.oneOfSetter(I)}),Object.defineProperty(O.prototype,"_userId",{get:$util.oneOfGetter(I=["userId"]),set:$util.oneOfSetter(I)}),Object.defineProperty(O.prototype,"_code",{get:$util.oneOfGetter(I=["code"]),set:$util.oneOfSetter(I)}),Object.defineProperty(O.prototype,"_desc",{get:$util.oneOfGetter(I=["desc"]),set:$util.oneOfSetter(I)}),Object.defineProperty(O.prototype,"_type",{get:$util.oneOfGetter(I=["type"]),set:$util.oneOfSetter(I)}),Object.defineProperty(O.prototype,"_isValid",{get:$util.oneOfGetter(I=["isValid"]),set:$util.oneOfSetter(I)}),Object.defineProperty(O.prototype,"_simulcast",{get:$util.oneOfGetter(I=["simulcast"]),set:$util.oneOfSetter(I)}),O.create=function(k){return new O(k)},O.encode=function(k,N){return N||(N=$Writer.create()),k.mid!=null&&Object.hasOwnProperty.call(k,"mid")&&N.uint32(10).string(k.mid),k.trackName!=null&&Object.hasOwnProperty.call(k,"trackName")&&N.uint32(18).string(k.trackName),k.location!=null&&Object.hasOwnProperty.call(k,"location")&&N.uint32(26).string(k.location),k.userId!=null&&Object.hasOwnProperty.call(k,"userId")&&N.uint32(34).string(k.userId),k.code!=null&&Object.hasOwnProperty.call(k,"code")&&N.uint32(40).int32(k.code),k.desc!=null&&Object.hasOwnProperty.call(k,"desc")&&N.uint32(50).string(k.desc),k.type!=null&&Object.hasOwnProperty.call(k,"type")&&N.uint32(56).int32(k.type),k.isValid!=null&&Object.hasOwnProperty.call(k,"isValid")&&N.uint32(64).bool(k.isValid),k.simulcast!=null&&Object.hasOwnProperty.call(k,"simulcast")&&N.uint32(74).string(k.simulcast),N},O.encodeDelimited=function(k,N){return this.encode(k,N).ldelim()},O.decode=function(k,N){k instanceof $Reader||(k=$Reader.create(k));let F=N===void 0?k.len:k.pos+N,J=new $root.com.quick.voice.proto.Track;for(;k.pos<F;){let X=k.uint32();switch(X>>>3){case 1:{J.mid=k.string();break}case 2:{J.trackName=k.string();break}case 3:{J.location=k.string();break}case 4:{J.userId=k.string();break}case 5:{J.code=k.int32();break}case 6:{J.desc=k.string();break}case 7:{J.type=k.int32();break}case 8:{J.isValid=k.bool();break}case 9:{J.simulcast=k.string();break}default:k.skipType(X&7);break}}return J},O.decodeDelimited=function(k){return k instanceof $Reader||(k=new $Reader(k)),this.decode(k,k.uint32())},O.verify=function(k){if(typeof k!="object"||k===null)return"object expected";if(k.mid!=null&&k.hasOwnProperty("mid")&&!$util.isString(k.mid))return"mid: string expected";if(k.trackName!=null&&k.hasOwnProperty("trackName")&&!$util.isString(k.trackName))return"trackName: string expected";if(k.location!=null&&k.hasOwnProperty("location")&&!$util.isString(k.location))return"location: string expected";if(k.userId!=null&&k.hasOwnProperty("userId")&&!$util.isString(k.userId))return"userId: string expected";if(k.code!=null&&k.hasOwnProperty("code")&&!$util.isInteger(k.code))return"code: integer expected";if(k.desc!=null&&k.hasOwnProperty("desc")&&!$util.isString(k.desc))return"desc: string expected";if(k.type!=null&&k.hasOwnProperty("type"))switch(k.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:break}return k.isValid!=null&&k.hasOwnProperty("isValid")&&typeof k.isValid!="boolean"?"isValid: boolean expected":k.simulcast!=null&&k.hasOwnProperty("simulcast")&&!$util.isString(k.simulcast)?"simulcast: string expected":null},O.fromObject=function(k){if(k instanceof $root.com.quick.voice.proto.Track)return k;let N=new $root.com.quick.voice.proto.Track;switch(k.mid!=null&&(N.mid=String(k.mid)),k.trackName!=null&&(N.trackName=String(k.trackName)),k.location!=null&&(N.location=String(k.location)),k.userId!=null&&(N.userId=String(k.userId)),k.code!=null&&(N.code=k.code|0),k.desc!=null&&(N.desc=String(k.desc)),k.type){default:if(typeof k.type=="number"){N.type=k.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 k.isValid!=null&&(N.isValid=!!k.isValid),k.simulcast!=null&&(N.simulcast=String(k.simulcast)),N},O.toObject=function(k,N){N||(N={});let F={};return N.defaults&&(F.mid=""),k.mid!=null&&k.hasOwnProperty("mid")&&(F.mid=k.mid),k.trackName!=null&&k.hasOwnProperty("trackName")&&(F.trackName=k.trackName,N.oneofs&&(F._trackName="trackName")),k.location!=null&&k.hasOwnProperty("location")&&(F.location=k.location,N.oneofs&&(F._location="location")),k.userId!=null&&k.hasOwnProperty("userId")&&(F.userId=k.userId,N.oneofs&&(F._userId="userId")),k.code!=null&&k.hasOwnProperty("code")&&(F.code=k.code,N.oneofs&&(F._code="code")),k.desc!=null&&k.hasOwnProperty("desc")&&(F.desc=k.desc,N.oneofs&&(F._desc="desc")),k.type!=null&&k.hasOwnProperty("type")&&(F.type=N.enums===String?$root.com.quick.voice.proto.TrackType[k.type]===void 0?k.type:$root.com.quick.voice.proto.TrackType[k.type]:k.type,N.oneofs&&(F._type="type")),k.isValid!=null&&k.hasOwnProperty("isValid")&&(F.isValid=k.isValid,N.oneofs&&(F._isValid="isValid")),k.simulcast!=null&&k.hasOwnProperty("simulcast")&&(F.simulcast=k.simulcast,N.oneofs&&(F._simulcast="simulcast")),F},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(k){return k===void 0&&(k="type.googleapis.com"),k+"/com.quick.voice.proto.Track"},O}(),j.JoinReq=function(){function O(o){if(o)for(let k=Object.keys(o),N=0;N<k.length;++N)o[k[N]]!=null&&(this[k[N]]=o[k[N]])}O.prototype.roomId="",O.prototype.user=null,O.prototype.callType=0,O.prototype.token=null;let I;return Object.defineProperty(O.prototype,"_token",{get:$util.oneOfGetter(I=["token"]),set:$util.oneOfSetter(I)}),O.create=function(k){return new O(k)},O.encode=function(k,N){return N||(N=$Writer.create()),k.roomId!=null&&Object.hasOwnProperty.call(k,"roomId")&&N.uint32(10).string(k.roomId),k.user!=null&&Object.hasOwnProperty.call(k,"user")&&$root.com.quick.voice.proto.User.encode(k.user,N.uint32(18).fork()).ldelim(),k.callType!=null&&Object.hasOwnProperty.call(k,"callType")&&N.uint32(24).int32(k.callType),k.token!=null&&Object.hasOwnProperty.call(k,"token")&&N.uint32(34).string(k.token),N},O.encodeDelimited=function(k,N){return this.encode(k,N).ldelim()},O.decode=function(k,N){k instanceof $Reader||(k=$Reader.create(k));let F=N===void 0?k.len:k.pos+N,J=new $root.com.quick.voice.proto.JoinReq;for(;k.pos<F;){let X=k.uint32();switch(X>>>3){case 1:{J.roomId=k.string();break}case 2:{J.user=$root.com.quick.voice.proto.User.decode(k,k.uint32());break}case 3:{J.callType=k.int32();break}case 4:{J.token=k.string();break}default:k.skipType(X&7);break}}return J},O.decodeDelimited=function(k){return k instanceof $Reader||(k=new $Reader(k)),this.decode(k,k.uint32())},O.verify=function(k){if(typeof k!="object"||k===null)return"object expected";if(k.roomId!=null&&k.hasOwnProperty("roomId")&&!$util.isString(k.roomId))return"roomId: string expected";if(k.user!=null&&k.hasOwnProperty("user")){let N=$root.com.quick.voice.proto.User.verify(k.user);if(N)return"user."+N}if(k.callType!=null&&k.hasOwnProperty("callType"))switch(k.callType){default:return"callType: enum value expected";case 0:case 1:case 2:break}return k.token!=null&&k.hasOwnProperty("token")&&!$util.isString(k.token)?"token: string expected":null},O.fromObject=function(k){if(k instanceof $root.com.quick.voice.proto.JoinReq)return k;let N=new $root.com.quick.voice.proto.JoinReq;if(k.roomId!=null&&(N.roomId=String(k.roomId)),k.user!=null){if(typeof k.user!="object")throw TypeError(".com.quick.voice.proto.JoinReq.user: object expected");N.user=$root.com.quick.voice.proto.User.fromObject(k.user)}switch(k.callType){default:if(typeof k.callType=="number"){N.callType=k.callType;break}break;case"Normal":case 0:N.callType=0;break;case"Meeting":case 1:N.callType=1;break;case"Live":case 2:N.callType=2;break}return k.token!=null&&(N.token=String(k.token)),N},O.toObject=function(k,N){N||(N={});let F={};return N.defaults&&(F.roomId="",F.user=null,F.callType=N.enums===String?"Normal":0),k.roomId!=null&&k.hasOwnProperty("roomId")&&(F.roomId=k.roomId),k.user!=null&&k.hasOwnProperty("user")&&(F.user=$root.com.quick.voice.proto.User.toObject(k.user,N)),k.callType!=null&&k.hasOwnProperty("callType")&&(F.callType=N.enums===String?$root.com.quick.voice.proto.CallType[k.callType]===void 0?k.callType:$root.com.quick.voice.proto.CallType[k.callType]:k.callType),k.token!=null&&k.hasOwnProperty("token")&&(F.token=k.token,N.oneofs&&(F._token="token")),F},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(k){return k===void 0&&(k="type.googleapis.com"),k+"/com.quick.voice.proto.JoinReq"},O}(),j.JoinRsp=function(){function O(I){if(this.roomUsers=[],I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.roomId="",O.prototype.roomUsers=$util.emptyArray,O.prototype.callType=0,O.create=function(o){return new O(o)},O.encode=function(o,k){if(k||(k=$Writer.create()),o.roomId!=null&&Object.hasOwnProperty.call(o,"roomId")&&k.uint32(10).string(o.roomId),o.roomUsers!=null&&o.roomUsers.length)for(let N=0;N<o.roomUsers.length;++N)$root.com.quick.voice.proto.User.encode(o.roomUsers[N],k.uint32(18).fork()).ldelim();return o.callType!=null&&Object.hasOwnProperty.call(o,"callType")&&k.uint32(24).int32(o.callType),k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.JoinRsp;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.roomId=o.string();break}case 2:{F.roomUsers&&F.roomUsers.length||(F.roomUsers=[]),F.roomUsers.push($root.com.quick.voice.proto.User.decode(o,o.uint32()));break}case 3:{F.callType=o.int32();break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.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.roomUsers!=null&&o.hasOwnProperty("roomUsers")){if(!Array.isArray(o.roomUsers))return"roomUsers: array expected";for(let k=0;k<o.roomUsers.length;++k){let N=$root.com.quick.voice.proto.User.verify(o.roomUsers[k]);if(N)return"roomUsers."+N}}if(o.callType!=null&&o.hasOwnProperty("callType"))switch(o.callType){default:return"callType: enum value expected";case 0:case 1:case 2:break}return null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.JoinRsp)return o;let k=new $root.com.quick.voice.proto.JoinRsp;if(o.roomId!=null&&(k.roomId=String(o.roomId)),o.roomUsers){if(!Array.isArray(o.roomUsers))throw TypeError(".com.quick.voice.proto.JoinRsp.roomUsers: array expected");k.roomUsers=[];for(let N=0;N<o.roomUsers.length;++N){if(typeof o.roomUsers[N]!="object")throw TypeError(".com.quick.voice.proto.JoinRsp.roomUsers: object expected");k.roomUsers[N]=$root.com.quick.voice.proto.User.fromObject(o.roomUsers[N])}}switch(o.callType){default:if(typeof o.callType=="number"){k.callType=o.callType;break}break;case"Normal":case 0:k.callType=0;break;case"Meeting":case 1:k.callType=1;break;case"Live":case 2:k.callType=2;break}return k},O.toObject=function(o,k){k||(k={});let N={};if((k.arrays||k.defaults)&&(N.roomUsers=[]),k.defaults&&(N.roomId="",N.callType=k.enums===String?"Normal":0),o.roomId!=null&&o.hasOwnProperty("roomId")&&(N.roomId=o.roomId),o.roomUsers&&o.roomUsers.length){N.roomUsers=[];for(let F=0;F<o.roomUsers.length;++F)N.roomUsers[F]=$root.com.quick.voice.proto.User.toObject(o.roomUsers[F],k)}return o.callType!=null&&o.hasOwnProperty("callType")&&(N.callType=k.enums===String?$root.com.quick.voice.proto.CallType[o.callType]===void 0?o.callType:$root.com.quick.voice.proto.CallType[o.callType]:o.callType),N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.JoinRsp"},O}(),j.JoinNotify=function(){function O(I){if(I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.roomId="",O.prototype.user=null,O.create=function(o){return new O(o)},O.encode=function(o,k){return k||(k=$Writer.create()),o.roomId!=null&&Object.hasOwnProperty.call(o,"roomId")&&k.uint32(10).string(o.roomId),o.user!=null&&Object.hasOwnProperty.call(o,"user")&&$root.com.quick.voice.proto.User.encode(o.user,k.uint32(18).fork()).ldelim(),k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.JoinNotify;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.roomId=o.string();break}case 2:{F.user=$root.com.quick.voice.proto.User.decode(o,o.uint32());break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.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 k=$root.com.quick.voice.proto.User.verify(o.user);if(k)return"user."+k}return null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.JoinNotify)return o;let k=new $root.com.quick.voice.proto.JoinNotify;if(o.roomId!=null&&(k.roomId=String(o.roomId)),o.user!=null){if(typeof o.user!="object")throw TypeError(".com.quick.voice.proto.JoinNotify.user: object expected");k.user=$root.com.quick.voice.proto.User.fromObject(o.user)}return k},O.toObject=function(o,k){k||(k={});let N={};return k.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,k)),N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.JoinNotify"},O}(),j.ConnectCFReq=function(){function O(I){if(I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.sdp="",O.create=function(o){return new O(o)},O.encode=function(o,k){return k||(k=$Writer.create()),o.sdp!=null&&Object.hasOwnProperty.call(o,"sdp")&&k.uint32(10).string(o.sdp),k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.ConnectCFReq;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.sdp=o.string();break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){return typeof o!="object"||o===null?"object expected":o.sdp!=null&&o.hasOwnProperty("sdp")&&!$util.isString(o.sdp)?"sdp: string expected":null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.ConnectCFReq)return o;let k=new $root.com.quick.voice.proto.ConnectCFReq;return o.sdp!=null&&(k.sdp=String(o.sdp)),k},O.toObject=function(o,k){k||(k={});let N={};return k.defaults&&(N.sdp=""),o.sdp!=null&&o.hasOwnProperty("sdp")&&(N.sdp=o.sdp),N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.ConnectCFReq"},O}(),j.ConnectCFRsp=function(){function O(I){if(this.subscribeUsers=[],I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.remoteSdp="",O.prototype.subscribeUsers=$util.emptyArray,O.create=function(o){return new O(o)},O.encode=function(o,k){if(k||(k=$Writer.create()),o.remoteSdp!=null&&Object.hasOwnProperty.call(o,"remoteSdp")&&k.uint32(10).string(o.remoteSdp),o.subscribeUsers!=null&&o.subscribeUsers.length)for(let N=0;N<o.subscribeUsers.length;++N)$root.com.quick.voice.proto.User.encode(o.subscribeUsers[N],k.uint32(18).fork()).ldelim();return k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.ConnectCFRsp;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.remoteSdp=o.string();break}case 2:{F.subscribeUsers&&F.subscribeUsers.length||(F.subscribeUsers=[]),F.subscribeUsers.push($root.com.quick.voice.proto.User.decode(o,o.uint32()));break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){if(typeof o!="object"||o===null)return"object expected";if(o.remoteSdp!=null&&o.hasOwnProperty("remoteSdp")&&!$util.isString(o.remoteSdp))return"remoteSdp: string expected";if(o.subscribeUsers!=null&&o.hasOwnProperty("subscribeUsers")){if(!Array.isArray(o.subscribeUsers))return"subscribeUsers: array expected";for(let k=0;k<o.subscribeUsers.length;++k){let N=$root.com.quick.voice.proto.User.verify(o.subscribeUsers[k]);if(N)return"subscribeUsers."+N}}return null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.ConnectCFRsp)return o;let k=new $root.com.quick.voice.proto.ConnectCFRsp;if(o.remoteSdp!=null&&(k.remoteSdp=String(o.remoteSdp)),o.subscribeUsers){if(!Array.isArray(o.subscribeUsers))throw TypeError(".com.quick.voice.proto.ConnectCFRsp.subscribeUsers: array expected");k.subscribeUsers=[];for(let N=0;N<o.subscribeUsers.length;++N){if(typeof o.subscribeUsers[N]!="object")throw TypeError(".com.quick.voice.proto.ConnectCFRsp.subscribeUsers: object expected");k.subscribeUsers[N]=$root.com.quick.voice.proto.User.fromObject(o.subscribeUsers[N])}}return k},O.toObject=function(o,k){k||(k={});let N={};if((k.arrays||k.defaults)&&(N.subscribeUsers=[]),k.defaults&&(N.remoteSdp=""),o.remoteSdp!=null&&o.hasOwnProperty("remoteSdp")&&(N.remoteSdp=o.remoteSdp),o.subscribeUsers&&o.subscribeUsers.length){N.subscribeUsers=[];for(let F=0;F<o.subscribeUsers.length;++F)N.subscribeUsers[F]=$root.com.quick.voice.proto.User.toObject(o.subscribeUsers[F],k)}return N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.ConnectCFRsp"},O}(),j.PublishReq=function(){function O(o){if(this.tracks=[],o)for(let k=Object.keys(o),N=0;N<k.length;++N)o[k[N]]!=null&&(this[k[N]]=o[k[N]])}O.prototype.sdp="",O.prototype.tracks=$util.emptyArray,O.prototype.callAction=0,O.prototype.recreate=null;let I;return Object.defineProperty(O.prototype,"_recreate",{get:$util.oneOfGetter(I=["recreate"]),set:$util.oneOfSetter(I)}),O.create=function(k){return new O(k)},O.encode=function(k,N){if(N||(N=$Writer.create()),k.sdp!=null&&Object.hasOwnProperty.call(k,"sdp")&&N.uint32(10).string(k.sdp),k.tracks!=null&&k.tracks.length)for(let F=0;F<k.tracks.length;++F)$root.com.quick.voice.proto.Track.encode(k.tracks[F],N.uint32(18).fork()).ldelim();return k.callAction!=null&&Object.hasOwnProperty.call(k,"callAction")&&N.uint32(24).int32(k.callAction),k.recreate!=null&&Object.hasOwnProperty.call(k,"recreate")&&N.uint32(32).bool(k.recreate),N},O.encodeDelimited=function(k,N){return this.encode(k,N).ldelim()},O.decode=function(k,N){k instanceof $Reader||(k=$Reader.create(k));let F=N===void 0?k.len:k.pos+N,J=new $root.com.quick.voice.proto.PublishReq;for(;k.pos<F;){let X=k.uint32();switch(X>>>3){case 1:{J.sdp=k.string();break}case 2:{J.tracks&&J.tracks.length||(J.tracks=[]),J.tracks.push($root.com.quick.voice.proto.Track.decode(k,k.uint32()));break}case 3:{J.callAction=k.int32();break}case 4:{J.recreate=k.bool();break}default:k.skipType(X&7);break}}return J},O.decodeDelimited=function(k){return k instanceof $Reader||(k=new $Reader(k)),this.decode(k,k.uint32())},O.verify=function(k){if(typeof k!="object"||k===null)return"object expected";if(k.sdp!=null&&k.hasOwnProperty("sdp")&&!$util.isString(k.sdp))return"sdp: string expected";if(k.tracks!=null&&k.hasOwnProperty("tracks")){if(!Array.isArray(k.tracks))return"tracks: array expected";for(let N=0;N<k.tracks.length;++N){let F=$root.com.quick.voice.proto.Track.verify(k.tracks[N]);if(F)return"tracks."+F}}return k.callAction!=null&&k.hasOwnProperty("callAction")&&!$util.isInteger(k.callAction)?"callAction: integer expected":k.recreate!=null&&k.hasOwnProperty("recreate")&&typeof k.recreate!="boolean"?"recreate: boolean expected":null},O.fromObject=function(k){if(k instanceof $root.com.quick.voice.proto.PublishReq)return k;let N=new $root.com.quick.voice.proto.PublishReq;if(k.sdp!=null&&(N.sdp=String(k.sdp)),k.tracks){if(!Array.isArray(k.tracks))throw TypeError(".com.quick.voice.proto.PublishReq.tracks: array expected");N.tracks=[];for(let F=0;F<k.tracks.length;++F){if(typeof k.tracks[F]!="object")throw TypeError(".com.quick.voice.proto.PublishReq.tracks: object expected");N.tracks[F]=$root.com.quick.voice.proto.Track.fromObject(k.tracks[F])}}return k.callAction!=null&&(N.callAction=k.callAction|0),k.recreate!=null&&(N.recreate=!!k.recreate),N},O.toObject=function(k,N){N||(N={});let F={};if((N.arrays||N.defaults)&&(F.tracks=[]),N.defaults&&(F.sdp="",F.callAction=0),k.sdp!=null&&k.hasOwnProperty("sdp")&&(F.sdp=k.sdp),k.tracks&&k.tracks.length){F.tracks=[];for(let J=0;J<k.tracks.length;++J)F.tracks[J]=$root.com.quick.voice.proto.Track.toObject(k.tracks[J],N)}return k.callAction!=null&&k.hasOwnProperty("callAction")&&(F.callAction=k.callAction),k.recreate!=null&&k.hasOwnProperty("recreate")&&(F.recreate=k.recreate,N.oneofs&&(F._recreate="recreate")),F},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(k){return k===void 0&&(k="type.googleapis.com"),k+"/com.quick.voice.proto.PublishReq"},O}(),j.PublishRsp=function(){function O(I){if(I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.remoteSdp="",O.create=function(o){return new O(o)},O.encode=function(o,k){return k||(k=$Writer.create()),o.remoteSdp!=null&&Object.hasOwnProperty.call(o,"remoteSdp")&&k.uint32(10).string(o.remoteSdp),k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.PublishRsp;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.remoteSdp=o.string();break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){return typeof o!="object"||o===null?"object expected":o.remoteSdp!=null&&o.hasOwnProperty("remoteSdp")&&!$util.isString(o.remoteSdp)?"remoteSdp: string expected":null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.PublishRsp)return o;let k=new $root.com.quick.voice.proto.PublishRsp;return o.remoteSdp!=null&&(k.remoteSdp=String(o.remoteSdp)),k},O.toObject=function(o,k){k||(k={});let N={};return k.defaults&&(N.remoteSdp=""),o.remoteSdp!=null&&o.hasOwnProperty("remoteSdp")&&(N.remoteSdp=o.remoteSdp),N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.PublishRsp"},O}(),j.PublishNotify=function(){function O(I){if(I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.roomId="",O.prototype.user=null,O.create=function(o){return new O(o)},O.encode=function(o,k){return k||(k=$Writer.create()),o.roomId!=null&&Object.hasOwnProperty.call(o,"roomId")&&k.uint32(10).string(o.roomId),o.user!=null&&Object.hasOwnProperty.call(o,"user")&&$root.com.quick.voice.proto.User.encode(o.user,k.uint32(18).fork()).ldelim(),k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.PublishNotify;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.roomId=o.string();break}case 2:{F.user=$root.com.quick.voice.proto.User.decode(o,o.uint32());break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.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 k=$root.com.quick.voice.proto.User.verify(o.user);if(k)return"user."+k}return null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.PublishNotify)return o;let k=new $root.com.quick.voice.proto.PublishNotify;if(o.roomId!=null&&(k.roomId=String(o.roomId)),o.user!=null){if(typeof o.user!="object")throw TypeError(".com.quick.voice.proto.PublishNotify.user: object expected");k.user=$root.com.quick.voice.proto.User.fromObject(o.user)}return k},O.toObject=function(o,k){k||(k={});let N={};return k.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,k)),N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.PublishNotify"},O}(),j.SubscribeReq=function(){function O(I){if(this.users=[],I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.users=$util.emptyArray,O.create=function(o){return new O(o)},O.encode=function(o,k){if(k||(k=$Writer.create()),o.users!=null&&o.users.length)for(let N=0;N<o.users.length;++N)$root.com.quick.voice.proto.User.encode(o.users[N],k.uint32(10).fork()).ldelim();return k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.SubscribeReq;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.users&&F.users.length||(F.users=[]),F.users.push($root.com.quick.voice.proto.User.decode(o,o.uint32()));break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){if(typeof o!="object"||o===null)return"object expected";if(o.users!=null&&o.hasOwnProperty("users")){if(!Array.isArray(o.users))return"users: array expected";for(let k=0;k<o.users.length;++k){let N=$root.com.quick.voice.proto.User.verify(o.users[k]);if(N)return"users."+N}}return null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.SubscribeReq)return o;let k=new $root.com.quick.voice.proto.SubscribeReq;if(o.users){if(!Array.isArray(o.users))throw TypeError(".com.quick.voice.proto.SubscribeReq.users: array expected");k.users=[];for(let N=0;N<o.users.length;++N){if(typeof o.users[N]!="object")throw TypeError(".com.quick.voice.proto.SubscribeReq.users: object expected");k.users[N]=$root.com.quick.voice.proto.User.fromObject(o.users[N])}}return k},O.toObject=function(o,k){k||(k={});let N={};if((k.arrays||k.defaults)&&(N.users=[]),o.users&&o.users.length){N.users=[];for(let F=0;F<o.users.length;++F)N.users[F]=$root.com.quick.voice.proto.User.toObject(o.users[F],k)}return N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.SubscribeReq"},O}(),j.SubscribeRsp=function(){function O(I){if(this.users=[],I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.remoteSdp="",O.prototype.users=$util.emptyArray,O.create=function(o){return new O(o)},O.encode=function(o,k){if(k||(k=$Writer.create()),o.remoteSdp!=null&&Object.hasOwnProperty.call(o,"remoteSdp")&&k.uint32(10).string(o.remoteSdp),o.users!=null&&o.users.length)for(let N=0;N<o.users.length;++N)$root.com.quick.voice.proto.User.encode(o.users[N],k.uint32(18).fork()).ldelim();return k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.SubscribeRsp;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.remoteSdp=o.string();break}case 2:{F.users&&F.users.length||(F.users=[]),F.users.push($root.com.quick.voice.proto.User.decode(o,o.uint32()));break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){if(typeof o!="object"||o===null)return"object expected";if(o.remoteSdp!=null&&o.hasOwnProperty("remoteSdp")&&!$util.isString(o.remoteSdp))return"remoteSdp: string expected";if(o.users!=null&&o.hasOwnProperty("users")){if(!Array.isArray(o.users))return"users: array expected";for(let k=0;k<o.users.length;++k){let N=$root.com.quick.voice.proto.User.verify(o.users[k]);if(N)return"users."+N}}return null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.SubscribeRsp)return o;let k=new $root.com.quick.voice.proto.SubscribeRsp;if(o.remoteSdp!=null&&(k.remoteSdp=String(o.remoteSdp)),o.users){if(!Array.isArray(o.users))throw TypeError(".com.quick.voice.proto.SubscribeRsp.users: array expected");k.users=[];for(let N=0;N<o.users.length;++N){if(typeof o.users[N]!="object")throw TypeError(".com.quick.voice.proto.SubscribeRsp.users: object expected");k.users[N]=$root.com.quick.voice.proto.User.fromObject(o.users[N])}}return k},O.toObject=function(o,k){k||(k={});let N={};if((k.arrays||k.defaults)&&(N.users=[]),k.defaults&&(N.remoteSdp=""),o.remoteSdp!=null&&o.hasOwnProperty("remoteSdp")&&(N.remoteSdp=o.remoteSdp),o.users&&o.users.length){N.users=[];for(let F=0;F<o.users.length;++F)N.users[F]=$root.com.quick.voice.proto.User.toObject(o.users[F],k)}return N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.SubscribeRsp"},O}(),j.RenegotiateReq=function(){function O(I){if(I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.userId="",O.prototype.sdp="",O.create=function(o){return new O(o)},O.encode=function(o,k){return k||(k=$Writer.create()),o.userId!=null&&Object.hasOwnProperty.call(o,"userId")&&k.uint32(10).string(o.userId),o.sdp!=null&&Object.hasOwnProperty.call(o,"sdp")&&k.uint32(18).string(o.sdp),k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.RenegotiateReq;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.userId=o.string();break}case 2:{F.sdp=o.string();break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){return typeof o!="object"||o===null?"object expected":o.userId!=null&&o.hasOwnProperty("userId")&&!$util.isString(o.userId)?"userId: string expected":o.sdp!=null&&o.hasOwnProperty("sdp")&&!$util.isString(o.sdp)?"sdp: string expected":null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.RenegotiateReq)return o;let k=new $root.com.quick.voice.proto.RenegotiateReq;return o.userId!=null&&(k.userId=String(o.userId)),o.sdp!=null&&(k.sdp=String(o.sdp)),k},O.toObject=function(o,k){k||(k={});let N={};return k.defaults&&(N.userId="",N.sdp=""),o.userId!=null&&o.hasOwnProperty("userId")&&(N.userId=o.userId),o.sdp!=null&&o.hasOwnProperty("sdp")&&(N.sdp=o.sdp),N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.RenegotiateReq"},O}(),j.QuitReq=function(){function O(I){if(I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.userId="",O.prototype.roomId="",O.create=function(o){return new O(o)},O.encode=function(o,k){return k||(k=$Writer.create()),o.userId!=null&&Object.hasOwnProperty.call(o,"userId")&&k.uint32(10).string(o.userId),o.roomId!=null&&Object.hasOwnProperty.call(o,"roomId")&&k.uint32(18).string(o.roomId),k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.QuitReq;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.userId=o.string();break}case 2:{F.roomId=o.string();break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){return typeof o!="object"||o===null?"object expected":o.userId!=null&&o.hasOwnProperty("userId")&&!$util.isString(o.userId)?"userId: string expected":o.roomId!=null&&o.hasOwnProperty("roomId")&&!$util.isString(o.roomId)?"roomId: string expected":null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.QuitReq)return o;let k=new $root.com.quick.voice.proto.QuitReq;return o.userId!=null&&(k.userId=String(o.userId)),o.roomId!=null&&(k.roomId=String(o.roomId)),k},O.toObject=function(o,k){k||(k={});let N={};return k.defaults&&(N.userId="",N.roomId=""),o.userId!=null&&o.hasOwnProperty("userId")&&(N.userId=o.userId),o.roomId!=null&&o.hasOwnProperty("roomId")&&(N.roomId=o.roomId),N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.QuitReq"},O}(),j.QuitNotify=function(){function O(o){if(o)for(let k=Object.keys(o),N=0;N<k.length;++N)o[k[N]]!=null&&(this[k[N]]=o[k[N]])}O.prototype.roomId="",O.prototype.user=null,O.prototype.code=null,O.prototype.desc=null;let I;return Object.defineProperty(O.prototype,"_code",{get:$util.oneOfGetter(I=["code"]),set:$util.oneOfSetter(I)}),Object.defineProperty(O.prototype,"_desc",{get:$util.oneOfGetter(I=["desc"]),set:$util.oneOfSetter(I)}),O.create=function(k){return new O(k)},O.encode=function(k,N){return N||(N=$Writer.create()),k.roomId!=null&&Object.hasOwnProperty.call(k,"roomId")&&N.uint32(10).string(k.roomId),k.user!=null&&Object.hasOwnProperty.call(k,"user")&&$root.com.quick.voice.proto.User.encode(k.user,N.uint32(18).fork()).ldelim(),k.code!=null&&Object.hasOwnProperty.call(k,"code")&&N.uint32(24).int32(k.code),k.desc!=null&&Object.hasOwnProperty.call(k,"desc")&&N.uint32(34).string(k.desc),N},O.encodeDelimited=function(k,N){return this.encode(k,N).ldelim()},O.decode=function(k,N){k instanceof $Reader||(k=$Reader.create(k));let F=N===void 0?k.len:k.pos+N,J=new $root.com.quick.voice.proto.QuitNotify;for(;k.pos<F;){let X=k.uint32();switch(X>>>3){case 1:{J.roomId=k.string();break}case 2:{J.user=$root.com.quick.voice.proto.User.decode(k,k.uint32());break}case 3:{J.code=k.int32();break}case 4:{J.desc=k.string();break}default:k.skipType(X&7);break}}return J},O.decodeDelimited=function(k){return k instanceof $Reader||(k=new $Reader(k)),this.decode(k,k.uint32())},O.verify=function(k){if(typeof k!="object"||k===null)return"object expected";if(k.roomId!=null&&k.hasOwnProperty("roomId")&&!$util.isString(k.roomId))return"roomId: string expected";if(k.user!=null&&k.hasOwnProperty("user")){let N=$root.com.quick.voice.proto.User.verify(k.user);if(N)return"user."+N}return k.code!=null&&k.hasOwnProperty("code")&&!$util.isInteger(k.code)?"code: integer expected":k.desc!=null&&k.hasOwnProperty("desc")&&!$util.isString(k.desc)?"desc: string expected":null},O.fromObject=function(k){if(k instanceof $root.com.quick.voice.proto.QuitNotify)return k;let N=new $root.com.quick.voice.proto.QuitNotify;if(k.roomId!=null&&(N.roomId=String(k.roomId)),k.user!=null){if(typeof k.user!="object")throw TypeError(".com.quick.voice.proto.QuitNotify.user: object expected");N.user=$root.com.quick.voice.proto.User.fromObject(k.user)}return k.code!=null&&(N.code=k.code|0),k.desc!=null&&(N.desc=String(k.desc)),N},O.toObject=function(k,N){N||(N={});let F={};return N.defaults&&(F.roomId="",F.user=null),k.roomId!=null&&k.hasOwnProperty("roomId")&&(F.roomId=k.roomId),k.user!=null&&k.hasOwnProperty("user")&&(F.user=$root.com.quick.voice.proto.User.toObject(k.user,N)),k.code!=null&&k.hasOwnProperty("code")&&(F.code=k.code,N.oneofs&&(F._code="code")),k.desc!=null&&k.hasOwnProperty("desc")&&(F.desc=k.desc,N.oneofs&&(F._desc="desc")),F},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(k){return k===void 0&&(k="type.googleapis.com"),k+"/com.quick.voice.proto.QuitNotify"},O}(),j.TokenExpireNotify=function(){function O(I){if(I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.roomId="",O.create=function(o){return new O(o)},O.encode=function(o,k){return k||(k=$Writer.create()),o.roomId!=null&&Object.hasOwnProperty.call(o,"roomId")&&k.uint32(10).string(o.roomId),k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.TokenExpireNotify;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.roomId=o.string();break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){return typeof o!="object"||o===null?"object expected":o.roomId!=null&&o.hasOwnProperty("roomId")&&!$util.isString(o.roomId)?"roomId: string expected":null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.TokenExpireNotify)return o;let k=new $root.com.quick.voice.proto.TokenExpireNotify;return o.roomId!=null&&(k.roomId=String(o.roomId)),k},O.toObject=function(o,k){k||(k={});let N={};return k.defaults&&(N.roomId=""),o.roomId!=null&&o.hasOwnProperty("roomId")&&(N.roomId=o.roomId),N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.TokenExpireNotify"},O}(),j.UpdateTokenReq=function(){function O(I){if(I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.roomId="",O.prototype.sdkToken="",O.create=function(o){return new O(o)},O.encode=function(o,k){return k||(k=$Writer.create()),o.roomId!=null&&Object.hasOwnProperty.call(o,"roomId")&&k.uint32(10).string(o.roomId),o.sdkToken!=null&&Object.hasOwnProperty.call(o,"sdkToken")&&k.uint32(18).string(o.sdkToken),k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.UpdateTokenReq;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.roomId=o.string();break}case 2:{F.sdkToken=o.string();break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){return typeof o!="object"||o===null?"object expected":o.roomId!=null&&o.hasOwnProperty("roomId")&&!$util.isString(o.roomId)?"roomId: string expected":o.sdkToken!=null&&o.hasOwnProperty("sdkToken")&&!$util.isString(o.sdkToken)?"sdkToken: string expected":null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.UpdateTokenReq)return o;let k=new $root.com.quick.voice.proto.UpdateTokenReq;return o.roomId!=null&&(k.roomId=String(o.roomId)),o.sdkToken!=null&&(k.sdkToken=String(o.sdkToken)),k},O.toObject=function(o,k){k||(k={});let N={};return k.defaults&&(N.roomId="",N.sdkToken=""),o.roomId!=null&&o.hasOwnProperty("roomId")&&(N.roomId=o.roomId),o.sdkToken!=null&&o.hasOwnProperty("sdkToken")&&(N.sdkToken=o.sdkToken),N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.UpdateTokenReq"},O}(),j.NetQualityChange=function(){function O(I){if(I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.userId="",O.prototype.roomId="",O.prototype.egress=0,O.prototype.ingress=0,O.create=function(o){return new O(o)},O.encode=function(o,k){return k||(k=$Writer.create()),o.userId!=null&&Object.hasOwnProperty.call(o,"userId")&&k.uint32(10).string(o.userId),o.roomId!=null&&Object.hasOwnProperty.call(o,"roomId")&&k.uint32(18).string(o.roomId),o.egress!=null&&Object.hasOwnProperty.call(o,"egress")&&k.uint32(24).int32(o.egress),o.ingress!=null&&Object.hasOwnProperty.call(o,"ingress")&&k.uint32(32).int32(o.ingress),k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.NetQualityChange;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.userId=o.string();break}case 2:{F.roomId=o.string();break}case 3:{F.egress=o.int32();break}case 4:{F.ingress=o.int32();break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){return typeof o!="object"||o===null?"object expected":o.userId!=null&&o.hasOwnProperty("userId")&&!$util.isString(o.userId)?"userId: string expected":o.roomId!=null&&o.hasOwnProperty("roomId")&&!$util.isString(o.roomId)?"roomId: string expected":o.egress!=null&&o.hasOwnProperty("egress")&&!$util.isInteger(o.egress)?"egress: integer expected":o.ingress!=null&&o.hasOwnProperty("ingress")&&!$util.isInteger(o.ingress)?"ingress: integer expected":null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.NetQualityChange)return o;let k=new $root.com.quick.voice.proto.NetQualityChange;return o.userId!=null&&(k.userId=String(o.userId)),o.roomId!=null&&(k.roomId=String(o.roomId)),o.egress!=null&&(k.egress=o.egress|0),o.ingress!=null&&(k.ingress=o.ingress|0),k},O.toObject=function(o,k){k||(k={});let N={};return k.defaults&&(N.userId="",N.roomId="",N.egress=0,N.ingress=0),o.userId!=null&&o.hasOwnProperty("userId")&&(N.userId=o.userId),o.roomId!=null&&o.hasOwnProperty("roomId")&&(N.roomId=o.roomId),o.egress!=null&&o.hasOwnProperty("egress")&&(N.egress=o.egress),o.ingress!=null&&o.hasOwnProperty("ingress")&&(N.ingress=o.ingress),N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.NetQualityChange"},O}(),j.NetQualityNotify=function(){function O(I){if(this.qualities=[],I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.qualities=$util.emptyArray,O.create=function(o){return new O(o)},O.encode=function(o,k){if(k||(k=$Writer.create()),o.qualities!=null&&o.qualities.length)for(let N=0;N<o.qualities.length;++N)$root.com.quick.voice.proto.NetQualityChange.encode(o.qualities[N],k.uint32(10).fork()).ldelim();return k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.NetQualityNotify;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.qualities&&F.qualities.length||(F.qualities=[]),F.qualities.push($root.com.quick.voice.proto.NetQualityChange.decode(o,o.uint32()));break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){if(typeof o!="object"||o===null)return"object expected";if(o.qualities!=null&&o.hasOwnProperty("qualities")){if(!Array.isArray(o.qualities))return"qualities: array expected";for(let k=0;k<o.qualities.length;++k){let N=$root.com.quick.voice.proto.NetQualityChange.verify(o.qualities[k]);if(N)return"qualities."+N}}return null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.NetQualityNotify)return o;let k=new $root.com.quick.voice.proto.NetQualityNotify;if(o.qualities){if(!Array.isArray(o.qualities))throw TypeError(".com.quick.voice.proto.NetQualityNotify.qualities: array expected");k.qualities=[];for(let N=0;N<o.qualities.length;++N){if(typeof o.qualities[N]!="object")throw TypeError(".com.quick.voice.proto.NetQualityNotify.qualities: object expected");k.qualities[N]=$root.com.quick.voice.proto.NetQualityChange.fromObject(o.qualities[N])}}return k},O.toObject=function(o,k){k||(k={});let N={};if((k.arrays||k.defaults)&&(N.qualities=[]),o.qualities&&o.qualities.length){N.qualities=[];for(let F=0;F<o.qualities.length;++F)N.qualities[F]=$root.com.quick.voice.proto.NetQualityChange.toObject(o.qualities[F],k)}return N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.NetQualityNotify"},O}(),j.UpdateCall=function(){function O(I){if(I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.roomId="",O.prototype.user=null,O.create=function(o){return new O(o)},O.encode=function(o,k){return k||(k=$Writer.create()),o.roomId!=null&&Object.hasOwnProperty.call(o,"roomId")&&k.uint32(10).string(o.roomId),o.user!=null&&Object.hasOwnProperty.call(o,"user")&&$root.com.quick.voice.proto.User.encode(o.user,k.uint32(18).fork()).ldelim(),k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.UpdateCall;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.roomId=o.string();break}case 2:{F.user=$root.com.quick.voice.proto.User.decode(o,o.uint32());break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.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 k=$root.com.quick.voice.proto.User.verify(o.user);if(k)return"user."+k}return null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.UpdateCall)return o;let k=new $root.com.quick.voice.proto.UpdateCall;if(o.roomId!=null&&(k.roomId=String(o.roomId)),o.user!=null){if(typeof o.user!="object")throw TypeError(".com.quick.voice.proto.UpdateCall.user: object expected");k.user=$root.com.quick.voice.proto.User.fromObject(o.user)}return k},O.toObject=function(o,k){k||(k={});let N={};return k.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,k)),N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.UpdateCall"},O}(),j.SyncRoomInfoReq=function(){function O(I){if(I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.roomId="",O.prototype.user=null,O.create=function(o){return new O(o)},O.encode=function(o,k){return k||(k=$Writer.create()),o.roomId!=null&&Object.hasOwnProperty.call(o,"roomId")&&k.uint32(10).string(o.roomId),o.user!=null&&Object.hasOwnProperty.call(o,"user")&&$root.com.quick.voice.proto.User.encode(o.user,k.uint32(18).fork()).ldelim(),k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.SyncRoomInfoReq;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.roomId=o.string();break}case 2:{F.user=$root.com.quick.voice.proto.User.decode(o,o.uint32());break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.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 k=$root.com.quick.voice.proto.User.verify(o.user);if(k)return"user."+k}return null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.SyncRoomInfoReq)return o;let k=new $root.com.quick.voice.proto.SyncRoomInfoReq;if(o.roomId!=null&&(k.roomId=String(o.roomId)),o.user!=null){if(typeof o.user!="object")throw TypeError(".com.quick.voice.proto.SyncRoomInfoReq.user: object expected");k.user=$root.com.quick.voice.proto.User.fromObject(o.user)}return k},O.toObject=function(o,k){k||(k={});let N={};return k.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,k)),N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.SyncRoomInfoReq"},O}(),j.SyncRoomInfoRsp=function(){function O(I){if(this.users=[],I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.roomId="",O.prototype.isValid=!1,O.prototype.users=$util.emptyArray,O.prototype.isActive=!1,O.create=function(o){return new O(o)},O.encode=function(o,k){if(k||(k=$Writer.create()),o.roomId!=null&&Object.hasOwnProperty.call(o,"roomId")&&k.uint32(10).string(o.roomId),o.isValid!=null&&Object.hasOwnProperty.call(o,"isValid")&&k.uint32(16).bool(o.isValid),o.users!=null&&o.users.length)for(let N=0;N<o.users.length;++N)$root.com.quick.voice.proto.User.encode(o.users[N],k.uint32(26).fork()).ldelim();return o.isActive!=null&&Object.hasOwnProperty.call(o,"isActive")&&k.uint32(32).bool(o.isActive),k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.SyncRoomInfoRsp;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.roomId=o.string();break}case 2:{F.isValid=o.bool();break}case 3:{F.users&&F.users.length||(F.users=[]),F.users.push($root.com.quick.voice.proto.User.decode(o,o.uint32()));break}case 4:{F.isActive=o.bool();break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.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.isValid!=null&&o.hasOwnProperty("isValid")&&typeof o.isValid!="boolean")return"isValid: boolean expected";if(o.users!=null&&o.hasOwnProperty("users")){if(!Array.isArray(o.users))return"users: array expected";for(let k=0;k<o.users.length;++k){let N=$root.com.quick.voice.proto.User.verify(o.users[k]);if(N)return"users."+N}}return o.isActive!=null&&o.hasOwnProperty("isActive")&&typeof o.isActive!="boolean"?"isActive: boolean expected":null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.SyncRoomInfoRsp)return o;let k=new $root.com.quick.voice.proto.SyncRoomInfoRsp;if(o.roomId!=null&&(k.roomId=String(o.roomId)),o.isValid!=null&&(k.isValid=!!o.isValid),o.users){if(!Array.isArray(o.users))throw TypeError(".com.quick.voice.proto.SyncRoomInfoRsp.users: array expected");k.users=[];for(let N=0;N<o.users.length;++N){if(typeof o.users[N]!="object")throw TypeError(".com.quick.voice.proto.SyncRoomInfoRsp.users: object expected");k.users[N]=$root.com.quick.voice.proto.User.fromObject(o.users[N])}}return o.isActive!=null&&(k.isActive=!!o.isActive),k},O.toObject=function(o,k){k||(k={});let N={};if((k.arrays||k.defaults)&&(N.users=[]),k.defaults&&(N.roomId="",N.isValid=!1,N.isActive=!1),o.roomId!=null&&o.hasOwnProperty("roomId")&&(N.roomId=o.roomId),o.isValid!=null&&o.hasOwnProperty("isValid")&&(N.isValid=o.isValid),o.users&&o.users.length){N.users=[];for(let F=0;F<o.users.length;++F)N.users[F]=$root.com.quick.voice.proto.User.toObject(o.users[F],k)}return o.isActive!=null&&o.hasOwnProperty("isActive")&&(N.isActive=o.isActive),N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.SyncRoomInfoRsp"},O}(),j.UpdateTime=function(){function O(I){if(I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.time=$util.Long?$util.Long.fromBits(0,0,!1):0,O.create=function(o){return new O(o)},O.encode=function(o,k){return k||(k=$Writer.create()),o.time!=null&&Object.hasOwnProperty.call(o,"time")&&k.uint32(8).int64(o.time),k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.UpdateTime;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.time=o.int64();break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){return typeof o!="object"||o===null?"object expected":o.time!=null&&o.hasOwnProperty("time")&&!$util.isInteger(o.time)&&!(o.time&&$util.isInteger(o.time.low)&&$util.isInteger(o.time.high))?"time: integer|Long expected":null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.UpdateTime)return o;let k=new $root.com.quick.voice.proto.UpdateTime;return o.time!=null&&($util.Long?(k.time=$util.Long.fromValue(o.time)).unsigned=!1:typeof o.time=="string"?k.time=parseInt(o.time,10):typeof o.time=="number"?k.time=o.time:typeof o.time=="object"&&(k.time=new $util.LongBits(o.time.low>>>0,o.time.high>>>0).toNumber())),k},O.toObject=function(o,k){k||(k={});let N={};if(k.defaults)if($util.Long){let F=new $util.Long(0,0,!1);N.time=k.longs===String?F.toString():k.longs===Number?F.toNumber():F}else N.time=k.longs===String?"0":0;return o.time!=null&&o.hasOwnProperty("time")&&(typeof o.time=="number"?N.time=k.longs===String?String(o.time):o.time:N.time=k.longs===String?$util.Long.prototype.toString.call(o.time):k.longs===Number?new $util.LongBits(o.time.low>>>0,o.time.high>>>0).toNumber():o.time),N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.UpdateTime"},O}(),j.CloseTrackReq=function(){function O(I){if(this.tracks=[],I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.sdp="",O.prototype.tracks=$util.emptyArray,O.prototype.roomId="",O.create=function(o){return new O(o)},O.encode=function(o,k){if(k||(k=$Writer.create()),o.sdp!=null&&Object.hasOwnProperty.call(o,"sdp")&&k.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],k.uint32(18).fork()).ldelim();return o.roomId!=null&&Object.hasOwnProperty.call(o,"roomId")&&k.uint32(26).string(o.roomId),k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.CloseTrackReq;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.sdp=o.string();break}case 2:{F.tracks&&F.tracks.length||(F.tracks=[]),F.tracks.push($root.com.quick.voice.proto.Track.decode(o,o.uint32()));break}case 3:{F.roomId=o.string();break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.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 k=0;k<o.tracks.length;++k){let N=$root.com.quick.voice.proto.Track.verify(o.tracks[k]);if(N)return"tracks."+N}}return o.roomId!=null&&o.hasOwnProperty("roomId")&&!$util.isString(o.roomId)?"roomId: string expected":null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.CloseTrackReq)return o;let k=new $root.com.quick.voice.proto.CloseTrackReq;if(o.sdp!=null&&(k.sdp=String(o.sdp)),o.tracks){if(!Array.isArray(o.tracks))throw TypeError(".com.quick.voice.proto.CloseTrackReq.tracks: array expected");k.tracks=[];for(let N=0;N<o.tracks.length;++N){if(typeof o.tracks[N]!="object")throw TypeError(".com.quick.voice.proto.CloseTrackReq.tracks: object expected");k.tracks[N]=$root.com.quick.voice.proto.Track.fromObject(o.tracks[N])}}return o.roomId!=null&&(k.roomId=String(o.roomId)),k},O.toObject=function(o,k){k||(k={});let N={};if((k.arrays||k.defaults)&&(N.tracks=[]),k.defaults&&(N.sdp="",N.roomId=""),o.sdp!=null&&o.hasOwnProperty("sdp")&&(N.sdp=o.sdp),o.tracks&&o.tracks.length){N.tracks=[];for(let F=0;F<o.tracks.length;++F)N.tracks[F]=$root.com.quick.voice.proto.Track.toObject(o.tracks[F],k)}return o.roomId!=null&&o.hasOwnProperty("roomId")&&(N.roomId=o.roomId),N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.CloseTrackReq"},O}(),j.CloseTrackRsp=function(){function O(I){if(this.tracks=[],I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.remoteSdp="",O.prototype.tracks=$util.emptyArray,O.create=function(o){return new O(o)},O.encode=function(o,k){if(k||(k=$Writer.create()),o.remoteSdp!=null&&Object.hasOwnProperty.call(o,"remoteSdp")&&k.uint32(10).string(o.remoteSdp),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],k.uint32(18).fork()).ldelim();return k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.CloseTrackRsp;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.remoteSdp=o.string();break}case 2:{F.tracks&&F.tracks.length||(F.tracks=[]),F.tracks.push($root.com.quick.voice.proto.Track.decode(o,o.uint32()));break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){if(typeof o!="object"||o===null)return"object expected";if(o.remoteSdp!=null&&o.hasOwnProperty("remoteSdp")&&!$util.isString(o.remoteSdp))return"remoteSdp: string expected";if(o.tracks!=null&&o.hasOwnProperty("tracks")){if(!Array.isArray(o.tracks))return"tracks: array expected";for(let k=0;k<o.tracks.length;++k){let N=$root.com.quick.voice.proto.Track.verify(o.tracks[k]);if(N)return"tracks."+N}}return null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.CloseTrackRsp)return o;let k=new $root.com.quick.voice.proto.CloseTrackRsp;if(o.remoteSdp!=null&&(k.remoteSdp=String(o.remoteSdp)),o.tracks){if(!Array.isArray(o.tracks))throw TypeError(".com.quick.voice.proto.CloseTrackRsp.tracks: array expected");k.tracks=[];for(let N=0;N<o.tracks.length;++N){if(typeof o.tracks[N]!="object")throw TypeError(".com.quick.voice.proto.CloseTrackRsp.tracks: object expected");k.tracks[N]=$root.com.quick.voice.proto.Track.fromObject(o.tracks[N])}}return k},O.toObject=function(o,k){k||(k={});let N={};if((k.arrays||k.defaults)&&(N.tracks=[]),k.defaults&&(N.remoteSdp=""),o.remoteSdp!=null&&o.hasOwnProperty("remoteSdp")&&(N.remoteSdp=o.remoteSdp),o.tracks&&o.tracks.length){N.tracks=[];for(let F=0;F<o.tracks.length;++F)N.tracks[F]=$root.com.quick.voice.proto.Track.toObject(o.tracks[F],k)}return N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.CloseTrackRsp"},O}(),j.CloseTrackNotify=function(){function O(I){if(I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.user=null,O.create=function(o){return new O(o)},O.encode=function(o,k){return k||(k=$Writer.create()),o.user!=null&&Object.hasOwnProperty.call(o,"user")&&$root.com.quick.voice.proto.User.encode(o.user,k.uint32(10).fork()).ldelim(),k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.CloseTrackNotify;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.user=$root.com.quick.voice.proto.User.decode(o,o.uint32());break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){if(typeof o!="object"||o===null)return"object expected";if(o.user!=null&&o.hasOwnProperty("user")){let k=$root.com.quick.voice.proto.User.verify(o.user);if(k)return"user."+k}return null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.CloseTrackNotify)return o;let k=new $root.com.quick.voice.proto.CloseTrackNotify;if(o.user!=null){if(typeof o.user!="object")throw TypeError(".com.quick.voice.proto.CloseTrackNotify.user: object expected");k.user=$root.com.quick.voice.proto.User.fromObject(o.user)}return k},O.toObject=function(o,k){k||(k={});let N={};return k.defaults&&(N.user=null),o.user!=null&&o.hasOwnProperty("user")&&(N.user=$root.com.quick.voice.proto.User.toObject(o.user,k)),N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.CloseTrackNotify"},O}(),j.ToggleLiveRoomReq=function(){function O(I){if(I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.roomId="",O.create=function(o){return new O(o)},O.encode=function(o,k){return k||(k=$Writer.create()),o.roomId!=null&&Object.hasOwnProperty.call(o,"roomId")&&k.uint32(10).string(o.roomId),k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.ToggleLiveRoomReq;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.roomId=o.string();break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){return typeof o!="object"||o===null?"object expected":o.roomId!=null&&o.hasOwnProperty("roomId")&&!$util.isString(o.roomId)?"roomId: string expected":null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.ToggleLiveRoomReq)return o;let k=new $root.com.quick.voice.proto.ToggleLiveRoomReq;return o.roomId!=null&&(k.roomId=String(o.roomId)),k},O.toObject=function(o,k){k||(k={});let N={};return k.defaults&&(N.roomId=""),o.roomId!=null&&o.hasOwnProperty("roomId")&&(N.roomId=o.roomId),N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.ToggleLiveRoomReq"},O}(),j.ToggleLiveRoomRsq=function(){function O(I){if(this.roomUsers=[],I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.roomId="",O.prototype.hash="",O.prototype.roomUsers=$util.emptyArray,O.create=function(o){return new O(o)},O.encode=function(o,k){if(k||(k=$Writer.create()),o.roomId!=null&&Object.hasOwnProperty.call(o,"roomId")&&k.uint32(10).string(o.roomId),o.hash!=null&&Object.hasOwnProperty.call(o,"hash")&&k.uint32(18).string(o.hash),o.roomUsers!=null&&o.roomUsers.length)for(let N=0;N<o.roomUsers.length;++N)$root.com.quick.voice.proto.User.encode(o.roomUsers[N],k.uint32(26).fork()).ldelim();return k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.ToggleLiveRoomRsq;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.roomId=o.string();break}case 2:{F.hash=o.string();break}case 3:{F.roomUsers&&F.roomUsers.length||(F.roomUsers=[]),F.roomUsers.push($root.com.quick.voice.proto.User.decode(o,o.uint32()));break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.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.hash!=null&&o.hasOwnProperty("hash")&&!$util.isString(o.hash))return"hash: string expected";if(o.roomUsers!=null&&o.hasOwnProperty("roomUsers")){if(!Array.isArray(o.roomUsers))return"roomUsers: array expected";for(let k=0;k<o.roomUsers.length;++k){let N=$root.com.quick.voice.proto.User.verify(o.roomUsers[k]);if(N)return"roomUsers."+N}}return null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.ToggleLiveRoomRsq)return o;let k=new $root.com.quick.voice.proto.ToggleLiveRoomRsq;if(o.roomId!=null&&(k.roomId=String(o.roomId)),o.hash!=null&&(k.hash=String(o.hash)),o.roomUsers){if(!Array.isArray(o.roomUsers))throw TypeError(".com.quick.voice.proto.ToggleLiveRoomRsq.roomUsers: array expected");k.roomUsers=[];for(let N=0;N<o.roomUsers.length;++N){if(typeof o.roomUsers[N]!="object")throw TypeError(".com.quick.voice.proto.ToggleLiveRoomRsq.roomUsers: object expected");k.roomUsers[N]=$root.com.quick.voice.proto.User.fromObject(o.roomUsers[N])}}return k},O.toObject=function(o,k){k||(k={});let N={};if((k.arrays||k.defaults)&&(N.roomUsers=[]),k.defaults&&(N.roomId="",N.hash=""),o.roomId!=null&&o.hasOwnProperty("roomId")&&(N.roomId=o.roomId),o.hash!=null&&o.hasOwnProperty("hash")&&(N.hash=o.hash),o.roomUsers&&o.roomUsers.length){N.roomUsers=[];for(let F=0;F<o.roomUsers.length;++F)N.roomUsers[F]=$root.com.quick.voice.proto.User.toObject(o.roomUsers[F],k)}return N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.ToggleLiveRoomRsq"},O}(),j.TrackType=function(){const O={},I=Object.create(O);return I[O[0]="Microphone"]=0,I[O[1]="Camera"]=1,I[O[2]="Screen"]=2,I[O[3]="SystemVoice"]=3,I}(),j.ReportInfoReq=function(){function O(I){if(I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.actionEvent="",O.prototype.userId="",O.prototype.platform="",O.prototype.time=$util.Long?$util.Long.fromBits(0,0,!1):0,O.prototype.actionData="",O.create=function(o){return new O(o)},O.encode=function(o,k){return k||(k=$Writer.create()),o.actionEvent!=null&&Object.hasOwnProperty.call(o,"actionEvent")&&k.uint32(10).string(o.actionEvent),o.userId!=null&&Object.hasOwnProperty.call(o,"userId")&&k.uint32(18).string(o.userId),o.platform!=null&&Object.hasOwnProperty.call(o,"platform")&&k.uint32(26).string(o.platform),o.time!=null&&Object.hasOwnProperty.call(o,"time")&&k.uint32(32).int64(o.time),o.actionData!=null&&Object.hasOwnProperty.call(o,"actionData")&&k.uint32(42).string(o.actionData),k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.ReportInfoReq;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.actionEvent=o.string();break}case 2:{F.userId=o.string();break}case 3:{F.platform=o.string();break}case 4:{F.time=o.int64();break}case 5:{F.actionData=o.string();break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){return typeof o!="object"||o===null?"object expected":o.actionEvent!=null&&o.hasOwnProperty("actionEvent")&&!$util.isString(o.actionEvent)?"actionEvent: string expected":o.userId!=null&&o.hasOwnProperty("userId")&&!$util.isString(o.userId)?"userId: string expected":o.platform!=null&&o.hasOwnProperty("platform")&&!$util.isString(o.platform)?"platform: string expected":o.time!=null&&o.hasOwnProperty("time")&&!$util.isInteger(o.time)&&!(o.time&&$util.isInteger(o.time.low)&&$util.isInteger(o.time.high))?"time: integer|Long expected":o.actionData!=null&&o.hasOwnProperty("actionData")&&!$util.isString(o.actionData)?"actionData: string expected":null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.ReportInfoReq)return o;let k=new $root.com.quick.voice.proto.ReportInfoReq;return o.actionEvent!=null&&(k.actionEvent=String(o.actionEvent)),o.userId!=null&&(k.userId=String(o.userId)),o.platform!=null&&(k.platform=String(o.platform)),o.time!=null&&($util.Long?(k.time=$util.Long.fromValue(o.time)).unsigned=!1:typeof o.time=="string"?k.time=parseInt(o.time,10):typeof o.time=="number"?k.time=o.time:typeof o.time=="object"&&(k.time=new $util.LongBits(o.time.low>>>0,o.time.high>>>0).toNumber())),o.actionData!=null&&(k.actionData=String(o.actionData)),k},O.toObject=function(o,k){k||(k={});let N={};if(k.defaults){if(N.actionEvent="",N.userId="",N.platform="",$util.Long){let F=new $util.Long(0,0,!1);N.time=k.longs===String?F.toString():k.longs===Number?F.toNumber():F}else N.time=k.longs===String?"0":0;N.actionData=""}return o.actionEvent!=null&&o.hasOwnProperty("actionEvent")&&(N.actionEvent=o.actionEvent),o.userId!=null&&o.hasOwnProperty("userId")&&(N.userId=o.userId),o.platform!=null&&o.hasOwnProperty("platform")&&(N.platform=o.platform),o.time!=null&&o.hasOwnProperty("time")&&(typeof o.time=="number"?N.time=k.longs===String?String(o.time):o.time:N.time=k.longs===String?$util.Long.prototype.toString.call(o.time):k.longs===Number?new $util.LongBits(o.time.low>>>0,o.time.high>>>0).toNumber():o.time),o.actionData!=null&&o.hasOwnProperty("actionData")&&(N.actionData=o.actionData),N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.ReportInfoReq"},O}(),j.UpdatePermissions=function(){function O(I){if(I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.roomId="",O.prototype.user=null,O.create=function(o){return new O(o)},O.encode=function(o,k){return k||(k=$Writer.create()),o.roomId!=null&&Object.hasOwnProperty.call(o,"roomId")&&k.uint32(10).string(o.roomId),o.user!=null&&Object.hasOwnProperty.call(o,"user")&&$root.com.quick.voice.proto.User.encode(o.user,k.uint32(18).fork()).ldelim(),k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.UpdatePermissions;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.roomId=o.string();break}case 2:{F.user=$root.com.quick.voice.proto.User.decode(o,o.uint32());break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.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 k=$root.com.quick.voice.proto.User.verify(o.user);if(k)return"user."+k}return null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.UpdatePermissions)return o;let k=new $root.com.quick.voice.proto.UpdatePermissions;if(o.roomId!=null&&(k.roomId=String(o.roomId)),o.user!=null){if(typeof o.user!="object")throw TypeError(".com.quick.voice.proto.UpdatePermissions.user: object expected");k.user=$root.com.quick.voice.proto.User.fromObject(o.user)}return k},O.toObject=function(o,k){k||(k={});let N={};return k.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,k)),N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.UpdatePermissions"},O}(),j.CallType=function(){const O={},I=Object.create(O);return I[O[0]="Normal"]=0,I[O[1]="Meeting"]=1,I[O[2]="Live"]=2,I}(),j.QuitNotifyCode=function(){const O={},I=Object.create(O);return I[O[0]="NormalQuit"]=0,I[O[2021]="Timeout"]=2021,I[O[2011]="TokenExpired"]=2011,I[O[2022]="KickOut"]=2022,I[O[2023]="EndPk"]=2023,I[O[2024]="EndLive"]=2024,I}(),j.UserBehavior=function(){function O(I){if(I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.type=0,O.prototype.behavior=!1,O.create=function(o){return new O(o)},O.encode=function(o,k){return k||(k=$Writer.create()),o.type!=null&&Object.hasOwnProperty.call(o,"type")&&k.uint32(8).int32(o.type),o.behavior!=null&&Object.hasOwnProperty.call(o,"behavior")&&k.uint32(16).bool(o.behavior),k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.UserBehavior;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.type=o.int32();break}case 2:{F.behavior=o.bool();break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){if(typeof o!="object"||o===null)return"object 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.behavior!=null&&o.hasOwnProperty("behavior")&&typeof o.behavior!="boolean"?"behavior: boolean expected":null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.UserBehavior)return o;let k=new $root.com.quick.voice.proto.UserBehavior;switch(o.type){default:if(typeof o.type=="number"){k.type=o.type;break}break;case"Microphone":case 0:k.type=0;break;case"Camera":case 1:k.type=1;break;case"Screen":case 2:k.type=2;break;case"SystemVoice":case 3:k.type=3;break}return o.behavior!=null&&(k.behavior=!!o.behavior),k},O.toObject=function(o,k){k||(k={});let N={};return k.defaults&&(N.type=k.enums===String?"Microphone":0,N.behavior=!1),o.type!=null&&o.hasOwnProperty("type")&&(N.type=k.enums===String?$root.com.quick.voice.proto.TrackType[o.type]===void 0?o.type:$root.com.quick.voice.proto.TrackType[o.type]:o.type),o.behavior!=null&&o.hasOwnProperty("behavior")&&(N.behavior=o.behavior),N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.UserBehavior"},O}(),j.PreventUser=function(){function O(I){if(this.behaviors=[],I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.id="",O.prototype.behaviors=$util.emptyArray,O.create=function(o){return new O(o)},O.encode=function(o,k){if(k||(k=$Writer.create()),o.id!=null&&Object.hasOwnProperty.call(o,"id")&&k.uint32(10).string(o.id),o.behaviors!=null&&o.behaviors.length)for(let N=0;N<o.behaviors.length;++N)$root.com.quick.voice.proto.UserBehavior.encode(o.behaviors[N],k.uint32(18).fork()).ldelim();return k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.PreventUser;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.id=o.string();break}case 2:{F.behaviors&&F.behaviors.length||(F.behaviors=[]),F.behaviors.push($root.com.quick.voice.proto.UserBehavior.decode(o,o.uint32()));break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.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.behaviors!=null&&o.hasOwnProperty("behaviors")){if(!Array.isArray(o.behaviors))return"behaviors: array expected";for(let k=0;k<o.behaviors.length;++k){let N=$root.com.quick.voice.proto.UserBehavior.verify(o.behaviors[k]);if(N)return"behaviors."+N}}return null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.PreventUser)return o;let k=new $root.com.quick.voice.proto.PreventUser;if(o.id!=null&&(k.id=String(o.id)),o.behaviors){if(!Array.isArray(o.behaviors))throw TypeError(".com.quick.voice.proto.PreventUser.behaviors: array expected");k.behaviors=[];for(let N=0;N<o.behaviors.length;++N){if(typeof o.behaviors[N]!="object")throw TypeError(".com.quick.voice.proto.PreventUser.behaviors: object expected");k.behaviors[N]=$root.com.quick.voice.proto.UserBehavior.fromObject(o.behaviors[N])}}return k},O.toObject=function(o,k){k||(k={});let N={};if((k.arrays||k.defaults)&&(N.behaviors=[]),k.defaults&&(N.id=""),o.id!=null&&o.hasOwnProperty("id")&&(N.id=o.id),o.behaviors&&o.behaviors.length){N.behaviors=[];for(let F=0;F<o.behaviors.length;++F)N.behaviors[F]=$root.com.quick.voice.proto.UserBehavior.toObject(o.behaviors[F],k)}return N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.PreventUser"},O}(),j.PreventUsersBehaviorReq=function(){function O(I){if(this.users=[],I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.roomId="",O.prototype.users=$util.emptyArray,O.create=function(o){return new O(o)},O.encode=function(o,k){if(k||(k=$Writer.create()),o.roomId!=null&&Object.hasOwnProperty.call(o,"roomId")&&k.uint32(10).string(o.roomId),o.users!=null&&o.users.length)for(let N=0;N<o.users.length;++N)$root.com.quick.voice.proto.PreventUser.encode(o.users[N],k.uint32(18).fork()).ldelim();return k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.PreventUsersBehaviorReq;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.roomId=o.string();break}case 2:{F.users&&F.users.length||(F.users=[]),F.users.push($root.com.quick.voice.proto.PreventUser.decode(o,o.uint32()));break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.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.users!=null&&o.hasOwnProperty("users")){if(!Array.isArray(o.users))return"users: array expected";for(let k=0;k<o.users.length;++k){let N=$root.com.quick.voice.proto.PreventUser.verify(o.users[k]);if(N)return"users."+N}}return null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.PreventUsersBehaviorReq)return o;let k=new $root.com.quick.voice.proto.PreventUsersBehaviorReq;if(o.roomId!=null&&(k.roomId=String(o.roomId)),o.users){if(!Array.isArray(o.users))throw TypeError(".com.quick.voice.proto.PreventUsersBehaviorReq.users: array expected");k.users=[];for(let N=0;N<o.users.length;++N){if(typeof o.users[N]!="object")throw TypeError(".com.quick.voice.proto.PreventUsersBehaviorReq.users: object expected");k.users[N]=$root.com.quick.voice.proto.PreventUser.fromObject(o.users[N])}}return k},O.toObject=function(o,k){k||(k={});let N={};if((k.arrays||k.defaults)&&(N.users=[]),k.defaults&&(N.roomId=""),o.roomId!=null&&o.hasOwnProperty("roomId")&&(N.roomId=o.roomId),o.users&&o.users.length){N.users=[];for(let F=0;F<o.users.length;++F)N.users[F]=$root.com.quick.voice.proto.PreventUser.toObject(o.users[F],k)}return N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.PreventUsersBehaviorReq"},O}(),j.PreventUsersBehaviorNotify=function(){function O(I){if(this.users=[],I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.roomId="",O.prototype.users=$util.emptyArray,O.create=function(o){return new O(o)},O.encode=function(o,k){if(k||(k=$Writer.create()),o.roomId!=null&&Object.hasOwnProperty.call(o,"roomId")&&k.uint32(10).string(o.roomId),o.users!=null&&o.users.length)for(let N=0;N<o.users.length;++N)$root.com.quick.voice.proto.User.encode(o.users[N],k.uint32(18).fork()).ldelim();return k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.PreventUsersBehaviorNotify;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.roomId=o.string();break}case 2:{F.users&&F.users.length||(F.users=[]),F.users.push($root.com.quick.voice.proto.User.decode(o,o.uint32()));break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.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.users!=null&&o.hasOwnProperty("users")){if(!Array.isArray(o.users))return"users: array expected";for(let k=0;k<o.users.length;++k){let N=$root.com.quick.voice.proto.User.verify(o.users[k]);if(N)return"users."+N}}return null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.PreventUsersBehaviorNotify)return o;let k=new $root.com.quick.voice.proto.PreventUsersBehaviorNotify;if(o.roomId!=null&&(k.roomId=String(o.roomId)),o.users){if(!Array.isArray(o.users))throw TypeError(".com.quick.voice.proto.PreventUsersBehaviorNotify.users: array expected");k.users=[];for(let N=0;N<o.users.length;++N){if(typeof o.users[N]!="object")throw TypeError(".com.quick.voice.proto.PreventUsersBehaviorNotify.users: object expected");k.users[N]=$root.com.quick.voice.proto.User.fromObject(o.users[N])}}return k},O.toObject=function(o,k){k||(k={});let N={};if((k.arrays||k.defaults)&&(N.users=[]),k.defaults&&(N.roomId=""),o.roomId!=null&&o.hasOwnProperty("roomId")&&(N.roomId=o.roomId),o.users&&o.users.length){N.users=[];for(let F=0;F<o.users.length;++F)N.users[F]=$root.com.quick.voice.proto.User.toObject(o.users[F],k)}return N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.PreventUsersBehaviorNotify"},O}(),j.AccelerationAreas=function(){const O={},I=Object.create(O);return I[O[0]="chinaMainland"]=0,I[O[1]="global"]=1,I[O[2]="overseas"]=2,I}(),j.CountMethods=function(){const O={},I=Object.create(O);return I[O[0]="flow"]=0,I[O[1]="minutes"]=1,I}(),j.BaseCDNAddress=function(){function O(I){if(this.urlMap={},I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.area=0,O.prototype.countType=0,O.prototype.urlMap=$util.emptyObject,O.create=function(o){return new O(o)},O.encode=function(o,k){if(k||(k=$Writer.create()),o.area!=null&&Object.hasOwnProperty.call(o,"area")&&k.uint32(8).int32(o.area),o.countType!=null&&Object.hasOwnProperty.call(o,"countType")&&k.uint32(16).int32(o.countType),o.urlMap!=null&&Object.hasOwnProperty.call(o,"urlMap"))for(let N=Object.keys(o.urlMap),F=0;F<N.length;++F)k.uint32(26).fork().uint32(10).string(N[F]).uint32(18).string(o.urlMap[N[F]]).ldelim();return k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.BaseCDNAddress,J,X;for(;o.pos<N;){let Y=o.uint32();switch(Y>>>3){case 1:{F.area=o.int32();break}case 2:{F.countType=o.int32();break}case 3:{F.urlMap===$util.emptyObject&&(F.urlMap={});let Q=o.uint32()+o.pos;for(J="",X="";o.pos<Q;){let te=o.uint32();switch(te>>>3){case 1:J=o.string();break;case 2:X=o.string();break;default:o.skipType(te&7);break}}F.urlMap[J]=X;break}default:o.skipType(Y&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){if(typeof o!="object"||o===null)return"object expected";if(o.area!=null&&o.hasOwnProperty("area"))switch(o.area){default:return"area: enum value expected";case 0:case 1:case 2:break}if(o.countType!=null&&o.hasOwnProperty("countType"))switch(o.countType){default:return"countType: enum value expected";case 0:case 1:break}if(o.urlMap!=null&&o.hasOwnProperty("urlMap")){if(!$util.isObject(o.urlMap))return"urlMap: object expected";let k=Object.keys(o.urlMap);for(let N=0;N<k.length;++N)if(!$util.isString(o.urlMap[k[N]]))return"urlMap: string{k:string} expected"}return null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.BaseCDNAddress)return o;let k=new $root.com.quick.voice.proto.BaseCDNAddress;switch(o.area){default:if(typeof o.area=="number"){k.area=o.area;break}break;case"chinaMainland":case 0:k.area=0;break;case"global":case 1:k.area=1;break;case"overseas":case 2:k.area=2;break}switch(o.countType){default:if(typeof o.countType=="number"){k.countType=o.countType;break}break;case"flow":case 0:k.countType=0;break;case"minutes":case 1:k.countType=1;break}if(o.urlMap){if(typeof o.urlMap!="object")throw TypeError(".com.quick.voice.proto.BaseCDNAddress.urlMap: object expected");k.urlMap={};for(let N=Object.keys(o.urlMap),F=0;F<N.length;++F)k.urlMap[N[F]]=String(o.urlMap[N[F]])}return k},O.toObject=function(o,k){k||(k={});let N={};(k.objects||k.defaults)&&(N.urlMap={}),k.defaults&&(N.area=k.enums===String?"chinaMainland":0,N.countType=k.enums===String?"flow":0),o.area!=null&&o.hasOwnProperty("area")&&(N.area=k.enums===String?$root.com.quick.voice.proto.AccelerationAreas[o.area]===void 0?o.area:$root.com.quick.voice.proto.AccelerationAreas[o.area]:o.area),o.countType!=null&&o.hasOwnProperty("countType")&&(N.countType=k.enums===String?$root.com.quick.voice.proto.CountMethods[o.countType]===void 0?o.countType:$root.com.quick.voice.proto.CountMethods[o.countType]:o.countType);let F;if(o.urlMap&&(F=Object.keys(o.urlMap)).length){N.urlMap={};for(let J=0;J<F.length;++J)N.urlMap[F[J]]=o.urlMap[F[J]]}return N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.BaseCDNAddress"},O}(),j.CDNPlayAddressNotify=function(){function O(o){if(this.standLines=[],o)for(let k=Object.keys(o),N=0;N<k.length;++N)o[k[N]]!=null&&(this[k[N]]=o[k[N]])}O.prototype.roomId="",O.prototype.m3u8=null,O.prototype.rtmp=null,O.prototype.flv=null,O.prototype.rtmps=null,O.prototype.mainLine=null,O.prototype.standLines=$util.emptyArray;let I;return Object.defineProperty(O.prototype,"_m3u8",{get:$util.oneOfGetter(I=["m3u8"]),set:$util.oneOfSetter(I)}),Object.defineProperty(O.prototype,"_rtmp",{get:$util.oneOfGetter(I=["rtmp"]),set:$util.oneOfSetter(I)}),Object.defineProperty(O.prototype,"_flv",{get:$util.oneOfGetter(I=["flv"]),set:$util.oneOfSetter(I)}),Object.defineProperty(O.prototype,"_rtmps",{get:$util.oneOfGetter(I=["rtmps"]),set:$util.oneOfSetter(I)}),Object.defineProperty(O.prototype,"_mainLine",{get:$util.oneOfGetter(I=["mainLine"]),set:$util.oneOfSetter(I)}),O.create=function(k){return new O(k)},O.encode=function(k,N){if(N||(N=$Writer.create()),k.roomId!=null&&Object.hasOwnProperty.call(k,"roomId")&&N.uint32(10).string(k.roomId),k.m3u8!=null&&Object.hasOwnProperty.call(k,"m3u8")&&N.uint32(18).string(k.m3u8),k.rtmp!=null&&Object.hasOwnProperty.call(k,"rtmp")&&N.uint32(26).string(k.rtmp),k.flv!=null&&Object.hasOwnProperty.call(k,"flv")&&N.uint32(34).string(k.flv),k.rtmps!=null&&Object.hasOwnProperty.call(k,"rtmps")&&N.uint32(42).string(k.rtmps),k.mainLine!=null&&Object.hasOwnProperty.call(k,"mainLine")&&$root.com.quick.voice.proto.BaseCDNAddress.encode(k.mainLine,N.uint32(50).fork()).ldelim(),k.standLines!=null&&k.standLines.length)for(let F=0;F<k.standLines.length;++F)$root.com.quick.voice.proto.BaseCDNAddress.encode(k.standLines[F],N.uint32(58).fork()).ldelim();return N},O.encodeDelimited=function(k,N){return this.encode(k,N).ldelim()},O.decode=function(k,N){k instanceof $Reader||(k=$Reader.create(k));let F=N===void 0?k.len:k.pos+N,J=new $root.com.quick.voice.proto.CDNPlayAddressNotify;for(;k.pos<F;){let X=k.uint32();switch(X>>>3){case 1:{J.roomId=k.string();break}case 2:{J.m3u8=k.string();break}case 3:{J.rtmp=k.string();break}case 4:{J.flv=k.string();break}case 5:{J.rtmps=k.string();break}case 6:{J.mainLine=$root.com.quick.voice.proto.BaseCDNAddress.decode(k,k.uint32());break}case 7:{J.standLines&&J.standLines.length||(J.standLines=[]),J.standLines.push($root.com.quick.voice.proto.BaseCDNAddress.decode(k,k.uint32()));break}default:k.skipType(X&7);break}}return J},O.decodeDelimited=function(k){return k instanceof $Reader||(k=new $Reader(k)),this.decode(k,k.uint32())},O.verify=function(k){if(typeof k!="object"||k===null)return"object expected";if(k.roomId!=null&&k.hasOwnProperty("roomId")&&!$util.isString(k.roomId))return"roomId: string expected";if(k.m3u8!=null&&k.hasOwnProperty("m3u8")&&!$util.isString(k.m3u8))return"m3u8: string expected";if(k.rtmp!=null&&k.hasOwnProperty("rtmp")&&!$util.isString(k.rtmp))return"rtmp: string expected";if(k.flv!=null&&k.hasOwnProperty("flv")&&!$util.isString(k.flv))return"flv: string expected";if(k.rtmps!=null&&k.hasOwnProperty("rtmps")&&!$util.isString(k.rtmps))return"rtmps: string expected";if(k.mainLine!=null&&k.hasOwnProperty("mainLine")){let N=$root.com.quick.voice.proto.BaseCDNAddress.verify(k.mainLine);if(N)return"mainLine."+N}if(k.standLines!=null&&k.hasOwnProperty("standLines")){if(!Array.isArray(k.standLines))return"standLines: array expected";for(let N=0;N<k.standLines.length;++N){let F=$root.com.quick.voice.proto.BaseCDNAddress.verify(k.standLines[N]);if(F)return"standLines."+F}}return null},O.fromObject=function(k){if(k instanceof $root.com.quick.voice.proto.CDNPlayAddressNotify)return k;let N=new $root.com.quick.voice.proto.CDNPlayAddressNotify;if(k.roomId!=null&&(N.roomId=String(k.roomId)),k.m3u8!=null&&(N.m3u8=String(k.m3u8)),k.rtmp!=null&&(N.rtmp=String(k.rtmp)),k.flv!=null&&(N.flv=String(k.flv)),k.rtmps!=null&&(N.rtmps=String(k.rtmps)),k.mainLine!=null){if(typeof k.mainLine!="object")throw TypeError(".com.quick.voice.proto.CDNPlayAddressNotify.mainLine: object expected");N.mainLine=$root.com.quick.voice.proto.BaseCDNAddress.fromObject(k.mainLine)}if(k.standLines){if(!Array.isArray(k.standLines))throw TypeError(".com.quick.voice.proto.CDNPlayAddressNotify.standLines: array expected");N.standLines=[];for(let F=0;F<k.standLines.length;++F){if(typeof k.standLines[F]!="object")throw TypeError(".com.quick.voice.proto.CDNPlayAddressNotify.standLines: object expected");N.standLines[F]=$root.com.quick.voice.proto.BaseCDNAddress.fromObject(k.standLines[F])}}return N},O.toObject=function(k,N){N||(N={});let F={};if((N.arrays||N.defaults)&&(F.standLines=[]),N.defaults&&(F.roomId=""),k.roomId!=null&&k.hasOwnProperty("roomId")&&(F.roomId=k.roomId),k.m3u8!=null&&k.hasOwnProperty("m3u8")&&(F.m3u8=k.m3u8,N.oneofs&&(F._m3u8="m3u8")),k.rtmp!=null&&k.hasOwnProperty("rtmp")&&(F.rtmp=k.rtmp,N.oneofs&&(F._rtmp="rtmp")),k.flv!=null&&k.hasOwnProperty("flv")&&(F.flv=k.flv,N.oneofs&&(F._flv="flv")),k.rtmps!=null&&k.hasOwnProperty("rtmps")&&(F.rtmps=k.rtmps,N.oneofs&&(F._rtmps="rtmps")),k.mainLine!=null&&k.hasOwnProperty("mainLine")&&(F.mainLine=$root.com.quick.voice.proto.BaseCDNAddress.toObject(k.mainLine,N),N.oneofs&&(F._mainLine="mainLine")),k.standLines&&k.standLines.length){F.standLines=[];for(let J=0;J<k.standLines.length;++J)F.standLines[J]=$root.com.quick.voice.proto.BaseCDNAddress.toObject(k.standLines[J],N)}return F},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(k){return k===void 0&&(k="type.googleapis.com"),k+"/com.quick.voice.proto.CDNPlayAddressNotify"},O}(),j.UserChannel=function(){function O(I){if(this.channels=[],I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.userId="",O.prototype.channels=$util.emptyArray,O.create=function(o){return new O(o)},O.encode=function(o,k){if(k||(k=$Writer.create()),o.userId!=null&&Object.hasOwnProperty.call(o,"userId")&&k.uint32(10).string(o.userId),o.channels!=null&&o.channels.length)for(let N=0;N<o.channels.length;++N)$root.com.quick.voice.proto.DataChannel.encode(o.channels[N],k.uint32(18).fork()).ldelim();return k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.UserChannel;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.userId=o.string();break}case 2:{F.channels&&F.channels.length||(F.channels=[]),F.channels.push($root.com.quick.voice.proto.DataChannel.decode(o,o.uint32()));break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){if(typeof o!="object"||o===null)return"object expected";if(o.userId!=null&&o.hasOwnProperty("userId")&&!$util.isString(o.userId))return"userId: string expected";if(o.channels!=null&&o.hasOwnProperty("channels")){if(!Array.isArray(o.channels))return"channels: array expected";for(let k=0;k<o.channels.length;++k){let N=$root.com.quick.voice.proto.DataChannel.verify(o.channels[k]);if(N)return"channels."+N}}return null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.UserChannel)return o;let k=new $root.com.quick.voice.proto.UserChannel;if(o.userId!=null&&(k.userId=String(o.userId)),o.channels){if(!Array.isArray(o.channels))throw TypeError(".com.quick.voice.proto.UserChannel.channels: array expected");k.channels=[];for(let N=0;N<o.channels.length;++N){if(typeof o.channels[N]!="object")throw TypeError(".com.quick.voice.proto.UserChannel.channels: object expected");k.channels[N]=$root.com.quick.voice.proto.DataChannel.fromObject(o.channels[N])}}return k},O.toObject=function(o,k){k||(k={});let N={};if((k.arrays||k.defaults)&&(N.channels=[]),k.defaults&&(N.userId=""),o.userId!=null&&o.hasOwnProperty("userId")&&(N.userId=o.userId),o.channels&&o.channels.length){N.channels=[];for(let F=0;F<o.channels.length;++F)N.channels[F]=$root.com.quick.voice.proto.DataChannel.toObject(o.channels[F],k)}return N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.UserChannel"},O}(),j.ChannelPublishReq=function(){function O(I){if(this.channels=[],I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.channels=$util.emptyArray,O.create=function(o){return new O(o)},O.encode=function(o,k){if(k||(k=$Writer.create()),o.channels!=null&&o.channels.length)for(let N=0;N<o.channels.length;++N)$root.com.quick.voice.proto.DataChannel.encode(o.channels[N],k.uint32(10).fork()).ldelim();return k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.ChannelPublishReq;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.channels&&F.channels.length||(F.channels=[]),F.channels.push($root.com.quick.voice.proto.DataChannel.decode(o,o.uint32()));break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){if(typeof o!="object"||o===null)return"object expected";if(o.channels!=null&&o.hasOwnProperty("channels")){if(!Array.isArray(o.channels))return"channels: array expected";for(let k=0;k<o.channels.length;++k){let N=$root.com.quick.voice.proto.DataChannel.verify(o.channels[k]);if(N)return"channels."+N}}return null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.ChannelPublishReq)return o;let k=new $root.com.quick.voice.proto.ChannelPublishReq;if(o.channels){if(!Array.isArray(o.channels))throw TypeError(".com.quick.voice.proto.ChannelPublishReq.channels: array expected");k.channels=[];for(let N=0;N<o.channels.length;++N){if(typeof o.channels[N]!="object")throw TypeError(".com.quick.voice.proto.ChannelPublishReq.channels: object expected");k.channels[N]=$root.com.quick.voice.proto.DataChannel.fromObject(o.channels[N])}}return k},O.toObject=function(o,k){k||(k={});let N={};if((k.arrays||k.defaults)&&(N.channels=[]),o.channels&&o.channels.length){N.channels=[];for(let F=0;F<o.channels.length;++F)N.channels[F]=$root.com.quick.voice.proto.DataChannel.toObject(o.channels[F],k)}return N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.ChannelPublishReq"},O}(),j.ChannelPublishRsq=function(){function O(I){if(this.channels=[],I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.channels=$util.emptyArray,O.create=function(o){return new O(o)},O.encode=function(o,k){if(k||(k=$Writer.create()),o.channels!=null&&o.channels.length)for(let N=0;N<o.channels.length;++N)$root.com.quick.voice.proto.UserChannel.encode(o.channels[N],k.uint32(10).fork()).ldelim();return k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.ChannelPublishRsq;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.channels&&F.channels.length||(F.channels=[]),F.channels.push($root.com.quick.voice.proto.UserChannel.decode(o,o.uint32()));break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){if(typeof o!="object"||o===null)return"object expected";if(o.channels!=null&&o.hasOwnProperty("channels")){if(!Array.isArray(o.channels))return"channels: array expected";for(let k=0;k<o.channels.length;++k){let N=$root.com.quick.voice.proto.UserChannel.verify(o.channels[k]);if(N)return"channels."+N}}return null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.ChannelPublishRsq)return o;let k=new $root.com.quick.voice.proto.ChannelPublishRsq;if(o.channels){if(!Array.isArray(o.channels))throw TypeError(".com.quick.voice.proto.ChannelPublishRsq.channels: array expected");k.channels=[];for(let N=0;N<o.channels.length;++N){if(typeof o.channels[N]!="object")throw TypeError(".com.quick.voice.proto.ChannelPublishRsq.channels: object expected");k.channels[N]=$root.com.quick.voice.proto.UserChannel.fromObject(o.channels[N])}}return k},O.toObject=function(o,k){k||(k={});let N={};if((k.arrays||k.defaults)&&(N.channels=[]),o.channels&&o.channels.length){N.channels=[];for(let F=0;F<o.channels.length;++F)N.channels[F]=$root.com.quick.voice.proto.UserChannel.toObject(o.channels[F],k)}return N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.ChannelPublishRsq"},O}(),j.ChannelSubscribeReq=function(){function O(I){if(this.users=[],I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.users=$util.emptyArray,O.create=function(o){return new O(o)},O.encode=function(o,k){if(k||(k=$Writer.create()),o.users!=null&&o.users.length)for(let N=0;N<o.users.length;++N)$root.com.quick.voice.proto.UserChannel.encode(o.users[N],k.uint32(10).fork()).ldelim();return k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.ChannelSubscribeReq;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.users&&F.users.length||(F.users=[]),F.users.push($root.com.quick.voice.proto.UserChannel.decode(o,o.uint32()));break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){if(typeof o!="object"||o===null)return"object expected";if(o.users!=null&&o.hasOwnProperty("users")){if(!Array.isArray(o.users))return"users: array expected";for(let k=0;k<o.users.length;++k){let N=$root.com.quick.voice.proto.UserChannel.verify(o.users[k]);if(N)return"users."+N}}return null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.ChannelSubscribeReq)return o;let k=new $root.com.quick.voice.proto.ChannelSubscribeReq;if(o.users){if(!Array.isArray(o.users))throw TypeError(".com.quick.voice.proto.ChannelSubscribeReq.users: array expected");k.users=[];for(let N=0;N<o.users.length;++N){if(typeof o.users[N]!="object")throw TypeError(".com.quick.voice.proto.ChannelSubscribeReq.users: object expected");k.users[N]=$root.com.quick.voice.proto.UserChannel.fromObject(o.users[N])}}return k},O.toObject=function(o,k){k||(k={});let N={};if((k.arrays||k.defaults)&&(N.users=[]),o.users&&o.users.length){N.users=[];for(let F=0;F<o.users.length;++F)N.users[F]=$root.com.quick.voice.proto.UserChannel.toObject(o.users[F],k)}return N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.ChannelSubscribeReq"},O}(),j.ChannelSubscribeRsq=function(){function O(I){if(this.channels=[],I)for(let o=Object.keys(I),k=0;k<o.length;++k)I[o[k]]!=null&&(this[o[k]]=I[o[k]])}return O.prototype.channels=$util.emptyArray,O.create=function(o){return new O(o)},O.encode=function(o,k){if(k||(k=$Writer.create()),o.channels!=null&&o.channels.length)for(let N=0;N<o.channels.length;++N)$root.com.quick.voice.proto.UserChannel.encode(o.channels[N],k.uint32(10).fork()).ldelim();return k},O.encodeDelimited=function(o,k){return this.encode(o,k).ldelim()},O.decode=function(o,k){o instanceof $Reader||(o=$Reader.create(o));let N=k===void 0?o.len:o.pos+k,F=new $root.com.quick.voice.proto.ChannelSubscribeRsq;for(;o.pos<N;){let J=o.uint32();switch(J>>>3){case 1:{F.channels&&F.channels.length||(F.channels=[]),F.channels.push($root.com.quick.voice.proto.UserChannel.decode(o,o.uint32()));break}default:o.skipType(J&7);break}}return F},O.decodeDelimited=function(o){return o instanceof $Reader||(o=new $Reader(o)),this.decode(o,o.uint32())},O.verify=function(o){if(typeof o!="object"||o===null)return"object expected";if(o.channels!=null&&o.hasOwnProperty("channels")){if(!Array.isArray(o.channels))return"channels: array expected";for(let k=0;k<o.channels.length;++k){let N=$root.com.quick.voice.proto.UserChannel.verify(o.channels[k]);if(N)return"channels."+N}}return null},O.fromObject=function(o){if(o instanceof $root.com.quick.voice.proto.ChannelSubscribeRsq)return o;let k=new $root.com.quick.voice.proto.ChannelSubscribeRsq;if(o.channels){if(!Array.isArray(o.channels))throw TypeError(".com.quick.voice.proto.ChannelSubscribeRsq.channels: array expected");k.channels=[];for(let N=0;N<o.channels.length;++N){if(typeof o.channels[N]!="object")throw TypeError(".com.quick.voice.proto.ChannelSubscribeRsq.channels: object expected");k.channels[N]=$root.com.quick.voice.proto.UserChannel.fromObject(o.channels[N])}}return k},O.toObject=function(o,k){k||(k={});let N={};if((k.arrays||k.defaults)&&(N.channels=[]),o.channels&&o.channels.length){N.channels=[];for(let F=0;F<o.channels.length;++F)N.channels[F]=$root.com.quick.voice.proto.UserChannel.toObject(o.channels[F],k)}return N},O.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},O.getTypeUrl=function(o){return o===void 0&&(o="type.googleapis.com"),o+"/com.quick.voice.proto.ChannelSubscribeRsq"},O}(),j}(),D}(),z}(),$})(),enum_notifyName={onChangeNetwork:"网络情况变更",healthCheck:"心跳检测",onNetQuality:"网络质量回调",onLogin:"登录回调",onLocalStream:"本地媒体流发生变化",onDevicechange:"媒体设备发生变化",onRoomUser:"房间用户变化",onRoomUsers:"房间所有用户所有变化",onRoomUsersStreams:"房间某些用户媒体流变化",onRoomState:"房间状态变化",onJoinRoom:"加入房间回调",onQuitRoom:"退出房间回调",onPublish:"监听到流发布",onDataChannelPublish:"监听数据通道发布",onCloseTrack:"关闭轨道",onUpdateCall:"更新通讯状态",onUpdateStreams:"更新媒体流",onUpdatePermissions:"更新推流权限通知",onTokenExpired:"Token已过期",onDestroyRoom:"直播模式房间销毁",onUpdateBehavior:"行为允许权限变更",destroyRoom:"服务器要求销毁房间",onCDNPlayUrlAdd:"cdn播放地址变化",onDestroy:"SDK销毁"};ht(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 z=$.length;for(;--z>=0;)$[z]=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($,z,D,j,O){this.static_tree=$,this.extra_bits=z,this.extra_base=D,this.elems=j,this.max_length=O,this.has_stree=$&&$.length}let static_l_desc,static_d_desc,static_bl_desc;function TreeDesc($,z){this.dyn_tree=$,this.max_code=0,this.stat_desc=z}const d_code=$=>$<256?_dist_code[$]:_dist_code[256+($>>>7)],put_short=($,z)=>{$.pending_buf[$.pending++]=z&255,$.pending_buf[$.pending++]=z>>>8&255},send_bits=($,z,D)=>{$.bi_valid>Buf_size-D?($.bi_buf|=z<<$.bi_valid&65535,put_short($,$.bi_buf),$.bi_buf=z>>Buf_size-$.bi_valid,$.bi_valid+=D-Buf_size):($.bi_buf|=z<<$.bi_valid&65535,$.bi_valid+=D)},send_code=($,z,D)=>{send_bits($,D[z*2],D[z*2+1])},bi_reverse=($,z)=>{let D=0;do D|=$&1,$>>>=1,D<<=1;while(--z>0);return D>>>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=($,z)=>{const D=z.dyn_tree,j=z.max_code,O=z.stat_desc.static_tree,I=z.stat_desc.has_stree,o=z.stat_desc.extra_bits,k=z.stat_desc.extra_base,N=z.stat_desc.max_length;let F,J,X,Y,Q,te,ie=0;for(Y=0;Y<=MAX_BITS$1;Y++)$.bl_count[Y]=0;for(D[$.heap[$.heap_max]*2+1]=0,F=$.heap_max+1;F<HEAP_SIZE$1;F++)J=$.heap[F],Y=D[D[J*2+1]*2+1]+1,Y>N&&(Y=N,ie++),D[J*2+1]=Y,!(J>j)&&($.bl_count[Y]++,Q=0,J>=k&&(Q=o[J-k]),te=D[J*2],$.opt_len+=te*(Y+Q),I&&($.static_len+=te*(O[J*2+1]+Q)));if(ie!==0){do{for(Y=N-1;$.bl_count[Y]===0;)Y--;$.bl_count[Y]--,$.bl_count[Y+1]+=2,$.bl_count[N]--,ie-=2}while(ie>0);for(Y=N;Y!==0;Y--)for(J=$.bl_count[Y];J!==0;)X=$.heap[--F],!(X>j)&&(D[X*2+1]!==Y&&($.opt_len+=(Y-D[X*2+1])*D[X*2],D[X*2+1]=Y),J--)}},gen_codes=($,z,D)=>{const j=new Array(MAX_BITS$1+1);let O=0,I,o;for(I=1;I<=MAX_BITS$1;I++)O=O+D[I-1]<<1,j[I]=O;for(o=0;o<=z;o++){let k=$[o*2+1];k!==0&&($[o*2]=bi_reverse(j[k]++,k))}},tr_static_init=()=>{let $,z,D,j,O;const I=new Array(MAX_BITS$1+1);for(D=0,j=0;j<LENGTH_CODES$1-1;j++)for(base_length[j]=D,$=0;$<1<<extra_lbits[j];$++)_length_code[D++]=j;for(_length_code[D-1]=j,O=0,j=0;j<16;j++)for(base_dist[j]=O,$=0;$<1<<extra_dbits[j];$++)_dist_code[O++]=j;for(O>>=7;j<D_CODES$1;j++)for(base_dist[j]=O<<7,$=0;$<1<<extra_dbits[j]-7;$++)_dist_code[256+O++]=j;for(z=0;z<=MAX_BITS$1;z++)I[z]=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 z;for(z=0;z<L_CODES$1;z++)$.dyn_ltree[z*2]=0;for(z=0;z<D_CODES$1;z++)$.dyn_dtree[z*2]=0;for(z=0;z<BL_CODES$1;z++)$.bl_tree[z*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=($,z,D,j)=>{const O=z*2,I=D*2;return $[O]<$[I]||$[O]===$[I]&&j[z]<=j[D]},pqdownheap=($,z,D)=>{const j=$.heap[D];let O=D<<1;for(;O<=$.heap_len&&(O<$.heap_len&&smaller(z,$.heap[O+1],$.heap[O],$.depth)&&O++,!smaller(z,j,$.heap[O],$.depth));)$.heap[D]=$.heap[O],D=O,O<<=1;$.heap[D]=j},compress_block=($,z,D)=>{let j,O,I=0,o,k;if($.sym_next!==0)do j=$.pending_buf[$.sym_buf+I++]&255,j+=($.pending_buf[$.sym_buf+I++]&255)<<8,O=$.pending_buf[$.sym_buf+I++],j===0?send_code($,O,z):(o=_length_code[O],send_code($,o+LITERALS$1+1,z),k=extra_lbits[o],k!==0&&(O-=base_length[o],send_bits($,O,k)),j--,o=d_code(j),send_code($,o,D),k=extra_dbits[o],k!==0&&(j-=base_dist[o],send_bits($,j,k)));while(I<$.sym_next);send_code($,END_BLOCK,z)},build_tree=($,z)=>{const D=z.dyn_tree,j=z.stat_desc.static_tree,O=z.stat_desc.has_stree,I=z.stat_desc.elems;let o,k,N=-1,F;for($.heap_len=0,$.heap_max=HEAP_SIZE$1,o=0;o<I;o++)D[o*2]!==0?($.heap[++$.heap_len]=N=o,$.depth[o]=0):D[o*2+1]=0;for(;$.heap_len<2;)F=$.heap[++$.heap_len]=N<2?++N:0,D[F*2]=1,$.depth[F]=0,$.opt_len--,O&&($.static_len-=j[F*2+1]);for(z.max_code=N,o=$.heap_len>>1;o>=1;o--)pqdownheap($,D,o);F=I;do o=$.heap[1],$.heap[1]=$.heap[$.heap_len--],pqdownheap($,D,1),k=$.heap[1],$.heap[--$.heap_max]=o,$.heap[--$.heap_max]=k,D[F*2]=D[o*2]+D[k*2],$.depth[F]=($.depth[o]>=$.depth[k]?$.depth[o]:$.depth[k])+1,D[o*2+1]=D[k*2+1]=F,$.heap[1]=F++,pqdownheap($,D,1);while($.heap_len>=2);$.heap[--$.heap_max]=$.heap[1],gen_bitlen($,z),gen_codes(D,N,$.bl_count)},scan_tree=($,z,D)=>{let j,O=-1,I,o=z[0*2+1],k=0,N=7,F=4;for(o===0&&(N=138,F=3),z[(D+1)*2+1]=65535,j=0;j<=D;j++)I=o,o=z[(j+1)*2+1],!(++k<N&&I===o)&&(k<F?$.bl_tree[I*2]+=k:I!==0?(I!==O&&$.bl_tree[I*2]++,$.bl_tree[REP_3_6*2]++):k<=10?$.bl_tree[REPZ_3_10*2]++:$.bl_tree[REPZ_11_138*2]++,k=0,O=I,o===0?(N=138,F=3):I===o?(N=6,F=3):(N=7,F=4))},send_tree=($,z,D)=>{let j,O=-1,I,o=z[0*2+1],k=0,N=7,F=4;for(o===0&&(N=138,F=3),j=0;j<=D;j++)if(I=o,o=z[(j+1)*2+1],!(++k<N&&I===o)){if(k<F)do send_code($,I,$.bl_tree);while(--k!==0);else I!==0?(I!==O&&(send_code($,I,$.bl_tree),k--),send_code($,REP_3_6,$.bl_tree),send_bits($,k-3,2)):k<=10?(send_code($,REPZ_3_10,$.bl_tree),send_bits($,k-3,3)):(send_code($,REPZ_11_138,$.bl_tree),send_bits($,k-11,7));k=0,O=I,o===0?(N=138,F=3):I===o?(N=6,F=3):(N=7,F=4)}},build_bl_tree=$=>{let z;for(scan_tree($,$.dyn_ltree,$.l_desc.max_code),scan_tree($,$.dyn_dtree,$.d_desc.max_code),build_tree($,$.bl_desc),z=BL_CODES$1-1;z>=3&&$.bl_tree[bl_order[z]*2+1]===0;z--);return $.opt_len+=3*(z+1)+5+5+4,z},send_all_trees=($,z,D,j)=>{let O;for(send_bits($,z-257,5),send_bits($,D-1,5),send_bits($,j-4,4),O=0;O<j;O++)send_bits($,$.bl_tree[bl_order[O]*2+1],3);send_tree($,$.dyn_ltree,z-1),send_tree($,$.dyn_dtree,D-1)},detect_data_type=$=>{let z=4093624447,D;for(D=0;D<=31;D++,z>>>=1)if(z&1&&$.dyn_ltree[D*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(D=32;D<LITERALS$1;D++)if($.dyn_ltree[D*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=($,z,D,j)=>{send_bits($,(STORED_BLOCK<<1)+(j?1:0),3),bi_windup($),put_short($,D),put_short($,~D),D&&$.pending_buf.set($.window.subarray(z,z+D),$.pending),$.pending+=D},_tr_align$1=$=>{send_bits($,STATIC_TREES<<1,3),send_code($,END_BLOCK,static_ltree),bi_flush($)},_tr_flush_block$1=($,z,D,j)=>{let O,I,o=0;$.level>0?($.strm.data_type===Z_UNKNOWN$1&&($.strm.data_type=detect_data_type($)),build_tree($,$.l_desc),build_tree($,$.d_desc),o=build_bl_tree($),O=$.opt_len+3+7>>>3,I=$.static_len+3+7>>>3,I<=O&&(O=I)):O=I=D+5,D+4<=O&&z!==-1?_tr_stored_block$1($,z,D,j):$.strategy===Z_FIXED$1||I===O?(send_bits($,(STATIC_TREES<<1)+(j?1:0),3),compress_block($,static_ltree,static_dtree)):(send_bits($,(DYN_TREES<<1)+(j?1:0),3),send_all_trees($,$.l_desc.max_code+1,$.d_desc.max_code+1,o+1),compress_block($,$.dyn_ltree,$.dyn_dtree)),init_block($),j&&bi_windup($)},_tr_tally$1=($,z,D)=>($.pending_buf[$.sym_buf+$.sym_next++]=z,$.pending_buf[$.sym_buf+$.sym_next++]=z>>8,$.pending_buf[$.sym_buf+$.sym_next++]=D,z===0?$.dyn_ltree[D*2]++:($.matches++,z--,$.dyn_ltree[(_length_code[D]+LITERALS$1+1)*2]++,$.dyn_dtree[d_code(z)*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=($,z,D,j)=>{let O=$&65535|0,I=$>>>16&65535|0,o=0;for(;D!==0;){o=D>2e3?2e3:D,D-=o;do O=O+z[j++]|0,I=I+O|0;while(--o);O%=65521,I%=65521}return O|I<<16|0};var adler32_1=adler32;const makeTable=()=>{let $,z=[];for(var D=0;D<256;D++){$=D;for(var j=0;j<8;j++)$=$&1?3988292384^$>>>1:$>>>1;z[D]=$}return z},crcTable=new Uint32Array(makeTable()),crc32=($,z,D,j)=>{const O=crcTable,I=j+D;$^=-1;for(let o=j;o<I;o++)$=$>>>8^O[($^z[o])&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=($,z)=>($.msg=messages[z],z),rank=$=>$*2-($>4?9:0),zero=$=>{let z=$.length;for(;--z>=0;)$[z]=0},slide_hash=$=>{let z,D,j,O=$.w_size;z=$.hash_size,j=z;do D=$.head[--j],$.head[j]=D>=O?D-O:0;while(--z);z=O,j=z;do D=$.prev[--j],$.prev[j]=D>=O?D-O:0;while(--z)};let HASH_ZLIB=($,z,D)=>(z<<$.hash_shift^D)&$.hash_mask,HASH=HASH_ZLIB;const flush_pending=$=>{const z=$.state;let D=z.pending;D>$.avail_out&&(D=$.avail_out),D!==0&&($.output.set(z.pending_buf.subarray(z.pending_out,z.pending_out+D),$.next_out),$.next_out+=D,z.pending_out+=D,$.total_out+=D,$.avail_out-=D,z.pending-=D,z.pending===0&&(z.pending_out=0))},flush_block_only=($,z)=>{_tr_flush_block($,$.block_start>=0?$.block_start:-1,$.strstart-$.block_start,z),$.block_start=$.strstart,flush_pending($.strm)},put_byte=($,z)=>{$.pending_buf[$.pending++]=z},putShortMSB=($,z)=>{$.pending_buf[$.pending++]=z>>>8&255,$.pending_buf[$.pending++]=z&255},read_buf=($,z,D,j)=>{let O=$.avail_in;return O>j&&(O=j),O===0?0:($.avail_in-=O,z.set($.input.subarray($.next_in,$.next_in+O),D),$.state.wrap===1?$.adler=adler32_1($.adler,z,O,D):$.state.wrap===2&&($.adler=crc32_1($.adler,z,O,D)),$.next_in+=O,$.total_in+=O,O)},longest_match=($,z)=>{let D=$.max_chain_length,j=$.strstart,O,I,o=$.prev_length,k=$.nice_match;const N=$.strstart>$.w_size-MIN_LOOKAHEAD?$.strstart-($.w_size-MIN_LOOKAHEAD):0,F=$.window,J=$.w_mask,X=$.prev,Y=$.strstart+MAX_MATCH;let Q=F[j+o-1],te=F[j+o];$.prev_length>=$.good_match&&(D>>=2),k>$.lookahead&&(k=$.lookahead);do if(O=z,!(F[O+o]!==te||F[O+o-1]!==Q||F[O]!==F[j]||F[++O]!==F[j+1])){j+=2,O++;do;while(F[++j]===F[++O]&&F[++j]===F[++O]&&F[++j]===F[++O]&&F[++j]===F[++O]&&F[++j]===F[++O]&&F[++j]===F[++O]&&F[++j]===F[++O]&&F[++j]===F[++O]&&j<Y);if(I=MAX_MATCH-(Y-j),j=Y-MAX_MATCH,I>o){if($.match_start=z,o=I,I>=k)break;Q=F[j+o-1],te=F[j+o]}}while((z=X[z&J])>N&&--D!==0);return o<=$.lookahead?o:$.lookahead},fill_window=$=>{const z=$.w_size;let D,j,O;do{if(j=$.window_size-$.lookahead-$.strstart,$.strstart>=z+(z-MIN_LOOKAHEAD)&&($.window.set($.window.subarray(z,z+z-j),0),$.match_start-=z,$.strstart-=z,$.block_start-=z,$.insert>$.strstart&&($.insert=$.strstart),slide_hash($),j+=z),$.strm.avail_in===0)break;if(D=read_buf($.strm,$.window,$.strstart+$.lookahead,j),$.lookahead+=D,$.lookahead+$.insert>=MIN_MATCH)for(O=$.strstart-$.insert,$.ins_h=$.window[O],$.ins_h=HASH($,$.ins_h,$.window[O+1]);$.insert&&($.ins_h=HASH($,$.ins_h,$.window[O+MIN_MATCH-1]),$.prev[O&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=O,O++,$.insert--,!($.lookahead+$.insert<MIN_MATCH)););}while($.lookahead<MIN_LOOKAHEAD&&$.strm.avail_in!==0)},deflate_stored=($,z)=>{let D=$.pending_buf_size-5>$.w_size?$.w_size:$.pending_buf_size-5,j,O,I,o=0,k=$.strm.avail_in;do{if(j=65535,I=$.bi_valid+42>>3,$.strm.avail_out<I||(I=$.strm.avail_out-I,O=$.strstart-$.block_start,j>O+$.strm.avail_in&&(j=O+$.strm.avail_in),j>I&&(j=I),j<D&&(j===0&&z!==Z_FINISH$3||z===Z_NO_FLUSH$2||j!==O+$.strm.avail_in)))break;o=z===Z_FINISH$3&&j===O+$.strm.avail_in?1:0,_tr_stored_block($,0,0,o),$.pending_buf[$.pending-4]=j,$.pending_buf[$.pending-3]=j>>8,$.pending_buf[$.pending-2]=~j,$.pending_buf[$.pending-1]=~j>>8,flush_pending($.strm),O&&(O>j&&(O=j),$.strm.output.set($.window.subarray($.block_start,$.block_start+O),$.strm.next_out),$.strm.next_out+=O,$.strm.avail_out-=O,$.strm.total_out+=O,$.block_start+=O,j-=O),j&&(read_buf($.strm,$.strm.output,$.strm.next_out,j),$.strm.next_out+=j,$.strm.avail_out-=j,$.strm.total_out+=j)}while(o===0);return k-=$.strm.avail_in,k&&(k>=$.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<=k&&($.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-k,$.strm.next_in),$.strstart),$.strstart+=k,$.insert+=k>$.w_size-$.insert?$.w_size-$.insert:k),$.block_start=$.strstart),$.high_water<$.strstart&&($.high_water=$.strstart),o?BS_FINISH_DONE:z!==Z_NO_FLUSH$2&&z!==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,D=I>$.w_size?$.w_size:I,O=$.strstart-$.block_start,(O>=D||(O||z===Z_FINISH$3)&&z!==Z_NO_FLUSH$2&&$.strm.avail_in===0&&O<=I)&&(j=O>I?I:O,o=z===Z_FINISH$3&&$.strm.avail_in===0&&j===O?1:0,_tr_stored_block($,$.block_start,j,o),$.block_start+=j,flush_pending($.strm)),o?BS_FINISH_STARTED:BS_NEED_MORE)},deflate_fast=($,z)=>{let D,j;for(;;){if($.lookahead<MIN_LOOKAHEAD){if(fill_window($),$.lookahead<MIN_LOOKAHEAD&&z===Z_NO_FLUSH$2)return BS_NEED_MORE;if($.lookahead===0)break}if(D=0,$.lookahead>=MIN_MATCH&&($.ins_h=HASH($,$.ins_h,$.window[$.strstart+MIN_MATCH-1]),D=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart),D!==0&&$.strstart-D<=$.w_size-MIN_LOOKAHEAD&&($.match_length=longest_match($,D)),$.match_length>=MIN_MATCH)if(j=_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]),D=$.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 j=_tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++;if(j&&(flush_block_only($,!1),$.strm.avail_out===0))return BS_NEED_MORE}return $.insert=$.strstart<MIN_MATCH-1?$.strstart:MIN_MATCH-1,z===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=($,z)=>{let D,j,O;for(;;){if($.lookahead<MIN_LOOKAHEAD){if(fill_window($),$.lookahead<MIN_LOOKAHEAD&&z===Z_NO_FLUSH$2)return BS_NEED_MORE;if($.lookahead===0)break}if(D=0,$.lookahead>=MIN_MATCH&&($.ins_h=HASH($,$.ins_h,$.window[$.strstart+MIN_MATCH-1]),D=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart),$.prev_length=$.match_length,$.prev_match=$.match_start,$.match_length=MIN_MATCH-1,D!==0&&$.prev_length<$.max_lazy_match&&$.strstart-D<=$.w_size-MIN_LOOKAHEAD&&($.match_length=longest_match($,D),$.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){O=$.strstart+$.lookahead-MIN_MATCH,j=_tr_tally($,$.strstart-1-$.prev_match,$.prev_length-MIN_MATCH),$.lookahead-=$.prev_length-1,$.prev_length-=2;do++$.strstart<=O&&($.ins_h=HASH($,$.ins_h,$.window[$.strstart+MIN_MATCH-1]),D=$.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++,j&&(flush_block_only($,!1),$.strm.avail_out===0))return BS_NEED_MORE}else if($.match_available){if(j=_tr_tally($,0,$.window[$.strstart-1]),j&&flush_block_only($,!1),$.strstart++,$.lookahead--,$.strm.avail_out===0)return BS_NEED_MORE}else $.match_available=1,$.strstart++,$.lookahead--}return $.match_available&&(j=_tr_tally($,0,$.window[$.strstart-1]),$.match_available=0),$.insert=$.strstart<MIN_MATCH-1?$.strstart:MIN_MATCH-1,z===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=($,z)=>{let D,j,O,I;const o=$.window;for(;;){if($.lookahead<=MAX_MATCH){if(fill_window($),$.lookahead<=MAX_MATCH&&z===Z_NO_FLUSH$2)return BS_NEED_MORE;if($.lookahead===0)break}if($.match_length=0,$.lookahead>=MIN_MATCH&&$.strstart>0&&(O=$.strstart-1,j=o[O],j===o[++O]&&j===o[++O]&&j===o[++O])){I=$.strstart+MAX_MATCH;do;while(j===o[++O]&&j===o[++O]&&j===o[++O]&&j===o[++O]&&j===o[++O]&&j===o[++O]&&j===o[++O]&&j===o[++O]&&O<I);$.match_length=MAX_MATCH-(I-O),$.match_length>$.lookahead&&($.match_length=$.lookahead)}if($.match_length>=MIN_MATCH?(D=_tr_tally($,1,$.match_length-MIN_MATCH),$.lookahead-=$.match_length,$.strstart+=$.match_length,$.match_length=0):(D=_tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++),D&&(flush_block_only($,!1),$.strm.avail_out===0))return BS_NEED_MORE}return $.insert=0,z===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=($,z)=>{let D;for(;;){if($.lookahead===0&&(fill_window($),$.lookahead===0)){if(z===Z_NO_FLUSH$2)return BS_NEED_MORE;break}if($.match_length=0,D=_tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++,D&&(flush_block_only($,!1),$.strm.avail_out===0))return BS_NEED_MORE}return $.insert=0,z===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($,z,D,j,O){this.good_length=$,this.max_lazy=z,this.nice_length=D,this.max_chain=j,this.func=O}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 z=$.state;return!z||z.strm!==$||z.status!==INIT_STATE&&z.status!==GZIP_STATE&&z.status!==EXTRA_STATE&&z.status!==NAME_STATE&&z.status!==COMMENT_STATE&&z.status!==HCRC_STATE&&z.status!==BUSY_STATE&&z.status!==FINISH_STATE?1:0},deflateResetKeep=$=>{if(deflateStateCheck($))return err($,Z_STREAM_ERROR$2);$.total_in=$.total_out=0,$.data_type=Z_UNKNOWN;const z=$.state;return z.pending=0,z.pending_out=0,z.wrap<0&&(z.wrap=-z.wrap),z.status=z.wrap===2?GZIP_STATE:z.wrap?INIT_STATE:BUSY_STATE,$.adler=z.wrap===2?0:1,z.last_flush=-2,_tr_init(z),Z_OK$3},deflateReset=$=>{const z=deflateResetKeep($);return z===Z_OK$3&&lm_init($.state),z},deflateSetHeader=($,z)=>deflateStateCheck($)||$.state.wrap!==2?Z_STREAM_ERROR$2:($.state.gzhead=z,Z_OK$3),deflateInit2=($,z,D,j,O,I)=>{if(!$)return Z_STREAM_ERROR$2;let o=1;if(z===Z_DEFAULT_COMPRESSION$1&&(z=6),j<0?(o=0,j=-j):j>15&&(o=2,j-=16),O<1||O>MAX_MEM_LEVEL||D!==Z_DEFLATED$2||j<8||j>15||z<0||z>9||I<0||I>Z_FIXED||j===8&&o!==1)return err($,Z_STREAM_ERROR$2);j===8&&(j=9);const k=new DeflateState;return $.state=k,k.strm=$,k.status=INIT_STATE,k.wrap=o,k.gzhead=null,k.w_bits=j,k.w_size=1<<k.w_bits,k.w_mask=k.w_size-1,k.hash_bits=O+7,k.hash_size=1<<k.hash_bits,k.hash_mask=k.hash_size-1,k.hash_shift=~~((k.hash_bits+MIN_MATCH-1)/MIN_MATCH),k.window=new Uint8Array(k.w_size*2),k.head=new Uint16Array(k.hash_size),k.prev=new Uint16Array(k.w_size),k.lit_bufsize=1<<O+6,k.pending_buf_size=k.lit_bufsize*4,k.pending_buf=new Uint8Array(k.pending_buf_size),k.sym_buf=k.lit_bufsize,k.sym_end=(k.lit_bufsize-1)*3,k.level=z,k.strategy=I,k.method=D,deflateReset($)},deflateInit=($,z)=>deflateInit2($,z,Z_DEFLATED$2,MAX_WBITS$1,DEF_MEM_LEVEL,Z_DEFAULT_STRATEGY$1),deflate$2=($,z)=>{if(deflateStateCheck($)||z>Z_BLOCK$1||z<0)return $?err($,Z_STREAM_ERROR$2):Z_STREAM_ERROR$2;const D=$.state;if(!$.output||$.avail_in!==0&&!$.input||D.status===FINISH_STATE&&z!==Z_FINISH$3)return err($,$.avail_out===0?Z_BUF_ERROR$1:Z_STREAM_ERROR$2);const j=D.last_flush;if(D.last_flush=z,D.pending!==0){if(flush_pending($),$.avail_out===0)return D.last_flush=-1,Z_OK$3}else if($.avail_in===0&&rank(z)<=rank(j)&&z!==Z_FINISH$3)return err($,Z_BUF_ERROR$1);if(D.status===FINISH_STATE&&$.avail_in!==0)return err($,Z_BUF_ERROR$1);if(D.status===INIT_STATE&&D.wrap===0&&(D.status=BUSY_STATE),D.status===INIT_STATE){let O=Z_DEFLATED$2+(D.w_bits-8<<4)<<8,I=-1;if(D.strategy>=Z_HUFFMAN_ONLY||D.level<2?I=0:D.level<6?I=1:D.level===6?I=2:I=3,O|=I<<6,D.strstart!==0&&(O|=PRESET_DICT),O+=31-O%31,putShortMSB(D,O),D.strstart!==0&&(putShortMSB(D,$.adler>>>16),putShortMSB(D,$.adler&65535)),$.adler=1,D.status=BUSY_STATE,flush_pending($),D.pending!==0)return D.last_flush=-1,Z_OK$3}if(D.status===GZIP_STATE){if($.adler=0,put_byte(D,31),put_byte(D,139),put_byte(D,8),D.gzhead)put_byte(D,(D.gzhead.text?1:0)+(D.gzhead.hcrc?2:0)+(D.gzhead.extra?4:0)+(D.gzhead.name?8:0)+(D.gzhead.comment?16:0)),put_byte(D,D.gzhead.time&255),put_byte(D,D.gzhead.time>>8&255),put_byte(D,D.gzhead.time>>16&255),put_byte(D,D.gzhead.time>>24&255),put_byte(D,D.level===9?2:D.strategy>=Z_HUFFMAN_ONLY||D.level<2?4:0),put_byte(D,D.gzhead.os&255),D.gzhead.extra&&D.gzhead.extra.length&&(put_byte(D,D.gzhead.extra.length&255),put_byte(D,D.gzhead.extra.length>>8&255)),D.gzhead.hcrc&&($.adler=crc32_1($.adler,D.pending_buf,D.pending,0)),D.gzindex=0,D.status=EXTRA_STATE;else if(put_byte(D,0),put_byte(D,0),put_byte(D,0),put_byte(D,0),put_byte(D,0),put_byte(D,D.level===9?2:D.strategy>=Z_HUFFMAN_ONLY||D.level<2?4:0),put_byte(D,OS_CODE),D.status=BUSY_STATE,flush_pending($),D.pending!==0)return D.last_flush=-1,Z_OK$3}if(D.status===EXTRA_STATE){if(D.gzhead.extra){let O=D.pending,I=(D.gzhead.extra.length&65535)-D.gzindex;for(;D.pending+I>D.pending_buf_size;){let k=D.pending_buf_size-D.pending;if(D.pending_buf.set(D.gzhead.extra.subarray(D.gzindex,D.gzindex+k),D.pending),D.pending=D.pending_buf_size,D.gzhead.hcrc&&D.pending>O&&($.adler=crc32_1($.adler,D.pending_buf,D.pending-O,O)),D.gzindex+=k,flush_pending($),D.pending!==0)return D.last_flush=-1,Z_OK$3;O=0,I-=k}let o=new Uint8Array(D.gzhead.extra);D.pending_buf.set(o.subarray(D.gzindex,D.gzindex+I),D.pending),D.pending+=I,D.gzhead.hcrc&&D.pending>O&&($.adler=crc32_1($.adler,D.pending_buf,D.pending-O,O)),D.gzindex=0}D.status=NAME_STATE}if(D.status===NAME_STATE){if(D.gzhead.name){let O=D.pending,I;do{if(D.pending===D.pending_buf_size){if(D.gzhead.hcrc&&D.pending>O&&($.adler=crc32_1($.adler,D.pending_buf,D.pending-O,O)),flush_pending($),D.pending!==0)return D.last_flush=-1,Z_OK$3;O=0}D.gzindex<D.gzhead.name.length?I=D.gzhead.name.charCodeAt(D.gzindex++)&255:I=0,put_byte(D,I)}while(I!==0);D.gzhead.hcrc&&D.pending>O&&($.adler=crc32_1($.adler,D.pending_buf,D.pending-O,O)),D.gzindex=0}D.status=COMMENT_STATE}if(D.status===COMMENT_STATE){if(D.gzhead.comment){let O=D.pending,I;do{if(D.pending===D.pending_buf_size){if(D.gzhead.hcrc&&D.pending>O&&($.adler=crc32_1($.adler,D.pending_buf,D.pending-O,O)),flush_pending($),D.pending!==0)return D.last_flush=-1,Z_OK$3;O=0}D.gzindex<D.gzhead.comment.length?I=D.gzhead.comment.charCodeAt(D.gzindex++)&255:I=0,put_byte(D,I)}while(I!==0);D.gzhead.hcrc&&D.pending>O&&($.adler=crc32_1($.adler,D.pending_buf,D.pending-O,O))}D.status=HCRC_STATE}if(D.status===HCRC_STATE){if(D.gzhead.hcrc){if(D.pending+2>D.pending_buf_size&&(flush_pending($),D.pending!==0))return D.last_flush=-1,Z_OK$3;put_byte(D,$.adler&255),put_byte(D,$.adler>>8&255),$.adler=0}if(D.status=BUSY_STATE,flush_pending($),D.pending!==0)return D.last_flush=-1,Z_OK$3}if($.avail_in!==0||D.lookahead!==0||z!==Z_NO_FLUSH$2&&D.status!==FINISH_STATE){let O=D.level===0?deflate_stored(D,z):D.strategy===Z_HUFFMAN_ONLY?deflate_huff(D,z):D.strategy===Z_RLE?deflate_rle(D,z):configuration_table[D.level].func(D,z);if((O===BS_FINISH_STARTED||O===BS_FINISH_DONE)&&(D.status=FINISH_STATE),O===BS_NEED_MORE||O===BS_FINISH_STARTED)return $.avail_out===0&&(D.last_flush=-1),Z_OK$3;if(O===BS_BLOCK_DONE&&(z===Z_PARTIAL_FLUSH?_tr_align(D):z!==Z_BLOCK$1&&(_tr_stored_block(D,0,0,!1),z===Z_FULL_FLUSH$1&&(zero(D.head),D.lookahead===0&&(D.strstart=0,D.block_start=0,D.insert=0))),flush_pending($),$.avail_out===0))return D.last_flush=-1,Z_OK$3}return z!==Z_FINISH$3?Z_OK$3:D.wrap<=0?Z_STREAM_END$3:(D.wrap===2?(put_byte(D,$.adler&255),put_byte(D,$.adler>>8&255),put_byte(D,$.adler>>16&255),put_byte(D,$.adler>>24&255),put_byte(D,$.total_in&255),put_byte(D,$.total_in>>8&255),put_byte(D,$.total_in>>16&255),put_byte(D,$.total_in>>24&255)):(putShortMSB(D,$.adler>>>16),putShortMSB(D,$.adler&65535)),flush_pending($),D.wrap>0&&(D.wrap=-D.wrap),D.pending!==0?Z_OK$3:Z_STREAM_END$3)},deflateEnd=$=>{if(deflateStateCheck($))return Z_STREAM_ERROR$2;const z=$.state.status;return $.state=null,z===BUSY_STATE?err($,Z_DATA_ERROR$2):Z_OK$3},deflateSetDictionary=($,z)=>{let D=z.length;if(deflateStateCheck($))return Z_STREAM_ERROR$2;const j=$.state,O=j.wrap;if(O===2||O===1&&j.status!==INIT_STATE||j.lookahead)return Z_STREAM_ERROR$2;if(O===1&&($.adler=adler32_1($.adler,z,D,0)),j.wrap=0,D>=j.w_size){O===0&&(zero(j.head),j.strstart=0,j.block_start=0,j.insert=0);let N=new Uint8Array(j.w_size);N.set(z.subarray(D-j.w_size,D),0),z=N,D=j.w_size}const I=$.avail_in,o=$.next_in,k=$.input;for($.avail_in=D,$.next_in=0,$.input=z,fill_window(j);j.lookahead>=MIN_MATCH;){let N=j.strstart,F=j.lookahead-(MIN_MATCH-1);do j.ins_h=HASH(j,j.ins_h,j.window[N+MIN_MATCH-1]),j.prev[N&j.w_mask]=j.head[j.ins_h],j.head[j.ins_h]=N,N++;while(--F);j.strstart=N,j.lookahead=MIN_MATCH-1,fill_window(j)}return j.strstart+=j.lookahead,j.block_start=j.strstart,j.insert=j.lookahead,j.lookahead=0,j.match_length=j.prev_length=MIN_MATCH-1,j.match_available=0,$.next_in=o,$.input=k,$.avail_in=I,j.wrap=O,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=($,z)=>Object.prototype.hasOwnProperty.call($,z);var assign=function($){const z=Array.prototype.slice.call(arguments,1);for(;z.length;){const D=z.shift();if(D){if(typeof D!="object")throw new TypeError(D+"must be non-object");for(const j in D)_has(D,j)&&($[j]=D[j])}}return $},flattenChunks=$=>{let z=0;for(let j=0,O=$.length;j<O;j++)z+=$[j].length;const D=new Uint8Array(z);for(let j=0,O=0,I=$.length;j<I;j++){let o=$[j];D.set(o,O),O+=o.length}return D},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 z,D,j,O,I,o=$.length,k=0;for(O=0;O<o;O++)D=$.charCodeAt(O),(D&64512)===55296&&O+1<o&&(j=$.charCodeAt(O+1),(j&64512)===56320&&(D=65536+(D-55296<<10)+(j-56320),O++)),k+=D<128?1:D<2048?2:D<65536?3:4;for(z=new Uint8Array(k),I=0,O=0;I<k;O++)D=$.charCodeAt(O),(D&64512)===55296&&O+1<o&&(j=$.charCodeAt(O+1),(j&64512)===56320&&(D=65536+(D-55296<<10)+(j-56320),O++)),D<128?z[I++]=D:D<2048?(z[I++]=192|D>>>6,z[I++]=128|D&63):D<65536?(z[I++]=224|D>>>12,z[I++]=128|D>>>6&63,z[I++]=128|D&63):(z[I++]=240|D>>>18,z[I++]=128|D>>>12&63,z[I++]=128|D>>>6&63,z[I++]=128|D&63);return z};const buf2binstring=($,z)=>{if(z<65534&&$.subarray&&STR_APPLY_UIA_OK)return String.fromCharCode.apply(null,$.length===z?$:$.subarray(0,z));let D="";for(let j=0;j<z;j++)D+=String.fromCharCode($[j]);return D};var buf2string=($,z)=>{const D=z||$.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode($.subarray(0,z));let j,O;const I=new Array(D*2);for(O=0,j=0;j<D;){let o=$[j++];if(o<128){I[O++]=o;continue}let k=_utf8len[o];if(k>4){I[O++]=65533,j+=k-1;continue}for(o&=k===2?31:k===3?15:7;k>1&&j<D;)o=o<<6|$[j++]&63,k--;if(k>1){I[O++]=65533;continue}o<65536?I[O++]=o:(o-=65536,I[O++]=55296|o>>10&1023,I[O++]=56320|o&1023)}return buf2binstring(I,O)},utf8border=($,z)=>{z=z||$.length,z>$.length&&(z=$.length);let D=z-1;for(;D>=0&&($[D]&192)===128;)D--;return D<0||D===0?z:D+_utf8len[$[D]]>z?D:z},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 z=this.options;z.raw&&z.windowBits>0?z.windowBits=-z.windowBits:z.gzip&&z.windowBits>0&&z.windowBits<16&&(z.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let D=deflate_1$2.deflateInit2(this.strm,z.level,z.method,z.windowBits,z.memLevel,z.strategy);if(D!==Z_OK$2)throw new Error(messages[D]);if(z.header&&deflate_1$2.deflateSetHeader(this.strm,z.header),z.dictionary){let j;if(typeof z.dictionary=="string"?j=strings.string2buf(z.dictionary):toString$1.call(z.dictionary)==="[object ArrayBuffer]"?j=new Uint8Array(z.dictionary):j=z.dictionary,D=deflate_1$2.deflateSetDictionary(this.strm,j),D!==Z_OK$2)throw new Error(messages[D]);this._dict_set=!0}}Deflate$1.prototype.push=function($,z){const D=this.strm,j=this.options.chunkSize;let O,I;if(this.ended)return!1;for(z===~~z?I=z:I=z===!0?Z_FINISH$2:Z_NO_FLUSH$1,typeof $=="string"?D.input=strings.string2buf($):toString$1.call($)==="[object ArrayBuffer]"?D.input=new Uint8Array($):D.input=$,D.next_in=0,D.avail_in=D.input.length;;){if(D.avail_out===0&&(D.output=new Uint8Array(j),D.next_out=0,D.avail_out=j),(I===Z_SYNC_FLUSH||I===Z_FULL_FLUSH)&&D.avail_out<=6){this.onData(D.output.subarray(0,D.next_out)),D.avail_out=0;continue}if(O=deflate_1$2.deflate(D,I),O===Z_STREAM_END$2)return D.next_out>0&&this.onData(D.output.subarray(0,D.next_out)),O=deflate_1$2.deflateEnd(this.strm),this.onEnd(O),this.ended=!0,O===Z_OK$2;if(D.avail_out===0){this.onData(D.output);continue}if(I>0&&D.next_out>0){this.onData(D.output.subarray(0,D.next_out)),D.avail_out=0;continue}if(D.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($,z){const D=new Deflate$1(z);if(D.push($,!0),D.err)throw D.msg||messages[D.err];return D.result}function deflateRaw$1($,z){return z=z||{},z.raw=!0,deflate$1($,z)}function gzip$1($,z){return z=z||{},z.gzip=!0,deflate$1($,z)}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 $(z,D){let j,O,I,o,k,N,F,J,X,Y,Q,te,ie,ne,oe,ce,we,se,ye,fe,pe,ve,Te,me;const _e=z.state;j=z.next_in,Te=z.input,O=j+(z.avail_in-5),I=z.next_out,me=z.output,o=I-(D-z.avail_out),k=I+(z.avail_out-257),N=_e.dmax,F=_e.wsize,J=_e.whave,X=_e.wnext,Y=_e.window,Q=_e.hold,te=_e.bits,ie=_e.lencode,ne=_e.distcode,oe=(1<<_e.lenbits)-1,ce=(1<<_e.distbits)-1;e:do{te<15&&(Q+=Te[j++]<<te,te+=8,Q+=Te[j++]<<te,te+=8),we=ie[Q&oe];t:for(;;){if(se=we>>>24,Q>>>=se,te-=se,se=we>>>16&255,se===0)me[I++]=we&65535;else if(se&16){ye=we&65535,se&=15,se&&(te<se&&(Q+=Te[j++]<<te,te+=8),ye+=Q&(1<<se)-1,Q>>>=se,te-=se),te<15&&(Q+=Te[j++]<<te,te+=8,Q+=Te[j++]<<te,te+=8),we=ne[Q&ce];n:for(;;){if(se=we>>>24,Q>>>=se,te-=se,se=we>>>16&255,se&16){if(fe=we&65535,se&=15,te<se&&(Q+=Te[j++]<<te,te+=8,te<se&&(Q+=Te[j++]<<te,te+=8)),fe+=Q&(1<<se)-1,fe>N){z.msg="invalid distance too far back",_e.mode=BAD$1;break e}if(Q>>>=se,te-=se,se=I-o,fe>se){if(se=fe-se,se>J&&_e.sane){z.msg="invalid distance too far back",_e.mode=BAD$1;break e}if(pe=0,ve=Y,X===0){if(pe+=F-se,se<ye){ye-=se;do me[I++]=Y[pe++];while(--se);pe=I-fe,ve=me}}else if(X<se){if(pe+=F+X-se,se-=X,se<ye){ye-=se;do me[I++]=Y[pe++];while(--se);if(pe=0,X<ye){se=X,ye-=se;do me[I++]=Y[pe++];while(--se);pe=I-fe,ve=me}}}else if(pe+=X-se,se<ye){ye-=se;do me[I++]=Y[pe++];while(--se);pe=I-fe,ve=me}for(;ye>2;)me[I++]=ve[pe++],me[I++]=ve[pe++],me[I++]=ve[pe++],ye-=3;ye&&(me[I++]=ve[pe++],ye>1&&(me[I++]=ve[pe++]))}else{pe=I-fe;do me[I++]=me[pe++],me[I++]=me[pe++],me[I++]=me[pe++],ye-=3;while(ye>2);ye&&(me[I++]=me[pe++],ye>1&&(me[I++]=me[pe++]))}}else if((se&64)===0){we=ne[(we&65535)+(Q&(1<<se)-1)];continue n}else{z.msg="invalid distance code",_e.mode=BAD$1;break e}break}}else if((se&64)===0){we=ie[(we&65535)+(Q&(1<<se)-1)];continue t}else if(se&32){_e.mode=TYPE$1;break e}else{z.msg="invalid literal/length code",_e.mode=BAD$1;break e}break}}while(j<O&&I<k);ye=te>>3,j-=ye,te-=ye<<3,Q&=(1<<te)-1,z.next_in=j,z.next_out=I,z.avail_in=j<O?5+(O-j):5-(j-O),z.avail_out=I<k?257+(k-I):257-(I-k),_e.hold=Q,_e.bits=te};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=($,z,D,j,O,I,o,k)=>{const N=k.bits;let F=0,J=0,X=0,Y=0,Q=0,te=0,ie=0,ne=0,oe=0,ce=0,we,se,ye,fe,pe,ve=null,Te;const me=new Uint16Array(MAXBITS+1),_e=new Uint16Array(MAXBITS+1);let De=null,je,Fe,qe;for(F=0;F<=MAXBITS;F++)me[F]=0;for(J=0;J<j;J++)me[z[D+J]]++;for(Q=N,Y=MAXBITS;Y>=1&&me[Y]===0;Y--);if(Q>Y&&(Q=Y),Y===0)return O[I++]=1<<24|64<<16|0,O[I++]=1<<24|64<<16|0,k.bits=1,0;for(X=1;X<Y&&me[X]===0;X++);for(Q<X&&(Q=X),ne=1,F=1;F<=MAXBITS;F++)if(ne<<=1,ne-=me[F],ne<0)return-1;if(ne>0&&($===CODES$1||Y!==1))return-1;for(_e[1]=0,F=1;F<MAXBITS;F++)_e[F+1]=_e[F]+me[F];for(J=0;J<j;J++)z[D+J]!==0&&(o[_e[z[D+J]]++]=J);if($===CODES$1?(ve=De=o,Te=20):$===LENS$1?(ve=lbase,De=lext,Te=257):(ve=dbase,De=dext,Te=0),ce=0,J=0,F=X,pe=I,te=Q,ie=0,ye=-1,oe=1<<Q,fe=oe-1,$===LENS$1&&oe>ENOUGH_LENS$1||$===DISTS$1&&oe>ENOUGH_DISTS$1)return 1;for(;;){je=F-ie,o[J]+1<Te?(Fe=0,qe=o[J]):o[J]>=Te?(Fe=De[o[J]-Te],qe=ve[o[J]-Te]):(Fe=96,qe=0),we=1<<F-ie,se=1<<te,X=se;do se-=we,O[pe+(ce>>ie)+se]=je<<24|Fe<<16|qe|0;while(se!==0);for(we=1<<F-1;ce&we;)we>>=1;if(we!==0?(ce&=we-1,ce+=we):ce=0,J++,--me[F]===0){if(F===Y)break;F=z[D+o[J]]}if(F>Q&&(ce&fe)!==ye){for(ie===0&&(ie=Q),pe+=X,te=F-ie,ne=1<<te;te+ie<Y&&(ne-=me[te+ie],!(ne<=0));)te++,ne<<=1;if(oe+=1<<te,$===LENS$1&&oe>ENOUGH_LENS$1||$===DISTS$1&&oe>ENOUGH_DISTS$1)return 1;ye=ce&fe,O[ye]=Q<<24|te<<16|pe-I|0}}return ce!==0&&(O[pe+ce]=F-ie<<24|64<<16|0),k.bits=Q,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 z=$.state;return!z||z.strm!==$||z.mode<HEAD||z.mode>SYNC?1:0},inflateResetKeep=$=>{if(inflateStateCheck($))return Z_STREAM_ERROR$1;const z=$.state;return $.total_in=$.total_out=z.total=0,$.msg="",z.wrap&&($.adler=z.wrap&1),z.mode=HEAD,z.last=0,z.havedict=0,z.flags=-1,z.dmax=32768,z.head=null,z.hold=0,z.bits=0,z.lencode=z.lendyn=new Int32Array(ENOUGH_LENS),z.distcode=z.distdyn=new Int32Array(ENOUGH_DISTS),z.sane=1,z.back=-1,Z_OK$1},inflateReset=$=>{if(inflateStateCheck($))return Z_STREAM_ERROR$1;const z=$.state;return z.wsize=0,z.whave=0,z.wnext=0,inflateResetKeep($)},inflateReset2=($,z)=>{let D;if(inflateStateCheck($))return Z_STREAM_ERROR$1;const j=$.state;return z<0?(D=0,z=-z):(D=(z>>4)+5,z<48&&(z&=15)),z&&(z<8||z>15)?Z_STREAM_ERROR$1:(j.window!==null&&j.wbits!==z&&(j.window=null),j.wrap=D,j.wbits=z,inflateReset($))},inflateInit2=($,z)=>{if(!$)return Z_STREAM_ERROR$1;const D=new InflateState;$.state=D,D.strm=$,D.window=null,D.mode=HEAD;const j=inflateReset2($,z);return j!==Z_OK$1&&($.state=null),j},inflateInit=$=>inflateInit2($,DEF_WBITS);let virgin=!0,lenfix,distfix;const fixedtables=$=>{if(virgin){lenfix=new Int32Array(512),distfix=new Int32Array(32);let z=0;for(;z<144;)$.lens[z++]=8;for(;z<256;)$.lens[z++]=9;for(;z<280;)$.lens[z++]=7;for(;z<288;)$.lens[z++]=8;for(inftrees(LENS,$.lens,0,288,lenfix,0,$.work,{bits:9}),z=0;z<32;)$.lens[z++]=5;inftrees(DISTS,$.lens,0,32,distfix,0,$.work,{bits:5}),virgin=!1}$.lencode=lenfix,$.lenbits=9,$.distcode=distfix,$.distbits=5},updatewindow=($,z,D,j)=>{let O;const I=$.state;return I.window===null&&(I.wsize=1<<I.wbits,I.wnext=0,I.whave=0,I.window=new Uint8Array(I.wsize)),j>=I.wsize?(I.window.set(z.subarray(D-I.wsize,D),0),I.wnext=0,I.whave=I.wsize):(O=I.wsize-I.wnext,O>j&&(O=j),I.window.set(z.subarray(D-j,D-j+O),I.wnext),j-=O,j?(I.window.set(z.subarray(D-j,D),0),I.wnext=j,I.whave=I.wsize):(I.wnext+=O,I.wnext===I.wsize&&(I.wnext=0),I.whave<I.wsize&&(I.whave+=O))),0},inflate$2=($,z)=>{let D,j,O,I,o,k,N,F,J,X,Y,Q,te,ie,ne=0,oe,ce,we,se,ye,fe,pe,ve;const Te=new Uint8Array(4);let me,_e;const De=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;D=$.state,D.mode===TYPE&&(D.mode=TYPEDO),o=$.next_out,O=$.output,N=$.avail_out,I=$.next_in,j=$.input,k=$.avail_in,F=D.hold,J=D.bits,X=k,Y=N,ve=Z_OK$1;e:for(;;)switch(D.mode){case HEAD:if(D.wrap===0){D.mode=TYPEDO;break}for(;J<16;){if(k===0)break e;k--,F+=j[I++]<<J,J+=8}if(D.wrap&2&&F===35615){D.wbits===0&&(D.wbits=15),D.check=0,Te[0]=F&255,Te[1]=F>>>8&255,D.check=crc32_1(D.check,Te,2,0),F=0,J=0,D.mode=FLAGS;break}if(D.head&&(D.head.done=!1),!(D.wrap&1)||(((F&255)<<8)+(F>>8))%31){$.msg="incorrect header check",D.mode=BAD;break}if((F&15)!==Z_DEFLATED){$.msg="unknown compression method",D.mode=BAD;break}if(F>>>=4,J-=4,pe=(F&15)+8,D.wbits===0&&(D.wbits=pe),pe>15||pe>D.wbits){$.msg="invalid window size",D.mode=BAD;break}D.dmax=1<<D.wbits,D.flags=0,$.adler=D.check=1,D.mode=F&512?DICTID:TYPE,F=0,J=0;break;case FLAGS:for(;J<16;){if(k===0)break e;k--,F+=j[I++]<<J,J+=8}if(D.flags=F,(D.flags&255)!==Z_DEFLATED){$.msg="unknown compression method",D.mode=BAD;break}if(D.flags&57344){$.msg="unknown header flags set",D.mode=BAD;break}D.head&&(D.head.text=F>>8&1),D.flags&512&&D.wrap&4&&(Te[0]=F&255,Te[1]=F>>>8&255,D.check=crc32_1(D.check,Te,2,0)),F=0,J=0,D.mode=TIME;case TIME:for(;J<32;){if(k===0)break e;k--,F+=j[I++]<<J,J+=8}D.head&&(D.head.time=F),D.flags&512&&D.wrap&4&&(Te[0]=F&255,Te[1]=F>>>8&255,Te[2]=F>>>16&255,Te[3]=F>>>24&255,D.check=crc32_1(D.check,Te,4,0)),F=0,J=0,D.mode=OS;case OS:for(;J<16;){if(k===0)break e;k--,F+=j[I++]<<J,J+=8}D.head&&(D.head.xflags=F&255,D.head.os=F>>8),D.flags&512&&D.wrap&4&&(Te[0]=F&255,Te[1]=F>>>8&255,D.check=crc32_1(D.check,Te,2,0)),F=0,J=0,D.mode=EXLEN;case EXLEN:if(D.flags&1024){for(;J<16;){if(k===0)break e;k--,F+=j[I++]<<J,J+=8}D.length=F,D.head&&(D.head.extra_len=F),D.flags&512&&D.wrap&4&&(Te[0]=F&255,Te[1]=F>>>8&255,D.check=crc32_1(D.check,Te,2,0)),F=0,J=0}else D.head&&(D.head.extra=null);D.mode=EXTRA;case EXTRA:if(D.flags&1024&&(Q=D.length,Q>k&&(Q=k),Q&&(D.head&&(pe=D.head.extra_len-D.length,D.head.extra||(D.head.extra=new Uint8Array(D.head.extra_len)),D.head.extra.set(j.subarray(I,I+Q),pe)),D.flags&512&&D.wrap&4&&(D.check=crc32_1(D.check,j,Q,I)),k-=Q,I+=Q,D.length-=Q),D.length))break e;D.length=0,D.mode=NAME;case NAME:if(D.flags&2048){if(k===0)break e;Q=0;do pe=j[I+Q++],D.head&&pe&&D.length<65536&&(D.head.name+=String.fromCharCode(pe));while(pe&&Q<k);if(D.flags&512&&D.wrap&4&&(D.check=crc32_1(D.check,j,Q,I)),k-=Q,I+=Q,pe)break e}else D.head&&(D.head.name=null);D.length=0,D.mode=COMMENT;case COMMENT:if(D.flags&4096){if(k===0)break e;Q=0;do pe=j[I+Q++],D.head&&pe&&D.length<65536&&(D.head.comment+=String.fromCharCode(pe));while(pe&&Q<k);if(D.flags&512&&D.wrap&4&&(D.check=crc32_1(D.check,j,Q,I)),k-=Q,I+=Q,pe)break e}else D.head&&(D.head.comment=null);D.mode=HCRC;case HCRC:if(D.flags&512){for(;J<16;){if(k===0)break e;k--,F+=j[I++]<<J,J+=8}if(D.wrap&4&&F!==(D.check&65535)){$.msg="header crc mismatch",D.mode=BAD;break}F=0,J=0}D.head&&(D.head.hcrc=D.flags>>9&1,D.head.done=!0),$.adler=D.check=0,D.mode=TYPE;break;case DICTID:for(;J<32;){if(k===0)break e;k--,F+=j[I++]<<J,J+=8}$.adler=D.check=zswap32(F),F=0,J=0,D.mode=DICT;case DICT:if(D.havedict===0)return $.next_out=o,$.avail_out=N,$.next_in=I,$.avail_in=k,D.hold=F,D.bits=J,Z_NEED_DICT$1;$.adler=D.check=1,D.mode=TYPE;case TYPE:if(z===Z_BLOCK||z===Z_TREES)break e;case TYPEDO:if(D.last){F>>>=J&7,J-=J&7,D.mode=CHECK;break}for(;J<3;){if(k===0)break e;k--,F+=j[I++]<<J,J+=8}switch(D.last=F&1,F>>>=1,J-=1,F&3){case 0:D.mode=STORED;break;case 1:if(fixedtables(D),D.mode=LEN_,z===Z_TREES){F>>>=2,J-=2;break e}break;case 2:D.mode=TABLE;break;case 3:$.msg="invalid block type",D.mode=BAD}F>>>=2,J-=2;break;case STORED:for(F>>>=J&7,J-=J&7;J<32;){if(k===0)break e;k--,F+=j[I++]<<J,J+=8}if((F&65535)!==(F>>>16^65535)){$.msg="invalid stored block lengths",D.mode=BAD;break}if(D.length=F&65535,F=0,J=0,D.mode=COPY_,z===Z_TREES)break e;case COPY_:D.mode=COPY;case COPY:if(Q=D.length,Q){if(Q>k&&(Q=k),Q>N&&(Q=N),Q===0)break e;O.set(j.subarray(I,I+Q),o),k-=Q,I+=Q,N-=Q,o+=Q,D.length-=Q;break}D.mode=TYPE;break;case TABLE:for(;J<14;){if(k===0)break e;k--,F+=j[I++]<<J,J+=8}if(D.nlen=(F&31)+257,F>>>=5,J-=5,D.ndist=(F&31)+1,F>>>=5,J-=5,D.ncode=(F&15)+4,F>>>=4,J-=4,D.nlen>286||D.ndist>30){$.msg="too many length or distance symbols",D.mode=BAD;break}D.have=0,D.mode=LENLENS;case LENLENS:for(;D.have<D.ncode;){for(;J<3;){if(k===0)break e;k--,F+=j[I++]<<J,J+=8}D.lens[De[D.have++]]=F&7,F>>>=3,J-=3}for(;D.have<19;)D.lens[De[D.have++]]=0;if(D.lencode=D.lendyn,D.lenbits=7,me={bits:D.lenbits},ve=inftrees(CODES,D.lens,0,19,D.lencode,0,D.work,me),D.lenbits=me.bits,ve){$.msg="invalid code lengths set",D.mode=BAD;break}D.have=0,D.mode=CODELENS;case CODELENS:for(;D.have<D.nlen+D.ndist;){for(;ne=D.lencode[F&(1<<D.lenbits)-1],oe=ne>>>24,ce=ne>>>16&255,we=ne&65535,!(oe<=J);){if(k===0)break e;k--,F+=j[I++]<<J,J+=8}if(we<16)F>>>=oe,J-=oe,D.lens[D.have++]=we;else{if(we===16){for(_e=oe+2;J<_e;){if(k===0)break e;k--,F+=j[I++]<<J,J+=8}if(F>>>=oe,J-=oe,D.have===0){$.msg="invalid bit length repeat",D.mode=BAD;break}pe=D.lens[D.have-1],Q=3+(F&3),F>>>=2,J-=2}else if(we===17){for(_e=oe+3;J<_e;){if(k===0)break e;k--,F+=j[I++]<<J,J+=8}F>>>=oe,J-=oe,pe=0,Q=3+(F&7),F>>>=3,J-=3}else{for(_e=oe+7;J<_e;){if(k===0)break e;k--,F+=j[I++]<<J,J+=8}F>>>=oe,J-=oe,pe=0,Q=11+(F&127),F>>>=7,J-=7}if(D.have+Q>D.nlen+D.ndist){$.msg="invalid bit length repeat",D.mode=BAD;break}for(;Q--;)D.lens[D.have++]=pe}}if(D.mode===BAD)break;if(D.lens[256]===0){$.msg="invalid code -- missing end-of-block",D.mode=BAD;break}if(D.lenbits=9,me={bits:D.lenbits},ve=inftrees(LENS,D.lens,0,D.nlen,D.lencode,0,D.work,me),D.lenbits=me.bits,ve){$.msg="invalid literal/lengths set",D.mode=BAD;break}if(D.distbits=6,D.distcode=D.distdyn,me={bits:D.distbits},ve=inftrees(DISTS,D.lens,D.nlen,D.ndist,D.distcode,0,D.work,me),D.distbits=me.bits,ve){$.msg="invalid distances set",D.mode=BAD;break}if(D.mode=LEN_,z===Z_TREES)break e;case LEN_:D.mode=LEN;case LEN:if(k>=6&&N>=258){$.next_out=o,$.avail_out=N,$.next_in=I,$.avail_in=k,D.hold=F,D.bits=J,inffast($,Y),o=$.next_out,O=$.output,N=$.avail_out,I=$.next_in,j=$.input,k=$.avail_in,F=D.hold,J=D.bits,D.mode===TYPE&&(D.back=-1);break}for(D.back=0;ne=D.lencode[F&(1<<D.lenbits)-1],oe=ne>>>24,ce=ne>>>16&255,we=ne&65535,!(oe<=J);){if(k===0)break e;k--,F+=j[I++]<<J,J+=8}if(ce&&(ce&240)===0){for(se=oe,ye=ce,fe=we;ne=D.lencode[fe+((F&(1<<se+ye)-1)>>se)],oe=ne>>>24,ce=ne>>>16&255,we=ne&65535,!(se+oe<=J);){if(k===0)break e;k--,F+=j[I++]<<J,J+=8}F>>>=se,J-=se,D.back+=se}if(F>>>=oe,J-=oe,D.back+=oe,D.length=we,ce===0){D.mode=LIT;break}if(ce&32){D.back=-1,D.mode=TYPE;break}if(ce&64){$.msg="invalid literal/length code",D.mode=BAD;break}D.extra=ce&15,D.mode=LENEXT;case LENEXT:if(D.extra){for(_e=D.extra;J<_e;){if(k===0)break e;k--,F+=j[I++]<<J,J+=8}D.length+=F&(1<<D.extra)-1,F>>>=D.extra,J-=D.extra,D.back+=D.extra}D.was=D.length,D.mode=DIST;case DIST:for(;ne=D.distcode[F&(1<<D.distbits)-1],oe=ne>>>24,ce=ne>>>16&255,we=ne&65535,!(oe<=J);){if(k===0)break e;k--,F+=j[I++]<<J,J+=8}if((ce&240)===0){for(se=oe,ye=ce,fe=we;ne=D.distcode[fe+((F&(1<<se+ye)-1)>>se)],oe=ne>>>24,ce=ne>>>16&255,we=ne&65535,!(se+oe<=J);){if(k===0)break e;k--,F+=j[I++]<<J,J+=8}F>>>=se,J-=se,D.back+=se}if(F>>>=oe,J-=oe,D.back+=oe,ce&64){$.msg="invalid distance code",D.mode=BAD;break}D.offset=we,D.extra=ce&15,D.mode=DISTEXT;case DISTEXT:if(D.extra){for(_e=D.extra;J<_e;){if(k===0)break e;k--,F+=j[I++]<<J,J+=8}D.offset+=F&(1<<D.extra)-1,F>>>=D.extra,J-=D.extra,D.back+=D.extra}if(D.offset>D.dmax){$.msg="invalid distance too far back",D.mode=BAD;break}D.mode=MATCH;case MATCH:if(N===0)break e;if(Q=Y-N,D.offset>Q){if(Q=D.offset-Q,Q>D.whave&&D.sane){$.msg="invalid distance too far back",D.mode=BAD;break}Q>D.wnext?(Q-=D.wnext,te=D.wsize-Q):te=D.wnext-Q,Q>D.length&&(Q=D.length),ie=D.window}else ie=O,te=o-D.offset,Q=D.length;Q>N&&(Q=N),N-=Q,D.length-=Q;do O[o++]=ie[te++];while(--Q);D.length===0&&(D.mode=LEN);break;case LIT:if(N===0)break e;O[o++]=D.length,N--,D.mode=LEN;break;case CHECK:if(D.wrap){for(;J<32;){if(k===0)break e;k--,F|=j[I++]<<J,J+=8}if(Y-=N,$.total_out+=Y,D.total+=Y,D.wrap&4&&Y&&($.adler=D.check=D.flags?crc32_1(D.check,O,Y,o-Y):adler32_1(D.check,O,Y,o-Y)),Y=N,D.wrap&4&&(D.flags?F:zswap32(F))!==D.check){$.msg="incorrect data check",D.mode=BAD;break}F=0,J=0}D.mode=LENGTH;case LENGTH:if(D.wrap&&D.flags){for(;J<32;){if(k===0)break e;k--,F+=j[I++]<<J,J+=8}if(D.wrap&4&&F!==(D.total&4294967295)){$.msg="incorrect length check",D.mode=BAD;break}F=0,J=0}D.mode=DONE;case DONE:ve=Z_STREAM_END$1;break e;case BAD:ve=Z_DATA_ERROR$1;break e;case MEM:return Z_MEM_ERROR$1;case SYNC:default:return Z_STREAM_ERROR$1}return $.next_out=o,$.avail_out=N,$.next_in=I,$.avail_in=k,D.hold=F,D.bits=J,(D.wsize||Y!==$.avail_out&&D.mode<BAD&&(D.mode<CHECK||z!==Z_FINISH$1))&&updatewindow($,$.output,$.next_out,Y-$.avail_out),X-=$.avail_in,Y-=$.avail_out,$.total_in+=X,$.total_out+=Y,D.total+=Y,D.wrap&4&&Y&&($.adler=D.check=D.flags?crc32_1(D.check,O,Y,$.next_out-Y):adler32_1(D.check,O,Y,$.next_out-Y)),$.data_type=D.bits+(D.last?64:0)+(D.mode===TYPE?128:0)+(D.mode===LEN_||D.mode===COPY_?256:0),(X===0&&Y===0||z===Z_FINISH$1)&&ve===Z_OK$1&&(ve=Z_BUF_ERROR),ve},inflateEnd=$=>{if(inflateStateCheck($))return Z_STREAM_ERROR$1;let z=$.state;return z.window&&(z.window=null),$.state=null,Z_OK$1},inflateGetHeader=($,z)=>{if(inflateStateCheck($))return Z_STREAM_ERROR$1;const D=$.state;return(D.wrap&2)===0?Z_STREAM_ERROR$1:(D.head=z,z.done=!1,Z_OK$1)},inflateSetDictionary=($,z)=>{const D=z.length;let j,O,I;return inflateStateCheck($)||(j=$.state,j.wrap!==0&&j.mode!==DICT)?Z_STREAM_ERROR$1:j.mode===DICT&&(O=1,O=adler32_1(O,z,D,0),O!==j.check)?Z_DATA_ERROR$1:(I=updatewindow($,z,D,D),I?(j.mode=MEM,Z_MEM_ERROR$1):(j.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 z=this.options;z.raw&&z.windowBits>=0&&z.windowBits<16&&(z.windowBits=-z.windowBits,z.windowBits===0&&(z.windowBits=-15)),z.windowBits>=0&&z.windowBits<16&&!($&&$.windowBits)&&(z.windowBits+=32),z.windowBits>15&&z.windowBits<48&&(z.windowBits&15)===0&&(z.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let D=inflate_1$2.inflateInit2(this.strm,z.windowBits);if(D!==Z_OK)throw new Error(messages[D]);if(this.header=new gzheader,inflate_1$2.inflateGetHeader(this.strm,this.header),z.dictionary&&(typeof z.dictionary=="string"?z.dictionary=strings.string2buf(z.dictionary):toString.call(z.dictionary)==="[object ArrayBuffer]"&&(z.dictionary=new Uint8Array(z.dictionary)),z.raw&&(D=inflate_1$2.inflateSetDictionary(this.strm,z.dictionary),D!==Z_OK)))throw new Error(messages[D])}Inflate$1.prototype.push=function($,z){const D=this.strm,j=this.options.chunkSize,O=this.options.dictionary;let I,o,k;if(this.ended)return!1;for(z===~~z?o=z:o=z===!0?Z_FINISH:Z_NO_FLUSH,toString.call($)==="[object ArrayBuffer]"?D.input=new Uint8Array($):D.input=$,D.next_in=0,D.avail_in=D.input.length;;){for(D.avail_out===0&&(D.output=new Uint8Array(j),D.next_out=0,D.avail_out=j),I=inflate_1$2.inflate(D,o),I===Z_NEED_DICT&&O&&(I=inflate_1$2.inflateSetDictionary(D,O),I===Z_OK?I=inflate_1$2.inflate(D,o):I===Z_DATA_ERROR&&(I=Z_NEED_DICT));D.avail_in>0&&I===Z_STREAM_END&&D.state.wrap>0&&$[D.next_in]!==0;)inflate_1$2.inflateReset(D),I=inflate_1$2.inflate(D,o);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(k=D.avail_out,D.next_out&&(D.avail_out===0||I===Z_STREAM_END))if(this.options.to==="string"){let N=strings.utf8border(D.output,D.next_out),F=D.next_out-N,J=strings.buf2string(D.output,N);D.next_out=F,D.avail_out=j-F,F&&D.output.set(D.output.subarray(N,N+F),0),this.onData(J)}else this.onData(D.output.length===D.next_out?D.output:D.output.subarray(0,D.next_out));if(!(I===Z_OK&&k===0)){if(I===Z_STREAM_END)return I=inflate_1$2.inflateEnd(this.strm),this.onEnd(I),this.ended=!0,!0;if(D.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($,z){const D=new Inflate$1(z);if(D.push($),D.err)throw D.msg||messages[D.err];return D.result}function inflateRaw$1($,z){return z=z||{},z.raw=!0,inflate$1($,z)}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 ignoreEvent=["updateSeverTime"];ignoreEvent.push("heartbeat"),ignoreEvent.push("heartbeatEx"),ignoreEvent.push("networkQualityChange"),ignoreEvent.push("onNetQuality"),ignoreEvent.push("updateCall"),ignoreEvent.push("pubNotify");const compressArrayBuffer=$=>{const z=new Uint8Array($),D=pako.deflate(z,{gzip:!0});return new Uint8Array(D==null?void 0:D.buffer)},decompressArrayBuffer=$=>{const z=new Uint8Array($),D=pako.inflate(z,{gzip:!0});return new Uint8Array(D==null?void 0:D.buffer)},sendMessageFormat=$=>{const{event:z}=$;switch($.data_original=$.data,$.time&&($.timeStr=E($.time,"YYYY-MM-DD hh:mm:ss",{offset:480})),z){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"pubChannel":$.data=com.quick.voice.proto.ChannelPublishReq.encode($.data).finish();break;case"subscribe":$.data=com.quick.voice.proto.SubscribeReq.encode($.data).finish();break;case"subChannel":$.data=com.quick.voice.proto.ChannelSubscribeRsq.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;case"onDataChannelPublish":break;case"preventUsersBehavior":$.data=com.quick.voice.proto.PreventUsersBehaviorReq.encode($.data).finish();break;default:$.data=new Uint8Array;break}return $},onMessageFormat=$=>{const{event:z,compress:D=!1}=$;if($.data_remote=$.data,$.time&&($.timeStr=E($.time,"YYYY-MM-DD hh:mm:ss",{offset:480})),D)try{$.data=decompressArrayBuffer($.data)}catch(j){console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo:消息解压错误",j)}switch(z){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"pubChannel":$.data=com.quick.voice.proto.ChannelPublishRsq.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"subChannel":$.data=com.quick.voice.proto.ChannelSubscribeRsq.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"onDataChannelPublish":$.data=com.quick.voice.proto.UserChannel.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"onUpdateBehavior":$.data=com.quick.voice.proto.PreventUsersBehaviorNotify.decode($.data);break;case"debugger":$.data=JSON.parse(new TextDecoder().decode($.data));break}return $};class CallsWebSocket{constructor(z){Xe(this,mt);Xe(this,ct,{url:"wss://demo.putplay.cc/websocket",debug:!1,reconnectCount:10,timeout:30*1e3});Xe(this,Bt,"");Xe(this,Ft,{});Xe(this,Gt,{});Se(this,"state","closed");Se(this,"sendMessageBefore",async()=>{});Se(this,"onReconnectSuccess",z=>{});Se(this,"onReconnectStop",z=>{});Xe(this,$n,z=>{let D=!0;const{code:j=1e3}=z;return(j===1e3||j===4e3)&&(D=!1),this.state="connecting",D});Xe(this,Dn,async z=>{Re(this,ct).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 重连成功",z),this.state="connected",this.onReconnectSuccess(z)});Xe(this,Bn,async z=>{Re(this,ct).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 重连停止",z),this.onReconnectStop(z)});Xe(this,Sn,(z,D={})=>{try{const{time:j,event:O,data:I={},data_original:o={},data_remote:k,...N}=D,F=E(j,"YYYY-MM-DD hh:mm:ss",{offset:480});let J={};const X=(we={})=>{const se=JSON.parse(JSON.stringify(we)),ye=Object.keys(se);for(const fe of ye)(fe.includes("sdp")||fe.includes("Sdp"))&&(se[fe]="");return se};let Y="res ↓";switch(z){case"res":Y="res ↓",J=X(I);break;case"req":Y="req ↑",J=X(o);break}let Q="#quickvo.logs";ignoreEvent.includes(O)&&(Q="#quickvo.ignoreEvents");const te={"#action":Y,timeStr:F,event:O,data:J,time:j,...N},ie=localStorage.getItem(Q)||JSON.stringify([]),ne=JSON.parse(ie);let oe=O==="heartbeat"||O==="heartbeatEx";const ce=[te];for(const we of ne){const{event:se}=we;if(se==="heartbeat"||se==="heartbeatEx"){if(oe)continue;oe=!0}if(ce.length===200)break;ce.push(we)}localStorage.setItem(Q,JSON.stringify(ce))}catch(j){Re(this,ct).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: updataLogs is error",j)}});Xe(this,Nn,(z,{resolve:D,reject:j})=>{const{sn:O=""}=z,I=()=>{const k=Re(this,Ft)[O];clearTimeout(k.destructionTimer),delete Re(this,Ft)[O]},o=window.setTimeout(()=>{const k=Re(this,Ft)[O];console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo:event is timeout",k.message),I(),j("event is timeout")},Re(this,ct).timeout);Re(this,Ft)[O]={message:z,resolve:D,reject:j,destruction:I,destructionTimer:o}});Xe(this,Mn,z=>Re(this,Ft)[z]);Xe(this,qn,async z=>{const D=new Uint8Array(z),j=com.quick.voice.proto.CommonRsp.decode(D),{sn:O,event:I}=j,o=onMessageFormat(j);if(Re(this,ct).debug&&!ignoreEvent.includes(I)&&(Re(this,Sn).call(this,"res",o),console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ff0097;padding:16px 0;","------->quickvo: 响应消息↓",o)),notifyName_keys.includes(I))return this.emitNotify(I,P$1(o,["code","data","desc"]));const N=Re(this,Mn).call(this,O);if(N){const{resolve:F=X=>{},destruction:J=()=>{}}=N;F(P$1(o,["code","data","desc"])),J()}});Se(this,"clearEvents",(z=[])=>{const D=Object.keys(Re(this,Ft));z.length===0&&(z=D);for(const j of D){if(!z.includes(j))continue;const O=Re(this,Ft)[j];if(O){const{destruction:I}=O;I()}}});Se(this,"connect",async(z="")=>new Promise(async D=>{z&&Et(this,Bt,z),Re(this,mt)&&(await Re(this,mt).close(),this.state="closed");const j=`${Re(this,ct).url}?s=${Re(this,Bt)}&t=${Date.now()}`,O=new Date().getTime();if(Et(this,mt,new M({...Re(this,ct),debug:!0,url:j,binaryType:"arraybuffer",onMessage:Re(this,qn),checkReconnect:Re(this,$n),getHeartbeatMsg:()=>"",onReconnectSuccess:Re(this,Dn),onReconnectStop:Re(this,Bn)})),this.state="connecting",await Re(this,mt).connect(),this.state="connected",Re(this,ct).debug){const o=new Date().getTime()-O;console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;",`------->quickvo: 连接耗时-${o}ms-广播事件`,Re(this,Gt))}D(Re(this,mt))}));Se(this,"close",async()=>{var D;Re(this,ct).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: cws is close.");const z=Object.keys(Re(this,Ft));for(const j of z){const{destructionTimer:O}=Re(this,Ft)[j];clearTimeout(O)}Et(this,Ft,{}),await((D=Re(this,mt))==null?void 0:D.close()),this.state="closed"});Se(this,"sendMessage",(z,D=!0)=>new Promise(async(j,O)=>{var J;await this.sendMessageBefore();const{event:I,...o}=z,k=Date.now(),N=sendMessageFormat({event:I,sn:+`${k}${v$1(1e3,9999)}`,time:k,valid:Re(this,ct).timeout,version:1,compress:!1,...o});Re(this,ct).debug&&!ignoreEvent.includes(I)&&(Re(this,Sn).call(this,"req",N),console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ff9700;padding:16px 0;","------->quickvo: 发送消息↑",N)),D&&Re(this,Nn).call(this,N,{resolve:j,reject:O});const F=com.quick.voice.proto.CommonReq.encode(N).finish();(J=Re(this,mt))==null||J.sendMessage(F)}));Se(this,"emitNotify",async(z,D)=>{const j=Re(this,Gt)[z]||[];for(const O of j){const{callback:I=async()=>{}}=O;await I(D)}});Se(this,"addNotify",(z,D=!1)=>{const{event:j,sn:O=xt(32)}=z;Re(this,Gt)[j]||(Re(this,Gt)[j]=[]);const I=Re(this,Gt)[j],o=I.findIndex(k=>k.sn===O);return o!==-1&&I.splice(o,1),D?I.unshift(z):I.push(z),O});Se(this,"removeNotify",(z=[])=>{if(z.length===0)Et(this,Gt,{});else{const D=Object.keys(Re(this,Gt));for(const j of D)Re(this,Gt)[j]=Re(this,Gt)[j].filter(O=>!z.includes(O.sn||""))}Re(this,ct).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 移除广播事件",Re(this,Gt))});Et(this,ct,{...Re(this,ct),...z})}}mt=new WeakMap,ct=new WeakMap,Bt=new WeakMap,Ft=new WeakMap,Gt=new WeakMap,$n=new WeakMap,Dn=new WeakMap,Bn=new WeakMap,Sn=new WeakMap,Nn=new WeakMap,Mn=new WeakMap,qn=new WeakMap;/*! For license information please see pikazLocationModule.js.LICENSE.txt */var e$2={782:function($){$.exports=(()=>{var z={483:(O,I,o)=>{O.exports=function k(N,F,J){function X(te,ie){if(!F[te]){if(!N[te]){if(Y)return Y(te,!0);var ne=new Error("Cannot find module '"+te+"'");throw ne.code="MODULE_NOT_FOUND",ne}var oe=F[te]={exports:{}};N[te][0].call(oe.exports,function(ce){return X(N[te][1][ce]||ce)},oe,oe.exports,k,N,F,J)}return F[te].exports}for(var Y=void 0,Q=0;Q<J.length;Q++)X(J[Q]);return X}({1:[function(k,N,F){(function(J){var X,Y,Q=J.MutationObserver||J.WebKitMutationObserver;if(Q){var te=0,ie=new Q(we),ne=J.document.createTextNode("");ie.observe(ne,{characterData:!0}),X=function(){ne.data=te=++te%2}}else if(J.setImmediate||J.MessageChannel===void 0)X="document"in J&&"onreadystatechange"in J.document.createElement("script")?function(){var se=J.document.createElement("script");se.onreadystatechange=function(){we(),se.onreadystatechange=null,se.parentNode.removeChild(se),se=null},J.document.documentElement.appendChild(se)}:function(){setTimeout(we,0)};else{var oe=new J.MessageChannel;oe.port1.onmessage=we,X=function(){oe.port2.postMessage(0)}}var ce=[];function we(){var se,ye;Y=!0;for(var fe=ce.length;fe;){for(ye=ce,ce=[],se=-1;++se<fe;)ye[se]();fe=ce.length}Y=!1}N.exports=function(se){ce.push(se)!==1||Y||X()}}).call(this,o.g!==void 0?o.g:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(k,N,F){var J=k(1);function X(){}var Y={},Q=["REJECTED"],te=["FULFILLED"],ie=["PENDING"];function ne(fe){if(typeof fe!="function")throw new TypeError("resolver must be a function");this.state=ie,this.queue=[],this.outcome=void 0,fe!==X&&se(this,fe)}function oe(fe,pe,ve){this.promise=fe,typeof pe=="function"&&(this.onFulfilled=pe,this.callFulfilled=this.otherCallFulfilled),typeof ve=="function"&&(this.onRejected=ve,this.callRejected=this.otherCallRejected)}function ce(fe,pe,ve){J(function(){var Te;try{Te=pe(ve)}catch(me){return Y.reject(fe,me)}Te===fe?Y.reject(fe,new TypeError("Cannot resolve promise with itself")):Y.resolve(fe,Te)})}function we(fe){var pe=fe&&fe.then;if(fe&&(typeof fe=="object"||typeof fe=="function")&&typeof pe=="function")return function(){pe.apply(fe,arguments)}}function se(fe,pe){var ve=!1;function Te(De){ve||(ve=!0,Y.reject(fe,De))}function me(De){ve||(ve=!0,Y.resolve(fe,De))}var _e=ye(function(){pe(me,Te)});_e.status==="error"&&Te(_e.value)}function ye(fe,pe){var ve={};try{ve.value=fe(pe),ve.status="success"}catch(Te){ve.status="error",ve.value=Te}return ve}N.exports=ne,ne.prototype.catch=function(fe){return this.then(null,fe)},ne.prototype.then=function(fe,pe){if(typeof fe!="function"&&this.state===te||typeof pe!="function"&&this.state===Q)return this;var ve=new this.constructor(X);return this.state!==ie?ce(ve,this.state===te?fe:pe,this.outcome):this.queue.push(new oe(ve,fe,pe)),ve},oe.prototype.callFulfilled=function(fe){Y.resolve(this.promise,fe)},oe.prototype.otherCallFulfilled=function(fe){ce(this.promise,this.onFulfilled,fe)},oe.prototype.callRejected=function(fe){Y.reject(this.promise,fe)},oe.prototype.otherCallRejected=function(fe){ce(this.promise,this.onRejected,fe)},Y.resolve=function(fe,pe){var ve=ye(we,pe);if(ve.status==="error")return Y.reject(fe,ve.value);var Te=ve.value;if(Te)se(fe,Te);else{fe.state=te,fe.outcome=pe;for(var me=-1,_e=fe.queue.length;++me<_e;)fe.queue[me].callFulfilled(pe)}return fe},Y.reject=function(fe,pe){fe.state=Q,fe.outcome=pe;for(var ve=-1,Te=fe.queue.length;++ve<Te;)fe.queue[ve].callRejected(pe);return fe},ne.resolve=function(fe){return fe instanceof this?fe:Y.resolve(new this(X),fe)},ne.reject=function(fe){var pe=new this(X);return Y.reject(pe,fe)},ne.all=function(fe){var pe=this;if(Object.prototype.toString.call(fe)!=="[object Array]")return this.reject(new TypeError("must be an array"));var ve=fe.length,Te=!1;if(!ve)return this.resolve([]);for(var me=new Array(ve),_e=0,De=-1,je=new this(X);++De<ve;)Fe(fe[De],De);return je;function Fe(qe,gt){pe.resolve(qe).then(function(St){me[gt]=St,++_e!==ve||Te||(Te=!0,Y.resolve(je,me))},function(St){Te||(Te=!0,Y.reject(je,St))})}},ne.race=function(fe){if(Object.prototype.toString.call(fe)!=="[object Array]")return this.reject(new TypeError("must be an array"));var pe,ve=fe.length,Te=!1;if(!ve)return this.resolve([]);for(var me=-1,_e=new this(X);++me<ve;)pe=fe[me],this.resolve(pe).then(function(De){Te||(Te=!0,Y.resolve(_e,De))},function(De){Te||(Te=!0,Y.reject(_e,De))});return _e}},{1:1}],3:[function(k,N,F){(function(J){typeof J.Promise!="function"&&(J.Promise=k(2))}).call(this,o.g!==void 0?o.g:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(k,N,F){var J=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ae){return typeof ae}:function(ae){return ae&&typeof Symbol=="function"&&ae.constructor===Symbol&&ae!==Symbol.prototype?"symbol":typeof ae},X=function(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}();function Y(ae,de){ae=ae||[],de=de||{};try{return new Blob(ae,de)}catch(Oe){if(Oe.name!=="TypeError")throw Oe;for(var he=new(typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder),Ee=0;Ee<ae.length;Ee+=1)he.append(ae[Ee]);return he.getBlob(de.type)}}typeof Promise>"u"&&k(3);var Q=Promise;function te(ae,de){de&&ae.then(function(he){de(null,he)},function(he){de(he)})}function ie(ae,de,he){typeof de=="function"&&ae.then(de),typeof he=="function"&&ae.catch(he)}function ne(ae){return typeof ae!="string"&&(console.warn(ae+" used as a key, but it is not a string."),ae=String(ae)),ae}function oe(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var ce="local-forage-detect-blob-support",we=void 0,se={},ye=Object.prototype.toString,fe="readonly",pe="readwrite";function ve(ae){for(var de=ae.length,he=new ArrayBuffer(de),Ee=new Uint8Array(he),Oe=0;Oe<de;Oe++)Ee[Oe]=ae.charCodeAt(Oe);return he}function Te(ae){return typeof we=="boolean"?Q.resolve(we):function(de){return new Q(function(he){var Ee=de.transaction(ce,pe),Oe=Y([""]);Ee.objectStore(ce).put(Oe,"key"),Ee.onabort=function(Ie){Ie.preventDefault(),Ie.stopPropagation(),he(!1)},Ee.oncomplete=function(){var Ie=navigator.userAgent.match(/Chrome\/(\d+)/),Be=navigator.userAgent.match(/Edge\//);he(Be||!Ie||parseInt(Ie[1],10)>=43)}}).catch(function(){return!1})}(ae).then(function(de){return we=de})}function me(ae){var de=se[ae.name],he={};he.promise=new Q(function(Ee,Oe){he.resolve=Ee,he.reject=Oe}),de.deferredOperations.push(he),de.dbReady?de.dbReady=de.dbReady.then(function(){return he.promise}):de.dbReady=he.promise}function _e(ae){var de=se[ae.name].deferredOperations.pop();if(de)return de.resolve(),de.promise}function De(ae,de){var he=se[ae.name].deferredOperations.pop();if(he)return he.reject(de),he.promise}function je(ae,de){return new Q(function(he,Ee){if(se[ae.name]=se[ae.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},ae.db){if(!de)return he(ae.db);me(ae),ae.db.close()}var Oe=[ae.name];de&&Oe.push(ae.version);var Ie=X.open.apply(X,Oe);de&&(Ie.onupgradeneeded=function(Be){var Ue=Ie.result;try{Ue.createObjectStore(ae.storeName),Be.oldVersion<=1&&Ue.createObjectStore(ce)}catch(He){if(He.name!=="ConstraintError")throw He;console.warn('The database "'+ae.name+'" has been upgraded from version '+Be.oldVersion+" to version "+Be.newVersion+', but the storage "'+ae.storeName+'" already exists.')}}),Ie.onerror=function(Be){Be.preventDefault(),Ee(Ie.error)},Ie.onsuccess=function(){var Be=Ie.result;Be.onversionchange=function(Ue){Ue.target.close()},he(Be),_e(ae)}})}function Fe(ae){return je(ae,!1)}function qe(ae){return je(ae,!0)}function gt(ae,de){if(!ae.db)return!0;var he=!ae.db.objectStoreNames.contains(ae.storeName),Ee=ae.version<ae.db.version,Oe=ae.version>ae.db.version;if(Ee&&(ae.version!==de&&console.warn('The database "'+ae.name+`" can't be downgraded from version `+ae.db.version+" to version "+ae.version+"."),ae.version=ae.db.version),Oe||he){if(he){var Ie=ae.db.version+1;Ie>ae.version&&(ae.version=Ie)}return!0}return!1}function St(ae){return Y([ve(atob(ae.data))],{type:ae.type})}function It(ae){return ae&&ae.__local_forage_encoded_blob}function Lt(ae){var de=this,he=de._initReady().then(function(){var Ee=se[de._dbInfo.name];if(Ee&&Ee.dbReady)return Ee.dbReady});return ie(he,ae,ae),he}function Nt(ae,de,he,Ee){Ee===void 0&&(Ee=1);try{var Oe=ae.db.transaction(ae.storeName,de);he(null,Oe)}catch(Ie){if(Ee>0&&(!ae.db||Ie.name==="InvalidStateError"||Ie.name==="NotFoundError"))return Q.resolve().then(function(){if(!ae.db||Ie.name==="NotFoundError"&&!ae.db.objectStoreNames.contains(ae.storeName)&&ae.version<=ae.db.version)return ae.db&&(ae.version=ae.db.version+1),qe(ae)}).then(function(){return function(Be){me(Be);for(var Ue=se[Be.name],He=Ue.forages,Pe=0;Pe<He.length;Pe++){var ze=He[Pe];ze._dbInfo.db&&(ze._dbInfo.db.close(),ze._dbInfo.db=null)}return Be.db=null,Fe(Be).then(function(Ve){return Be.db=Ve,gt(Be)?qe(Be):Ve}).then(function(Ve){Be.db=Ue.db=Ve;for(var Ye=0;Ye<He.length;Ye++)He[Ye]._dbInfo.db=Ve}).catch(function(Ve){throw De(Be,Ve),Ve})}(ae).then(function(){Nt(ae,de,he,Ee-1)})}).catch(he);he(Ie)}}var yt={_driver:"asyncStorage",_initStorage:function(ae){var de=this,he={db:null};if(ae)for(var Ee in ae)he[Ee]=ae[Ee];var Oe=se[he.name];Oe||(Oe={forages:[],db:null,dbReady:null,deferredOperations:[]},se[he.name]=Oe),Oe.forages.push(de),de._initReady||(de._initReady=de.ready,de.ready=Lt);var Ie=[];function Be(){return Q.resolve()}for(var Ue=0;Ue<Oe.forages.length;Ue++){var He=Oe.forages[Ue];He!==de&&Ie.push(He._initReady().catch(Be))}var Pe=Oe.forages.slice(0);return Q.all(Ie).then(function(){return he.db=Oe.db,Fe(he)}).then(function(ze){return he.db=ze,gt(he,de._defaultConfig.version)?qe(he):ze}).then(function(ze){he.db=Oe.db=ze,de._dbInfo=he;for(var Ve=0;Ve<Pe.length;Ve++){var Ye=Pe[Ve];Ye!==de&&(Ye._dbInfo.db=he.db,Ye._dbInfo.version=he.version)}})},_support:function(){try{if(!X||!X.open)return!1;var ae=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),de=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!ae||de)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}(),iterate:function(ae,de){var he=this,Ee=new Q(function(Oe,Ie){he.ready().then(function(){Nt(he._dbInfo,fe,function(Be,Ue){if(Be)return Ie(Be);try{var He=Ue.objectStore(he._dbInfo.storeName).openCursor(),Pe=1;He.onsuccess=function(){var ze=He.result;if(ze){var Ve=ze.value;It(Ve)&&(Ve=St(Ve));var Ye=ae(Ve,ze.key,Pe++);Ye!==void 0?Oe(Ye):ze.continue()}else Oe()},He.onerror=function(){Ie(He.error)}}catch(ze){Ie(ze)}})}).catch(Ie)});return te(Ee,de),Ee},getItem:function(ae,de){var he=this;ae=ne(ae);var Ee=new Q(function(Oe,Ie){he.ready().then(function(){Nt(he._dbInfo,fe,function(Be,Ue){if(Be)return Ie(Be);try{var He=Ue.objectStore(he._dbInfo.storeName).get(ae);He.onsuccess=function(){var Pe=He.result;Pe===void 0&&(Pe=null),It(Pe)&&(Pe=St(Pe)),Oe(Pe)},He.onerror=function(){Ie(He.error)}}catch(Pe){Ie(Pe)}})}).catch(Ie)});return te(Ee,de),Ee},setItem:function(ae,de,he){var Ee=this;ae=ne(ae);var Oe=new Q(function(Ie,Be){var Ue;Ee.ready().then(function(){return Ue=Ee._dbInfo,ye.call(de)==="[object Blob]"?Te(Ue.db).then(function(He){return He?de:(Pe=de,new Q(function(ze,Ve){var Ye=new FileReader;Ye.onerror=Ve,Ye.onloadend=function(at){var ft=btoa(at.target.result||"");ze({__local_forage_encoded_blob:!0,data:ft,type:Pe.type})},Ye.readAsBinaryString(Pe)}));var Pe}):de}).then(function(He){Nt(Ee._dbInfo,pe,function(Pe,ze){if(Pe)return Be(Pe);try{var Ve=ze.objectStore(Ee._dbInfo.storeName);He===null&&(He=void 0);var Ye=Ve.put(He,ae);ze.oncomplete=function(){He===void 0&&(He=null),Ie(He)},ze.onabort=ze.onerror=function(){var at=Ye.error?Ye.error:Ye.transaction.error;Be(at)}}catch(at){Be(at)}})}).catch(Be)});return te(Oe,he),Oe},removeItem:function(ae,de){var he=this;ae=ne(ae);var Ee=new Q(function(Oe,Ie){he.ready().then(function(){Nt(he._dbInfo,pe,function(Be,Ue){if(Be)return Ie(Be);try{var He=Ue.objectStore(he._dbInfo.storeName).delete(ae);Ue.oncomplete=function(){Oe()},Ue.onerror=function(){Ie(He.error)},Ue.onabort=function(){var Pe=He.error?He.error:He.transaction.error;Ie(Pe)}}catch(Pe){Ie(Pe)}})}).catch(Ie)});return te(Ee,de),Ee},clear:function(ae){var de=this,he=new Q(function(Ee,Oe){de.ready().then(function(){Nt(de._dbInfo,pe,function(Ie,Be){if(Ie)return Oe(Ie);try{var Ue=Be.objectStore(de._dbInfo.storeName).clear();Be.oncomplete=function(){Ee()},Be.onabort=Be.onerror=function(){var He=Ue.error?Ue.error:Ue.transaction.error;Oe(He)}}catch(He){Oe(He)}})}).catch(Oe)});return te(he,ae),he},length:function(ae){var de=this,he=new Q(function(Ee,Oe){de.ready().then(function(){Nt(de._dbInfo,fe,function(Ie,Be){if(Ie)return Oe(Ie);try{var Ue=Be.objectStore(de._dbInfo.storeName).count();Ue.onsuccess=function(){Ee(Ue.result)},Ue.onerror=function(){Oe(Ue.error)}}catch(He){Oe(He)}})}).catch(Oe)});return te(he,ae),he},key:function(ae,de){var he=this,Ee=new Q(function(Oe,Ie){ae<0?Oe(null):he.ready().then(function(){Nt(he._dbInfo,fe,function(Be,Ue){if(Be)return Ie(Be);try{var He=Ue.objectStore(he._dbInfo.storeName),Pe=!1,ze=He.openKeyCursor();ze.onsuccess=function(){var Ve=ze.result;Ve?ae===0||Pe?Oe(Ve.key):(Pe=!0,Ve.advance(ae)):Oe(null)},ze.onerror=function(){Ie(ze.error)}}catch(Ve){Ie(Ve)}})}).catch(Ie)});return te(Ee,de),Ee},keys:function(ae){var de=this,he=new Q(function(Ee,Oe){de.ready().then(function(){Nt(de._dbInfo,fe,function(Ie,Be){if(Ie)return Oe(Ie);try{var Ue=Be.objectStore(de._dbInfo.storeName).openKeyCursor(),He=[];Ue.onsuccess=function(){var Pe=Ue.result;Pe?(He.push(Pe.key),Pe.continue()):Ee(He)},Ue.onerror=function(){Oe(Ue.error)}}catch(Pe){Oe(Pe)}})}).catch(Oe)});return te(he,ae),he},dropInstance:function(ae,de){de=oe.apply(this,arguments);var he=this.config();(ae=typeof ae!="function"&&ae||{}).name||(ae.name=ae.name||he.name,ae.storeName=ae.storeName||he.storeName);var Ee,Oe=this;if(ae.name){var Ie=ae.name===he.name&&Oe._dbInfo.db?Q.resolve(Oe._dbInfo.db):Fe(ae).then(function(Be){var Ue=se[ae.name],He=Ue.forages;Ue.db=Be;for(var Pe=0;Pe<He.length;Pe++)He[Pe]._dbInfo.db=Be;return Be});Ee=ae.storeName?Ie.then(function(Be){if(Be.objectStoreNames.contains(ae.storeName)){var Ue=Be.version+1;me(ae);var He=se[ae.name],Pe=He.forages;Be.close();for(var ze=0;ze<Pe.length;ze++){var Ve=Pe[ze];Ve._dbInfo.db=null,Ve._dbInfo.version=Ue}var Ye=new Q(function(at,ft){var Dt=X.open(ae.name,Ue);Dt.onerror=function(tn){Dt.result.close(),ft(tn)},Dt.onupgradeneeded=function(){Dt.result.deleteObjectStore(ae.storeName)},Dt.onsuccess=function(){var tn=Dt.result;tn.close(),at(tn)}});return Ye.then(function(at){He.db=at;for(var ft=0;ft<Pe.length;ft++){var Dt=Pe[ft];Dt._dbInfo.db=at,_e(Dt._dbInfo)}}).catch(function(at){throw(De(ae,at)||Q.resolve()).catch(function(){}),at})}}):Ie.then(function(Be){me(ae);var Ue=se[ae.name],He=Ue.forages;Be.close();for(var Pe=0;Pe<He.length;Pe++)He[Pe]._dbInfo.db=null;var ze=new Q(function(Ve,Ye){var at=X.deleteDatabase(ae.name);at.onerror=function(){var ft=at.result;ft&&ft.close(),Ye(at.error)},at.onblocked=function(){console.warn('dropInstance blocked for database "'+ae.name+'" until all open connections are closed')},at.onsuccess=function(){var ft=at.result;ft&&ft.close(),Ve(ft)}});return ze.then(function(Ve){Ue.db=Ve;for(var Ye=0;Ye<He.length;Ye++)_e(He[Ye]._dbInfo)}).catch(function(Ve){throw(De(ae,Ve)||Q.resolve()).catch(function(){}),Ve})})}else Ee=Q.reject("Invalid arguments");return te(Ee,de),Ee}},tt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zt=/^~~local_forage_type~([^~]+)~/,Ot="__lfsc__:",Ne=Ot.length,nt="arbf",Ht="blob",At="si08",et="ui08",Qe="uic8",rt="si16",it="si32",vt="ur16",Rt="ui32",Mt="fl32",qt="fl64",Jt=Ne+nt.length,Wt=Object.prototype.toString;function cn(ae){var de,he,Ee,Oe,Ie,Be=.75*ae.length,Ue=ae.length,He=0;ae[ae.length-1]==="="&&(Be--,ae[ae.length-2]==="="&&Be--);var Pe=new ArrayBuffer(Be),ze=new Uint8Array(Pe);for(de=0;de<Ue;de+=4)he=tt.indexOf(ae[de]),Ee=tt.indexOf(ae[de+1]),Oe=tt.indexOf(ae[de+2]),Ie=tt.indexOf(ae[de+3]),ze[He++]=he<<2|Ee>>4,ze[He++]=(15&Ee)<<4|Oe>>2,ze[He++]=(3&Oe)<<6|63&Ie;return Pe}function Yt(ae){var de,he=new Uint8Array(ae),Ee="";for(de=0;de<he.length;de+=3)Ee+=tt[he[de]>>2],Ee+=tt[(3&he[de])<<4|he[de+1]>>4],Ee+=tt[(15&he[de+1])<<2|he[de+2]>>6],Ee+=tt[63&he[de+2]];return he.length%3==2?Ee=Ee.substring(0,Ee.length-1)+"=":he.length%3==1&&(Ee=Ee.substring(0,Ee.length-2)+"=="),Ee}var Xt={serialize:function(ae,de){var he="";if(ae&&(he=Wt.call(ae)),ae&&(he==="[object ArrayBuffer]"||ae.buffer&&Wt.call(ae.buffer)==="[object ArrayBuffer]")){var Ee,Oe=Ot;ae instanceof ArrayBuffer?(Ee=ae,Oe+=nt):(Ee=ae.buffer,he==="[object Int8Array]"?Oe+=At:he==="[object Uint8Array]"?Oe+=et:he==="[object Uint8ClampedArray]"?Oe+=Qe:he==="[object Int16Array]"?Oe+=rt:he==="[object Uint16Array]"?Oe+=vt:he==="[object Int32Array]"?Oe+=it:he==="[object Uint32Array]"?Oe+=Rt:he==="[object Float32Array]"?Oe+=Mt:he==="[object Float64Array]"?Oe+=qt:de(new Error("Failed to get type for BinaryArray"))),de(Oe+Yt(Ee))}else if(he==="[object Blob]"){var Ie=new FileReader;Ie.onload=function(){var Be="~~local_forage_type~"+ae.type+"~"+Yt(this.result);de("__lfsc__:blob"+Be)},Ie.readAsArrayBuffer(ae)}else try{de(JSON.stringify(ae))}catch(Be){console.error("Couldn't convert value into a JSON string: ",ae),de(null,Be)}},deserialize:function(ae){if(ae.substring(0,Ne)!==Ot)return JSON.parse(ae);var de,he=ae.substring(Jt),Ee=ae.substring(Ne,Jt);if(Ee===Ht&&zt.test(he)){var Oe=he.match(zt);de=Oe[1],he=he.substring(Oe[0].length)}var Ie=cn(he);switch(Ee){case nt:return Ie;case Ht:return Y([Ie],{type:de});case At:return new Int8Array(Ie);case et:return new Uint8Array(Ie);case Qe:return new Uint8ClampedArray(Ie);case rt:return new Int16Array(Ie);case vt:return new Uint16Array(Ie);case it:return new Int32Array(Ie);case Rt:return new Uint32Array(Ie);case Mt:return new Float32Array(Ie);case qt:return new Float64Array(Ie);default:throw new Error("Unkown type: "+Ee)}},stringToBuffer:cn,bufferToString:Yt};function jt(ae,de,he,Ee){ae.executeSql("CREATE TABLE IF NOT EXISTS "+de.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],he,Ee)}function Vt(ae,de,he,Ee,Oe,Ie){ae.executeSql(he,Ee,Oe,function(Be,Ue){Ue.code===Ue.SYNTAX_ERR?Be.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[de.storeName],function(He,Pe){Pe.rows.length?Ie(He,Ue):jt(He,de,function(){He.executeSql(he,Ee,Oe,Ie)},Ie)},Ie):Ie(Be,Ue)},Ie)}function yn(ae,de,he,Ee){var Oe=this;ae=ne(ae);var Ie=new Q(function(Be,Ue){Oe.ready().then(function(){de===void 0&&(de=null);var He=de,Pe=Oe._dbInfo;Pe.serializer.serialize(de,function(ze,Ve){Ve?Ue(Ve):Pe.db.transaction(function(Ye){Vt(Ye,Pe,"INSERT OR REPLACE INTO "+Pe.storeName+" (key, value) VALUES (?, ?)",[ae,ze],function(){Be(He)},function(at,ft){Ue(ft)})},function(Ye){if(Ye.code===Ye.QUOTA_ERR){if(Ee>0)return void Be(yn.apply(Oe,[ae,He,he,Ee-1]));Ue(Ye)}})})}).catch(Ue)});return te(Ie,he),Ie}function en(ae){return new Q(function(de,he){ae.transaction(function(Ee){Ee.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(Oe,Ie){for(var Be=[],Ue=0;Ue<Ie.rows.length;Ue++)Be.push(Ie.rows.item(Ue).name);de({db:ae,storeNames:Be})},function(Oe,Ie){he(Ie)})},function(Ee){he(Ee)})})}var Zt={_driver:"webSQLStorage",_initStorage:function(ae){var de=this,he={db:null};if(ae)for(var Ee in ae)he[Ee]=typeof ae[Ee]!="string"?ae[Ee].toString():ae[Ee];var Oe=new Q(function(Ie,Be){try{he.db=openDatabase(he.name,String(he.version),he.description,he.size)}catch(Ue){return Be(Ue)}he.db.transaction(function(Ue){jt(Ue,he,function(){de._dbInfo=he,Ie()},function(He,Pe){Be(Pe)})},Be)});return he.serializer=Xt,Oe},_support:typeof openDatabase=="function",iterate:function(ae,de){var he=this,Ee=new Q(function(Oe,Ie){he.ready().then(function(){var Be=he._dbInfo;Be.db.transaction(function(Ue){Vt(Ue,Be,"SELECT * FROM "+Be.storeName,[],function(He,Pe){for(var ze=Pe.rows,Ve=ze.length,Ye=0;Ye<Ve;Ye++){var at=ze.item(Ye),ft=at.value;if(ft&&(ft=Be.serializer.deserialize(ft)),(ft=ae(ft,at.key,Ye+1))!==void 0)return void Oe(ft)}Oe()},function(He,Pe){Ie(Pe)})})}).catch(Ie)});return te(Ee,de),Ee},getItem:function(ae,de){var he=this;ae=ne(ae);var Ee=new Q(function(Oe,Ie){he.ready().then(function(){var Be=he._dbInfo;Be.db.transaction(function(Ue){Vt(Ue,Be,"SELECT * FROM "+Be.storeName+" WHERE key = ? LIMIT 1",[ae],function(He,Pe){var ze=Pe.rows.length?Pe.rows.item(0).value:null;ze&&(ze=Be.serializer.deserialize(ze)),Oe(ze)},function(He,Pe){Ie(Pe)})})}).catch(Ie)});return te(Ee,de),Ee},setItem:function(ae,de,he){return yn.apply(this,[ae,de,he,1])},removeItem:function(ae,de){var he=this;ae=ne(ae);var Ee=new Q(function(Oe,Ie){he.ready().then(function(){var Be=he._dbInfo;Be.db.transaction(function(Ue){Vt(Ue,Be,"DELETE FROM "+Be.storeName+" WHERE key = ?",[ae],function(){Oe()},function(He,Pe){Ie(Pe)})})}).catch(Ie)});return te(Ee,de),Ee},clear:function(ae){var de=this,he=new Q(function(Ee,Oe){de.ready().then(function(){var Ie=de._dbInfo;Ie.db.transaction(function(Be){Vt(Be,Ie,"DELETE FROM "+Ie.storeName,[],function(){Ee()},function(Ue,He){Oe(He)})})}).catch(Oe)});return te(he,ae),he},length:function(ae){var de=this,he=new Q(function(Ee,Oe){de.ready().then(function(){var Ie=de._dbInfo;Ie.db.transaction(function(Be){Vt(Be,Ie,"SELECT COUNT(key) as c FROM "+Ie.storeName,[],function(Ue,He){var Pe=He.rows.item(0).c;Ee(Pe)},function(Ue,He){Oe(He)})})}).catch(Oe)});return te(he,ae),he},key:function(ae,de){var he=this,Ee=new Q(function(Oe,Ie){he.ready().then(function(){var Be=he._dbInfo;Be.db.transaction(function(Ue){Vt(Ue,Be,"SELECT key FROM "+Be.storeName+" WHERE id = ? LIMIT 1",[ae+1],function(He,Pe){var ze=Pe.rows.length?Pe.rows.item(0).key:null;Oe(ze)},function(He,Pe){Ie(Pe)})})}).catch(Ie)});return te(Ee,de),Ee},keys:function(ae){var de=this,he=new Q(function(Ee,Oe){de.ready().then(function(){var Ie=de._dbInfo;Ie.db.transaction(function(Be){Vt(Be,Ie,"SELECT key FROM "+Ie.storeName,[],function(Ue,He){for(var Pe=[],ze=0;ze<He.rows.length;ze++)Pe.push(He.rows.item(ze).key);Ee(Pe)},function(Ue,He){Oe(He)})})}).catch(Oe)});return te(he,ae),he},dropInstance:function(ae,de){de=oe.apply(this,arguments);var he=this.config();(ae=typeof ae!="function"&&ae||{}).name||(ae.name=ae.name||he.name,ae.storeName=ae.storeName||he.storeName);var Ee,Oe=this;return te(Ee=ae.name?new Q(function(Ie){var Be;Be=ae.name===he.name?Oe._dbInfo.db:openDatabase(ae.name,"","",0),ae.storeName?Ie({db:Be,storeNames:[ae.storeName]}):Ie(en(Be))}).then(function(Ie){return new Q(function(Be,Ue){Ie.db.transaction(function(He){function Pe(at){return new Q(function(ft,Dt){He.executeSql("DROP TABLE IF EXISTS "+at,[],function(){ft()},function(tn,vn){Dt(vn)})})}for(var ze=[],Ve=0,Ye=Ie.storeNames.length;Ve<Ye;Ve++)ze.push(Pe(Ie.storeNames[Ve]));Q.all(ze).then(function(){Be()}).catch(function(at){Ue(at)})},function(He){Ue(He)})})}):Q.reject("Invalid arguments"),de),Ee}};function re(ae,de){var he=ae.name+"/";return ae.storeName!==de.storeName&&(he+=ae.storeName+"/"),he}var Z={_driver:"localStorageWrapper",_initStorage:function(ae){var de={};if(ae)for(var he in ae)de[he]=ae[he];return de.keyPrefix=re(ae,this._defaultConfig),!function(){var Ee="_localforage_support_test";try{return localStorage.setItem(Ee,!0),localStorage.removeItem(Ee),!1}catch{return!0}}()||localStorage.length>0?(this._dbInfo=de,de.serializer=Xt,Q.resolve()):Q.reject()},_support:function(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}(),iterate:function(ae,de){var he=this,Ee=he.ready().then(function(){for(var Oe=he._dbInfo,Ie=Oe.keyPrefix,Be=Ie.length,Ue=localStorage.length,He=1,Pe=0;Pe<Ue;Pe++){var ze=localStorage.key(Pe);if(ze.indexOf(Ie)===0){var Ve=localStorage.getItem(ze);if(Ve&&(Ve=Oe.serializer.deserialize(Ve)),(Ve=ae(Ve,ze.substring(Be),He++))!==void 0)return Ve}}});return te(Ee,de),Ee},getItem:function(ae,de){var he=this;ae=ne(ae);var Ee=he.ready().then(function(){var Oe=he._dbInfo,Ie=localStorage.getItem(Oe.keyPrefix+ae);return Ie&&(Ie=Oe.serializer.deserialize(Ie)),Ie});return te(Ee,de),Ee},setItem:function(ae,de,he){var Ee=this;ae=ne(ae);var Oe=Ee.ready().then(function(){de===void 0&&(de=null);var Ie=de;return new Q(function(Be,Ue){var He=Ee._dbInfo;He.serializer.serialize(de,function(Pe,ze){if(ze)Ue(ze);else try{localStorage.setItem(He.keyPrefix+ae,Pe),Be(Ie)}catch(Ve){Ve.name!=="QuotaExceededError"&&Ve.name!=="NS_ERROR_DOM_QUOTA_REACHED"||Ue(Ve),Ue(Ve)}})})});return te(Oe,he),Oe},removeItem:function(ae,de){var he=this;ae=ne(ae);var Ee=he.ready().then(function(){var Oe=he._dbInfo;localStorage.removeItem(Oe.keyPrefix+ae)});return te(Ee,de),Ee},clear:function(ae){var de=this,he=de.ready().then(function(){for(var Ee=de._dbInfo.keyPrefix,Oe=localStorage.length-1;Oe>=0;Oe--){var Ie=localStorage.key(Oe);Ie.indexOf(Ee)===0&&localStorage.removeItem(Ie)}});return te(he,ae),he},length:function(ae){var de=this.keys().then(function(he){return he.length});return te(de,ae),de},key:function(ae,de){var he=this,Ee=he.ready().then(function(){var Oe,Ie=he._dbInfo;try{Oe=localStorage.key(ae)}catch{Oe=null}return Oe&&(Oe=Oe.substring(Ie.keyPrefix.length)),Oe});return te(Ee,de),Ee},keys:function(ae){var de=this,he=de.ready().then(function(){for(var Ee=de._dbInfo,Oe=localStorage.length,Ie=[],Be=0;Be<Oe;Be++){var Ue=localStorage.key(Be);Ue.indexOf(Ee.keyPrefix)===0&&Ie.push(Ue.substring(Ee.keyPrefix.length))}return Ie});return te(he,ae),he},dropInstance:function(ae,de){if(de=oe.apply(this,arguments),!(ae=typeof ae!="function"&&ae||{}).name){var he=this.config();ae.name=ae.name||he.name,ae.storeName=ae.storeName||he.storeName}var Ee,Oe=this;return Ee=ae.name?new Q(function(Ie){ae.storeName?Ie(re(ae,Oe._defaultConfig)):Ie(ae.name+"/")}).then(function(Ie){for(var Be=localStorage.length-1;Be>=0;Be--){var Ue=localStorage.key(Be);Ue.indexOf(Ie)===0&&localStorage.removeItem(Ue)}}):Q.reject("Invalid arguments"),te(Ee,de),Ee}},K=function(ae,de){for(var he=ae.length,Ee=0;Ee<he;){if((Oe=ae[Ee])===(Ie=de)||typeof Oe=="number"&&typeof Ie=="number"&&isNaN(Oe)&&isNaN(Ie))return!0;Ee++}var Oe,Ie;return!1},ue=Array.isArray||function(ae){return Object.prototype.toString.call(ae)==="[object Array]"},ge={},Ae={},Me={INDEXEDDB:yt,WEBSQL:Zt,LOCALSTORAGE:Z},ot=[Me.INDEXEDDB._driver,Me.WEBSQL._driver,Me.LOCALSTORAGE._driver],_t=["dropInstance"],ut=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(_t),Tt={description:"",driver:ot.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function wt(ae,de){ae[de]=function(){var he=arguments;return ae.ready().then(function(){return ae[de].apply(ae,he)})}}function ln(){for(var ae=1;ae<arguments.length;ae++){var de=arguments[ae];if(de)for(var he in de)de.hasOwnProperty(he)&&(ue(de[he])?arguments[0][he]=de[he].slice():arguments[0][he]=de[he])}return arguments[0]}var Qn=function(){function ae(de){for(var he in function(Ie,Be){if(!(Ie instanceof Be))throw new TypeError("Cannot call a class as a function")}(this,ae),Me)if(Me.hasOwnProperty(he)){var Ee=Me[he],Oe=Ee._driver;this[he]=Oe,ge[Oe]||this.defineDriver(Ee)}this._defaultConfig=ln({},Tt),this._config=ln({},this._defaultConfig,de),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return ae.prototype.config=function(de){if((de===void 0?"undefined":J(de))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var he in de){if(he==="storeName"&&(de[he]=de[he].replace(/\W/g,"_")),he==="version"&&typeof de[he]!="number")return new Error("Database version must be a number.");this._config[he]=de[he]}return!("driver"in de)||!de.driver||this.setDriver(this._config.driver)}return typeof de=="string"?this._config[de]:this._config},ae.prototype.defineDriver=function(de,he,Ee){var Oe=new Q(function(Ie,Be){try{var Ue=de._driver,He=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!de._driver)return void Be(He);for(var Pe=ut.concat("_initStorage"),ze=0,Ve=Pe.length;ze<Ve;ze++){var Ye=Pe[ze];if((!K(_t,Ye)||de[Ye])&&typeof de[Ye]!="function")return void Be(He)}(function(){for(var ft=function(Cn){return function(){var Yn=new Error("Method "+Cn+" is not implemented by the current driver"),Ct=Q.reject(Yn);return te(Ct,arguments[arguments.length-1]),Ct}},Dt=0,tn=_t.length;Dt<tn;Dt++){var vn=_t[Dt];de[vn]||(de[vn]=ft(vn))}})();var at=function(ft){ge[Ue]&&console.info("Redefining LocalForage driver: "+Ue),ge[Ue]=de,Ae[Ue]=ft,Ie()};"_support"in de?de._support&&typeof de._support=="function"?de._support().then(at,Be):at(!!de._support):at(!0)}catch(ft){Be(ft)}});return ie(Oe,he,Ee),Oe},ae.prototype.driver=function(){return this._driver||null},ae.prototype.getDriver=function(de,he,Ee){var Oe=ge[de]?Q.resolve(ge[de]):Q.reject(new Error("Driver not found."));return ie(Oe,he,Ee),Oe},ae.prototype.getSerializer=function(de){var he=Q.resolve(Xt);return ie(he,de),he},ae.prototype.ready=function(de){var he=this,Ee=he._driverSet.then(function(){return he._ready===null&&(he._ready=he._initDriver()),he._ready});return ie(Ee,de,de),Ee},ae.prototype.setDriver=function(de,he,Ee){var Oe=this;ue(de)||(de=[de]);var Ie=this._getSupportedDrivers(de);function Be(){Oe._config.driver=Oe.driver()}function Ue(Pe){return Oe._extend(Pe),Be(),Oe._ready=Oe._initStorage(Oe._config),Oe._ready}var He=this._driverSet!==null?this._driverSet.catch(function(){return Q.resolve()}):Q.resolve();return this._driverSet=He.then(function(){var Pe=Ie[0];return Oe._dbInfo=null,Oe._ready=null,Oe.getDriver(Pe).then(function(ze){Oe._driver=ze._driver,Be(),Oe._wrapLibraryMethodsWithReady(),Oe._initDriver=function(Ve){return function(){var Ye=0;return function at(){for(;Ye<Ve.length;){var ft=Ve[Ye];return Ye++,Oe._dbInfo=null,Oe._ready=null,Oe.getDriver(ft).then(Ue).catch(at)}Be();var Dt=new Error("No available storage method found.");return Oe._driverSet=Q.reject(Dt),Oe._driverSet}()}}(Ie)})}).catch(function(){Be();var Pe=new Error("No available storage method found.");return Oe._driverSet=Q.reject(Pe),Oe._driverSet}),ie(this._driverSet,he,Ee),this._driverSet},ae.prototype.supports=function(de){return!!Ae[de]},ae.prototype._extend=function(de){ln(this,de)},ae.prototype._getSupportedDrivers=function(de){for(var he=[],Ee=0,Oe=de.length;Ee<Oe;Ee++){var Ie=de[Ee];this.supports(Ie)&&he.push(Ie)}return he},ae.prototype._wrapLibraryMethodsWithReady=function(){for(var de=0,he=ut.length;de<he;de++)wt(this,ut[de])},ae.prototype.createInstance=function(de){return new ae(de)},ae}(),Kn=new Qn;N.exports=Kn},{3:3}]},{},[4])(4)},961:(O,I,o)=>{var k,N=function(){var F=String.fromCharCode,J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",X="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",Y={};function Q(ie,ne){if(!Y[ie]){Y[ie]={};for(var oe=0;oe<ie.length;oe++)Y[ie][ie.charAt(oe)]=oe}return Y[ie][ne]}var te={compressToBase64:function(ie){if(ie==null)return"";var ne=te._compress(ie,6,function(oe){return J.charAt(oe)});switch(ne.length%4){default:case 0:return ne;case 1:return ne+"===";case 2:return ne+"==";case 3:return ne+"="}},decompressFromBase64:function(ie){return ie==null?"":ie==""?null:te._decompress(ie.length,32,function(ne){return Q(J,ie.charAt(ne))})},compressToUTF16:function(ie){return ie==null?"":te._compress(ie,15,function(ne){return F(ne+32)})+" "},decompressFromUTF16:function(ie){return ie==null?"":ie==""?null:te._decompress(ie.length,16384,function(ne){return ie.charCodeAt(ne)-32})},compressToUint8Array:function(ie){for(var ne=te.compress(ie),oe=new Uint8Array(2*ne.length),ce=0,we=ne.length;ce<we;ce++){var se=ne.charCodeAt(ce);oe[2*ce]=se>>>8,oe[2*ce+1]=se%256}return oe},decompressFromUint8Array:function(ie){if(ie==null)return te.decompress(ie);for(var ne=new Array(ie.length/2),oe=0,ce=ne.length;oe<ce;oe++)ne[oe]=256*ie[2*oe]+ie[2*oe+1];var we=[];return ne.forEach(function(se){we.push(F(se))}),te.decompress(we.join(""))},compressToEncodedURIComponent:function(ie){return ie==null?"":te._compress(ie,6,function(ne){return X.charAt(ne)})},decompressFromEncodedURIComponent:function(ie){return ie==null?"":ie==""?null:(ie=ie.replace(/ /g,"+"),te._decompress(ie.length,32,function(ne){return Q(X,ie.charAt(ne))}))},compress:function(ie){return te._compress(ie,16,function(ne){return F(ne)})},_compress:function(ie,ne,oe){if(ie==null)return"";var ce,we,se,ye={},fe={},pe="",ve="",Te="",me=2,_e=3,De=2,je=[],Fe=0,qe=0;for(se=0;se<ie.length;se+=1)if(pe=ie.charAt(se),Object.prototype.hasOwnProperty.call(ye,pe)||(ye[pe]=_e++,fe[pe]=!0),ve=Te+pe,Object.prototype.hasOwnProperty.call(ye,ve))Te=ve;else{if(Object.prototype.hasOwnProperty.call(fe,Te)){if(Te.charCodeAt(0)<256){for(ce=0;ce<De;ce++)Fe<<=1,qe==ne-1?(qe=0,je.push(oe(Fe)),Fe=0):qe++;for(we=Te.charCodeAt(0),ce=0;ce<8;ce++)Fe=Fe<<1|1&we,qe==ne-1?(qe=0,je.push(oe(Fe)),Fe=0):qe++,we>>=1}else{for(we=1,ce=0;ce<De;ce++)Fe=Fe<<1|we,qe==ne-1?(qe=0,je.push(oe(Fe)),Fe=0):qe++,we=0;for(we=Te.charCodeAt(0),ce=0;ce<16;ce++)Fe=Fe<<1|1&we,qe==ne-1?(qe=0,je.push(oe(Fe)),Fe=0):qe++,we>>=1}--me==0&&(me=Math.pow(2,De),De++),delete fe[Te]}else for(we=ye[Te],ce=0;ce<De;ce++)Fe=Fe<<1|1&we,qe==ne-1?(qe=0,je.push(oe(Fe)),Fe=0):qe++,we>>=1;--me==0&&(me=Math.pow(2,De),De++),ye[ve]=_e++,Te=String(pe)}if(Te!==""){if(Object.prototype.hasOwnProperty.call(fe,Te)){if(Te.charCodeAt(0)<256){for(ce=0;ce<De;ce++)Fe<<=1,qe==ne-1?(qe=0,je.push(oe(Fe)),Fe=0):qe++;for(we=Te.charCodeAt(0),ce=0;ce<8;ce++)Fe=Fe<<1|1&we,qe==ne-1?(qe=0,je.push(oe(Fe)),Fe=0):qe++,we>>=1}else{for(we=1,ce=0;ce<De;ce++)Fe=Fe<<1|we,qe==ne-1?(qe=0,je.push(oe(Fe)),Fe=0):qe++,we=0;for(we=Te.charCodeAt(0),ce=0;ce<16;ce++)Fe=Fe<<1|1&we,qe==ne-1?(qe=0,je.push(oe(Fe)),Fe=0):qe++,we>>=1}--me==0&&(me=Math.pow(2,De),De++),delete fe[Te]}else for(we=ye[Te],ce=0;ce<De;ce++)Fe=Fe<<1|1&we,qe==ne-1?(qe=0,je.push(oe(Fe)),Fe=0):qe++,we>>=1;--me==0&&(me=Math.pow(2,De),De++)}for(we=2,ce=0;ce<De;ce++)Fe=Fe<<1|1&we,qe==ne-1?(qe=0,je.push(oe(Fe)),Fe=0):qe++,we>>=1;for(;;){if(Fe<<=1,qe==ne-1){je.push(oe(Fe));break}qe++}return je.join("")},decompress:function(ie){return ie==null?"":ie==""?null:te._decompress(ie.length,32768,function(ne){return ie.charCodeAt(ne)})},_decompress:function(ie,ne,oe){var ce,we,se,ye,fe,pe,ve,Te=[],me=4,_e=4,De=3,je="",Fe=[],qe={val:oe(0),position:ne,index:1};for(ce=0;ce<3;ce+=1)Te[ce]=ce;for(se=0,fe=Math.pow(2,2),pe=1;pe!=fe;)ye=qe.val&qe.position,qe.position>>=1,qe.position==0&&(qe.position=ne,qe.val=oe(qe.index++)),se|=(ye>0?1:0)*pe,pe<<=1;switch(se){case 0:for(se=0,fe=Math.pow(2,8),pe=1;pe!=fe;)ye=qe.val&qe.position,qe.position>>=1,qe.position==0&&(qe.position=ne,qe.val=oe(qe.index++)),se|=(ye>0?1:0)*pe,pe<<=1;ve=F(se);break;case 1:for(se=0,fe=Math.pow(2,16),pe=1;pe!=fe;)ye=qe.val&qe.position,qe.position>>=1,qe.position==0&&(qe.position=ne,qe.val=oe(qe.index++)),se|=(ye>0?1:0)*pe,pe<<=1;ve=F(se);break;case 2:return""}for(Te[3]=ve,we=ve,Fe.push(ve);;){if(qe.index>ie)return"";for(se=0,fe=Math.pow(2,De),pe=1;pe!=fe;)ye=qe.val&qe.position,qe.position>>=1,qe.position==0&&(qe.position=ne,qe.val=oe(qe.index++)),se|=(ye>0?1:0)*pe,pe<<=1;switch(ve=se){case 0:for(se=0,fe=Math.pow(2,8),pe=1;pe!=fe;)ye=qe.val&qe.position,qe.position>>=1,qe.position==0&&(qe.position=ne,qe.val=oe(qe.index++)),se|=(ye>0?1:0)*pe,pe<<=1;Te[_e++]=F(se),ve=_e-1,me--;break;case 1:for(se=0,fe=Math.pow(2,16),pe=1;pe!=fe;)ye=qe.val&qe.position,qe.position>>=1,qe.position==0&&(qe.position=ne,qe.val=oe(qe.index++)),se|=(ye>0?1:0)*pe,pe<<=1;Te[_e++]=F(se),ve=_e-1,me--;break;case 2:return Fe.join("")}if(me==0&&(me=Math.pow(2,De),De++),Te[ve])je=Te[ve];else{if(ve!==_e)return null;je=we+we.charAt(0)}Fe.push(je),Te[_e++]=we+je.charAt(0),we=je,--me==0&&(me=Math.pow(2,De),De++)}}};return te}();(k=(function(){return N}).call(I,o,I,O))===void 0||(O.exports=k)},895:O=>{O.exports=function(I,o,k,N){var F=I[0],J=I[1],X=!1;k===void 0&&(k=0),N===void 0&&(N=o.length);for(var Y=(N-k)/2,Q=0,te=Y-1;Q<Y;te=Q++){var ie=o[k+2*Q+0],ne=o[k+2*Q+1],oe=o[k+2*te+0],ce=o[k+2*te+1];ne>J!=ce>J&&F<(oe-ie)*(J-ne)/(ce-ne)+ie&&(X=!X)}return X}},946:(O,I,o)=>{const k=o(909),N=async()=>await k.get({dir:"areaList",file:"index"}),F=({name:te,list:ie})=>{let ne=te;const oe=ie.find(we=>ne.indexOf(we.name)!==-1);if(oe){const we=oe.name.length;return ne=ne.slice(we,te.length),{id:oe.id,name:ne,children:oe.children}}const ce=ie.find(we=>ne.indexOf(we.shortName)!==-1);if(ce){const we=ce.shortName.length;return ne=ne.slice(we,te.length),{id:ce.id,name:ne,children:ce.children}}return null},J=async(te="",ie)=>{let ne=te;const oe={province:"",city:"",district:""};let ce=ie;ie||(ce=await N());const we=F({name:ne,list:ce});if(we){ne=we.name,oe.province=we.id;const fe=we.children,pe=F({name:ne,list:fe});if(pe){ne=pe.name,oe.city=pe.id;const me=F({name:ne,list:pe.children});return me&&(ne=me.name,oe.district=me.id),oe}const ve=fe.reduce((me,_e)=>_e.children?me.concat(_e.children):me,[]),Te=F({name:ne,list:ve});return Te&&(ne=Te.name,oe.district=Te.id),oe}const se=ce.reduce((fe,pe)=>pe.children?fe.concat(pe.children):fe,[]),ye=F({name:ne,list:se});if(ye){ne=ye.name,oe.city=ye.id;const fe=F({name:ne,list:ye.children});fe&&(ne=fe.name,oe.district=fe.id)}return oe},X=async(te={})=>{let{code:ie}={...te};ie=typeof ie=="string"?ie:ie.toString();const ne={province:"",provinceCode:"",city:"",cityCode:"",district:"",districtCode:"",code:ie,address:""};if((await N()).every(oe=>oe.id===ie?(ne.province=oe.name,ne.provinceCode=oe.id,!1):!oe.children||oe.children.every(ce=>ce.id===ie?(ne.province=oe.name,ne.provinceCode=oe.id,ne.city=ce.name,ne.cityCode=ce.id,!1):!ce.children||ce.children.every(we=>we.id!==ie||(ne.province=oe.name,ne.provinceCode=oe.id,ne.city=ce.name,ne.cityCode=ce.id,ne.district=we.name,ne.districtCode=we.id,!1)))))throw new Error("未找到该地区");return ne.address=ne.province+ne.city+ne.district,ne},Y=async({provinceCode:te,cityCode:ie,districtCode:ne})=>{const oe={province:{},city:{},district:{}};if(te){const ce=await k.get({dir:"province",file:te});oe.province={code:ce.id,location:ce.location,name:ce.name,pinyin:ce.pinyin}}if(ie){const ce=(await k.get({dir:"city",file:te})).find(we=>we.id===ie);oe.city={code:ce.id,location:ce.location,name:ce.name,pinyin:ce.pinyin}}if(ne){const ce=(await k.get({dir:"district",file:ie})).find(we=>we.id===ne);oe.district={code:ce.id,location:ce.location,name:ce.name,pinyin:ce.pinyin}}return oe},Q=async(te,ie)=>{let ne=ie;if(ne||(ne=await N()),!te)return ne.map(oe=>({code:oe.id,name:oe.name}));for(let oe=0;oe<ne.length;oe++){const ce=ne[oe];if(ce.id===te&&ce.children)return ce.children.map(we=>({code:we.id,name:we.name}));if(ce.children){const we=await Q(te,ce.children);if(we)return we}}};O.exports={getList:Q,searchCodeInfo:async({code:te,detail:ie})=>{const{province:ne,city:oe,district:ce,address:we,provinceCode:se,cityCode:ye,districtCode:fe}=await X({code:te}),pe={province:ne,city:oe,district:ce,address:we,code:te};if(ie){const ve=await Y({provinceCode:se,cityCode:ye,districtCode:fe});pe.detail=ve}return pe},searchStrAddress:async te=>{const{province:ie,city:ne,district:oe}=await J(te);return oe||ne||ie||null},analysisAddress:J,searchCodeDetailInfo:async({code:te})=>{const{provinceCode:ie,cityCode:ne,districtCode:oe}=await X({code:te}),ce=await Y({provinceCode:ie,cityCode:ne,districtCode:oe});return Object.keys(ce.district).length?ce.district:Object.keys(ce.city).length?ce.city:Object.keys(ce.province).length?ce.province:void 0}}},182:O=>{O.exports=new class{constructor(){this.config={timeout:1e4,enableHighAccuracy:!1,detail:!1},this.cdn=["https://npm.onmicrosoft.cn/@pikaz/location/lib","https://unpkg.com/@pikaz/location/lib"],this.userCdn=""}set(I){this.config={...this.config,...I},this.config.url&&(this.userCdn=this.config.url)}}},955:(O,I,o)=>{const k=o(909),N=o(895),F=o(182),J=({latitude:X,longitude:Y,address:Q})=>Q.find(te=>te.polygon.find(ie=>{if(N([Y,X],ie))return ie}));O.exports={getGeo:(X={})=>{const{enableHighAccuracy:Y,timeout:Q}={...F.config,...X};return new Promise((te,ie)=>{if(navigator.geolocation){const ne=navigator.geolocation.watchPosition(oe=>{const{latitude:ce,longitude:we}=oe.coords;navigator.geolocation.clearWatch(ne),te({latitude:ce,longitude:we})},oe=>{switch(navigator.geolocation.clearWatch(ne),oe.code){case oe.PERMISSION_DENIED:ie(new Error("html5已拒绝定位"));break;case oe.POSITION_UNAVAILABLE:ie(new Error("html5位置信息不可用"));break;case oe.TIMEOUT:ie(new Error("定位超时"));break;case oe.UNKNOWN_ERROR:ie(new Error("html5定位未知错误"))}},{enableHighAccuracy:Y,timeout:Q,maximumAge:0})}else ie(new Error("浏览器不支持HTML5定位"))})},getGeoCode:async({latitude:X,longitude:Y})=>{try{let Q="";const te=(await k.get({dir:"province",file:"short"})).filter(ne=>J({latitude:X,longitude:Y,address:[ne]}));let ie="";for(let ne=0;ne<te.length;ne++){const{id:oe}=te[ne],ce=await k.get({dir:"province",file:oe}),we=J({latitude:X,longitude:Y,address:[ce]});we&&(ie=we)}if(ie){Q=ie.id;const ne=await k.get({dir:"city",file:ie.id}),oe=J({latitude:X,longitude:Y,address:ne});if(oe){Q=oe.id;const ce=await k.get({dir:"district",file:oe.id}),we=J({latitude:X,longitude:Y,address:ce});we&&(Q=we.id)}}if(!Q)throw new Error("非中国境内");return Q}catch(Q){throw Q}}}},909:(O,I,o)=>{const k=o(218),{decompressFromEncodedURIComponent:N}=o(961),F=o(483),J=o(182),{version:X,fileDate:Y}=o(147);O.exports=new class{constructor(){this.local=null,this.localConfig={name:"pikazLocation",storeName:"v"+X.split(".")[0]+"."+X.split(".")[1]}}async get({dir:Q,file:te}){if(!this.local){const oe=F.createInstance(this.localConfig);await oe.ready(),this.local=oe}const ie=`${Q}-${te}-${Y[Q]}`,ne=await this.local.getItem(ie);if(ne)return ne;try{const oe=await(async({file:ce})=>{const we=k.CancelToken;let se;const ye=async(fe,pe)=>{const ve=await k({url:`${fe}/static/${pe}.json`,method:"get",dataType:"json",cancelToken:new we(function(me){se=me}),timeout:J.timeout});if(!ve||!ve.data||Object.prototype.toString.call(ve.data.s)!="[object String]")throw new Error("未获取到文件");const Te=N(ve.data.s);return JSON.parse(Te)};try{const fe=J.userCdn;if(fe)return await ye(fe,ce);throw new Error("未找到设置的url")}catch{const pe=J.cdn.map(ve=>new Promise(Te=>{ye(ve,ce).then(me=>{Te(me)}).catch(()=>{})}));try{return await Promise.race(pe)}catch{throw new Error("定位失败")}finally{se()}}})({file:`${Q}/${te}`});return this.local.setItem(ie,oe),oe}catch{throw new Error("定位失败")}}async getVal({key:Q,gainVal:te,expiration:ie}){if(!this.local){const ye=F.createInstance(this.localConfig);await ye.ready(),this.local=ye}const ne=new Date().getTime(),oe=ie||0,ce=`local-${Q}`,we=await this.local.getItem(ce);if(we&&we.expiration>ne)return we.val;const se=await te();return await this.local.setItem(ce,{val:se,expiration:ne+oe}),se}async clear(){await this.local.clear()}}},138:(O,I,o)=>{const k=o(182),{getGeo:N,getGeoCode:F}=o(955),{getList:J,searchCodeInfo:X,searchStrAddress:Y,searchCodeDetailInfo:Q}=o(946),{getIpCode:te}=o(454),ie=async(se,ye={})=>{let{timeout:fe}={...k.config,...ye};return await Promise.race([se(ye),new Promise((pe,ve)=>{setTimeout(()=>{ve(new Error("定位超时"))},fe)})])},ne=async(se={})=>{let{timeout:ye,enableHighAccuracy:fe,detail:pe,latitude:ve,longitude:Te}={...k.config,...se};if(!ve||!Te){const{latitude:me,longitude:_e}=await N({timeout:ye,enableHighAccuracy:fe});ve=me,Te=_e}return await ie(async()=>{const me=await F({latitude:ve,longitude:Te});if(!me)throw new Error("非中国境内");return{...await X({code:me,detail:pe}),latitude:ve,longitude:Te}},{timeout:ye})},oe=async(se={})=>{let{detail:ye,ip:fe}={...k.config,...se};const{code:pe,ip:ve}=await te({ip:fe});return fe||(fe=ve),{...await X({code:pe,detail:ye}),ip:fe}},ce=async(se={})=>{const{address:ye,detail:fe}={...k.config,...se},pe=await Y(ye);if(!pe)throw new Error("解析地址失败,请确认地址包含省级或市级名称");return await X({code:pe,detail:fe})},we=async(se={})=>{const{code:ye,detail:fe}={...k.config,...se};return await X({code:ye,detail:fe})};O.exports={setConfig:({timeout:se,url:ye})=>{k.set({timeout:se,url:ye})},getLocation:async(se={})=>{try{return{...await ne(se),type:"h5"}}catch{return{...await ie(oe,se),type:"ip"}}},getH5Location:ne,getIpLocation:se=>ie(oe,se),searchList:async(se={})=>{const{code:ye}={...se};return await J(ye||"")||[]},searchCodeAddress:se=>ie(we,se),searchAddress:se=>ie(ce,se),searchCodeDetail:se=>ie(Q,se)}},454:(O,I,o)=>{const{decompressFromEncodedURIComponent:k}=o(961),N=o(909),F=X=>{const Y=X.split(".").reduce((Q,te)=>`${Q}${(ie=>{const ne=ie.split("").reverse();return new Array(3).fill(0).map((oe,ce)=>ne[ce]||0).reverse().join("")})(te)}`,"");return Number(Y)},J=()=>new Promise((X,Y)=>{const Q="ipCallback"+new Date().getTime(),te=document.createElement("script");te.onerror=()=>{Y(new Error("获取ip失败"))},window[Q]=ie=>{ie&&ie.ip?X(ie.ip):Y(new Error("ip定位失败"))},te.src=k("BYFxAcGcC4HpYIbgJYDpkoGYE9UHsAnAc1gH5NCBbBEAXgCtI8A7cAMjYGMEAbHgIwScA1rSA")+Q,document.body.appendChild(te)});O.exports={addZero:F,getIpCode:async(X={})=>{let{ip:Y}={...X};Y||(Y=await N.getVal({key:"ip",gainVal:J,expiration:864e5}));const Q=Y.split(".").map(te=>Number(te)||0);if(Q.length!==4)throw new Error("ip格式错误,只支持ipv4");return{code:(await N.get({dir:"ip",file:`${Q[0]}.${Q[1]}`})).reduce((te,ie)=>{const{district:ne,id:oe}=ie,ce=F(Y);return ce>=ne[0]&&ce<=ne[1]?oe:te},""),ip:Y}}}},218:(O,I,o)=>{function k(ee,le){return function(){return ee.apply(le,arguments)}}const{toString:N}=Object.prototype,{getPrototypeOf:F}=Object,J=(X=Object.create(null),ee=>{const le=N.call(ee);return X[le]||(X[le]=le.slice(8,-1).toLowerCase())});var X;const Y=ee=>(ee=ee.toLowerCase(),le=>J(le)===ee),Q=ee=>le=>typeof le===ee,{isArray:te}=Array,ie=Q("undefined"),ne=Y("ArrayBuffer"),oe=Q("string"),ce=Q("function"),we=Q("number"),se=ee=>ee!==null&&typeof ee=="object",ye=ee=>{if(J(ee)!=="object")return!1;const le=F(ee);return!(le!==null&&le!==Object.prototype&&Object.getPrototypeOf(le)!==null||Symbol.toStringTag in ee||Symbol.iterator in ee)},fe=Y("Date"),pe=Y("File"),ve=Y("Blob"),Te=Y("FileList"),me=Y("URLSearchParams");function _e(ee,le,{allOwnKeys:be=!1}={}){if(ee==null)return;let ke,xe;if(typeof ee!="object"&&(ee=[ee]),te(ee))for(ke=0,xe=ee.length;ke<xe;ke++)le.call(null,ee[ke],ke,ee);else{const $e=be?Object.getOwnPropertyNames(ee):Object.keys(ee),Ce=$e.length;let We;for(ke=0;ke<Ce;ke++)We=$e[ke],le.call(null,ee[We],We,ee)}}function De(ee,le){le=le.toLowerCase();const be=Object.keys(ee);let ke,xe=be.length;for(;xe-- >0;)if(ke=be[xe],le===ke.toLowerCase())return ke;return null}const je=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:o.g,Fe=ee=>!ie(ee)&&ee!==je,qe=(gt=typeof Uint8Array<"u"&&F(Uint8Array),ee=>gt&&ee instanceof gt);var gt;const St=Y("HTMLFormElement"),It=(({hasOwnProperty:ee})=>(le,be)=>ee.call(le,be))(Object.prototype),Lt=Y("RegExp"),Nt=(ee,le)=>{const be=Object.getOwnPropertyDescriptors(ee),ke={};_e(be,(xe,$e)=>{let Ce;(Ce=le(xe,$e,ee))!==!1&&(ke[$e]=Ce||xe)}),Object.defineProperties(ee,ke)},yt="abcdefghijklmnopqrstuvwxyz",tt="0123456789",zt={DIGIT:tt,ALPHA:yt,ALPHA_DIGIT:yt+yt.toUpperCase()+tt},Ot=Y("AsyncFunction");var Ne={isArray:te,isArrayBuffer:ne,isBuffer:function(ee){return ee!==null&&!ie(ee)&&ee.constructor!==null&&!ie(ee.constructor)&&ce(ee.constructor.isBuffer)&&ee.constructor.isBuffer(ee)},isFormData:ee=>{let le;return ee&&(typeof FormData=="function"&&ee instanceof FormData||ce(ee.append)&&((le=J(ee))==="formdata"||le==="object"&&ce(ee.toString)&&ee.toString()==="[object FormData]"))},isArrayBufferView:function(ee){let le;return le=typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(ee):ee&&ee.buffer&&ne(ee.buffer),le},isString:oe,isNumber:we,isBoolean:ee=>ee===!0||ee===!1,isObject:se,isPlainObject:ye,isUndefined:ie,isDate:fe,isFile:pe,isBlob:ve,isRegExp:Lt,isFunction:ce,isStream:ee=>se(ee)&&ce(ee.pipe),isURLSearchParams:me,isTypedArray:qe,isFileList:Te,forEach:_e,merge:function ee(){const{caseless:le}=Fe(this)&&this||{},be={},ke=(xe,$e)=>{const Ce=le&&De(be,$e)||$e;ye(be[Ce])&&ye(xe)?be[Ce]=ee(be[Ce],xe):ye(xe)?be[Ce]=ee({},xe):te(xe)?be[Ce]=xe.slice():be[Ce]=xe};for(let xe=0,$e=arguments.length;xe<$e;xe++)arguments[xe]&&_e(arguments[xe],ke);return be},extend:(ee,le,be,{allOwnKeys:ke}={})=>(_e(le,(xe,$e)=>{be&&ce(xe)?ee[$e]=k(xe,be):ee[$e]=xe},{allOwnKeys:ke}),ee),trim:ee=>ee.trim?ee.trim():ee.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:ee=>(ee.charCodeAt(0)===65279&&(ee=ee.slice(1)),ee),inherits:(ee,le,be,ke)=>{ee.prototype=Object.create(le.prototype,ke),ee.prototype.constructor=ee,Object.defineProperty(ee,"super",{value:le.prototype}),be&&Object.assign(ee.prototype,be)},toFlatObject:(ee,le,be,ke)=>{let xe,$e,Ce;const We={};if(le=le||{},ee==null)return le;do{for(xe=Object.getOwnPropertyNames(ee),$e=xe.length;$e-- >0;)Ce=xe[$e],ke&&!ke(Ce,ee,le)||We[Ce]||(le[Ce]=ee[Ce],We[Ce]=!0);ee=be!==!1&&F(ee)}while(ee&&(!be||be(ee,le))&&ee!==Object.prototype);return le},kindOf:J,kindOfTest:Y,endsWith:(ee,le,be)=>{ee=String(ee),(be===void 0||be>ee.length)&&(be=ee.length),be-=le.length;const ke=ee.indexOf(le,be);return ke!==-1&&ke===be},toArray:ee=>{if(!ee)return null;if(te(ee))return ee;let le=ee.length;if(!we(le))return null;const be=new Array(le);for(;le-- >0;)be[le]=ee[le];return be},forEachEntry:(ee,le)=>{const be=(ee&&ee[Symbol.iterator]).call(ee);let ke;for(;(ke=be.next())&&!ke.done;){const xe=ke.value;le.call(ee,xe[0],xe[1])}},matchAll:(ee,le)=>{let be;const ke=[];for(;(be=ee.exec(le))!==null;)ke.push(be);return ke},isHTMLForm:St,hasOwnProperty:It,hasOwnProp:It,reduceDescriptors:Nt,freezeMethods:ee=>{Nt(ee,(le,be)=>{if(ce(ee)&&["arguments","caller","callee"].indexOf(be)!==-1)return!1;const ke=ee[be];ce(ke)&&(le.enumerable=!1,"writable"in le?le.writable=!1:le.set||(le.set=()=>{throw Error("Can not rewrite read-only method '"+be+"'")}))})},toObjectSet:(ee,le)=>{const be={},ke=xe=>{xe.forEach($e=>{be[$e]=!0})};return te(ee)?ke(ee):ke(String(ee).split(le)),be},toCamelCase:ee=>ee.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(le,be,ke){return be.toUpperCase()+ke}),noop:()=>{},toFiniteNumber:(ee,le)=>(ee=+ee,Number.isFinite(ee)?ee:le),findKey:De,global:je,isContextDefined:Fe,ALPHABET:zt,generateString:(ee=16,le=zt.ALPHA_DIGIT)=>{let be="";const{length:ke}=le;for(;ee--;)be+=le[Math.random()*ke|0];return be},isSpecCompliantForm:function(ee){return!!(ee&&ce(ee.append)&&ee[Symbol.toStringTag]==="FormData"&&ee[Symbol.iterator])},toJSONObject:ee=>{const le=new Array(10),be=(ke,xe)=>{if(se(ke)){if(le.indexOf(ke)>=0)return;if(!("toJSON"in ke)){le[xe]=ke;const $e=te(ke)?[]:{};return _e(ke,(Ce,We)=>{const Ze=be(Ce,xe+1);!ie(Ze)&&($e[We]=Ze)}),le[xe]=void 0,$e}}return ke};return be(ee,0)},isAsyncFn:Ot,isThenable:ee=>ee&&(se(ee)||ce(ee))&&ce(ee.then)&&ce(ee.catch)};function nt(ee,le,be,ke,xe){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=ee,this.name="AxiosError",le&&(this.code=le),be&&(this.config=be),ke&&(this.request=ke),xe&&(this.response=xe)}Ne.inherits(nt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ne.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ht=nt.prototype,At={};function et(ee){return Ne.isPlainObject(ee)||Ne.isArray(ee)}function Qe(ee){return Ne.endsWith(ee,"[]")?ee.slice(0,-2):ee}function rt(ee,le,be){return ee?ee.concat(le).map(function(ke,xe){return ke=Qe(ke),!be&&xe?"["+ke+"]":ke}).join(be?".":""):le}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(ee=>{At[ee]={value:ee}}),Object.defineProperties(nt,At),Object.defineProperty(Ht,"isAxiosError",{value:!0}),nt.from=(ee,le,be,ke,xe,$e)=>{const Ce=Object.create(Ht);return Ne.toFlatObject(ee,Ce,function(We){return We!==Error.prototype},We=>We!=="isAxiosError"),nt.call(Ce,ee.message,le,be,ke,xe),Ce.cause=ee,Ce.name=ee.name,$e&&Object.assign(Ce,$e),Ce};const it=Ne.toFlatObject(Ne,{},null,function(ee){return/^is[A-Z]/.test(ee)});function vt(ee,le,be){if(!Ne.isObject(ee))throw new TypeError("target must be an object");le=le||new FormData;const ke=(be=Ne.toFlatObject(be,{metaTokens:!0,dots:!1,indexes:!1},!1,function(Ke,bt){return!Ne.isUndefined(bt[Ke])})).metaTokens,xe=be.visitor||Je,$e=be.dots,Ce=be.indexes,We=(be.Blob||typeof Blob<"u"&&Blob)&&Ne.isSpecCompliantForm(le);if(!Ne.isFunction(xe))throw new TypeError("visitor must be a function");function Ze(Ke){if(Ke===null)return"";if(Ne.isDate(Ke))return Ke.toISOString();if(!We&&Ne.isBlob(Ke))throw new nt("Blob is not supported. Use a Buffer instead.");return Ne.isArrayBuffer(Ke)||Ne.isTypedArray(Ke)?We&&typeof Blob=="function"?new Blob([Ke]):Buffer.from(Ke):Ke}function Je(Ke,bt,Ge){let kt=Ke;if(Ke&&!Ge&&typeof Ke=="object"){if(Ne.endsWith(bt,"{}"))bt=ke?bt:bt.slice(0,-2),Ke=JSON.stringify(Ke);else if(Ne.isArray(Ke)&&function(Pt){return Ne.isArray(Pt)&&!Pt.some(et)}(Ke)||(Ne.isFileList(Ke)||Ne.endsWith(bt,"[]"))&&(kt=Ne.toArray(Ke)))return bt=Qe(bt),kt.forEach(function(Pt,nn){!Ne.isUndefined(Pt)&&Pt!==null&&le.append(Ce===!0?rt([bt],nn,$e):Ce===null?bt:bt+"[]",Ze(Pt))}),!1}return!!et(Ke)||(le.append(rt(Ge,bt,$e),Ze(Ke)),!1)}const Le=[],st=Object.assign(it,{defaultVisitor:Je,convertValue:Ze,isVisitable:et});if(!Ne.isObject(ee))throw new TypeError("data must be an object");return function Ke(bt,Ge){if(!Ne.isUndefined(bt)){if(Le.indexOf(bt)!==-1)throw Error("Circular reference detected in "+Ge.join("."));Le.push(bt),Ne.forEach(bt,function(kt,Pt){(!(Ne.isUndefined(kt)||kt===null)&&xe.call(le,kt,Ne.isString(Pt)?Pt.trim():Pt,Ge,st))===!0&&Ke(kt,Ge?Ge.concat(Pt):[Pt])}),Le.pop()}}(ee),le}function Rt(ee){const le={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(ee).replace(/[!'()~]|%20|%00/g,function(be){return le[be]})}function Mt(ee,le){this._pairs=[],ee&&vt(ee,this,le)}const qt=Mt.prototype;function Jt(ee){return encodeURIComponent(ee).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Wt(ee,le,be){if(!le)return ee;const ke=be&&be.encode||Jt,xe=be&&be.serialize;let $e;if($e=xe?xe(le,be):Ne.isURLSearchParams(le)?le.toString():new Mt(le,be).toString(ke),$e){const Ce=ee.indexOf("#");Ce!==-1&&(ee=ee.slice(0,Ce)),ee+=(ee.indexOf("?")===-1?"?":"&")+$e}return ee}qt.append=function(ee,le){this._pairs.push([ee,le])},qt.toString=function(ee){const le=ee?function(be){return ee.call(this,be,Rt)}:Rt;return this._pairs.map(function(be){return le(be[0])+"="+le(be[1])},"").join("&")};var cn=class{constructor(){this.handlers=[]}use(ee,le,be){return this.handlers.push({fulfilled:ee,rejected:le,synchronous:!!be&&be.synchronous,runWhen:be?be.runWhen:null}),this.handlers.length-1}eject(ee){this.handlers[ee]&&(this.handlers[ee]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(ee){Ne.forEach(this.handlers,function(le){le!==null&&ee(le)})}},Yt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Xt={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Mt,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]};const jt=typeof window<"u"&&typeof document<"u",Vt=(yn=typeof navigator<"u"&&navigator.product,jt&&["ReactNative","NativeScript","NS"].indexOf(yn)<0);var yn;const en=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function";var Zt={...Object.freeze({__proto__:null,hasBrowserEnv:jt,hasStandardBrowserWebWorkerEnv:en,hasStandardBrowserEnv:Vt}),...Xt};function re(ee){function le(be,ke,xe,$e){let Ce=be[$e++];const We=Number.isFinite(+Ce),Ze=$e>=be.length;return Ce=!Ce&&Ne.isArray(xe)?xe.length:Ce,Ze?(Ne.hasOwnProp(xe,Ce)?xe[Ce]=[xe[Ce],ke]:xe[Ce]=ke,!We):(xe[Ce]&&Ne.isObject(xe[Ce])||(xe[Ce]=[]),le(be,ke,xe[Ce],$e)&&Ne.isArray(xe[Ce])&&(xe[Ce]=function(Je){const Le={},st=Object.keys(Je);let Ke;const bt=st.length;let Ge;for(Ke=0;Ke<bt;Ke++)Ge=st[Ke],Le[Ge]=Je[Ge];return Le}(xe[Ce])),!We)}if(Ne.isFormData(ee)&&Ne.isFunction(ee.entries)){const be={};return Ne.forEachEntry(ee,(ke,xe)=>{le(function($e){return Ne.matchAll(/\w+|\[(\w*)]/g,$e).map(Ce=>Ce[0]==="[]"?"":Ce[1]||Ce[0])}(ke),xe,be,0)}),be}return null}const Z={transitional:Yt,adapter:["xhr","http"],transformRequest:[function(ee,le){const be=le.getContentType()||"",ke=be.indexOf("application/json")>-1,xe=Ne.isObject(ee);if(xe&&Ne.isHTMLForm(ee)&&(ee=new FormData(ee)),Ne.isFormData(ee))return ke&&ke?JSON.stringify(re(ee)):ee;if(Ne.isArrayBuffer(ee)||Ne.isBuffer(ee)||Ne.isStream(ee)||Ne.isFile(ee)||Ne.isBlob(ee))return ee;if(Ne.isArrayBufferView(ee))return ee.buffer;if(Ne.isURLSearchParams(ee))return le.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),ee.toString();let $e;if(xe){if(be.indexOf("application/x-www-form-urlencoded")>-1)return function(Ce,We){return vt(Ce,new Zt.classes.URLSearchParams,Object.assign({visitor:function(Ze,Je,Le,st){return Zt.isNode&&Ne.isBuffer(Ze)?(this.append(Je,Ze.toString("base64")),!1):st.defaultVisitor.apply(this,arguments)}},We))}(ee,this.formSerializer).toString();if(($e=Ne.isFileList(ee))||be.indexOf("multipart/form-data")>-1){const Ce=this.env&&this.env.FormData;return vt($e?{"files[]":ee}:ee,Ce&&new Ce,this.formSerializer)}}return xe||ke?(le.setContentType("application/json",!1),function(Ce,We,Ze){if(Ne.isString(Ce))try{return(0,JSON.parse)(Ce),Ne.trim(Ce)}catch(Je){if(Je.name!=="SyntaxError")throw Je}return(0,JSON.stringify)(Ce)}(ee)):ee}],transformResponse:[function(ee){const le=this.transitional||Z.transitional,be=le&&le.forcedJSONParsing,ke=this.responseType==="json";if(ee&&Ne.isString(ee)&&(be&&!this.responseType||ke)){const xe=!(le&&le.silentJSONParsing)&&ke;try{return JSON.parse(ee)}catch($e){if(xe)throw $e.name==="SyntaxError"?nt.from($e,nt.ERR_BAD_RESPONSE,this,null,this.response):$e}}return ee}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Zt.classes.FormData,Blob:Zt.classes.Blob},validateStatus:function(ee){return ee>=200&&ee<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ne.forEach(["delete","get","head","post","put","patch"],ee=>{Z.headers[ee]={}});var K=Z;const ue=Ne.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ge=Symbol("internals");function Ae(ee){return ee&&String(ee).trim().toLowerCase()}function Me(ee){return ee===!1||ee==null?ee:Ne.isArray(ee)?ee.map(Me):String(ee)}function ot(ee,le,be,ke,xe){return Ne.isFunction(ke)?ke.call(this,le,be):(xe&&(le=be),Ne.isString(le)?Ne.isString(ke)?le.indexOf(ke)!==-1:Ne.isRegExp(ke)?ke.test(le):void 0:void 0)}class _t{constructor(le){le&&this.set(le)}set(le,be,ke){const xe=this;function $e(We,Ze,Je){const Le=Ae(Ze);if(!Le)throw new Error("header name must be a non-empty string");const st=Ne.findKey(xe,Le);(!st||xe[st]===void 0||Je===!0||Je===void 0&&xe[st]!==!1)&&(xe[st||Ze]=Me(We))}const Ce=(We,Ze)=>Ne.forEach(We,(Je,Le)=>$e(Je,Le,Ze));return Ne.isPlainObject(le)||le instanceof this.constructor?Ce(le,be):Ne.isString(le)&&(le=le.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(le.trim())?Ce((We=>{const Ze={};let Je,Le,st;return We&&We.split(`
4
- `).forEach(function(Ke){st=Ke.indexOf(":"),Je=Ke.substring(0,st).trim().toLowerCase(),Le=Ke.substring(st+1).trim(),!Je||Ze[Je]&&ue[Je]||(Je==="set-cookie"?Ze[Je]?Ze[Je].push(Le):Ze[Je]=[Le]:Ze[Je]=Ze[Je]?Ze[Je]+", "+Le:Le)}),Ze})(le),be):le!=null&&$e(be,le,ke),this}get(le,be){if(le=Ae(le)){const ke=Ne.findKey(this,le);if(ke){const xe=this[ke];if(!be)return xe;if(be===!0)return function($e){const Ce=Object.create(null),We=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let Ze;for(;Ze=We.exec($e);)Ce[Ze[1]]=Ze[2];return Ce}(xe);if(Ne.isFunction(be))return be.call(this,xe,ke);if(Ne.isRegExp(be))return be.exec(xe);throw new TypeError("parser must be boolean|regexp|function")}}}has(le,be){if(le=Ae(le)){const ke=Ne.findKey(this,le);return!(!ke||this[ke]===void 0||be&&!ot(0,this[ke],ke,be))}return!1}delete(le,be){const ke=this;let xe=!1;function $e(Ce){if(Ce=Ae(Ce)){const We=Ne.findKey(ke,Ce);!We||be&&!ot(0,ke[We],We,be)||(delete ke[We],xe=!0)}}return Ne.isArray(le)?le.forEach($e):$e(le),xe}clear(le){const be=Object.keys(this);let ke=be.length,xe=!1;for(;ke--;){const $e=be[ke];le&&!ot(0,this[$e],$e,le,!0)||(delete this[$e],xe=!0)}return xe}normalize(le){const be=this,ke={};return Ne.forEach(this,(xe,$e)=>{const Ce=Ne.findKey(ke,$e);if(Ce)return be[Ce]=Me(xe),void delete be[$e];const We=le?function(Ze){return Ze.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(Je,Le,st)=>Le.toUpperCase()+st)}($e):String($e).trim();We!==$e&&delete be[$e],be[We]=Me(xe),ke[We]=!0}),this}concat(...le){return this.constructor.concat(this,...le)}toJSON(le){const be=Object.create(null);return Ne.forEach(this,(ke,xe)=>{ke!=null&&ke!==!1&&(be[xe]=le&&Ne.isArray(ke)?ke.join(", "):ke)}),be}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([le,be])=>le+": "+be).join(`
5
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(le){return le instanceof this?le:new this(le)}static concat(le,...be){const ke=new this(le);return be.forEach(xe=>ke.set(xe)),ke}static accessor(le){const be=(this[ge]=this[ge]={accessors:{}}).accessors,ke=this.prototype;function xe($e){const Ce=Ae($e);be[Ce]||(function(We,Ze){const Je=Ne.toCamelCase(" "+Ze);["get","set","has"].forEach(Le=>{Object.defineProperty(We,Le+Je,{value:function(st,Ke,bt){return this[Le].call(this,Ze,st,Ke,bt)},configurable:!0})})}(ke,$e),be[Ce]=!0)}return Ne.isArray(le)?le.forEach(xe):xe(le),this}}_t.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ne.reduceDescriptors(_t.prototype,({value:ee},le)=>{let be=le[0].toUpperCase()+le.slice(1);return{get:()=>ee,set(ke){this[be]=ke}}}),Ne.freezeMethods(_t);var ut=_t;function Tt(ee,le){const be=this||K,ke=le||be,xe=ut.from(ke.headers);let $e=ke.data;return Ne.forEach(ee,function(Ce){$e=Ce.call(be,$e,xe.normalize(),le?le.status:void 0)}),xe.normalize(),$e}function wt(ee){return!(!ee||!ee.__CANCEL__)}function ln(ee,le,be){nt.call(this,ee??"canceled",nt.ERR_CANCELED,le,be),this.name="CanceledError"}Ne.inherits(ln,nt,{__CANCEL__:!0});var Qn=Zt.hasStandardBrowserEnv?{write(ee,le,be,ke,xe,$e){const Ce=[ee+"="+encodeURIComponent(le)];Ne.isNumber(be)&&Ce.push("expires="+new Date(be).toGMTString()),Ne.isString(ke)&&Ce.push("path="+ke),Ne.isString(xe)&&Ce.push("domain="+xe),$e===!0&&Ce.push("secure"),document.cookie=Ce.join("; ")},read(ee){const le=document.cookie.match(new RegExp("(^|;\\s*)("+ee+")=([^;]*)"));return le?decodeURIComponent(le[3]):null},remove(ee){this.write(ee,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Kn(ee,le){return ee&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(le)?function(be,ke){return ke?be.replace(/\/+$/,"")+"/"+ke.replace(/^\/+/,""):be}(ee,le):le}var ae=Zt.hasStandardBrowserEnv?function(){const ee=/(msie|trident)/i.test(navigator.userAgent),le=document.createElement("a");let be;function ke(xe){let $e=xe;return ee&&(le.setAttribute("href",$e),$e=le.href),le.setAttribute("href",$e),{href:le.href,protocol:le.protocol?le.protocol.replace(/:$/,""):"",host:le.host,search:le.search?le.search.replace(/^\?/,""):"",hash:le.hash?le.hash.replace(/^#/,""):"",hostname:le.hostname,port:le.port,pathname:le.pathname.charAt(0)==="/"?le.pathname:"/"+le.pathname}}return be=ke(window.location.href),function(xe){const $e=Ne.isString(xe)?ke(xe):xe;return $e.protocol===be.protocol&&$e.host===be.host}}():function(){return!0};function de(ee,le){let be=0;const ke=function(xe,$e){xe=xe||10;const Ce=new Array(xe),We=new Array(xe);let Ze,Je=0,Le=0;return $e=$e!==void 0?$e:1e3,function(st){const Ke=Date.now(),bt=We[Le];Ze||(Ze=Ke),Ce[Je]=st,We[Je]=Ke;let Ge=Le,kt=0;for(;Ge!==Je;)kt+=Ce[Ge++],Ge%=xe;if(Je=(Je+1)%xe,Je===Le&&(Le=(Le+1)%xe),Ke-Ze<$e)return;const Pt=bt&&Ke-bt;return Pt?Math.round(1e3*kt/Pt):void 0}}(50,250);return xe=>{const $e=xe.loaded,Ce=xe.lengthComputable?xe.total:void 0,We=$e-be,Ze=ke(We);be=$e;const Je={loaded:$e,total:Ce,progress:Ce?$e/Ce:void 0,bytes:We,rate:Ze||void 0,estimated:Ze&&Ce&&$e<=Ce?(Ce-$e)/Ze:void 0,event:xe};Je[le?"download":"upload"]=!0,ee(Je)}}const he={http:null,xhr:typeof XMLHttpRequest<"u"&&function(ee){return new Promise(function(le,be){let ke=ee.data;const xe=ut.from(ee.headers).normalize();let $e,Ce,{responseType:We,withXSRFToken:Ze}=ee;function Je(){ee.cancelToken&&ee.cancelToken.unsubscribe($e),ee.signal&&ee.signal.removeEventListener("abort",$e)}if(Ne.isFormData(ke)){if(Zt.hasStandardBrowserEnv||Zt.hasStandardBrowserWebWorkerEnv)xe.setContentType(!1);else if((Ce=xe.getContentType())!==!1){const[Ge,...kt]=Ce?Ce.split(";").map(Pt=>Pt.trim()).filter(Boolean):[];xe.setContentType([Ge||"multipart/form-data",...kt].join("; "))}}let Le=new XMLHttpRequest;if(ee.auth){const Ge=ee.auth.username||"",kt=ee.auth.password?unescape(encodeURIComponent(ee.auth.password)):"";xe.set("Authorization","Basic "+btoa(Ge+":"+kt))}const st=Kn(ee.baseURL,ee.url);function Ke(){if(!Le)return;const Ge=ut.from("getAllResponseHeaders"in Le&&Le.getAllResponseHeaders());(function(kt,Pt,nn){const Xn=nn.config.validateStatus;nn.status&&Xn&&!Xn(nn.status)?Pt(new nt("Request failed with status code "+nn.status,[nt.ERR_BAD_REQUEST,nt.ERR_BAD_RESPONSE][Math.floor(nn.status/100)-4],nn.config,nn.request,nn)):kt(nn)})(function(kt){le(kt),Je()},function(kt){be(kt),Je()},{data:We&&We!=="text"&&We!=="json"?Le.response:Le.responseText,status:Le.status,statusText:Le.statusText,headers:Ge,config:ee,request:Le}),Le=null}if(Le.open(ee.method.toUpperCase(),Wt(st,ee.params,ee.paramsSerializer),!0),Le.timeout=ee.timeout,"onloadend"in Le?Le.onloadend=Ke:Le.onreadystatechange=function(){Le&&Le.readyState===4&&(Le.status!==0||Le.responseURL&&Le.responseURL.indexOf("file:")===0)&&setTimeout(Ke)},Le.onabort=function(){Le&&(be(new nt("Request aborted",nt.ECONNABORTED,ee,Le)),Le=null)},Le.onerror=function(){be(new nt("Network Error",nt.ERR_NETWORK,ee,Le)),Le=null},Le.ontimeout=function(){let Ge=ee.timeout?"timeout of "+ee.timeout+"ms exceeded":"timeout exceeded";const kt=ee.transitional||Yt;ee.timeoutErrorMessage&&(Ge=ee.timeoutErrorMessage),be(new nt(Ge,kt.clarifyTimeoutError?nt.ETIMEDOUT:nt.ECONNABORTED,ee,Le)),Le=null},Zt.hasStandardBrowserEnv&&(Ze&&Ne.isFunction(Ze)&&(Ze=Ze(ee)),Ze||Ze!==!1&&ae(st))){const Ge=ee.xsrfHeaderName&&ee.xsrfCookieName&&Qn.read(ee.xsrfCookieName);Ge&&xe.set(ee.xsrfHeaderName,Ge)}ke===void 0&&xe.setContentType(null),"setRequestHeader"in Le&&Ne.forEach(xe.toJSON(),function(Ge,kt){Le.setRequestHeader(kt,Ge)}),Ne.isUndefined(ee.withCredentials)||(Le.withCredentials=!!ee.withCredentials),We&&We!=="json"&&(Le.responseType=ee.responseType),typeof ee.onDownloadProgress=="function"&&Le.addEventListener("progress",de(ee.onDownloadProgress,!0)),typeof ee.onUploadProgress=="function"&&Le.upload&&Le.upload.addEventListener("progress",de(ee.onUploadProgress)),(ee.cancelToken||ee.signal)&&($e=Ge=>{Le&&(be(!Ge||Ge.type?new ln(null,ee,Le):Ge),Le.abort(),Le=null)},ee.cancelToken&&ee.cancelToken.subscribe($e),ee.signal&&(ee.signal.aborted?$e():ee.signal.addEventListener("abort",$e)));const bt=function(Ge){const kt=/^([-+\w]{1,25})(:?\/\/|:)/.exec(Ge);return kt&&kt[1]||""}(st);bt&&Zt.protocols.indexOf(bt)===-1?be(new nt("Unsupported protocol "+bt+":",nt.ERR_BAD_REQUEST,ee)):Le.send(ke||null)})}};Ne.forEach(he,(ee,le)=>{if(ee){try{Object.defineProperty(ee,"name",{value:le})}catch{}Object.defineProperty(ee,"adapterName",{value:le})}});const Ee=ee=>`- ${ee}`,Oe=ee=>Ne.isFunction(ee)||ee===null||ee===!1;var Ie=ee=>{ee=Ne.isArray(ee)?ee:[ee];const{length:le}=ee;let be,ke;const xe={};for(let $e=0;$e<le;$e++){let Ce;if(be=ee[$e],ke=be,!Oe(be)&&(ke=he[(Ce=String(be)).toLowerCase()],ke===void 0))throw new nt(`Unknown adapter '${Ce}'`);if(ke)break;xe[Ce||"#"+$e]=ke}if(!ke){const $e=Object.entries(xe).map(([Ce,We])=>`adapter ${Ce} `+(We===!1?"is not supported by the environment":"is not available in the build"));throw new nt("There is no suitable adapter to dispatch the request "+(le?$e.length>1?`since :
6
- `+$e.map(Ee).join(`
7
- `):" "+Ee($e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return ke};function Be(ee){if(ee.cancelToken&&ee.cancelToken.throwIfRequested(),ee.signal&&ee.signal.aborted)throw new ln(null,ee)}function Ue(ee){return Be(ee),ee.headers=ut.from(ee.headers),ee.data=Tt.call(ee,ee.transformRequest),["post","put","patch"].indexOf(ee.method)!==-1&&ee.headers.setContentType("application/x-www-form-urlencoded",!1),Ie(ee.adapter||K.adapter)(ee).then(function(le){return Be(ee),le.data=Tt.call(ee,ee.transformResponse,le),le.headers=ut.from(le.headers),le},function(le){return wt(le)||(Be(ee),le&&le.response&&(le.response.data=Tt.call(ee,ee.transformResponse,le.response),le.response.headers=ut.from(le.response.headers))),Promise.reject(le)})}const He=ee=>ee instanceof ut?ee.toJSON():ee;function Pe(ee,le){le=le||{};const be={};function ke(Je,Le,st){return Ne.isPlainObject(Je)&&Ne.isPlainObject(Le)?Ne.merge.call({caseless:st},Je,Le):Ne.isPlainObject(Le)?Ne.merge({},Le):Ne.isArray(Le)?Le.slice():Le}function xe(Je,Le,st){return Ne.isUndefined(Le)?Ne.isUndefined(Je)?void 0:ke(void 0,Je,st):ke(Je,Le,st)}function $e(Je,Le){if(!Ne.isUndefined(Le))return ke(void 0,Le)}function Ce(Je,Le){return Ne.isUndefined(Le)?Ne.isUndefined(Je)?void 0:ke(void 0,Je):ke(void 0,Le)}function We(Je,Le,st){return st in le?ke(Je,Le):st in ee?ke(void 0,Je):void 0}const Ze={url:$e,method:$e,data:$e,baseURL:Ce,transformRequest:Ce,transformResponse:Ce,paramsSerializer:Ce,timeout:Ce,timeoutMessage:Ce,withCredentials:Ce,withXSRFToken:Ce,adapter:Ce,responseType:Ce,xsrfCookieName:Ce,xsrfHeaderName:Ce,onUploadProgress:Ce,onDownloadProgress:Ce,decompress:Ce,maxContentLength:Ce,maxBodyLength:Ce,beforeRedirect:Ce,transport:Ce,httpAgent:Ce,httpsAgent:Ce,cancelToken:Ce,socketPath:Ce,responseEncoding:Ce,validateStatus:We,headers:(Je,Le)=>xe(He(Je),He(Le),!0)};return Ne.forEach(Object.keys(Object.assign({},ee,le)),function(Je){const Le=Ze[Je]||xe,st=Le(ee[Je],le[Je],Je);Ne.isUndefined(st)&&Le!==We||(be[Je]=st)}),be}const ze={};["object","boolean","number","function","string","symbol"].forEach((ee,le)=>{ze[ee]=function(be){return typeof be===ee||"a"+(le<1?"n ":" ")+ee}});const Ve={};ze.transitional=function(ee,le,be){function ke(xe,$e){return"[Axios v1.6.2] Transitional option '"+xe+"'"+$e+(be?". "+be:"")}return(xe,$e,Ce)=>{if(ee===!1)throw new nt(ke($e," has been removed"+(le?" in "+le:"")),nt.ERR_DEPRECATED);return le&&!Ve[$e]&&(Ve[$e]=!0,console.warn(ke($e," has been deprecated since v"+le+" and will be removed in the near future"))),!ee||ee(xe,$e,Ce)}};var Ye={assertOptions:function(ee,le,be){if(typeof ee!="object")throw new nt("options must be an object",nt.ERR_BAD_OPTION_VALUE);const ke=Object.keys(ee);let xe=ke.length;for(;xe-- >0;){const $e=ke[xe],Ce=le[$e];if(Ce){const We=ee[$e],Ze=We===void 0||Ce(We,$e,ee);if(Ze!==!0)throw new nt("option "+$e+" must be "+Ze,nt.ERR_BAD_OPTION_VALUE)}else if(be!==!0)throw new nt("Unknown option "+$e,nt.ERR_BAD_OPTION)}},validators:ze};const at=Ye.validators;class ft{constructor(le){this.defaults=le,this.interceptors={request:new cn,response:new cn}}request(le,be){typeof le=="string"?(be=be||{}).url=le:be=le||{},be=Pe(this.defaults,be);const{transitional:ke,paramsSerializer:xe,headers:$e}=be;ke!==void 0&&Ye.assertOptions(ke,{silentJSONParsing:at.transitional(at.boolean),forcedJSONParsing:at.transitional(at.boolean),clarifyTimeoutError:at.transitional(at.boolean)},!1),xe!=null&&(Ne.isFunction(xe)?be.paramsSerializer={serialize:xe}:Ye.assertOptions(xe,{encode:at.function,serialize:at.function},!0)),be.method=(be.method||this.defaults.method||"get").toLowerCase();let Ce=$e&&Ne.merge($e.common,$e[be.method]);$e&&Ne.forEach(["delete","get","head","post","put","patch","common"],Ge=>{delete $e[Ge]}),be.headers=ut.concat(Ce,$e);const We=[];let Ze=!0;this.interceptors.request.forEach(function(Ge){typeof Ge.runWhen=="function"&&Ge.runWhen(be)===!1||(Ze=Ze&&Ge.synchronous,We.unshift(Ge.fulfilled,Ge.rejected))});const Je=[];let Le;this.interceptors.response.forEach(function(Ge){Je.push(Ge.fulfilled,Ge.rejected)});let st,Ke=0;if(!Ze){const Ge=[Ue.bind(this),void 0];for(Ge.unshift.apply(Ge,We),Ge.push.apply(Ge,Je),st=Ge.length,Le=Promise.resolve(be);Ke<st;)Le=Le.then(Ge[Ke++],Ge[Ke++]);return Le}st=We.length;let bt=be;for(Ke=0;Ke<st;){const Ge=We[Ke++],kt=We[Ke++];try{bt=Ge(bt)}catch(Pt){kt.call(this,Pt);break}}try{Le=Ue.call(this,bt)}catch(Ge){return Promise.reject(Ge)}for(Ke=0,st=Je.length;Ke<st;)Le=Le.then(Je[Ke++],Je[Ke++]);return Le}getUri(le){return Wt(Kn((le=Pe(this.defaults,le)).baseURL,le.url),le.params,le.paramsSerializer)}}Ne.forEach(["delete","get","head","options"],function(ee){ft.prototype[ee]=function(le,be){return this.request(Pe(be||{},{method:ee,url:le,data:(be||{}).data}))}}),Ne.forEach(["post","put","patch"],function(ee){function le(be){return function(ke,xe,$e){return this.request(Pe($e||{},{method:ee,headers:be?{"Content-Type":"multipart/form-data"}:{},url:ke,data:xe}))}}ft.prototype[ee]=le(),ft.prototype[ee+"Form"]=le(!0)});var Dt=ft;class tn{constructor(le){if(typeof le!="function")throw new TypeError("executor must be a function.");let be;this.promise=new Promise(function(xe){be=xe});const ke=this;this.promise.then(xe=>{if(!ke._listeners)return;let $e=ke._listeners.length;for(;$e-- >0;)ke._listeners[$e](xe);ke._listeners=null}),this.promise.then=xe=>{let $e;const Ce=new Promise(We=>{ke.subscribe(We),$e=We}).then(xe);return Ce.cancel=function(){ke.unsubscribe($e)},Ce},le(function(xe,$e,Ce){ke.reason||(ke.reason=new ln(xe,$e,Ce),be(ke.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(le){this.reason?le(this.reason):this._listeners?this._listeners.push(le):this._listeners=[le]}unsubscribe(le){if(!this._listeners)return;const be=this._listeners.indexOf(le);be!==-1&&this._listeners.splice(be,1)}static source(){let le;return{token:new tn(function(be){le=be}),cancel:le}}}var vn=tn;const Cn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Cn).forEach(([ee,le])=>{Cn[le]=ee});var Yn=Cn;const Ct=function ee(le){const be=new Dt(le),ke=k(Dt.prototype.request,be);return Ne.extend(ke,Dt.prototype,be,{allOwnKeys:!0}),Ne.extend(ke,be,null,{allOwnKeys:!0}),ke.create=function(xe){return ee(Pe(le,xe))},ke}(K);Ct.Axios=Dt,Ct.CanceledError=ln,Ct.CancelToken=vn,Ct.isCancel=wt,Ct.VERSION="1.6.2",Ct.toFormData=vt,Ct.AxiosError=nt,Ct.Cancel=Ct.CanceledError,Ct.all=function(ee){return Promise.all(ee)},Ct.spread=function(ee){return function(le){return ee.apply(null,le)}},Ct.isAxiosError=function(ee){return Ne.isObject(ee)&&ee.isAxiosError===!0},Ct.mergeConfig=Pe,Ct.AxiosHeaders=ut,Ct.formToJSON=ee=>re(Ne.isHTMLForm(ee)?new FormData(ee):ee),Ct.getAdapter=Ie,Ct.HttpStatusCode=Yn,Ct.default=Ct,O.exports=Ct},147:O=>{O.exports=JSON.parse('{"name":"@pikaz/location","version":"1.0.9","description":"used to obtain location from the browser","private":false,"main":"lib/pikazLocation.js","module":"lib/pikazLocationModule.js","scripts":{"compress":"node utils/compress.js","analysisip":"node utils/analysisIp.js","build":"webpack && webpack --config module.config.js"},"keywords":["geolocation","location","longitude","latitude","province","city","district"],"files":["lib"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/pikaz-18/pikaz-location.git"},"author":"pikaz","license":"MIT","bugs":{"url":"https://github.com/pikaz-18/pikaz-location/issues"},"homepage":"https://github.com/pikaz-18/pikaz-location#readme","devDependencies":{"clean-webpack-plugin":"^4.0.0","copy-webpack-plugin":"^10.2.0","object-hash":"^3.0.0","webpack":"^5.65.0","webpack-cli":"^4.9.1"},"dependencies":{"axios":"^1.6.2","localforage":"^1.10.0","lz-string":"^1.4.4","point-in-polygon":"^1.1.0"},"fileDate":{"areaList":"202212301139","city":"202212301139","district":"202212301139","ip":"2024532110","province":"202317042"},"fileCode":{"areaList":"64b5a33f94b14ae208fca152fdc89dca1048360a","city":"7827eb2bc906b83df109ab24242ce68f98f9558b","district":"14d77ce6236e2025a4b1e3900cc70d0c32a62d0b","ip":"befa0a8a45fdc238a0fb4e4a3011dae43a06c1b4","province":"629a3c20a32e0de95e0633e0385234e2b7886c2d"}}')}},D={};function j(O){var I=D[O];if(I!==void 0)return I.exports;var o=D[O]={exports:{}};return z[O](o,o.exports,j),o.exports}return j.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),j(138)})()}},t$1={};function n$1($){var z=t$1[$];if(z!==void 0)return z.exports;var D=t$1[$]={exports:{}};return e$2[$].call(D.exports,D,D.exports,n$1),D.exports}n$1.n=$=>{var z=$&&$.__esModule?()=>$.default:()=>$;return n$1.d(z,{a:z}),z},n$1.d=($,z)=>{for(var D in z)n$1.o(z,D)&&!n$1.o($,D)&&Object.defineProperty($,D,{enumerable:!0,get:z[D]})},n$1.o=($,z)=>Object.prototype.hasOwnProperty.call($,z);var r={};(()=>{n$1.d(r,{v6:()=>$.setConfig,k$:()=>$.getLocation,SG:()=>$.getH5Location,Qf:()=>$.getIpLocation,Mc:()=>$.searchList,kr:()=>$.searchCodeAddress,Gp:()=>$.searchAddress,I5:()=>$.searchCodeDetail,ZP:()=>z});var $=n$1(782);const z={setConfig:$.setConfig,getLocation:$.getLocation,getH5Location:$.getH5Location,getIpLocation:$.getIpLocation,searchList:$.searchList,searchCodeAddress:$.searchCodeAddress,searchAddress:$.searchAddress,searchCodeDetail:$.searchCodeDetail}})(),r.ZP,r.SG,r.Qf,r.k$,r.Gp,r.kr,r.I5,r.Mc,r.v6;const createMutedAudioStream=$=>{const z=$.createOscillator();z.type="sine",z.frequency.setValueAtTime(0,$.currentTime);const D=$.createGain();D.gain.value=0,z.connect(D),D.connect($.destination),z.start();const j=$.createMediaStreamDestination();return D.disconnect(),z.connect(j),j.stream},createFakeVideoStream=($=10,z=10,D=30)=>{const j=document.createElement("canvas"),O=j.getContext("2d");j.width=$,j.height=z;let I=0;return setInterval(()=>{O.clearRect(0,0,j.width,j.height);const N=O.createLinearGradient(0,0,j.width,j.height);N.addColorStop(0,`hsla(${I}, 100%, 50%, 0)`),N.addColorStop(1,`hsla(${I+120}, 100%, 50%, 0)`),O.fillStyle=N,O.fillRect(0,0,j.width,j.height),I=(I+1)%360},100),j.captureStream(D)};class NetworkQualityTester{constructor(z=[]){Se(this,"targetUrls",[]);Se(this,"results",[]);z.length===0&&z.push("https://api.pryun.vip/favicon-32x32.png"),this.targetUrls=z,this.results=[]}async testAll(){const z=this.targetUrls.map(D=>this.testUrl(D));return await Promise.all(z),this.analyzeResults()}async testUrl(z){const D=performance.now();let j=0,O=!1;try{await fetch(z,{method:"HEAD",cache:"no-store"});const I=performance.now()-D,o=performance.now(),N=await(await fetch(z,{cache:"no-store"})).blob(),F=performance.now()-o;j=N.size,O=!0,this.results.push({url:z,success:O,headTime:I,getTime:F,size:j,downloadSpeed:j>0?(j/1024/(F/1e3)).toFixed(2):0,totalTime:performance.now()-D})}catch(I){this.results.push({url:z,success:!1,error:I.message,totalTime:performance.now()-D})}}analyzeResults(){const z=this.results.filter(I=>I.success);if(z.length===0)return{overallSuccess:!1,message:"所有测试均失败"};const D=z.reduce((I,o)=>I+o.size,0),j=z.reduce((I,o)=>I+o.totalTime,0),O=z.reduce((I,o)=>I+parseFloat(o.downloadSpeed),0)/z.length;return{overallSuccess:!0,totalTests:this.results.length,successfulTests:z.length,averageDownloadSpeed:`${O.toFixed(2)} KB/s`,averageResponseTime:`${(j/z.length).toFixed(2)}ms`,totalDataTransferred:`${(D/1024).toFixed(2)} KB`,detailedResults:this.results}}}var lib={},ebml={},EBML={},hasRequiredEBML;function requireEBML(){return hasRequiredEBML||(hasRequiredEBML=1,Object.defineProperty(EBML,"__esModule",{value:!0})),EBML}var EBMLDecoder={},int64Buffer={},hasRequiredInt64Buffer;function requireInt64Buffer(){return hasRequiredInt64Buffer||(hasRequiredInt64Buffer=1,function($){(function(z){var D="undefined",j=D!==typeof Buffer&&Buffer,O=D!==typeof Uint8Array&&Uint8Array,I=D!==typeof ArrayBuffer&&ArrayBuffer,o=[0,0,0,0,0,0,0,0],k=Array.isArray||fe,N=4294967296,F=16777216,J;X("Uint64BE",!0,!0),X("Int64BE",!0,!1),X("Uint64LE",!1,!0),X("Int64LE",!1,!1);function X(pe,ve,Te){var me=ve?0:4,_e=ve?4:0,De=ve?0:3,je=ve?1:2,Fe=ve?2:1,qe=ve?3:0,gt=ve?ce:se,St=ve?we:ye,It=yt.prototype,Lt="is"+pe,Nt="_"+Lt;return It.buffer=void 0,It.offset=0,It[Nt]=!0,It.toNumber=Ne,It.toString=nt,It.toJSON=Ne,It.toArray=Y,j&&(It.toBuffer=Q),O&&(It.toArrayBuffer=te),yt[Lt]=tt,z[pe]=yt,yt;function yt(et,Qe,rt,it){return this instanceof yt?zt(this,et,Qe,rt,it):new yt(et,Qe,rt,it)}function tt(et){return!!(et&&et[Nt])}function zt(et,Qe,rt,it,vt){if(O&&I&&(Qe instanceof I&&(Qe=new O(Qe)),it instanceof I&&(it=new O(it))),!Qe&&!rt&&!it&&!J){et.buffer=oe(o,0);return}if(!ie(Qe,rt)){var Rt=J||Array;vt=rt,it=Qe,rt=0,Qe=J===j?j.alloc(8):new Rt(8)}et.buffer=Qe,et.offset=rt|=0,D!==typeof it&&(typeof it=="string"?Ot(Qe,rt,it,vt||10):ie(it,vt)?ne(Qe,rt,it,vt):typeof vt=="number"?(Ht(Qe,rt+me,it),Ht(Qe,rt+_e,vt)):it>0?gt(Qe,rt,it):it<0?St(Qe,rt,it):ne(Qe,rt,o,0))}function Ot(et,Qe,rt,it){var vt=0,Rt=rt.length,Mt=0,qt=0;rt[0]==="-"&&vt++;for(var Jt=vt;vt<Rt;){var Wt=parseInt(rt[vt++],it);if(!(Wt>=0))break;qt=qt*it+Wt,Mt=Mt*it+Math.floor(qt/N),qt%=N}Jt&&(Mt=~Mt,qt?qt=N-qt:Mt++),Ht(et,Qe+me,Mt),Ht(et,Qe+_e,qt)}function Ne(){var et=this.buffer,Qe=this.offset,rt=At(et,Qe+me),it=At(et,Qe+_e);return Te||(rt|=0),rt?rt*N+it:it}function nt(et){var Qe=this.buffer,rt=this.offset,it=At(Qe,rt+me),vt=At(Qe,rt+_e),Rt="",Mt=!Te&&it&2147483648;for(Mt&&(it=~it,vt=N-vt),et=et||10;;){var qt=it%et*N+vt;if(it=Math.floor(it/et),vt=Math.floor(qt/et),Rt=(qt%et).toString(et)+Rt,!it&&!vt)break}return Mt&&(Rt="-"+Rt),Rt}function Ht(et,Qe,rt){et[Qe+qe]=rt&255,rt=rt>>8,et[Qe+Fe]=rt&255,rt=rt>>8,et[Qe+je]=rt&255,rt=rt>>8,et[Qe+De]=rt&255}function At(et,Qe){return et[Qe+De]*F+(et[Qe+je]<<16)+(et[Qe+Fe]<<8)+et[Qe+qe]}}function Y(pe){var ve=this.buffer,Te=this.offset;return J=null,pe!==!1&&k(ve)?ve.length===8?ve:ve.slice(Te,Te+8):oe(ve,Te)}function Q(pe){var ve=this.buffer,Te=this.offset;return J=j,pe!==!1&&j.isBuffer(ve)?ve.length===8?ve:ve.slice(Te,Te+8):j.from(te.call(this,pe))}function te(pe){var ve=this.buffer,Te=this.offset,me=ve.buffer;if(J=O,pe!==!1&&!ve.offset&&me instanceof I)return me.byteLength===8?me:me.slice(Te,Te+8);var _e=new O(8);return ne(_e,0,ve,Te),_e.buffer}function ie(pe,ve){var Te=pe&&pe.length;return ve|=0,Te&&ve+8<=Te&&typeof pe[ve]!="string"}function ne(pe,ve,Te,me){ve|=0,me|=0;for(var _e=0;_e<8;_e++)pe[ve++]=Te[me++]&255}function oe(pe,ve){return Array.prototype.slice.call(pe,ve,ve+8)}function ce(pe,ve,Te){for(var me=ve+8;me>ve;)pe[--me]=Te&255,Te/=256}function we(pe,ve,Te){var me=ve+8;for(Te++;me>ve;)pe[--me]=-Te&255^255,Te/=256}function se(pe,ve,Te){for(var me=ve+8;ve<me;)pe[ve++]=Te&255,Te/=256}function ye(pe,ve,Te){var me=ve+8;for(Te++;ve<me;)pe[ve++]=-Te&255^255,Te/=256}function fe(pe){return!!pe&&Object.prototype.toString.call(pe)=="[object Array]"}})(typeof $.nodeName!="string"?$:int64Buffer||{})}(int64Buffer)),int64Buffer}var tools={},EBMLEncoder={},ebmlID={},hasRequiredEbmlID;function requireEbmlID(){return hasRequiredEbmlID||(hasRequiredEbmlID=1,Object.defineProperty(ebmlID,"__esModule",{value:!0}),ebmlID.byEbmlID=void 0,ebmlID.byEbmlID={128:{name:"ChapterDisplay",level:4,type:"m",multiple:!0,minver:1,webm:!0,description:"Contains all possible strings to use for the chapter display."},131:{name:"TrackType",level:3,type:"u",mandatory:!0,minver:1,range:"1-254",description:"A set of track types coded on 8 bits (1: video, 2: audio, 3: complex, 0x10: logo, 0x11: subtitle, 0x12: buttons, 0x20: control)."},133:{name:"ChapString",cppname:"ChapterString",level:5,type:"8",mandatory:!0,minver:1,webm:!0,description:"Contains the string to use as the chapter atom."},134:{name:"CodecID",level:3,type:"s",mandatory:!0,minver:1,description:"An ID corresponding to the codec, see the codec page for more info."},136:{name:"FlagDefault",cppname:"TrackFlagDefault",level:3,type:"u",mandatory:!0,minver:1,default:1,range:"0-1",description:"Set if that track (audio, video or subs) SHOULD be active if no language found matches the user preference. (1 bit)"},137:{name:"ChapterTrackNumber",level:5,type:"u",mandatory:!0,multiple:!0,minver:1,webm:!1,range:"not 0",description:"UID of the Track to apply this chapter too. In the absense of a control track, choosing this chapter will select the listed Tracks and deselect unlisted tracks. Absense of this element indicates that the Chapter should be applied to any currently used Tracks."},145:{name:"ChapterTimeStart",level:4,type:"u",mandatory:!0,minver:1,webm:!0,description:"Timestamp of the start of Chapter (not scaled)."},146:{name:"ChapterTimeEnd",level:4,type:"u",minver:1,webm:!1,description:"Timestamp of the end of Chapter (timestamp excluded, not scaled)."},150:{name:"CueRefTime",level:5,type:"u",mandatory:!0,minver:2,webm:!1,description:"Timestamp of the referenced Block."},151:{name:"CueRefCluster",level:5,type:"u",mandatory:!0,webm:!1,description:"The Position of the Cluster containing the referenced Block."},152:{name:"ChapterFlagHidden",level:4,type:"u",mandatory:!0,minver:1,webm:!1,default:0,range:"0-1",description:"If a chapter is hidden (1), it should not be available to the user interface (but still to Control Tracks; see flag notes). (1 bit)"},16980:{name:"ContentCompAlgo",level:6,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"The compression algorithm used. Algorithms that have been specified so far are: 0 - zlib, 3 - Header Stripping"},16981:{name:"ContentCompSettings",level:6,type:"b",minver:1,webm:!1,description:"Settings that might be needed by the decompressor. For Header Stripping (ContentCompAlgo=3), the bytes that were removed from the beggining of each frames of the track."},17026:{name:"DocType",level:1,type:"s",mandatory:!0,default:"matroska",minver:1,description:"A string that describes the type of document that follows this EBML header. 'matroska' in our case or 'webm' for webm files."},17029:{name:"DocTypeReadVersion",level:1,type:"u",mandatory:!0,default:1,minver:1,description:"The minimum DocType version an interpreter has to support to read this file."},17030:{name:"EBMLVersion",level:1,type:"u",mandatory:!0,default:1,minver:1,description:"The version of EBML parser used to create the file."},17031:{name:"DocTypeVersion",level:1,type:"u",mandatory:!0,default:1,minver:1,description:"The version of DocType interpreter used to create the file."},17476:{name:"SegmentFamily",level:2,type:"b",multiple:!0,minver:1,webm:!1,bytesize:16,description:"A randomly generated unique ID that all segments related to each other must use (128 bits)."},17505:{name:"DateUTC",level:2,type:"d",minver:1,description:"Date of the origin of timestamp (value 0), i.e. production date."},17540:{name:"TagDefault",level:4,type:"u",mandatory:!0,minver:1,webm:!1,default:1,range:"0-1",description:"Indication to know if this is the default/original language to use for the given tag. (1 bit)"},17541:{name:"TagBinary",level:4,type:"b",minver:1,webm:!1,description:"The values of the Tag if it is binary. Note that this cannot be used in the same SimpleTag as TagString."},17543:{name:"TagString",level:4,type:"8",minver:1,webm:!1,description:"The value of the Element."},17545:{name:"Duration",level:2,type:"f",minver:1,range:"> 0",description:"Duration of the segment (based on TimecodeScale)."},17816:{name:"ChapterFlagEnabled",level:4,type:"u",mandatory:!0,minver:1,webm:!1,default:1,range:"0-1",description:"Specify wether the chapter is enabled. It can be enabled/disabled by a Control Track. When disabled, the movie should skip all the content between the TimeStart and TimeEnd of this chapter (see flag notes). (1 bit)"},18016:{name:"FileMimeType",level:3,type:"s",mandatory:!0,minver:1,webm:!1,description:"MIME type of the file."},18017:{name:"FileUsedStartTime",level:3,type:"u",divx:!0,description:"DivX font extension"},18018:{name:"FileUsedEndTime",level:3,type:"u",divx:!0,description:"DivX font extension"},18037:{name:"FileReferral",level:3,type:"b",webm:!1,description:"A binary value that a track/codec can refer to when the attachment is needed."},20529:{name:"ContentEncodingOrder",level:5,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"Tells when this modification was used during encoding/muxing starting with 0 and counting upwards. The decoder/demuxer has to start with the highest order number it finds and work its way down. This value has to be unique over all ContentEncodingOrder elements in the segment."},20530:{name:"ContentEncodingScope",level:5,type:"u",mandatory:!0,minver:1,webm:!1,default:1,range:"not 0",description:"A bit field that describes which elements have been modified in this way. Values (big endian) can be OR'ed. Possible values: 1 - all frame contents, 2 - the track's private data, 4 - the next ContentEncoding (next ContentEncodingOrder. Either the data inside ContentCompression and/or ContentEncryption)"},20531:{name:"ContentEncodingType",level:5,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"A value describing what kind of transformation has been done. Possible values: 0 - compression, 1 - encryption"},20532:{name:"ContentCompression",level:5,type:"m",minver:1,webm:!1,description:"Settings describing the compression used. Must be present if the value of ContentEncodingType is 0 and absent otherwise. Each block must be decompressable even if no previous block is available in order not to prevent seeking."},20533:{name:"ContentEncryption",level:5,type:"m",minver:1,webm:!1,description:"Settings describing the encryption used. Must be present if the value of ContentEncodingType is 1 and absent otherwise."},21368:{name:"CueBlockNumber",level:4,type:"u",minver:1,default:1,range:"not 0",description:"Number of the Block in the specified Cluster."},22100:{name:"ChapterStringUID",level:4,type:"8",mandatory:!1,minver:3,webm:!0,description:"A unique string ID to identify the Chapter. Use for WebVTT cue identifier storage."},22337:{name:"WritingApp",level:2,type:"8",mandatory:!0,minver:1,description:'Writing application ("mkvmerge-0.3.3").'},22612:{name:"SilentTracks",cppname:"ClusterSilentTracks",level:2,type:"m",minver:1,webm:!1,description:"The list of tracks that are not used in that part of the stream. It is useful when using overlay tracks on seeking. Then you should decide what track to use."},25152:{name:"ContentEncoding",level:4,type:"m",mandatory:!0,multiple:!0,minver:1,webm:!1,description:"Settings for one content encoding like compression or encryption."},25188:{name:"BitDepth",cppname:"AudioBitDepth",level:4,type:"u",minver:1,range:"not 0",description:"Bits per sample, mostly used for PCM."},25906:{name:"SignedElement",level:3,type:"b",multiple:!0,webm:!1,description:"An element ID whose data will be used to compute the signature."},26148:{name:"TrackTranslate",level:3,type:"m",multiple:!0,minver:1,webm:!1,description:"The track identification for the given Chapter Codec."},26897:{name:"ChapProcessCommand",cppname:"ChapterProcessCommand",level:5,type:"m",multiple:!0,minver:1,webm:!1,description:"Contains all the commands associated to the Atom."},26914:{name:"ChapProcessTime",cppname:"ChapterProcessTime",level:6,type:"u",mandatory:!0,minver:1,webm:!1,description:"Defines when the process command should be handled (0: during the whole chapter, 1: before starting playback, 2: after playback of the chapter)."},26916:{name:"ChapterTranslate",level:2,type:"m",multiple:!0,minver:1,webm:!1,description:"A tuple of corresponding ID used by chapter codecs to represent this segment."},26931:{name:"ChapProcessData",cppname:"ChapterProcessData",level:6,type:"b",mandatory:!0,minver:1,webm:!1,description:"Contains the command information. The data should be interpreted depending on the ChapProcessCodecID value. For ChapProcessCodecID = 1, the data correspond to the binary DVD cell pre/post commands."},26948:{name:"ChapProcess",cppname:"ChapterProcess",level:4,type:"m",multiple:!0,minver:1,webm:!1,description:"Contains all the commands associated to the Atom."},26965:{name:"ChapProcessCodecID",cppname:"ChapterProcessCodecID",level:5,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"Contains the type of the codec used for the processing. A value of 0 means native Matroska processing (to be defined), a value of 1 means the DVD command set is used. More codec IDs can be added later."},29555:{name:"Tag",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,webm:!1,description:"Element containing elements specific to Tracks/Chapters."},29572:{name:"SegmentFilename",level:2,type:"8",minver:1,webm:!1,description:"A filename corresponding to this segment."},29766:{name:"AttachmentLink",cppname:"TrackAttachmentLink",level:3,type:"u",minver:1,webm:!1,range:"not 0",description:"The UID of an attachment that is used by this codec."},2459272:{name:"CodecName",level:3,type:"8",minver:1,description:"A human-readable string specifying the codec."},408125543:{name:"Segment",level:"0",type:"m",mandatory:!0,multiple:!0,minver:1,description:"This element contains all other top-level (level 1) elements. Typically a Matroska file is composed of 1 segment."},17530:{name:"TagLanguage",level:4,type:"s",mandatory:!0,minver:1,webm:!1,default:"und",description:"Specifies the language of the tag specified, in the Matroska languages form."},17827:{name:"TagName",level:4,type:"8",mandatory:!0,minver:1,webm:!1,description:"The name of the Tag that is going to be stored."},26568:{name:"SimpleTag",cppname:"TagSimple",level:3,recursive:"1",type:"m",mandatory:!0,multiple:!0,minver:1,webm:!1,description:"Contains general information about the target."},25542:{name:"TagAttachmentUID",level:4,type:"u",multiple:!0,minver:1,webm:!1,default:0,description:"A unique ID to identify the Attachment(s) the tags belong to. If the value is 0 at this level, the tags apply to all the attachments in the Segment."},25540:{name:"TagChapterUID",level:4,type:"u",multiple:!0,minver:1,webm:!1,default:0,description:"A unique ID to identify the Chapter(s) the tags belong to. If the value is 0 at this level, the tags apply to all chapters in the Segment."},25545:{name:"TagEditionUID",level:4,type:"u",multiple:!0,minver:1,webm:!1,default:0,description:"A unique ID to identify the EditionEntry(s) the tags belong to. If the value is 0 at this level, the tags apply to all editions in the Segment."},25541:{name:"TagTrackUID",level:4,type:"u",multiple:!0,minver:1,webm:!1,default:0,description:"A unique ID to identify the Track(s) the tags belong to. If the value is 0 at this level, the tags apply to all tracks in the Segment."},25546:{name:"TargetType",cppname:"TagTargetType",level:4,type:"s",minver:1,webm:!1,strong:"informational",description:'An string that can be used to display the logical level of the target like "ALBUM", "TRACK", "MOVIE", "CHAPTER", etc (see TargetType).'},26826:{name:"TargetTypeValue",cppname:"TagTargetTypeValue",level:4,type:"u",minver:1,webm:!1,default:50,description:"A number to indicate the logical level of the target (see TargetType)."},25536:{name:"Targets",cppname:"TagTargets",level:3,type:"m",mandatory:!0,minver:1,webm:!1,description:"Contain all UIDs where the specified meta data apply. It is empty to describe everything in the segment."},307544935:{name:"Tags",level:1,type:"m",multiple:!0,minver:1,webm:!1,description:"Element containing elements specific to Tracks/Chapters. A list of valid tags can be found here."},17677:{name:"ChapProcessPrivate",cppname:"ChapterProcessPrivate",level:5,type:"b",minver:1,webm:!1,description:'Some optional data attached to the ChapProcessCodecID information. For ChapProcessCodecID = 1, it is the "DVD level" equivalent.'},17278:{name:"ChapCountry",cppname:"ChapterCountry",level:5,type:"s",multiple:!0,minver:1,webm:!1,description:"The countries corresponding to the string, same 2 octets as in Internet domains."},17276:{name:"ChapLanguage",cppname:"ChapterLanguage",level:5,type:"s",mandatory:!0,multiple:!0,minver:1,webm:!0,default:"eng",description:"The languages corresponding to the string, in the bibliographic ISO-639-2 form."},143:{name:"ChapterTrack",level:4,type:"m",minver:1,webm:!1,description:"List of tracks on which the chapter applies. If this element is not present, all tracks apply"},25539:{name:"ChapterPhysicalEquiv",level:4,type:"u",minver:1,webm:!1,description:'Specify the physical equivalent of this ChapterAtom like "DVD" (60) or "SIDE" (50), see complete list of values.'},28348:{name:"ChapterSegmentEditionUID",level:4,type:"u",minver:1,webm:!1,range:"not 0",description:"The EditionUID to play from the segment linked in ChapterSegmentUID."},28263:{name:"ChapterSegmentUID",level:4,type:"b",minver:1,webm:!1,range:">0",bytesize:16,description:"A segment to play in place of this chapter. Edition ChapterSegmentEditionUID should be used for this segment, otherwise no edition is used."},29636:{name:"ChapterUID",level:4,type:"u",mandatory:!0,minver:1,webm:!0,range:"not 0",description:"A unique ID to identify the Chapter."},182:{name:"ChapterAtom",level:3,recursive:"1",type:"m",mandatory:!0,multiple:!0,minver:1,webm:!0,description:"Contains the atom information to use as the chapter atom (apply to all tracks)."},17885:{name:"EditionFlagOrdered",level:3,type:"u",minver:1,webm:!1,default:0,range:"0-1",description:"Specify if the chapters can be defined multiple times and the order to play them is enforced. (1 bit)"},17883:{name:"EditionFlagDefault",level:3,type:"u",mandatory:!0,minver:1,webm:!1,default:0,range:"0-1",description:"If a flag is set (1) the edition should be used as the default one. (1 bit)"},17853:{name:"EditionFlagHidden",level:3,type:"u",mandatory:!0,minver:1,webm:!1,default:0,range:"0-1",description:"If an edition is hidden (1), it should not be available to the user interface (but still to Control Tracks; see flag notes). (1 bit)"},17852:{name:"EditionUID",level:3,type:"u",minver:1,webm:!1,range:"not 0",description:"A unique ID to identify the edition. It's useful for tagging an edition."},17849:{name:"EditionEntry",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,webm:!0,description:"Contains all information about a segment edition."},272869232:{name:"Chapters",level:1,type:"m",minver:1,webm:!0,description:"A system to define basic menus and partition data. For more detailed information, look at the Chapters Explanation."},18094:{name:"FileUID",level:3,type:"u",mandatory:!0,minver:1,webm:!1,range:"not 0",description:"Unique ID representing the file, as random as possible."},18012:{name:"FileData",level:3,type:"b",mandatory:!0,minver:1,webm:!1,description:"The data of the file."},18030:{name:"FileName",level:3,type:"8",mandatory:!0,minver:1,webm:!1,description:"Filename of the attached file."},18046:{name:"FileDescription",level:3,type:"8",minver:1,webm:!1,description:"A human-friendly name for the attached file."},24999:{name:"AttachedFile",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,webm:!1,description:"An attached file."},423732329:{name:"Attachments",level:1,type:"m",minver:1,webm:!1,description:"Contain attached files."},235:{name:"CueRefCodecState",level:5,type:"u",webm:!1,default:0,description:"The position of the Codec State corresponding to this referenced element. 0 means that the data is taken from the initial Track Entry."},21343:{name:"CueRefNumber",level:5,type:"u",webm:!1,default:1,range:"not 0",description:"Number of the referenced Block of Track X in the specified Cluster."},219:{name:"CueReference",level:4,type:"m",multiple:!0,minver:2,webm:!1,description:"The Clusters containing the required referenced Blocks."},234:{name:"CueCodecState",level:4,type:"u",minver:2,webm:!1,default:0,description:"The position of the Codec State corresponding to this Cue element. 0 means that the data is taken from the initial Track Entry."},178:{name:"CueDuration",level:4,type:"u",mandatory:!1,minver:4,webm:!1,description:"The duration of the block according to the segment time base. If missing the track's DefaultDuration does not apply and no duration information is available in terms of the cues."},240:{name:"CueRelativePosition",level:4,type:"u",mandatory:!1,minver:4,webm:!1,description:"The relative position of the referenced block inside the cluster with 0 being the first possible position for an element inside that cluster.",position:"clusterRelative"},241:{name:"CueClusterPosition",level:4,type:"u",mandatory:!0,minver:1,description:"The position of the Cluster containing the required Block.",position:"segment"},247:{name:"CueTrack",level:4,type:"u",mandatory:!0,minver:1,range:"not 0",description:"The track for which a position is given."},183:{name:"CueTrackPositions",level:3,type:"m",mandatory:!0,multiple:!0,minver:1,description:"Contain positions for different tracks corresponding to the timestamp."},179:{name:"CueTime",level:3,type:"u",mandatory:!0,minver:1,description:"Absolute timestamp according to the segment time base."},187:{name:"CuePoint",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,description:"Contains all information relative to a seek point in the segment."},475249515:{name:"Cues",level:1,type:"m",minver:1,description:'A top-level element to speed seeking access. All entries are local to the segment. Should be mandatory for non "live" streams.'},18406:{name:"ContentSigHashAlgo",level:6,type:"u",minver:1,webm:!1,default:0,description:"The hash algorithm used for the signature. A value of '0' means that the contents have not been signed but only encrypted. Predefined values: 1 - SHA1-160 2 - MD5"},18405:{name:"ContentSigAlgo",level:6,type:"u",minver:1,webm:!1,default:0,description:"The algorithm used for the signature. A value of '0' means that the contents have not been signed but only encrypted. Predefined values: 1 - RSA"},18404:{name:"ContentSigKeyID",level:6,type:"b",minver:1,webm:!1,description:"This is the ID of the private key the data was signed with."},18403:{name:"ContentSignature",level:6,type:"b",minver:1,webm:!1,description:"A cryptographic signature of the contents."},18402:{name:"ContentEncKeyID",level:6,type:"b",minver:1,webm:!1,description:"For public key algorithms this is the ID of the public key the the data was encrypted with."},18401:{name:"ContentEncAlgo",level:6,type:"u",minver:1,webm:!1,default:0,description:"The encryption algorithm used. The value '0' means that the contents have not been encrypted but only signed. Predefined values: 1 - DES, 2 - 3DES, 3 - Twofish, 4 - Blowfish, 5 - AES"},28032:{name:"ContentEncodings",level:3,type:"m",minver:1,webm:!1,description:"Settings for several content encoding mechanisms like compression or encryption."},196:{name:"TrickMasterTrackSegmentUID",level:3,type:"b",divx:!0,bytesize:16,description:"DivX trick track extenstions"},199:{name:"TrickMasterTrackUID",level:3,type:"u",divx:!0,description:"DivX trick track extenstions"},198:{name:"TrickTrackFlag",level:3,type:"u",divx:!0,default:0,description:"DivX trick track extenstions"},193:{name:"TrickTrackSegmentUID",level:3,type:"b",divx:!0,bytesize:16,description:"DivX trick track extenstions"},192:{name:"TrickTrackUID",level:3,type:"u",divx:!0,description:"DivX trick track extenstions"},237:{name:"TrackJoinUID",level:5,type:"u",mandatory:!0,multiple:!0,minver:3,webm:!1,range:"not 0",description:"The trackUID number of a track whose blocks are used to create this virtual track."},233:{name:"TrackJoinBlocks",level:4,type:"m",minver:3,webm:!1,description:"Contains the list of all tracks whose Blocks need to be combined to create this virtual track"},230:{name:"TrackPlaneType",level:6,type:"u",mandatory:!0,minver:3,webm:!1,description:"The kind of plane this track corresponds to (0: left eye, 1: right eye, 2: background)."},229:{name:"TrackPlaneUID",level:6,type:"u",mandatory:!0,minver:3,webm:!1,range:"not 0",description:"The trackUID number of the track representing the plane."},228:{name:"TrackPlane",level:5,type:"m",mandatory:!0,multiple:!0,minver:3,webm:!1,description:"Contains a video plane track that need to be combined to create this 3D track"},227:{name:"TrackCombinePlanes",level:4,type:"m",minver:3,webm:!1,description:"Contains the list of all video plane tracks that need to be combined to create this 3D track"},226:{name:"TrackOperation",level:3,type:"m",minver:3,webm:!1,description:"Operation that needs to be applied on tracks to create this virtual track. For more details look at the Specification Notes on the subject."},32123:{name:"ChannelPositions",cppname:"AudioPosition",level:4,type:"b",webm:!1,description:"Table of horizontal angles for each successive channel, see appendix."},159:{name:"Channels",cppname:"AudioChannels",level:4,type:"u",mandatory:!0,minver:1,default:1,range:"not 0",description:"Numbers of channels in the track."},30901:{name:"OutputSamplingFrequency",cppname:"AudioOutputSamplingFreq",level:4,type:"f",minver:1,default:"Sampling Frequency",range:"> 0",description:"Real output sampling frequency in Hz (used for SBR techniques)."},181:{name:"SamplingFrequency",cppname:"AudioSamplingFreq",level:4,type:"f",mandatory:!0,minver:1,default:8e3,range:"> 0",description:"Sampling frequency in Hz."},225:{name:"Audio",cppname:"TrackAudio",level:3,type:"m",minver:1,description:"Audio settings."},2327523:{name:"FrameRate",cppname:"VideoFrameRate",level:4,type:"f",range:"> 0",strong:"Informational",description:"Number of frames per second. only."},3126563:{name:"GammaValue",cppname:"VideoGamma",level:4,type:"f",webm:!1,range:"> 0",description:"Gamma Value."},3061028:{name:"ColourSpace",cppname:"VideoColourSpace",level:4,type:"b",minver:1,webm:!1,bytesize:4,description:"Same value as in AVI (32 bits)."},21683:{name:"AspectRatioType",cppname:"VideoAspectRatio",level:4,type:"u",minver:1,default:0,description:"Specify the possible modifications to the aspect ratio (0: free resizing, 1: keep aspect ratio, 2: fixed)."},21682:{name:"DisplayUnit",cppname:"VideoDisplayUnit",level:4,type:"u",minver:1,default:0,description:"How DisplayWidth & DisplayHeight should be interpreted (0: pixels, 1: centimeters, 2: inches, 3: Display Aspect Ratio)."},21690:{name:"DisplayHeight",cppname:"VideoDisplayHeight",level:4,type:"u",minver:1,default:"PixelHeight",range:"not 0",description:"Height of the video frames to display. The default value is only valid when DisplayUnit is 0."},21680:{name:"DisplayWidth",cppname:"VideoDisplayWidth",level:4,type:"u",minver:1,default:"PixelWidth",range:"not 0",description:"Width of the video frames to display. The default value is only valid when DisplayUnit is 0."},21725:{name:"PixelCropRight",cppname:"VideoPixelCropRight",level:4,type:"u",minver:1,default:0,description:"The number of video pixels to remove on the right of the image."},21708:{name:"PixelCropLeft",cppname:"VideoPixelCropLeft",level:4,type:"u",minver:1,default:0,description:"The number of video pixels to remove on the left of the image."},21691:{name:"PixelCropTop",cppname:"VideoPixelCropTop",level:4,type:"u",minver:1,default:0,description:"The number of video pixels to remove at the top of the image."},21674:{name:"PixelCropBottom",cppname:"VideoPixelCropBottom",level:4,type:"u",minver:1,default:0,description:"The number of video pixels to remove at the bottom of the image (for HDTV content)."},186:{name:"PixelHeight",cppname:"VideoPixelHeight",level:4,type:"u",mandatory:!0,minver:1,range:"not 0",description:"Height of the encoded video frames in pixels."},176:{name:"PixelWidth",cppname:"VideoPixelWidth",level:4,type:"u",mandatory:!0,minver:1,range:"not 0",description:"Width of the encoded video frames in pixels."},21433:{name:"OldStereoMode",level:4,type:"u",maxver:"0",webm:!1,divx:!1,description:"DEPRECATED, DO NOT USE. Bogus StereoMode value used in old versions of libmatroska. (0: mono, 1: right eye, 2: left eye, 3: both eyes)."},21440:{name:"AlphaMode",cppname:"VideoAlphaMode",level:4,type:"u",minver:3,webm:!0,default:0,description:"Alpha Video Mode. Presence of this element indicates that the BlockAdditional element could contain Alpha data."},21432:{name:"StereoMode",cppname:"VideoStereoMode",level:4,type:"u",minver:3,webm:!0,default:0,description:"Stereo-3D video mode (0: mono, 1: side by side (left eye is first), 2: top-bottom (right eye is first), 3: top-bottom (left eye is first), 4: checkboard (right is first), 5: checkboard (left is first), 6: row interleaved (right is first), 7: row interleaved (left is first), 8: column interleaved (right is first), 9: column interleaved (left is first), 10: anaglyph (cyan/red), 11: side by side (right eye is first), 12: anaglyph (green/magenta), 13 both eyes laced in one Block (left eye is first), 14 both eyes laced in one Block (right eye is first)) . There are some more details on 3D support in the Specification Notes."},154:{name:"FlagInterlaced",cppname:"VideoFlagInterlaced",level:4,type:"u",mandatory:!0,minver:2,webm:!0,default:0,range:"0-1",description:"Set if the video is interlaced. (1 bit)"},224:{name:"Video",cppname:"TrackVideo",level:3,type:"m",minver:1,description:"Video settings."},26277:{name:"TrackTranslateTrackID",level:4,type:"b",mandatory:!0,minver:1,webm:!1,description:"The binary value used to represent this track in the chapter codec data. The format depends on the ChapProcessCodecID used."},26303:{name:"TrackTranslateCodec",level:4,type:"u",mandatory:!0,minver:1,webm:!1,description:"The chapter codec using this ID (0: Matroska Script, 1: DVD-menu)."},26364:{name:"TrackTranslateEditionUID",level:4,type:"u",multiple:!0,minver:1,webm:!1,description:"Specify an edition UID on which this translation applies. When not specified, it means for all editions found in the segment."},22203:{name:"SeekPreRoll",level:3,type:"u",mandatory:!0,multiple:!1,default:0,minver:4,webm:!0,description:"After a discontinuity, SeekPreRoll is the duration in nanoseconds of the data the decoder must decode before the decoded data is valid."},22186:{name:"CodecDelay",level:3,type:"u",multiple:!1,default:0,minver:4,webm:!0,description:"CodecDelay is The codec-built-in delay in nanoseconds. This value must be subtracted from each block timestamp in order to get the actual timestamp. The value should be small so the muxing of tracks with the same actual timestamp are in the same Cluster."},28587:{name:"TrackOverlay",level:3,type:"u",multiple:!0,minver:1,webm:!1,description:"Specify that this track is an overlay track for the Track specified (in the u-integer). That means when this track has a gap (see SilentTracks) the overlay track should be used instead. The order of multiple TrackOverlay matters, the first one is the one that should be used. If not found it should be the second, etc."},170:{name:"CodecDecodeAll",level:3,type:"u",mandatory:!0,minver:2,webm:!1,default:1,range:"0-1",description:"The codec can decode potentially damaged data (1 bit)."},2536e3:{name:"CodecDownloadURL",level:3,type:"s",multiple:!0,webm:!1,description:"A URL to download about the codec used."},3883072:{name:"CodecInfoURL",level:3,type:"s",multiple:!0,webm:!1,description:"A URL to find information about the codec used."},3839639:{name:"CodecSettings",level:3,type:"8",webm:!1,description:"A string describing the encoding setting used."},25506:{name:"CodecPrivate",level:3,type:"b",minver:1,description:"Private data only known to the codec."},2274716:{name:"Language",cppname:"TrackLanguage",level:3,type:"s",minver:1,default:"eng",description:"Specifies the language of the track in the Matroska languages form."},21358:{name:"Name",cppname:"TrackName",level:3,type:"8",minver:1,description:"A human-readable track name."},21998:{name:"MaxBlockAdditionID",level:3,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"The maximum value of BlockAdditions for this track."},21375:{name:"TrackOffset",level:3,type:"i",webm:!1,default:0,description:"A value to add to the Block's Timestamp. This can be used to adjust the playback offset of a track."},2306383:{name:"TrackTimecodeScale",level:3,type:"f",mandatory:!0,minver:1,maxver:"3",webm:!1,default:1,range:"> 0",description:"DEPRECATED, DO NOT USE. The scale to apply on this track to work at normal speed in relation with other tracks (mostly used to adjust video speed when the audio length differs)."},2313850:{name:"DefaultDecodedFieldDuration",cppname:"TrackDefaultDecodedFieldDuration",level:3,type:"u",minver:4,range:"not 0",description:`The period in nanoseconds (not scaled by TimcodeScale)
8
- between two successive fields at the output of the decoding process (see the notes)`},2352003:{name:"DefaultDuration",cppname:"TrackDefaultDuration",level:3,type:"u",minver:1,range:"not 0",description:"Number of nanoseconds (not scaled via TimecodeScale) per frame ('frame' in the Matroska sense -- one element put into a (Simple)Block)."},28152:{name:"MaxCache",cppname:"TrackMaxCache",level:3,type:"u",minver:1,webm:!1,description:"The maximum cache size required to store referenced frames in and the current frame. 0 means no cache is needed."},28135:{name:"MinCache",cppname:"TrackMinCache",level:3,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"The minimum number of frames a player should be able to cache during playback. If set to 0, the reference pseudo-cache system is not used."},156:{name:"FlagLacing",cppname:"TrackFlagLacing",level:3,type:"u",mandatory:!0,minver:1,default:1,range:"0-1",description:"Set if the track may contain blocks using lacing. (1 bit)"},21930:{name:"FlagForced",cppname:"TrackFlagForced",level:3,type:"u",mandatory:!0,minver:1,default:0,range:"0-1",description:"Set if that track MUST be active during playback. There can be many forced track for a kind (audio, video or subs), the player should select the one which language matches the user preference or the default + forced track. Overlay MAY happen between a forced and non-forced track of the same kind. (1 bit)"},185:{name:"FlagEnabled",cppname:"TrackFlagEnabled",level:3,type:"u",mandatory:!0,minver:2,webm:!0,default:1,range:"0-1",description:"Set if the track is usable. (1 bit)"},29637:{name:"TrackUID",level:3,type:"u",mandatory:!0,minver:1,range:"not 0",description:"A unique ID to identify the Track. This should be kept the same when making a direct stream copy of the Track to another file."},215:{name:"TrackNumber",level:3,type:"u",mandatory:!0,minver:1,range:"not 0",description:"The track number as used in the Block Header (using more than 127 tracks is not encouraged, though the design allows an unlimited number)."},174:{name:"TrackEntry",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,description:"Describes a track with all elements."},374648427:{name:"Tracks",level:1,type:"m",multiple:!0,minver:1,description:"A top-level block of information with many tracks described."},175:{name:"EncryptedBlock",level:2,type:"b",multiple:!0,webm:!1,description:"Similar to EncryptedBlock Structure)"},202:{name:"ReferenceTimeCode",level:4,type:"u",multiple:!1,mandatory:!0,minver:0,webm:!1,divx:!0,description:"DivX trick track extenstions"},201:{name:"ReferenceOffset",level:4,type:"u",multiple:!1,mandatory:!0,minver:0,webm:!1,divx:!0,description:"DivX trick track extenstions"},200:{name:"ReferenceFrame",level:3,type:"m",multiple:!1,minver:0,webm:!1,divx:!0,description:"DivX trick track extenstions"},207:{name:"SliceDuration",level:5,type:"u",default:0,description:"The (scaled) duration to apply to the element."},206:{name:"Delay",cppname:"SliceDelay",level:5,type:"u",default:0,description:"The (scaled) delay to apply to the element."},203:{name:"BlockAdditionID",cppname:"SliceBlockAddID",level:5,type:"u",default:0,description:"The ID of the BlockAdditional element (0 is the main Block)."},205:{name:"FrameNumber",cppname:"SliceFrameNumber",level:5,type:"u",default:0,description:"The number of the frame to generate from this lace with this delay (allow you to generate many frames from the same Block/Frame)."},204:{name:"LaceNumber",cppname:"SliceLaceNumber",level:5,type:"u",minver:1,default:0,divx:!1,description:"The reverse number of the frame in the lace (0 is the last frame, 1 is the next to last, etc). While there are a few files in the wild with this element, it is no longer in use and has been deprecated. Being able to interpret this element is not required for playback."},232:{name:"TimeSlice",level:4,type:"m",multiple:!0,minver:1,divx:!1,description:"Contains extra time information about the data contained in the Block. While there are a few files in the wild with this element, it is no longer in use and has been deprecated. Being able to interpret this element is not required for playback."},142:{name:"Slices",level:3,type:"m",minver:1,divx:!1,description:"Contains slices description."},30114:{name:"DiscardPadding",level:3,type:"i",minver:4,webm:!0,description:"Duration in nanoseconds of the silent data added to the Block (padding at the end of the Block for positive value, at the beginning of the Block for negative value). The duration of DiscardPadding is not calculated in the duration of the TrackEntry and should be discarded during playback."},164:{name:"CodecState",level:3,type:"b",minver:2,webm:!1,description:"The new codec state to use. Data interpretation is private to the codec. This information should always be referenced by a seek entry."},253:{name:"ReferenceVirtual",level:3,type:"i",webm:!1,description:"Relative position of the data that should be in position of the virtual block."},251:{name:"ReferenceBlock",level:3,type:"i",multiple:!0,minver:1,description:"Timestamp of another frame used as a reference (ie: B or P frame). The timestamp is relative to the block it's attached to."},250:{name:"ReferencePriority",cppname:"FlagReferenced",level:3,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"This frame is referenced and has the specified cache priority. In cache only a frame of the same or higher priority can replace this frame. A value of 0 means the frame is not referenced."},155:{name:"BlockDuration",level:3,type:"u",minver:1,default:"TrackDuration",description:'The duration of the Block (based on TimecodeScale). This element is mandatory when DefaultDuration is set for the track (but can be omitted as other default values). When not written and with no DefaultDuration, the value is assumed to be the difference between the timestamp of this Block and the timestamp of the next Block in "display" order (not coding order). This element can be useful at the end of a Track (as there is not other Block available), or when there is a break in a track like for subtitle tracks. When set to 0 that means the frame is not a keyframe.'},165:{name:"BlockAdditional",level:5,type:"b",mandatory:!0,minver:1,webm:!1,description:"Interpreted by the codec as it wishes (using the BlockAddID)."},238:{name:"BlockAddID",level:5,type:"u",mandatory:!0,minver:1,webm:!1,default:1,range:"not 0",description:"An ID to identify the BlockAdditional level."},166:{name:"BlockMore",level:4,type:"m",mandatory:!0,multiple:!0,minver:1,webm:!1,description:"Contain the BlockAdditional and some parameters."},30113:{name:"BlockAdditions",level:3,type:"m",minver:1,webm:!1,description:"Contain additional blocks to complete the main one. An EBML parser that has no knowledge of the Block structure could still see and use/skip these data."},162:{name:"BlockVirtual",level:3,type:"b",webm:!1,description:"A Block with no data. It must be stored in the stream at the place the real Block should be in display order. (see Block Virtual)"},161:{name:"Block",level:3,type:"b",mandatory:!0,minver:1,description:"Block containing the actual data to be rendered and a timestamp relative to the Cluster Timecode. (see Block Structure)"},160:{name:"BlockGroup",level:2,type:"m",multiple:!0,minver:1,description:"Basic container of information containing a single Block or BlockVirtual, and information specific to that Block/VirtualBlock."},163:{name:"SimpleBlock",level:2,type:"b",multiple:!0,minver:2,webm:!0,divx:!0,description:"Similar to SimpleBlock Structure"},171:{name:"PrevSize",cppname:"ClusterPrevSize",level:2,type:"u",minver:1,description:"Size of the previous Cluster, in octets. Can be useful for backward playing.",position:"prevCluster"},167:{name:"Position",cppname:"ClusterPosition",level:2,type:"u",minver:1,webm:!1,description:"The Position of the Cluster in the segment (0 in live broadcast streams). It might help to resynchronise offset on damaged streams.",position:"segment"},22743:{name:"SilentTrackNumber",cppname:"ClusterSilentTrackNumber",level:3,type:"u",multiple:!0,minver:1,webm:!1,description:"One of the track number that are not used from now on in the stream. It could change later if not specified as silent in a further Cluster."},231:{name:"Timecode",cppname:"ClusterTimecode",level:2,type:"u",mandatory:!0,minver:1,description:"Absolute timestamp of the cluster (based on TimecodeScale)."},524531317:{name:"Cluster",level:1,type:"m",multiple:!0,minver:1,description:"The lower level element containing the (monolithic) Block structure."},19840:{name:"MuxingApp",level:2,type:"8",mandatory:!0,minver:1,description:'Muxing application or library ("libmatroska-0.4.3").'},31657:{name:"Title",level:2,type:"8",minver:1,webm:!1,description:"General name of the segment."},2807730:{name:"TimecodeScaleDenominator",level:2,type:"u",mandatory:!0,minver:4,default:"1000000000",description:"Timestamp scale numerator, see TimecodeScale."},2807729:{name:"TimecodeScale",level:2,type:"u",mandatory:!0,minver:1,default:"1000000",description:"Timestamp scale in nanoseconds (1.000.000 means all timestamps in the segment are expressed in milliseconds)."},27045:{name:"ChapterTranslateID",level:3,type:"b",mandatory:!0,minver:1,webm:!1,description:"The binary value used to represent this segment in the chapter codec data. The format depends on the ChapProcessCodecID used."},27071:{name:"ChapterTranslateCodec",level:3,type:"u",mandatory:!0,minver:1,webm:!1,description:"The chapter codec using this ID (0: Matroska Script, 1: DVD-menu)."},27132:{name:"ChapterTranslateEditionUID",level:3,type:"u",multiple:!0,minver:1,webm:!1,description:"Specify an edition UID on which this correspondance applies. When not specified, it means for all editions found in the segment."},4096955:{name:"NextFilename",level:2,type:"8",minver:1,webm:!1,description:"An escaped filename corresponding to the next segment."},4110627:{name:"NextUID",level:2,type:"b",minver:1,webm:!1,bytesize:16,description:"A unique ID to identify the next chained segment (128 bits)."},3965867:{name:"PrevFilename",level:2,type:"8",minver:1,webm:!1,description:"An escaped filename corresponding to the previous segment."},3979555:{name:"PrevUID",level:2,type:"b",minver:1,webm:!1,bytesize:16,description:"A unique ID to identify the previous chained segment (128 bits)."},29604:{name:"SegmentUID",level:2,type:"b",minver:1,webm:!1,range:"not 0",bytesize:16,description:"A randomly generated unique ID to identify the current segment between many others (128 bits)."},357149030:{name:"Info",level:1,type:"m",mandatory:!0,multiple:!0,minver:1,description:"Contains miscellaneous general information and statistics on the file."},21420:{name:"SeekPosition",level:3,type:"u",mandatory:!0,minver:1,description:"The position of the element in the segment in octets (0 = first level 1 element).",position:"segment"},21419:{name:"SeekID",level:3,type:"b",mandatory:!0,minver:1,description:"The binary ID corresponding to the element name.",type2:"ebmlID"},19899:{name:"Seek",cppname:"SeekPoint",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,description:"Contains a single seek entry to an EBML element."},290298740:{name:"SeekHead",cppname:"SeekHeader",level:1,type:"m",multiple:!0,minver:1,description:"Contains the position of other level 1 elements."},32379:{name:"SignatureElementList",level:2,type:"m",multiple:!0,webm:!1,i:"Cluster|Block|BlockAdditional",description:"A list consists of a number of consecutive elements that represent one case where data is used in signature. Ex: means that the BlockAdditional of all Blocks in all Clusters is used for encryption."},32347:{name:"SignatureElements",level:1,type:"m",webm:!1,description:"Contains elements that will be used to compute the signature."},32437:{name:"Signature",level:1,type:"b",webm:!1,description:"The signature of the data (until a new."},32421:{name:"SignaturePublicKey",level:1,type:"b",webm:!1,description:"The public key to use with the algorithm (in the case of a PKI-based signature)."},32410:{name:"SignatureHash",level:1,type:"u",webm:!1,description:"Hash algorithm used (1=SHA1-160, 2=MD5)."},32394:{name:"SignatureAlgo",level:1,type:"u",webm:!1,description:"Signature algorithm used (1=RSA, 2=elliptic)."},458458727:{name:"SignatureSlot",level:-1,type:"m",multiple:!0,webm:!1,description:"Contain signature of some (coming) elements in the stream."},191:{name:"CRC-32",level:-1,type:"b",minver:1,webm:!1,description:"The CRC is computed on all the data of the Master element it's in. The CRC element should be the first in it's parent master for easier reading. All level 1 elements should include a CRC-32. The CRC in use is the IEEE CRC32 Little Endian",crc:!0},236:{name:"Void",level:-1,type:"b",minver:1,description:"Used to void damaged data, to avoid unexpected behaviors when using damaged data. The content is discarded. Also used to reserve space in a sub-element for later use."},17139:{name:"EBMLMaxSizeLength",level:1,type:"u",mandatory:!0,default:8,minver:1,description:"The maximum length of the sizes you'll find in this file (8 or less in Matroska). This does not override the element size indicated at the beginning of an element. Elements that have an indicated size which is larger than what is allowed by EBMLMaxSizeLength shall be considered invalid."},17138:{name:"EBMLMaxIDLength",level:1,type:"u",mandatory:!0,default:4,minver:1,description:"The maximum length of the IDs you'll find in this file (4 or less in Matroska)."},17143:{name:"EBMLReadVersion",level:1,type:"u",mandatory:!0,default:1,minver:1,description:"The minimum EBML version a parser has to support to read this file."},440786851:{name:"EBML",level:"0",type:"m",mandatory:!0,multiple:!0,minver:1,description:"Set the EBML characteristics of the data to follow. Each EBML document has to start with this."},21936:{name:"Colour",level:"4",type:"m",mandatory:!0,multiple:!0,description:"Settings describing the colour format."},21937:{name:"MatrixCoefficients",level:"5",type:"u",mandatory:!0,multiple:!0,description:"The Matrix Coefficients of the video used to derive luma and chroma values from red, green, and blue color primaries. For clarity, the value and meanings for MatrixCoefficients are adopted from Table 4 of ISO/IEC 23001-8:2016 or ITU-T H.273."},21945:{name:"Range",level:"5",type:"u",mandatory:!0,multiple:!0,description:"Clipping of the color ranges."},21946:{name:"TransferCharacteristics",level:"5",type:"u",mandatory:!0,multiple:!0,description:"The transfer characteristics of the video."},21947:{name:"Primaries",level:"5",type:"u",mandatory:!0,multiple:!0,description:"The colour primaries of the video. For clarity, the value and meanings for Primaries are adopted from Table 2 of ISO/IEC 23091-4 or ITU-T H.273."}}),ebmlID}var hasRequiredEBMLEncoder;function requireEBMLEncoder(){if(hasRequiredEBMLEncoder)return EBMLEncoder;hasRequiredEBMLEncoder=1,Object.defineProperty(EBMLEncoder,"__esModule",{value:!0});var $=requireTools(),z=requireTools(),D=requireEbmlID(),j=function(){function O(){this._schema=D.byEbmlID,this._buffers=[],this._stack=[]}return O.prototype.encode=function(I){var o=this;return $.concat(I.reduce(function(k,N){return k.concat(o.encodeChunk(N))},[])).buffer},O.prototype.encodeChunk=function(I){return I.type==="m"?I.isEnd?this.endTag(I):this.startTag(I):(I.data=z.Buffer.from(I.data),this.writeTag(I)),this.flush()},O.prototype.flush=function(){var I=this._buffers;return this._buffers=[],I},O.prototype.getSchemaInfo=function(I){for(var o=Object.keys(this._schema).map(Number),k=0;k<o.length;k++){var N=o[k];if(this._schema[N].name===I)return new z.Buffer(N.toString(16),"hex")}return null},O.prototype.writeTag=function(I){var o=I.name,k=this.getSchemaInfo(o),N=I.data;if(k==null)throw new Error("No schema entry found for "+o);var F=$.encodeTag(k,N);if(this._stack.length>0){var J=this._stack[this._stack.length-1];J.children.push({tagId:k,elm:I,children:[],data:F});return}this._buffers=this._buffers.concat(F)},O.prototype.startTag=function(I){var o=I.name,k=this.getSchemaInfo(o);if(k==null)throw new Error("No schema entry found for "+o);if(I.unknownSize){var N=$.encodeTag(k,new z.Buffer(0),I.unknownSize);this._buffers=this._buffers.concat(N);return}var F={tagId:k,elm:I,children:[],data:null};this._stack.length>0&&this._stack[this._stack.length-1].children.push(F),this._stack.push(F)},O.prototype.endTag=function(I){I.name;var o=this._stack.pop();if(o==null)throw new Error("EBML structure is broken");if(o.elm.name!==I.name)throw new Error("EBML structure is broken");var k=o.children.reduce(function(F,J){if(J.data===null)throw new Error("EBML structure is broken");return F.concat(J.data)},[]),N=$.concat(k);o.elm.type==="m"?o.data=$.encodeTag(o.tagId,N,o.elm.unknownSize):o.data=$.encodeTag(o.tagId,N),this._stack.length<1&&(this._buffers=this._buffers.concat(o.data))},O}();return EBMLEncoder.default=j,EBMLEncoder}var buffer={},base64Js={},hasRequiredBase64Js;function requireBase64Js(){if(hasRequiredBase64Js)return base64Js;hasRequiredBase64Js=1,base64Js.byteLength=k,base64Js.toByteArray=F,base64Js.fromByteArray=Y;for(var $=[],z=[],D=typeof Uint8Array<"u"?Uint8Array:Array,j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",O=0,I=j.length;O<I;++O)$[O]=j[O],z[j.charCodeAt(O)]=O;z[45]=62,z[95]=63;function o(Q){var te=Q.length;if(te%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var ie=Q.indexOf("=");ie===-1&&(ie=te);var ne=ie===te?0:4-ie%4;return[ie,ne]}function k(Q){var te=o(Q),ie=te[0],ne=te[1];return(ie+ne)*3/4-ne}function N(Q,te,ie){return(te+ie)*3/4-ie}function F(Q){var te,ie=o(Q),ne=ie[0],oe=ie[1],ce=new D(N(Q,ne,oe)),we=0,se=oe>0?ne-4:ne,ye;for(ye=0;ye<se;ye+=4)te=z[Q.charCodeAt(ye)]<<18|z[Q.charCodeAt(ye+1)]<<12|z[Q.charCodeAt(ye+2)]<<6|z[Q.charCodeAt(ye+3)],ce[we++]=te>>16&255,ce[we++]=te>>8&255,ce[we++]=te&255;return oe===2&&(te=z[Q.charCodeAt(ye)]<<2|z[Q.charCodeAt(ye+1)]>>4,ce[we++]=te&255),oe===1&&(te=z[Q.charCodeAt(ye)]<<10|z[Q.charCodeAt(ye+1)]<<4|z[Q.charCodeAt(ye+2)]>>2,ce[we++]=te>>8&255,ce[we++]=te&255),ce}function J(Q){return $[Q>>18&63]+$[Q>>12&63]+$[Q>>6&63]+$[Q&63]}function X(Q,te,ie){for(var ne,oe=[],ce=te;ce<ie;ce+=3)ne=(Q[ce]<<16&16711680)+(Q[ce+1]<<8&65280)+(Q[ce+2]&255),oe.push(J(ne));return oe.join("")}function Y(Q){for(var te,ie=Q.length,ne=ie%3,oe=[],ce=16383,we=0,se=ie-ne;we<se;we+=ce)oe.push(X(Q,we,we+ce>se?se:we+ce));return ne===1?(te=Q[ie-1],oe.push($[te>>2]+$[te<<4&63]+"==")):ne===2&&(te=(Q[ie-2]<<8)+Q[ie-1],oe.push($[te>>10]+$[te>>4&63]+$[te<<2&63]+"=")),oe.join("")}return base64Js}var ieee754={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var hasRequiredIeee754;function requireIeee754(){return hasRequiredIeee754||(hasRequiredIeee754=1,ieee754.read=function($,z,D,j,O){var I,o,k=O*8-j-1,N=(1<<k)-1,F=N>>1,J=-7,X=D?O-1:0,Y=D?-1:1,Q=$[z+X];for(X+=Y,I=Q&(1<<-J)-1,Q>>=-J,J+=k;J>0;I=I*256+$[z+X],X+=Y,J-=8);for(o=I&(1<<-J)-1,I>>=-J,J+=j;J>0;o=o*256+$[z+X],X+=Y,J-=8);if(I===0)I=1-F;else{if(I===N)return o?NaN:(Q?-1:1)*(1/0);o=o+Math.pow(2,j),I=I-F}return(Q?-1:1)*o*Math.pow(2,I-j)},ieee754.write=function($,z,D,j,O,I){var o,k,N,F=I*8-O-1,J=(1<<F)-1,X=J>>1,Y=O===23?Math.pow(2,-24)-Math.pow(2,-77):0,Q=j?0:I-1,te=j?1:-1,ie=z<0||z===0&&1/z<0?1:0;for(z=Math.abs(z),isNaN(z)||z===1/0?(k=isNaN(z)?1:0,o=J):(o=Math.floor(Math.log(z)/Math.LN2),z*(N=Math.pow(2,-o))<1&&(o--,N*=2),o+X>=1?z+=Y/N:z+=Y*Math.pow(2,1-X),z*N>=2&&(o++,N/=2),o+X>=J?(k=0,o=J):o+X>=1?(k=(z*N-1)*Math.pow(2,O),o=o+X):(k=z*Math.pow(2,X-1)*Math.pow(2,O),o=0));O>=8;$[D+Q]=k&255,Q+=te,k/=256,O-=8);for(o=o<<O|k,F+=O;F>0;$[D+Q]=o&255,Q+=te,o/=256,F-=8);$[D+Q-te]|=ie*128}),ieee754}/*!
3
+ `},writer$1}var hasRequiredLib$1;function requireLib$1(){if(hasRequiredLib$1)return lib$1;hasRequiredLib$1=1;var O=requireParser(),N=requireWriter$1(),I=requireGrammar();return lib$1.grammar=I,lib$1.write=N,lib$1.parse=O.parse,lib$1.parseParams=O.parseParams,lib$1.parseFmtpConfig=O.parseFmtpConfig,lib$1.parsePayloads=O.parsePayloads,lib$1.parseRemoteCandidates=O.parseRemoteCandidates,lib$1.parseImageAttributes=O.parseImageAttributes,lib$1.parseSimulcastStreamList=O.parseSimulcastStreamList,lib$1}var libExports$1=requireLib$1();class VideoMediaContext{constructor(N){_e(this,"kind","video");_e(this,"stream",new MediaStream);_e(this,"stop",()=>{const N=this.stream.getTracks();for(const I of N)I.stop(),this.stream.removeTrack(I)});_e(this,"replaceStream",N=>{const I=this.stream,D=I.getTracks();for(const k of D)I.removeTrack(k);const[f]=N.getVideoTracks();f&&I.addTrack(f)});_e(this,"getStream",()=>this.stream);_e(this,"getTrack",()=>this.stream.getTracks()[0]);this.stream.addTrack(N)}}const enum_roomState={ready:"已就绪",checkAuth:"正在鉴权",connecting:"连接中",connected:"已连接",reconnect:"正在重新连接",disconnected:"已断开",failed:"连接错误",closed:"已关闭"};ht(enum_roomState);var y$1=Object.defineProperty,B=O=>{throw TypeError(O)},v=(O,N,I)=>N in O?y$1(O,N,{enumerable:!0,configurable:!0,writable:!0,value:I}):O[N]=I,l$1=(O,N,I)=>v(O,typeof N!="symbol"?N+"":N,I),T=(O,N,I)=>N.has(O)||B("Cannot "+I),t$2=(O,N,I)=>(T(O,N,"read from private field"),I?I.call(O):N.get(O)),o=(O,N,I)=>N.has(O)?B("Cannot add the same private member more than once"):N instanceof WeakSet?N.add(O):N.set(O,I),r$1=(O,N,I,D)=>(T(O,N,"write to private field"),N.set(O,I),I),s$1,a$1,h,u$1,m$1,p$1,d$1,x$1,g$1,b,w;class S{constructor(N){o(this,s$1,{url:"",binaryType:"blob",timeout:6*1e3,debug:!1,autoConnect:!1,reconnectCount:-1,reconnectTime:60*1e3,reconnectIntervalTime:5e3,heartbeatIntervalTime:1e4,checkReconnect:I=>!0,onReconnectSuccess:async I=>{},onReconnectStop:async I=>{},getHeartbeatMsg:()=>JSON.stringify({event:"heartbeat"}),onMessage:I=>{}}),l$1(this,"ws"),o(this,a$1,-1),o(this,h,-1),o(this,u$1,0),o(this,m$1,0),o(this,p$1,0),o(this,d$1,!1),l$1(this,"connect",()=>new Promise(async(I,D)=>{this.ws=new WebSocket(t$2(this,s$1).url),this.ws.binaryType=t$2(this,s$1).binaryType,this.ws.addEventListener("message",t$2(this,g$1)),this.ws.addEventListener("open",f=>{clearTimeout(t$2(this,u$1)),r$1(this,a$1,t$2(this,s$1).reconnectCount),r$1(this,h,-1),t$2(this,b).call(this),t$2(this,s$1).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(f)}),this.ws.addEventListener("error",f=>{clearTimeout(t$2(this,u$1)),t$2(this,s$1).debug&&console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: connect is error.",f),D(f)}),this.ws.addEventListener("close",f=>{if(t$2(this,s$1).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;",`------->pr-ws: connect is close. code: ${f.code}, permanentClosed is ${t$2(this,d$1)}.`,f),t$2(this,w).call(this),!t$2(this,d$1))return this.reconnect(f);this.ws=void 0}),r$1(this,u$1,window.setTimeout(()=>{t$2(this,s$1).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: connect is timeout.",this),D("connect is timeout.")},t$2(this,s$1).timeout))})),l$1(this,"reconnect",async I=>new Promise(D=>{t$2(this,s$1).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;","------->pr-ws: await reconnect.");const f=k=>{t$2(this,s$1).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;",`------->pr-ws: ${k}`),t$2(this,s$1).onReconnectStop({msg:k}),D(k)};if(t$2(this,x$1).call(this)===!1)return f("stop reconnect. exceed maxReconnectionTime.");if(t$2(this,a$1)!==-1&&t$2(this,a$1)===0)return f("stop reconnect. surplusReconnectCount is 0.");if(!t$2(this,s$1).checkReconnect(I))return f("stop reconnect. checkReconnect is false.");t$2(this,s$1).debug&&console.info("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;padding:16px 0;",`------->pr-ws: await ${t$2(this,s$1).reconnectIntervalTime}ms run reconnect. surplusReconnectCount is ${t$2(this,a$1)}`,I),r$1(this,m$1,window.setTimeout(async()=>{r$1(this,a$1,Math.max(-1,t$2(this,a$1)-1)),await this.connect();try{await t$2(this,s$1).onReconnectSuccess(this.ws)}catch(k){console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->pr-ws: onReconnectSuccess is error",k)}D(!0)},t$2(this,s$1).reconnectIntervalTime))})),l$1(this,"sendMessage",async I=>{var D;(!this.ws||this.ws.readyState!==1)&&(t$2(this,s$1).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$2(this,s$1).autoConnect&&(t$2(this,s$1).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(I)}),l$1(this,"close",async(I=1e3,D="correctly close.")=>{var f;this.ws&&(r$1(this,d$1,!0),t$2(this,w).call(this),(f=this.ws)==null||f.close(I,D))}),o(this,x$1,()=>{const I=Date.now();return t$2(this,h)===-1&&r$1(this,h,I+t$2(this,s$1).reconnectTime),!(I>t$2(this,h))}),o(this,g$1,I=>{const{data:D}=I;t$2(this,s$1).onMessage(D)}),o(this,b,()=>{r$1(this,p$1,window.setInterval(()=>{const I=t$2(this,s$1).getHeartbeatMsg();I&&this.sendMessage(I)},t$2(this,s$1).heartbeatIntervalTime))}),o(this,w,()=>{clearInterval(t$2(this,m$1)),clearInterval(t$2(this,p$1))}),r$1(this,s$1,{...t$2(this,s$1),...N}),r$1(this,a$1,t$2(this,s$1).reconnectCount)}}s$1=new WeakMap,a$1=new WeakMap,h=new WeakMap,u$1=new WeakMap,m$1=new WeakMap,p$1=new WeakMap,d$1=new WeakMap,x$1=new WeakMap,g$1=new WeakMap,b=new WeakMap,w=new WeakMap;var indexMinimal={},minimal$1={},aspromise,hasRequiredAspromise;function requireAspromise(){if(hasRequiredAspromise)return aspromise;hasRequiredAspromise=1,aspromise=O;function O(N,I){for(var D=new Array(arguments.length-1),f=0,k=2,i=!0;k<arguments.length;)D[f++]=arguments[k++];return new Promise(function($,C){D[f]=function(Z){if(i)if(i=!1,Z)C(Z);else{for(var J=new Array(arguments.length-1),z=0;z<J.length;)J[z++]=arguments[z];$.apply(null,J)}};try{N.apply(I||null,D)}catch(M){i&&(i=!1,C(M))}})}return aspromise}var base64={},hasRequiredBase64;function requireBase64(){return hasRequiredBase64||(hasRequiredBase64=1,function(O){var N=O;N.length=function(c){var $=c.length;if(!$)return 0;for(var C=0;--$%4>1&&c.charAt($)==="=";)++C;return Math.ceil(c.length*3)/4-C};for(var I=new Array(64),D=new Array(123),f=0;f<64;)D[I[f]=f<26?f+65:f<52?f+71:f<62?f-4:f-59|43]=f++;N.encode=function(c,$,C){for(var M=null,Z=[],J=0,z=0,Q;$<C;){var ee=c[$++];switch(z){case 0:Z[J++]=I[ee>>2],Q=(ee&3)<<4,z=1;break;case 1:Z[J++]=I[Q|ee>>4],Q=(ee&15)<<2,z=2;break;case 2:Z[J++]=I[Q|ee>>6],Z[J++]=I[ee&63],z=0;break}J>8191&&((M||(M=[])).push(String.fromCharCode.apply(String,Z)),J=0)}return z&&(Z[J++]=I[Q],Z[J++]=61,z===1&&(Z[J++]=61)),M?(J&&M.push(String.fromCharCode.apply(String,Z.slice(0,J))),M.join("")):String.fromCharCode.apply(String,Z.slice(0,J))};var k="invalid encoding";N.decode=function(c,$,C){for(var M=C,Z=0,J,z=0;z<c.length;){var Q=c.charCodeAt(z++);if(Q===61&&Z>1)break;if((Q=D[Q])===void 0)throw Error(k);switch(Z){case 0:J=Q,Z=1;break;case 1:$[C++]=J<<2|(Q&48)>>4,J=Q,Z=2;break;case 2:$[C++]=(J&15)<<4|(Q&60)>>2,J=Q,Z=3;break;case 3:$[C++]=(J&3)<<6|Q,Z=0;break}}if(Z===1)throw Error(k);return C-M},N.test=function(c){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(c)}}(base64)),base64}var eventemitter,hasRequiredEventemitter;function requireEventemitter(){if(hasRequiredEventemitter)return eventemitter;hasRequiredEventemitter=1,eventemitter=O;function O(){this._listeners={}}return O.prototype.on=function(I,D,f){return(this._listeners[I]||(this._listeners[I]=[])).push({fn:D,ctx:f||this}),this},O.prototype.off=function(I,D){if(I===void 0)this._listeners={};else if(D===void 0)this._listeners[I]=[];else for(var f=this._listeners[I],k=0;k<f.length;)f[k].fn===D?f.splice(k,1):++k;return this},O.prototype.emit=function(I){var D=this._listeners[I];if(D){for(var f=[],k=1;k<arguments.length;)f.push(arguments[k++]);for(k=0;k<D.length;)D[k].fn.apply(D[k++].ctx,f)}return this},eventemitter}var float,hasRequiredFloat;function requireFloat(){if(hasRequiredFloat)return float;hasRequiredFloat=1,float=O(O);function O(k){return typeof Float32Array<"u"?function(){var i=new Float32Array([-0]),c=new Uint8Array(i.buffer),$=c[3]===128;function C(z,Q,ee){i[0]=z,Q[ee]=c[0],Q[ee+1]=c[1],Q[ee+2]=c[2],Q[ee+3]=c[3]}function M(z,Q,ee){i[0]=z,Q[ee]=c[3],Q[ee+1]=c[2],Q[ee+2]=c[1],Q[ee+3]=c[0]}k.writeFloatLE=$?C:M,k.writeFloatBE=$?M:C;function Z(z,Q){return c[0]=z[Q],c[1]=z[Q+1],c[2]=z[Q+2],c[3]=z[Q+3],i[0]}function J(z,Q){return c[3]=z[Q],c[2]=z[Q+1],c[1]=z[Q+2],c[0]=z[Q+3],i[0]}k.readFloatLE=$?Z:J,k.readFloatBE=$?J:Z}():function(){function i($,C,M,Z){var J=C<0?1:0;if(J&&(C=-C),C===0)$(1/C>0?0:2147483648,M,Z);else if(isNaN(C))$(2143289344,M,Z);else if(C>34028234663852886e22)$((J<<31|2139095040)>>>0,M,Z);else if(C<11754943508222875e-54)$((J<<31|Math.round(C/1401298464324817e-60))>>>0,M,Z);else{var z=Math.floor(Math.log(C)/Math.LN2),Q=Math.round(C*Math.pow(2,-z)*8388608)&8388607;$((J<<31|z+127<<23|Q)>>>0,M,Z)}}k.writeFloatLE=i.bind(null,N),k.writeFloatBE=i.bind(null,I);function c($,C,M){var Z=$(C,M),J=(Z>>31)*2+1,z=Z>>>23&255,Q=Z&8388607;return z===255?Q?NaN:J*(1/0):z===0?J*1401298464324817e-60*Q:J*Math.pow(2,z-150)*(Q+8388608)}k.readFloatLE=c.bind(null,D),k.readFloatBE=c.bind(null,f)}(),typeof Float64Array<"u"?function(){var i=new Float64Array([-0]),c=new Uint8Array(i.buffer),$=c[7]===128;function C(z,Q,ee){i[0]=z,Q[ee]=c[0],Q[ee+1]=c[1],Q[ee+2]=c[2],Q[ee+3]=c[3],Q[ee+4]=c[4],Q[ee+5]=c[5],Q[ee+6]=c[6],Q[ee+7]=c[7]}function M(z,Q,ee){i[0]=z,Q[ee]=c[7],Q[ee+1]=c[6],Q[ee+2]=c[5],Q[ee+3]=c[4],Q[ee+4]=c[3],Q[ee+5]=c[2],Q[ee+6]=c[1],Q[ee+7]=c[0]}k.writeDoubleLE=$?C:M,k.writeDoubleBE=$?M:C;function Z(z,Q){return c[0]=z[Q],c[1]=z[Q+1],c[2]=z[Q+2],c[3]=z[Q+3],c[4]=z[Q+4],c[5]=z[Q+5],c[6]=z[Q+6],c[7]=z[Q+7],i[0]}function J(z,Q){return c[7]=z[Q],c[6]=z[Q+1],c[5]=z[Q+2],c[4]=z[Q+3],c[3]=z[Q+4],c[2]=z[Q+5],c[1]=z[Q+6],c[0]=z[Q+7],i[0]}k.readDoubleLE=$?Z:J,k.readDoubleBE=$?J:Z}():function(){function i($,C,M,Z,J,z){var Q=Z<0?1:0;if(Q&&(Z=-Z),Z===0)$(0,J,z+C),$(1/Z>0?0:2147483648,J,z+M);else if(isNaN(Z))$(0,J,z+C),$(2146959360,J,z+M);else if(Z>17976931348623157e292)$(0,J,z+C),$((Q<<31|2146435072)>>>0,J,z+M);else{var ee;if(Z<22250738585072014e-324)ee=Z/5e-324,$(ee>>>0,J,z+C),$((Q<<31|ee/4294967296)>>>0,J,z+M);else{var Y=Math.floor(Math.log(Z)/Math.LN2);Y===1024&&(Y=1023),ee=Z*Math.pow(2,-Y),$(ee*4503599627370496>>>0,J,z+C),$((Q<<31|Y+1023<<20|ee*1048576&1048575)>>>0,J,z+M)}}}k.writeDoubleLE=i.bind(null,N,0,4),k.writeDoubleBE=i.bind(null,I,4,0);function c($,C,M,Z,J){var z=$(Z,J+C),Q=$(Z,J+M),ee=(Q>>31)*2+1,Y=Q>>>20&2047,te=4294967296*(Q&1048575)+z;return Y===2047?te?NaN:ee*(1/0):Y===0?ee*5e-324*te:ee*Math.pow(2,Y-1075)*(te+4503599627370496)}k.readDoubleLE=c.bind(null,D,0,4),k.readDoubleBE=c.bind(null,f,4,0)}(),k}function N(k,i,c){i[c]=k&255,i[c+1]=k>>>8&255,i[c+2]=k>>>16&255,i[c+3]=k>>>24}function I(k,i,c){i[c]=k>>>24,i[c+1]=k>>>16&255,i[c+2]=k>>>8&255,i[c+3]=k&255}function D(k,i){return(k[i]|k[i+1]<<8|k[i+2]<<16|k[i+3]<<24)>>>0}function f(k,i){return(k[i]<<24|k[i+1]<<16|k[i+2]<<8|k[i+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(O){}return null}return inquire_1}var utf8={},hasRequiredUtf8;function requireUtf8(){return hasRequiredUtf8||(hasRequiredUtf8=1,function(O){var N=O;N.length=function(D){for(var f=0,k=0,i=0;i<D.length;++i)k=D.charCodeAt(i),k<128?f+=1:k<2048?f+=2:(k&64512)===55296&&(D.charCodeAt(i+1)&64512)===56320?(++i,f+=4):f+=3;return f},N.read=function(D,f,k){var i=k-f;if(i<1)return"";for(var c=null,$=[],C=0,M;f<k;)M=D[f++],M<128?$[C++]=M:M>191&&M<224?$[C++]=(M&31)<<6|D[f++]&63:M>239&&M<365?(M=((M&7)<<18|(D[f++]&63)<<12|(D[f++]&63)<<6|D[f++]&63)-65536,$[C++]=55296+(M>>10),$[C++]=56320+(M&1023)):$[C++]=(M&15)<<12|(D[f++]&63)<<6|D[f++]&63,C>8191&&((c||(c=[])).push(String.fromCharCode.apply(String,$)),C=0);return c?(C&&c.push(String.fromCharCode.apply(String,$.slice(0,C))),c.join("")):String.fromCharCode.apply(String,$.slice(0,C))},N.write=function(D,f,k){for(var i=k,c,$,C=0;C<D.length;++C)c=D.charCodeAt(C),c<128?f[k++]=c:c<2048?(f[k++]=c>>6|192,f[k++]=c&63|128):(c&64512)===55296&&(($=D.charCodeAt(C+1))&64512)===56320?(c=65536+((c&1023)<<10)+($&1023),++C,f[k++]=c>>18|240,f[k++]=c>>12&63|128,f[k++]=c>>6&63|128,f[k++]=c&63|128):(f[k++]=c>>12|224,f[k++]=c>>6&63|128,f[k++]=c&63|128);return k-i}}(utf8)),utf8}var pool_1,hasRequiredPool;function requirePool(){if(hasRequiredPool)return pool_1;hasRequiredPool=1,pool_1=O;function O(N,I,D){var f=D||8192,k=f>>>1,i=null,c=f;return function(C){if(C<1||C>k)return N(C);c+C>f&&(i=N(f),c=0);var M=I.call(i,c,c+=C);return c&7&&(c=(c|7)+1),M}}return pool_1}var longbits,hasRequiredLongbits;function requireLongbits(){if(hasRequiredLongbits)return longbits;hasRequiredLongbits=1,longbits=N;var O=requireMinimal$1();function N(k,i){this.lo=k>>>0,this.hi=i>>>0}var I=N.zero=new N(0,0);I.toNumber=function(){return 0},I.zzEncode=I.zzDecode=function(){return this},I.length=function(){return 1};var D=N.zeroHash="\0\0\0\0\0\0\0\0";N.fromNumber=function(i){if(i===0)return I;var c=i<0;c&&(i=-i);var $=i>>>0,C=(i-$)/4294967296>>>0;return c&&(C=~C>>>0,$=~$>>>0,++$>4294967295&&($=0,++C>4294967295&&(C=0))),new N($,C)},N.from=function(i){if(typeof i=="number")return N.fromNumber(i);if(O.isString(i))if(O.Long)i=O.Long.fromString(i);else return N.fromNumber(parseInt(i,10));return i.low||i.high?new N(i.low>>>0,i.high>>>0):I},N.prototype.toNumber=function(i){if(!i&&this.hi>>>31){var c=~this.lo+1>>>0,$=~this.hi>>>0;return c||($=$+1>>>0),-(c+$*4294967296)}return this.lo+this.hi*4294967296},N.prototype.toLong=function(i){return O.Long?new O.Long(this.lo|0,this.hi|0,!!i):{low:this.lo|0,high:this.hi|0,unsigned:!!i}};var f=String.prototype.charCodeAt;return N.fromHash=function(i){return i===D?I:new N((f.call(i,0)|f.call(i,1)<<8|f.call(i,2)<<16|f.call(i,3)<<24)>>>0,(f.call(i,4)|f.call(i,5)<<8|f.call(i,6)<<16|f.call(i,7)<<24)>>>0)},N.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)},N.prototype.zzEncode=function(){var i=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^i)>>>0,this.lo=(this.lo<<1^i)>>>0,this},N.prototype.zzDecode=function(){var i=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^i)>>>0,this.hi=(this.hi>>>1^i)>>>0,this},N.prototype.length=function(){var i=this.lo,c=(this.lo>>>28|this.hi<<4)>>>0,$=this.hi>>>24;return $===0?c===0?i<16384?i<128?1:2:i<2097152?3:4:c<16384?c<128?5:6:c<2097152?7:8:$<128?9:10},longbits}var hasRequiredMinimal$1;function requireMinimal$1(){return hasRequiredMinimal$1||(hasRequiredMinimal$1=1,function(O){var N=O;N.asPromise=requireAspromise(),N.base64=requireBase64(),N.EventEmitter=requireEventemitter(),N.float=requireFloat(),N.inquire=requireInquire(),N.utf8=requireUtf8(),N.pool=requirePool(),N.LongBits=requireLongbits(),N.isNode=!!(typeof commonjsGlobal<"u"&&commonjsGlobal&&commonjsGlobal.process&&commonjsGlobal.process.versions&&commonjsGlobal.process.versions.node),N.global=N.isNode&&commonjsGlobal||typeof window<"u"&&window||typeof self<"u"&&self||minimal$1,N.emptyArray=Object.freeze?Object.freeze([]):[],N.emptyObject=Object.freeze?Object.freeze({}):{},N.isInteger=Number.isInteger||function(k){return typeof k=="number"&&isFinite(k)&&Math.floor(k)===k},N.isString=function(k){return typeof k=="string"||k instanceof String},N.isObject=function(k){return k&&typeof k=="object"},N.isset=N.isSet=function(k,i){var c=k[i];return c!=null&&k.hasOwnProperty(i)?typeof c!="object"||(Array.isArray(c)?c.length:Object.keys(c).length)>0:!1},N.Buffer=function(){try{var f=N.inquire("buffer").Buffer;return f.prototype.utf8Write?f:null}catch{return null}}(),N._Buffer_from=null,N._Buffer_allocUnsafe=null,N.newBuffer=function(k){return typeof k=="number"?N.Buffer?N._Buffer_allocUnsafe(k):new N.Array(k):N.Buffer?N._Buffer_from(k):typeof Uint8Array>"u"?k:new Uint8Array(k)},N.Array=typeof Uint8Array<"u"?Uint8Array:Array,N.Long=N.global.dcodeIO&&N.global.dcodeIO.Long||N.global.Long||N.inquire("long"),N.key2Re=/^true|false|0|1$/,N.key32Re=/^-?(?:0|[1-9][0-9]*)$/,N.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,N.longToHash=function(k){return k?N.LongBits.from(k).toHash():N.LongBits.zeroHash},N.longFromHash=function(k,i){var c=N.LongBits.fromHash(k);return N.Long?N.Long.fromBits(c.lo,c.hi,i):c.toNumber(!!i)};function I(f,k,i){for(var c=Object.keys(k),$=0;$<c.length;++$)(f[c[$]]===void 0||!i)&&(f[c[$]]=k[c[$]]);return f}N.merge=I,N.lcFirst=function(k){return k.charAt(0).toLowerCase()+k.substring(1)};function D(f){function k(i,c){if(!(this instanceof k))return new k(i,c);Object.defineProperty(this,"message",{get:function(){return i}}),Error.captureStackTrace?Error.captureStackTrace(this,k):Object.defineProperty(this,"stack",{value:new Error().stack||""}),c&&I(this,c)}return k.prototype=Object.create(Error.prototype,{constructor:{value:k,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return f},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),k}N.newError=D,N.ProtocolError=D("ProtocolError"),N.oneOfGetter=function(k){for(var i={},c=0;c<k.length;++c)i[k[c]]=1;return function(){for(var $=Object.keys(this),C=$.length-1;C>-1;--C)if(i[$[C]]===1&&this[$[C]]!==void 0&&this[$[C]]!==null)return $[C]}},N.oneOfSetter=function(k){return function(i){for(var c=0;c<k.length;++c)k[c]!==i&&delete this[k[c]]}},N.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},N._configure=function(){var f=N.Buffer;if(!f){N._Buffer_from=N._Buffer_allocUnsafe=null;return}N._Buffer_from=f.from!==Uint8Array.from&&f.from||function(i,c){return new f(i,c)},N._Buffer_allocUnsafe=f.allocUnsafe||function(i){return new f(i)}}}(minimal$1)),minimal$1}var writer,hasRequiredWriter;function requireWriter(){if(hasRequiredWriter)return writer;hasRequiredWriter=1,writer=$;var O=requireMinimal$1(),N,I=O.LongBits,D=O.base64,f=O.utf8;function k(Y,te,ie){this.fn=Y,this.len=te,this.next=void 0,this.val=ie}function i(){}function c(Y){this.head=Y.head,this.tail=Y.tail,this.len=Y.len,this.next=Y.states}function $(){this.len=0,this.head=new k(i,0,0),this.tail=this.head,this.states=null}var C=function(){return O.Buffer?function(){return($.create=function(){return new N})()}:function(){return new $}};$.create=C(),$.alloc=function(te){return new O.Array(te)},O.Array!==Array&&($.alloc=O.pool($.alloc,O.Array.prototype.subarray)),$.prototype._push=function(te,ie,ye){return this.tail=this.tail.next=new k(te,ie,ye),this.len+=ie,this};function M(Y,te,ie){te[ie]=Y&255}function Z(Y,te,ie){for(;Y>127;)te[ie++]=Y&127|128,Y>>>=7;te[ie]=Y}function J(Y,te){this.len=Y,this.next=void 0,this.val=te}J.prototype=Object.create(k.prototype),J.prototype.fn=Z,$.prototype.uint32=function(te){return this.len+=(this.tail=this.tail.next=new J((te=te>>>0)<128?1:te<16384?2:te<2097152?3:te<268435456?4:5,te)).len,this},$.prototype.int32=function(te){return te<0?this._push(z,10,I.fromNumber(te)):this.uint32(te)},$.prototype.sint32=function(te){return this.uint32((te<<1^te>>31)>>>0)};function z(Y,te,ie){for(;Y.hi;)te[ie++]=Y.lo&127|128,Y.lo=(Y.lo>>>7|Y.hi<<25)>>>0,Y.hi>>>=7;for(;Y.lo>127;)te[ie++]=Y.lo&127|128,Y.lo=Y.lo>>>7;te[ie++]=Y.lo}$.prototype.uint64=function(te){var ie=I.from(te);return this._push(z,ie.length(),ie)},$.prototype.int64=$.prototype.uint64,$.prototype.sint64=function(te){var ie=I.from(te).zzEncode();return this._push(z,ie.length(),ie)},$.prototype.bool=function(te){return this._push(M,1,te?1:0)};function Q(Y,te,ie){te[ie]=Y&255,te[ie+1]=Y>>>8&255,te[ie+2]=Y>>>16&255,te[ie+3]=Y>>>24}$.prototype.fixed32=function(te){return this._push(Q,4,te>>>0)},$.prototype.sfixed32=$.prototype.fixed32,$.prototype.fixed64=function(te){var ie=I.from(te);return this._push(Q,4,ie.lo)._push(Q,4,ie.hi)},$.prototype.sfixed64=$.prototype.fixed64,$.prototype.float=function(te){return this._push(O.float.writeFloatLE,4,te)},$.prototype.double=function(te){return this._push(O.float.writeDoubleLE,8,te)};var ee=O.Array.prototype.set?function(te,ie,ye){ie.set(te,ye)}:function(te,ie,ye){for(var re=0;re<te.length;++re)ie[ye+re]=te[re]};return $.prototype.bytes=function(te){var ie=te.length>>>0;if(!ie)return this._push(M,1,0);if(O.isString(te)){var ye=$.alloc(ie=D.length(te));D.decode(te,ye,0),te=ye}return this.uint32(ie)._push(ee,ie,te)},$.prototype.string=function(te){var ie=f.length(te);return ie?this.uint32(ie)._push(f.write,ie,te):this._push(M,1,0)},$.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new k(i,0,0),this.len=0,this},$.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 k(i,0,0),this.len=0),this},$.prototype.ldelim=function(){var te=this.head,ie=this.tail,ye=this.len;return this.reset().uint32(ye),ye&&(this.tail.next=te.next,this.tail=ie,this.len+=ye),this},$.prototype.finish=function(){for(var te=this.head.next,ie=this.constructor.alloc(this.len),ye=0;te;)te.fn(te.val,ie,ye),ye+=te.len,te=te.next;return ie},$._configure=function(Y){N=Y,$.create=C(),N._configure()},writer}var writer_buffer,hasRequiredWriter_buffer;function requireWriter_buffer(){if(hasRequiredWriter_buffer)return writer_buffer;hasRequiredWriter_buffer=1,writer_buffer=I;var O=requireWriter();(I.prototype=Object.create(O.prototype)).constructor=I;var N=requireMinimal$1();function I(){O.call(this)}I._configure=function(){I.alloc=N._Buffer_allocUnsafe,I.writeBytesBuffer=N.Buffer&&N.Buffer.prototype instanceof Uint8Array&&N.Buffer.prototype.set.name==="set"?function(k,i,c){i.set(k,c)}:function(k,i,c){if(k.copy)k.copy(i,c,0,k.length);else for(var $=0;$<k.length;)i[c++]=k[$++]}},I.prototype.bytes=function(k){N.isString(k)&&(k=N._Buffer_from(k,"base64"));var i=k.length>>>0;return this.uint32(i),i&&this._push(I.writeBytesBuffer,i,k),this};function D(f,k,i){f.length<40?N.utf8.write(f,k,i):k.utf8Write?k.utf8Write(f,i):k.write(f,i)}return I.prototype.string=function(k){var i=N.Buffer.byteLength(k);return this.uint32(i),i&&this._push(D,i,k),this},I._configure(),writer_buffer}var reader,hasRequiredReader;function requireReader(){if(hasRequiredReader)return reader;hasRequiredReader=1,reader=k;var O=requireMinimal$1(),N,I=O.LongBits,D=O.utf8;function f(Z,J){return RangeError("index out of range: "+Z.pos+" + "+(J||1)+" > "+Z.len)}function k(Z){this.buf=Z,this.pos=0,this.len=Z.length}var i=typeof Uint8Array<"u"?function(J){if(J instanceof Uint8Array||Array.isArray(J))return new k(J);throw Error("illegal buffer")}:function(J){if(Array.isArray(J))return new k(J);throw Error("illegal buffer")},c=function(){return O.Buffer?function(z){return(k.create=function(ee){return O.Buffer.isBuffer(ee)?new N(ee):i(ee)})(z)}:i};k.create=c(),k.prototype._slice=O.Array.prototype.subarray||O.Array.prototype.slice,k.prototype.uint32=function(){var J=4294967295;return function(){if(J=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(J=(J|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(J=(J|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(J=(J|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(J=(J|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return J;if((this.pos+=5)>this.len)throw this.pos=this.len,f(this,10);return J}}(),k.prototype.int32=function(){return this.uint32()|0},k.prototype.sint32=function(){var J=this.uint32();return J>>>1^-(J&1)|0};function $(){var Z=new I(0,0),J=0;if(this.len-this.pos>4){for(;J<4;++J)if(Z.lo=(Z.lo|(this.buf[this.pos]&127)<<J*7)>>>0,this.buf[this.pos++]<128)return Z;if(Z.lo=(Z.lo|(this.buf[this.pos]&127)<<28)>>>0,Z.hi=(Z.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return Z;J=0}else{for(;J<3;++J){if(this.pos>=this.len)throw f(this);if(Z.lo=(Z.lo|(this.buf[this.pos]&127)<<J*7)>>>0,this.buf[this.pos++]<128)return Z}return Z.lo=(Z.lo|(this.buf[this.pos++]&127)<<J*7)>>>0,Z}if(this.len-this.pos>4){for(;J<5;++J)if(Z.hi=(Z.hi|(this.buf[this.pos]&127)<<J*7+3)>>>0,this.buf[this.pos++]<128)return Z}else for(;J<5;++J){if(this.pos>=this.len)throw f(this);if(Z.hi=(Z.hi|(this.buf[this.pos]&127)<<J*7+3)>>>0,this.buf[this.pos++]<128)return Z}throw Error("invalid varint encoding")}k.prototype.bool=function(){return this.uint32()!==0};function C(Z,J){return(Z[J-4]|Z[J-3]<<8|Z[J-2]<<16|Z[J-1]<<24)>>>0}k.prototype.fixed32=function(){if(this.pos+4>this.len)throw f(this,4);return C(this.buf,this.pos+=4)},k.prototype.sfixed32=function(){if(this.pos+4>this.len)throw f(this,4);return C(this.buf,this.pos+=4)|0};function M(){if(this.pos+8>this.len)throw f(this,8);return new I(C(this.buf,this.pos+=4),C(this.buf,this.pos+=4))}return k.prototype.float=function(){if(this.pos+4>this.len)throw f(this,4);var J=O.float.readFloatLE(this.buf,this.pos);return this.pos+=4,J},k.prototype.double=function(){if(this.pos+8>this.len)throw f(this,4);var J=O.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,J},k.prototype.bytes=function(){var J=this.uint32(),z=this.pos,Q=this.pos+J;if(Q>this.len)throw f(this,J);if(this.pos+=J,Array.isArray(this.buf))return this.buf.slice(z,Q);if(z===Q){var ee=O.Buffer;return ee?ee.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,z,Q)},k.prototype.string=function(){var J=this.bytes();return D.read(J,0,J.length)},k.prototype.skip=function(J){if(typeof J=="number"){if(this.pos+J>this.len)throw f(this,J);this.pos+=J}else do if(this.pos>=this.len)throw f(this);while(this.buf[this.pos++]&128);return this},k.prototype.skipType=function(Z){switch(Z){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(Z=this.uint32()&7)!==4;)this.skipType(Z);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+Z+" at offset "+this.pos)}return this},k._configure=function(Z){N=Z,k.create=c(),N._configure();var J=O.Long?"toLong":"toNumber";O.merge(k.prototype,{int64:function(){return $.call(this)[J](!1)},uint64:function(){return $.call(this)[J](!0)},sint64:function(){return $.call(this).zzDecode()[J](!1)},fixed64:function(){return M.call(this)[J](!0)},sfixed64:function(){return M.call(this)[J](!1)}})},reader}var reader_buffer,hasRequiredReader_buffer;function requireReader_buffer(){if(hasRequiredReader_buffer)return reader_buffer;hasRequiredReader_buffer=1,reader_buffer=I;var O=requireReader();(I.prototype=Object.create(O.prototype)).constructor=I;var N=requireMinimal$1();function I(D){O.call(this,D)}return I._configure=function(){N.Buffer&&(I.prototype._slice=N.Buffer.prototype.slice)},I.prototype.string=function(){var f=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+f,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+f,this.len))},I._configure(),reader_buffer}var rpc={},service,hasRequiredService;function requireService(){if(hasRequiredService)return service;hasRequiredService=1,service=N;var O=requireMinimal$1();(N.prototype=Object.create(O.EventEmitter.prototype)).constructor=N;function N(I,D,f){if(typeof I!="function")throw TypeError("rpcImpl must be a function");O.EventEmitter.call(this),this.rpcImpl=I,this.requestDelimited=!!D,this.responseDelimited=!!f}return N.prototype.rpcCall=function I(D,f,k,i,c){if(!i)throw TypeError("request must be specified");var $=this;if(!c)return O.asPromise(I,$,D,f,k,i);if(!$.rpcImpl){setTimeout(function(){c(Error("already ended"))},0);return}try{return $.rpcImpl(D,f[$.requestDelimited?"encodeDelimited":"encode"](i).finish(),function(M,Z){if(M)return $.emit("error",M,D),c(M);if(Z===null){$.end(!0);return}if(!(Z instanceof k))try{Z=k[$.responseDelimited?"decodeDelimited":"decode"](Z)}catch(J){return $.emit("error",J,D),c(J)}return $.emit("data",Z,D),c(null,Z)})}catch(C){$.emit("error",C,D),setTimeout(function(){c(C)},0);return}},N.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(O){var N=O;N.Service=requireService()}(rpc)),rpc}var roots,hasRequiredRoots;function requireRoots(){return hasRequiredRoots||(hasRequiredRoots=1,roots={}),roots}var hasRequiredIndexMinimal;function requireIndexMinimal(){return hasRequiredIndexMinimal||(hasRequiredIndexMinimal=1,function(O){var N=O;N.build="minimal",N.Writer=requireWriter(),N.BufferWriter=requireWriter_buffer(),N.Reader=requireReader(),N.BufferReader=requireReader_buffer(),N.util=requireMinimal$1(),N.rpc=requireRpc(),N.roots=requireRoots(),N.configure=I;function I(){N.util._configure(),N.Writer._configure(N.BufferWriter),N.Reader._configure(N.BufferReader)}I()}(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 O={};return O.quick=function(){const N={};return N.voice=function(){const I={};return I.proto=function(){const D={};return D.CommonReq=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.event="",f.prototype.data=$util.newBuffer([]),f.prototype.sn=$util.Long?$util.Long.fromBits(0,0,!1):0,f.prototype.time=$util.Long?$util.Long.fromBits(0,0,!1):0,f.prototype.valid=$util.Long?$util.Long.fromBits(0,0,!1):0,f.prototype.version=0,f.prototype.compress=!1,f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.event!=null&&Object.hasOwnProperty.call(i,"event")&&c.uint32(10).string(i.event),i.data!=null&&Object.hasOwnProperty.call(i,"data")&&c.uint32(18).bytes(i.data),i.sn!=null&&Object.hasOwnProperty.call(i,"sn")&&c.uint32(24).int64(i.sn),i.time!=null&&Object.hasOwnProperty.call(i,"time")&&c.uint32(32).int64(i.time),i.valid!=null&&Object.hasOwnProperty.call(i,"valid")&&c.uint32(40).int64(i.valid),i.version!=null&&Object.hasOwnProperty.call(i,"version")&&c.uint32(48).int32(i.version),i.compress!=null&&Object.hasOwnProperty.call(i,"compress")&&c.uint32(56).bool(i.compress),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.CommonReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.event=i.string();break}case 2:{C.data=i.bytes();break}case 3:{C.sn=i.int64();break}case 4:{C.time=i.int64();break}case 5:{C.valid=i.int64();break}case 6:{C.version=i.int32();break}case 7:{C.compress=i.bool();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.event!=null&&i.hasOwnProperty("event")&&!$util.isString(i.event)?"event: string expected":i.data!=null&&i.hasOwnProperty("data")&&!(i.data&&typeof i.data.length=="number"||$util.isString(i.data))?"data: buffer expected":i.sn!=null&&i.hasOwnProperty("sn")&&!$util.isInteger(i.sn)&&!(i.sn&&$util.isInteger(i.sn.low)&&$util.isInteger(i.sn.high))?"sn: integer|Long expected":i.time!=null&&i.hasOwnProperty("time")&&!$util.isInteger(i.time)&&!(i.time&&$util.isInteger(i.time.low)&&$util.isInteger(i.time.high))?"time: integer|Long expected":i.valid!=null&&i.hasOwnProperty("valid")&&!$util.isInteger(i.valid)&&!(i.valid&&$util.isInteger(i.valid.low)&&$util.isInteger(i.valid.high))?"valid: integer|Long expected":i.version!=null&&i.hasOwnProperty("version")&&!$util.isInteger(i.version)?"version: integer expected":i.compress!=null&&i.hasOwnProperty("compress")&&typeof i.compress!="boolean"?"compress: boolean expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.CommonReq)return i;let c=new $root.com.quick.voice.proto.CommonReq;return i.event!=null&&(c.event=String(i.event)),i.data!=null&&(typeof i.data=="string"?$util.base64.decode(i.data,c.data=$util.newBuffer($util.base64.length(i.data)),0):i.data.length>=0&&(c.data=i.data)),i.sn!=null&&($util.Long?(c.sn=$util.Long.fromValue(i.sn)).unsigned=!1:typeof i.sn=="string"?c.sn=parseInt(i.sn,10):typeof i.sn=="number"?c.sn=i.sn:typeof i.sn=="object"&&(c.sn=new $util.LongBits(i.sn.low>>>0,i.sn.high>>>0).toNumber())),i.time!=null&&($util.Long?(c.time=$util.Long.fromValue(i.time)).unsigned=!1:typeof i.time=="string"?c.time=parseInt(i.time,10):typeof i.time=="number"?c.time=i.time:typeof i.time=="object"&&(c.time=new $util.LongBits(i.time.low>>>0,i.time.high>>>0).toNumber())),i.valid!=null&&($util.Long?(c.valid=$util.Long.fromValue(i.valid)).unsigned=!1:typeof i.valid=="string"?c.valid=parseInt(i.valid,10):typeof i.valid=="number"?c.valid=i.valid:typeof i.valid=="object"&&(c.valid=new $util.LongBits(i.valid.low>>>0,i.valid.high>>>0).toNumber())),i.version!=null&&(c.version=i.version|0),i.compress!=null&&(c.compress=!!i.compress),c},f.toObject=function(i,c){c||(c={});let $={};if(c.defaults){if($.event="",c.bytes===String?$.data="":($.data=[],c.bytes!==Array&&($.data=$util.newBuffer($.data))),$util.Long){let C=new $util.Long(0,0,!1);$.sn=c.longs===String?C.toString():c.longs===Number?C.toNumber():C}else $.sn=c.longs===String?"0":0;if($util.Long){let C=new $util.Long(0,0,!1);$.time=c.longs===String?C.toString():c.longs===Number?C.toNumber():C}else $.time=c.longs===String?"0":0;if($util.Long){let C=new $util.Long(0,0,!1);$.valid=c.longs===String?C.toString():c.longs===Number?C.toNumber():C}else $.valid=c.longs===String?"0":0;$.version=0,$.compress=!1}return i.event!=null&&i.hasOwnProperty("event")&&($.event=i.event),i.data!=null&&i.hasOwnProperty("data")&&($.data=c.bytes===String?$util.base64.encode(i.data,0,i.data.length):c.bytes===Array?Array.prototype.slice.call(i.data):i.data),i.sn!=null&&i.hasOwnProperty("sn")&&(typeof i.sn=="number"?$.sn=c.longs===String?String(i.sn):i.sn:$.sn=c.longs===String?$util.Long.prototype.toString.call(i.sn):c.longs===Number?new $util.LongBits(i.sn.low>>>0,i.sn.high>>>0).toNumber():i.sn),i.time!=null&&i.hasOwnProperty("time")&&(typeof i.time=="number"?$.time=c.longs===String?String(i.time):i.time:$.time=c.longs===String?$util.Long.prototype.toString.call(i.time):c.longs===Number?new $util.LongBits(i.time.low>>>0,i.time.high>>>0).toNumber():i.time),i.valid!=null&&i.hasOwnProperty("valid")&&(typeof i.valid=="number"?$.valid=c.longs===String?String(i.valid):i.valid:$.valid=c.longs===String?$util.Long.prototype.toString.call(i.valid):c.longs===Number?new $util.LongBits(i.valid.low>>>0,i.valid.high>>>0).toNumber():i.valid),i.version!=null&&i.hasOwnProperty("version")&&($.version=i.version),i.compress!=null&&i.hasOwnProperty("compress")&&($.compress=i.compress),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.CommonReq"},f}(),D.CommonRsp=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.event="",f.prototype.data=$util.newBuffer([]),f.prototype.sn=$util.Long?$util.Long.fromBits(0,0,!1):0,f.prototype.time=$util.Long?$util.Long.fromBits(0,0,!1):0,f.prototype.valid=$util.Long?$util.Long.fromBits(0,0,!1):0,f.prototype.code=0,f.prototype.desc="",f.prototype.version=0,f.prototype.compress=!1,f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.event!=null&&Object.hasOwnProperty.call(i,"event")&&c.uint32(10).string(i.event),i.data!=null&&Object.hasOwnProperty.call(i,"data")&&c.uint32(18).bytes(i.data),i.sn!=null&&Object.hasOwnProperty.call(i,"sn")&&c.uint32(24).int64(i.sn),i.time!=null&&Object.hasOwnProperty.call(i,"time")&&c.uint32(32).int64(i.time),i.valid!=null&&Object.hasOwnProperty.call(i,"valid")&&c.uint32(40).int64(i.valid),i.code!=null&&Object.hasOwnProperty.call(i,"code")&&c.uint32(48).int32(i.code),i.desc!=null&&Object.hasOwnProperty.call(i,"desc")&&c.uint32(58).string(i.desc),i.version!=null&&Object.hasOwnProperty.call(i,"version")&&c.uint32(64).int32(i.version),i.compress!=null&&Object.hasOwnProperty.call(i,"compress")&&c.uint32(72).bool(i.compress),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.CommonRsp;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.event=i.string();break}case 2:{C.data=i.bytes();break}case 3:{C.sn=i.int64();break}case 4:{C.time=i.int64();break}case 5:{C.valid=i.int64();break}case 6:{C.code=i.int32();break}case 7:{C.desc=i.string();break}case 8:{C.version=i.int32();break}case 9:{C.compress=i.bool();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.event!=null&&i.hasOwnProperty("event")&&!$util.isString(i.event)?"event: string expected":i.data!=null&&i.hasOwnProperty("data")&&!(i.data&&typeof i.data.length=="number"||$util.isString(i.data))?"data: buffer expected":i.sn!=null&&i.hasOwnProperty("sn")&&!$util.isInteger(i.sn)&&!(i.sn&&$util.isInteger(i.sn.low)&&$util.isInteger(i.sn.high))?"sn: integer|Long expected":i.time!=null&&i.hasOwnProperty("time")&&!$util.isInteger(i.time)&&!(i.time&&$util.isInteger(i.time.low)&&$util.isInteger(i.time.high))?"time: integer|Long expected":i.valid!=null&&i.hasOwnProperty("valid")&&!$util.isInteger(i.valid)&&!(i.valid&&$util.isInteger(i.valid.low)&&$util.isInteger(i.valid.high))?"valid: integer|Long expected":i.code!=null&&i.hasOwnProperty("code")&&!$util.isInteger(i.code)?"code: integer expected":i.desc!=null&&i.hasOwnProperty("desc")&&!$util.isString(i.desc)?"desc: string expected":i.version!=null&&i.hasOwnProperty("version")&&!$util.isInteger(i.version)?"version: integer expected":i.compress!=null&&i.hasOwnProperty("compress")&&typeof i.compress!="boolean"?"compress: boolean expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.CommonRsp)return i;let c=new $root.com.quick.voice.proto.CommonRsp;return i.event!=null&&(c.event=String(i.event)),i.data!=null&&(typeof i.data=="string"?$util.base64.decode(i.data,c.data=$util.newBuffer($util.base64.length(i.data)),0):i.data.length>=0&&(c.data=i.data)),i.sn!=null&&($util.Long?(c.sn=$util.Long.fromValue(i.sn)).unsigned=!1:typeof i.sn=="string"?c.sn=parseInt(i.sn,10):typeof i.sn=="number"?c.sn=i.sn:typeof i.sn=="object"&&(c.sn=new $util.LongBits(i.sn.low>>>0,i.sn.high>>>0).toNumber())),i.time!=null&&($util.Long?(c.time=$util.Long.fromValue(i.time)).unsigned=!1:typeof i.time=="string"?c.time=parseInt(i.time,10):typeof i.time=="number"?c.time=i.time:typeof i.time=="object"&&(c.time=new $util.LongBits(i.time.low>>>0,i.time.high>>>0).toNumber())),i.valid!=null&&($util.Long?(c.valid=$util.Long.fromValue(i.valid)).unsigned=!1:typeof i.valid=="string"?c.valid=parseInt(i.valid,10):typeof i.valid=="number"?c.valid=i.valid:typeof i.valid=="object"&&(c.valid=new $util.LongBits(i.valid.low>>>0,i.valid.high>>>0).toNumber())),i.code!=null&&(c.code=i.code|0),i.desc!=null&&(c.desc=String(i.desc)),i.version!=null&&(c.version=i.version|0),i.compress!=null&&(c.compress=!!i.compress),c},f.toObject=function(i,c){c||(c={});let $={};if(c.defaults){if($.event="",c.bytes===String?$.data="":($.data=[],c.bytes!==Array&&($.data=$util.newBuffer($.data))),$util.Long){let C=new $util.Long(0,0,!1);$.sn=c.longs===String?C.toString():c.longs===Number?C.toNumber():C}else $.sn=c.longs===String?"0":0;if($util.Long){let C=new $util.Long(0,0,!1);$.time=c.longs===String?C.toString():c.longs===Number?C.toNumber():C}else $.time=c.longs===String?"0":0;if($util.Long){let C=new $util.Long(0,0,!1);$.valid=c.longs===String?C.toString():c.longs===Number?C.toNumber():C}else $.valid=c.longs===String?"0":0;$.code=0,$.desc="",$.version=0,$.compress=!1}return i.event!=null&&i.hasOwnProperty("event")&&($.event=i.event),i.data!=null&&i.hasOwnProperty("data")&&($.data=c.bytes===String?$util.base64.encode(i.data,0,i.data.length):c.bytes===Array?Array.prototype.slice.call(i.data):i.data),i.sn!=null&&i.hasOwnProperty("sn")&&(typeof i.sn=="number"?$.sn=c.longs===String?String(i.sn):i.sn:$.sn=c.longs===String?$util.Long.prototype.toString.call(i.sn):c.longs===Number?new $util.LongBits(i.sn.low>>>0,i.sn.high>>>0).toNumber():i.sn),i.time!=null&&i.hasOwnProperty("time")&&(typeof i.time=="number"?$.time=c.longs===String?String(i.time):i.time:$.time=c.longs===String?$util.Long.prototype.toString.call(i.time):c.longs===Number?new $util.LongBits(i.time.low>>>0,i.time.high>>>0).toNumber():i.time),i.valid!=null&&i.hasOwnProperty("valid")&&(typeof i.valid=="number"?$.valid=c.longs===String?String(i.valid):i.valid:$.valid=c.longs===String?$util.Long.prototype.toString.call(i.valid):c.longs===Number?new $util.LongBits(i.valid.low>>>0,i.valid.high>>>0).toNumber():i.valid),i.code!=null&&i.hasOwnProperty("code")&&($.code=i.code),i.desc!=null&&i.hasOwnProperty("desc")&&($.desc=i.desc),i.version!=null&&i.hasOwnProperty("version")&&($.version=i.version),i.compress!=null&&i.hasOwnProperty("compress")&&($.compress=i.compress),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.CommonRsp"},f}(),D.User=function(){function f(i){if(this.tracks=[],i)for(let c=Object.keys(i),$=0;$<c.length;++$)i[c[$]]!=null&&(this[c[$]]=i[c[$]])}f.prototype.id="",f.prototype.callAction=null,f.prototype.callState=null,f.prototype.joinTime=null,f.prototype.tracks=$util.emptyArray,f.prototype.permissions=null,f.prototype.isPublished=null,f.prototype.behavior=null,f.prototype.channelCache=null;let k;return Object.defineProperty(f.prototype,"_callAction",{get:$util.oneOfGetter(k=["callAction"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_callState",{get:$util.oneOfGetter(k=["callState"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_joinTime",{get:$util.oneOfGetter(k=["joinTime"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_permissions",{get:$util.oneOfGetter(k=["permissions"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_isPublished",{get:$util.oneOfGetter(k=["isPublished"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_behavior",{get:$util.oneOfGetter(k=["behavior"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_channelCache",{get:$util.oneOfGetter(k=["channelCache"]),set:$util.oneOfSetter(k)}),f.create=function(c){return new f(c)},f.encode=function(c,$){if($||($=$Writer.create()),c.id!=null&&Object.hasOwnProperty.call(c,"id")&&$.uint32(10).string(c.id),c.callAction!=null&&Object.hasOwnProperty.call(c,"callAction")&&$.uint32(16).int32(c.callAction),c.callState!=null&&Object.hasOwnProperty.call(c,"callState")&&$.uint32(24).int32(c.callState),c.joinTime!=null&&Object.hasOwnProperty.call(c,"joinTime")&&$.uint32(32).int64(c.joinTime),c.tracks!=null&&c.tracks.length)for(let C=0;C<c.tracks.length;++C)$root.com.quick.voice.proto.Track.encode(c.tracks[C],$.uint32(42).fork()).ldelim();return c.permissions!=null&&Object.hasOwnProperty.call(c,"permissions")&&$.uint32(48).int32(c.permissions),c.isPublished!=null&&Object.hasOwnProperty.call(c,"isPublished")&&$.uint32(56).bool(c.isPublished),c.behavior!=null&&Object.hasOwnProperty.call(c,"behavior")&&$.uint32(64).int32(c.behavior),c.channelCache!=null&&Object.hasOwnProperty.call(c,"channelCache")&&$root.com.quick.voice.proto.DataChannelCacheInfo.encode(c.channelCache,$.uint32(74).fork()).ldelim(),$},f.encodeDelimited=function(c,$){return this.encode(c,$).ldelim()},f.decode=function(c,$){c instanceof $Reader||(c=$Reader.create(c));let C=$===void 0?c.len:c.pos+$,M=new $root.com.quick.voice.proto.User;for(;c.pos<C;){let Z=c.uint32();switch(Z>>>3){case 1:{M.id=c.string();break}case 2:{M.callAction=c.int32();break}case 3:{M.callState=c.int32();break}case 4:{M.joinTime=c.int64();break}case 5:{M.tracks&&M.tracks.length||(M.tracks=[]),M.tracks.push($root.com.quick.voice.proto.Track.decode(c,c.uint32()));break}case 6:{M.permissions=c.int32();break}case 7:{M.isPublished=c.bool();break}case 8:{M.behavior=c.int32();break}case 9:{M.channelCache=$root.com.quick.voice.proto.DataChannelCacheInfo.decode(c,c.uint32());break}default:c.skipType(Z&7);break}}return M},f.decodeDelimited=function(c){return c instanceof $Reader||(c=new $Reader(c)),this.decode(c,c.uint32())},f.verify=function(c){if(typeof c!="object"||c===null)return"object expected";if(c.id!=null&&c.hasOwnProperty("id")&&!$util.isString(c.id))return"id: string expected";if(c.callAction!=null&&c.hasOwnProperty("callAction")&&!$util.isInteger(c.callAction))return"callAction: integer expected";if(c.callState!=null&&c.hasOwnProperty("callState")&&!$util.isInteger(c.callState))return"callState: integer expected";if(c.joinTime!=null&&c.hasOwnProperty("joinTime")&&!$util.isInteger(c.joinTime)&&!(c.joinTime&&$util.isInteger(c.joinTime.low)&&$util.isInteger(c.joinTime.high)))return"joinTime: integer|Long expected";if(c.tracks!=null&&c.hasOwnProperty("tracks")){if(!Array.isArray(c.tracks))return"tracks: array expected";for(let $=0;$<c.tracks.length;++$){let C=$root.com.quick.voice.proto.Track.verify(c.tracks[$]);if(C)return"tracks."+C}}if(c.permissions!=null&&c.hasOwnProperty("permissions")&&!$util.isInteger(c.permissions))return"permissions: integer expected";if(c.isPublished!=null&&c.hasOwnProperty("isPublished")&&typeof c.isPublished!="boolean")return"isPublished: boolean expected";if(c.behavior!=null&&c.hasOwnProperty("behavior")&&!$util.isInteger(c.behavior))return"behavior: integer expected";if(c.channelCache!=null&&c.hasOwnProperty("channelCache")){let $=$root.com.quick.voice.proto.DataChannelCacheInfo.verify(c.channelCache);if($)return"channelCache."+$}return null},f.fromObject=function(c){if(c instanceof $root.com.quick.voice.proto.User)return c;let $=new $root.com.quick.voice.proto.User;if(c.id!=null&&($.id=String(c.id)),c.callAction!=null&&($.callAction=c.callAction|0),c.callState!=null&&($.callState=c.callState|0),c.joinTime!=null&&($util.Long?($.joinTime=$util.Long.fromValue(c.joinTime)).unsigned=!1:typeof c.joinTime=="string"?$.joinTime=parseInt(c.joinTime,10):typeof c.joinTime=="number"?$.joinTime=c.joinTime:typeof c.joinTime=="object"&&($.joinTime=new $util.LongBits(c.joinTime.low>>>0,c.joinTime.high>>>0).toNumber())),c.tracks){if(!Array.isArray(c.tracks))throw TypeError(".com.quick.voice.proto.User.tracks: array expected");$.tracks=[];for(let C=0;C<c.tracks.length;++C){if(typeof c.tracks[C]!="object")throw TypeError(".com.quick.voice.proto.User.tracks: object expected");$.tracks[C]=$root.com.quick.voice.proto.Track.fromObject(c.tracks[C])}}if(c.permissions!=null&&($.permissions=c.permissions|0),c.isPublished!=null&&($.isPublished=!!c.isPublished),c.behavior!=null&&($.behavior=c.behavior|0),c.channelCache!=null){if(typeof c.channelCache!="object")throw TypeError(".com.quick.voice.proto.User.channelCache: object expected");$.channelCache=$root.com.quick.voice.proto.DataChannelCacheInfo.fromObject(c.channelCache)}return $},f.toObject=function(c,$){$||($={});let C={};if(($.arrays||$.defaults)&&(C.tracks=[]),$.defaults&&(C.id=""),c.id!=null&&c.hasOwnProperty("id")&&(C.id=c.id),c.callAction!=null&&c.hasOwnProperty("callAction")&&(C.callAction=c.callAction,$.oneofs&&(C._callAction="callAction")),c.callState!=null&&c.hasOwnProperty("callState")&&(C.callState=c.callState,$.oneofs&&(C._callState="callState")),c.joinTime!=null&&c.hasOwnProperty("joinTime")&&(typeof c.joinTime=="number"?C.joinTime=$.longs===String?String(c.joinTime):c.joinTime:C.joinTime=$.longs===String?$util.Long.prototype.toString.call(c.joinTime):$.longs===Number?new $util.LongBits(c.joinTime.low>>>0,c.joinTime.high>>>0).toNumber():c.joinTime,$.oneofs&&(C._joinTime="joinTime")),c.tracks&&c.tracks.length){C.tracks=[];for(let M=0;M<c.tracks.length;++M)C.tracks[M]=$root.com.quick.voice.proto.Track.toObject(c.tracks[M],$)}return c.permissions!=null&&c.hasOwnProperty("permissions")&&(C.permissions=c.permissions,$.oneofs&&(C._permissions="permissions")),c.isPublished!=null&&c.hasOwnProperty("isPublished")&&(C.isPublished=c.isPublished,$.oneofs&&(C._isPublished="isPublished")),c.behavior!=null&&c.hasOwnProperty("behavior")&&(C.behavior=c.behavior,$.oneofs&&(C._behavior="behavior")),c.channelCache!=null&&c.hasOwnProperty("channelCache")&&(C.channelCache=$root.com.quick.voice.proto.DataChannelCacheInfo.toObject(c.channelCache,$),$.oneofs&&(C._channelCache="channelCache")),C},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(c){return c===void 0&&(c="type.googleapis.com"),c+"/com.quick.voice.proto.User"},f}(),D.DataChannelCacheInfo=function(){function f(k){if(this.channels=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.channels=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.channels!=null&&i.channels.length)for(let $=0;$<i.channels.length;++$)$root.com.quick.voice.proto.DataChannel.encode(i.channels[$],c.uint32(10).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.DataChannelCacheInfo;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.channels&&C.channels.length||(C.channels=[]),C.channels.push($root.com.quick.voice.proto.DataChannel.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.channels!=null&&i.hasOwnProperty("channels")){if(!Array.isArray(i.channels))return"channels: array expected";for(let c=0;c<i.channels.length;++c){let $=$root.com.quick.voice.proto.DataChannel.verify(i.channels[c]);if($)return"channels."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.DataChannelCacheInfo)return i;let c=new $root.com.quick.voice.proto.DataChannelCacheInfo;if(i.channels){if(!Array.isArray(i.channels))throw TypeError(".com.quick.voice.proto.DataChannelCacheInfo.channels: array expected");c.channels=[];for(let $=0;$<i.channels.length;++$){if(typeof i.channels[$]!="object")throw TypeError(".com.quick.voice.proto.DataChannelCacheInfo.channels: object expected");c.channels[$]=$root.com.quick.voice.proto.DataChannel.fromObject(i.channels[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.channels=[]),i.channels&&i.channels.length){$.channels=[];for(let C=0;C<i.channels.length;++C)$.channels[C]=$root.com.quick.voice.proto.DataChannel.toObject(i.channels[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.DataChannelCacheInfo"},f}(),D.DataChannel=function(){function f(i){if(i)for(let c=Object.keys(i),$=0;$<c.length;++$)i[c[$]]!=null&&(this[c[$]]=i[c[$]])}f.prototype.dataChannelName="",f.prototype.id=null;let k;return Object.defineProperty(f.prototype,"_id",{get:$util.oneOfGetter(k=["id"]),set:$util.oneOfSetter(k)}),f.create=function(c){return new f(c)},f.encode=function(c,$){return $||($=$Writer.create()),c.dataChannelName!=null&&Object.hasOwnProperty.call(c,"dataChannelName")&&$.uint32(10).string(c.dataChannelName),c.id!=null&&Object.hasOwnProperty.call(c,"id")&&$.uint32(16).int32(c.id),$},f.encodeDelimited=function(c,$){return this.encode(c,$).ldelim()},f.decode=function(c,$){c instanceof $Reader||(c=$Reader.create(c));let C=$===void 0?c.len:c.pos+$,M=new $root.com.quick.voice.proto.DataChannel;for(;c.pos<C;){let Z=c.uint32();switch(Z>>>3){case 1:{M.dataChannelName=c.string();break}case 2:{M.id=c.int32();break}default:c.skipType(Z&7);break}}return M},f.decodeDelimited=function(c){return c instanceof $Reader||(c=new $Reader(c)),this.decode(c,c.uint32())},f.verify=function(c){return typeof c!="object"||c===null?"object expected":c.dataChannelName!=null&&c.hasOwnProperty("dataChannelName")&&!$util.isString(c.dataChannelName)?"dataChannelName: string expected":c.id!=null&&c.hasOwnProperty("id")&&!$util.isInteger(c.id)?"id: integer expected":null},f.fromObject=function(c){if(c instanceof $root.com.quick.voice.proto.DataChannel)return c;let $=new $root.com.quick.voice.proto.DataChannel;return c.dataChannelName!=null&&($.dataChannelName=String(c.dataChannelName)),c.id!=null&&($.id=c.id|0),$},f.toObject=function(c,$){$||($={});let C={};return $.defaults&&(C.dataChannelName=""),c.dataChannelName!=null&&c.hasOwnProperty("dataChannelName")&&(C.dataChannelName=c.dataChannelName),c.id!=null&&c.hasOwnProperty("id")&&(C.id=c.id,$.oneofs&&(C._id="id")),C},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(c){return c===void 0&&(c="type.googleapis.com"),c+"/com.quick.voice.proto.DataChannel"},f}(),D.Login=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.appid="",f.prototype.userId="",f.prototype.sdkToken="",f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.appid!=null&&Object.hasOwnProperty.call(i,"appid")&&c.uint32(10).string(i.appid),i.userId!=null&&Object.hasOwnProperty.call(i,"userId")&&c.uint32(18).string(i.userId),i.sdkToken!=null&&Object.hasOwnProperty.call(i,"sdkToken")&&c.uint32(26).string(i.sdkToken),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.Login;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.appid=i.string();break}case 2:{C.userId=i.string();break}case 3:{C.sdkToken=i.string();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.appid!=null&&i.hasOwnProperty("appid")&&!$util.isString(i.appid)?"appid: string expected":i.userId!=null&&i.hasOwnProperty("userId")&&!$util.isString(i.userId)?"userId: string expected":i.sdkToken!=null&&i.hasOwnProperty("sdkToken")&&!$util.isString(i.sdkToken)?"sdkToken: string expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.Login)return i;let c=new $root.com.quick.voice.proto.Login;return i.appid!=null&&(c.appid=String(i.appid)),i.userId!=null&&(c.userId=String(i.userId)),i.sdkToken!=null&&(c.sdkToken=String(i.sdkToken)),c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.appid="",$.userId="",$.sdkToken=""),i.appid!=null&&i.hasOwnProperty("appid")&&($.appid=i.appid),i.userId!=null&&i.hasOwnProperty("userId")&&($.userId=i.userId),i.sdkToken!=null&&i.hasOwnProperty("sdkToken")&&($.sdkToken=i.sdkToken),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.Login"},f}(),D.Track=function(){function f(i){if(i)for(let c=Object.keys(i),$=0;$<c.length;++$)i[c[$]]!=null&&(this[c[$]]=i[c[$]])}f.prototype.mid="",f.prototype.trackName=null,f.prototype.location=null,f.prototype.userId=null,f.prototype.code=null,f.prototype.desc=null,f.prototype.type=null,f.prototype.isValid=null,f.prototype.simulcast=null;let k;return Object.defineProperty(f.prototype,"_trackName",{get:$util.oneOfGetter(k=["trackName"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_location",{get:$util.oneOfGetter(k=["location"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_userId",{get:$util.oneOfGetter(k=["userId"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_code",{get:$util.oneOfGetter(k=["code"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_desc",{get:$util.oneOfGetter(k=["desc"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_type",{get:$util.oneOfGetter(k=["type"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_isValid",{get:$util.oneOfGetter(k=["isValid"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_simulcast",{get:$util.oneOfGetter(k=["simulcast"]),set:$util.oneOfSetter(k)}),f.create=function(c){return new f(c)},f.encode=function(c,$){return $||($=$Writer.create()),c.mid!=null&&Object.hasOwnProperty.call(c,"mid")&&$.uint32(10).string(c.mid),c.trackName!=null&&Object.hasOwnProperty.call(c,"trackName")&&$.uint32(18).string(c.trackName),c.location!=null&&Object.hasOwnProperty.call(c,"location")&&$.uint32(26).string(c.location),c.userId!=null&&Object.hasOwnProperty.call(c,"userId")&&$.uint32(34).string(c.userId),c.code!=null&&Object.hasOwnProperty.call(c,"code")&&$.uint32(40).int32(c.code),c.desc!=null&&Object.hasOwnProperty.call(c,"desc")&&$.uint32(50).string(c.desc),c.type!=null&&Object.hasOwnProperty.call(c,"type")&&$.uint32(56).int32(c.type),c.isValid!=null&&Object.hasOwnProperty.call(c,"isValid")&&$.uint32(64).bool(c.isValid),c.simulcast!=null&&Object.hasOwnProperty.call(c,"simulcast")&&$.uint32(74).string(c.simulcast),$},f.encodeDelimited=function(c,$){return this.encode(c,$).ldelim()},f.decode=function(c,$){c instanceof $Reader||(c=$Reader.create(c));let C=$===void 0?c.len:c.pos+$,M=new $root.com.quick.voice.proto.Track;for(;c.pos<C;){let Z=c.uint32();switch(Z>>>3){case 1:{M.mid=c.string();break}case 2:{M.trackName=c.string();break}case 3:{M.location=c.string();break}case 4:{M.userId=c.string();break}case 5:{M.code=c.int32();break}case 6:{M.desc=c.string();break}case 7:{M.type=c.int32();break}case 8:{M.isValid=c.bool();break}case 9:{M.simulcast=c.string();break}default:c.skipType(Z&7);break}}return M},f.decodeDelimited=function(c){return c instanceof $Reader||(c=new $Reader(c)),this.decode(c,c.uint32())},f.verify=function(c){if(typeof c!="object"||c===null)return"object expected";if(c.mid!=null&&c.hasOwnProperty("mid")&&!$util.isString(c.mid))return"mid: string expected";if(c.trackName!=null&&c.hasOwnProperty("trackName")&&!$util.isString(c.trackName))return"trackName: string expected";if(c.location!=null&&c.hasOwnProperty("location")&&!$util.isString(c.location))return"location: string expected";if(c.userId!=null&&c.hasOwnProperty("userId")&&!$util.isString(c.userId))return"userId: string expected";if(c.code!=null&&c.hasOwnProperty("code")&&!$util.isInteger(c.code))return"code: integer expected";if(c.desc!=null&&c.hasOwnProperty("desc")&&!$util.isString(c.desc))return"desc: string expected";if(c.type!=null&&c.hasOwnProperty("type"))switch(c.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:break}return c.isValid!=null&&c.hasOwnProperty("isValid")&&typeof c.isValid!="boolean"?"isValid: boolean expected":c.simulcast!=null&&c.hasOwnProperty("simulcast")&&!$util.isString(c.simulcast)?"simulcast: string expected":null},f.fromObject=function(c){if(c instanceof $root.com.quick.voice.proto.Track)return c;let $=new $root.com.quick.voice.proto.Track;switch(c.mid!=null&&($.mid=String(c.mid)),c.trackName!=null&&($.trackName=String(c.trackName)),c.location!=null&&($.location=String(c.location)),c.userId!=null&&($.userId=String(c.userId)),c.code!=null&&($.code=c.code|0),c.desc!=null&&($.desc=String(c.desc)),c.type){default:if(typeof c.type=="number"){$.type=c.type;break}break;case"Microphone":case 0:$.type=0;break;case"Camera":case 1:$.type=1;break;case"Screen":case 2:$.type=2;break;case"SystemVoice":case 3:$.type=3;break}return c.isValid!=null&&($.isValid=!!c.isValid),c.simulcast!=null&&($.simulcast=String(c.simulcast)),$},f.toObject=function(c,$){$||($={});let C={};return $.defaults&&(C.mid=""),c.mid!=null&&c.hasOwnProperty("mid")&&(C.mid=c.mid),c.trackName!=null&&c.hasOwnProperty("trackName")&&(C.trackName=c.trackName,$.oneofs&&(C._trackName="trackName")),c.location!=null&&c.hasOwnProperty("location")&&(C.location=c.location,$.oneofs&&(C._location="location")),c.userId!=null&&c.hasOwnProperty("userId")&&(C.userId=c.userId,$.oneofs&&(C._userId="userId")),c.code!=null&&c.hasOwnProperty("code")&&(C.code=c.code,$.oneofs&&(C._code="code")),c.desc!=null&&c.hasOwnProperty("desc")&&(C.desc=c.desc,$.oneofs&&(C._desc="desc")),c.type!=null&&c.hasOwnProperty("type")&&(C.type=$.enums===String?$root.com.quick.voice.proto.TrackType[c.type]===void 0?c.type:$root.com.quick.voice.proto.TrackType[c.type]:c.type,$.oneofs&&(C._type="type")),c.isValid!=null&&c.hasOwnProperty("isValid")&&(C.isValid=c.isValid,$.oneofs&&(C._isValid="isValid")),c.simulcast!=null&&c.hasOwnProperty("simulcast")&&(C.simulcast=c.simulcast,$.oneofs&&(C._simulcast="simulcast")),C},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(c){return c===void 0&&(c="type.googleapis.com"),c+"/com.quick.voice.proto.Track"},f}(),D.JoinReq=function(){function f(i){if(i)for(let c=Object.keys(i),$=0;$<c.length;++$)i[c[$]]!=null&&(this[c[$]]=i[c[$]])}f.prototype.roomId="",f.prototype.user=null,f.prototype.callType=0,f.prototype.token=null;let k;return Object.defineProperty(f.prototype,"_token",{get:$util.oneOfGetter(k=["token"]),set:$util.oneOfSetter(k)}),f.create=function(c){return new f(c)},f.encode=function(c,$){return $||($=$Writer.create()),c.roomId!=null&&Object.hasOwnProperty.call(c,"roomId")&&$.uint32(10).string(c.roomId),c.user!=null&&Object.hasOwnProperty.call(c,"user")&&$root.com.quick.voice.proto.User.encode(c.user,$.uint32(18).fork()).ldelim(),c.callType!=null&&Object.hasOwnProperty.call(c,"callType")&&$.uint32(24).int32(c.callType),c.token!=null&&Object.hasOwnProperty.call(c,"token")&&$.uint32(34).string(c.token),$},f.encodeDelimited=function(c,$){return this.encode(c,$).ldelim()},f.decode=function(c,$){c instanceof $Reader||(c=$Reader.create(c));let C=$===void 0?c.len:c.pos+$,M=new $root.com.quick.voice.proto.JoinReq;for(;c.pos<C;){let Z=c.uint32();switch(Z>>>3){case 1:{M.roomId=c.string();break}case 2:{M.user=$root.com.quick.voice.proto.User.decode(c,c.uint32());break}case 3:{M.callType=c.int32();break}case 4:{M.token=c.string();break}default:c.skipType(Z&7);break}}return M},f.decodeDelimited=function(c){return c instanceof $Reader||(c=new $Reader(c)),this.decode(c,c.uint32())},f.verify=function(c){if(typeof c!="object"||c===null)return"object expected";if(c.roomId!=null&&c.hasOwnProperty("roomId")&&!$util.isString(c.roomId))return"roomId: string expected";if(c.user!=null&&c.hasOwnProperty("user")){let $=$root.com.quick.voice.proto.User.verify(c.user);if($)return"user."+$}if(c.callType!=null&&c.hasOwnProperty("callType"))switch(c.callType){default:return"callType: enum value expected";case 0:case 1:case 2:break}return c.token!=null&&c.hasOwnProperty("token")&&!$util.isString(c.token)?"token: string expected":null},f.fromObject=function(c){if(c instanceof $root.com.quick.voice.proto.JoinReq)return c;let $=new $root.com.quick.voice.proto.JoinReq;if(c.roomId!=null&&($.roomId=String(c.roomId)),c.user!=null){if(typeof c.user!="object")throw TypeError(".com.quick.voice.proto.JoinReq.user: object expected");$.user=$root.com.quick.voice.proto.User.fromObject(c.user)}switch(c.callType){default:if(typeof c.callType=="number"){$.callType=c.callType;break}break;case"Normal":case 0:$.callType=0;break;case"Meeting":case 1:$.callType=1;break;case"Live":case 2:$.callType=2;break}return c.token!=null&&($.token=String(c.token)),$},f.toObject=function(c,$){$||($={});let C={};return $.defaults&&(C.roomId="",C.user=null,C.callType=$.enums===String?"Normal":0),c.roomId!=null&&c.hasOwnProperty("roomId")&&(C.roomId=c.roomId),c.user!=null&&c.hasOwnProperty("user")&&(C.user=$root.com.quick.voice.proto.User.toObject(c.user,$)),c.callType!=null&&c.hasOwnProperty("callType")&&(C.callType=$.enums===String?$root.com.quick.voice.proto.CallType[c.callType]===void 0?c.callType:$root.com.quick.voice.proto.CallType[c.callType]:c.callType),c.token!=null&&c.hasOwnProperty("token")&&(C.token=c.token,$.oneofs&&(C._token="token")),C},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(c){return c===void 0&&(c="type.googleapis.com"),c+"/com.quick.voice.proto.JoinReq"},f}(),D.JoinRsp=function(){function f(k){if(this.roomUsers=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.prototype.roomUsers=$util.emptyArray,f.prototype.callType=0,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),i.roomUsers!=null&&i.roomUsers.length)for(let $=0;$<i.roomUsers.length;++$)$root.com.quick.voice.proto.User.encode(i.roomUsers[$],c.uint32(18).fork()).ldelim();return i.callType!=null&&Object.hasOwnProperty.call(i,"callType")&&c.uint32(24).int32(i.callType),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.JoinRsp;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}case 2:{C.roomUsers&&C.roomUsers.length||(C.roomUsers=[]),C.roomUsers.push($root.com.quick.voice.proto.User.decode(i,i.uint32()));break}case 3:{C.callType=i.int32();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId))return"roomId: string expected";if(i.roomUsers!=null&&i.hasOwnProperty("roomUsers")){if(!Array.isArray(i.roomUsers))return"roomUsers: array expected";for(let c=0;c<i.roomUsers.length;++c){let $=$root.com.quick.voice.proto.User.verify(i.roomUsers[c]);if($)return"roomUsers."+$}}if(i.callType!=null&&i.hasOwnProperty("callType"))switch(i.callType){default:return"callType: enum value expected";case 0:case 1:case 2:break}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.JoinRsp)return i;let c=new $root.com.quick.voice.proto.JoinRsp;if(i.roomId!=null&&(c.roomId=String(i.roomId)),i.roomUsers){if(!Array.isArray(i.roomUsers))throw TypeError(".com.quick.voice.proto.JoinRsp.roomUsers: array expected");c.roomUsers=[];for(let $=0;$<i.roomUsers.length;++$){if(typeof i.roomUsers[$]!="object")throw TypeError(".com.quick.voice.proto.JoinRsp.roomUsers: object expected");c.roomUsers[$]=$root.com.quick.voice.proto.User.fromObject(i.roomUsers[$])}}switch(i.callType){default:if(typeof i.callType=="number"){c.callType=i.callType;break}break;case"Normal":case 0:c.callType=0;break;case"Meeting":case 1:c.callType=1;break;case"Live":case 2:c.callType=2;break}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.roomUsers=[]),c.defaults&&($.roomId="",$.callType=c.enums===String?"Normal":0),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),i.roomUsers&&i.roomUsers.length){$.roomUsers=[];for(let C=0;C<i.roomUsers.length;++C)$.roomUsers[C]=$root.com.quick.voice.proto.User.toObject(i.roomUsers[C],c)}return i.callType!=null&&i.hasOwnProperty("callType")&&($.callType=c.enums===String?$root.com.quick.voice.proto.CallType[i.callType]===void 0?i.callType:$root.com.quick.voice.proto.CallType[i.callType]:i.callType),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.JoinRsp"},f}(),D.JoinNotify=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.prototype.user=null,f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),i.user!=null&&Object.hasOwnProperty.call(i,"user")&&$root.com.quick.voice.proto.User.encode(i.user,c.uint32(18).fork()).ldelim(),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.JoinNotify;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}case 2:{C.user=$root.com.quick.voice.proto.User.decode(i,i.uint32());break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId))return"roomId: string expected";if(i.user!=null&&i.hasOwnProperty("user")){let c=$root.com.quick.voice.proto.User.verify(i.user);if(c)return"user."+c}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.JoinNotify)return i;let c=new $root.com.quick.voice.proto.JoinNotify;if(i.roomId!=null&&(c.roomId=String(i.roomId)),i.user!=null){if(typeof i.user!="object")throw TypeError(".com.quick.voice.proto.JoinNotify.user: object expected");c.user=$root.com.quick.voice.proto.User.fromObject(i.user)}return c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.roomId="",$.user=null),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),i.user!=null&&i.hasOwnProperty("user")&&($.user=$root.com.quick.voice.proto.User.toObject(i.user,c)),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.JoinNotify"},f}(),D.ConnectCFReq=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.sdp="",f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.sdp!=null&&Object.hasOwnProperty.call(i,"sdp")&&c.uint32(10).string(i.sdp),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.ConnectCFReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.sdp=i.string();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.sdp!=null&&i.hasOwnProperty("sdp")&&!$util.isString(i.sdp)?"sdp: string expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.ConnectCFReq)return i;let c=new $root.com.quick.voice.proto.ConnectCFReq;return i.sdp!=null&&(c.sdp=String(i.sdp)),c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.sdp=""),i.sdp!=null&&i.hasOwnProperty("sdp")&&($.sdp=i.sdp),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.ConnectCFReq"},f}(),D.ConnectCFRsp=function(){function f(k){if(this.subscribeUsers=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.remoteSdp="",f.prototype.subscribeUsers=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.remoteSdp!=null&&Object.hasOwnProperty.call(i,"remoteSdp")&&c.uint32(10).string(i.remoteSdp),i.subscribeUsers!=null&&i.subscribeUsers.length)for(let $=0;$<i.subscribeUsers.length;++$)$root.com.quick.voice.proto.User.encode(i.subscribeUsers[$],c.uint32(18).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.ConnectCFRsp;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.remoteSdp=i.string();break}case 2:{C.subscribeUsers&&C.subscribeUsers.length||(C.subscribeUsers=[]),C.subscribeUsers.push($root.com.quick.voice.proto.User.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.remoteSdp!=null&&i.hasOwnProperty("remoteSdp")&&!$util.isString(i.remoteSdp))return"remoteSdp: string expected";if(i.subscribeUsers!=null&&i.hasOwnProperty("subscribeUsers")){if(!Array.isArray(i.subscribeUsers))return"subscribeUsers: array expected";for(let c=0;c<i.subscribeUsers.length;++c){let $=$root.com.quick.voice.proto.User.verify(i.subscribeUsers[c]);if($)return"subscribeUsers."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.ConnectCFRsp)return i;let c=new $root.com.quick.voice.proto.ConnectCFRsp;if(i.remoteSdp!=null&&(c.remoteSdp=String(i.remoteSdp)),i.subscribeUsers){if(!Array.isArray(i.subscribeUsers))throw TypeError(".com.quick.voice.proto.ConnectCFRsp.subscribeUsers: array expected");c.subscribeUsers=[];for(let $=0;$<i.subscribeUsers.length;++$){if(typeof i.subscribeUsers[$]!="object")throw TypeError(".com.quick.voice.proto.ConnectCFRsp.subscribeUsers: object expected");c.subscribeUsers[$]=$root.com.quick.voice.proto.User.fromObject(i.subscribeUsers[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.subscribeUsers=[]),c.defaults&&($.remoteSdp=""),i.remoteSdp!=null&&i.hasOwnProperty("remoteSdp")&&($.remoteSdp=i.remoteSdp),i.subscribeUsers&&i.subscribeUsers.length){$.subscribeUsers=[];for(let C=0;C<i.subscribeUsers.length;++C)$.subscribeUsers[C]=$root.com.quick.voice.proto.User.toObject(i.subscribeUsers[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.ConnectCFRsp"},f}(),D.PublishReq=function(){function f(i){if(this.tracks=[],i)for(let c=Object.keys(i),$=0;$<c.length;++$)i[c[$]]!=null&&(this[c[$]]=i[c[$]])}f.prototype.sdp="",f.prototype.tracks=$util.emptyArray,f.prototype.callAction=0,f.prototype.recreate=null;let k;return Object.defineProperty(f.prototype,"_recreate",{get:$util.oneOfGetter(k=["recreate"]),set:$util.oneOfSetter(k)}),f.create=function(c){return new f(c)},f.encode=function(c,$){if($||($=$Writer.create()),c.sdp!=null&&Object.hasOwnProperty.call(c,"sdp")&&$.uint32(10).string(c.sdp),c.tracks!=null&&c.tracks.length)for(let C=0;C<c.tracks.length;++C)$root.com.quick.voice.proto.Track.encode(c.tracks[C],$.uint32(18).fork()).ldelim();return c.callAction!=null&&Object.hasOwnProperty.call(c,"callAction")&&$.uint32(24).int32(c.callAction),c.recreate!=null&&Object.hasOwnProperty.call(c,"recreate")&&$.uint32(32).bool(c.recreate),$},f.encodeDelimited=function(c,$){return this.encode(c,$).ldelim()},f.decode=function(c,$){c instanceof $Reader||(c=$Reader.create(c));let C=$===void 0?c.len:c.pos+$,M=new $root.com.quick.voice.proto.PublishReq;for(;c.pos<C;){let Z=c.uint32();switch(Z>>>3){case 1:{M.sdp=c.string();break}case 2:{M.tracks&&M.tracks.length||(M.tracks=[]),M.tracks.push($root.com.quick.voice.proto.Track.decode(c,c.uint32()));break}case 3:{M.callAction=c.int32();break}case 4:{M.recreate=c.bool();break}default:c.skipType(Z&7);break}}return M},f.decodeDelimited=function(c){return c instanceof $Reader||(c=new $Reader(c)),this.decode(c,c.uint32())},f.verify=function(c){if(typeof c!="object"||c===null)return"object expected";if(c.sdp!=null&&c.hasOwnProperty("sdp")&&!$util.isString(c.sdp))return"sdp: string expected";if(c.tracks!=null&&c.hasOwnProperty("tracks")){if(!Array.isArray(c.tracks))return"tracks: array expected";for(let $=0;$<c.tracks.length;++$){let C=$root.com.quick.voice.proto.Track.verify(c.tracks[$]);if(C)return"tracks."+C}}return c.callAction!=null&&c.hasOwnProperty("callAction")&&!$util.isInteger(c.callAction)?"callAction: integer expected":c.recreate!=null&&c.hasOwnProperty("recreate")&&typeof c.recreate!="boolean"?"recreate: boolean expected":null},f.fromObject=function(c){if(c instanceof $root.com.quick.voice.proto.PublishReq)return c;let $=new $root.com.quick.voice.proto.PublishReq;if(c.sdp!=null&&($.sdp=String(c.sdp)),c.tracks){if(!Array.isArray(c.tracks))throw TypeError(".com.quick.voice.proto.PublishReq.tracks: array expected");$.tracks=[];for(let C=0;C<c.tracks.length;++C){if(typeof c.tracks[C]!="object")throw TypeError(".com.quick.voice.proto.PublishReq.tracks: object expected");$.tracks[C]=$root.com.quick.voice.proto.Track.fromObject(c.tracks[C])}}return c.callAction!=null&&($.callAction=c.callAction|0),c.recreate!=null&&($.recreate=!!c.recreate),$},f.toObject=function(c,$){$||($={});let C={};if(($.arrays||$.defaults)&&(C.tracks=[]),$.defaults&&(C.sdp="",C.callAction=0),c.sdp!=null&&c.hasOwnProperty("sdp")&&(C.sdp=c.sdp),c.tracks&&c.tracks.length){C.tracks=[];for(let M=0;M<c.tracks.length;++M)C.tracks[M]=$root.com.quick.voice.proto.Track.toObject(c.tracks[M],$)}return c.callAction!=null&&c.hasOwnProperty("callAction")&&(C.callAction=c.callAction),c.recreate!=null&&c.hasOwnProperty("recreate")&&(C.recreate=c.recreate,$.oneofs&&(C._recreate="recreate")),C},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(c){return c===void 0&&(c="type.googleapis.com"),c+"/com.quick.voice.proto.PublishReq"},f}(),D.PublishRsp=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.remoteSdp="",f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.remoteSdp!=null&&Object.hasOwnProperty.call(i,"remoteSdp")&&c.uint32(10).string(i.remoteSdp),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.PublishRsp;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.remoteSdp=i.string();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.remoteSdp!=null&&i.hasOwnProperty("remoteSdp")&&!$util.isString(i.remoteSdp)?"remoteSdp: string expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.PublishRsp)return i;let c=new $root.com.quick.voice.proto.PublishRsp;return i.remoteSdp!=null&&(c.remoteSdp=String(i.remoteSdp)),c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.remoteSdp=""),i.remoteSdp!=null&&i.hasOwnProperty("remoteSdp")&&($.remoteSdp=i.remoteSdp),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.PublishRsp"},f}(),D.PublishNotify=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.prototype.user=null,f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),i.user!=null&&Object.hasOwnProperty.call(i,"user")&&$root.com.quick.voice.proto.User.encode(i.user,c.uint32(18).fork()).ldelim(),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.PublishNotify;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}case 2:{C.user=$root.com.quick.voice.proto.User.decode(i,i.uint32());break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId))return"roomId: string expected";if(i.user!=null&&i.hasOwnProperty("user")){let c=$root.com.quick.voice.proto.User.verify(i.user);if(c)return"user."+c}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.PublishNotify)return i;let c=new $root.com.quick.voice.proto.PublishNotify;if(i.roomId!=null&&(c.roomId=String(i.roomId)),i.user!=null){if(typeof i.user!="object")throw TypeError(".com.quick.voice.proto.PublishNotify.user: object expected");c.user=$root.com.quick.voice.proto.User.fromObject(i.user)}return c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.roomId="",$.user=null),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),i.user!=null&&i.hasOwnProperty("user")&&($.user=$root.com.quick.voice.proto.User.toObject(i.user,c)),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.PublishNotify"},f}(),D.SubscribeReq=function(){function f(k){if(this.users=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.users=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.users!=null&&i.users.length)for(let $=0;$<i.users.length;++$)$root.com.quick.voice.proto.User.encode(i.users[$],c.uint32(10).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.SubscribeReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.users&&C.users.length||(C.users=[]),C.users.push($root.com.quick.voice.proto.User.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.users!=null&&i.hasOwnProperty("users")){if(!Array.isArray(i.users))return"users: array expected";for(let c=0;c<i.users.length;++c){let $=$root.com.quick.voice.proto.User.verify(i.users[c]);if($)return"users."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.SubscribeReq)return i;let c=new $root.com.quick.voice.proto.SubscribeReq;if(i.users){if(!Array.isArray(i.users))throw TypeError(".com.quick.voice.proto.SubscribeReq.users: array expected");c.users=[];for(let $=0;$<i.users.length;++$){if(typeof i.users[$]!="object")throw TypeError(".com.quick.voice.proto.SubscribeReq.users: object expected");c.users[$]=$root.com.quick.voice.proto.User.fromObject(i.users[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.users=[]),i.users&&i.users.length){$.users=[];for(let C=0;C<i.users.length;++C)$.users[C]=$root.com.quick.voice.proto.User.toObject(i.users[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.SubscribeReq"},f}(),D.SubscribeRsp=function(){function f(k){if(this.users=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.remoteSdp="",f.prototype.users=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.remoteSdp!=null&&Object.hasOwnProperty.call(i,"remoteSdp")&&c.uint32(10).string(i.remoteSdp),i.users!=null&&i.users.length)for(let $=0;$<i.users.length;++$)$root.com.quick.voice.proto.User.encode(i.users[$],c.uint32(18).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.SubscribeRsp;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.remoteSdp=i.string();break}case 2:{C.users&&C.users.length||(C.users=[]),C.users.push($root.com.quick.voice.proto.User.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.remoteSdp!=null&&i.hasOwnProperty("remoteSdp")&&!$util.isString(i.remoteSdp))return"remoteSdp: string expected";if(i.users!=null&&i.hasOwnProperty("users")){if(!Array.isArray(i.users))return"users: array expected";for(let c=0;c<i.users.length;++c){let $=$root.com.quick.voice.proto.User.verify(i.users[c]);if($)return"users."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.SubscribeRsp)return i;let c=new $root.com.quick.voice.proto.SubscribeRsp;if(i.remoteSdp!=null&&(c.remoteSdp=String(i.remoteSdp)),i.users){if(!Array.isArray(i.users))throw TypeError(".com.quick.voice.proto.SubscribeRsp.users: array expected");c.users=[];for(let $=0;$<i.users.length;++$){if(typeof i.users[$]!="object")throw TypeError(".com.quick.voice.proto.SubscribeRsp.users: object expected");c.users[$]=$root.com.quick.voice.proto.User.fromObject(i.users[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.users=[]),c.defaults&&($.remoteSdp=""),i.remoteSdp!=null&&i.hasOwnProperty("remoteSdp")&&($.remoteSdp=i.remoteSdp),i.users&&i.users.length){$.users=[];for(let C=0;C<i.users.length;++C)$.users[C]=$root.com.quick.voice.proto.User.toObject(i.users[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.SubscribeRsp"},f}(),D.RenegotiateReq=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.userId="",f.prototype.sdp="",f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.userId!=null&&Object.hasOwnProperty.call(i,"userId")&&c.uint32(10).string(i.userId),i.sdp!=null&&Object.hasOwnProperty.call(i,"sdp")&&c.uint32(18).string(i.sdp),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.RenegotiateReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.userId=i.string();break}case 2:{C.sdp=i.string();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.userId!=null&&i.hasOwnProperty("userId")&&!$util.isString(i.userId)?"userId: string expected":i.sdp!=null&&i.hasOwnProperty("sdp")&&!$util.isString(i.sdp)?"sdp: string expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.RenegotiateReq)return i;let c=new $root.com.quick.voice.proto.RenegotiateReq;return i.userId!=null&&(c.userId=String(i.userId)),i.sdp!=null&&(c.sdp=String(i.sdp)),c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.userId="",$.sdp=""),i.userId!=null&&i.hasOwnProperty("userId")&&($.userId=i.userId),i.sdp!=null&&i.hasOwnProperty("sdp")&&($.sdp=i.sdp),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.RenegotiateReq"},f}(),D.QuitReq=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.userId="",f.prototype.roomId="",f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.userId!=null&&Object.hasOwnProperty.call(i,"userId")&&c.uint32(10).string(i.userId),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(18).string(i.roomId),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.QuitReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.userId=i.string();break}case 2:{C.roomId=i.string();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.userId!=null&&i.hasOwnProperty("userId")&&!$util.isString(i.userId)?"userId: string expected":i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId)?"roomId: string expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.QuitReq)return i;let c=new $root.com.quick.voice.proto.QuitReq;return i.userId!=null&&(c.userId=String(i.userId)),i.roomId!=null&&(c.roomId=String(i.roomId)),c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.userId="",$.roomId=""),i.userId!=null&&i.hasOwnProperty("userId")&&($.userId=i.userId),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.QuitReq"},f}(),D.QuitNotify=function(){function f(i){if(i)for(let c=Object.keys(i),$=0;$<c.length;++$)i[c[$]]!=null&&(this[c[$]]=i[c[$]])}f.prototype.roomId="",f.prototype.user=null,f.prototype.code=null,f.prototype.desc=null;let k;return Object.defineProperty(f.prototype,"_code",{get:$util.oneOfGetter(k=["code"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_desc",{get:$util.oneOfGetter(k=["desc"]),set:$util.oneOfSetter(k)}),f.create=function(c){return new f(c)},f.encode=function(c,$){return $||($=$Writer.create()),c.roomId!=null&&Object.hasOwnProperty.call(c,"roomId")&&$.uint32(10).string(c.roomId),c.user!=null&&Object.hasOwnProperty.call(c,"user")&&$root.com.quick.voice.proto.User.encode(c.user,$.uint32(18).fork()).ldelim(),c.code!=null&&Object.hasOwnProperty.call(c,"code")&&$.uint32(24).int32(c.code),c.desc!=null&&Object.hasOwnProperty.call(c,"desc")&&$.uint32(34).string(c.desc),$},f.encodeDelimited=function(c,$){return this.encode(c,$).ldelim()},f.decode=function(c,$){c instanceof $Reader||(c=$Reader.create(c));let C=$===void 0?c.len:c.pos+$,M=new $root.com.quick.voice.proto.QuitNotify;for(;c.pos<C;){let Z=c.uint32();switch(Z>>>3){case 1:{M.roomId=c.string();break}case 2:{M.user=$root.com.quick.voice.proto.User.decode(c,c.uint32());break}case 3:{M.code=c.int32();break}case 4:{M.desc=c.string();break}default:c.skipType(Z&7);break}}return M},f.decodeDelimited=function(c){return c instanceof $Reader||(c=new $Reader(c)),this.decode(c,c.uint32())},f.verify=function(c){if(typeof c!="object"||c===null)return"object expected";if(c.roomId!=null&&c.hasOwnProperty("roomId")&&!$util.isString(c.roomId))return"roomId: string expected";if(c.user!=null&&c.hasOwnProperty("user")){let $=$root.com.quick.voice.proto.User.verify(c.user);if($)return"user."+$}return c.code!=null&&c.hasOwnProperty("code")&&!$util.isInteger(c.code)?"code: integer expected":c.desc!=null&&c.hasOwnProperty("desc")&&!$util.isString(c.desc)?"desc: string expected":null},f.fromObject=function(c){if(c instanceof $root.com.quick.voice.proto.QuitNotify)return c;let $=new $root.com.quick.voice.proto.QuitNotify;if(c.roomId!=null&&($.roomId=String(c.roomId)),c.user!=null){if(typeof c.user!="object")throw TypeError(".com.quick.voice.proto.QuitNotify.user: object expected");$.user=$root.com.quick.voice.proto.User.fromObject(c.user)}return c.code!=null&&($.code=c.code|0),c.desc!=null&&($.desc=String(c.desc)),$},f.toObject=function(c,$){$||($={});let C={};return $.defaults&&(C.roomId="",C.user=null),c.roomId!=null&&c.hasOwnProperty("roomId")&&(C.roomId=c.roomId),c.user!=null&&c.hasOwnProperty("user")&&(C.user=$root.com.quick.voice.proto.User.toObject(c.user,$)),c.code!=null&&c.hasOwnProperty("code")&&(C.code=c.code,$.oneofs&&(C._code="code")),c.desc!=null&&c.hasOwnProperty("desc")&&(C.desc=c.desc,$.oneofs&&(C._desc="desc")),C},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(c){return c===void 0&&(c="type.googleapis.com"),c+"/com.quick.voice.proto.QuitNotify"},f}(),D.TokenExpireNotify=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.TokenExpireNotify;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId)?"roomId: string expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.TokenExpireNotify)return i;let c=new $root.com.quick.voice.proto.TokenExpireNotify;return i.roomId!=null&&(c.roomId=String(i.roomId)),c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.roomId=""),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.TokenExpireNotify"},f}(),D.UpdateTokenReq=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.prototype.sdkToken="",f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),i.sdkToken!=null&&Object.hasOwnProperty.call(i,"sdkToken")&&c.uint32(18).string(i.sdkToken),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.UpdateTokenReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}case 2:{C.sdkToken=i.string();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId)?"roomId: string expected":i.sdkToken!=null&&i.hasOwnProperty("sdkToken")&&!$util.isString(i.sdkToken)?"sdkToken: string expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.UpdateTokenReq)return i;let c=new $root.com.quick.voice.proto.UpdateTokenReq;return i.roomId!=null&&(c.roomId=String(i.roomId)),i.sdkToken!=null&&(c.sdkToken=String(i.sdkToken)),c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.roomId="",$.sdkToken=""),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),i.sdkToken!=null&&i.hasOwnProperty("sdkToken")&&($.sdkToken=i.sdkToken),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.UpdateTokenReq"},f}(),D.NetQualityChange=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.userId="",f.prototype.roomId="",f.prototype.egress=0,f.prototype.ingress=0,f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.userId!=null&&Object.hasOwnProperty.call(i,"userId")&&c.uint32(10).string(i.userId),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(18).string(i.roomId),i.egress!=null&&Object.hasOwnProperty.call(i,"egress")&&c.uint32(24).int32(i.egress),i.ingress!=null&&Object.hasOwnProperty.call(i,"ingress")&&c.uint32(32).int32(i.ingress),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.NetQualityChange;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.userId=i.string();break}case 2:{C.roomId=i.string();break}case 3:{C.egress=i.int32();break}case 4:{C.ingress=i.int32();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.userId!=null&&i.hasOwnProperty("userId")&&!$util.isString(i.userId)?"userId: string expected":i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId)?"roomId: string expected":i.egress!=null&&i.hasOwnProperty("egress")&&!$util.isInteger(i.egress)?"egress: integer expected":i.ingress!=null&&i.hasOwnProperty("ingress")&&!$util.isInteger(i.ingress)?"ingress: integer expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.NetQualityChange)return i;let c=new $root.com.quick.voice.proto.NetQualityChange;return i.userId!=null&&(c.userId=String(i.userId)),i.roomId!=null&&(c.roomId=String(i.roomId)),i.egress!=null&&(c.egress=i.egress|0),i.ingress!=null&&(c.ingress=i.ingress|0),c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.userId="",$.roomId="",$.egress=0,$.ingress=0),i.userId!=null&&i.hasOwnProperty("userId")&&($.userId=i.userId),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),i.egress!=null&&i.hasOwnProperty("egress")&&($.egress=i.egress),i.ingress!=null&&i.hasOwnProperty("ingress")&&($.ingress=i.ingress),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.NetQualityChange"},f}(),D.NetQualityNotify=function(){function f(k){if(this.qualities=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.qualities=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.qualities!=null&&i.qualities.length)for(let $=0;$<i.qualities.length;++$)$root.com.quick.voice.proto.NetQualityChange.encode(i.qualities[$],c.uint32(10).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.NetQualityNotify;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.qualities&&C.qualities.length||(C.qualities=[]),C.qualities.push($root.com.quick.voice.proto.NetQualityChange.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.qualities!=null&&i.hasOwnProperty("qualities")){if(!Array.isArray(i.qualities))return"qualities: array expected";for(let c=0;c<i.qualities.length;++c){let $=$root.com.quick.voice.proto.NetQualityChange.verify(i.qualities[c]);if($)return"qualities."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.NetQualityNotify)return i;let c=new $root.com.quick.voice.proto.NetQualityNotify;if(i.qualities){if(!Array.isArray(i.qualities))throw TypeError(".com.quick.voice.proto.NetQualityNotify.qualities: array expected");c.qualities=[];for(let $=0;$<i.qualities.length;++$){if(typeof i.qualities[$]!="object")throw TypeError(".com.quick.voice.proto.NetQualityNotify.qualities: object expected");c.qualities[$]=$root.com.quick.voice.proto.NetQualityChange.fromObject(i.qualities[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.qualities=[]),i.qualities&&i.qualities.length){$.qualities=[];for(let C=0;C<i.qualities.length;++C)$.qualities[C]=$root.com.quick.voice.proto.NetQualityChange.toObject(i.qualities[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.NetQualityNotify"},f}(),D.UpdateCall=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.prototype.user=null,f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),i.user!=null&&Object.hasOwnProperty.call(i,"user")&&$root.com.quick.voice.proto.User.encode(i.user,c.uint32(18).fork()).ldelim(),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.UpdateCall;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}case 2:{C.user=$root.com.quick.voice.proto.User.decode(i,i.uint32());break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId))return"roomId: string expected";if(i.user!=null&&i.hasOwnProperty("user")){let c=$root.com.quick.voice.proto.User.verify(i.user);if(c)return"user."+c}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.UpdateCall)return i;let c=new $root.com.quick.voice.proto.UpdateCall;if(i.roomId!=null&&(c.roomId=String(i.roomId)),i.user!=null){if(typeof i.user!="object")throw TypeError(".com.quick.voice.proto.UpdateCall.user: object expected");c.user=$root.com.quick.voice.proto.User.fromObject(i.user)}return c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.roomId="",$.user=null),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),i.user!=null&&i.hasOwnProperty("user")&&($.user=$root.com.quick.voice.proto.User.toObject(i.user,c)),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.UpdateCall"},f}(),D.SyncRoomInfoReq=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.prototype.user=null,f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),i.user!=null&&Object.hasOwnProperty.call(i,"user")&&$root.com.quick.voice.proto.User.encode(i.user,c.uint32(18).fork()).ldelim(),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.SyncRoomInfoReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}case 2:{C.user=$root.com.quick.voice.proto.User.decode(i,i.uint32());break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId))return"roomId: string expected";if(i.user!=null&&i.hasOwnProperty("user")){let c=$root.com.quick.voice.proto.User.verify(i.user);if(c)return"user."+c}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.SyncRoomInfoReq)return i;let c=new $root.com.quick.voice.proto.SyncRoomInfoReq;if(i.roomId!=null&&(c.roomId=String(i.roomId)),i.user!=null){if(typeof i.user!="object")throw TypeError(".com.quick.voice.proto.SyncRoomInfoReq.user: object expected");c.user=$root.com.quick.voice.proto.User.fromObject(i.user)}return c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.roomId="",$.user=null),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),i.user!=null&&i.hasOwnProperty("user")&&($.user=$root.com.quick.voice.proto.User.toObject(i.user,c)),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.SyncRoomInfoReq"},f}(),D.SyncRoomInfoRsp=function(){function f(k){if(this.users=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.prototype.isValid=!1,f.prototype.users=$util.emptyArray,f.prototype.isActive=!1,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),i.isValid!=null&&Object.hasOwnProperty.call(i,"isValid")&&c.uint32(16).bool(i.isValid),i.users!=null&&i.users.length)for(let $=0;$<i.users.length;++$)$root.com.quick.voice.proto.User.encode(i.users[$],c.uint32(26).fork()).ldelim();return i.isActive!=null&&Object.hasOwnProperty.call(i,"isActive")&&c.uint32(32).bool(i.isActive),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.SyncRoomInfoRsp;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}case 2:{C.isValid=i.bool();break}case 3:{C.users&&C.users.length||(C.users=[]),C.users.push($root.com.quick.voice.proto.User.decode(i,i.uint32()));break}case 4:{C.isActive=i.bool();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId))return"roomId: string expected";if(i.isValid!=null&&i.hasOwnProperty("isValid")&&typeof i.isValid!="boolean")return"isValid: boolean expected";if(i.users!=null&&i.hasOwnProperty("users")){if(!Array.isArray(i.users))return"users: array expected";for(let c=0;c<i.users.length;++c){let $=$root.com.quick.voice.proto.User.verify(i.users[c]);if($)return"users."+$}}return i.isActive!=null&&i.hasOwnProperty("isActive")&&typeof i.isActive!="boolean"?"isActive: boolean expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.SyncRoomInfoRsp)return i;let c=new $root.com.quick.voice.proto.SyncRoomInfoRsp;if(i.roomId!=null&&(c.roomId=String(i.roomId)),i.isValid!=null&&(c.isValid=!!i.isValid),i.users){if(!Array.isArray(i.users))throw TypeError(".com.quick.voice.proto.SyncRoomInfoRsp.users: array expected");c.users=[];for(let $=0;$<i.users.length;++$){if(typeof i.users[$]!="object")throw TypeError(".com.quick.voice.proto.SyncRoomInfoRsp.users: object expected");c.users[$]=$root.com.quick.voice.proto.User.fromObject(i.users[$])}}return i.isActive!=null&&(c.isActive=!!i.isActive),c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.users=[]),c.defaults&&($.roomId="",$.isValid=!1,$.isActive=!1),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),i.isValid!=null&&i.hasOwnProperty("isValid")&&($.isValid=i.isValid),i.users&&i.users.length){$.users=[];for(let C=0;C<i.users.length;++C)$.users[C]=$root.com.quick.voice.proto.User.toObject(i.users[C],c)}return i.isActive!=null&&i.hasOwnProperty("isActive")&&($.isActive=i.isActive),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.SyncRoomInfoRsp"},f}(),D.UpdateTime=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.time=$util.Long?$util.Long.fromBits(0,0,!1):0,f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.time!=null&&Object.hasOwnProperty.call(i,"time")&&c.uint32(8).int64(i.time),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.UpdateTime;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.time=i.int64();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.time!=null&&i.hasOwnProperty("time")&&!$util.isInteger(i.time)&&!(i.time&&$util.isInteger(i.time.low)&&$util.isInteger(i.time.high))?"time: integer|Long expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.UpdateTime)return i;let c=new $root.com.quick.voice.proto.UpdateTime;return i.time!=null&&($util.Long?(c.time=$util.Long.fromValue(i.time)).unsigned=!1:typeof i.time=="string"?c.time=parseInt(i.time,10):typeof i.time=="number"?c.time=i.time:typeof i.time=="object"&&(c.time=new $util.LongBits(i.time.low>>>0,i.time.high>>>0).toNumber())),c},f.toObject=function(i,c){c||(c={});let $={};if(c.defaults)if($util.Long){let C=new $util.Long(0,0,!1);$.time=c.longs===String?C.toString():c.longs===Number?C.toNumber():C}else $.time=c.longs===String?"0":0;return i.time!=null&&i.hasOwnProperty("time")&&(typeof i.time=="number"?$.time=c.longs===String?String(i.time):i.time:$.time=c.longs===String?$util.Long.prototype.toString.call(i.time):c.longs===Number?new $util.LongBits(i.time.low>>>0,i.time.high>>>0).toNumber():i.time),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.UpdateTime"},f}(),D.CloseTrackReq=function(){function f(k){if(this.tracks=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.sdp="",f.prototype.tracks=$util.emptyArray,f.prototype.roomId="",f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.sdp!=null&&Object.hasOwnProperty.call(i,"sdp")&&c.uint32(10).string(i.sdp),i.tracks!=null&&i.tracks.length)for(let $=0;$<i.tracks.length;++$)$root.com.quick.voice.proto.Track.encode(i.tracks[$],c.uint32(18).fork()).ldelim();return i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(26).string(i.roomId),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.CloseTrackReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.sdp=i.string();break}case 2:{C.tracks&&C.tracks.length||(C.tracks=[]),C.tracks.push($root.com.quick.voice.proto.Track.decode(i,i.uint32()));break}case 3:{C.roomId=i.string();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.sdp!=null&&i.hasOwnProperty("sdp")&&!$util.isString(i.sdp))return"sdp: string expected";if(i.tracks!=null&&i.hasOwnProperty("tracks")){if(!Array.isArray(i.tracks))return"tracks: array expected";for(let c=0;c<i.tracks.length;++c){let $=$root.com.quick.voice.proto.Track.verify(i.tracks[c]);if($)return"tracks."+$}}return i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId)?"roomId: string expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.CloseTrackReq)return i;let c=new $root.com.quick.voice.proto.CloseTrackReq;if(i.sdp!=null&&(c.sdp=String(i.sdp)),i.tracks){if(!Array.isArray(i.tracks))throw TypeError(".com.quick.voice.proto.CloseTrackReq.tracks: array expected");c.tracks=[];for(let $=0;$<i.tracks.length;++$){if(typeof i.tracks[$]!="object")throw TypeError(".com.quick.voice.proto.CloseTrackReq.tracks: object expected");c.tracks[$]=$root.com.quick.voice.proto.Track.fromObject(i.tracks[$])}}return i.roomId!=null&&(c.roomId=String(i.roomId)),c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.tracks=[]),c.defaults&&($.sdp="",$.roomId=""),i.sdp!=null&&i.hasOwnProperty("sdp")&&($.sdp=i.sdp),i.tracks&&i.tracks.length){$.tracks=[];for(let C=0;C<i.tracks.length;++C)$.tracks[C]=$root.com.quick.voice.proto.Track.toObject(i.tracks[C],c)}return i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.CloseTrackReq"},f}(),D.CloseTrackRsp=function(){function f(k){if(this.tracks=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.remoteSdp="",f.prototype.tracks=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.remoteSdp!=null&&Object.hasOwnProperty.call(i,"remoteSdp")&&c.uint32(10).string(i.remoteSdp),i.tracks!=null&&i.tracks.length)for(let $=0;$<i.tracks.length;++$)$root.com.quick.voice.proto.Track.encode(i.tracks[$],c.uint32(18).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.CloseTrackRsp;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.remoteSdp=i.string();break}case 2:{C.tracks&&C.tracks.length||(C.tracks=[]),C.tracks.push($root.com.quick.voice.proto.Track.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.remoteSdp!=null&&i.hasOwnProperty("remoteSdp")&&!$util.isString(i.remoteSdp))return"remoteSdp: string expected";if(i.tracks!=null&&i.hasOwnProperty("tracks")){if(!Array.isArray(i.tracks))return"tracks: array expected";for(let c=0;c<i.tracks.length;++c){let $=$root.com.quick.voice.proto.Track.verify(i.tracks[c]);if($)return"tracks."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.CloseTrackRsp)return i;let c=new $root.com.quick.voice.proto.CloseTrackRsp;if(i.remoteSdp!=null&&(c.remoteSdp=String(i.remoteSdp)),i.tracks){if(!Array.isArray(i.tracks))throw TypeError(".com.quick.voice.proto.CloseTrackRsp.tracks: array expected");c.tracks=[];for(let $=0;$<i.tracks.length;++$){if(typeof i.tracks[$]!="object")throw TypeError(".com.quick.voice.proto.CloseTrackRsp.tracks: object expected");c.tracks[$]=$root.com.quick.voice.proto.Track.fromObject(i.tracks[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.tracks=[]),c.defaults&&($.remoteSdp=""),i.remoteSdp!=null&&i.hasOwnProperty("remoteSdp")&&($.remoteSdp=i.remoteSdp),i.tracks&&i.tracks.length){$.tracks=[];for(let C=0;C<i.tracks.length;++C)$.tracks[C]=$root.com.quick.voice.proto.Track.toObject(i.tracks[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.CloseTrackRsp"},f}(),D.CloseTrackNotify=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.user=null,f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.user!=null&&Object.hasOwnProperty.call(i,"user")&&$root.com.quick.voice.proto.User.encode(i.user,c.uint32(10).fork()).ldelim(),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.CloseTrackNotify;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.user=$root.com.quick.voice.proto.User.decode(i,i.uint32());break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.user!=null&&i.hasOwnProperty("user")){let c=$root.com.quick.voice.proto.User.verify(i.user);if(c)return"user."+c}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.CloseTrackNotify)return i;let c=new $root.com.quick.voice.proto.CloseTrackNotify;if(i.user!=null){if(typeof i.user!="object")throw TypeError(".com.quick.voice.proto.CloseTrackNotify.user: object expected");c.user=$root.com.quick.voice.proto.User.fromObject(i.user)}return c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.user=null),i.user!=null&&i.hasOwnProperty("user")&&($.user=$root.com.quick.voice.proto.User.toObject(i.user,c)),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.CloseTrackNotify"},f}(),D.ToggleLiveRoomReq=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.ToggleLiveRoomReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId)?"roomId: string expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.ToggleLiveRoomReq)return i;let c=new $root.com.quick.voice.proto.ToggleLiveRoomReq;return i.roomId!=null&&(c.roomId=String(i.roomId)),c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.roomId=""),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.ToggleLiveRoomReq"},f}(),D.ToggleLiveRoomRsq=function(){function f(k){if(this.roomUsers=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.prototype.hash="",f.prototype.roomUsers=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),i.hash!=null&&Object.hasOwnProperty.call(i,"hash")&&c.uint32(18).string(i.hash),i.roomUsers!=null&&i.roomUsers.length)for(let $=0;$<i.roomUsers.length;++$)$root.com.quick.voice.proto.User.encode(i.roomUsers[$],c.uint32(26).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.ToggleLiveRoomRsq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}case 2:{C.hash=i.string();break}case 3:{C.roomUsers&&C.roomUsers.length||(C.roomUsers=[]),C.roomUsers.push($root.com.quick.voice.proto.User.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId))return"roomId: string expected";if(i.hash!=null&&i.hasOwnProperty("hash")&&!$util.isString(i.hash))return"hash: string expected";if(i.roomUsers!=null&&i.hasOwnProperty("roomUsers")){if(!Array.isArray(i.roomUsers))return"roomUsers: array expected";for(let c=0;c<i.roomUsers.length;++c){let $=$root.com.quick.voice.proto.User.verify(i.roomUsers[c]);if($)return"roomUsers."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.ToggleLiveRoomRsq)return i;let c=new $root.com.quick.voice.proto.ToggleLiveRoomRsq;if(i.roomId!=null&&(c.roomId=String(i.roomId)),i.hash!=null&&(c.hash=String(i.hash)),i.roomUsers){if(!Array.isArray(i.roomUsers))throw TypeError(".com.quick.voice.proto.ToggleLiveRoomRsq.roomUsers: array expected");c.roomUsers=[];for(let $=0;$<i.roomUsers.length;++$){if(typeof i.roomUsers[$]!="object")throw TypeError(".com.quick.voice.proto.ToggleLiveRoomRsq.roomUsers: object expected");c.roomUsers[$]=$root.com.quick.voice.proto.User.fromObject(i.roomUsers[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.roomUsers=[]),c.defaults&&($.roomId="",$.hash=""),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),i.hash!=null&&i.hasOwnProperty("hash")&&($.hash=i.hash),i.roomUsers&&i.roomUsers.length){$.roomUsers=[];for(let C=0;C<i.roomUsers.length;++C)$.roomUsers[C]=$root.com.quick.voice.proto.User.toObject(i.roomUsers[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.ToggleLiveRoomRsq"},f}(),D.TrackType=function(){const f={},k=Object.create(f);return k[f[0]="Microphone"]=0,k[f[1]="Camera"]=1,k[f[2]="Screen"]=2,k[f[3]="SystemVoice"]=3,k}(),D.ReportInfoReq=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.actionEvent="",f.prototype.userId="",f.prototype.platform="",f.prototype.time=$util.Long?$util.Long.fromBits(0,0,!1):0,f.prototype.actionData="",f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.actionEvent!=null&&Object.hasOwnProperty.call(i,"actionEvent")&&c.uint32(10).string(i.actionEvent),i.userId!=null&&Object.hasOwnProperty.call(i,"userId")&&c.uint32(18).string(i.userId),i.platform!=null&&Object.hasOwnProperty.call(i,"platform")&&c.uint32(26).string(i.platform),i.time!=null&&Object.hasOwnProperty.call(i,"time")&&c.uint32(32).int64(i.time),i.actionData!=null&&Object.hasOwnProperty.call(i,"actionData")&&c.uint32(42).string(i.actionData),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.ReportInfoReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.actionEvent=i.string();break}case 2:{C.userId=i.string();break}case 3:{C.platform=i.string();break}case 4:{C.time=i.int64();break}case 5:{C.actionData=i.string();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){return typeof i!="object"||i===null?"object expected":i.actionEvent!=null&&i.hasOwnProperty("actionEvent")&&!$util.isString(i.actionEvent)?"actionEvent: string expected":i.userId!=null&&i.hasOwnProperty("userId")&&!$util.isString(i.userId)?"userId: string expected":i.platform!=null&&i.hasOwnProperty("platform")&&!$util.isString(i.platform)?"platform: string expected":i.time!=null&&i.hasOwnProperty("time")&&!$util.isInteger(i.time)&&!(i.time&&$util.isInteger(i.time.low)&&$util.isInteger(i.time.high))?"time: integer|Long expected":i.actionData!=null&&i.hasOwnProperty("actionData")&&!$util.isString(i.actionData)?"actionData: string expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.ReportInfoReq)return i;let c=new $root.com.quick.voice.proto.ReportInfoReq;return i.actionEvent!=null&&(c.actionEvent=String(i.actionEvent)),i.userId!=null&&(c.userId=String(i.userId)),i.platform!=null&&(c.platform=String(i.platform)),i.time!=null&&($util.Long?(c.time=$util.Long.fromValue(i.time)).unsigned=!1:typeof i.time=="string"?c.time=parseInt(i.time,10):typeof i.time=="number"?c.time=i.time:typeof i.time=="object"&&(c.time=new $util.LongBits(i.time.low>>>0,i.time.high>>>0).toNumber())),i.actionData!=null&&(c.actionData=String(i.actionData)),c},f.toObject=function(i,c){c||(c={});let $={};if(c.defaults){if($.actionEvent="",$.userId="",$.platform="",$util.Long){let C=new $util.Long(0,0,!1);$.time=c.longs===String?C.toString():c.longs===Number?C.toNumber():C}else $.time=c.longs===String?"0":0;$.actionData=""}return i.actionEvent!=null&&i.hasOwnProperty("actionEvent")&&($.actionEvent=i.actionEvent),i.userId!=null&&i.hasOwnProperty("userId")&&($.userId=i.userId),i.platform!=null&&i.hasOwnProperty("platform")&&($.platform=i.platform),i.time!=null&&i.hasOwnProperty("time")&&(typeof i.time=="number"?$.time=c.longs===String?String(i.time):i.time:$.time=c.longs===String?$util.Long.prototype.toString.call(i.time):c.longs===Number?new $util.LongBits(i.time.low>>>0,i.time.high>>>0).toNumber():i.time),i.actionData!=null&&i.hasOwnProperty("actionData")&&($.actionData=i.actionData),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.ReportInfoReq"},f}(),D.UpdatePermissions=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.prototype.user=null,f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),i.user!=null&&Object.hasOwnProperty.call(i,"user")&&$root.com.quick.voice.proto.User.encode(i.user,c.uint32(18).fork()).ldelim(),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.UpdatePermissions;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}case 2:{C.user=$root.com.quick.voice.proto.User.decode(i,i.uint32());break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId))return"roomId: string expected";if(i.user!=null&&i.hasOwnProperty("user")){let c=$root.com.quick.voice.proto.User.verify(i.user);if(c)return"user."+c}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.UpdatePermissions)return i;let c=new $root.com.quick.voice.proto.UpdatePermissions;if(i.roomId!=null&&(c.roomId=String(i.roomId)),i.user!=null){if(typeof i.user!="object")throw TypeError(".com.quick.voice.proto.UpdatePermissions.user: object expected");c.user=$root.com.quick.voice.proto.User.fromObject(i.user)}return c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.roomId="",$.user=null),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),i.user!=null&&i.hasOwnProperty("user")&&($.user=$root.com.quick.voice.proto.User.toObject(i.user,c)),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.UpdatePermissions"},f}(),D.CallType=function(){const f={},k=Object.create(f);return k[f[0]="Normal"]=0,k[f[1]="Meeting"]=1,k[f[2]="Live"]=2,k}(),D.QuitNotifyCode=function(){const f={},k=Object.create(f);return k[f[0]="NormalQuit"]=0,k[f[2021]="Timeout"]=2021,k[f[2011]="TokenExpired"]=2011,k[f[2022]="KickOut"]=2022,k[f[2023]="EndPk"]=2023,k[f[2024]="EndLive"]=2024,k}(),D.UserBehavior=function(){function f(k){if(k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.type=0,f.prototype.behavior=!1,f.create=function(i){return new f(i)},f.encode=function(i,c){return c||(c=$Writer.create()),i.type!=null&&Object.hasOwnProperty.call(i,"type")&&c.uint32(8).int32(i.type),i.behavior!=null&&Object.hasOwnProperty.call(i,"behavior")&&c.uint32(16).bool(i.behavior),c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.UserBehavior;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.type=i.int32();break}case 2:{C.behavior=i.bool();break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.type!=null&&i.hasOwnProperty("type"))switch(i.type){default:return"type: enum value expected";case 0:case 1:case 2:case 3:break}return i.behavior!=null&&i.hasOwnProperty("behavior")&&typeof i.behavior!="boolean"?"behavior: boolean expected":null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.UserBehavior)return i;let c=new $root.com.quick.voice.proto.UserBehavior;switch(i.type){default:if(typeof i.type=="number"){c.type=i.type;break}break;case"Microphone":case 0:c.type=0;break;case"Camera":case 1:c.type=1;break;case"Screen":case 2:c.type=2;break;case"SystemVoice":case 3:c.type=3;break}return i.behavior!=null&&(c.behavior=!!i.behavior),c},f.toObject=function(i,c){c||(c={});let $={};return c.defaults&&($.type=c.enums===String?"Microphone":0,$.behavior=!1),i.type!=null&&i.hasOwnProperty("type")&&($.type=c.enums===String?$root.com.quick.voice.proto.TrackType[i.type]===void 0?i.type:$root.com.quick.voice.proto.TrackType[i.type]:i.type),i.behavior!=null&&i.hasOwnProperty("behavior")&&($.behavior=i.behavior),$},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.UserBehavior"},f}(),D.PreventUser=function(){function f(k){if(this.behaviors=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.id="",f.prototype.behaviors=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.id!=null&&Object.hasOwnProperty.call(i,"id")&&c.uint32(10).string(i.id),i.behaviors!=null&&i.behaviors.length)for(let $=0;$<i.behaviors.length;++$)$root.com.quick.voice.proto.UserBehavior.encode(i.behaviors[$],c.uint32(18).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.PreventUser;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.id=i.string();break}case 2:{C.behaviors&&C.behaviors.length||(C.behaviors=[]),C.behaviors.push($root.com.quick.voice.proto.UserBehavior.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.id!=null&&i.hasOwnProperty("id")&&!$util.isString(i.id))return"id: string expected";if(i.behaviors!=null&&i.hasOwnProperty("behaviors")){if(!Array.isArray(i.behaviors))return"behaviors: array expected";for(let c=0;c<i.behaviors.length;++c){let $=$root.com.quick.voice.proto.UserBehavior.verify(i.behaviors[c]);if($)return"behaviors."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.PreventUser)return i;let c=new $root.com.quick.voice.proto.PreventUser;if(i.id!=null&&(c.id=String(i.id)),i.behaviors){if(!Array.isArray(i.behaviors))throw TypeError(".com.quick.voice.proto.PreventUser.behaviors: array expected");c.behaviors=[];for(let $=0;$<i.behaviors.length;++$){if(typeof i.behaviors[$]!="object")throw TypeError(".com.quick.voice.proto.PreventUser.behaviors: object expected");c.behaviors[$]=$root.com.quick.voice.proto.UserBehavior.fromObject(i.behaviors[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.behaviors=[]),c.defaults&&($.id=""),i.id!=null&&i.hasOwnProperty("id")&&($.id=i.id),i.behaviors&&i.behaviors.length){$.behaviors=[];for(let C=0;C<i.behaviors.length;++C)$.behaviors[C]=$root.com.quick.voice.proto.UserBehavior.toObject(i.behaviors[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.PreventUser"},f}(),D.PreventUsersBehaviorReq=function(){function f(k){if(this.users=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.prototype.users=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),i.users!=null&&i.users.length)for(let $=0;$<i.users.length;++$)$root.com.quick.voice.proto.PreventUser.encode(i.users[$],c.uint32(18).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.PreventUsersBehaviorReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}case 2:{C.users&&C.users.length||(C.users=[]),C.users.push($root.com.quick.voice.proto.PreventUser.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId))return"roomId: string expected";if(i.users!=null&&i.hasOwnProperty("users")){if(!Array.isArray(i.users))return"users: array expected";for(let c=0;c<i.users.length;++c){let $=$root.com.quick.voice.proto.PreventUser.verify(i.users[c]);if($)return"users."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.PreventUsersBehaviorReq)return i;let c=new $root.com.quick.voice.proto.PreventUsersBehaviorReq;if(i.roomId!=null&&(c.roomId=String(i.roomId)),i.users){if(!Array.isArray(i.users))throw TypeError(".com.quick.voice.proto.PreventUsersBehaviorReq.users: array expected");c.users=[];for(let $=0;$<i.users.length;++$){if(typeof i.users[$]!="object")throw TypeError(".com.quick.voice.proto.PreventUsersBehaviorReq.users: object expected");c.users[$]=$root.com.quick.voice.proto.PreventUser.fromObject(i.users[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.users=[]),c.defaults&&($.roomId=""),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),i.users&&i.users.length){$.users=[];for(let C=0;C<i.users.length;++C)$.users[C]=$root.com.quick.voice.proto.PreventUser.toObject(i.users[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.PreventUsersBehaviorReq"},f}(),D.PreventUsersBehaviorNotify=function(){function f(k){if(this.users=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.roomId="",f.prototype.users=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.roomId!=null&&Object.hasOwnProperty.call(i,"roomId")&&c.uint32(10).string(i.roomId),i.users!=null&&i.users.length)for(let $=0;$<i.users.length;++$)$root.com.quick.voice.proto.User.encode(i.users[$],c.uint32(18).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.PreventUsersBehaviorNotify;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.roomId=i.string();break}case 2:{C.users&&C.users.length||(C.users=[]),C.users.push($root.com.quick.voice.proto.User.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.roomId!=null&&i.hasOwnProperty("roomId")&&!$util.isString(i.roomId))return"roomId: string expected";if(i.users!=null&&i.hasOwnProperty("users")){if(!Array.isArray(i.users))return"users: array expected";for(let c=0;c<i.users.length;++c){let $=$root.com.quick.voice.proto.User.verify(i.users[c]);if($)return"users."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.PreventUsersBehaviorNotify)return i;let c=new $root.com.quick.voice.proto.PreventUsersBehaviorNotify;if(i.roomId!=null&&(c.roomId=String(i.roomId)),i.users){if(!Array.isArray(i.users))throw TypeError(".com.quick.voice.proto.PreventUsersBehaviorNotify.users: array expected");c.users=[];for(let $=0;$<i.users.length;++$){if(typeof i.users[$]!="object")throw TypeError(".com.quick.voice.proto.PreventUsersBehaviorNotify.users: object expected");c.users[$]=$root.com.quick.voice.proto.User.fromObject(i.users[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.users=[]),c.defaults&&($.roomId=""),i.roomId!=null&&i.hasOwnProperty("roomId")&&($.roomId=i.roomId),i.users&&i.users.length){$.users=[];for(let C=0;C<i.users.length;++C)$.users[C]=$root.com.quick.voice.proto.User.toObject(i.users[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.PreventUsersBehaviorNotify"},f}(),D.AccelerationAreas=function(){const f={},k=Object.create(f);return k[f[0]="chinaMainland"]=0,k[f[1]="global"]=1,k[f[2]="overseas"]=2,k}(),D.CountMethods=function(){const f={},k=Object.create(f);return k[f[0]="flow"]=0,k[f[1]="minutes"]=1,k}(),D.BaseCDNAddress=function(){function f(k){if(this.urlMap={},k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.area=0,f.prototype.countType=0,f.prototype.urlMap=$util.emptyObject,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.area!=null&&Object.hasOwnProperty.call(i,"area")&&c.uint32(8).int32(i.area),i.countType!=null&&Object.hasOwnProperty.call(i,"countType")&&c.uint32(16).int32(i.countType),i.urlMap!=null&&Object.hasOwnProperty.call(i,"urlMap"))for(let $=Object.keys(i.urlMap),C=0;C<$.length;++C)c.uint32(26).fork().uint32(10).string($[C]).uint32(18).string(i.urlMap[$[C]]).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.BaseCDNAddress,M,Z;for(;i.pos<$;){let J=i.uint32();switch(J>>>3){case 1:{C.area=i.int32();break}case 2:{C.countType=i.int32();break}case 3:{C.urlMap===$util.emptyObject&&(C.urlMap={});let z=i.uint32()+i.pos;for(M="",Z="";i.pos<z;){let Q=i.uint32();switch(Q>>>3){case 1:M=i.string();break;case 2:Z=i.string();break;default:i.skipType(Q&7);break}}C.urlMap[M]=Z;break}default:i.skipType(J&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.area!=null&&i.hasOwnProperty("area"))switch(i.area){default:return"area: enum value expected";case 0:case 1:case 2:break}if(i.countType!=null&&i.hasOwnProperty("countType"))switch(i.countType){default:return"countType: enum value expected";case 0:case 1:break}if(i.urlMap!=null&&i.hasOwnProperty("urlMap")){if(!$util.isObject(i.urlMap))return"urlMap: object expected";let c=Object.keys(i.urlMap);for(let $=0;$<c.length;++$)if(!$util.isString(i.urlMap[c[$]]))return"urlMap: string{k:string} expected"}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.BaseCDNAddress)return i;let c=new $root.com.quick.voice.proto.BaseCDNAddress;switch(i.area){default:if(typeof i.area=="number"){c.area=i.area;break}break;case"chinaMainland":case 0:c.area=0;break;case"global":case 1:c.area=1;break;case"overseas":case 2:c.area=2;break}switch(i.countType){default:if(typeof i.countType=="number"){c.countType=i.countType;break}break;case"flow":case 0:c.countType=0;break;case"minutes":case 1:c.countType=1;break}if(i.urlMap){if(typeof i.urlMap!="object")throw TypeError(".com.quick.voice.proto.BaseCDNAddress.urlMap: object expected");c.urlMap={};for(let $=Object.keys(i.urlMap),C=0;C<$.length;++C)c.urlMap[$[C]]=String(i.urlMap[$[C]])}return c},f.toObject=function(i,c){c||(c={});let $={};(c.objects||c.defaults)&&($.urlMap={}),c.defaults&&($.area=c.enums===String?"chinaMainland":0,$.countType=c.enums===String?"flow":0),i.area!=null&&i.hasOwnProperty("area")&&($.area=c.enums===String?$root.com.quick.voice.proto.AccelerationAreas[i.area]===void 0?i.area:$root.com.quick.voice.proto.AccelerationAreas[i.area]:i.area),i.countType!=null&&i.hasOwnProperty("countType")&&($.countType=c.enums===String?$root.com.quick.voice.proto.CountMethods[i.countType]===void 0?i.countType:$root.com.quick.voice.proto.CountMethods[i.countType]:i.countType);let C;if(i.urlMap&&(C=Object.keys(i.urlMap)).length){$.urlMap={};for(let M=0;M<C.length;++M)$.urlMap[C[M]]=i.urlMap[C[M]]}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.BaseCDNAddress"},f}(),D.CDNPlayAddressNotify=function(){function f(i){if(this.standLines=[],i)for(let c=Object.keys(i),$=0;$<c.length;++$)i[c[$]]!=null&&(this[c[$]]=i[c[$]])}f.prototype.roomId="",f.prototype.m3u8=null,f.prototype.rtmp=null,f.prototype.flv=null,f.prototype.rtmps=null,f.prototype.mainLine=null,f.prototype.standLines=$util.emptyArray;let k;return Object.defineProperty(f.prototype,"_m3u8",{get:$util.oneOfGetter(k=["m3u8"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_rtmp",{get:$util.oneOfGetter(k=["rtmp"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_flv",{get:$util.oneOfGetter(k=["flv"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_rtmps",{get:$util.oneOfGetter(k=["rtmps"]),set:$util.oneOfSetter(k)}),Object.defineProperty(f.prototype,"_mainLine",{get:$util.oneOfGetter(k=["mainLine"]),set:$util.oneOfSetter(k)}),f.create=function(c){return new f(c)},f.encode=function(c,$){if($||($=$Writer.create()),c.roomId!=null&&Object.hasOwnProperty.call(c,"roomId")&&$.uint32(10).string(c.roomId),c.m3u8!=null&&Object.hasOwnProperty.call(c,"m3u8")&&$.uint32(18).string(c.m3u8),c.rtmp!=null&&Object.hasOwnProperty.call(c,"rtmp")&&$.uint32(26).string(c.rtmp),c.flv!=null&&Object.hasOwnProperty.call(c,"flv")&&$.uint32(34).string(c.flv),c.rtmps!=null&&Object.hasOwnProperty.call(c,"rtmps")&&$.uint32(42).string(c.rtmps),c.mainLine!=null&&Object.hasOwnProperty.call(c,"mainLine")&&$root.com.quick.voice.proto.BaseCDNAddress.encode(c.mainLine,$.uint32(50).fork()).ldelim(),c.standLines!=null&&c.standLines.length)for(let C=0;C<c.standLines.length;++C)$root.com.quick.voice.proto.BaseCDNAddress.encode(c.standLines[C],$.uint32(58).fork()).ldelim();return $},f.encodeDelimited=function(c,$){return this.encode(c,$).ldelim()},f.decode=function(c,$){c instanceof $Reader||(c=$Reader.create(c));let C=$===void 0?c.len:c.pos+$,M=new $root.com.quick.voice.proto.CDNPlayAddressNotify;for(;c.pos<C;){let Z=c.uint32();switch(Z>>>3){case 1:{M.roomId=c.string();break}case 2:{M.m3u8=c.string();break}case 3:{M.rtmp=c.string();break}case 4:{M.flv=c.string();break}case 5:{M.rtmps=c.string();break}case 6:{M.mainLine=$root.com.quick.voice.proto.BaseCDNAddress.decode(c,c.uint32());break}case 7:{M.standLines&&M.standLines.length||(M.standLines=[]),M.standLines.push($root.com.quick.voice.proto.BaseCDNAddress.decode(c,c.uint32()));break}default:c.skipType(Z&7);break}}return M},f.decodeDelimited=function(c){return c instanceof $Reader||(c=new $Reader(c)),this.decode(c,c.uint32())},f.verify=function(c){if(typeof c!="object"||c===null)return"object expected";if(c.roomId!=null&&c.hasOwnProperty("roomId")&&!$util.isString(c.roomId))return"roomId: string expected";if(c.m3u8!=null&&c.hasOwnProperty("m3u8")&&!$util.isString(c.m3u8))return"m3u8: string expected";if(c.rtmp!=null&&c.hasOwnProperty("rtmp")&&!$util.isString(c.rtmp))return"rtmp: string expected";if(c.flv!=null&&c.hasOwnProperty("flv")&&!$util.isString(c.flv))return"flv: string expected";if(c.rtmps!=null&&c.hasOwnProperty("rtmps")&&!$util.isString(c.rtmps))return"rtmps: string expected";if(c.mainLine!=null&&c.hasOwnProperty("mainLine")){let $=$root.com.quick.voice.proto.BaseCDNAddress.verify(c.mainLine);if($)return"mainLine."+$}if(c.standLines!=null&&c.hasOwnProperty("standLines")){if(!Array.isArray(c.standLines))return"standLines: array expected";for(let $=0;$<c.standLines.length;++$){let C=$root.com.quick.voice.proto.BaseCDNAddress.verify(c.standLines[$]);if(C)return"standLines."+C}}return null},f.fromObject=function(c){if(c instanceof $root.com.quick.voice.proto.CDNPlayAddressNotify)return c;let $=new $root.com.quick.voice.proto.CDNPlayAddressNotify;if(c.roomId!=null&&($.roomId=String(c.roomId)),c.m3u8!=null&&($.m3u8=String(c.m3u8)),c.rtmp!=null&&($.rtmp=String(c.rtmp)),c.flv!=null&&($.flv=String(c.flv)),c.rtmps!=null&&($.rtmps=String(c.rtmps)),c.mainLine!=null){if(typeof c.mainLine!="object")throw TypeError(".com.quick.voice.proto.CDNPlayAddressNotify.mainLine: object expected");$.mainLine=$root.com.quick.voice.proto.BaseCDNAddress.fromObject(c.mainLine)}if(c.standLines){if(!Array.isArray(c.standLines))throw TypeError(".com.quick.voice.proto.CDNPlayAddressNotify.standLines: array expected");$.standLines=[];for(let C=0;C<c.standLines.length;++C){if(typeof c.standLines[C]!="object")throw TypeError(".com.quick.voice.proto.CDNPlayAddressNotify.standLines: object expected");$.standLines[C]=$root.com.quick.voice.proto.BaseCDNAddress.fromObject(c.standLines[C])}}return $},f.toObject=function(c,$){$||($={});let C={};if(($.arrays||$.defaults)&&(C.standLines=[]),$.defaults&&(C.roomId=""),c.roomId!=null&&c.hasOwnProperty("roomId")&&(C.roomId=c.roomId),c.m3u8!=null&&c.hasOwnProperty("m3u8")&&(C.m3u8=c.m3u8,$.oneofs&&(C._m3u8="m3u8")),c.rtmp!=null&&c.hasOwnProperty("rtmp")&&(C.rtmp=c.rtmp,$.oneofs&&(C._rtmp="rtmp")),c.flv!=null&&c.hasOwnProperty("flv")&&(C.flv=c.flv,$.oneofs&&(C._flv="flv")),c.rtmps!=null&&c.hasOwnProperty("rtmps")&&(C.rtmps=c.rtmps,$.oneofs&&(C._rtmps="rtmps")),c.mainLine!=null&&c.hasOwnProperty("mainLine")&&(C.mainLine=$root.com.quick.voice.proto.BaseCDNAddress.toObject(c.mainLine,$),$.oneofs&&(C._mainLine="mainLine")),c.standLines&&c.standLines.length){C.standLines=[];for(let M=0;M<c.standLines.length;++M)C.standLines[M]=$root.com.quick.voice.proto.BaseCDNAddress.toObject(c.standLines[M],$)}return C},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(c){return c===void 0&&(c="type.googleapis.com"),c+"/com.quick.voice.proto.CDNPlayAddressNotify"},f}(),D.UserChannel=function(){function f(k){if(this.channels=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.userId="",f.prototype.channels=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.userId!=null&&Object.hasOwnProperty.call(i,"userId")&&c.uint32(10).string(i.userId),i.channels!=null&&i.channels.length)for(let $=0;$<i.channels.length;++$)$root.com.quick.voice.proto.DataChannel.encode(i.channels[$],c.uint32(18).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.UserChannel;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.userId=i.string();break}case 2:{C.channels&&C.channels.length||(C.channels=[]),C.channels.push($root.com.quick.voice.proto.DataChannel.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.userId!=null&&i.hasOwnProperty("userId")&&!$util.isString(i.userId))return"userId: string expected";if(i.channels!=null&&i.hasOwnProperty("channels")){if(!Array.isArray(i.channels))return"channels: array expected";for(let c=0;c<i.channels.length;++c){let $=$root.com.quick.voice.proto.DataChannel.verify(i.channels[c]);if($)return"channels."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.UserChannel)return i;let c=new $root.com.quick.voice.proto.UserChannel;if(i.userId!=null&&(c.userId=String(i.userId)),i.channels){if(!Array.isArray(i.channels))throw TypeError(".com.quick.voice.proto.UserChannel.channels: array expected");c.channels=[];for(let $=0;$<i.channels.length;++$){if(typeof i.channels[$]!="object")throw TypeError(".com.quick.voice.proto.UserChannel.channels: object expected");c.channels[$]=$root.com.quick.voice.proto.DataChannel.fromObject(i.channels[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.channels=[]),c.defaults&&($.userId=""),i.userId!=null&&i.hasOwnProperty("userId")&&($.userId=i.userId),i.channels&&i.channels.length){$.channels=[];for(let C=0;C<i.channels.length;++C)$.channels[C]=$root.com.quick.voice.proto.DataChannel.toObject(i.channels[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.UserChannel"},f}(),D.ChannelPublishReq=function(){function f(k){if(this.channels=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.channels=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.channels!=null&&i.channels.length)for(let $=0;$<i.channels.length;++$)$root.com.quick.voice.proto.DataChannel.encode(i.channels[$],c.uint32(10).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.ChannelPublishReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.channels&&C.channels.length||(C.channels=[]),C.channels.push($root.com.quick.voice.proto.DataChannel.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.channels!=null&&i.hasOwnProperty("channels")){if(!Array.isArray(i.channels))return"channels: array expected";for(let c=0;c<i.channels.length;++c){let $=$root.com.quick.voice.proto.DataChannel.verify(i.channels[c]);if($)return"channels."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.ChannelPublishReq)return i;let c=new $root.com.quick.voice.proto.ChannelPublishReq;if(i.channels){if(!Array.isArray(i.channels))throw TypeError(".com.quick.voice.proto.ChannelPublishReq.channels: array expected");c.channels=[];for(let $=0;$<i.channels.length;++$){if(typeof i.channels[$]!="object")throw TypeError(".com.quick.voice.proto.ChannelPublishReq.channels: object expected");c.channels[$]=$root.com.quick.voice.proto.DataChannel.fromObject(i.channels[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.channels=[]),i.channels&&i.channels.length){$.channels=[];for(let C=0;C<i.channels.length;++C)$.channels[C]=$root.com.quick.voice.proto.DataChannel.toObject(i.channels[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.ChannelPublishReq"},f}(),D.ChannelPublishRsq=function(){function f(k){if(this.channels=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.channels=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.channels!=null&&i.channels.length)for(let $=0;$<i.channels.length;++$)$root.com.quick.voice.proto.UserChannel.encode(i.channels[$],c.uint32(10).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.ChannelPublishRsq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.channels&&C.channels.length||(C.channels=[]),C.channels.push($root.com.quick.voice.proto.UserChannel.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.channels!=null&&i.hasOwnProperty("channels")){if(!Array.isArray(i.channels))return"channels: array expected";for(let c=0;c<i.channels.length;++c){let $=$root.com.quick.voice.proto.UserChannel.verify(i.channels[c]);if($)return"channels."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.ChannelPublishRsq)return i;let c=new $root.com.quick.voice.proto.ChannelPublishRsq;if(i.channels){if(!Array.isArray(i.channels))throw TypeError(".com.quick.voice.proto.ChannelPublishRsq.channels: array expected");c.channels=[];for(let $=0;$<i.channels.length;++$){if(typeof i.channels[$]!="object")throw TypeError(".com.quick.voice.proto.ChannelPublishRsq.channels: object expected");c.channels[$]=$root.com.quick.voice.proto.UserChannel.fromObject(i.channels[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.channels=[]),i.channels&&i.channels.length){$.channels=[];for(let C=0;C<i.channels.length;++C)$.channels[C]=$root.com.quick.voice.proto.UserChannel.toObject(i.channels[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.ChannelPublishRsq"},f}(),D.ChannelSubscribeReq=function(){function f(k){if(this.users=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.users=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.users!=null&&i.users.length)for(let $=0;$<i.users.length;++$)$root.com.quick.voice.proto.UserChannel.encode(i.users[$],c.uint32(10).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.ChannelSubscribeReq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.users&&C.users.length||(C.users=[]),C.users.push($root.com.quick.voice.proto.UserChannel.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.users!=null&&i.hasOwnProperty("users")){if(!Array.isArray(i.users))return"users: array expected";for(let c=0;c<i.users.length;++c){let $=$root.com.quick.voice.proto.UserChannel.verify(i.users[c]);if($)return"users."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.ChannelSubscribeReq)return i;let c=new $root.com.quick.voice.proto.ChannelSubscribeReq;if(i.users){if(!Array.isArray(i.users))throw TypeError(".com.quick.voice.proto.ChannelSubscribeReq.users: array expected");c.users=[];for(let $=0;$<i.users.length;++$){if(typeof i.users[$]!="object")throw TypeError(".com.quick.voice.proto.ChannelSubscribeReq.users: object expected");c.users[$]=$root.com.quick.voice.proto.UserChannel.fromObject(i.users[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.users=[]),i.users&&i.users.length){$.users=[];for(let C=0;C<i.users.length;++C)$.users[C]=$root.com.quick.voice.proto.UserChannel.toObject(i.users[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.ChannelSubscribeReq"},f}(),D.ChannelSubscribeRsq=function(){function f(k){if(this.channels=[],k)for(let i=Object.keys(k),c=0;c<i.length;++c)k[i[c]]!=null&&(this[i[c]]=k[i[c]])}return f.prototype.channels=$util.emptyArray,f.create=function(i){return new f(i)},f.encode=function(i,c){if(c||(c=$Writer.create()),i.channels!=null&&i.channels.length)for(let $=0;$<i.channels.length;++$)$root.com.quick.voice.proto.UserChannel.encode(i.channels[$],c.uint32(10).fork()).ldelim();return c},f.encodeDelimited=function(i,c){return this.encode(i,c).ldelim()},f.decode=function(i,c){i instanceof $Reader||(i=$Reader.create(i));let $=c===void 0?i.len:i.pos+c,C=new $root.com.quick.voice.proto.ChannelSubscribeRsq;for(;i.pos<$;){let M=i.uint32();switch(M>>>3){case 1:{C.channels&&C.channels.length||(C.channels=[]),C.channels.push($root.com.quick.voice.proto.UserChannel.decode(i,i.uint32()));break}default:i.skipType(M&7);break}}return C},f.decodeDelimited=function(i){return i instanceof $Reader||(i=new $Reader(i)),this.decode(i,i.uint32())},f.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.channels!=null&&i.hasOwnProperty("channels")){if(!Array.isArray(i.channels))return"channels: array expected";for(let c=0;c<i.channels.length;++c){let $=$root.com.quick.voice.proto.UserChannel.verify(i.channels[c]);if($)return"channels."+$}}return null},f.fromObject=function(i){if(i instanceof $root.com.quick.voice.proto.ChannelSubscribeRsq)return i;let c=new $root.com.quick.voice.proto.ChannelSubscribeRsq;if(i.channels){if(!Array.isArray(i.channels))throw TypeError(".com.quick.voice.proto.ChannelSubscribeRsq.channels: array expected");c.channels=[];for(let $=0;$<i.channels.length;++$){if(typeof i.channels[$]!="object")throw TypeError(".com.quick.voice.proto.ChannelSubscribeRsq.channels: object expected");c.channels[$]=$root.com.quick.voice.proto.UserChannel.fromObject(i.channels[$])}}return c},f.toObject=function(i,c){c||(c={});let $={};if((c.arrays||c.defaults)&&($.channels=[]),i.channels&&i.channels.length){$.channels=[];for(let C=0;C<i.channels.length;++C)$.channels[C]=$root.com.quick.voice.proto.UserChannel.toObject(i.channels[C],c)}return $},f.prototype.toJSON=function(){return this.constructor.toObject(this,minimalExports.util.toJSONOptions)},f.getTypeUrl=function(i){return i===void 0&&(i="type.googleapis.com"),i+"/com.quick.voice.proto.ChannelSubscribeRsq"},f}(),D}(),I}(),N}(),O})(),enum_notifyName={onChangeNetwork:"网络情况变更",healthCheck:"心跳检测",onNetQuality:"网络质量回调",onLogin:"登录回调",onLocalStream:"本地媒体流发生变化",onDevicechange:"媒体设备发生变化",onRoomUser:"房间用户变化",onRoomUsers:"房间所有用户所有变化",onRoomUsersStreams:"房间某些用户媒体流变化",onRoomState:"房间状态变化",onJoinRoom:"加入房间回调",onQuitRoom:"退出房间回调",onPublish:"监听到流发布",onDataChannelPublish:"监听数据通道发布",onCloseTrack:"关闭轨道",onUpdateCall:"更新通讯状态",onUpdateStreams:"更新媒体流",onUpdatePermissions:"更新推流权限通知",onTokenExpired:"Token已过期",onDestroyRoom:"直播模式房间销毁",onUpdateBehavior:"行为允许权限变更",destroyRoom:"服务器要求销毁房间",onCDNPlayUrlAdd:"cdn播放地址变化",onDestroy:"SDK销毁"};ht(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(O){let N=O.length;for(;--N>=0;)O[N]=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(O,N,I,D,f){this.static_tree=O,this.extra_bits=N,this.extra_base=I,this.elems=D,this.max_length=f,this.has_stree=O&&O.length}let static_l_desc,static_d_desc,static_bl_desc;function TreeDesc(O,N){this.dyn_tree=O,this.max_code=0,this.stat_desc=N}const d_code=O=>O<256?_dist_code[O]:_dist_code[256+(O>>>7)],put_short=(O,N)=>{O.pending_buf[O.pending++]=N&255,O.pending_buf[O.pending++]=N>>>8&255},send_bits=(O,N,I)=>{O.bi_valid>Buf_size-I?(O.bi_buf|=N<<O.bi_valid&65535,put_short(O,O.bi_buf),O.bi_buf=N>>Buf_size-O.bi_valid,O.bi_valid+=I-Buf_size):(O.bi_buf|=N<<O.bi_valid&65535,O.bi_valid+=I)},send_code=(O,N,I)=>{send_bits(O,I[N*2],I[N*2+1])},bi_reverse=(O,N)=>{let I=0;do I|=O&1,O>>>=1,I<<=1;while(--N>0);return I>>>1},bi_flush=O=>{O.bi_valid===16?(put_short(O,O.bi_buf),O.bi_buf=0,O.bi_valid=0):O.bi_valid>=8&&(O.pending_buf[O.pending++]=O.bi_buf&255,O.bi_buf>>=8,O.bi_valid-=8)},gen_bitlen=(O,N)=>{const I=N.dyn_tree,D=N.max_code,f=N.stat_desc.static_tree,k=N.stat_desc.has_stree,i=N.stat_desc.extra_bits,c=N.stat_desc.extra_base,$=N.stat_desc.max_length;let C,M,Z,J,z,Q,ee=0;for(J=0;J<=MAX_BITS$1;J++)O.bl_count[J]=0;for(I[O.heap[O.heap_max]*2+1]=0,C=O.heap_max+1;C<HEAP_SIZE$1;C++)M=O.heap[C],J=I[I[M*2+1]*2+1]+1,J>$&&(J=$,ee++),I[M*2+1]=J,!(M>D)&&(O.bl_count[J]++,z=0,M>=c&&(z=i[M-c]),Q=I[M*2],O.opt_len+=Q*(J+z),k&&(O.static_len+=Q*(f[M*2+1]+z)));if(ee!==0){do{for(J=$-1;O.bl_count[J]===0;)J--;O.bl_count[J]--,O.bl_count[J+1]+=2,O.bl_count[$]--,ee-=2}while(ee>0);for(J=$;J!==0;J--)for(M=O.bl_count[J];M!==0;)Z=O.heap[--C],!(Z>D)&&(I[Z*2+1]!==J&&(O.opt_len+=(J-I[Z*2+1])*I[Z*2],I[Z*2+1]=J),M--)}},gen_codes=(O,N,I)=>{const D=new Array(MAX_BITS$1+1);let f=0,k,i;for(k=1;k<=MAX_BITS$1;k++)f=f+I[k-1]<<1,D[k]=f;for(i=0;i<=N;i++){let c=O[i*2+1];c!==0&&(O[i*2]=bi_reverse(D[c]++,c))}},tr_static_init=()=>{let O,N,I,D,f;const k=new Array(MAX_BITS$1+1);for(I=0,D=0;D<LENGTH_CODES$1-1;D++)for(base_length[D]=I,O=0;O<1<<extra_lbits[D];O++)_length_code[I++]=D;for(_length_code[I-1]=D,f=0,D=0;D<16;D++)for(base_dist[D]=f,O=0;O<1<<extra_dbits[D];O++)_dist_code[f++]=D;for(f>>=7;D<D_CODES$1;D++)for(base_dist[D]=f<<7,O=0;O<1<<extra_dbits[D]-7;O++)_dist_code[256+f++]=D;for(N=0;N<=MAX_BITS$1;N++)k[N]=0;for(O=0;O<=143;)static_ltree[O*2+1]=8,O++,k[8]++;for(;O<=255;)static_ltree[O*2+1]=9,O++,k[9]++;for(;O<=279;)static_ltree[O*2+1]=7,O++,k[7]++;for(;O<=287;)static_ltree[O*2+1]=8,O++,k[8]++;for(gen_codes(static_ltree,L_CODES$1+1,k),O=0;O<D_CODES$1;O++)static_dtree[O*2+1]=5,static_dtree[O*2]=bi_reverse(O,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=O=>{let N;for(N=0;N<L_CODES$1;N++)O.dyn_ltree[N*2]=0;for(N=0;N<D_CODES$1;N++)O.dyn_dtree[N*2]=0;for(N=0;N<BL_CODES$1;N++)O.bl_tree[N*2]=0;O.dyn_ltree[END_BLOCK*2]=1,O.opt_len=O.static_len=0,O.sym_next=O.matches=0},bi_windup=O=>{O.bi_valid>8?put_short(O,O.bi_buf):O.bi_valid>0&&(O.pending_buf[O.pending++]=O.bi_buf),O.bi_buf=0,O.bi_valid=0},smaller=(O,N,I,D)=>{const f=N*2,k=I*2;return O[f]<O[k]||O[f]===O[k]&&D[N]<=D[I]},pqdownheap=(O,N,I)=>{const D=O.heap[I];let f=I<<1;for(;f<=O.heap_len&&(f<O.heap_len&&smaller(N,O.heap[f+1],O.heap[f],O.depth)&&f++,!smaller(N,D,O.heap[f],O.depth));)O.heap[I]=O.heap[f],I=f,f<<=1;O.heap[I]=D},compress_block=(O,N,I)=>{let D,f,k=0,i,c;if(O.sym_next!==0)do D=O.pending_buf[O.sym_buf+k++]&255,D+=(O.pending_buf[O.sym_buf+k++]&255)<<8,f=O.pending_buf[O.sym_buf+k++],D===0?send_code(O,f,N):(i=_length_code[f],send_code(O,i+LITERALS$1+1,N),c=extra_lbits[i],c!==0&&(f-=base_length[i],send_bits(O,f,c)),D--,i=d_code(D),send_code(O,i,I),c=extra_dbits[i],c!==0&&(D-=base_dist[i],send_bits(O,D,c)));while(k<O.sym_next);send_code(O,END_BLOCK,N)},build_tree=(O,N)=>{const I=N.dyn_tree,D=N.stat_desc.static_tree,f=N.stat_desc.has_stree,k=N.stat_desc.elems;let i,c,$=-1,C;for(O.heap_len=0,O.heap_max=HEAP_SIZE$1,i=0;i<k;i++)I[i*2]!==0?(O.heap[++O.heap_len]=$=i,O.depth[i]=0):I[i*2+1]=0;for(;O.heap_len<2;)C=O.heap[++O.heap_len]=$<2?++$:0,I[C*2]=1,O.depth[C]=0,O.opt_len--,f&&(O.static_len-=D[C*2+1]);for(N.max_code=$,i=O.heap_len>>1;i>=1;i--)pqdownheap(O,I,i);C=k;do i=O.heap[1],O.heap[1]=O.heap[O.heap_len--],pqdownheap(O,I,1),c=O.heap[1],O.heap[--O.heap_max]=i,O.heap[--O.heap_max]=c,I[C*2]=I[i*2]+I[c*2],O.depth[C]=(O.depth[i]>=O.depth[c]?O.depth[i]:O.depth[c])+1,I[i*2+1]=I[c*2+1]=C,O.heap[1]=C++,pqdownheap(O,I,1);while(O.heap_len>=2);O.heap[--O.heap_max]=O.heap[1],gen_bitlen(O,N),gen_codes(I,$,O.bl_count)},scan_tree=(O,N,I)=>{let D,f=-1,k,i=N[0*2+1],c=0,$=7,C=4;for(i===0&&($=138,C=3),N[(I+1)*2+1]=65535,D=0;D<=I;D++)k=i,i=N[(D+1)*2+1],!(++c<$&&k===i)&&(c<C?O.bl_tree[k*2]+=c:k!==0?(k!==f&&O.bl_tree[k*2]++,O.bl_tree[REP_3_6*2]++):c<=10?O.bl_tree[REPZ_3_10*2]++:O.bl_tree[REPZ_11_138*2]++,c=0,f=k,i===0?($=138,C=3):k===i?($=6,C=3):($=7,C=4))},send_tree=(O,N,I)=>{let D,f=-1,k,i=N[0*2+1],c=0,$=7,C=4;for(i===0&&($=138,C=3),D=0;D<=I;D++)if(k=i,i=N[(D+1)*2+1],!(++c<$&&k===i)){if(c<C)do send_code(O,k,O.bl_tree);while(--c!==0);else k!==0?(k!==f&&(send_code(O,k,O.bl_tree),c--),send_code(O,REP_3_6,O.bl_tree),send_bits(O,c-3,2)):c<=10?(send_code(O,REPZ_3_10,O.bl_tree),send_bits(O,c-3,3)):(send_code(O,REPZ_11_138,O.bl_tree),send_bits(O,c-11,7));c=0,f=k,i===0?($=138,C=3):k===i?($=6,C=3):($=7,C=4)}},build_bl_tree=O=>{let N;for(scan_tree(O,O.dyn_ltree,O.l_desc.max_code),scan_tree(O,O.dyn_dtree,O.d_desc.max_code),build_tree(O,O.bl_desc),N=BL_CODES$1-1;N>=3&&O.bl_tree[bl_order[N]*2+1]===0;N--);return O.opt_len+=3*(N+1)+5+5+4,N},send_all_trees=(O,N,I,D)=>{let f;for(send_bits(O,N-257,5),send_bits(O,I-1,5),send_bits(O,D-4,4),f=0;f<D;f++)send_bits(O,O.bl_tree[bl_order[f]*2+1],3);send_tree(O,O.dyn_ltree,N-1),send_tree(O,O.dyn_dtree,I-1)},detect_data_type=O=>{let N=4093624447,I;for(I=0;I<=31;I++,N>>>=1)if(N&1&&O.dyn_ltree[I*2]!==0)return Z_BINARY;if(O.dyn_ltree[9*2]!==0||O.dyn_ltree[10*2]!==0||O.dyn_ltree[13*2]!==0)return Z_TEXT;for(I=32;I<LITERALS$1;I++)if(O.dyn_ltree[I*2]!==0)return Z_TEXT;return Z_BINARY};let static_init_done=!1;const _tr_init$1=O=>{static_init_done||(tr_static_init(),static_init_done=!0),O.l_desc=new TreeDesc(O.dyn_ltree,static_l_desc),O.d_desc=new TreeDesc(O.dyn_dtree,static_d_desc),O.bl_desc=new TreeDesc(O.bl_tree,static_bl_desc),O.bi_buf=0,O.bi_valid=0,init_block(O)},_tr_stored_block$1=(O,N,I,D)=>{send_bits(O,(STORED_BLOCK<<1)+(D?1:0),3),bi_windup(O),put_short(O,I),put_short(O,~I),I&&O.pending_buf.set(O.window.subarray(N,N+I),O.pending),O.pending+=I},_tr_align$1=O=>{send_bits(O,STATIC_TREES<<1,3),send_code(O,END_BLOCK,static_ltree),bi_flush(O)},_tr_flush_block$1=(O,N,I,D)=>{let f,k,i=0;O.level>0?(O.strm.data_type===Z_UNKNOWN$1&&(O.strm.data_type=detect_data_type(O)),build_tree(O,O.l_desc),build_tree(O,O.d_desc),i=build_bl_tree(O),f=O.opt_len+3+7>>>3,k=O.static_len+3+7>>>3,k<=f&&(f=k)):f=k=I+5,I+4<=f&&N!==-1?_tr_stored_block$1(O,N,I,D):O.strategy===Z_FIXED$1||k===f?(send_bits(O,(STATIC_TREES<<1)+(D?1:0),3),compress_block(O,static_ltree,static_dtree)):(send_bits(O,(DYN_TREES<<1)+(D?1:0),3),send_all_trees(O,O.l_desc.max_code+1,O.d_desc.max_code+1,i+1),compress_block(O,O.dyn_ltree,O.dyn_dtree)),init_block(O),D&&bi_windup(O)},_tr_tally$1=(O,N,I)=>(O.pending_buf[O.sym_buf+O.sym_next++]=N,O.pending_buf[O.sym_buf+O.sym_next++]=N>>8,O.pending_buf[O.sym_buf+O.sym_next++]=I,N===0?O.dyn_ltree[I*2]++:(O.matches++,N--,O.dyn_ltree[(_length_code[I]+LITERALS$1+1)*2]++,O.dyn_dtree[d_code(N)*2]++),O.sym_next===O.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=(O,N,I,D)=>{let f=O&65535|0,k=O>>>16&65535|0,i=0;for(;I!==0;){i=I>2e3?2e3:I,I-=i;do f=f+N[D++]|0,k=k+f|0;while(--i);f%=65521,k%=65521}return f|k<<16|0};var adler32_1=adler32;const makeTable=()=>{let O,N=[];for(var I=0;I<256;I++){O=I;for(var D=0;D<8;D++)O=O&1?3988292384^O>>>1:O>>>1;N[I]=O}return N},crcTable=new Uint32Array(makeTable()),crc32=(O,N,I,D)=>{const f=crcTable,k=D+I;O^=-1;for(let i=D;i<k;i++)O=O>>>8^f[(O^N[i])&255];return O^-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=(O,N)=>(O.msg=messages[N],N),rank=O=>O*2-(O>4?9:0),zero=O=>{let N=O.length;for(;--N>=0;)O[N]=0},slide_hash=O=>{let N,I,D,f=O.w_size;N=O.hash_size,D=N;do I=O.head[--D],O.head[D]=I>=f?I-f:0;while(--N);N=f,D=N;do I=O.prev[--D],O.prev[D]=I>=f?I-f:0;while(--N)};let HASH_ZLIB=(O,N,I)=>(N<<O.hash_shift^I)&O.hash_mask,HASH=HASH_ZLIB;const flush_pending=O=>{const N=O.state;let I=N.pending;I>O.avail_out&&(I=O.avail_out),I!==0&&(O.output.set(N.pending_buf.subarray(N.pending_out,N.pending_out+I),O.next_out),O.next_out+=I,N.pending_out+=I,O.total_out+=I,O.avail_out-=I,N.pending-=I,N.pending===0&&(N.pending_out=0))},flush_block_only=(O,N)=>{_tr_flush_block(O,O.block_start>=0?O.block_start:-1,O.strstart-O.block_start,N),O.block_start=O.strstart,flush_pending(O.strm)},put_byte=(O,N)=>{O.pending_buf[O.pending++]=N},putShortMSB=(O,N)=>{O.pending_buf[O.pending++]=N>>>8&255,O.pending_buf[O.pending++]=N&255},read_buf=(O,N,I,D)=>{let f=O.avail_in;return f>D&&(f=D),f===0?0:(O.avail_in-=f,N.set(O.input.subarray(O.next_in,O.next_in+f),I),O.state.wrap===1?O.adler=adler32_1(O.adler,N,f,I):O.state.wrap===2&&(O.adler=crc32_1(O.adler,N,f,I)),O.next_in+=f,O.total_in+=f,f)},longest_match=(O,N)=>{let I=O.max_chain_length,D=O.strstart,f,k,i=O.prev_length,c=O.nice_match;const $=O.strstart>O.w_size-MIN_LOOKAHEAD?O.strstart-(O.w_size-MIN_LOOKAHEAD):0,C=O.window,M=O.w_mask,Z=O.prev,J=O.strstart+MAX_MATCH;let z=C[D+i-1],Q=C[D+i];O.prev_length>=O.good_match&&(I>>=2),c>O.lookahead&&(c=O.lookahead);do if(f=N,!(C[f+i]!==Q||C[f+i-1]!==z||C[f]!==C[D]||C[++f]!==C[D+1])){D+=2,f++;do;while(C[++D]===C[++f]&&C[++D]===C[++f]&&C[++D]===C[++f]&&C[++D]===C[++f]&&C[++D]===C[++f]&&C[++D]===C[++f]&&C[++D]===C[++f]&&C[++D]===C[++f]&&D<J);if(k=MAX_MATCH-(J-D),D=J-MAX_MATCH,k>i){if(O.match_start=N,i=k,k>=c)break;z=C[D+i-1],Q=C[D+i]}}while((N=Z[N&M])>$&&--I!==0);return i<=O.lookahead?i:O.lookahead},fill_window=O=>{const N=O.w_size;let I,D,f;do{if(D=O.window_size-O.lookahead-O.strstart,O.strstart>=N+(N-MIN_LOOKAHEAD)&&(O.window.set(O.window.subarray(N,N+N-D),0),O.match_start-=N,O.strstart-=N,O.block_start-=N,O.insert>O.strstart&&(O.insert=O.strstart),slide_hash(O),D+=N),O.strm.avail_in===0)break;if(I=read_buf(O.strm,O.window,O.strstart+O.lookahead,D),O.lookahead+=I,O.lookahead+O.insert>=MIN_MATCH)for(f=O.strstart-O.insert,O.ins_h=O.window[f],O.ins_h=HASH(O,O.ins_h,O.window[f+1]);O.insert&&(O.ins_h=HASH(O,O.ins_h,O.window[f+MIN_MATCH-1]),O.prev[f&O.w_mask]=O.head[O.ins_h],O.head[O.ins_h]=f,f++,O.insert--,!(O.lookahead+O.insert<MIN_MATCH)););}while(O.lookahead<MIN_LOOKAHEAD&&O.strm.avail_in!==0)},deflate_stored=(O,N)=>{let I=O.pending_buf_size-5>O.w_size?O.w_size:O.pending_buf_size-5,D,f,k,i=0,c=O.strm.avail_in;do{if(D=65535,k=O.bi_valid+42>>3,O.strm.avail_out<k||(k=O.strm.avail_out-k,f=O.strstart-O.block_start,D>f+O.strm.avail_in&&(D=f+O.strm.avail_in),D>k&&(D=k),D<I&&(D===0&&N!==Z_FINISH$3||N===Z_NO_FLUSH$2||D!==f+O.strm.avail_in)))break;i=N===Z_FINISH$3&&D===f+O.strm.avail_in?1:0,_tr_stored_block(O,0,0,i),O.pending_buf[O.pending-4]=D,O.pending_buf[O.pending-3]=D>>8,O.pending_buf[O.pending-2]=~D,O.pending_buf[O.pending-1]=~D>>8,flush_pending(O.strm),f&&(f>D&&(f=D),O.strm.output.set(O.window.subarray(O.block_start,O.block_start+f),O.strm.next_out),O.strm.next_out+=f,O.strm.avail_out-=f,O.strm.total_out+=f,O.block_start+=f,D-=f),D&&(read_buf(O.strm,O.strm.output,O.strm.next_out,D),O.strm.next_out+=D,O.strm.avail_out-=D,O.strm.total_out+=D)}while(i===0);return c-=O.strm.avail_in,c&&(c>=O.w_size?(O.matches=2,O.window.set(O.strm.input.subarray(O.strm.next_in-O.w_size,O.strm.next_in),0),O.strstart=O.w_size,O.insert=O.strstart):(O.window_size-O.strstart<=c&&(O.strstart-=O.w_size,O.window.set(O.window.subarray(O.w_size,O.w_size+O.strstart),0),O.matches<2&&O.matches++,O.insert>O.strstart&&(O.insert=O.strstart)),O.window.set(O.strm.input.subarray(O.strm.next_in-c,O.strm.next_in),O.strstart),O.strstart+=c,O.insert+=c>O.w_size-O.insert?O.w_size-O.insert:c),O.block_start=O.strstart),O.high_water<O.strstart&&(O.high_water=O.strstart),i?BS_FINISH_DONE:N!==Z_NO_FLUSH$2&&N!==Z_FINISH$3&&O.strm.avail_in===0&&O.strstart===O.block_start?BS_BLOCK_DONE:(k=O.window_size-O.strstart,O.strm.avail_in>k&&O.block_start>=O.w_size&&(O.block_start-=O.w_size,O.strstart-=O.w_size,O.window.set(O.window.subarray(O.w_size,O.w_size+O.strstart),0),O.matches<2&&O.matches++,k+=O.w_size,O.insert>O.strstart&&(O.insert=O.strstart)),k>O.strm.avail_in&&(k=O.strm.avail_in),k&&(read_buf(O.strm,O.window,O.strstart,k),O.strstart+=k,O.insert+=k>O.w_size-O.insert?O.w_size-O.insert:k),O.high_water<O.strstart&&(O.high_water=O.strstart),k=O.bi_valid+42>>3,k=O.pending_buf_size-k>65535?65535:O.pending_buf_size-k,I=k>O.w_size?O.w_size:k,f=O.strstart-O.block_start,(f>=I||(f||N===Z_FINISH$3)&&N!==Z_NO_FLUSH$2&&O.strm.avail_in===0&&f<=k)&&(D=f>k?k:f,i=N===Z_FINISH$3&&O.strm.avail_in===0&&D===f?1:0,_tr_stored_block(O,O.block_start,D,i),O.block_start+=D,flush_pending(O.strm)),i?BS_FINISH_STARTED:BS_NEED_MORE)},deflate_fast=(O,N)=>{let I,D;for(;;){if(O.lookahead<MIN_LOOKAHEAD){if(fill_window(O),O.lookahead<MIN_LOOKAHEAD&&N===Z_NO_FLUSH$2)return BS_NEED_MORE;if(O.lookahead===0)break}if(I=0,O.lookahead>=MIN_MATCH&&(O.ins_h=HASH(O,O.ins_h,O.window[O.strstart+MIN_MATCH-1]),I=O.prev[O.strstart&O.w_mask]=O.head[O.ins_h],O.head[O.ins_h]=O.strstart),I!==0&&O.strstart-I<=O.w_size-MIN_LOOKAHEAD&&(O.match_length=longest_match(O,I)),O.match_length>=MIN_MATCH)if(D=_tr_tally(O,O.strstart-O.match_start,O.match_length-MIN_MATCH),O.lookahead-=O.match_length,O.match_length<=O.max_lazy_match&&O.lookahead>=MIN_MATCH){O.match_length--;do O.strstart++,O.ins_h=HASH(O,O.ins_h,O.window[O.strstart+MIN_MATCH-1]),I=O.prev[O.strstart&O.w_mask]=O.head[O.ins_h],O.head[O.ins_h]=O.strstart;while(--O.match_length!==0);O.strstart++}else O.strstart+=O.match_length,O.match_length=0,O.ins_h=O.window[O.strstart],O.ins_h=HASH(O,O.ins_h,O.window[O.strstart+1]);else D=_tr_tally(O,0,O.window[O.strstart]),O.lookahead--,O.strstart++;if(D&&(flush_block_only(O,!1),O.strm.avail_out===0))return BS_NEED_MORE}return O.insert=O.strstart<MIN_MATCH-1?O.strstart:MIN_MATCH-1,N===Z_FINISH$3?(flush_block_only(O,!0),O.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):O.sym_next&&(flush_block_only(O,!1),O.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_slow=(O,N)=>{let I,D,f;for(;;){if(O.lookahead<MIN_LOOKAHEAD){if(fill_window(O),O.lookahead<MIN_LOOKAHEAD&&N===Z_NO_FLUSH$2)return BS_NEED_MORE;if(O.lookahead===0)break}if(I=0,O.lookahead>=MIN_MATCH&&(O.ins_h=HASH(O,O.ins_h,O.window[O.strstart+MIN_MATCH-1]),I=O.prev[O.strstart&O.w_mask]=O.head[O.ins_h],O.head[O.ins_h]=O.strstart),O.prev_length=O.match_length,O.prev_match=O.match_start,O.match_length=MIN_MATCH-1,I!==0&&O.prev_length<O.max_lazy_match&&O.strstart-I<=O.w_size-MIN_LOOKAHEAD&&(O.match_length=longest_match(O,I),O.match_length<=5&&(O.strategy===Z_FILTERED||O.match_length===MIN_MATCH&&O.strstart-O.match_start>4096)&&(O.match_length=MIN_MATCH-1)),O.prev_length>=MIN_MATCH&&O.match_length<=O.prev_length){f=O.strstart+O.lookahead-MIN_MATCH,D=_tr_tally(O,O.strstart-1-O.prev_match,O.prev_length-MIN_MATCH),O.lookahead-=O.prev_length-1,O.prev_length-=2;do++O.strstart<=f&&(O.ins_h=HASH(O,O.ins_h,O.window[O.strstart+MIN_MATCH-1]),I=O.prev[O.strstart&O.w_mask]=O.head[O.ins_h],O.head[O.ins_h]=O.strstart);while(--O.prev_length!==0);if(O.match_available=0,O.match_length=MIN_MATCH-1,O.strstart++,D&&(flush_block_only(O,!1),O.strm.avail_out===0))return BS_NEED_MORE}else if(O.match_available){if(D=_tr_tally(O,0,O.window[O.strstart-1]),D&&flush_block_only(O,!1),O.strstart++,O.lookahead--,O.strm.avail_out===0)return BS_NEED_MORE}else O.match_available=1,O.strstart++,O.lookahead--}return O.match_available&&(D=_tr_tally(O,0,O.window[O.strstart-1]),O.match_available=0),O.insert=O.strstart<MIN_MATCH-1?O.strstart:MIN_MATCH-1,N===Z_FINISH$3?(flush_block_only(O,!0),O.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):O.sym_next&&(flush_block_only(O,!1),O.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_rle=(O,N)=>{let I,D,f,k;const i=O.window;for(;;){if(O.lookahead<=MAX_MATCH){if(fill_window(O),O.lookahead<=MAX_MATCH&&N===Z_NO_FLUSH$2)return BS_NEED_MORE;if(O.lookahead===0)break}if(O.match_length=0,O.lookahead>=MIN_MATCH&&O.strstart>0&&(f=O.strstart-1,D=i[f],D===i[++f]&&D===i[++f]&&D===i[++f])){k=O.strstart+MAX_MATCH;do;while(D===i[++f]&&D===i[++f]&&D===i[++f]&&D===i[++f]&&D===i[++f]&&D===i[++f]&&D===i[++f]&&D===i[++f]&&f<k);O.match_length=MAX_MATCH-(k-f),O.match_length>O.lookahead&&(O.match_length=O.lookahead)}if(O.match_length>=MIN_MATCH?(I=_tr_tally(O,1,O.match_length-MIN_MATCH),O.lookahead-=O.match_length,O.strstart+=O.match_length,O.match_length=0):(I=_tr_tally(O,0,O.window[O.strstart]),O.lookahead--,O.strstart++),I&&(flush_block_only(O,!1),O.strm.avail_out===0))return BS_NEED_MORE}return O.insert=0,N===Z_FINISH$3?(flush_block_only(O,!0),O.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):O.sym_next&&(flush_block_only(O,!1),O.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE},deflate_huff=(O,N)=>{let I;for(;;){if(O.lookahead===0&&(fill_window(O),O.lookahead===0)){if(N===Z_NO_FLUSH$2)return BS_NEED_MORE;break}if(O.match_length=0,I=_tr_tally(O,0,O.window[O.strstart]),O.lookahead--,O.strstart++,I&&(flush_block_only(O,!1),O.strm.avail_out===0))return BS_NEED_MORE}return O.insert=0,N===Z_FINISH$3?(flush_block_only(O,!0),O.strm.avail_out===0?BS_FINISH_STARTED:BS_FINISH_DONE):O.sym_next&&(flush_block_only(O,!1),O.strm.avail_out===0)?BS_NEED_MORE:BS_BLOCK_DONE};function Config(O,N,I,D,f){this.good_length=O,this.max_lazy=N,this.nice_length=I,this.max_chain=D,this.func=f}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=O=>{O.window_size=2*O.w_size,zero(O.head),O.max_lazy_match=configuration_table[O.level].max_lazy,O.good_match=configuration_table[O.level].good_length,O.nice_match=configuration_table[O.level].nice_length,O.max_chain_length=configuration_table[O.level].max_chain,O.strstart=0,O.block_start=0,O.lookahead=0,O.insert=0,O.match_length=O.prev_length=MIN_MATCH-1,O.match_available=0,O.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=O=>{if(!O)return 1;const N=O.state;return!N||N.strm!==O||N.status!==INIT_STATE&&N.status!==GZIP_STATE&&N.status!==EXTRA_STATE&&N.status!==NAME_STATE&&N.status!==COMMENT_STATE&&N.status!==HCRC_STATE&&N.status!==BUSY_STATE&&N.status!==FINISH_STATE?1:0},deflateResetKeep=O=>{if(deflateStateCheck(O))return err(O,Z_STREAM_ERROR$2);O.total_in=O.total_out=0,O.data_type=Z_UNKNOWN;const N=O.state;return N.pending=0,N.pending_out=0,N.wrap<0&&(N.wrap=-N.wrap),N.status=N.wrap===2?GZIP_STATE:N.wrap?INIT_STATE:BUSY_STATE,O.adler=N.wrap===2?0:1,N.last_flush=-2,_tr_init(N),Z_OK$3},deflateReset=O=>{const N=deflateResetKeep(O);return N===Z_OK$3&&lm_init(O.state),N},deflateSetHeader=(O,N)=>deflateStateCheck(O)||O.state.wrap!==2?Z_STREAM_ERROR$2:(O.state.gzhead=N,Z_OK$3),deflateInit2=(O,N,I,D,f,k)=>{if(!O)return Z_STREAM_ERROR$2;let i=1;if(N===Z_DEFAULT_COMPRESSION$1&&(N=6),D<0?(i=0,D=-D):D>15&&(i=2,D-=16),f<1||f>MAX_MEM_LEVEL||I!==Z_DEFLATED$2||D<8||D>15||N<0||N>9||k<0||k>Z_FIXED||D===8&&i!==1)return err(O,Z_STREAM_ERROR$2);D===8&&(D=9);const c=new DeflateState;return O.state=c,c.strm=O,c.status=INIT_STATE,c.wrap=i,c.gzhead=null,c.w_bits=D,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=f+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+MIN_MATCH-1)/MIN_MATCH),c.window=new Uint8Array(c.w_size*2),c.head=new Uint16Array(c.hash_size),c.prev=new Uint16Array(c.w_size),c.lit_bufsize=1<<f+6,c.pending_buf_size=c.lit_bufsize*4,c.pending_buf=new Uint8Array(c.pending_buf_size),c.sym_buf=c.lit_bufsize,c.sym_end=(c.lit_bufsize-1)*3,c.level=N,c.strategy=k,c.method=I,deflateReset(O)},deflateInit=(O,N)=>deflateInit2(O,N,Z_DEFLATED$2,MAX_WBITS$1,DEF_MEM_LEVEL,Z_DEFAULT_STRATEGY$1),deflate$2=(O,N)=>{if(deflateStateCheck(O)||N>Z_BLOCK$1||N<0)return O?err(O,Z_STREAM_ERROR$2):Z_STREAM_ERROR$2;const I=O.state;if(!O.output||O.avail_in!==0&&!O.input||I.status===FINISH_STATE&&N!==Z_FINISH$3)return err(O,O.avail_out===0?Z_BUF_ERROR$1:Z_STREAM_ERROR$2);const D=I.last_flush;if(I.last_flush=N,I.pending!==0){if(flush_pending(O),O.avail_out===0)return I.last_flush=-1,Z_OK$3}else if(O.avail_in===0&&rank(N)<=rank(D)&&N!==Z_FINISH$3)return err(O,Z_BUF_ERROR$1);if(I.status===FINISH_STATE&&O.avail_in!==0)return err(O,Z_BUF_ERROR$1);if(I.status===INIT_STATE&&I.wrap===0&&(I.status=BUSY_STATE),I.status===INIT_STATE){let f=Z_DEFLATED$2+(I.w_bits-8<<4)<<8,k=-1;if(I.strategy>=Z_HUFFMAN_ONLY||I.level<2?k=0:I.level<6?k=1:I.level===6?k=2:k=3,f|=k<<6,I.strstart!==0&&(f|=PRESET_DICT),f+=31-f%31,putShortMSB(I,f),I.strstart!==0&&(putShortMSB(I,O.adler>>>16),putShortMSB(I,O.adler&65535)),O.adler=1,I.status=BUSY_STATE,flush_pending(O),I.pending!==0)return I.last_flush=-1,Z_OK$3}if(I.status===GZIP_STATE){if(O.adler=0,put_byte(I,31),put_byte(I,139),put_byte(I,8),I.gzhead)put_byte(I,(I.gzhead.text?1:0)+(I.gzhead.hcrc?2:0)+(I.gzhead.extra?4:0)+(I.gzhead.name?8:0)+(I.gzhead.comment?16:0)),put_byte(I,I.gzhead.time&255),put_byte(I,I.gzhead.time>>8&255),put_byte(I,I.gzhead.time>>16&255),put_byte(I,I.gzhead.time>>24&255),put_byte(I,I.level===9?2:I.strategy>=Z_HUFFMAN_ONLY||I.level<2?4:0),put_byte(I,I.gzhead.os&255),I.gzhead.extra&&I.gzhead.extra.length&&(put_byte(I,I.gzhead.extra.length&255),put_byte(I,I.gzhead.extra.length>>8&255)),I.gzhead.hcrc&&(O.adler=crc32_1(O.adler,I.pending_buf,I.pending,0)),I.gzindex=0,I.status=EXTRA_STATE;else if(put_byte(I,0),put_byte(I,0),put_byte(I,0),put_byte(I,0),put_byte(I,0),put_byte(I,I.level===9?2:I.strategy>=Z_HUFFMAN_ONLY||I.level<2?4:0),put_byte(I,OS_CODE),I.status=BUSY_STATE,flush_pending(O),I.pending!==0)return I.last_flush=-1,Z_OK$3}if(I.status===EXTRA_STATE){if(I.gzhead.extra){let f=I.pending,k=(I.gzhead.extra.length&65535)-I.gzindex;for(;I.pending+k>I.pending_buf_size;){let c=I.pending_buf_size-I.pending;if(I.pending_buf.set(I.gzhead.extra.subarray(I.gzindex,I.gzindex+c),I.pending),I.pending=I.pending_buf_size,I.gzhead.hcrc&&I.pending>f&&(O.adler=crc32_1(O.adler,I.pending_buf,I.pending-f,f)),I.gzindex+=c,flush_pending(O),I.pending!==0)return I.last_flush=-1,Z_OK$3;f=0,k-=c}let i=new Uint8Array(I.gzhead.extra);I.pending_buf.set(i.subarray(I.gzindex,I.gzindex+k),I.pending),I.pending+=k,I.gzhead.hcrc&&I.pending>f&&(O.adler=crc32_1(O.adler,I.pending_buf,I.pending-f,f)),I.gzindex=0}I.status=NAME_STATE}if(I.status===NAME_STATE){if(I.gzhead.name){let f=I.pending,k;do{if(I.pending===I.pending_buf_size){if(I.gzhead.hcrc&&I.pending>f&&(O.adler=crc32_1(O.adler,I.pending_buf,I.pending-f,f)),flush_pending(O),I.pending!==0)return I.last_flush=-1,Z_OK$3;f=0}I.gzindex<I.gzhead.name.length?k=I.gzhead.name.charCodeAt(I.gzindex++)&255:k=0,put_byte(I,k)}while(k!==0);I.gzhead.hcrc&&I.pending>f&&(O.adler=crc32_1(O.adler,I.pending_buf,I.pending-f,f)),I.gzindex=0}I.status=COMMENT_STATE}if(I.status===COMMENT_STATE){if(I.gzhead.comment){let f=I.pending,k;do{if(I.pending===I.pending_buf_size){if(I.gzhead.hcrc&&I.pending>f&&(O.adler=crc32_1(O.adler,I.pending_buf,I.pending-f,f)),flush_pending(O),I.pending!==0)return I.last_flush=-1,Z_OK$3;f=0}I.gzindex<I.gzhead.comment.length?k=I.gzhead.comment.charCodeAt(I.gzindex++)&255:k=0,put_byte(I,k)}while(k!==0);I.gzhead.hcrc&&I.pending>f&&(O.adler=crc32_1(O.adler,I.pending_buf,I.pending-f,f))}I.status=HCRC_STATE}if(I.status===HCRC_STATE){if(I.gzhead.hcrc){if(I.pending+2>I.pending_buf_size&&(flush_pending(O),I.pending!==0))return I.last_flush=-1,Z_OK$3;put_byte(I,O.adler&255),put_byte(I,O.adler>>8&255),O.adler=0}if(I.status=BUSY_STATE,flush_pending(O),I.pending!==0)return I.last_flush=-1,Z_OK$3}if(O.avail_in!==0||I.lookahead!==0||N!==Z_NO_FLUSH$2&&I.status!==FINISH_STATE){let f=I.level===0?deflate_stored(I,N):I.strategy===Z_HUFFMAN_ONLY?deflate_huff(I,N):I.strategy===Z_RLE?deflate_rle(I,N):configuration_table[I.level].func(I,N);if((f===BS_FINISH_STARTED||f===BS_FINISH_DONE)&&(I.status=FINISH_STATE),f===BS_NEED_MORE||f===BS_FINISH_STARTED)return O.avail_out===0&&(I.last_flush=-1),Z_OK$3;if(f===BS_BLOCK_DONE&&(N===Z_PARTIAL_FLUSH?_tr_align(I):N!==Z_BLOCK$1&&(_tr_stored_block(I,0,0,!1),N===Z_FULL_FLUSH$1&&(zero(I.head),I.lookahead===0&&(I.strstart=0,I.block_start=0,I.insert=0))),flush_pending(O),O.avail_out===0))return I.last_flush=-1,Z_OK$3}return N!==Z_FINISH$3?Z_OK$3:I.wrap<=0?Z_STREAM_END$3:(I.wrap===2?(put_byte(I,O.adler&255),put_byte(I,O.adler>>8&255),put_byte(I,O.adler>>16&255),put_byte(I,O.adler>>24&255),put_byte(I,O.total_in&255),put_byte(I,O.total_in>>8&255),put_byte(I,O.total_in>>16&255),put_byte(I,O.total_in>>24&255)):(putShortMSB(I,O.adler>>>16),putShortMSB(I,O.adler&65535)),flush_pending(O),I.wrap>0&&(I.wrap=-I.wrap),I.pending!==0?Z_OK$3:Z_STREAM_END$3)},deflateEnd=O=>{if(deflateStateCheck(O))return Z_STREAM_ERROR$2;const N=O.state.status;return O.state=null,N===BUSY_STATE?err(O,Z_DATA_ERROR$2):Z_OK$3},deflateSetDictionary=(O,N)=>{let I=N.length;if(deflateStateCheck(O))return Z_STREAM_ERROR$2;const D=O.state,f=D.wrap;if(f===2||f===1&&D.status!==INIT_STATE||D.lookahead)return Z_STREAM_ERROR$2;if(f===1&&(O.adler=adler32_1(O.adler,N,I,0)),D.wrap=0,I>=D.w_size){f===0&&(zero(D.head),D.strstart=0,D.block_start=0,D.insert=0);let $=new Uint8Array(D.w_size);$.set(N.subarray(I-D.w_size,I),0),N=$,I=D.w_size}const k=O.avail_in,i=O.next_in,c=O.input;for(O.avail_in=I,O.next_in=0,O.input=N,fill_window(D);D.lookahead>=MIN_MATCH;){let $=D.strstart,C=D.lookahead-(MIN_MATCH-1);do D.ins_h=HASH(D,D.ins_h,D.window[$+MIN_MATCH-1]),D.prev[$&D.w_mask]=D.head[D.ins_h],D.head[D.ins_h]=$,$++;while(--C);D.strstart=$,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,O.next_in=i,O.input=c,O.avail_in=k,D.wrap=f,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=(O,N)=>Object.prototype.hasOwnProperty.call(O,N);var assign=function(O){const N=Array.prototype.slice.call(arguments,1);for(;N.length;){const I=N.shift();if(I){if(typeof I!="object")throw new TypeError(I+"must be non-object");for(const D in I)_has(I,D)&&(O[D]=I[D])}}return O},flattenChunks=O=>{let N=0;for(let D=0,f=O.length;D<f;D++)N+=O[D].length;const I=new Uint8Array(N);for(let D=0,f=0,k=O.length;D<k;D++){let i=O[D];I.set(i,f),f+=i.length}return I},common={assign,flattenChunks};let STR_APPLY_UIA_OK=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(O){STR_APPLY_UIA_OK=!1}const _utf8len=new Uint8Array(256);for(let O=0;O<256;O++)_utf8len[O]=O>=252?6:O>=248?5:O>=240?4:O>=224?3:O>=192?2:1;_utf8len[254]=_utf8len[254]=1;var string2buf=O=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(O);let N,I,D,f,k,i=O.length,c=0;for(f=0;f<i;f++)I=O.charCodeAt(f),(I&64512)===55296&&f+1<i&&(D=O.charCodeAt(f+1),(D&64512)===56320&&(I=65536+(I-55296<<10)+(D-56320),f++)),c+=I<128?1:I<2048?2:I<65536?3:4;for(N=new Uint8Array(c),k=0,f=0;k<c;f++)I=O.charCodeAt(f),(I&64512)===55296&&f+1<i&&(D=O.charCodeAt(f+1),(D&64512)===56320&&(I=65536+(I-55296<<10)+(D-56320),f++)),I<128?N[k++]=I:I<2048?(N[k++]=192|I>>>6,N[k++]=128|I&63):I<65536?(N[k++]=224|I>>>12,N[k++]=128|I>>>6&63,N[k++]=128|I&63):(N[k++]=240|I>>>18,N[k++]=128|I>>>12&63,N[k++]=128|I>>>6&63,N[k++]=128|I&63);return N};const buf2binstring=(O,N)=>{if(N<65534&&O.subarray&&STR_APPLY_UIA_OK)return String.fromCharCode.apply(null,O.length===N?O:O.subarray(0,N));let I="";for(let D=0;D<N;D++)I+=String.fromCharCode(O[D]);return I};var buf2string=(O,N)=>{const I=N||O.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(O.subarray(0,N));let D,f;const k=new Array(I*2);for(f=0,D=0;D<I;){let i=O[D++];if(i<128){k[f++]=i;continue}let c=_utf8len[i];if(c>4){k[f++]=65533,D+=c-1;continue}for(i&=c===2?31:c===3?15:7;c>1&&D<I;)i=i<<6|O[D++]&63,c--;if(c>1){k[f++]=65533;continue}i<65536?k[f++]=i:(i-=65536,k[f++]=55296|i>>10&1023,k[f++]=56320|i&1023)}return buf2binstring(k,f)},utf8border=(O,N)=>{N=N||O.length,N>O.length&&(N=O.length);let I=N-1;for(;I>=0&&(O[I]&192)===128;)I--;return I<0||I===0?N:I+_utf8len[O[I]]>N?I:N},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(O){this.options=common.assign({level:Z_DEFAULT_COMPRESSION,method:Z_DEFLATED$1,chunkSize:16384,windowBits:15,memLevel:8,strategy:Z_DEFAULT_STRATEGY},O||{});let N=this.options;N.raw&&N.windowBits>0?N.windowBits=-N.windowBits:N.gzip&&N.windowBits>0&&N.windowBits<16&&(N.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let I=deflate_1$2.deflateInit2(this.strm,N.level,N.method,N.windowBits,N.memLevel,N.strategy);if(I!==Z_OK$2)throw new Error(messages[I]);if(N.header&&deflate_1$2.deflateSetHeader(this.strm,N.header),N.dictionary){let D;if(typeof N.dictionary=="string"?D=strings.string2buf(N.dictionary):toString$1.call(N.dictionary)==="[object ArrayBuffer]"?D=new Uint8Array(N.dictionary):D=N.dictionary,I=deflate_1$2.deflateSetDictionary(this.strm,D),I!==Z_OK$2)throw new Error(messages[I]);this._dict_set=!0}}Deflate$1.prototype.push=function(O,N){const I=this.strm,D=this.options.chunkSize;let f,k;if(this.ended)return!1;for(N===~~N?k=N:k=N===!0?Z_FINISH$2:Z_NO_FLUSH$1,typeof O=="string"?I.input=strings.string2buf(O):toString$1.call(O)==="[object ArrayBuffer]"?I.input=new Uint8Array(O):I.input=O,I.next_in=0,I.avail_in=I.input.length;;){if(I.avail_out===0&&(I.output=new Uint8Array(D),I.next_out=0,I.avail_out=D),(k===Z_SYNC_FLUSH||k===Z_FULL_FLUSH)&&I.avail_out<=6){this.onData(I.output.subarray(0,I.next_out)),I.avail_out=0;continue}if(f=deflate_1$2.deflate(I,k),f===Z_STREAM_END$2)return I.next_out>0&&this.onData(I.output.subarray(0,I.next_out)),f=deflate_1$2.deflateEnd(this.strm),this.onEnd(f),this.ended=!0,f===Z_OK$2;if(I.avail_out===0){this.onData(I.output);continue}if(k>0&&I.next_out>0){this.onData(I.output.subarray(0,I.next_out)),I.avail_out=0;continue}if(I.avail_in===0)break}return!0},Deflate$1.prototype.onData=function(O){this.chunks.push(O)},Deflate$1.prototype.onEnd=function(O){O===Z_OK$2&&(this.result=common.flattenChunks(this.chunks)),this.chunks=[],this.err=O,this.msg=this.strm.msg};function deflate$1(O,N){const I=new Deflate$1(N);if(I.push(O,!0),I.err)throw I.msg||messages[I.err];return I.result}function deflateRaw$1(O,N){return N=N||{},N.raw=!0,deflate$1(O,N)}function gzip$1(O,N){return N=N||{},N.gzip=!0,deflate$1(O,N)}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 O(N,I){let D,f,k,i,c,$,C,M,Z,J,z,Q,ee,Y,te,ie,ye,re,de,se,ue,he,we,fe;const me=N.state;D=N.next_in,we=N.input,f=D+(N.avail_in-5),k=N.next_out,fe=N.output,i=k-(I-N.avail_out),c=k+(N.avail_out-257),$=me.dmax,C=me.wsize,M=me.whave,Z=me.wnext,J=me.window,z=me.hold,Q=me.bits,ee=me.lencode,Y=me.distcode,te=(1<<me.lenbits)-1,ie=(1<<me.distbits)-1;e:do{Q<15&&(z+=we[D++]<<Q,Q+=8,z+=we[D++]<<Q,Q+=8),ye=ee[z&te];t:for(;;){if(re=ye>>>24,z>>>=re,Q-=re,re=ye>>>16&255,re===0)fe[k++]=ye&65535;else if(re&16){de=ye&65535,re&=15,re&&(Q<re&&(z+=we[D++]<<Q,Q+=8),de+=z&(1<<re)-1,z>>>=re,Q-=re),Q<15&&(z+=we[D++]<<Q,Q+=8,z+=we[D++]<<Q,Q+=8),ye=Y[z&ie];n:for(;;){if(re=ye>>>24,z>>>=re,Q-=re,re=ye>>>16&255,re&16){if(se=ye&65535,re&=15,Q<re&&(z+=we[D++]<<Q,Q+=8,Q<re&&(z+=we[D++]<<Q,Q+=8)),se+=z&(1<<re)-1,se>$){N.msg="invalid distance too far back",me.mode=BAD$1;break e}if(z>>>=re,Q-=re,re=k-i,se>re){if(re=se-re,re>M&&me.sane){N.msg="invalid distance too far back",me.mode=BAD$1;break e}if(ue=0,he=J,Z===0){if(ue+=C-re,re<de){de-=re;do fe[k++]=J[ue++];while(--re);ue=k-se,he=fe}}else if(Z<re){if(ue+=C+Z-re,re-=Z,re<de){de-=re;do fe[k++]=J[ue++];while(--re);if(ue=0,Z<de){re=Z,de-=re;do fe[k++]=J[ue++];while(--re);ue=k-se,he=fe}}}else if(ue+=Z-re,re<de){de-=re;do fe[k++]=J[ue++];while(--re);ue=k-se,he=fe}for(;de>2;)fe[k++]=he[ue++],fe[k++]=he[ue++],fe[k++]=he[ue++],de-=3;de&&(fe[k++]=he[ue++],de>1&&(fe[k++]=he[ue++]))}else{ue=k-se;do fe[k++]=fe[ue++],fe[k++]=fe[ue++],fe[k++]=fe[ue++],de-=3;while(de>2);de&&(fe[k++]=fe[ue++],de>1&&(fe[k++]=fe[ue++]))}}else if((re&64)===0){ye=Y[(ye&65535)+(z&(1<<re)-1)];continue n}else{N.msg="invalid distance code",me.mode=BAD$1;break e}break}}else if((re&64)===0){ye=ee[(ye&65535)+(z&(1<<re)-1)];continue t}else if(re&32){me.mode=TYPE$1;break e}else{N.msg="invalid literal/length code",me.mode=BAD$1;break e}break}}while(D<f&&k<c);de=Q>>3,D-=de,Q-=de<<3,z&=(1<<Q)-1,N.next_in=D,N.next_out=k,N.avail_in=D<f?5+(f-D):5-(D-f),N.avail_out=k<c?257+(c-k):257-(k-c),me.hold=z,me.bits=Q};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=(O,N,I,D,f,k,i,c)=>{const $=c.bits;let C=0,M=0,Z=0,J=0,z=0,Q=0,ee=0,Y=0,te=0,ie=0,ye,re,de,se,ue,he=null,we;const fe=new Uint16Array(MAXBITS+1),me=new Uint16Array(MAXBITS+1);let Re=null,Ue,Pe,De;for(C=0;C<=MAXBITS;C++)fe[C]=0;for(M=0;M<D;M++)fe[N[I+M]]++;for(z=$,J=MAXBITS;J>=1&&fe[J]===0;J--);if(z>J&&(z=J),J===0)return f[k++]=1<<24|64<<16|0,f[k++]=1<<24|64<<16|0,c.bits=1,0;for(Z=1;Z<J&&fe[Z]===0;Z++);for(z<Z&&(z=Z),Y=1,C=1;C<=MAXBITS;C++)if(Y<<=1,Y-=fe[C],Y<0)return-1;if(Y>0&&(O===CODES$1||J!==1))return-1;for(me[1]=0,C=1;C<MAXBITS;C++)me[C+1]=me[C]+fe[C];for(M=0;M<D;M++)N[I+M]!==0&&(i[me[N[I+M]]++]=M);if(O===CODES$1?(he=Re=i,we=20):O===LENS$1?(he=lbase,Re=lext,we=257):(he=dbase,Re=dext,we=0),ie=0,M=0,C=Z,ue=k,Q=z,ee=0,de=-1,te=1<<z,se=te-1,O===LENS$1&&te>ENOUGH_LENS$1||O===DISTS$1&&te>ENOUGH_DISTS$1)return 1;for(;;){Ue=C-ee,i[M]+1<we?(Pe=0,De=i[M]):i[M]>=we?(Pe=Re[i[M]-we],De=he[i[M]-we]):(Pe=96,De=0),ye=1<<C-ee,re=1<<Q,Z=re;do re-=ye,f[ue+(ie>>ee)+re]=Ue<<24|Pe<<16|De|0;while(re!==0);for(ye=1<<C-1;ie&ye;)ye>>=1;if(ye!==0?(ie&=ye-1,ie+=ye):ie=0,M++,--fe[C]===0){if(C===J)break;C=N[I+i[M]]}if(C>z&&(ie&se)!==de){for(ee===0&&(ee=z),ue+=Z,Q=C-ee,Y=1<<Q;Q+ee<J&&(Y-=fe[Q+ee],!(Y<=0));)Q++,Y<<=1;if(te+=1<<Q,O===LENS$1&&te>ENOUGH_LENS$1||O===DISTS$1&&te>ENOUGH_DISTS$1)return 1;de=ie&se,f[de]=z<<24|Q<<16|ue-k|0}}return ie!==0&&(f[ue+ie]=C-ee<<24|64<<16|0),c.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=O=>(O>>>24&255)+(O>>>8&65280)+((O&65280)<<8)+((O&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=O=>{if(!O)return 1;const N=O.state;return!N||N.strm!==O||N.mode<HEAD||N.mode>SYNC?1:0},inflateResetKeep=O=>{if(inflateStateCheck(O))return Z_STREAM_ERROR$1;const N=O.state;return O.total_in=O.total_out=N.total=0,O.msg="",N.wrap&&(O.adler=N.wrap&1),N.mode=HEAD,N.last=0,N.havedict=0,N.flags=-1,N.dmax=32768,N.head=null,N.hold=0,N.bits=0,N.lencode=N.lendyn=new Int32Array(ENOUGH_LENS),N.distcode=N.distdyn=new Int32Array(ENOUGH_DISTS),N.sane=1,N.back=-1,Z_OK$1},inflateReset=O=>{if(inflateStateCheck(O))return Z_STREAM_ERROR$1;const N=O.state;return N.wsize=0,N.whave=0,N.wnext=0,inflateResetKeep(O)},inflateReset2=(O,N)=>{let I;if(inflateStateCheck(O))return Z_STREAM_ERROR$1;const D=O.state;return N<0?(I=0,N=-N):(I=(N>>4)+5,N<48&&(N&=15)),N&&(N<8||N>15)?Z_STREAM_ERROR$1:(D.window!==null&&D.wbits!==N&&(D.window=null),D.wrap=I,D.wbits=N,inflateReset(O))},inflateInit2=(O,N)=>{if(!O)return Z_STREAM_ERROR$1;const I=new InflateState;O.state=I,I.strm=O,I.window=null,I.mode=HEAD;const D=inflateReset2(O,N);return D!==Z_OK$1&&(O.state=null),D},inflateInit=O=>inflateInit2(O,DEF_WBITS);let virgin=!0,lenfix,distfix;const fixedtables=O=>{if(virgin){lenfix=new Int32Array(512),distfix=new Int32Array(32);let N=0;for(;N<144;)O.lens[N++]=8;for(;N<256;)O.lens[N++]=9;for(;N<280;)O.lens[N++]=7;for(;N<288;)O.lens[N++]=8;for(inftrees(LENS,O.lens,0,288,lenfix,0,O.work,{bits:9}),N=0;N<32;)O.lens[N++]=5;inftrees(DISTS,O.lens,0,32,distfix,0,O.work,{bits:5}),virgin=!1}O.lencode=lenfix,O.lenbits=9,O.distcode=distfix,O.distbits=5},updatewindow=(O,N,I,D)=>{let f;const k=O.state;return k.window===null&&(k.wsize=1<<k.wbits,k.wnext=0,k.whave=0,k.window=new Uint8Array(k.wsize)),D>=k.wsize?(k.window.set(N.subarray(I-k.wsize,I),0),k.wnext=0,k.whave=k.wsize):(f=k.wsize-k.wnext,f>D&&(f=D),k.window.set(N.subarray(I-D,I-D+f),k.wnext),D-=f,D?(k.window.set(N.subarray(I-D,I),0),k.wnext=D,k.whave=k.wsize):(k.wnext+=f,k.wnext===k.wsize&&(k.wnext=0),k.whave<k.wsize&&(k.whave+=f))),0},inflate$2=(O,N)=>{let I,D,f,k,i,c,$,C,M,Z,J,z,Q,ee,Y=0,te,ie,ye,re,de,se,ue,he;const we=new Uint8Array(4);let fe,me;const Re=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(inflateStateCheck(O)||!O.output||!O.input&&O.avail_in!==0)return Z_STREAM_ERROR$1;I=O.state,I.mode===TYPE&&(I.mode=TYPEDO),i=O.next_out,f=O.output,$=O.avail_out,k=O.next_in,D=O.input,c=O.avail_in,C=I.hold,M=I.bits,Z=c,J=$,he=Z_OK$1;e:for(;;)switch(I.mode){case HEAD:if(I.wrap===0){I.mode=TYPEDO;break}for(;M<16;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}if(I.wrap&2&&C===35615){I.wbits===0&&(I.wbits=15),I.check=0,we[0]=C&255,we[1]=C>>>8&255,I.check=crc32_1(I.check,we,2,0),C=0,M=0,I.mode=FLAGS;break}if(I.head&&(I.head.done=!1),!(I.wrap&1)||(((C&255)<<8)+(C>>8))%31){O.msg="incorrect header check",I.mode=BAD;break}if((C&15)!==Z_DEFLATED){O.msg="unknown compression method",I.mode=BAD;break}if(C>>>=4,M-=4,ue=(C&15)+8,I.wbits===0&&(I.wbits=ue),ue>15||ue>I.wbits){O.msg="invalid window size",I.mode=BAD;break}I.dmax=1<<I.wbits,I.flags=0,O.adler=I.check=1,I.mode=C&512?DICTID:TYPE,C=0,M=0;break;case FLAGS:for(;M<16;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}if(I.flags=C,(I.flags&255)!==Z_DEFLATED){O.msg="unknown compression method",I.mode=BAD;break}if(I.flags&57344){O.msg="unknown header flags set",I.mode=BAD;break}I.head&&(I.head.text=C>>8&1),I.flags&512&&I.wrap&4&&(we[0]=C&255,we[1]=C>>>8&255,I.check=crc32_1(I.check,we,2,0)),C=0,M=0,I.mode=TIME;case TIME:for(;M<32;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}I.head&&(I.head.time=C),I.flags&512&&I.wrap&4&&(we[0]=C&255,we[1]=C>>>8&255,we[2]=C>>>16&255,we[3]=C>>>24&255,I.check=crc32_1(I.check,we,4,0)),C=0,M=0,I.mode=OS;case OS:for(;M<16;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}I.head&&(I.head.xflags=C&255,I.head.os=C>>8),I.flags&512&&I.wrap&4&&(we[0]=C&255,we[1]=C>>>8&255,I.check=crc32_1(I.check,we,2,0)),C=0,M=0,I.mode=EXLEN;case EXLEN:if(I.flags&1024){for(;M<16;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}I.length=C,I.head&&(I.head.extra_len=C),I.flags&512&&I.wrap&4&&(we[0]=C&255,we[1]=C>>>8&255,I.check=crc32_1(I.check,we,2,0)),C=0,M=0}else I.head&&(I.head.extra=null);I.mode=EXTRA;case EXTRA:if(I.flags&1024&&(z=I.length,z>c&&(z=c),z&&(I.head&&(ue=I.head.extra_len-I.length,I.head.extra||(I.head.extra=new Uint8Array(I.head.extra_len)),I.head.extra.set(D.subarray(k,k+z),ue)),I.flags&512&&I.wrap&4&&(I.check=crc32_1(I.check,D,z,k)),c-=z,k+=z,I.length-=z),I.length))break e;I.length=0,I.mode=NAME;case NAME:if(I.flags&2048){if(c===0)break e;z=0;do ue=D[k+z++],I.head&&ue&&I.length<65536&&(I.head.name+=String.fromCharCode(ue));while(ue&&z<c);if(I.flags&512&&I.wrap&4&&(I.check=crc32_1(I.check,D,z,k)),c-=z,k+=z,ue)break e}else I.head&&(I.head.name=null);I.length=0,I.mode=COMMENT;case COMMENT:if(I.flags&4096){if(c===0)break e;z=0;do ue=D[k+z++],I.head&&ue&&I.length<65536&&(I.head.comment+=String.fromCharCode(ue));while(ue&&z<c);if(I.flags&512&&I.wrap&4&&(I.check=crc32_1(I.check,D,z,k)),c-=z,k+=z,ue)break e}else I.head&&(I.head.comment=null);I.mode=HCRC;case HCRC:if(I.flags&512){for(;M<16;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}if(I.wrap&4&&C!==(I.check&65535)){O.msg="header crc mismatch",I.mode=BAD;break}C=0,M=0}I.head&&(I.head.hcrc=I.flags>>9&1,I.head.done=!0),O.adler=I.check=0,I.mode=TYPE;break;case DICTID:for(;M<32;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}O.adler=I.check=zswap32(C),C=0,M=0,I.mode=DICT;case DICT:if(I.havedict===0)return O.next_out=i,O.avail_out=$,O.next_in=k,O.avail_in=c,I.hold=C,I.bits=M,Z_NEED_DICT$1;O.adler=I.check=1,I.mode=TYPE;case TYPE:if(N===Z_BLOCK||N===Z_TREES)break e;case TYPEDO:if(I.last){C>>>=M&7,M-=M&7,I.mode=CHECK;break}for(;M<3;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}switch(I.last=C&1,C>>>=1,M-=1,C&3){case 0:I.mode=STORED;break;case 1:if(fixedtables(I),I.mode=LEN_,N===Z_TREES){C>>>=2,M-=2;break e}break;case 2:I.mode=TABLE;break;case 3:O.msg="invalid block type",I.mode=BAD}C>>>=2,M-=2;break;case STORED:for(C>>>=M&7,M-=M&7;M<32;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}if((C&65535)!==(C>>>16^65535)){O.msg="invalid stored block lengths",I.mode=BAD;break}if(I.length=C&65535,C=0,M=0,I.mode=COPY_,N===Z_TREES)break e;case COPY_:I.mode=COPY;case COPY:if(z=I.length,z){if(z>c&&(z=c),z>$&&(z=$),z===0)break e;f.set(D.subarray(k,k+z),i),c-=z,k+=z,$-=z,i+=z,I.length-=z;break}I.mode=TYPE;break;case TABLE:for(;M<14;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}if(I.nlen=(C&31)+257,C>>>=5,M-=5,I.ndist=(C&31)+1,C>>>=5,M-=5,I.ncode=(C&15)+4,C>>>=4,M-=4,I.nlen>286||I.ndist>30){O.msg="too many length or distance symbols",I.mode=BAD;break}I.have=0,I.mode=LENLENS;case LENLENS:for(;I.have<I.ncode;){for(;M<3;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}I.lens[Re[I.have++]]=C&7,C>>>=3,M-=3}for(;I.have<19;)I.lens[Re[I.have++]]=0;if(I.lencode=I.lendyn,I.lenbits=7,fe={bits:I.lenbits},he=inftrees(CODES,I.lens,0,19,I.lencode,0,I.work,fe),I.lenbits=fe.bits,he){O.msg="invalid code lengths set",I.mode=BAD;break}I.have=0,I.mode=CODELENS;case CODELENS:for(;I.have<I.nlen+I.ndist;){for(;Y=I.lencode[C&(1<<I.lenbits)-1],te=Y>>>24,ie=Y>>>16&255,ye=Y&65535,!(te<=M);){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}if(ye<16)C>>>=te,M-=te,I.lens[I.have++]=ye;else{if(ye===16){for(me=te+2;M<me;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}if(C>>>=te,M-=te,I.have===0){O.msg="invalid bit length repeat",I.mode=BAD;break}ue=I.lens[I.have-1],z=3+(C&3),C>>>=2,M-=2}else if(ye===17){for(me=te+3;M<me;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}C>>>=te,M-=te,ue=0,z=3+(C&7),C>>>=3,M-=3}else{for(me=te+7;M<me;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}C>>>=te,M-=te,ue=0,z=11+(C&127),C>>>=7,M-=7}if(I.have+z>I.nlen+I.ndist){O.msg="invalid bit length repeat",I.mode=BAD;break}for(;z--;)I.lens[I.have++]=ue}}if(I.mode===BAD)break;if(I.lens[256]===0){O.msg="invalid code -- missing end-of-block",I.mode=BAD;break}if(I.lenbits=9,fe={bits:I.lenbits},he=inftrees(LENS,I.lens,0,I.nlen,I.lencode,0,I.work,fe),I.lenbits=fe.bits,he){O.msg="invalid literal/lengths set",I.mode=BAD;break}if(I.distbits=6,I.distcode=I.distdyn,fe={bits:I.distbits},he=inftrees(DISTS,I.lens,I.nlen,I.ndist,I.distcode,0,I.work,fe),I.distbits=fe.bits,he){O.msg="invalid distances set",I.mode=BAD;break}if(I.mode=LEN_,N===Z_TREES)break e;case LEN_:I.mode=LEN;case LEN:if(c>=6&&$>=258){O.next_out=i,O.avail_out=$,O.next_in=k,O.avail_in=c,I.hold=C,I.bits=M,inffast(O,J),i=O.next_out,f=O.output,$=O.avail_out,k=O.next_in,D=O.input,c=O.avail_in,C=I.hold,M=I.bits,I.mode===TYPE&&(I.back=-1);break}for(I.back=0;Y=I.lencode[C&(1<<I.lenbits)-1],te=Y>>>24,ie=Y>>>16&255,ye=Y&65535,!(te<=M);){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}if(ie&&(ie&240)===0){for(re=te,de=ie,se=ye;Y=I.lencode[se+((C&(1<<re+de)-1)>>re)],te=Y>>>24,ie=Y>>>16&255,ye=Y&65535,!(re+te<=M);){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}C>>>=re,M-=re,I.back+=re}if(C>>>=te,M-=te,I.back+=te,I.length=ye,ie===0){I.mode=LIT;break}if(ie&32){I.back=-1,I.mode=TYPE;break}if(ie&64){O.msg="invalid literal/length code",I.mode=BAD;break}I.extra=ie&15,I.mode=LENEXT;case LENEXT:if(I.extra){for(me=I.extra;M<me;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}I.length+=C&(1<<I.extra)-1,C>>>=I.extra,M-=I.extra,I.back+=I.extra}I.was=I.length,I.mode=DIST;case DIST:for(;Y=I.distcode[C&(1<<I.distbits)-1],te=Y>>>24,ie=Y>>>16&255,ye=Y&65535,!(te<=M);){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}if((ie&240)===0){for(re=te,de=ie,se=ye;Y=I.distcode[se+((C&(1<<re+de)-1)>>re)],te=Y>>>24,ie=Y>>>16&255,ye=Y&65535,!(re+te<=M);){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}C>>>=re,M-=re,I.back+=re}if(C>>>=te,M-=te,I.back+=te,ie&64){O.msg="invalid distance code",I.mode=BAD;break}I.offset=ye,I.extra=ie&15,I.mode=DISTEXT;case DISTEXT:if(I.extra){for(me=I.extra;M<me;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}I.offset+=C&(1<<I.extra)-1,C>>>=I.extra,M-=I.extra,I.back+=I.extra}if(I.offset>I.dmax){O.msg="invalid distance too far back",I.mode=BAD;break}I.mode=MATCH;case MATCH:if($===0)break e;if(z=J-$,I.offset>z){if(z=I.offset-z,z>I.whave&&I.sane){O.msg="invalid distance too far back",I.mode=BAD;break}z>I.wnext?(z-=I.wnext,Q=I.wsize-z):Q=I.wnext-z,z>I.length&&(z=I.length),ee=I.window}else ee=f,Q=i-I.offset,z=I.length;z>$&&(z=$),$-=z,I.length-=z;do f[i++]=ee[Q++];while(--z);I.length===0&&(I.mode=LEN);break;case LIT:if($===0)break e;f[i++]=I.length,$--,I.mode=LEN;break;case CHECK:if(I.wrap){for(;M<32;){if(c===0)break e;c--,C|=D[k++]<<M,M+=8}if(J-=$,O.total_out+=J,I.total+=J,I.wrap&4&&J&&(O.adler=I.check=I.flags?crc32_1(I.check,f,J,i-J):adler32_1(I.check,f,J,i-J)),J=$,I.wrap&4&&(I.flags?C:zswap32(C))!==I.check){O.msg="incorrect data check",I.mode=BAD;break}C=0,M=0}I.mode=LENGTH;case LENGTH:if(I.wrap&&I.flags){for(;M<32;){if(c===0)break e;c--,C+=D[k++]<<M,M+=8}if(I.wrap&4&&C!==(I.total&4294967295)){O.msg="incorrect length check",I.mode=BAD;break}C=0,M=0}I.mode=DONE;case DONE:he=Z_STREAM_END$1;break e;case BAD:he=Z_DATA_ERROR$1;break e;case MEM:return Z_MEM_ERROR$1;case SYNC:default:return Z_STREAM_ERROR$1}return O.next_out=i,O.avail_out=$,O.next_in=k,O.avail_in=c,I.hold=C,I.bits=M,(I.wsize||J!==O.avail_out&&I.mode<BAD&&(I.mode<CHECK||N!==Z_FINISH$1))&&updatewindow(O,O.output,O.next_out,J-O.avail_out),Z-=O.avail_in,J-=O.avail_out,O.total_in+=Z,O.total_out+=J,I.total+=J,I.wrap&4&&J&&(O.adler=I.check=I.flags?crc32_1(I.check,f,J,O.next_out-J):adler32_1(I.check,f,J,O.next_out-J)),O.data_type=I.bits+(I.last?64:0)+(I.mode===TYPE?128:0)+(I.mode===LEN_||I.mode===COPY_?256:0),(Z===0&&J===0||N===Z_FINISH$1)&&he===Z_OK$1&&(he=Z_BUF_ERROR),he},inflateEnd=O=>{if(inflateStateCheck(O))return Z_STREAM_ERROR$1;let N=O.state;return N.window&&(N.window=null),O.state=null,Z_OK$1},inflateGetHeader=(O,N)=>{if(inflateStateCheck(O))return Z_STREAM_ERROR$1;const I=O.state;return(I.wrap&2)===0?Z_STREAM_ERROR$1:(I.head=N,N.done=!1,Z_OK$1)},inflateSetDictionary=(O,N)=>{const I=N.length;let D,f,k;return inflateStateCheck(O)||(D=O.state,D.wrap!==0&&D.mode!==DICT)?Z_STREAM_ERROR$1:D.mode===DICT&&(f=1,f=adler32_1(f,N,I,0),f!==D.check)?Z_DATA_ERROR$1:(k=updatewindow(O,N,I,I),k?(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(O){this.options=common.assign({chunkSize:1024*64,windowBits:15,to:""},O||{});const N=this.options;N.raw&&N.windowBits>=0&&N.windowBits<16&&(N.windowBits=-N.windowBits,N.windowBits===0&&(N.windowBits=-15)),N.windowBits>=0&&N.windowBits<16&&!(O&&O.windowBits)&&(N.windowBits+=32),N.windowBits>15&&N.windowBits<48&&(N.windowBits&15)===0&&(N.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;let I=inflate_1$2.inflateInit2(this.strm,N.windowBits);if(I!==Z_OK)throw new Error(messages[I]);if(this.header=new gzheader,inflate_1$2.inflateGetHeader(this.strm,this.header),N.dictionary&&(typeof N.dictionary=="string"?N.dictionary=strings.string2buf(N.dictionary):toString.call(N.dictionary)==="[object ArrayBuffer]"&&(N.dictionary=new Uint8Array(N.dictionary)),N.raw&&(I=inflate_1$2.inflateSetDictionary(this.strm,N.dictionary),I!==Z_OK)))throw new Error(messages[I])}Inflate$1.prototype.push=function(O,N){const I=this.strm,D=this.options.chunkSize,f=this.options.dictionary;let k,i,c;if(this.ended)return!1;for(N===~~N?i=N:i=N===!0?Z_FINISH:Z_NO_FLUSH,toString.call(O)==="[object ArrayBuffer]"?I.input=new Uint8Array(O):I.input=O,I.next_in=0,I.avail_in=I.input.length;;){for(I.avail_out===0&&(I.output=new Uint8Array(D),I.next_out=0,I.avail_out=D),k=inflate_1$2.inflate(I,i),k===Z_NEED_DICT&&f&&(k=inflate_1$2.inflateSetDictionary(I,f),k===Z_OK?k=inflate_1$2.inflate(I,i):k===Z_DATA_ERROR&&(k=Z_NEED_DICT));I.avail_in>0&&k===Z_STREAM_END&&I.state.wrap>0&&O[I.next_in]!==0;)inflate_1$2.inflateReset(I),k=inflate_1$2.inflate(I,i);switch(k){case Z_STREAM_ERROR:case Z_DATA_ERROR:case Z_NEED_DICT:case Z_MEM_ERROR:return this.onEnd(k),this.ended=!0,!1}if(c=I.avail_out,I.next_out&&(I.avail_out===0||k===Z_STREAM_END))if(this.options.to==="string"){let $=strings.utf8border(I.output,I.next_out),C=I.next_out-$,M=strings.buf2string(I.output,$);I.next_out=C,I.avail_out=D-C,C&&I.output.set(I.output.subarray($,$+C),0),this.onData(M)}else this.onData(I.output.length===I.next_out?I.output:I.output.subarray(0,I.next_out));if(!(k===Z_OK&&c===0)){if(k===Z_STREAM_END)return k=inflate_1$2.inflateEnd(this.strm),this.onEnd(k),this.ended=!0,!0;if(I.avail_in===0)break}}return!0},Inflate$1.prototype.onData=function(O){this.chunks.push(O)},Inflate$1.prototype.onEnd=function(O){O===Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=common.flattenChunks(this.chunks)),this.chunks=[],this.err=O,this.msg=this.strm.msg};function inflate$1(O,N){const I=new Inflate$1(N);if(I.push(O),I.err)throw I.msg||messages[I.err];return I.result}function inflateRaw$1(O,N){return N=N||{},N.raw=!0,inflate$1(O,N)}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 ignoreEvent=["updateSeverTime"];ignoreEvent.push("heartbeat"),ignoreEvent.push("heartbeatEx"),ignoreEvent.push("networkQualityChange"),ignoreEvent.push("onNetQuality"),ignoreEvent.push("updateCall"),ignoreEvent.push("pubNotify");const compressArrayBuffer=O=>{const N=new Uint8Array(O),I=pako.deflate(N,{gzip:!0});return new Uint8Array(I==null?void 0:I.buffer)},decompressArrayBuffer=O=>{const N=new Uint8Array(O),I=pako.inflate(N,{gzip:!0});return new Uint8Array(I==null?void 0:I.buffer)},sendMessageFormat=O=>{const{event:N}=O;switch(O.data_original=O.data,O.time&&(O.timeStr=E(O.time,"YYYY-MM-DD hh:mm:ss",{offset:480})),N){case"login":O.data=com.quick.voice.proto.Login.encode(O.data).finish();break;case"joinRoom":case"joinRoomEx":O.data=com.quick.voice.proto.JoinReq.encode(O.data).finish();break;case"quitRoom":O.data=com.quick.voice.proto.QuitReq.encode(O.data).finish();break;case"connectCF":O.data=com.quick.voice.proto.ConnectCFReq.encode(O.data).finish(),O.data=compressArrayBuffer(O.data),O.compress=!0;break;case"publish":O.data=com.quick.voice.proto.PublishReq.encode(O.data).finish(),O.data=compressArrayBuffer(O.data),O.compress=!0;break;case"pubChannel":O.data=com.quick.voice.proto.ChannelPublishReq.encode(O.data).finish();break;case"subscribe":O.data=com.quick.voice.proto.SubscribeReq.encode(O.data).finish();break;case"subChannel":O.data=com.quick.voice.proto.ChannelSubscribeRsq.encode(O.data).finish();break;case"closeTrack":O.data=com.quick.voice.proto.CloseTrackReq.encode(O.data).finish(),O.data=compressArrayBuffer(O.data),O.compress=!0;break;case"renegotiate":O.data=com.quick.voice.proto.RenegotiateReq.encode(O.data).finish(),O.data=compressArrayBuffer(O.data),O.compress=!0;break;case"syncRoomInfo":O.data=com.quick.voice.proto.SyncRoomInfoReq.encode(O.data).finish();break;case"updateCall":O.data=com.quick.voice.proto.UpdateCall.encode(O.data).finish();break;case"networkQualityChange":O.data=com.quick.voice.proto.NetQualityChange.encode(O.data).finish();break;case"pubNotify":O.data=com.quick.voice.proto.PublishNotify.encode(O.data).finish();break;case"onDataChannelPublish":break;case"preventUsersBehavior":O.data=com.quick.voice.proto.PreventUsersBehaviorReq.encode(O.data).finish();break;default:O.data=new Uint8Array;break}return O},onMessageFormat=O=>{const{event:N,compress:I=!1}=O;if(O.data_remote=O.data,O.time&&(O.timeStr=E(O.time,"YYYY-MM-DD hh:mm:ss",{offset:480})),I)try{O.data=decompressArrayBuffer(O.data)}catch(D){console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo:消息解压错误",D)}switch(N){case"login":O.data=com.quick.voice.proto.Login.decode(O.data);break;case"joinRoom":case"joinRoomEx":O.data=com.quick.voice.proto.JoinRsp.decode(O.data);break;case"onJoinRoom":O.data=com.quick.voice.proto.JoinNotify.decode(O.data);break;case"onQuitRoom":O.data=com.quick.voice.proto.QuitNotify.decode(O.data);break;case"connectCF":O.data=com.quick.voice.proto.ConnectCFRsp.decode(O.data);break;case"publish":O.data=com.quick.voice.proto.PublishRsp.decode(O.data);break;case"pubChannel":O.data=com.quick.voice.proto.ChannelPublishRsq.decode(O.data);break;case"onPublish":O.data=com.quick.voice.proto.PublishNotify.decode(O.data);break;case"subscribe":O.data=com.quick.voice.proto.SubscribeRsp.decode(O.data);break;case"subChannel":O.data=com.quick.voice.proto.ChannelSubscribeRsq.decode(O.data);break;case"closeTrack":O.data=com.quick.voice.proto.CloseTrackRsp.decode(O.data);break;case"onCloseTrack":O.data=com.quick.voice.proto.CloseTrackNotify.decode(O.data);break;case"onUpdateCall":O.data=com.quick.voice.proto.UpdateCall.decode(O.data);break;case"onDataChannelPublish":O.data=com.quick.voice.proto.UserChannel.decode(O.data);break;case"onDestroyRoom":O.data=com.quick.voice.proto.QuitNotify.decode(O.data);break;case"onUpdatePermissions":O.data=com.quick.voice.proto.UpdatePermissions.decode(O.data);break;case"onNetQuality":O.data=com.quick.voice.proto.NetQualityNotify.decode(O.data);break;case"syncRoomInfo":O.data=com.quick.voice.proto.SyncRoomInfoRsp.decode(O.data);break;case"onCDNPlayUrlAdd":O.data=com.quick.voice.proto.CDNPlayAddressNotify.decode(O.data);break;case"onUpdateBehavior":O.data=com.quick.voice.proto.PreventUsersBehaviorNotify.decode(O.data);break;case"debugger":O.data=JSON.parse(new TextDecoder().decode(O.data));break}return O};class CallsWebSocket{constructor(N){Ge(this,st);Ge(this,it,{url:"wss://demo.putplay.cc/websocket",debug:!1,reconnectCount:10,timeout:30*1e3});Ge(this,Rt,"");Ge(this,Pt,{});Ge(this,Jt,{});_e(this,"state","closed");_e(this,"sendMessageBefore",async()=>{});_e(this,"onReconnectSuccess",N=>{});_e(this,"onReconnectStop",N=>{});Ge(this,Rn,N=>{let I=!0;const{code:D=1e3}=N;return(D===1e3||D===4e3)&&(I=!1),this.state="connecting",I});Ge(this,$n,async N=>{Oe(this,it).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 重连成功",N),this.state="connected",this.onReconnectSuccess(N)});Ge(this,An,async N=>{Oe(this,it).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 重连停止",N),this.onReconnectStop(N)});Ge(this,wn,(N,I={})=>{try{const{time:D,event:f,data:k={},data_original:i={},data_remote:c,...$}=I,C=E(D,"YYYY-MM-DD hh:mm:ss",{offset:480});let M={};const Z=(ye={})=>{const re=JSON.parse(JSON.stringify(ye)),de=Object.keys(re);for(const se of de)(se.includes("sdp")||se.includes("Sdp"))&&(re[se]="");return re};let J="res ↓";switch(N){case"res":J="res ↓",M=Z(k);break;case"req":J="req ↑",M=Z(i);break}let z="#quickvo.logs";ignoreEvent.includes(f)&&(z="#quickvo.ignoreEvents");const Q={"#action":J,timeStr:C,event:f,data:M,time:D,...$},ee=localStorage.getItem(z)||JSON.stringify([]),Y=JSON.parse(ee);let te=f==="heartbeat"||f==="heartbeatEx";const ie=[Q];for(const ye of Y){const{event:re}=ye;if(re==="heartbeat"||re==="heartbeatEx"){if(te)continue;te=!0}if(ie.length===200)break;ie.push(ye)}localStorage.setItem(z,JSON.stringify(ie))}catch(D){Oe(this,it).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: updataLogs is error",D)}});Ge(this,Cn,(N,{resolve:I,reject:D})=>{const{sn:f=""}=N,k=()=>{const c=Oe(this,Pt)[f];clearTimeout(c.destructionTimer),delete Oe(this,Pt)[f]},i=window.setTimeout(()=>{const c=Oe(this,Pt)[f];console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo:event is timeout",c.message),k(),D("event is timeout")},Oe(this,it).timeout);Oe(this,Pt)[f]={message:N,resolve:I,reject:D,destruction:k,destructionTimer:i}});Ge(this,Dn,N=>Oe(this,Pt)[N]);Ge(this,Bn,async N=>{const I=new Uint8Array(N),D=com.quick.voice.proto.CommonRsp.decode(I),{sn:f,event:k}=D,i=onMessageFormat(D);if(Oe(this,it).debug&&!ignoreEvent.includes(k)&&(Oe(this,wn).call(this,"res",i),console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ff0097;padding:16px 0;","------->quickvo: 响应消息↓",i)),notifyName_keys.includes(k))return this.emitNotify(k,P$1(i,["code","data","desc"]));const $=Oe(this,Dn).call(this,f);if($){const{resolve:C=Z=>{},destruction:M=()=>{}}=$;C(P$1(i,["code","data","desc"])),M()}});_e(this,"clearEvents",(N=[])=>{const I=Object.keys(Oe(this,Pt));N.length===0&&(N=I);for(const D of I){if(!N.includes(D))continue;const f=Oe(this,Pt)[D];if(f){const{destruction:k}=f;k()}}});_e(this,"connect",async(N="")=>new Promise(async I=>{N&&kt(this,Rt,N),Oe(this,st)&&(await Oe(this,st).close(),this.state="closed");const D=`${Oe(this,it).url}?s=${Oe(this,Rt)}&t=${Date.now()}`,f=new Date().getTime();if(kt(this,st,new S({...Oe(this,it),debug:!0,url:D,binaryType:"arraybuffer",onMessage:Oe(this,Bn),checkReconnect:Oe(this,Rn),getHeartbeatMsg:()=>"",onReconnectSuccess:Oe(this,$n),onReconnectStop:Oe(this,An)})),this.state="connecting",await Oe(this,st).connect(),this.state="connected",Oe(this,it).debug){const i=new Date().getTime()-f;console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;",`------->quickvo: 连接耗时-${i}ms-广播事件`,Oe(this,Jt))}I(Oe(this,st))}));_e(this,"close",async()=>{var I;Oe(this,it).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: cws is close.");const N=Object.keys(Oe(this,Pt));for(const D of N){const{destructionTimer:f}=Oe(this,Pt)[D];clearTimeout(f)}kt(this,Pt,{}),await((I=Oe(this,st))==null?void 0:I.close()),this.state="closed"});_e(this,"sendMessage",(N,I=!0)=>new Promise(async(D,f)=>{var M;await this.sendMessageBefore();const{event:k,...i}=N,c=Date.now(),$=sendMessageFormat({event:k,sn:+`${c}${v$1(1e3,9999)}`,time:c,valid:Oe(this,it).timeout,version:1,compress:!1,...i});Oe(this,it).debug&&!ignoreEvent.includes(k)&&(Oe(this,wn).call(this,"req",$),console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ff9700;padding:16px 0;","------->quickvo: 发送消息↑",$)),I&&Oe(this,Cn).call(this,$,{resolve:D,reject:f});const C=com.quick.voice.proto.CommonReq.encode($).finish();(M=Oe(this,st))==null||M.sendMessage(C)}));_e(this,"emitNotify",async(N,I)=>{const D=Oe(this,Jt)[N]||[];for(const f of D){const{callback:k=async()=>{}}=f;await k(I)}});_e(this,"addNotify",(N,I=!1)=>{const{event:D,sn:f=xt(32)}=N;Oe(this,Jt)[D]||(Oe(this,Jt)[D]=[]);const k=Oe(this,Jt)[D],i=k.findIndex(c=>c.sn===f);return i!==-1&&k.splice(i,1),I?k.unshift(N):k.push(N),f});_e(this,"removeNotify",(N=[])=>{if(N.length===0)kt(this,Jt,{});else{const I=Object.keys(Oe(this,Jt));for(const D of I)Oe(this,Jt)[D]=Oe(this,Jt)[D].filter(f=>!N.includes(f.sn||""))}Oe(this,it).debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 移除广播事件",Oe(this,Jt))});kt(this,it,{...Oe(this,it),...N})}}st=new WeakMap,it=new WeakMap,Rt=new WeakMap,Pt=new WeakMap,Jt=new WeakMap,Rn=new WeakMap,$n=new WeakMap,An=new WeakMap,wn=new WeakMap,Cn=new WeakMap,Dn=new WeakMap,Bn=new WeakMap;/*! For license information please see pikazLocationModule.js.LICENSE.txt */var e$2={782:function(O){O.exports=(()=>{var N={483:(f,k,i)=>{f.exports=function c($,C,M){function Z(Q,ee){if(!C[Q]){if(!$[Q]){if(J)return J(Q,!0);var Y=new Error("Cannot find module '"+Q+"'");throw Y.code="MODULE_NOT_FOUND",Y}var te=C[Q]={exports:{}};$[Q][0].call(te.exports,function(ie){return Z($[Q][1][ie]||ie)},te,te.exports,c,$,C,M)}return C[Q].exports}for(var J=void 0,z=0;z<M.length;z++)Z(M[z]);return Z}({1:[function(c,$,C){(function(M){var Z,J,z=M.MutationObserver||M.WebKitMutationObserver;if(z){var Q=0,ee=new z(ye),Y=M.document.createTextNode("");ee.observe(Y,{characterData:!0}),Z=function(){Y.data=Q=++Q%2}}else if(M.setImmediate||M.MessageChannel===void 0)Z="document"in M&&"onreadystatechange"in M.document.createElement("script")?function(){var re=M.document.createElement("script");re.onreadystatechange=function(){ye(),re.onreadystatechange=null,re.parentNode.removeChild(re),re=null},M.document.documentElement.appendChild(re)}:function(){setTimeout(ye,0)};else{var te=new M.MessageChannel;te.port1.onmessage=ye,Z=function(){te.port2.postMessage(0)}}var ie=[];function ye(){var re,de;J=!0;for(var se=ie.length;se;){for(de=ie,ie=[],re=-1;++re<se;)de[re]();se=ie.length}J=!1}$.exports=function(re){ie.push(re)!==1||J||Z()}}).call(this,i.g!==void 0?i.g:typeof self<"u"?self:typeof window<"u"?window:{})},{}],2:[function(c,$,C){var M=c(1);function Z(){}var J={},z=["REJECTED"],Q=["FULFILLED"],ee=["PENDING"];function Y(se){if(typeof se!="function")throw new TypeError("resolver must be a function");this.state=ee,this.queue=[],this.outcome=void 0,se!==Z&&re(this,se)}function te(se,ue,he){this.promise=se,typeof ue=="function"&&(this.onFulfilled=ue,this.callFulfilled=this.otherCallFulfilled),typeof he=="function"&&(this.onRejected=he,this.callRejected=this.otherCallRejected)}function ie(se,ue,he){M(function(){var we;try{we=ue(he)}catch(fe){return J.reject(se,fe)}we===se?J.reject(se,new TypeError("Cannot resolve promise with itself")):J.resolve(se,we)})}function ye(se){var ue=se&&se.then;if(se&&(typeof se=="object"||typeof se=="function")&&typeof ue=="function")return function(){ue.apply(se,arguments)}}function re(se,ue){var he=!1;function we(Re){he||(he=!0,J.reject(se,Re))}function fe(Re){he||(he=!0,J.resolve(se,Re))}var me=de(function(){ue(fe,we)});me.status==="error"&&we(me.value)}function de(se,ue){var he={};try{he.value=se(ue),he.status="success"}catch(we){he.status="error",he.value=we}return he}$.exports=Y,Y.prototype.catch=function(se){return this.then(null,se)},Y.prototype.then=function(se,ue){if(typeof se!="function"&&this.state===Q||typeof ue!="function"&&this.state===z)return this;var he=new this.constructor(Z);return this.state!==ee?ie(he,this.state===Q?se:ue,this.outcome):this.queue.push(new te(he,se,ue)),he},te.prototype.callFulfilled=function(se){J.resolve(this.promise,se)},te.prototype.otherCallFulfilled=function(se){ie(this.promise,this.onFulfilled,se)},te.prototype.callRejected=function(se){J.reject(this.promise,se)},te.prototype.otherCallRejected=function(se){ie(this.promise,this.onRejected,se)},J.resolve=function(se,ue){var he=de(ye,ue);if(he.status==="error")return J.reject(se,he.value);var we=he.value;if(we)re(se,we);else{se.state=Q,se.outcome=ue;for(var fe=-1,me=se.queue.length;++fe<me;)se.queue[fe].callFulfilled(ue)}return se},J.reject=function(se,ue){se.state=z,se.outcome=ue;for(var he=-1,we=se.queue.length;++he<we;)se.queue[he].callRejected(ue);return se},Y.resolve=function(se){return se instanceof this?se:J.resolve(new this(Z),se)},Y.reject=function(se){var ue=new this(Z);return J.reject(ue,se)},Y.all=function(se){var ue=this;if(Object.prototype.toString.call(se)!=="[object Array]")return this.reject(new TypeError("must be an array"));var he=se.length,we=!1;if(!he)return this.resolve([]);for(var fe=new Array(he),me=0,Re=-1,Ue=new this(Z);++Re<he;)Pe(se[Re],Re);return Ue;function Pe(De,vt){ue.resolve(De).then(function(_t){fe[vt]=_t,++me!==he||we||(we=!0,J.resolve(Ue,fe))},function(_t){we||(we=!0,J.reject(Ue,_t))})}},Y.race=function(se){if(Object.prototype.toString.call(se)!=="[object Array]")return this.reject(new TypeError("must be an array"));var ue,he=se.length,we=!1;if(!he)return this.resolve([]);for(var fe=-1,me=new this(Z);++fe<he;)ue=se[fe],this.resolve(ue).then(function(Re){we||(we=!0,J.resolve(me,Re))},function(Re){we||(we=!0,J.reject(me,Re))});return me}},{1:1}],3:[function(c,$,C){(function(M){typeof M.Promise!="function"&&(M.Promise=c(2))}).call(this,i.g!==void 0?i.g:typeof self<"u"?self:typeof window<"u"?window:{})},{2:2}],4:[function(c,$,C){var M=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ne){return typeof ne}:function(ne){return ne&&typeof Symbol=="function"&&ne.constructor===Symbol&&ne!==Symbol.prototype?"symbol":typeof ne},Z=function(){try{if(typeof indexedDB<"u")return indexedDB;if(typeof webkitIndexedDB<"u")return webkitIndexedDB;if(typeof mozIndexedDB<"u")return mozIndexedDB;if(typeof OIndexedDB<"u")return OIndexedDB;if(typeof msIndexedDB<"u")return msIndexedDB}catch{return}}();function J(ne,ce){ne=ne||[],ce=ce||{};try{return new Blob(ne,ce)}catch(ge){if(ge.name!=="TypeError")throw ge;for(var le=new(typeof BlobBuilder<"u"?BlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:WebKitBlobBuilder),ke=0;ke<ne.length;ke+=1)le.append(ne[ke]);return le.getBlob(ce.type)}}typeof Promise>"u"&&c(3);var z=Promise;function Q(ne,ce){ce&&ne.then(function(le){ce(null,le)},function(le){ce(le)})}function ee(ne,ce,le){typeof ce=="function"&&ne.then(ce),typeof le=="function"&&ne.catch(le)}function Y(ne){return typeof ne!="string"&&(console.warn(ne+" used as a key, but it is not a string."),ne=String(ne)),ne}function te(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var ie="local-forage-detect-blob-support",ye=void 0,re={},de=Object.prototype.toString,se="readonly",ue="readwrite";function he(ne){for(var ce=ne.length,le=new ArrayBuffer(ce),ke=new Uint8Array(le),ge=0;ge<ce;ge++)ke[ge]=ne.charCodeAt(ge);return le}function we(ne){return typeof ye=="boolean"?z.resolve(ye):function(ce){return new z(function(le){var ke=ce.transaction(ie,ue),ge=J([""]);ke.objectStore(ie).put(ge,"key"),ke.onabort=function(Se){Se.preventDefault(),Se.stopPropagation(),le(!1)},ke.oncomplete=function(){var Se=navigator.userAgent.match(/Chrome\/(\d+)/),$e=navigator.userAgent.match(/Edge\//);le($e||!Se||parseInt(Se[1],10)>=43)}}).catch(function(){return!1})}(ne).then(function(ce){return ye=ce})}function fe(ne){var ce=re[ne.name],le={};le.promise=new z(function(ke,ge){le.resolve=ke,le.reject=ge}),ce.deferredOperations.push(le),ce.dbReady?ce.dbReady=ce.dbReady.then(function(){return le.promise}):ce.dbReady=le.promise}function me(ne){var ce=re[ne.name].deferredOperations.pop();if(ce)return ce.resolve(),ce.promise}function Re(ne,ce){var le=re[ne.name].deferredOperations.pop();if(le)return le.reject(ce),le.promise}function Ue(ne,ce){return new z(function(le,ke){if(re[ne.name]=re[ne.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},ne.db){if(!ce)return le(ne.db);fe(ne),ne.db.close()}var ge=[ne.name];ce&&ge.push(ne.version);var Se=Z.open.apply(Z,ge);ce&&(Se.onupgradeneeded=function($e){var Ne=Se.result;try{Ne.createObjectStore(ne.storeName),$e.oldVersion<=1&&Ne.createObjectStore(ie)}catch(qe){if(qe.name!=="ConstraintError")throw qe;console.warn('The database "'+ne.name+'" has been upgraded from version '+$e.oldVersion+" to version "+$e.newVersion+', but the storage "'+ne.storeName+'" already exists.')}}),Se.onerror=function($e){$e.preventDefault(),ke(Se.error)},Se.onsuccess=function(){var $e=Se.result;$e.onversionchange=function(Ne){Ne.target.close()},le($e),me(ne)}})}function Pe(ne){return Ue(ne,!1)}function De(ne){return Ue(ne,!0)}function vt(ne,ce){if(!ne.db)return!0;var le=!ne.db.objectStoreNames.contains(ne.storeName),ke=ne.version<ne.db.version,ge=ne.version>ne.db.version;if(ke&&(ne.version!==ce&&console.warn('The database "'+ne.name+`" can't be downgraded from version `+ne.db.version+" to version "+ne.version+"."),ne.version=ne.db.version),ge||le){if(le){var Se=ne.db.version+1;Se>ne.version&&(ne.version=Se)}return!0}return!1}function _t(ne){return J([he(atob(ne.data))],{type:ne.type})}function St(ne){return ne&&ne.__local_forage_encoded_blob}function Mt(ne){var ce=this,le=ce._initReady().then(function(){var ke=re[ce._dbInfo.name];if(ke&&ke.dbReady)return ke.dbReady});return ee(le,ne,ne),le}function At(ne,ce,le,ke){ke===void 0&&(ke=1);try{var ge=ne.db.transaction(ne.storeName,ce);le(null,ge)}catch(Se){if(ke>0&&(!ne.db||Se.name==="InvalidStateError"||Se.name==="NotFoundError"))return z.resolve().then(function(){if(!ne.db||Se.name==="NotFoundError"&&!ne.db.objectStoreNames.contains(ne.storeName)&&ne.version<=ne.db.version)return ne.db&&(ne.version=ne.db.version+1),De(ne)}).then(function(){return function($e){fe($e);for(var Ne=re[$e.name],qe=Ne.forages,Be=0;Be<qe.length;Be++){var Le=qe[Be];Le._dbInfo.db&&(Le._dbInfo.db.close(),Le._dbInfo.db=null)}return $e.db=null,Pe($e).then(function(je){return $e.db=je,vt($e)?De($e):je}).then(function(je){$e.db=Ne.db=je;for(var Ze=0;Ze<qe.length;Ze++)qe[Ze]._dbInfo.db=je}).catch(function(je){throw Re($e,je),je})}(ne).then(function(){At(ne,ce,le,ke-1)})}).catch(le);le(Se)}}var ct={_driver:"asyncStorage",_initStorage:function(ne){var ce=this,le={db:null};if(ne)for(var ke in ne)le[ke]=ne[ke];var ge=re[le.name];ge||(ge={forages:[],db:null,dbReady:null,deferredOperations:[]},re[le.name]=ge),ge.forages.push(ce),ce._initReady||(ce._initReady=ce.ready,ce.ready=Mt);var Se=[];function $e(){return z.resolve()}for(var Ne=0;Ne<ge.forages.length;Ne++){var qe=ge.forages[Ne];qe!==ce&&Se.push(qe._initReady().catch($e))}var Be=ge.forages.slice(0);return z.all(Se).then(function(){return le.db=ge.db,Pe(le)}).then(function(Le){return le.db=Le,vt(le,ce._defaultConfig.version)?De(le):Le}).then(function(Le){le.db=ge.db=Le,ce._dbInfo=le;for(var je=0;je<Be.length;je++){var Ze=Be[je];Ze!==ce&&(Ze._dbInfo.db=le.db,Ze._dbInfo.version=le.version)}})},_support:function(){try{if(!Z||!Z.open)return!1;var ne=typeof openDatabase<"u"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),ce=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!ne||ce)&&typeof indexedDB<"u"&&typeof IDBKeyRange<"u"}catch{return!1}}(),iterate:function(ne,ce){var le=this,ke=new z(function(ge,Se){le.ready().then(function(){At(le._dbInfo,se,function($e,Ne){if($e)return Se($e);try{var qe=Ne.objectStore(le._dbInfo.storeName).openCursor(),Be=1;qe.onsuccess=function(){var Le=qe.result;if(Le){var je=Le.value;St(je)&&(je=_t(je));var Ze=ne(je,Le.key,Be++);Ze!==void 0?ge(Ze):Le.continue()}else ge()},qe.onerror=function(){Se(qe.error)}}catch(Le){Se(Le)}})}).catch(Se)});return Q(ke,ce),ke},getItem:function(ne,ce){var le=this;ne=Y(ne);var ke=new z(function(ge,Se){le.ready().then(function(){At(le._dbInfo,se,function($e,Ne){if($e)return Se($e);try{var qe=Ne.objectStore(le._dbInfo.storeName).get(ne);qe.onsuccess=function(){var Be=qe.result;Be===void 0&&(Be=null),St(Be)&&(Be=_t(Be)),ge(Be)},qe.onerror=function(){Se(qe.error)}}catch(Be){Se(Be)}})}).catch(Se)});return Q(ke,ce),ke},setItem:function(ne,ce,le){var ke=this;ne=Y(ne);var ge=new z(function(Se,$e){var Ne;ke.ready().then(function(){return Ne=ke._dbInfo,de.call(ce)==="[object Blob]"?we(Ne.db).then(function(qe){return qe?ce:(Be=ce,new z(function(Le,je){var Ze=new FileReader;Ze.onerror=je,Ze.onloadend=function(nt){var at=btoa(nt.target.result||"");Le({__local_forage_encoded_blob:!0,data:at,type:Be.type})},Ze.readAsBinaryString(Be)}));var Be}):ce}).then(function(qe){At(ke._dbInfo,ue,function(Be,Le){if(Be)return $e(Be);try{var je=Le.objectStore(ke._dbInfo.storeName);qe===null&&(qe=void 0);var Ze=je.put(qe,ne);Le.oncomplete=function(){qe===void 0&&(qe=null),Se(qe)},Le.onabort=Le.onerror=function(){var nt=Ze.error?Ze.error:Ze.transaction.error;$e(nt)}}catch(nt){$e(nt)}})}).catch($e)});return Q(ge,le),ge},removeItem:function(ne,ce){var le=this;ne=Y(ne);var ke=new z(function(ge,Se){le.ready().then(function(){At(le._dbInfo,ue,function($e,Ne){if($e)return Se($e);try{var qe=Ne.objectStore(le._dbInfo.storeName).delete(ne);Ne.oncomplete=function(){ge()},Ne.onerror=function(){Se(qe.error)},Ne.onabort=function(){var Be=qe.error?qe.error:qe.transaction.error;Se(Be)}}catch(Be){Se(Be)}})}).catch(Se)});return Q(ke,ce),ke},clear:function(ne){var ce=this,le=new z(function(ke,ge){ce.ready().then(function(){At(ce._dbInfo,ue,function(Se,$e){if(Se)return ge(Se);try{var Ne=$e.objectStore(ce._dbInfo.storeName).clear();$e.oncomplete=function(){ke()},$e.onabort=$e.onerror=function(){var qe=Ne.error?Ne.error:Ne.transaction.error;ge(qe)}}catch(qe){ge(qe)}})}).catch(ge)});return Q(le,ne),le},length:function(ne){var ce=this,le=new z(function(ke,ge){ce.ready().then(function(){At(ce._dbInfo,se,function(Se,$e){if(Se)return ge(Se);try{var Ne=$e.objectStore(ce._dbInfo.storeName).count();Ne.onsuccess=function(){ke(Ne.result)},Ne.onerror=function(){ge(Ne.error)}}catch(qe){ge(qe)}})}).catch(ge)});return Q(le,ne),le},key:function(ne,ce){var le=this,ke=new z(function(ge,Se){ne<0?ge(null):le.ready().then(function(){At(le._dbInfo,se,function($e,Ne){if($e)return Se($e);try{var qe=Ne.objectStore(le._dbInfo.storeName),Be=!1,Le=qe.openKeyCursor();Le.onsuccess=function(){var je=Le.result;je?ne===0||Be?ge(je.key):(Be=!0,je.advance(ne)):ge(null)},Le.onerror=function(){Se(Le.error)}}catch(je){Se(je)}})}).catch(Se)});return Q(ke,ce),ke},keys:function(ne){var ce=this,le=new z(function(ke,ge){ce.ready().then(function(){At(ce._dbInfo,se,function(Se,$e){if(Se)return ge(Se);try{var Ne=$e.objectStore(ce._dbInfo.storeName).openKeyCursor(),qe=[];Ne.onsuccess=function(){var Be=Ne.result;Be?(qe.push(Be.key),Be.continue()):ke(qe)},Ne.onerror=function(){ge(Ne.error)}}catch(Be){ge(Be)}})}).catch(ge)});return Q(le,ne),le},dropInstance:function(ne,ce){ce=te.apply(this,arguments);var le=this.config();(ne=typeof ne!="function"&&ne||{}).name||(ne.name=ne.name||le.name,ne.storeName=ne.storeName||le.storeName);var ke,ge=this;if(ne.name){var Se=ne.name===le.name&&ge._dbInfo.db?z.resolve(ge._dbInfo.db):Pe(ne).then(function($e){var Ne=re[ne.name],qe=Ne.forages;Ne.db=$e;for(var Be=0;Be<qe.length;Be++)qe[Be]._dbInfo.db=$e;return $e});ke=ne.storeName?Se.then(function($e){if($e.objectStoreNames.contains(ne.storeName)){var Ne=$e.version+1;fe(ne);var qe=re[ne.name],Be=qe.forages;$e.close();for(var Le=0;Le<Be.length;Le++){var je=Be[Le];je._dbInfo.db=null,je._dbInfo.version=Ne}var Ze=new z(function(nt,at){var It=Z.open(ne.name,Ne);It.onerror=function(Qt){It.result.close(),at(Qt)},It.onupgradeneeded=function(){It.result.deleteObjectStore(ne.storeName)},It.onsuccess=function(){var Qt=It.result;Qt.close(),nt(Qt)}});return Ze.then(function(nt){qe.db=nt;for(var at=0;at<Be.length;at++){var It=Be[at];It._dbInfo.db=nt,me(It._dbInfo)}}).catch(function(nt){throw(Re(ne,nt)||z.resolve()).catch(function(){}),nt})}}):Se.then(function($e){fe(ne);var Ne=re[ne.name],qe=Ne.forages;$e.close();for(var Be=0;Be<qe.length;Be++)qe[Be]._dbInfo.db=null;var Le=new z(function(je,Ze){var nt=Z.deleteDatabase(ne.name);nt.onerror=function(){var at=nt.result;at&&at.close(),Ze(nt.error)},nt.onblocked=function(){console.warn('dropInstance blocked for database "'+ne.name+'" until all open connections are closed')},nt.onsuccess=function(){var at=nt.result;at&&at.close(),je(at)}});return Le.then(function(je){Ne.db=je;for(var Ze=0;Ze<qe.length;Ze++)me(qe[Ze]._dbInfo)}).catch(function(je){throw(Re(ne,je)||z.resolve()).catch(function(){}),je})})}else ke=z.reject("Invalid arguments");return Q(ke,ce),ke}},Qe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Lt=/^~~local_forage_type~([^~]+)~/,gt="__lfsc__:",Ae=gt.length,Ye="arbf",qt="blob",Ot="si08",Ke="ui08",Ve="uic8",Xe="si16",et="si32",ut="ur16",Tt="ui32",Ct="fl32",Dt="fl64",Ht=Ae+Ye.length,Ft=Object.prototype.toString;function rn(ne){var ce,le,ke,ge,Se,$e=.75*ne.length,Ne=ne.length,qe=0;ne[ne.length-1]==="="&&($e--,ne[ne.length-2]==="="&&$e--);var Be=new ArrayBuffer($e),Le=new Uint8Array(Be);for(ce=0;ce<Ne;ce+=4)le=Qe.indexOf(ne[ce]),ke=Qe.indexOf(ne[ce+1]),ge=Qe.indexOf(ne[ce+2]),Se=Qe.indexOf(ne[ce+3]),Le[qe++]=le<<2|ke>>4,Le[qe++]=(15&ke)<<4|ge>>2,Le[qe++]=(3&ge)<<6|63&Se;return Be}function Zt(ne){var ce,le=new Uint8Array(ne),ke="";for(ce=0;ce<le.length;ce+=3)ke+=Qe[le[ce]>>2],ke+=Qe[(3&le[ce])<<4|le[ce+1]>>4],ke+=Qe[(15&le[ce+1])<<2|le[ce+2]>>6],ke+=Qe[63&le[ce+2]];return le.length%3==2?ke=ke.substring(0,ke.length-1)+"=":le.length%3==1&&(ke=ke.substring(0,ke.length-2)+"=="),ke}var Gt={serialize:function(ne,ce){var le="";if(ne&&(le=Ft.call(ne)),ne&&(le==="[object ArrayBuffer]"||ne.buffer&&Ft.call(ne.buffer)==="[object ArrayBuffer]")){var ke,ge=gt;ne instanceof ArrayBuffer?(ke=ne,ge+=Ye):(ke=ne.buffer,le==="[object Int8Array]"?ge+=Ot:le==="[object Uint8Array]"?ge+=Ke:le==="[object Uint8ClampedArray]"?ge+=Ve:le==="[object Int16Array]"?ge+=Xe:le==="[object Uint16Array]"?ge+=ut:le==="[object Int32Array]"?ge+=et:le==="[object Uint32Array]"?ge+=Tt:le==="[object Float32Array]"?ge+=Ct:le==="[object Float64Array]"?ge+=Dt:ce(new Error("Failed to get type for BinaryArray"))),ce(ge+Zt(ke))}else if(le==="[object Blob]"){var Se=new FileReader;Se.onload=function(){var $e="~~local_forage_type~"+ne.type+"~"+Zt(this.result);ce("__lfsc__:blob"+$e)},Se.readAsArrayBuffer(ne)}else try{ce(JSON.stringify(ne))}catch($e){console.error("Couldn't convert value into a JSON string: ",ne),ce(null,$e)}},deserialize:function(ne){if(ne.substring(0,Ae)!==gt)return JSON.parse(ne);var ce,le=ne.substring(Ht),ke=ne.substring(Ae,Ht);if(ke===qt&&Lt.test(le)){var ge=le.match(Lt);ce=ge[1],le=le.substring(ge[0].length)}var Se=rn(le);switch(ke){case Ye:return Se;case qt:return J([Se],{type:ce});case Ot:return new Int8Array(Se);case Ke:return new Uint8Array(Se);case Ve:return new Uint8ClampedArray(Se);case Xe:return new Int16Array(Se);case ut:return new Uint16Array(Se);case et:return new Int32Array(Se);case Tt:return new Uint32Array(Se);case Ct:return new Float32Array(Se);case Dt:return new Float64Array(Se);default:throw new Error("Unkown type: "+ke)}},stringToBuffer:rn,bufferToString:Zt};function Ut(ne,ce,le,ke){ne.executeSql("CREATE TABLE IF NOT EXISTS "+ce.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],le,ke)}function jt(ne,ce,le,ke,ge,Se){ne.executeSql(le,ke,ge,function($e,Ne){Ne.code===Ne.SYNTAX_ERR?$e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[ce.storeName],function(qe,Be){Be.rows.length?Se(qe,Ne):Ut(qe,ce,function(){qe.executeSql(le,ke,ge,Se)},Se)},Se):Se($e,Ne)},Se)}function dn(ne,ce,le,ke){var ge=this;ne=Y(ne);var Se=new z(function($e,Ne){ge.ready().then(function(){ce===void 0&&(ce=null);var qe=ce,Be=ge._dbInfo;Be.serializer.serialize(ce,function(Le,je){je?Ne(je):Be.db.transaction(function(Ze){jt(Ze,Be,"INSERT OR REPLACE INTO "+Be.storeName+" (key, value) VALUES (?, ?)",[ne,Le],function(){$e(qe)},function(nt,at){Ne(at)})},function(Ze){if(Ze.code===Ze.QUOTA_ERR){if(ke>0)return void $e(dn.apply(ge,[ne,qe,le,ke-1]));Ne(Ze)}})})}).catch(Ne)});return Q(Se,le),Se}function Kt(ne){return new z(function(ce,le){ne.transaction(function(ke){ke.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(ge,Se){for(var $e=[],Ne=0;Ne<Se.rows.length;Ne++)$e.push(Se.rows.item(Ne).name);ce({db:ne,storeNames:$e})},function(ge,Se){le(Se)})},function(ke){le(ke)})})}var zt={_driver:"webSQLStorage",_initStorage:function(ne){var ce=this,le={db:null};if(ne)for(var ke in ne)le[ke]=typeof ne[ke]!="string"?ne[ke].toString():ne[ke];var ge=new z(function(Se,$e){try{le.db=openDatabase(le.name,String(le.version),le.description,le.size)}catch(Ne){return $e(Ne)}le.db.transaction(function(Ne){Ut(Ne,le,function(){ce._dbInfo=le,Se()},function(qe,Be){$e(Be)})},$e)});return le.serializer=Gt,ge},_support:typeof openDatabase=="function",iterate:function(ne,ce){var le=this,ke=new z(function(ge,Se){le.ready().then(function(){var $e=le._dbInfo;$e.db.transaction(function(Ne){jt(Ne,$e,"SELECT * FROM "+$e.storeName,[],function(qe,Be){for(var Le=Be.rows,je=Le.length,Ze=0;Ze<je;Ze++){var nt=Le.item(Ze),at=nt.value;if(at&&(at=$e.serializer.deserialize(at)),(at=ne(at,nt.key,Ze+1))!==void 0)return void ge(at)}ge()},function(qe,Be){Se(Be)})})}).catch(Se)});return Q(ke,ce),ke},getItem:function(ne,ce){var le=this;ne=Y(ne);var ke=new z(function(ge,Se){le.ready().then(function(){var $e=le._dbInfo;$e.db.transaction(function(Ne){jt(Ne,$e,"SELECT * FROM "+$e.storeName+" WHERE key = ? LIMIT 1",[ne],function(qe,Be){var Le=Be.rows.length?Be.rows.item(0).value:null;Le&&(Le=$e.serializer.deserialize(Le)),ge(Le)},function(qe,Be){Se(Be)})})}).catch(Se)});return Q(ke,ce),ke},setItem:function(ne,ce,le){return dn.apply(this,[ne,ce,le,1])},removeItem:function(ne,ce){var le=this;ne=Y(ne);var ke=new z(function(ge,Se){le.ready().then(function(){var $e=le._dbInfo;$e.db.transaction(function(Ne){jt(Ne,$e,"DELETE FROM "+$e.storeName+" WHERE key = ?",[ne],function(){ge()},function(qe,Be){Se(Be)})})}).catch(Se)});return Q(ke,ce),ke},clear:function(ne){var ce=this,le=new z(function(ke,ge){ce.ready().then(function(){var Se=ce._dbInfo;Se.db.transaction(function($e){jt($e,Se,"DELETE FROM "+Se.storeName,[],function(){ke()},function(Ne,qe){ge(qe)})})}).catch(ge)});return Q(le,ne),le},length:function(ne){var ce=this,le=new z(function(ke,ge){ce.ready().then(function(){var Se=ce._dbInfo;Se.db.transaction(function($e){jt($e,Se,"SELECT COUNT(key) as c FROM "+Se.storeName,[],function(Ne,qe){var Be=qe.rows.item(0).c;ke(Be)},function(Ne,qe){ge(qe)})})}).catch(ge)});return Q(le,ne),le},key:function(ne,ce){var le=this,ke=new z(function(ge,Se){le.ready().then(function(){var $e=le._dbInfo;$e.db.transaction(function(Ne){jt(Ne,$e,"SELECT key FROM "+$e.storeName+" WHERE id = ? LIMIT 1",[ne+1],function(qe,Be){var Le=Be.rows.length?Be.rows.item(0).key:null;ge(Le)},function(qe,Be){Se(Be)})})}).catch(Se)});return Q(ke,ce),ke},keys:function(ne){var ce=this,le=new z(function(ke,ge){ce.ready().then(function(){var Se=ce._dbInfo;Se.db.transaction(function($e){jt($e,Se,"SELECT key FROM "+Se.storeName,[],function(Ne,qe){for(var Be=[],Le=0;Le<qe.rows.length;Le++)Be.push(qe.rows.item(Le).key);ke(Be)},function(Ne,qe){ge(qe)})})}).catch(ge)});return Q(le,ne),le},dropInstance:function(ne,ce){ce=te.apply(this,arguments);var le=this.config();(ne=typeof ne!="function"&&ne||{}).name||(ne.name=ne.name||le.name,ne.storeName=ne.storeName||le.storeName);var ke,ge=this;return Q(ke=ne.name?new z(function(Se){var $e;$e=ne.name===le.name?ge._dbInfo.db:openDatabase(ne.name,"","",0),ne.storeName?Se({db:$e,storeNames:[ne.storeName]}):Se(Kt($e))}).then(function(Se){return new z(function($e,Ne){Se.db.transaction(function(qe){function Be(nt){return new z(function(at,It){qe.executeSql("DROP TABLE IF EXISTS "+nt,[],function(){at()},function(Qt,hn){It(hn)})})}for(var Le=[],je=0,Ze=Se.storeNames.length;je<Ze;je++)Le.push(Be(Se.storeNames[je]));z.all(Le).then(function(){$e()}).catch(function(nt){Ne(nt)})},function(qe){Ne(qe)})})}):z.reject("Invalid arguments"),ce),ke}};function X(ne,ce){var le=ne.name+"/";return ne.storeName!==ce.storeName&&(le+=ne.storeName+"/"),le}var F={_driver:"localStorageWrapper",_initStorage:function(ne){var ce={};if(ne)for(var le in ne)ce[le]=ne[le];return ce.keyPrefix=X(ne,this._defaultConfig),!function(){var ke="_localforage_support_test";try{return localStorage.setItem(ke,!0),localStorage.removeItem(ke),!1}catch{return!0}}()||localStorage.length>0?(this._dbInfo=ce,ce.serializer=Gt,z.resolve()):z.reject()},_support:function(){try{return typeof localStorage<"u"&&"setItem"in localStorage&&!!localStorage.setItem}catch{return!1}}(),iterate:function(ne,ce){var le=this,ke=le.ready().then(function(){for(var ge=le._dbInfo,Se=ge.keyPrefix,$e=Se.length,Ne=localStorage.length,qe=1,Be=0;Be<Ne;Be++){var Le=localStorage.key(Be);if(Le.indexOf(Se)===0){var je=localStorage.getItem(Le);if(je&&(je=ge.serializer.deserialize(je)),(je=ne(je,Le.substring($e),qe++))!==void 0)return je}}});return Q(ke,ce),ke},getItem:function(ne,ce){var le=this;ne=Y(ne);var ke=le.ready().then(function(){var ge=le._dbInfo,Se=localStorage.getItem(ge.keyPrefix+ne);return Se&&(Se=ge.serializer.deserialize(Se)),Se});return Q(ke,ce),ke},setItem:function(ne,ce,le){var ke=this;ne=Y(ne);var ge=ke.ready().then(function(){ce===void 0&&(ce=null);var Se=ce;return new z(function($e,Ne){var qe=ke._dbInfo;qe.serializer.serialize(ce,function(Be,Le){if(Le)Ne(Le);else try{localStorage.setItem(qe.keyPrefix+ne,Be),$e(Se)}catch(je){je.name!=="QuotaExceededError"&&je.name!=="NS_ERROR_DOM_QUOTA_REACHED"||Ne(je),Ne(je)}})})});return Q(ge,le),ge},removeItem:function(ne,ce){var le=this;ne=Y(ne);var ke=le.ready().then(function(){var ge=le._dbInfo;localStorage.removeItem(ge.keyPrefix+ne)});return Q(ke,ce),ke},clear:function(ne){var ce=this,le=ce.ready().then(function(){for(var ke=ce._dbInfo.keyPrefix,ge=localStorage.length-1;ge>=0;ge--){var Se=localStorage.key(ge);Se.indexOf(ke)===0&&localStorage.removeItem(Se)}});return Q(le,ne),le},length:function(ne){var ce=this.keys().then(function(le){return le.length});return Q(ce,ne),ce},key:function(ne,ce){var le=this,ke=le.ready().then(function(){var ge,Se=le._dbInfo;try{ge=localStorage.key(ne)}catch{ge=null}return ge&&(ge=ge.substring(Se.keyPrefix.length)),ge});return Q(ke,ce),ke},keys:function(ne){var ce=this,le=ce.ready().then(function(){for(var ke=ce._dbInfo,ge=localStorage.length,Se=[],$e=0;$e<ge;$e++){var Ne=localStorage.key($e);Ne.indexOf(ke.keyPrefix)===0&&Se.push(Ne.substring(ke.keyPrefix.length))}return Se});return Q(le,ne),le},dropInstance:function(ne,ce){if(ce=te.apply(this,arguments),!(ne=typeof ne!="function"&&ne||{}).name){var le=this.config();ne.name=ne.name||le.name,ne.storeName=ne.storeName||le.storeName}var ke,ge=this;return ke=ne.name?new z(function(Se){ne.storeName?Se(X(ne,ge._defaultConfig)):Se(ne.name+"/")}).then(function(Se){for(var $e=localStorage.length-1;$e>=0;$e--){var Ne=localStorage.key($e);Ne.indexOf(Se)===0&&localStorage.removeItem(Ne)}}):z.reject("Invalid arguments"),Q(ke,ce),ke}},j=function(ne,ce){for(var le=ne.length,ke=0;ke<le;){if((ge=ne[ke])===(Se=ce)||typeof ge=="number"&&typeof Se=="number"&&isNaN(ge)&&isNaN(Se))return!0;ke++}var ge,Se;return!1},ae=Array.isArray||function(ne){return Object.prototype.toString.call(ne)==="[object Array]"},ve={},Ee={},Ce={INDEXEDDB:ct,WEBSQL:zt,LOCALSTORAGE:F},tt=[Ce.INDEXEDDB._driver,Ce.WEBSQL._driver,Ce.LOCALSTORAGE._driver],mt=["dropInstance"],ot=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(mt),wt={description:"",driver:tt.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function yt(ne,ce){ne[ce]=function(){var le=arguments;return ne.ready().then(function(){return ne[ce].apply(ne,le)})}}function on(){for(var ne=1;ne<arguments.length;ne++){var ce=arguments[ne];if(ce)for(var le in ce)ce.hasOwnProperty(le)&&(ae(ce[le])?arguments[0][le]=ce[le].slice():arguments[0][le]=ce[le])}return arguments[0]}var Zn=function(){function ne(ce){for(var le in function(Se,$e){if(!(Se instanceof $e))throw new TypeError("Cannot call a class as a function")}(this,ne),Ce)if(Ce.hasOwnProperty(le)){var ke=Ce[le],ge=ke._driver;this[le]=ge,ve[ge]||this.defineDriver(ke)}this._defaultConfig=on({},wt),this._config=on({},this._defaultConfig,ce),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return ne.prototype.config=function(ce){if((ce===void 0?"undefined":M(ce))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var le in ce){if(le==="storeName"&&(ce[le]=ce[le].replace(/\W/g,"_")),le==="version"&&typeof ce[le]!="number")return new Error("Database version must be a number.");this._config[le]=ce[le]}return!("driver"in ce)||!ce.driver||this.setDriver(this._config.driver)}return typeof ce=="string"?this._config[ce]:this._config},ne.prototype.defineDriver=function(ce,le,ke){var ge=new z(function(Se,$e){try{var Ne=ce._driver,qe=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!ce._driver)return void $e(qe);for(var Be=ot.concat("_initStorage"),Le=0,je=Be.length;Le<je;Le++){var Ze=Be[Le];if((!j(mt,Ze)||ce[Ze])&&typeof ce[Ze]!="function")return void $e(qe)}(function(){for(var at=function(xn){return function(){var Gn=new Error("Method "+xn+" is not implemented by the current driver"),Et=z.reject(Gn);return Q(Et,arguments[arguments.length-1]),Et}},It=0,Qt=mt.length;It<Qt;It++){var hn=mt[It];ce[hn]||(ce[hn]=at(hn))}})();var nt=function(at){ve[Ne]&&console.info("Redefining LocalForage driver: "+Ne),ve[Ne]=ce,Ee[Ne]=at,Se()};"_support"in ce?ce._support&&typeof ce._support=="function"?ce._support().then(nt,$e):nt(!!ce._support):nt(!0)}catch(at){$e(at)}});return ee(ge,le,ke),ge},ne.prototype.driver=function(){return this._driver||null},ne.prototype.getDriver=function(ce,le,ke){var ge=ve[ce]?z.resolve(ve[ce]):z.reject(new Error("Driver not found."));return ee(ge,le,ke),ge},ne.prototype.getSerializer=function(ce){var le=z.resolve(Gt);return ee(le,ce),le},ne.prototype.ready=function(ce){var le=this,ke=le._driverSet.then(function(){return le._ready===null&&(le._ready=le._initDriver()),le._ready});return ee(ke,ce,ce),ke},ne.prototype.setDriver=function(ce,le,ke){var ge=this;ae(ce)||(ce=[ce]);var Se=this._getSupportedDrivers(ce);function $e(){ge._config.driver=ge.driver()}function Ne(Be){return ge._extend(Be),$e(),ge._ready=ge._initStorage(ge._config),ge._ready}var qe=this._driverSet!==null?this._driverSet.catch(function(){return z.resolve()}):z.resolve();return this._driverSet=qe.then(function(){var Be=Se[0];return ge._dbInfo=null,ge._ready=null,ge.getDriver(Be).then(function(Le){ge._driver=Le._driver,$e(),ge._wrapLibraryMethodsWithReady(),ge._initDriver=function(je){return function(){var Ze=0;return function nt(){for(;Ze<je.length;){var at=je[Ze];return Ze++,ge._dbInfo=null,ge._ready=null,ge.getDriver(at).then(Ne).catch(nt)}$e();var It=new Error("No available storage method found.");return ge._driverSet=z.reject(It),ge._driverSet}()}}(Se)})}).catch(function(){$e();var Be=new Error("No available storage method found.");return ge._driverSet=z.reject(Be),ge._driverSet}),ee(this._driverSet,le,ke),this._driverSet},ne.prototype.supports=function(ce){return!!Ee[ce]},ne.prototype._extend=function(ce){on(this,ce)},ne.prototype._getSupportedDrivers=function(ce){for(var le=[],ke=0,ge=ce.length;ke<ge;ke++){var Se=ce[ke];this.supports(Se)&&le.push(Se)}return le},ne.prototype._wrapLibraryMethodsWithReady=function(){for(var ce=0,le=ot.length;ce<le;ce++)yt(this,ot[ce])},ne.prototype.createInstance=function(ce){return new ne(ce)},ne}(),Vn=new Zn;$.exports=Vn},{3:3}]},{},[4])(4)},961:(f,k,i)=>{var c,$=function(){var C=String.fromCharCode,M="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",J={};function z(ee,Y){if(!J[ee]){J[ee]={};for(var te=0;te<ee.length;te++)J[ee][ee.charAt(te)]=te}return J[ee][Y]}var Q={compressToBase64:function(ee){if(ee==null)return"";var Y=Q._compress(ee,6,function(te){return M.charAt(te)});switch(Y.length%4){default:case 0:return Y;case 1:return Y+"===";case 2:return Y+"==";case 3:return Y+"="}},decompressFromBase64:function(ee){return ee==null?"":ee==""?null:Q._decompress(ee.length,32,function(Y){return z(M,ee.charAt(Y))})},compressToUTF16:function(ee){return ee==null?"":Q._compress(ee,15,function(Y){return C(Y+32)})+" "},decompressFromUTF16:function(ee){return ee==null?"":ee==""?null:Q._decompress(ee.length,16384,function(Y){return ee.charCodeAt(Y)-32})},compressToUint8Array:function(ee){for(var Y=Q.compress(ee),te=new Uint8Array(2*Y.length),ie=0,ye=Y.length;ie<ye;ie++){var re=Y.charCodeAt(ie);te[2*ie]=re>>>8,te[2*ie+1]=re%256}return te},decompressFromUint8Array:function(ee){if(ee==null)return Q.decompress(ee);for(var Y=new Array(ee.length/2),te=0,ie=Y.length;te<ie;te++)Y[te]=256*ee[2*te]+ee[2*te+1];var ye=[];return Y.forEach(function(re){ye.push(C(re))}),Q.decompress(ye.join(""))},compressToEncodedURIComponent:function(ee){return ee==null?"":Q._compress(ee,6,function(Y){return Z.charAt(Y)})},decompressFromEncodedURIComponent:function(ee){return ee==null?"":ee==""?null:(ee=ee.replace(/ /g,"+"),Q._decompress(ee.length,32,function(Y){return z(Z,ee.charAt(Y))}))},compress:function(ee){return Q._compress(ee,16,function(Y){return C(Y)})},_compress:function(ee,Y,te){if(ee==null)return"";var ie,ye,re,de={},se={},ue="",he="",we="",fe=2,me=3,Re=2,Ue=[],Pe=0,De=0;for(re=0;re<ee.length;re+=1)if(ue=ee.charAt(re),Object.prototype.hasOwnProperty.call(de,ue)||(de[ue]=me++,se[ue]=!0),he=we+ue,Object.prototype.hasOwnProperty.call(de,he))we=he;else{if(Object.prototype.hasOwnProperty.call(se,we)){if(we.charCodeAt(0)<256){for(ie=0;ie<Re;ie++)Pe<<=1,De==Y-1?(De=0,Ue.push(te(Pe)),Pe=0):De++;for(ye=we.charCodeAt(0),ie=0;ie<8;ie++)Pe=Pe<<1|1&ye,De==Y-1?(De=0,Ue.push(te(Pe)),Pe=0):De++,ye>>=1}else{for(ye=1,ie=0;ie<Re;ie++)Pe=Pe<<1|ye,De==Y-1?(De=0,Ue.push(te(Pe)),Pe=0):De++,ye=0;for(ye=we.charCodeAt(0),ie=0;ie<16;ie++)Pe=Pe<<1|1&ye,De==Y-1?(De=0,Ue.push(te(Pe)),Pe=0):De++,ye>>=1}--fe==0&&(fe=Math.pow(2,Re),Re++),delete se[we]}else for(ye=de[we],ie=0;ie<Re;ie++)Pe=Pe<<1|1&ye,De==Y-1?(De=0,Ue.push(te(Pe)),Pe=0):De++,ye>>=1;--fe==0&&(fe=Math.pow(2,Re),Re++),de[he]=me++,we=String(ue)}if(we!==""){if(Object.prototype.hasOwnProperty.call(se,we)){if(we.charCodeAt(0)<256){for(ie=0;ie<Re;ie++)Pe<<=1,De==Y-1?(De=0,Ue.push(te(Pe)),Pe=0):De++;for(ye=we.charCodeAt(0),ie=0;ie<8;ie++)Pe=Pe<<1|1&ye,De==Y-1?(De=0,Ue.push(te(Pe)),Pe=0):De++,ye>>=1}else{for(ye=1,ie=0;ie<Re;ie++)Pe=Pe<<1|ye,De==Y-1?(De=0,Ue.push(te(Pe)),Pe=0):De++,ye=0;for(ye=we.charCodeAt(0),ie=0;ie<16;ie++)Pe=Pe<<1|1&ye,De==Y-1?(De=0,Ue.push(te(Pe)),Pe=0):De++,ye>>=1}--fe==0&&(fe=Math.pow(2,Re),Re++),delete se[we]}else for(ye=de[we],ie=0;ie<Re;ie++)Pe=Pe<<1|1&ye,De==Y-1?(De=0,Ue.push(te(Pe)),Pe=0):De++,ye>>=1;--fe==0&&(fe=Math.pow(2,Re),Re++)}for(ye=2,ie=0;ie<Re;ie++)Pe=Pe<<1|1&ye,De==Y-1?(De=0,Ue.push(te(Pe)),Pe=0):De++,ye>>=1;for(;;){if(Pe<<=1,De==Y-1){Ue.push(te(Pe));break}De++}return Ue.join("")},decompress:function(ee){return ee==null?"":ee==""?null:Q._decompress(ee.length,32768,function(Y){return ee.charCodeAt(Y)})},_decompress:function(ee,Y,te){var ie,ye,re,de,se,ue,he,we=[],fe=4,me=4,Re=3,Ue="",Pe=[],De={val:te(0),position:Y,index:1};for(ie=0;ie<3;ie+=1)we[ie]=ie;for(re=0,se=Math.pow(2,2),ue=1;ue!=se;)de=De.val&De.position,De.position>>=1,De.position==0&&(De.position=Y,De.val=te(De.index++)),re|=(de>0?1:0)*ue,ue<<=1;switch(re){case 0:for(re=0,se=Math.pow(2,8),ue=1;ue!=se;)de=De.val&De.position,De.position>>=1,De.position==0&&(De.position=Y,De.val=te(De.index++)),re|=(de>0?1:0)*ue,ue<<=1;he=C(re);break;case 1:for(re=0,se=Math.pow(2,16),ue=1;ue!=se;)de=De.val&De.position,De.position>>=1,De.position==0&&(De.position=Y,De.val=te(De.index++)),re|=(de>0?1:0)*ue,ue<<=1;he=C(re);break;case 2:return""}for(we[3]=he,ye=he,Pe.push(he);;){if(De.index>ee)return"";for(re=0,se=Math.pow(2,Re),ue=1;ue!=se;)de=De.val&De.position,De.position>>=1,De.position==0&&(De.position=Y,De.val=te(De.index++)),re|=(de>0?1:0)*ue,ue<<=1;switch(he=re){case 0:for(re=0,se=Math.pow(2,8),ue=1;ue!=se;)de=De.val&De.position,De.position>>=1,De.position==0&&(De.position=Y,De.val=te(De.index++)),re|=(de>0?1:0)*ue,ue<<=1;we[me++]=C(re),he=me-1,fe--;break;case 1:for(re=0,se=Math.pow(2,16),ue=1;ue!=se;)de=De.val&De.position,De.position>>=1,De.position==0&&(De.position=Y,De.val=te(De.index++)),re|=(de>0?1:0)*ue,ue<<=1;we[me++]=C(re),he=me-1,fe--;break;case 2:return Pe.join("")}if(fe==0&&(fe=Math.pow(2,Re),Re++),we[he])Ue=we[he];else{if(he!==me)return null;Ue=ye+ye.charAt(0)}Pe.push(Ue),we[me++]=ye+Ue.charAt(0),ye=Ue,--fe==0&&(fe=Math.pow(2,Re),Re++)}}};return Q}();(c=(function(){return $}).call(k,i,k,f))===void 0||(f.exports=c)},895:f=>{f.exports=function(k,i,c,$){var C=k[0],M=k[1],Z=!1;c===void 0&&(c=0),$===void 0&&($=i.length);for(var J=($-c)/2,z=0,Q=J-1;z<J;Q=z++){var ee=i[c+2*z+0],Y=i[c+2*z+1],te=i[c+2*Q+0],ie=i[c+2*Q+1];Y>M!=ie>M&&C<(te-ee)*(M-Y)/(ie-Y)+ee&&(Z=!Z)}return Z}},946:(f,k,i)=>{const c=i(909),$=async()=>await c.get({dir:"areaList",file:"index"}),C=({name:Q,list:ee})=>{let Y=Q;const te=ee.find(ye=>Y.indexOf(ye.name)!==-1);if(te){const ye=te.name.length;return Y=Y.slice(ye,Q.length),{id:te.id,name:Y,children:te.children}}const ie=ee.find(ye=>Y.indexOf(ye.shortName)!==-1);if(ie){const ye=ie.shortName.length;return Y=Y.slice(ye,Q.length),{id:ie.id,name:Y,children:ie.children}}return null},M=async(Q="",ee)=>{let Y=Q;const te={province:"",city:"",district:""};let ie=ee;ee||(ie=await $());const ye=C({name:Y,list:ie});if(ye){Y=ye.name,te.province=ye.id;const se=ye.children,ue=C({name:Y,list:se});if(ue){Y=ue.name,te.city=ue.id;const fe=C({name:Y,list:ue.children});return fe&&(Y=fe.name,te.district=fe.id),te}const he=se.reduce((fe,me)=>me.children?fe.concat(me.children):fe,[]),we=C({name:Y,list:he});return we&&(Y=we.name,te.district=we.id),te}const re=ie.reduce((se,ue)=>ue.children?se.concat(ue.children):se,[]),de=C({name:Y,list:re});if(de){Y=de.name,te.city=de.id;const se=C({name:Y,list:de.children});se&&(Y=se.name,te.district=se.id)}return te},Z=async(Q={})=>{let{code:ee}={...Q};ee=typeof ee=="string"?ee:ee.toString();const Y={province:"",provinceCode:"",city:"",cityCode:"",district:"",districtCode:"",code:ee,address:""};if((await $()).every(te=>te.id===ee?(Y.province=te.name,Y.provinceCode=te.id,!1):!te.children||te.children.every(ie=>ie.id===ee?(Y.province=te.name,Y.provinceCode=te.id,Y.city=ie.name,Y.cityCode=ie.id,!1):!ie.children||ie.children.every(ye=>ye.id!==ee||(Y.province=te.name,Y.provinceCode=te.id,Y.city=ie.name,Y.cityCode=ie.id,Y.district=ye.name,Y.districtCode=ye.id,!1)))))throw new Error("未找到该地区");return Y.address=Y.province+Y.city+Y.district,Y},J=async({provinceCode:Q,cityCode:ee,districtCode:Y})=>{const te={province:{},city:{},district:{}};if(Q){const ie=await c.get({dir:"province",file:Q});te.province={code:ie.id,location:ie.location,name:ie.name,pinyin:ie.pinyin}}if(ee){const ie=(await c.get({dir:"city",file:Q})).find(ye=>ye.id===ee);te.city={code:ie.id,location:ie.location,name:ie.name,pinyin:ie.pinyin}}if(Y){const ie=(await c.get({dir:"district",file:ee})).find(ye=>ye.id===Y);te.district={code:ie.id,location:ie.location,name:ie.name,pinyin:ie.pinyin}}return te},z=async(Q,ee)=>{let Y=ee;if(Y||(Y=await $()),!Q)return Y.map(te=>({code:te.id,name:te.name}));for(let te=0;te<Y.length;te++){const ie=Y[te];if(ie.id===Q&&ie.children)return ie.children.map(ye=>({code:ye.id,name:ye.name}));if(ie.children){const ye=await z(Q,ie.children);if(ye)return ye}}};f.exports={getList:z,searchCodeInfo:async({code:Q,detail:ee})=>{const{province:Y,city:te,district:ie,address:ye,provinceCode:re,cityCode:de,districtCode:se}=await Z({code:Q}),ue={province:Y,city:te,district:ie,address:ye,code:Q};if(ee){const he=await J({provinceCode:re,cityCode:de,districtCode:se});ue.detail=he}return ue},searchStrAddress:async Q=>{const{province:ee,city:Y,district:te}=await M(Q);return te||Y||ee||null},analysisAddress:M,searchCodeDetailInfo:async({code:Q})=>{const{provinceCode:ee,cityCode:Y,districtCode:te}=await Z({code:Q}),ie=await J({provinceCode:ee,cityCode:Y,districtCode:te});return Object.keys(ie.district).length?ie.district:Object.keys(ie.city).length?ie.city:Object.keys(ie.province).length?ie.province:void 0}}},182:f=>{f.exports=new class{constructor(){this.config={timeout:1e4,enableHighAccuracy:!1,detail:!1},this.cdn=["https://npm.onmicrosoft.cn/@pikaz/location/lib","https://unpkg.com/@pikaz/location/lib"],this.userCdn=""}set(k){this.config={...this.config,...k},this.config.url&&(this.userCdn=this.config.url)}}},955:(f,k,i)=>{const c=i(909),$=i(895),C=i(182),M=({latitude:Z,longitude:J,address:z})=>z.find(Q=>Q.polygon.find(ee=>{if($([J,Z],ee))return ee}));f.exports={getGeo:(Z={})=>{const{enableHighAccuracy:J,timeout:z}={...C.config,...Z};return new Promise((Q,ee)=>{if(navigator.geolocation){const Y=navigator.geolocation.watchPosition(te=>{const{latitude:ie,longitude:ye}=te.coords;navigator.geolocation.clearWatch(Y),Q({latitude:ie,longitude:ye})},te=>{switch(navigator.geolocation.clearWatch(Y),te.code){case te.PERMISSION_DENIED:ee(new Error("html5已拒绝定位"));break;case te.POSITION_UNAVAILABLE:ee(new Error("html5位置信息不可用"));break;case te.TIMEOUT:ee(new Error("定位超时"));break;case te.UNKNOWN_ERROR:ee(new Error("html5定位未知错误"))}},{enableHighAccuracy:J,timeout:z,maximumAge:0})}else ee(new Error("浏览器不支持HTML5定位"))})},getGeoCode:async({latitude:Z,longitude:J})=>{try{let z="";const Q=(await c.get({dir:"province",file:"short"})).filter(Y=>M({latitude:Z,longitude:J,address:[Y]}));let ee="";for(let Y=0;Y<Q.length;Y++){const{id:te}=Q[Y],ie=await c.get({dir:"province",file:te}),ye=M({latitude:Z,longitude:J,address:[ie]});ye&&(ee=ye)}if(ee){z=ee.id;const Y=await c.get({dir:"city",file:ee.id}),te=M({latitude:Z,longitude:J,address:Y});if(te){z=te.id;const ie=await c.get({dir:"district",file:te.id}),ye=M({latitude:Z,longitude:J,address:ie});ye&&(z=ye.id)}}if(!z)throw new Error("非中国境内");return z}catch(z){throw z}}}},909:(f,k,i)=>{const c=i(218),{decompressFromEncodedURIComponent:$}=i(961),C=i(483),M=i(182),{version:Z,fileDate:J}=i(147);f.exports=new class{constructor(){this.local=null,this.localConfig={name:"pikazLocation",storeName:"v"+Z.split(".")[0]+"."+Z.split(".")[1]}}async get({dir:z,file:Q}){if(!this.local){const te=C.createInstance(this.localConfig);await te.ready(),this.local=te}const ee=`${z}-${Q}-${J[z]}`,Y=await this.local.getItem(ee);if(Y)return Y;try{const te=await(async({file:ie})=>{const ye=c.CancelToken;let re;const de=async(se,ue)=>{const he=await c({url:`${se}/static/${ue}.json`,method:"get",dataType:"json",cancelToken:new ye(function(fe){re=fe}),timeout:M.timeout});if(!he||!he.data||Object.prototype.toString.call(he.data.s)!="[object String]")throw new Error("未获取到文件");const we=$(he.data.s);return JSON.parse(we)};try{const se=M.userCdn;if(se)return await de(se,ie);throw new Error("未找到设置的url")}catch{const ue=M.cdn.map(he=>new Promise(we=>{de(he,ie).then(fe=>{we(fe)}).catch(()=>{})}));try{return await Promise.race(ue)}catch{throw new Error("定位失败")}finally{re()}}})({file:`${z}/${Q}`});return this.local.setItem(ee,te),te}catch{throw new Error("定位失败")}}async getVal({key:z,gainVal:Q,expiration:ee}){if(!this.local){const de=C.createInstance(this.localConfig);await de.ready(),this.local=de}const Y=new Date().getTime(),te=ee||0,ie=`local-${z}`,ye=await this.local.getItem(ie);if(ye&&ye.expiration>Y)return ye.val;const re=await Q();return await this.local.setItem(ie,{val:re,expiration:Y+te}),re}async clear(){await this.local.clear()}}},138:(f,k,i)=>{const c=i(182),{getGeo:$,getGeoCode:C}=i(955),{getList:M,searchCodeInfo:Z,searchStrAddress:J,searchCodeDetailInfo:z}=i(946),{getIpCode:Q}=i(454),ee=async(re,de={})=>{let{timeout:se}={...c.config,...de};return await Promise.race([re(de),new Promise((ue,he)=>{setTimeout(()=>{he(new Error("定位超时"))},se)})])},Y=async(re={})=>{let{timeout:de,enableHighAccuracy:se,detail:ue,latitude:he,longitude:we}={...c.config,...re};if(!he||!we){const{latitude:fe,longitude:me}=await $({timeout:de,enableHighAccuracy:se});he=fe,we=me}return await ee(async()=>{const fe=await C({latitude:he,longitude:we});if(!fe)throw new Error("非中国境内");return{...await Z({code:fe,detail:ue}),latitude:he,longitude:we}},{timeout:de})},te=async(re={})=>{let{detail:de,ip:se}={...c.config,...re};const{code:ue,ip:he}=await Q({ip:se});return se||(se=he),{...await Z({code:ue,detail:de}),ip:se}},ie=async(re={})=>{const{address:de,detail:se}={...c.config,...re},ue=await J(de);if(!ue)throw new Error("解析地址失败,请确认地址包含省级或市级名称");return await Z({code:ue,detail:se})},ye=async(re={})=>{const{code:de,detail:se}={...c.config,...re};return await Z({code:de,detail:se})};f.exports={setConfig:({timeout:re,url:de})=>{c.set({timeout:re,url:de})},getLocation:async(re={})=>{try{return{...await Y(re),type:"h5"}}catch{return{...await ee(te,re),type:"ip"}}},getH5Location:Y,getIpLocation:re=>ee(te,re),searchList:async(re={})=>{const{code:de}={...re};return await M(de||"")||[]},searchCodeAddress:re=>ee(ye,re),searchAddress:re=>ee(ie,re),searchCodeDetail:re=>ee(z,re)}},454:(f,k,i)=>{const{decompressFromEncodedURIComponent:c}=i(961),$=i(909),C=Z=>{const J=Z.split(".").reduce((z,Q)=>`${z}${(ee=>{const Y=ee.split("").reverse();return new Array(3).fill(0).map((te,ie)=>Y[ie]||0).reverse().join("")})(Q)}`,"");return Number(J)},M=()=>new Promise((Z,J)=>{const z="ipCallback"+new Date().getTime(),Q=document.createElement("script");Q.onerror=()=>{J(new Error("获取ip失败"))},window[z]=ee=>{ee&&ee.ip?Z(ee.ip):J(new Error("ip定位失败"))},Q.src=c("BYFxAcGcC4HpYIbgJYDpkoGYE9UHsAnAc1gH5NCBbBEAXgCtI8A7cAMjYGMEAbHgIwScA1rSA")+z,document.body.appendChild(Q)});f.exports={addZero:C,getIpCode:async(Z={})=>{let{ip:J}={...Z};J||(J=await $.getVal({key:"ip",gainVal:M,expiration:864e5}));const z=J.split(".").map(Q=>Number(Q)||0);if(z.length!==4)throw new Error("ip格式错误,只支持ipv4");return{code:(await $.get({dir:"ip",file:`${z[0]}.${z[1]}`})).reduce((Q,ee)=>{const{district:Y,id:te}=ee,ie=C(J);return ie>=Y[0]&&ie<=Y[1]?te:Q},""),ip:J}}}},218:(f,k,i)=>{function c(K,oe){return function(){return K.apply(oe,arguments)}}const{toString:$}=Object.prototype,{getPrototypeOf:C}=Object,M=(Z=Object.create(null),K=>{const oe=$.call(K);return Z[oe]||(Z[oe]=oe.slice(8,-1).toLowerCase())});var Z;const J=K=>(K=K.toLowerCase(),oe=>M(oe)===K),z=K=>oe=>typeof oe===K,{isArray:Q}=Array,ee=z("undefined"),Y=J("ArrayBuffer"),te=z("string"),ie=z("function"),ye=z("number"),re=K=>K!==null&&typeof K=="object",de=K=>{if(M(K)!=="object")return!1;const oe=C(K);return!(oe!==null&&oe!==Object.prototype&&Object.getPrototypeOf(oe)!==null||Symbol.toStringTag in K||Symbol.iterator in K)},se=J("Date"),ue=J("File"),he=J("Blob"),we=J("FileList"),fe=J("URLSearchParams");function me(K,oe,{allOwnKeys:pe=!1}={}){if(K==null)return;let be,Te;if(typeof K!="object"&&(K=[K]),Q(K))for(be=0,Te=K.length;be<Te;be++)oe.call(null,K[be],be,K);else{const xe=pe?Object.getOwnPropertyNames(K):Object.keys(K),Ie=xe.length;let Fe;for(be=0;be<Ie;be++)Fe=xe[be],oe.call(null,K[Fe],Fe,K)}}function Re(K,oe){oe=oe.toLowerCase();const pe=Object.keys(K);let be,Te=pe.length;for(;Te-- >0;)if(be=pe[Te],oe===be.toLowerCase())return be;return null}const Ue=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:i.g,Pe=K=>!ee(K)&&K!==Ue,De=(vt=typeof Uint8Array<"u"&&C(Uint8Array),K=>vt&&K instanceof vt);var vt;const _t=J("HTMLFormElement"),St=(({hasOwnProperty:K})=>(oe,pe)=>K.call(oe,pe))(Object.prototype),Mt=J("RegExp"),At=(K,oe)=>{const pe=Object.getOwnPropertyDescriptors(K),be={};me(pe,(Te,xe)=>{let Ie;(Ie=oe(Te,xe,K))!==!1&&(be[xe]=Ie||Te)}),Object.defineProperties(K,be)},ct="abcdefghijklmnopqrstuvwxyz",Qe="0123456789",Lt={DIGIT:Qe,ALPHA:ct,ALPHA_DIGIT:ct+ct.toUpperCase()+Qe},gt=J("AsyncFunction");var Ae={isArray:Q,isArrayBuffer:Y,isBuffer:function(K){return K!==null&&!ee(K)&&K.constructor!==null&&!ee(K.constructor)&&ie(K.constructor.isBuffer)&&K.constructor.isBuffer(K)},isFormData:K=>{let oe;return K&&(typeof FormData=="function"&&K instanceof FormData||ie(K.append)&&((oe=M(K))==="formdata"||oe==="object"&&ie(K.toString)&&K.toString()==="[object FormData]"))},isArrayBufferView:function(K){let oe;return oe=typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(K):K&&K.buffer&&Y(K.buffer),oe},isString:te,isNumber:ye,isBoolean:K=>K===!0||K===!1,isObject:re,isPlainObject:de,isUndefined:ee,isDate:se,isFile:ue,isBlob:he,isRegExp:Mt,isFunction:ie,isStream:K=>re(K)&&ie(K.pipe),isURLSearchParams:fe,isTypedArray:De,isFileList:we,forEach:me,merge:function K(){const{caseless:oe}=Pe(this)&&this||{},pe={},be=(Te,xe)=>{const Ie=oe&&Re(pe,xe)||xe;de(pe[Ie])&&de(Te)?pe[Ie]=K(pe[Ie],Te):de(Te)?pe[Ie]=K({},Te):Q(Te)?pe[Ie]=Te.slice():pe[Ie]=Te};for(let Te=0,xe=arguments.length;Te<xe;Te++)arguments[Te]&&me(arguments[Te],be);return pe},extend:(K,oe,pe,{allOwnKeys:be}={})=>(me(oe,(Te,xe)=>{pe&&ie(Te)?K[xe]=c(Te,pe):K[xe]=Te},{allOwnKeys:be}),K),trim:K=>K.trim?K.trim():K.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:K=>(K.charCodeAt(0)===65279&&(K=K.slice(1)),K),inherits:(K,oe,pe,be)=>{K.prototype=Object.create(oe.prototype,be),K.prototype.constructor=K,Object.defineProperty(K,"super",{value:oe.prototype}),pe&&Object.assign(K.prototype,pe)},toFlatObject:(K,oe,pe,be)=>{let Te,xe,Ie;const Fe={};if(oe=oe||{},K==null)return oe;do{for(Te=Object.getOwnPropertyNames(K),xe=Te.length;xe-- >0;)Ie=Te[xe],be&&!be(Ie,K,oe)||Fe[Ie]||(oe[Ie]=K[Ie],Fe[Ie]=!0);K=pe!==!1&&C(K)}while(K&&(!pe||pe(K,oe))&&K!==Object.prototype);return oe},kindOf:M,kindOfTest:J,endsWith:(K,oe,pe)=>{K=String(K),(pe===void 0||pe>K.length)&&(pe=K.length),pe-=oe.length;const be=K.indexOf(oe,pe);return be!==-1&&be===pe},toArray:K=>{if(!K)return null;if(Q(K))return K;let oe=K.length;if(!ye(oe))return null;const pe=new Array(oe);for(;oe-- >0;)pe[oe]=K[oe];return pe},forEachEntry:(K,oe)=>{const pe=(K&&K[Symbol.iterator]).call(K);let be;for(;(be=pe.next())&&!be.done;){const Te=be.value;oe.call(K,Te[0],Te[1])}},matchAll:(K,oe)=>{let pe;const be=[];for(;(pe=K.exec(oe))!==null;)be.push(pe);return be},isHTMLForm:_t,hasOwnProperty:St,hasOwnProp:St,reduceDescriptors:At,freezeMethods:K=>{At(K,(oe,pe)=>{if(ie(K)&&["arguments","caller","callee"].indexOf(pe)!==-1)return!1;const be=K[pe];ie(be)&&(oe.enumerable=!1,"writable"in oe?oe.writable=!1:oe.set||(oe.set=()=>{throw Error("Can not rewrite read-only method '"+pe+"'")}))})},toObjectSet:(K,oe)=>{const pe={},be=Te=>{Te.forEach(xe=>{pe[xe]=!0})};return Q(K)?be(K):be(String(K).split(oe)),pe},toCamelCase:K=>K.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(oe,pe,be){return pe.toUpperCase()+be}),noop:()=>{},toFiniteNumber:(K,oe)=>(K=+K,Number.isFinite(K)?K:oe),findKey:Re,global:Ue,isContextDefined:Pe,ALPHABET:Lt,generateString:(K=16,oe=Lt.ALPHA_DIGIT)=>{let pe="";const{length:be}=oe;for(;K--;)pe+=oe[Math.random()*be|0];return pe},isSpecCompliantForm:function(K){return!!(K&&ie(K.append)&&K[Symbol.toStringTag]==="FormData"&&K[Symbol.iterator])},toJSONObject:K=>{const oe=new Array(10),pe=(be,Te)=>{if(re(be)){if(oe.indexOf(be)>=0)return;if(!("toJSON"in be)){oe[Te]=be;const xe=Q(be)?[]:{};return me(be,(Ie,Fe)=>{const ze=pe(Ie,Te+1);!ee(ze)&&(xe[Fe]=ze)}),oe[Te]=void 0,xe}}return be};return pe(K,0)},isAsyncFn:gt,isThenable:K=>K&&(re(K)||ie(K))&&ie(K.then)&&ie(K.catch)};function Ye(K,oe,pe,be,Te){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=K,this.name="AxiosError",oe&&(this.code=oe),pe&&(this.config=pe),be&&(this.request=be),Te&&(this.response=Te)}Ae.inherits(Ye,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ae.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const qt=Ye.prototype,Ot={};function Ke(K){return Ae.isPlainObject(K)||Ae.isArray(K)}function Ve(K){return Ae.endsWith(K,"[]")?K.slice(0,-2):K}function Xe(K,oe,pe){return K?K.concat(oe).map(function(be,Te){return be=Ve(be),!pe&&Te?"["+be+"]":be}).join(pe?".":""):oe}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(K=>{Ot[K]={value:K}}),Object.defineProperties(Ye,Ot),Object.defineProperty(qt,"isAxiosError",{value:!0}),Ye.from=(K,oe,pe,be,Te,xe)=>{const Ie=Object.create(qt);return Ae.toFlatObject(K,Ie,function(Fe){return Fe!==Error.prototype},Fe=>Fe!=="isAxiosError"),Ye.call(Ie,K.message,oe,pe,be,Te),Ie.cause=K,Ie.name=K.name,xe&&Object.assign(Ie,xe),Ie};const et=Ae.toFlatObject(Ae,{},null,function(K){return/^is[A-Z]/.test(K)});function ut(K,oe,pe){if(!Ae.isObject(K))throw new TypeError("target must be an object");oe=oe||new FormData;const be=(pe=Ae.toFlatObject(pe,{metaTokens:!0,dots:!1,indexes:!1},!1,function(We,ft){return!Ae.isUndefined(ft[We])})).metaTokens,Te=pe.visitor||He,xe=pe.dots,Ie=pe.indexes,Fe=(pe.Blob||typeof Blob<"u"&&Blob)&&Ae.isSpecCompliantForm(oe);if(!Ae.isFunction(Te))throw new TypeError("visitor must be a function");function ze(We){if(We===null)return"";if(Ae.isDate(We))return We.toISOString();if(!Fe&&Ae.isBlob(We))throw new Ye("Blob is not supported. Use a Buffer instead.");return Ae.isArrayBuffer(We)||Ae.isTypedArray(We)?Fe&&typeof Blob=="function"?new Blob([We]):Buffer.from(We):We}function He(We,ft,Je){let bt=We;if(We&&!Je&&typeof We=="object"){if(Ae.endsWith(ft,"{}"))ft=be?ft:ft.slice(0,-2),We=JSON.stringify(We);else if(Ae.isArray(We)&&function(Bt){return Ae.isArray(Bt)&&!Bt.some(Ke)}(We)||(Ae.isFileList(We)||Ae.endsWith(ft,"[]"))&&(bt=Ae.toArray(We)))return ft=Ve(ft),bt.forEach(function(Bt,Yt){!Ae.isUndefined(Bt)&&Bt!==null&&oe.append(Ie===!0?Xe([ft],Yt,xe):Ie===null?ft:ft+"[]",ze(Bt))}),!1}return!!Ke(We)||(oe.append(Xe(Je,ft,xe),ze(We)),!1)}const Me=[],rt=Object.assign(et,{defaultVisitor:He,convertValue:ze,isVisitable:Ke});if(!Ae.isObject(K))throw new TypeError("data must be an object");return function We(ft,Je){if(!Ae.isUndefined(ft)){if(Me.indexOf(ft)!==-1)throw Error("Circular reference detected in "+Je.join("."));Me.push(ft),Ae.forEach(ft,function(bt,Bt){(!(Ae.isUndefined(bt)||bt===null)&&Te.call(oe,bt,Ae.isString(Bt)?Bt.trim():Bt,Je,rt))===!0&&We(bt,Je?Je.concat(Bt):[Bt])}),Me.pop()}}(K),oe}function Tt(K){const oe={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(K).replace(/[!'()~]|%20|%00/g,function(pe){return oe[pe]})}function Ct(K,oe){this._pairs=[],K&&ut(K,this,oe)}const Dt=Ct.prototype;function Ht(K){return encodeURIComponent(K).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ft(K,oe,pe){if(!oe)return K;const be=pe&&pe.encode||Ht,Te=pe&&pe.serialize;let xe;if(xe=Te?Te(oe,pe):Ae.isURLSearchParams(oe)?oe.toString():new Ct(oe,pe).toString(be),xe){const Ie=K.indexOf("#");Ie!==-1&&(K=K.slice(0,Ie)),K+=(K.indexOf("?")===-1?"?":"&")+xe}return K}Dt.append=function(K,oe){this._pairs.push([K,oe])},Dt.toString=function(K){const oe=K?function(pe){return K.call(this,pe,Tt)}:Tt;return this._pairs.map(function(pe){return oe(pe[0])+"="+oe(pe[1])},"").join("&")};var rn=class{constructor(){this.handlers=[]}use(K,oe,pe){return this.handlers.push({fulfilled:K,rejected:oe,synchronous:!!pe&&pe.synchronous,runWhen:pe?pe.runWhen:null}),this.handlers.length-1}eject(K){this.handlers[K]&&(this.handlers[K]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(K){Ae.forEach(this.handlers,function(oe){oe!==null&&K(oe)})}},Zt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Gt={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ct,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]};const Ut=typeof window<"u"&&typeof document<"u",jt=(dn=typeof navigator<"u"&&navigator.product,Ut&&["ReactNative","NativeScript","NS"].indexOf(dn)<0);var dn;const Kt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function";var zt={...Object.freeze({__proto__:null,hasBrowserEnv:Ut,hasStandardBrowserWebWorkerEnv:Kt,hasStandardBrowserEnv:jt}),...Gt};function X(K){function oe(pe,be,Te,xe){let Ie=pe[xe++];const Fe=Number.isFinite(+Ie),ze=xe>=pe.length;return Ie=!Ie&&Ae.isArray(Te)?Te.length:Ie,ze?(Ae.hasOwnProp(Te,Ie)?Te[Ie]=[Te[Ie],be]:Te[Ie]=be,!Fe):(Te[Ie]&&Ae.isObject(Te[Ie])||(Te[Ie]=[]),oe(pe,be,Te[Ie],xe)&&Ae.isArray(Te[Ie])&&(Te[Ie]=function(He){const Me={},rt=Object.keys(He);let We;const ft=rt.length;let Je;for(We=0;We<ft;We++)Je=rt[We],Me[Je]=He[Je];return Me}(Te[Ie])),!Fe)}if(Ae.isFormData(K)&&Ae.isFunction(K.entries)){const pe={};return Ae.forEachEntry(K,(be,Te)=>{oe(function(xe){return Ae.matchAll(/\w+|\[(\w*)]/g,xe).map(Ie=>Ie[0]==="[]"?"":Ie[1]||Ie[0])}(be),Te,pe,0)}),pe}return null}const F={transitional:Zt,adapter:["xhr","http"],transformRequest:[function(K,oe){const pe=oe.getContentType()||"",be=pe.indexOf("application/json")>-1,Te=Ae.isObject(K);if(Te&&Ae.isHTMLForm(K)&&(K=new FormData(K)),Ae.isFormData(K))return be&&be?JSON.stringify(X(K)):K;if(Ae.isArrayBuffer(K)||Ae.isBuffer(K)||Ae.isStream(K)||Ae.isFile(K)||Ae.isBlob(K))return K;if(Ae.isArrayBufferView(K))return K.buffer;if(Ae.isURLSearchParams(K))return oe.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),K.toString();let xe;if(Te){if(pe.indexOf("application/x-www-form-urlencoded")>-1)return function(Ie,Fe){return ut(Ie,new zt.classes.URLSearchParams,Object.assign({visitor:function(ze,He,Me,rt){return zt.isNode&&Ae.isBuffer(ze)?(this.append(He,ze.toString("base64")),!1):rt.defaultVisitor.apply(this,arguments)}},Fe))}(K,this.formSerializer).toString();if((xe=Ae.isFileList(K))||pe.indexOf("multipart/form-data")>-1){const Ie=this.env&&this.env.FormData;return ut(xe?{"files[]":K}:K,Ie&&new Ie,this.formSerializer)}}return Te||be?(oe.setContentType("application/json",!1),function(Ie,Fe,ze){if(Ae.isString(Ie))try{return(0,JSON.parse)(Ie),Ae.trim(Ie)}catch(He){if(He.name!=="SyntaxError")throw He}return(0,JSON.stringify)(Ie)}(K)):K}],transformResponse:[function(K){const oe=this.transitional||F.transitional,pe=oe&&oe.forcedJSONParsing,be=this.responseType==="json";if(K&&Ae.isString(K)&&(pe&&!this.responseType||be)){const Te=!(oe&&oe.silentJSONParsing)&&be;try{return JSON.parse(K)}catch(xe){if(Te)throw xe.name==="SyntaxError"?Ye.from(xe,Ye.ERR_BAD_RESPONSE,this,null,this.response):xe}}return K}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:zt.classes.FormData,Blob:zt.classes.Blob},validateStatus:function(K){return K>=200&&K<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ae.forEach(["delete","get","head","post","put","patch"],K=>{F.headers[K]={}});var j=F;const ae=Ae.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ve=Symbol("internals");function Ee(K){return K&&String(K).trim().toLowerCase()}function Ce(K){return K===!1||K==null?K:Ae.isArray(K)?K.map(Ce):String(K)}function tt(K,oe,pe,be,Te){return Ae.isFunction(be)?be.call(this,oe,pe):(Te&&(oe=pe),Ae.isString(oe)?Ae.isString(be)?oe.indexOf(be)!==-1:Ae.isRegExp(be)?be.test(oe):void 0:void 0)}class mt{constructor(oe){oe&&this.set(oe)}set(oe,pe,be){const Te=this;function xe(Fe,ze,He){const Me=Ee(ze);if(!Me)throw new Error("header name must be a non-empty string");const rt=Ae.findKey(Te,Me);(!rt||Te[rt]===void 0||He===!0||He===void 0&&Te[rt]!==!1)&&(Te[rt||ze]=Ce(Fe))}const Ie=(Fe,ze)=>Ae.forEach(Fe,(He,Me)=>xe(He,Me,ze));return Ae.isPlainObject(oe)||oe instanceof this.constructor?Ie(oe,pe):Ae.isString(oe)&&(oe=oe.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(oe.trim())?Ie((Fe=>{const ze={};let He,Me,rt;return Fe&&Fe.split(`
4
+ `).forEach(function(We){rt=We.indexOf(":"),He=We.substring(0,rt).trim().toLowerCase(),Me=We.substring(rt+1).trim(),!He||ze[He]&&ae[He]||(He==="set-cookie"?ze[He]?ze[He].push(Me):ze[He]=[Me]:ze[He]=ze[He]?ze[He]+", "+Me:Me)}),ze})(oe),pe):oe!=null&&xe(pe,oe,be),this}get(oe,pe){if(oe=Ee(oe)){const be=Ae.findKey(this,oe);if(be){const Te=this[be];if(!pe)return Te;if(pe===!0)return function(xe){const Ie=Object.create(null),Fe=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let ze;for(;ze=Fe.exec(xe);)Ie[ze[1]]=ze[2];return Ie}(Te);if(Ae.isFunction(pe))return pe.call(this,Te,be);if(Ae.isRegExp(pe))return pe.exec(Te);throw new TypeError("parser must be boolean|regexp|function")}}}has(oe,pe){if(oe=Ee(oe)){const be=Ae.findKey(this,oe);return!(!be||this[be]===void 0||pe&&!tt(0,this[be],be,pe))}return!1}delete(oe,pe){const be=this;let Te=!1;function xe(Ie){if(Ie=Ee(Ie)){const Fe=Ae.findKey(be,Ie);!Fe||pe&&!tt(0,be[Fe],Fe,pe)||(delete be[Fe],Te=!0)}}return Ae.isArray(oe)?oe.forEach(xe):xe(oe),Te}clear(oe){const pe=Object.keys(this);let be=pe.length,Te=!1;for(;be--;){const xe=pe[be];oe&&!tt(0,this[xe],xe,oe,!0)||(delete this[xe],Te=!0)}return Te}normalize(oe){const pe=this,be={};return Ae.forEach(this,(Te,xe)=>{const Ie=Ae.findKey(be,xe);if(Ie)return pe[Ie]=Ce(Te),void delete pe[xe];const Fe=oe?function(ze){return ze.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(He,Me,rt)=>Me.toUpperCase()+rt)}(xe):String(xe).trim();Fe!==xe&&delete pe[xe],pe[Fe]=Ce(Te),be[Fe]=!0}),this}concat(...oe){return this.constructor.concat(this,...oe)}toJSON(oe){const pe=Object.create(null);return Ae.forEach(this,(be,Te)=>{be!=null&&be!==!1&&(pe[Te]=oe&&Ae.isArray(be)?be.join(", "):be)}),pe}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([oe,pe])=>oe+": "+pe).join(`
5
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(oe){return oe instanceof this?oe:new this(oe)}static concat(oe,...pe){const be=new this(oe);return pe.forEach(Te=>be.set(Te)),be}static accessor(oe){const pe=(this[ve]=this[ve]={accessors:{}}).accessors,be=this.prototype;function Te(xe){const Ie=Ee(xe);pe[Ie]||(function(Fe,ze){const He=Ae.toCamelCase(" "+ze);["get","set","has"].forEach(Me=>{Object.defineProperty(Fe,Me+He,{value:function(rt,We,ft){return this[Me].call(this,ze,rt,We,ft)},configurable:!0})})}(be,xe),pe[Ie]=!0)}return Ae.isArray(oe)?oe.forEach(Te):Te(oe),this}}mt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ae.reduceDescriptors(mt.prototype,({value:K},oe)=>{let pe=oe[0].toUpperCase()+oe.slice(1);return{get:()=>K,set(be){this[pe]=be}}}),Ae.freezeMethods(mt);var ot=mt;function wt(K,oe){const pe=this||j,be=oe||pe,Te=ot.from(be.headers);let xe=be.data;return Ae.forEach(K,function(Ie){xe=Ie.call(pe,xe,Te.normalize(),oe?oe.status:void 0)}),Te.normalize(),xe}function yt(K){return!(!K||!K.__CANCEL__)}function on(K,oe,pe){Ye.call(this,K??"canceled",Ye.ERR_CANCELED,oe,pe),this.name="CanceledError"}Ae.inherits(on,Ye,{__CANCEL__:!0});var Zn=zt.hasStandardBrowserEnv?{write(K,oe,pe,be,Te,xe){const Ie=[K+"="+encodeURIComponent(oe)];Ae.isNumber(pe)&&Ie.push("expires="+new Date(pe).toGMTString()),Ae.isString(be)&&Ie.push("path="+be),Ae.isString(Te)&&Ie.push("domain="+Te),xe===!0&&Ie.push("secure"),document.cookie=Ie.join("; ")},read(K){const oe=document.cookie.match(new RegExp("(^|;\\s*)("+K+")=([^;]*)"));return oe?decodeURIComponent(oe[3]):null},remove(K){this.write(K,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Vn(K,oe){return K&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(oe)?function(pe,be){return be?pe.replace(/\/+$/,"")+"/"+be.replace(/^\/+/,""):pe}(K,oe):oe}var ne=zt.hasStandardBrowserEnv?function(){const K=/(msie|trident)/i.test(navigator.userAgent),oe=document.createElement("a");let pe;function be(Te){let xe=Te;return K&&(oe.setAttribute("href",xe),xe=oe.href),oe.setAttribute("href",xe),{href:oe.href,protocol:oe.protocol?oe.protocol.replace(/:$/,""):"",host:oe.host,search:oe.search?oe.search.replace(/^\?/,""):"",hash:oe.hash?oe.hash.replace(/^#/,""):"",hostname:oe.hostname,port:oe.port,pathname:oe.pathname.charAt(0)==="/"?oe.pathname:"/"+oe.pathname}}return pe=be(window.location.href),function(Te){const xe=Ae.isString(Te)?be(Te):Te;return xe.protocol===pe.protocol&&xe.host===pe.host}}():function(){return!0};function ce(K,oe){let pe=0;const be=function(Te,xe){Te=Te||10;const Ie=new Array(Te),Fe=new Array(Te);let ze,He=0,Me=0;return xe=xe!==void 0?xe:1e3,function(rt){const We=Date.now(),ft=Fe[Me];ze||(ze=We),Ie[He]=rt,Fe[He]=We;let Je=Me,bt=0;for(;Je!==He;)bt+=Ie[Je++],Je%=Te;if(He=(He+1)%Te,He===Me&&(Me=(Me+1)%Te),We-ze<xe)return;const Bt=ft&&We-ft;return Bt?Math.round(1e3*bt/Bt):void 0}}(50,250);return Te=>{const xe=Te.loaded,Ie=Te.lengthComputable?Te.total:void 0,Fe=xe-pe,ze=be(Fe);pe=xe;const He={loaded:xe,total:Ie,progress:Ie?xe/Ie:void 0,bytes:Fe,rate:ze||void 0,estimated:ze&&Ie&&xe<=Ie?(Ie-xe)/ze:void 0,event:Te};He[oe?"download":"upload"]=!0,K(He)}}const le={http:null,xhr:typeof XMLHttpRequest<"u"&&function(K){return new Promise(function(oe,pe){let be=K.data;const Te=ot.from(K.headers).normalize();let xe,Ie,{responseType:Fe,withXSRFToken:ze}=K;function He(){K.cancelToken&&K.cancelToken.unsubscribe(xe),K.signal&&K.signal.removeEventListener("abort",xe)}if(Ae.isFormData(be)){if(zt.hasStandardBrowserEnv||zt.hasStandardBrowserWebWorkerEnv)Te.setContentType(!1);else if((Ie=Te.getContentType())!==!1){const[Je,...bt]=Ie?Ie.split(";").map(Bt=>Bt.trim()).filter(Boolean):[];Te.setContentType([Je||"multipart/form-data",...bt].join("; "))}}let Me=new XMLHttpRequest;if(K.auth){const Je=K.auth.username||"",bt=K.auth.password?unescape(encodeURIComponent(K.auth.password)):"";Te.set("Authorization","Basic "+btoa(Je+":"+bt))}const rt=Vn(K.baseURL,K.url);function We(){if(!Me)return;const Je=ot.from("getAllResponseHeaders"in Me&&Me.getAllResponseHeaders());(function(bt,Bt,Yt){const Kn=Yt.config.validateStatus;Yt.status&&Kn&&!Kn(Yt.status)?Bt(new Ye("Request failed with status code "+Yt.status,[Ye.ERR_BAD_REQUEST,Ye.ERR_BAD_RESPONSE][Math.floor(Yt.status/100)-4],Yt.config,Yt.request,Yt)):bt(Yt)})(function(bt){oe(bt),He()},function(bt){pe(bt),He()},{data:Fe&&Fe!=="text"&&Fe!=="json"?Me.response:Me.responseText,status:Me.status,statusText:Me.statusText,headers:Je,config:K,request:Me}),Me=null}if(Me.open(K.method.toUpperCase(),Ft(rt,K.params,K.paramsSerializer),!0),Me.timeout=K.timeout,"onloadend"in Me?Me.onloadend=We:Me.onreadystatechange=function(){Me&&Me.readyState===4&&(Me.status!==0||Me.responseURL&&Me.responseURL.indexOf("file:")===0)&&setTimeout(We)},Me.onabort=function(){Me&&(pe(new Ye("Request aborted",Ye.ECONNABORTED,K,Me)),Me=null)},Me.onerror=function(){pe(new Ye("Network Error",Ye.ERR_NETWORK,K,Me)),Me=null},Me.ontimeout=function(){let Je=K.timeout?"timeout of "+K.timeout+"ms exceeded":"timeout exceeded";const bt=K.transitional||Zt;K.timeoutErrorMessage&&(Je=K.timeoutErrorMessage),pe(new Ye(Je,bt.clarifyTimeoutError?Ye.ETIMEDOUT:Ye.ECONNABORTED,K,Me)),Me=null},zt.hasStandardBrowserEnv&&(ze&&Ae.isFunction(ze)&&(ze=ze(K)),ze||ze!==!1&&ne(rt))){const Je=K.xsrfHeaderName&&K.xsrfCookieName&&Zn.read(K.xsrfCookieName);Je&&Te.set(K.xsrfHeaderName,Je)}be===void 0&&Te.setContentType(null),"setRequestHeader"in Me&&Ae.forEach(Te.toJSON(),function(Je,bt){Me.setRequestHeader(bt,Je)}),Ae.isUndefined(K.withCredentials)||(Me.withCredentials=!!K.withCredentials),Fe&&Fe!=="json"&&(Me.responseType=K.responseType),typeof K.onDownloadProgress=="function"&&Me.addEventListener("progress",ce(K.onDownloadProgress,!0)),typeof K.onUploadProgress=="function"&&Me.upload&&Me.upload.addEventListener("progress",ce(K.onUploadProgress)),(K.cancelToken||K.signal)&&(xe=Je=>{Me&&(pe(!Je||Je.type?new on(null,K,Me):Je),Me.abort(),Me=null)},K.cancelToken&&K.cancelToken.subscribe(xe),K.signal&&(K.signal.aborted?xe():K.signal.addEventListener("abort",xe)));const ft=function(Je){const bt=/^([-+\w]{1,25})(:?\/\/|:)/.exec(Je);return bt&&bt[1]||""}(rt);ft&&zt.protocols.indexOf(ft)===-1?pe(new Ye("Unsupported protocol "+ft+":",Ye.ERR_BAD_REQUEST,K)):Me.send(be||null)})}};Ae.forEach(le,(K,oe)=>{if(K){try{Object.defineProperty(K,"name",{value:oe})}catch{}Object.defineProperty(K,"adapterName",{value:oe})}});const ke=K=>`- ${K}`,ge=K=>Ae.isFunction(K)||K===null||K===!1;var Se=K=>{K=Ae.isArray(K)?K:[K];const{length:oe}=K;let pe,be;const Te={};for(let xe=0;xe<oe;xe++){let Ie;if(pe=K[xe],be=pe,!ge(pe)&&(be=le[(Ie=String(pe)).toLowerCase()],be===void 0))throw new Ye(`Unknown adapter '${Ie}'`);if(be)break;Te[Ie||"#"+xe]=be}if(!be){const xe=Object.entries(Te).map(([Ie,Fe])=>`adapter ${Ie} `+(Fe===!1?"is not supported by the environment":"is not available in the build"));throw new Ye("There is no suitable adapter to dispatch the request "+(oe?xe.length>1?`since :
6
+ `+xe.map(ke).join(`
7
+ `):" "+ke(xe[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return be};function $e(K){if(K.cancelToken&&K.cancelToken.throwIfRequested(),K.signal&&K.signal.aborted)throw new on(null,K)}function Ne(K){return $e(K),K.headers=ot.from(K.headers),K.data=wt.call(K,K.transformRequest),["post","put","patch"].indexOf(K.method)!==-1&&K.headers.setContentType("application/x-www-form-urlencoded",!1),Se(K.adapter||j.adapter)(K).then(function(oe){return $e(K),oe.data=wt.call(K,K.transformResponse,oe),oe.headers=ot.from(oe.headers),oe},function(oe){return yt(oe)||($e(K),oe&&oe.response&&(oe.response.data=wt.call(K,K.transformResponse,oe.response),oe.response.headers=ot.from(oe.response.headers))),Promise.reject(oe)})}const qe=K=>K instanceof ot?K.toJSON():K;function Be(K,oe){oe=oe||{};const pe={};function be(He,Me,rt){return Ae.isPlainObject(He)&&Ae.isPlainObject(Me)?Ae.merge.call({caseless:rt},He,Me):Ae.isPlainObject(Me)?Ae.merge({},Me):Ae.isArray(Me)?Me.slice():Me}function Te(He,Me,rt){return Ae.isUndefined(Me)?Ae.isUndefined(He)?void 0:be(void 0,He,rt):be(He,Me,rt)}function xe(He,Me){if(!Ae.isUndefined(Me))return be(void 0,Me)}function Ie(He,Me){return Ae.isUndefined(Me)?Ae.isUndefined(He)?void 0:be(void 0,He):be(void 0,Me)}function Fe(He,Me,rt){return rt in oe?be(He,Me):rt in K?be(void 0,He):void 0}const ze={url:xe,method:xe,data:xe,baseURL:Ie,transformRequest:Ie,transformResponse:Ie,paramsSerializer:Ie,timeout:Ie,timeoutMessage:Ie,withCredentials:Ie,withXSRFToken:Ie,adapter:Ie,responseType:Ie,xsrfCookieName:Ie,xsrfHeaderName:Ie,onUploadProgress:Ie,onDownloadProgress:Ie,decompress:Ie,maxContentLength:Ie,maxBodyLength:Ie,beforeRedirect:Ie,transport:Ie,httpAgent:Ie,httpsAgent:Ie,cancelToken:Ie,socketPath:Ie,responseEncoding:Ie,validateStatus:Fe,headers:(He,Me)=>Te(qe(He),qe(Me),!0)};return Ae.forEach(Object.keys(Object.assign({},K,oe)),function(He){const Me=ze[He]||Te,rt=Me(K[He],oe[He],He);Ae.isUndefined(rt)&&Me!==Fe||(pe[He]=rt)}),pe}const Le={};["object","boolean","number","function","string","symbol"].forEach((K,oe)=>{Le[K]=function(pe){return typeof pe===K||"a"+(oe<1?"n ":" ")+K}});const je={};Le.transitional=function(K,oe,pe){function be(Te,xe){return"[Axios v1.6.2] Transitional option '"+Te+"'"+xe+(pe?". "+pe:"")}return(Te,xe,Ie)=>{if(K===!1)throw new Ye(be(xe," has been removed"+(oe?" in "+oe:"")),Ye.ERR_DEPRECATED);return oe&&!je[xe]&&(je[xe]=!0,console.warn(be(xe," has been deprecated since v"+oe+" and will be removed in the near future"))),!K||K(Te,xe,Ie)}};var Ze={assertOptions:function(K,oe,pe){if(typeof K!="object")throw new Ye("options must be an object",Ye.ERR_BAD_OPTION_VALUE);const be=Object.keys(K);let Te=be.length;for(;Te-- >0;){const xe=be[Te],Ie=oe[xe];if(Ie){const Fe=K[xe],ze=Fe===void 0||Ie(Fe,xe,K);if(ze!==!0)throw new Ye("option "+xe+" must be "+ze,Ye.ERR_BAD_OPTION_VALUE)}else if(pe!==!0)throw new Ye("Unknown option "+xe,Ye.ERR_BAD_OPTION)}},validators:Le};const nt=Ze.validators;class at{constructor(oe){this.defaults=oe,this.interceptors={request:new rn,response:new rn}}request(oe,pe){typeof oe=="string"?(pe=pe||{}).url=oe:pe=oe||{},pe=Be(this.defaults,pe);const{transitional:be,paramsSerializer:Te,headers:xe}=pe;be!==void 0&&Ze.assertOptions(be,{silentJSONParsing:nt.transitional(nt.boolean),forcedJSONParsing:nt.transitional(nt.boolean),clarifyTimeoutError:nt.transitional(nt.boolean)},!1),Te!=null&&(Ae.isFunction(Te)?pe.paramsSerializer={serialize:Te}:Ze.assertOptions(Te,{encode:nt.function,serialize:nt.function},!0)),pe.method=(pe.method||this.defaults.method||"get").toLowerCase();let Ie=xe&&Ae.merge(xe.common,xe[pe.method]);xe&&Ae.forEach(["delete","get","head","post","put","patch","common"],Je=>{delete xe[Je]}),pe.headers=ot.concat(Ie,xe);const Fe=[];let ze=!0;this.interceptors.request.forEach(function(Je){typeof Je.runWhen=="function"&&Je.runWhen(pe)===!1||(ze=ze&&Je.synchronous,Fe.unshift(Je.fulfilled,Je.rejected))});const He=[];let Me;this.interceptors.response.forEach(function(Je){He.push(Je.fulfilled,Je.rejected)});let rt,We=0;if(!ze){const Je=[Ne.bind(this),void 0];for(Je.unshift.apply(Je,Fe),Je.push.apply(Je,He),rt=Je.length,Me=Promise.resolve(pe);We<rt;)Me=Me.then(Je[We++],Je[We++]);return Me}rt=Fe.length;let ft=pe;for(We=0;We<rt;){const Je=Fe[We++],bt=Fe[We++];try{ft=Je(ft)}catch(Bt){bt.call(this,Bt);break}}try{Me=Ne.call(this,ft)}catch(Je){return Promise.reject(Je)}for(We=0,rt=He.length;We<rt;)Me=Me.then(He[We++],He[We++]);return Me}getUri(oe){return Ft(Vn((oe=Be(this.defaults,oe)).baseURL,oe.url),oe.params,oe.paramsSerializer)}}Ae.forEach(["delete","get","head","options"],function(K){at.prototype[K]=function(oe,pe){return this.request(Be(pe||{},{method:K,url:oe,data:(pe||{}).data}))}}),Ae.forEach(["post","put","patch"],function(K){function oe(pe){return function(be,Te,xe){return this.request(Be(xe||{},{method:K,headers:pe?{"Content-Type":"multipart/form-data"}:{},url:be,data:Te}))}}at.prototype[K]=oe(),at.prototype[K+"Form"]=oe(!0)});var It=at;class Qt{constructor(oe){if(typeof oe!="function")throw new TypeError("executor must be a function.");let pe;this.promise=new Promise(function(Te){pe=Te});const be=this;this.promise.then(Te=>{if(!be._listeners)return;let xe=be._listeners.length;for(;xe-- >0;)be._listeners[xe](Te);be._listeners=null}),this.promise.then=Te=>{let xe;const Ie=new Promise(Fe=>{be.subscribe(Fe),xe=Fe}).then(Te);return Ie.cancel=function(){be.unsubscribe(xe)},Ie},oe(function(Te,xe,Ie){be.reason||(be.reason=new on(Te,xe,Ie),pe(be.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(oe){this.reason?oe(this.reason):this._listeners?this._listeners.push(oe):this._listeners=[oe]}unsubscribe(oe){if(!this._listeners)return;const pe=this._listeners.indexOf(oe);pe!==-1&&this._listeners.splice(pe,1)}static source(){let oe;return{token:new Qt(function(pe){oe=pe}),cancel:oe}}}var hn=Qt;const xn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(xn).forEach(([K,oe])=>{xn[oe]=K});var Gn=xn;const Et=function K(oe){const pe=new It(oe),be=c(It.prototype.request,pe);return Ae.extend(be,It.prototype,pe,{allOwnKeys:!0}),Ae.extend(be,pe,null,{allOwnKeys:!0}),be.create=function(Te){return K(Be(oe,Te))},be}(j);Et.Axios=It,Et.CanceledError=on,Et.CancelToken=hn,Et.isCancel=yt,Et.VERSION="1.6.2",Et.toFormData=ut,Et.AxiosError=Ye,Et.Cancel=Et.CanceledError,Et.all=function(K){return Promise.all(K)},Et.spread=function(K){return function(oe){return K.apply(null,oe)}},Et.isAxiosError=function(K){return Ae.isObject(K)&&K.isAxiosError===!0},Et.mergeConfig=Be,Et.AxiosHeaders=ot,Et.formToJSON=K=>X(Ae.isHTMLForm(K)?new FormData(K):K),Et.getAdapter=Se,Et.HttpStatusCode=Gn,Et.default=Et,f.exports=Et},147:f=>{f.exports=JSON.parse('{"name":"@pikaz/location","version":"1.0.9","description":"used to obtain location from the browser","private":false,"main":"lib/pikazLocation.js","module":"lib/pikazLocationModule.js","scripts":{"compress":"node utils/compress.js","analysisip":"node utils/analysisIp.js","build":"webpack && webpack --config module.config.js"},"keywords":["geolocation","location","longitude","latitude","province","city","district"],"files":["lib"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/pikaz-18/pikaz-location.git"},"author":"pikaz","license":"MIT","bugs":{"url":"https://github.com/pikaz-18/pikaz-location/issues"},"homepage":"https://github.com/pikaz-18/pikaz-location#readme","devDependencies":{"clean-webpack-plugin":"^4.0.0","copy-webpack-plugin":"^10.2.0","object-hash":"^3.0.0","webpack":"^5.65.0","webpack-cli":"^4.9.1"},"dependencies":{"axios":"^1.6.2","localforage":"^1.10.0","lz-string":"^1.4.4","point-in-polygon":"^1.1.0"},"fileDate":{"areaList":"202212301139","city":"202212301139","district":"202212301139","ip":"2024532110","province":"202317042"},"fileCode":{"areaList":"64b5a33f94b14ae208fca152fdc89dca1048360a","city":"7827eb2bc906b83df109ab24242ce68f98f9558b","district":"14d77ce6236e2025a4b1e3900cc70d0c32a62d0b","ip":"befa0a8a45fdc238a0fb4e4a3011dae43a06c1b4","province":"629a3c20a32e0de95e0633e0385234e2b7886c2d"}}')}},I={};function D(f){var k=I[f];if(k!==void 0)return k.exports;var i=I[f]={exports:{}};return N[f](i,i.exports,D),i.exports}return D.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),D(138)})()}},t$1={};function n$1(O){var N=t$1[O];if(N!==void 0)return N.exports;var I=t$1[O]={exports:{}};return e$2[O].call(I.exports,I,I.exports,n$1),I.exports}n$1.n=O=>{var N=O&&O.__esModule?()=>O.default:()=>O;return n$1.d(N,{a:N}),N},n$1.d=(O,N)=>{for(var I in N)n$1.o(N,I)&&!n$1.o(O,I)&&Object.defineProperty(O,I,{enumerable:!0,get:N[I]})},n$1.o=(O,N)=>Object.prototype.hasOwnProperty.call(O,N);var r={};(()=>{n$1.d(r,{v6:()=>O.setConfig,k$:()=>O.getLocation,SG:()=>O.getH5Location,Qf:()=>O.getIpLocation,Mc:()=>O.searchList,kr:()=>O.searchCodeAddress,Gp:()=>O.searchAddress,I5:()=>O.searchCodeDetail,ZP:()=>N});var O=n$1(782);const N={setConfig:O.setConfig,getLocation:O.getLocation,getH5Location:O.getH5Location,getIpLocation:O.getIpLocation,searchList:O.searchList,searchCodeAddress:O.searchCodeAddress,searchAddress:O.searchAddress,searchCodeDetail:O.searchCodeDetail}})(),r.ZP,r.SG,r.Qf,r.k$,r.Gp,r.kr,r.I5,r.Mc,r.v6;const createMutedAudioStream=O=>{const N=O.createOscillator();N.type="sine",N.frequency.setValueAtTime(0,O.currentTime);const I=O.createGain();I.gain.value=0,N.connect(I),I.connect(O.destination),N.start();const D=O.createMediaStreamDestination();return I.disconnect(),N.connect(D),D.stream},createFakeVideoStream=(O=10,N=10,I=30)=>{const D=document.createElement("canvas"),f=D.getContext("2d");D.width=O,D.height=N;let k=0;return setInterval(()=>{f.clearRect(0,0,D.width,D.height);const $=f.createLinearGradient(0,0,D.width,D.height);$.addColorStop(0,`hsla(${k}, 100%, 50%, 0)`),$.addColorStop(1,`hsla(${k+120}, 100%, 50%, 0)`),f.fillStyle=$,f.fillRect(0,0,D.width,D.height),k=(k+1)%360},100),D.captureStream(I)};class NetworkQualityTester{constructor(N=[]){_e(this,"targetUrls",[]);_e(this,"results",[]);N.length===0&&N.push("https://api.pryun.vip/favicon-32x32.png"),this.targetUrls=N,this.results=[]}async testAll(){const N=this.targetUrls.map(I=>this.testUrl(I));return await Promise.all(N),this.analyzeResults()}async testUrl(N){const I=performance.now();let D=0,f=!1;try{await fetch(N,{method:"HEAD",cache:"no-store"});const k=performance.now()-I,i=performance.now(),$=await(await fetch(N,{cache:"no-store"})).blob(),C=performance.now()-i;D=$.size,f=!0,this.results.push({url:N,success:f,headTime:k,getTime:C,size:D,downloadSpeed:D>0?(D/1024/(C/1e3)).toFixed(2):0,totalTime:performance.now()-I})}catch(k){this.results.push({url:N,success:!1,error:k.message,totalTime:performance.now()-I})}}analyzeResults(){const N=this.results.filter(k=>k.success);if(N.length===0)return{overallSuccess:!1,message:"所有测试均失败"};const I=N.reduce((k,i)=>k+i.size,0),D=N.reduce((k,i)=>k+i.totalTime,0),f=N.reduce((k,i)=>k+parseFloat(i.downloadSpeed),0)/N.length;return{overallSuccess:!0,totalTests:this.results.length,successfulTests:N.length,averageDownloadSpeed:`${f.toFixed(2)} KB/s`,averageResponseTime:`${(D/N.length).toFixed(2)}ms`,totalDataTransferred:`${(I/1024).toFixed(2)} KB`,detailedResults:this.results}}}var lib={},ebml={},EBML={},hasRequiredEBML;function requireEBML(){return hasRequiredEBML||(hasRequiredEBML=1,Object.defineProperty(EBML,"__esModule",{value:!0})),EBML}var EBMLDecoder={},int64Buffer={},hasRequiredInt64Buffer;function requireInt64Buffer(){return hasRequiredInt64Buffer||(hasRequiredInt64Buffer=1,function(O){(function(N){var I="undefined",D=I!==typeof Buffer&&Buffer,f=I!==typeof Uint8Array&&Uint8Array,k=I!==typeof ArrayBuffer&&ArrayBuffer,i=[0,0,0,0,0,0,0,0],c=Array.isArray||se,$=4294967296,C=16777216,M;Z("Uint64BE",!0,!0),Z("Int64BE",!0,!1),Z("Uint64LE",!1,!0),Z("Int64LE",!1,!1);function Z(ue,he,we){var fe=he?0:4,me=he?4:0,Re=he?0:3,Ue=he?1:2,Pe=he?2:1,De=he?3:0,vt=he?ie:re,_t=he?ye:de,St=ct.prototype,Mt="is"+ue,At="_"+Mt;return St.buffer=void 0,St.offset=0,St[At]=!0,St.toNumber=Ae,St.toString=Ye,St.toJSON=Ae,St.toArray=J,D&&(St.toBuffer=z),f&&(St.toArrayBuffer=Q),ct[Mt]=Qe,N[ue]=ct,ct;function ct(Ke,Ve,Xe,et){return this instanceof ct?Lt(this,Ke,Ve,Xe,et):new ct(Ke,Ve,Xe,et)}function Qe(Ke){return!!(Ke&&Ke[At])}function Lt(Ke,Ve,Xe,et,ut){if(f&&k&&(Ve instanceof k&&(Ve=new f(Ve)),et instanceof k&&(et=new f(et))),!Ve&&!Xe&&!et&&!M){Ke.buffer=te(i,0);return}if(!ee(Ve,Xe)){var Tt=M||Array;ut=Xe,et=Ve,Xe=0,Ve=M===D?D.alloc(8):new Tt(8)}Ke.buffer=Ve,Ke.offset=Xe|=0,I!==typeof et&&(typeof et=="string"?gt(Ve,Xe,et,ut||10):ee(et,ut)?Y(Ve,Xe,et,ut):typeof ut=="number"?(qt(Ve,Xe+fe,et),qt(Ve,Xe+me,ut)):et>0?vt(Ve,Xe,et):et<0?_t(Ve,Xe,et):Y(Ve,Xe,i,0))}function gt(Ke,Ve,Xe,et){var ut=0,Tt=Xe.length,Ct=0,Dt=0;Xe[0]==="-"&&ut++;for(var Ht=ut;ut<Tt;){var Ft=parseInt(Xe[ut++],et);if(!(Ft>=0))break;Dt=Dt*et+Ft,Ct=Ct*et+Math.floor(Dt/$),Dt%=$}Ht&&(Ct=~Ct,Dt?Dt=$-Dt:Ct++),qt(Ke,Ve+fe,Ct),qt(Ke,Ve+me,Dt)}function Ae(){var Ke=this.buffer,Ve=this.offset,Xe=Ot(Ke,Ve+fe),et=Ot(Ke,Ve+me);return we||(Xe|=0),Xe?Xe*$+et:et}function Ye(Ke){var Ve=this.buffer,Xe=this.offset,et=Ot(Ve,Xe+fe),ut=Ot(Ve,Xe+me),Tt="",Ct=!we&&et&2147483648;for(Ct&&(et=~et,ut=$-ut),Ke=Ke||10;;){var Dt=et%Ke*$+ut;if(et=Math.floor(et/Ke),ut=Math.floor(Dt/Ke),Tt=(Dt%Ke).toString(Ke)+Tt,!et&&!ut)break}return Ct&&(Tt="-"+Tt),Tt}function qt(Ke,Ve,Xe){Ke[Ve+De]=Xe&255,Xe=Xe>>8,Ke[Ve+Pe]=Xe&255,Xe=Xe>>8,Ke[Ve+Ue]=Xe&255,Xe=Xe>>8,Ke[Ve+Re]=Xe&255}function Ot(Ke,Ve){return Ke[Ve+Re]*C+(Ke[Ve+Ue]<<16)+(Ke[Ve+Pe]<<8)+Ke[Ve+De]}}function J(ue){var he=this.buffer,we=this.offset;return M=null,ue!==!1&&c(he)?he.length===8?he:he.slice(we,we+8):te(he,we)}function z(ue){var he=this.buffer,we=this.offset;return M=D,ue!==!1&&D.isBuffer(he)?he.length===8?he:he.slice(we,we+8):D.from(Q.call(this,ue))}function Q(ue){var he=this.buffer,we=this.offset,fe=he.buffer;if(M=f,ue!==!1&&!he.offset&&fe instanceof k)return fe.byteLength===8?fe:fe.slice(we,we+8);var me=new f(8);return Y(me,0,he,we),me.buffer}function ee(ue,he){var we=ue&&ue.length;return he|=0,we&&he+8<=we&&typeof ue[he]!="string"}function Y(ue,he,we,fe){he|=0,fe|=0;for(var me=0;me<8;me++)ue[he++]=we[fe++]&255}function te(ue,he){return Array.prototype.slice.call(ue,he,he+8)}function ie(ue,he,we){for(var fe=he+8;fe>he;)ue[--fe]=we&255,we/=256}function ye(ue,he,we){var fe=he+8;for(we++;fe>he;)ue[--fe]=-we&255^255,we/=256}function re(ue,he,we){for(var fe=he+8;he<fe;)ue[he++]=we&255,we/=256}function de(ue,he,we){var fe=he+8;for(we++;he<fe;)ue[he++]=-we&255^255,we/=256}function se(ue){return!!ue&&Object.prototype.toString.call(ue)=="[object Array]"}})(typeof O.nodeName!="string"?O:int64Buffer||{})}(int64Buffer)),int64Buffer}var tools={},EBMLEncoder={},ebmlID={},hasRequiredEbmlID;function requireEbmlID(){return hasRequiredEbmlID||(hasRequiredEbmlID=1,Object.defineProperty(ebmlID,"__esModule",{value:!0}),ebmlID.byEbmlID=void 0,ebmlID.byEbmlID={128:{name:"ChapterDisplay",level:4,type:"m",multiple:!0,minver:1,webm:!0,description:"Contains all possible strings to use for the chapter display."},131:{name:"TrackType",level:3,type:"u",mandatory:!0,minver:1,range:"1-254",description:"A set of track types coded on 8 bits (1: video, 2: audio, 3: complex, 0x10: logo, 0x11: subtitle, 0x12: buttons, 0x20: control)."},133:{name:"ChapString",cppname:"ChapterString",level:5,type:"8",mandatory:!0,minver:1,webm:!0,description:"Contains the string to use as the chapter atom."},134:{name:"CodecID",level:3,type:"s",mandatory:!0,minver:1,description:"An ID corresponding to the codec, see the codec page for more info."},136:{name:"FlagDefault",cppname:"TrackFlagDefault",level:3,type:"u",mandatory:!0,minver:1,default:1,range:"0-1",description:"Set if that track (audio, video or subs) SHOULD be active if no language found matches the user preference. (1 bit)"},137:{name:"ChapterTrackNumber",level:5,type:"u",mandatory:!0,multiple:!0,minver:1,webm:!1,range:"not 0",description:"UID of the Track to apply this chapter too. In the absense of a control track, choosing this chapter will select the listed Tracks and deselect unlisted tracks. Absense of this element indicates that the Chapter should be applied to any currently used Tracks."},145:{name:"ChapterTimeStart",level:4,type:"u",mandatory:!0,minver:1,webm:!0,description:"Timestamp of the start of Chapter (not scaled)."},146:{name:"ChapterTimeEnd",level:4,type:"u",minver:1,webm:!1,description:"Timestamp of the end of Chapter (timestamp excluded, not scaled)."},150:{name:"CueRefTime",level:5,type:"u",mandatory:!0,minver:2,webm:!1,description:"Timestamp of the referenced Block."},151:{name:"CueRefCluster",level:5,type:"u",mandatory:!0,webm:!1,description:"The Position of the Cluster containing the referenced Block."},152:{name:"ChapterFlagHidden",level:4,type:"u",mandatory:!0,minver:1,webm:!1,default:0,range:"0-1",description:"If a chapter is hidden (1), it should not be available to the user interface (but still to Control Tracks; see flag notes). (1 bit)"},16980:{name:"ContentCompAlgo",level:6,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"The compression algorithm used. Algorithms that have been specified so far are: 0 - zlib, 3 - Header Stripping"},16981:{name:"ContentCompSettings",level:6,type:"b",minver:1,webm:!1,description:"Settings that might be needed by the decompressor. For Header Stripping (ContentCompAlgo=3), the bytes that were removed from the beggining of each frames of the track."},17026:{name:"DocType",level:1,type:"s",mandatory:!0,default:"matroska",minver:1,description:"A string that describes the type of document that follows this EBML header. 'matroska' in our case or 'webm' for webm files."},17029:{name:"DocTypeReadVersion",level:1,type:"u",mandatory:!0,default:1,minver:1,description:"The minimum DocType version an interpreter has to support to read this file."},17030:{name:"EBMLVersion",level:1,type:"u",mandatory:!0,default:1,minver:1,description:"The version of EBML parser used to create the file."},17031:{name:"DocTypeVersion",level:1,type:"u",mandatory:!0,default:1,minver:1,description:"The version of DocType interpreter used to create the file."},17476:{name:"SegmentFamily",level:2,type:"b",multiple:!0,minver:1,webm:!1,bytesize:16,description:"A randomly generated unique ID that all segments related to each other must use (128 bits)."},17505:{name:"DateUTC",level:2,type:"d",minver:1,description:"Date of the origin of timestamp (value 0), i.e. production date."},17540:{name:"TagDefault",level:4,type:"u",mandatory:!0,minver:1,webm:!1,default:1,range:"0-1",description:"Indication to know if this is the default/original language to use for the given tag. (1 bit)"},17541:{name:"TagBinary",level:4,type:"b",minver:1,webm:!1,description:"The values of the Tag if it is binary. Note that this cannot be used in the same SimpleTag as TagString."},17543:{name:"TagString",level:4,type:"8",minver:1,webm:!1,description:"The value of the Element."},17545:{name:"Duration",level:2,type:"f",minver:1,range:"> 0",description:"Duration of the segment (based on TimecodeScale)."},17816:{name:"ChapterFlagEnabled",level:4,type:"u",mandatory:!0,minver:1,webm:!1,default:1,range:"0-1",description:"Specify wether the chapter is enabled. It can be enabled/disabled by a Control Track. When disabled, the movie should skip all the content between the TimeStart and TimeEnd of this chapter (see flag notes). (1 bit)"},18016:{name:"FileMimeType",level:3,type:"s",mandatory:!0,minver:1,webm:!1,description:"MIME type of the file."},18017:{name:"FileUsedStartTime",level:3,type:"u",divx:!0,description:"DivX font extension"},18018:{name:"FileUsedEndTime",level:3,type:"u",divx:!0,description:"DivX font extension"},18037:{name:"FileReferral",level:3,type:"b",webm:!1,description:"A binary value that a track/codec can refer to when the attachment is needed."},20529:{name:"ContentEncodingOrder",level:5,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"Tells when this modification was used during encoding/muxing starting with 0 and counting upwards. The decoder/demuxer has to start with the highest order number it finds and work its way down. This value has to be unique over all ContentEncodingOrder elements in the segment."},20530:{name:"ContentEncodingScope",level:5,type:"u",mandatory:!0,minver:1,webm:!1,default:1,range:"not 0",description:"A bit field that describes which elements have been modified in this way. Values (big endian) can be OR'ed. Possible values: 1 - all frame contents, 2 - the track's private data, 4 - the next ContentEncoding (next ContentEncodingOrder. Either the data inside ContentCompression and/or ContentEncryption)"},20531:{name:"ContentEncodingType",level:5,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"A value describing what kind of transformation has been done. Possible values: 0 - compression, 1 - encryption"},20532:{name:"ContentCompression",level:5,type:"m",minver:1,webm:!1,description:"Settings describing the compression used. Must be present if the value of ContentEncodingType is 0 and absent otherwise. Each block must be decompressable even if no previous block is available in order not to prevent seeking."},20533:{name:"ContentEncryption",level:5,type:"m",minver:1,webm:!1,description:"Settings describing the encryption used. Must be present if the value of ContentEncodingType is 1 and absent otherwise."},21368:{name:"CueBlockNumber",level:4,type:"u",minver:1,default:1,range:"not 0",description:"Number of the Block in the specified Cluster."},22100:{name:"ChapterStringUID",level:4,type:"8",mandatory:!1,minver:3,webm:!0,description:"A unique string ID to identify the Chapter. Use for WebVTT cue identifier storage."},22337:{name:"WritingApp",level:2,type:"8",mandatory:!0,minver:1,description:'Writing application ("mkvmerge-0.3.3").'},22612:{name:"SilentTracks",cppname:"ClusterSilentTracks",level:2,type:"m",minver:1,webm:!1,description:"The list of tracks that are not used in that part of the stream. It is useful when using overlay tracks on seeking. Then you should decide what track to use."},25152:{name:"ContentEncoding",level:4,type:"m",mandatory:!0,multiple:!0,minver:1,webm:!1,description:"Settings for one content encoding like compression or encryption."},25188:{name:"BitDepth",cppname:"AudioBitDepth",level:4,type:"u",minver:1,range:"not 0",description:"Bits per sample, mostly used for PCM."},25906:{name:"SignedElement",level:3,type:"b",multiple:!0,webm:!1,description:"An element ID whose data will be used to compute the signature."},26148:{name:"TrackTranslate",level:3,type:"m",multiple:!0,minver:1,webm:!1,description:"The track identification for the given Chapter Codec."},26897:{name:"ChapProcessCommand",cppname:"ChapterProcessCommand",level:5,type:"m",multiple:!0,minver:1,webm:!1,description:"Contains all the commands associated to the Atom."},26914:{name:"ChapProcessTime",cppname:"ChapterProcessTime",level:6,type:"u",mandatory:!0,minver:1,webm:!1,description:"Defines when the process command should be handled (0: during the whole chapter, 1: before starting playback, 2: after playback of the chapter)."},26916:{name:"ChapterTranslate",level:2,type:"m",multiple:!0,minver:1,webm:!1,description:"A tuple of corresponding ID used by chapter codecs to represent this segment."},26931:{name:"ChapProcessData",cppname:"ChapterProcessData",level:6,type:"b",mandatory:!0,minver:1,webm:!1,description:"Contains the command information. The data should be interpreted depending on the ChapProcessCodecID value. For ChapProcessCodecID = 1, the data correspond to the binary DVD cell pre/post commands."},26948:{name:"ChapProcess",cppname:"ChapterProcess",level:4,type:"m",multiple:!0,minver:1,webm:!1,description:"Contains all the commands associated to the Atom."},26965:{name:"ChapProcessCodecID",cppname:"ChapterProcessCodecID",level:5,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"Contains the type of the codec used for the processing. A value of 0 means native Matroska processing (to be defined), a value of 1 means the DVD command set is used. More codec IDs can be added later."},29555:{name:"Tag",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,webm:!1,description:"Element containing elements specific to Tracks/Chapters."},29572:{name:"SegmentFilename",level:2,type:"8",minver:1,webm:!1,description:"A filename corresponding to this segment."},29766:{name:"AttachmentLink",cppname:"TrackAttachmentLink",level:3,type:"u",minver:1,webm:!1,range:"not 0",description:"The UID of an attachment that is used by this codec."},2459272:{name:"CodecName",level:3,type:"8",minver:1,description:"A human-readable string specifying the codec."},408125543:{name:"Segment",level:"0",type:"m",mandatory:!0,multiple:!0,minver:1,description:"This element contains all other top-level (level 1) elements. Typically a Matroska file is composed of 1 segment."},17530:{name:"TagLanguage",level:4,type:"s",mandatory:!0,minver:1,webm:!1,default:"und",description:"Specifies the language of the tag specified, in the Matroska languages form."},17827:{name:"TagName",level:4,type:"8",mandatory:!0,minver:1,webm:!1,description:"The name of the Tag that is going to be stored."},26568:{name:"SimpleTag",cppname:"TagSimple",level:3,recursive:"1",type:"m",mandatory:!0,multiple:!0,minver:1,webm:!1,description:"Contains general information about the target."},25542:{name:"TagAttachmentUID",level:4,type:"u",multiple:!0,minver:1,webm:!1,default:0,description:"A unique ID to identify the Attachment(s) the tags belong to. If the value is 0 at this level, the tags apply to all the attachments in the Segment."},25540:{name:"TagChapterUID",level:4,type:"u",multiple:!0,minver:1,webm:!1,default:0,description:"A unique ID to identify the Chapter(s) the tags belong to. If the value is 0 at this level, the tags apply to all chapters in the Segment."},25545:{name:"TagEditionUID",level:4,type:"u",multiple:!0,minver:1,webm:!1,default:0,description:"A unique ID to identify the EditionEntry(s) the tags belong to. If the value is 0 at this level, the tags apply to all editions in the Segment."},25541:{name:"TagTrackUID",level:4,type:"u",multiple:!0,minver:1,webm:!1,default:0,description:"A unique ID to identify the Track(s) the tags belong to. If the value is 0 at this level, the tags apply to all tracks in the Segment."},25546:{name:"TargetType",cppname:"TagTargetType",level:4,type:"s",minver:1,webm:!1,strong:"informational",description:'An string that can be used to display the logical level of the target like "ALBUM", "TRACK", "MOVIE", "CHAPTER", etc (see TargetType).'},26826:{name:"TargetTypeValue",cppname:"TagTargetTypeValue",level:4,type:"u",minver:1,webm:!1,default:50,description:"A number to indicate the logical level of the target (see TargetType)."},25536:{name:"Targets",cppname:"TagTargets",level:3,type:"m",mandatory:!0,minver:1,webm:!1,description:"Contain all UIDs where the specified meta data apply. It is empty to describe everything in the segment."},307544935:{name:"Tags",level:1,type:"m",multiple:!0,minver:1,webm:!1,description:"Element containing elements specific to Tracks/Chapters. A list of valid tags can be found here."},17677:{name:"ChapProcessPrivate",cppname:"ChapterProcessPrivate",level:5,type:"b",minver:1,webm:!1,description:'Some optional data attached to the ChapProcessCodecID information. For ChapProcessCodecID = 1, it is the "DVD level" equivalent.'},17278:{name:"ChapCountry",cppname:"ChapterCountry",level:5,type:"s",multiple:!0,minver:1,webm:!1,description:"The countries corresponding to the string, same 2 octets as in Internet domains."},17276:{name:"ChapLanguage",cppname:"ChapterLanguage",level:5,type:"s",mandatory:!0,multiple:!0,minver:1,webm:!0,default:"eng",description:"The languages corresponding to the string, in the bibliographic ISO-639-2 form."},143:{name:"ChapterTrack",level:4,type:"m",minver:1,webm:!1,description:"List of tracks on which the chapter applies. If this element is not present, all tracks apply"},25539:{name:"ChapterPhysicalEquiv",level:4,type:"u",minver:1,webm:!1,description:'Specify the physical equivalent of this ChapterAtom like "DVD" (60) or "SIDE" (50), see complete list of values.'},28348:{name:"ChapterSegmentEditionUID",level:4,type:"u",minver:1,webm:!1,range:"not 0",description:"The EditionUID to play from the segment linked in ChapterSegmentUID."},28263:{name:"ChapterSegmentUID",level:4,type:"b",minver:1,webm:!1,range:">0",bytesize:16,description:"A segment to play in place of this chapter. Edition ChapterSegmentEditionUID should be used for this segment, otherwise no edition is used."},29636:{name:"ChapterUID",level:4,type:"u",mandatory:!0,minver:1,webm:!0,range:"not 0",description:"A unique ID to identify the Chapter."},182:{name:"ChapterAtom",level:3,recursive:"1",type:"m",mandatory:!0,multiple:!0,minver:1,webm:!0,description:"Contains the atom information to use as the chapter atom (apply to all tracks)."},17885:{name:"EditionFlagOrdered",level:3,type:"u",minver:1,webm:!1,default:0,range:"0-1",description:"Specify if the chapters can be defined multiple times and the order to play them is enforced. (1 bit)"},17883:{name:"EditionFlagDefault",level:3,type:"u",mandatory:!0,minver:1,webm:!1,default:0,range:"0-1",description:"If a flag is set (1) the edition should be used as the default one. (1 bit)"},17853:{name:"EditionFlagHidden",level:3,type:"u",mandatory:!0,minver:1,webm:!1,default:0,range:"0-1",description:"If an edition is hidden (1), it should not be available to the user interface (but still to Control Tracks; see flag notes). (1 bit)"},17852:{name:"EditionUID",level:3,type:"u",minver:1,webm:!1,range:"not 0",description:"A unique ID to identify the edition. It's useful for tagging an edition."},17849:{name:"EditionEntry",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,webm:!0,description:"Contains all information about a segment edition."},272869232:{name:"Chapters",level:1,type:"m",minver:1,webm:!0,description:"A system to define basic menus and partition data. For more detailed information, look at the Chapters Explanation."},18094:{name:"FileUID",level:3,type:"u",mandatory:!0,minver:1,webm:!1,range:"not 0",description:"Unique ID representing the file, as random as possible."},18012:{name:"FileData",level:3,type:"b",mandatory:!0,minver:1,webm:!1,description:"The data of the file."},18030:{name:"FileName",level:3,type:"8",mandatory:!0,minver:1,webm:!1,description:"Filename of the attached file."},18046:{name:"FileDescription",level:3,type:"8",minver:1,webm:!1,description:"A human-friendly name for the attached file."},24999:{name:"AttachedFile",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,webm:!1,description:"An attached file."},423732329:{name:"Attachments",level:1,type:"m",minver:1,webm:!1,description:"Contain attached files."},235:{name:"CueRefCodecState",level:5,type:"u",webm:!1,default:0,description:"The position of the Codec State corresponding to this referenced element. 0 means that the data is taken from the initial Track Entry."},21343:{name:"CueRefNumber",level:5,type:"u",webm:!1,default:1,range:"not 0",description:"Number of the referenced Block of Track X in the specified Cluster."},219:{name:"CueReference",level:4,type:"m",multiple:!0,minver:2,webm:!1,description:"The Clusters containing the required referenced Blocks."},234:{name:"CueCodecState",level:4,type:"u",minver:2,webm:!1,default:0,description:"The position of the Codec State corresponding to this Cue element. 0 means that the data is taken from the initial Track Entry."},178:{name:"CueDuration",level:4,type:"u",mandatory:!1,minver:4,webm:!1,description:"The duration of the block according to the segment time base. If missing the track's DefaultDuration does not apply and no duration information is available in terms of the cues."},240:{name:"CueRelativePosition",level:4,type:"u",mandatory:!1,minver:4,webm:!1,description:"The relative position of the referenced block inside the cluster with 0 being the first possible position for an element inside that cluster.",position:"clusterRelative"},241:{name:"CueClusterPosition",level:4,type:"u",mandatory:!0,minver:1,description:"The position of the Cluster containing the required Block.",position:"segment"},247:{name:"CueTrack",level:4,type:"u",mandatory:!0,minver:1,range:"not 0",description:"The track for which a position is given."},183:{name:"CueTrackPositions",level:3,type:"m",mandatory:!0,multiple:!0,minver:1,description:"Contain positions for different tracks corresponding to the timestamp."},179:{name:"CueTime",level:3,type:"u",mandatory:!0,minver:1,description:"Absolute timestamp according to the segment time base."},187:{name:"CuePoint",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,description:"Contains all information relative to a seek point in the segment."},475249515:{name:"Cues",level:1,type:"m",minver:1,description:'A top-level element to speed seeking access. All entries are local to the segment. Should be mandatory for non "live" streams.'},18406:{name:"ContentSigHashAlgo",level:6,type:"u",minver:1,webm:!1,default:0,description:"The hash algorithm used for the signature. A value of '0' means that the contents have not been signed but only encrypted. Predefined values: 1 - SHA1-160 2 - MD5"},18405:{name:"ContentSigAlgo",level:6,type:"u",minver:1,webm:!1,default:0,description:"The algorithm used for the signature. A value of '0' means that the contents have not been signed but only encrypted. Predefined values: 1 - RSA"},18404:{name:"ContentSigKeyID",level:6,type:"b",minver:1,webm:!1,description:"This is the ID of the private key the data was signed with."},18403:{name:"ContentSignature",level:6,type:"b",minver:1,webm:!1,description:"A cryptographic signature of the contents."},18402:{name:"ContentEncKeyID",level:6,type:"b",minver:1,webm:!1,description:"For public key algorithms this is the ID of the public key the the data was encrypted with."},18401:{name:"ContentEncAlgo",level:6,type:"u",minver:1,webm:!1,default:0,description:"The encryption algorithm used. The value '0' means that the contents have not been encrypted but only signed. Predefined values: 1 - DES, 2 - 3DES, 3 - Twofish, 4 - Blowfish, 5 - AES"},28032:{name:"ContentEncodings",level:3,type:"m",minver:1,webm:!1,description:"Settings for several content encoding mechanisms like compression or encryption."},196:{name:"TrickMasterTrackSegmentUID",level:3,type:"b",divx:!0,bytesize:16,description:"DivX trick track extenstions"},199:{name:"TrickMasterTrackUID",level:3,type:"u",divx:!0,description:"DivX trick track extenstions"},198:{name:"TrickTrackFlag",level:3,type:"u",divx:!0,default:0,description:"DivX trick track extenstions"},193:{name:"TrickTrackSegmentUID",level:3,type:"b",divx:!0,bytesize:16,description:"DivX trick track extenstions"},192:{name:"TrickTrackUID",level:3,type:"u",divx:!0,description:"DivX trick track extenstions"},237:{name:"TrackJoinUID",level:5,type:"u",mandatory:!0,multiple:!0,minver:3,webm:!1,range:"not 0",description:"The trackUID number of a track whose blocks are used to create this virtual track."},233:{name:"TrackJoinBlocks",level:4,type:"m",minver:3,webm:!1,description:"Contains the list of all tracks whose Blocks need to be combined to create this virtual track"},230:{name:"TrackPlaneType",level:6,type:"u",mandatory:!0,minver:3,webm:!1,description:"The kind of plane this track corresponds to (0: left eye, 1: right eye, 2: background)."},229:{name:"TrackPlaneUID",level:6,type:"u",mandatory:!0,minver:3,webm:!1,range:"not 0",description:"The trackUID number of the track representing the plane."},228:{name:"TrackPlane",level:5,type:"m",mandatory:!0,multiple:!0,minver:3,webm:!1,description:"Contains a video plane track that need to be combined to create this 3D track"},227:{name:"TrackCombinePlanes",level:4,type:"m",minver:3,webm:!1,description:"Contains the list of all video plane tracks that need to be combined to create this 3D track"},226:{name:"TrackOperation",level:3,type:"m",minver:3,webm:!1,description:"Operation that needs to be applied on tracks to create this virtual track. For more details look at the Specification Notes on the subject."},32123:{name:"ChannelPositions",cppname:"AudioPosition",level:4,type:"b",webm:!1,description:"Table of horizontal angles for each successive channel, see appendix."},159:{name:"Channels",cppname:"AudioChannels",level:4,type:"u",mandatory:!0,minver:1,default:1,range:"not 0",description:"Numbers of channels in the track."},30901:{name:"OutputSamplingFrequency",cppname:"AudioOutputSamplingFreq",level:4,type:"f",minver:1,default:"Sampling Frequency",range:"> 0",description:"Real output sampling frequency in Hz (used for SBR techniques)."},181:{name:"SamplingFrequency",cppname:"AudioSamplingFreq",level:4,type:"f",mandatory:!0,minver:1,default:8e3,range:"> 0",description:"Sampling frequency in Hz."},225:{name:"Audio",cppname:"TrackAudio",level:3,type:"m",minver:1,description:"Audio settings."},2327523:{name:"FrameRate",cppname:"VideoFrameRate",level:4,type:"f",range:"> 0",strong:"Informational",description:"Number of frames per second. only."},3126563:{name:"GammaValue",cppname:"VideoGamma",level:4,type:"f",webm:!1,range:"> 0",description:"Gamma Value."},3061028:{name:"ColourSpace",cppname:"VideoColourSpace",level:4,type:"b",minver:1,webm:!1,bytesize:4,description:"Same value as in AVI (32 bits)."},21683:{name:"AspectRatioType",cppname:"VideoAspectRatio",level:4,type:"u",minver:1,default:0,description:"Specify the possible modifications to the aspect ratio (0: free resizing, 1: keep aspect ratio, 2: fixed)."},21682:{name:"DisplayUnit",cppname:"VideoDisplayUnit",level:4,type:"u",minver:1,default:0,description:"How DisplayWidth & DisplayHeight should be interpreted (0: pixels, 1: centimeters, 2: inches, 3: Display Aspect Ratio)."},21690:{name:"DisplayHeight",cppname:"VideoDisplayHeight",level:4,type:"u",minver:1,default:"PixelHeight",range:"not 0",description:"Height of the video frames to display. The default value is only valid when DisplayUnit is 0."},21680:{name:"DisplayWidth",cppname:"VideoDisplayWidth",level:4,type:"u",minver:1,default:"PixelWidth",range:"not 0",description:"Width of the video frames to display. The default value is only valid when DisplayUnit is 0."},21725:{name:"PixelCropRight",cppname:"VideoPixelCropRight",level:4,type:"u",minver:1,default:0,description:"The number of video pixels to remove on the right of the image."},21708:{name:"PixelCropLeft",cppname:"VideoPixelCropLeft",level:4,type:"u",minver:1,default:0,description:"The number of video pixels to remove on the left of the image."},21691:{name:"PixelCropTop",cppname:"VideoPixelCropTop",level:4,type:"u",minver:1,default:0,description:"The number of video pixels to remove at the top of the image."},21674:{name:"PixelCropBottom",cppname:"VideoPixelCropBottom",level:4,type:"u",minver:1,default:0,description:"The number of video pixels to remove at the bottom of the image (for HDTV content)."},186:{name:"PixelHeight",cppname:"VideoPixelHeight",level:4,type:"u",mandatory:!0,minver:1,range:"not 0",description:"Height of the encoded video frames in pixels."},176:{name:"PixelWidth",cppname:"VideoPixelWidth",level:4,type:"u",mandatory:!0,minver:1,range:"not 0",description:"Width of the encoded video frames in pixels."},21433:{name:"OldStereoMode",level:4,type:"u",maxver:"0",webm:!1,divx:!1,description:"DEPRECATED, DO NOT USE. Bogus StereoMode value used in old versions of libmatroska. (0: mono, 1: right eye, 2: left eye, 3: both eyes)."},21440:{name:"AlphaMode",cppname:"VideoAlphaMode",level:4,type:"u",minver:3,webm:!0,default:0,description:"Alpha Video Mode. Presence of this element indicates that the BlockAdditional element could contain Alpha data."},21432:{name:"StereoMode",cppname:"VideoStereoMode",level:4,type:"u",minver:3,webm:!0,default:0,description:"Stereo-3D video mode (0: mono, 1: side by side (left eye is first), 2: top-bottom (right eye is first), 3: top-bottom (left eye is first), 4: checkboard (right is first), 5: checkboard (left is first), 6: row interleaved (right is first), 7: row interleaved (left is first), 8: column interleaved (right is first), 9: column interleaved (left is first), 10: anaglyph (cyan/red), 11: side by side (right eye is first), 12: anaglyph (green/magenta), 13 both eyes laced in one Block (left eye is first), 14 both eyes laced in one Block (right eye is first)) . There are some more details on 3D support in the Specification Notes."},154:{name:"FlagInterlaced",cppname:"VideoFlagInterlaced",level:4,type:"u",mandatory:!0,minver:2,webm:!0,default:0,range:"0-1",description:"Set if the video is interlaced. (1 bit)"},224:{name:"Video",cppname:"TrackVideo",level:3,type:"m",minver:1,description:"Video settings."},26277:{name:"TrackTranslateTrackID",level:4,type:"b",mandatory:!0,minver:1,webm:!1,description:"The binary value used to represent this track in the chapter codec data. The format depends on the ChapProcessCodecID used."},26303:{name:"TrackTranslateCodec",level:4,type:"u",mandatory:!0,minver:1,webm:!1,description:"The chapter codec using this ID (0: Matroska Script, 1: DVD-menu)."},26364:{name:"TrackTranslateEditionUID",level:4,type:"u",multiple:!0,minver:1,webm:!1,description:"Specify an edition UID on which this translation applies. When not specified, it means for all editions found in the segment."},22203:{name:"SeekPreRoll",level:3,type:"u",mandatory:!0,multiple:!1,default:0,minver:4,webm:!0,description:"After a discontinuity, SeekPreRoll is the duration in nanoseconds of the data the decoder must decode before the decoded data is valid."},22186:{name:"CodecDelay",level:3,type:"u",multiple:!1,default:0,minver:4,webm:!0,description:"CodecDelay is The codec-built-in delay in nanoseconds. This value must be subtracted from each block timestamp in order to get the actual timestamp. The value should be small so the muxing of tracks with the same actual timestamp are in the same Cluster."},28587:{name:"TrackOverlay",level:3,type:"u",multiple:!0,minver:1,webm:!1,description:"Specify that this track is an overlay track for the Track specified (in the u-integer). That means when this track has a gap (see SilentTracks) the overlay track should be used instead. The order of multiple TrackOverlay matters, the first one is the one that should be used. If not found it should be the second, etc."},170:{name:"CodecDecodeAll",level:3,type:"u",mandatory:!0,minver:2,webm:!1,default:1,range:"0-1",description:"The codec can decode potentially damaged data (1 bit)."},2536e3:{name:"CodecDownloadURL",level:3,type:"s",multiple:!0,webm:!1,description:"A URL to download about the codec used."},3883072:{name:"CodecInfoURL",level:3,type:"s",multiple:!0,webm:!1,description:"A URL to find information about the codec used."},3839639:{name:"CodecSettings",level:3,type:"8",webm:!1,description:"A string describing the encoding setting used."},25506:{name:"CodecPrivate",level:3,type:"b",minver:1,description:"Private data only known to the codec."},2274716:{name:"Language",cppname:"TrackLanguage",level:3,type:"s",minver:1,default:"eng",description:"Specifies the language of the track in the Matroska languages form."},21358:{name:"Name",cppname:"TrackName",level:3,type:"8",minver:1,description:"A human-readable track name."},21998:{name:"MaxBlockAdditionID",level:3,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"The maximum value of BlockAdditions for this track."},21375:{name:"TrackOffset",level:3,type:"i",webm:!1,default:0,description:"A value to add to the Block's Timestamp. This can be used to adjust the playback offset of a track."},2306383:{name:"TrackTimecodeScale",level:3,type:"f",mandatory:!0,minver:1,maxver:"3",webm:!1,default:1,range:"> 0",description:"DEPRECATED, DO NOT USE. The scale to apply on this track to work at normal speed in relation with other tracks (mostly used to adjust video speed when the audio length differs)."},2313850:{name:"DefaultDecodedFieldDuration",cppname:"TrackDefaultDecodedFieldDuration",level:3,type:"u",minver:4,range:"not 0",description:`The period in nanoseconds (not scaled by TimcodeScale)
8
+ between two successive fields at the output of the decoding process (see the notes)`},2352003:{name:"DefaultDuration",cppname:"TrackDefaultDuration",level:3,type:"u",minver:1,range:"not 0",description:"Number of nanoseconds (not scaled via TimecodeScale) per frame ('frame' in the Matroska sense -- one element put into a (Simple)Block)."},28152:{name:"MaxCache",cppname:"TrackMaxCache",level:3,type:"u",minver:1,webm:!1,description:"The maximum cache size required to store referenced frames in and the current frame. 0 means no cache is needed."},28135:{name:"MinCache",cppname:"TrackMinCache",level:3,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"The minimum number of frames a player should be able to cache during playback. If set to 0, the reference pseudo-cache system is not used."},156:{name:"FlagLacing",cppname:"TrackFlagLacing",level:3,type:"u",mandatory:!0,minver:1,default:1,range:"0-1",description:"Set if the track may contain blocks using lacing. (1 bit)"},21930:{name:"FlagForced",cppname:"TrackFlagForced",level:3,type:"u",mandatory:!0,minver:1,default:0,range:"0-1",description:"Set if that track MUST be active during playback. There can be many forced track for a kind (audio, video or subs), the player should select the one which language matches the user preference or the default + forced track. Overlay MAY happen between a forced and non-forced track of the same kind. (1 bit)"},185:{name:"FlagEnabled",cppname:"TrackFlagEnabled",level:3,type:"u",mandatory:!0,minver:2,webm:!0,default:1,range:"0-1",description:"Set if the track is usable. (1 bit)"},29637:{name:"TrackUID",level:3,type:"u",mandatory:!0,minver:1,range:"not 0",description:"A unique ID to identify the Track. This should be kept the same when making a direct stream copy of the Track to another file."},215:{name:"TrackNumber",level:3,type:"u",mandatory:!0,minver:1,range:"not 0",description:"The track number as used in the Block Header (using more than 127 tracks is not encouraged, though the design allows an unlimited number)."},174:{name:"TrackEntry",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,description:"Describes a track with all elements."},374648427:{name:"Tracks",level:1,type:"m",multiple:!0,minver:1,description:"A top-level block of information with many tracks described."},175:{name:"EncryptedBlock",level:2,type:"b",multiple:!0,webm:!1,description:"Similar to EncryptedBlock Structure)"},202:{name:"ReferenceTimeCode",level:4,type:"u",multiple:!1,mandatory:!0,minver:0,webm:!1,divx:!0,description:"DivX trick track extenstions"},201:{name:"ReferenceOffset",level:4,type:"u",multiple:!1,mandatory:!0,minver:0,webm:!1,divx:!0,description:"DivX trick track extenstions"},200:{name:"ReferenceFrame",level:3,type:"m",multiple:!1,minver:0,webm:!1,divx:!0,description:"DivX trick track extenstions"},207:{name:"SliceDuration",level:5,type:"u",default:0,description:"The (scaled) duration to apply to the element."},206:{name:"Delay",cppname:"SliceDelay",level:5,type:"u",default:0,description:"The (scaled) delay to apply to the element."},203:{name:"BlockAdditionID",cppname:"SliceBlockAddID",level:5,type:"u",default:0,description:"The ID of the BlockAdditional element (0 is the main Block)."},205:{name:"FrameNumber",cppname:"SliceFrameNumber",level:5,type:"u",default:0,description:"The number of the frame to generate from this lace with this delay (allow you to generate many frames from the same Block/Frame)."},204:{name:"LaceNumber",cppname:"SliceLaceNumber",level:5,type:"u",minver:1,default:0,divx:!1,description:"The reverse number of the frame in the lace (0 is the last frame, 1 is the next to last, etc). While there are a few files in the wild with this element, it is no longer in use and has been deprecated. Being able to interpret this element is not required for playback."},232:{name:"TimeSlice",level:4,type:"m",multiple:!0,minver:1,divx:!1,description:"Contains extra time information about the data contained in the Block. While there are a few files in the wild with this element, it is no longer in use and has been deprecated. Being able to interpret this element is not required for playback."},142:{name:"Slices",level:3,type:"m",minver:1,divx:!1,description:"Contains slices description."},30114:{name:"DiscardPadding",level:3,type:"i",minver:4,webm:!0,description:"Duration in nanoseconds of the silent data added to the Block (padding at the end of the Block for positive value, at the beginning of the Block for negative value). The duration of DiscardPadding is not calculated in the duration of the TrackEntry and should be discarded during playback."},164:{name:"CodecState",level:3,type:"b",minver:2,webm:!1,description:"The new codec state to use. Data interpretation is private to the codec. This information should always be referenced by a seek entry."},253:{name:"ReferenceVirtual",level:3,type:"i",webm:!1,description:"Relative position of the data that should be in position of the virtual block."},251:{name:"ReferenceBlock",level:3,type:"i",multiple:!0,minver:1,description:"Timestamp of another frame used as a reference (ie: B or P frame). The timestamp is relative to the block it's attached to."},250:{name:"ReferencePriority",cppname:"FlagReferenced",level:3,type:"u",mandatory:!0,minver:1,webm:!1,default:0,description:"This frame is referenced and has the specified cache priority. In cache only a frame of the same or higher priority can replace this frame. A value of 0 means the frame is not referenced."},155:{name:"BlockDuration",level:3,type:"u",minver:1,default:"TrackDuration",description:'The duration of the Block (based on TimecodeScale). This element is mandatory when DefaultDuration is set for the track (but can be omitted as other default values). When not written and with no DefaultDuration, the value is assumed to be the difference between the timestamp of this Block and the timestamp of the next Block in "display" order (not coding order). This element can be useful at the end of a Track (as there is not other Block available), or when there is a break in a track like for subtitle tracks. When set to 0 that means the frame is not a keyframe.'},165:{name:"BlockAdditional",level:5,type:"b",mandatory:!0,minver:1,webm:!1,description:"Interpreted by the codec as it wishes (using the BlockAddID)."},238:{name:"BlockAddID",level:5,type:"u",mandatory:!0,minver:1,webm:!1,default:1,range:"not 0",description:"An ID to identify the BlockAdditional level."},166:{name:"BlockMore",level:4,type:"m",mandatory:!0,multiple:!0,minver:1,webm:!1,description:"Contain the BlockAdditional and some parameters."},30113:{name:"BlockAdditions",level:3,type:"m",minver:1,webm:!1,description:"Contain additional blocks to complete the main one. An EBML parser that has no knowledge of the Block structure could still see and use/skip these data."},162:{name:"BlockVirtual",level:3,type:"b",webm:!1,description:"A Block with no data. It must be stored in the stream at the place the real Block should be in display order. (see Block Virtual)"},161:{name:"Block",level:3,type:"b",mandatory:!0,minver:1,description:"Block containing the actual data to be rendered and a timestamp relative to the Cluster Timecode. (see Block Structure)"},160:{name:"BlockGroup",level:2,type:"m",multiple:!0,minver:1,description:"Basic container of information containing a single Block or BlockVirtual, and information specific to that Block/VirtualBlock."},163:{name:"SimpleBlock",level:2,type:"b",multiple:!0,minver:2,webm:!0,divx:!0,description:"Similar to SimpleBlock Structure"},171:{name:"PrevSize",cppname:"ClusterPrevSize",level:2,type:"u",minver:1,description:"Size of the previous Cluster, in octets. Can be useful for backward playing.",position:"prevCluster"},167:{name:"Position",cppname:"ClusterPosition",level:2,type:"u",minver:1,webm:!1,description:"The Position of the Cluster in the segment (0 in live broadcast streams). It might help to resynchronise offset on damaged streams.",position:"segment"},22743:{name:"SilentTrackNumber",cppname:"ClusterSilentTrackNumber",level:3,type:"u",multiple:!0,minver:1,webm:!1,description:"One of the track number that are not used from now on in the stream. It could change later if not specified as silent in a further Cluster."},231:{name:"Timecode",cppname:"ClusterTimecode",level:2,type:"u",mandatory:!0,minver:1,description:"Absolute timestamp of the cluster (based on TimecodeScale)."},524531317:{name:"Cluster",level:1,type:"m",multiple:!0,minver:1,description:"The lower level element containing the (monolithic) Block structure."},19840:{name:"MuxingApp",level:2,type:"8",mandatory:!0,minver:1,description:'Muxing application or library ("libmatroska-0.4.3").'},31657:{name:"Title",level:2,type:"8",minver:1,webm:!1,description:"General name of the segment."},2807730:{name:"TimecodeScaleDenominator",level:2,type:"u",mandatory:!0,minver:4,default:"1000000000",description:"Timestamp scale numerator, see TimecodeScale."},2807729:{name:"TimecodeScale",level:2,type:"u",mandatory:!0,minver:1,default:"1000000",description:"Timestamp scale in nanoseconds (1.000.000 means all timestamps in the segment are expressed in milliseconds)."},27045:{name:"ChapterTranslateID",level:3,type:"b",mandatory:!0,minver:1,webm:!1,description:"The binary value used to represent this segment in the chapter codec data. The format depends on the ChapProcessCodecID used."},27071:{name:"ChapterTranslateCodec",level:3,type:"u",mandatory:!0,minver:1,webm:!1,description:"The chapter codec using this ID (0: Matroska Script, 1: DVD-menu)."},27132:{name:"ChapterTranslateEditionUID",level:3,type:"u",multiple:!0,minver:1,webm:!1,description:"Specify an edition UID on which this correspondance applies. When not specified, it means for all editions found in the segment."},4096955:{name:"NextFilename",level:2,type:"8",minver:1,webm:!1,description:"An escaped filename corresponding to the next segment."},4110627:{name:"NextUID",level:2,type:"b",minver:1,webm:!1,bytesize:16,description:"A unique ID to identify the next chained segment (128 bits)."},3965867:{name:"PrevFilename",level:2,type:"8",minver:1,webm:!1,description:"An escaped filename corresponding to the previous segment."},3979555:{name:"PrevUID",level:2,type:"b",minver:1,webm:!1,bytesize:16,description:"A unique ID to identify the previous chained segment (128 bits)."},29604:{name:"SegmentUID",level:2,type:"b",minver:1,webm:!1,range:"not 0",bytesize:16,description:"A randomly generated unique ID to identify the current segment between many others (128 bits)."},357149030:{name:"Info",level:1,type:"m",mandatory:!0,multiple:!0,minver:1,description:"Contains miscellaneous general information and statistics on the file."},21420:{name:"SeekPosition",level:3,type:"u",mandatory:!0,minver:1,description:"The position of the element in the segment in octets (0 = first level 1 element).",position:"segment"},21419:{name:"SeekID",level:3,type:"b",mandatory:!0,minver:1,description:"The binary ID corresponding to the element name.",type2:"ebmlID"},19899:{name:"Seek",cppname:"SeekPoint",level:2,type:"m",mandatory:!0,multiple:!0,minver:1,description:"Contains a single seek entry to an EBML element."},290298740:{name:"SeekHead",cppname:"SeekHeader",level:1,type:"m",multiple:!0,minver:1,description:"Contains the position of other level 1 elements."},32379:{name:"SignatureElementList",level:2,type:"m",multiple:!0,webm:!1,i:"Cluster|Block|BlockAdditional",description:"A list consists of a number of consecutive elements that represent one case where data is used in signature. Ex: means that the BlockAdditional of all Blocks in all Clusters is used for encryption."},32347:{name:"SignatureElements",level:1,type:"m",webm:!1,description:"Contains elements that will be used to compute the signature."},32437:{name:"Signature",level:1,type:"b",webm:!1,description:"The signature of the data (until a new."},32421:{name:"SignaturePublicKey",level:1,type:"b",webm:!1,description:"The public key to use with the algorithm (in the case of a PKI-based signature)."},32410:{name:"SignatureHash",level:1,type:"u",webm:!1,description:"Hash algorithm used (1=SHA1-160, 2=MD5)."},32394:{name:"SignatureAlgo",level:1,type:"u",webm:!1,description:"Signature algorithm used (1=RSA, 2=elliptic)."},458458727:{name:"SignatureSlot",level:-1,type:"m",multiple:!0,webm:!1,description:"Contain signature of some (coming) elements in the stream."},191:{name:"CRC-32",level:-1,type:"b",minver:1,webm:!1,description:"The CRC is computed on all the data of the Master element it's in. The CRC element should be the first in it's parent master for easier reading. All level 1 elements should include a CRC-32. The CRC in use is the IEEE CRC32 Little Endian",crc:!0},236:{name:"Void",level:-1,type:"b",minver:1,description:"Used to void damaged data, to avoid unexpected behaviors when using damaged data. The content is discarded. Also used to reserve space in a sub-element for later use."},17139:{name:"EBMLMaxSizeLength",level:1,type:"u",mandatory:!0,default:8,minver:1,description:"The maximum length of the sizes you'll find in this file (8 or less in Matroska). This does not override the element size indicated at the beginning of an element. Elements that have an indicated size which is larger than what is allowed by EBMLMaxSizeLength shall be considered invalid."},17138:{name:"EBMLMaxIDLength",level:1,type:"u",mandatory:!0,default:4,minver:1,description:"The maximum length of the IDs you'll find in this file (4 or less in Matroska)."},17143:{name:"EBMLReadVersion",level:1,type:"u",mandatory:!0,default:1,minver:1,description:"The minimum EBML version a parser has to support to read this file."},440786851:{name:"EBML",level:"0",type:"m",mandatory:!0,multiple:!0,minver:1,description:"Set the EBML characteristics of the data to follow. Each EBML document has to start with this."},21936:{name:"Colour",level:"4",type:"m",mandatory:!0,multiple:!0,description:"Settings describing the colour format."},21937:{name:"MatrixCoefficients",level:"5",type:"u",mandatory:!0,multiple:!0,description:"The Matrix Coefficients of the video used to derive luma and chroma values from red, green, and blue color primaries. For clarity, the value and meanings for MatrixCoefficients are adopted from Table 4 of ISO/IEC 23001-8:2016 or ITU-T H.273."},21945:{name:"Range",level:"5",type:"u",mandatory:!0,multiple:!0,description:"Clipping of the color ranges."},21946:{name:"TransferCharacteristics",level:"5",type:"u",mandatory:!0,multiple:!0,description:"The transfer characteristics of the video."},21947:{name:"Primaries",level:"5",type:"u",mandatory:!0,multiple:!0,description:"The colour primaries of the video. For clarity, the value and meanings for Primaries are adopted from Table 2 of ISO/IEC 23091-4 or ITU-T H.273."}}),ebmlID}var hasRequiredEBMLEncoder;function requireEBMLEncoder(){if(hasRequiredEBMLEncoder)return EBMLEncoder;hasRequiredEBMLEncoder=1,Object.defineProperty(EBMLEncoder,"__esModule",{value:!0});var O=requireTools(),N=requireTools(),I=requireEbmlID(),D=function(){function f(){this._schema=I.byEbmlID,this._buffers=[],this._stack=[]}return f.prototype.encode=function(k){var i=this;return O.concat(k.reduce(function(c,$){return c.concat(i.encodeChunk($))},[])).buffer},f.prototype.encodeChunk=function(k){return k.type==="m"?k.isEnd?this.endTag(k):this.startTag(k):(k.data=N.Buffer.from(k.data),this.writeTag(k)),this.flush()},f.prototype.flush=function(){var k=this._buffers;return this._buffers=[],k},f.prototype.getSchemaInfo=function(k){for(var i=Object.keys(this._schema).map(Number),c=0;c<i.length;c++){var $=i[c];if(this._schema[$].name===k)return new N.Buffer($.toString(16),"hex")}return null},f.prototype.writeTag=function(k){var i=k.name,c=this.getSchemaInfo(i),$=k.data;if(c==null)throw new Error("No schema entry found for "+i);var C=O.encodeTag(c,$);if(this._stack.length>0){var M=this._stack[this._stack.length-1];M.children.push({tagId:c,elm:k,children:[],data:C});return}this._buffers=this._buffers.concat(C)},f.prototype.startTag=function(k){var i=k.name,c=this.getSchemaInfo(i);if(c==null)throw new Error("No schema entry found for "+i);if(k.unknownSize){var $=O.encodeTag(c,new N.Buffer(0),k.unknownSize);this._buffers=this._buffers.concat($);return}var C={tagId:c,elm:k,children:[],data:null};this._stack.length>0&&this._stack[this._stack.length-1].children.push(C),this._stack.push(C)},f.prototype.endTag=function(k){k.name;var i=this._stack.pop();if(i==null)throw new Error("EBML structure is broken");if(i.elm.name!==k.name)throw new Error("EBML structure is broken");var c=i.children.reduce(function(C,M){if(M.data===null)throw new Error("EBML structure is broken");return C.concat(M.data)},[]),$=O.concat(c);i.elm.type==="m"?i.data=O.encodeTag(i.tagId,$,i.elm.unknownSize):i.data=O.encodeTag(i.tagId,$),this._stack.length<1&&(this._buffers=this._buffers.concat(i.data))},f}();return EBMLEncoder.default=D,EBMLEncoder}var buffer={},base64Js={},hasRequiredBase64Js;function requireBase64Js(){if(hasRequiredBase64Js)return base64Js;hasRequiredBase64Js=1,base64Js.byteLength=c,base64Js.toByteArray=C,base64Js.fromByteArray=J;for(var O=[],N=[],I=typeof Uint8Array<"u"?Uint8Array:Array,D="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,k=D.length;f<k;++f)O[f]=D[f],N[D.charCodeAt(f)]=f;N[45]=62,N[95]=63;function i(z){var Q=z.length;if(Q%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var ee=z.indexOf("=");ee===-1&&(ee=Q);var Y=ee===Q?0:4-ee%4;return[ee,Y]}function c(z){var Q=i(z),ee=Q[0],Y=Q[1];return(ee+Y)*3/4-Y}function $(z,Q,ee){return(Q+ee)*3/4-ee}function C(z){var Q,ee=i(z),Y=ee[0],te=ee[1],ie=new I($(z,Y,te)),ye=0,re=te>0?Y-4:Y,de;for(de=0;de<re;de+=4)Q=N[z.charCodeAt(de)]<<18|N[z.charCodeAt(de+1)]<<12|N[z.charCodeAt(de+2)]<<6|N[z.charCodeAt(de+3)],ie[ye++]=Q>>16&255,ie[ye++]=Q>>8&255,ie[ye++]=Q&255;return te===2&&(Q=N[z.charCodeAt(de)]<<2|N[z.charCodeAt(de+1)]>>4,ie[ye++]=Q&255),te===1&&(Q=N[z.charCodeAt(de)]<<10|N[z.charCodeAt(de+1)]<<4|N[z.charCodeAt(de+2)]>>2,ie[ye++]=Q>>8&255,ie[ye++]=Q&255),ie}function M(z){return O[z>>18&63]+O[z>>12&63]+O[z>>6&63]+O[z&63]}function Z(z,Q,ee){for(var Y,te=[],ie=Q;ie<ee;ie+=3)Y=(z[ie]<<16&16711680)+(z[ie+1]<<8&65280)+(z[ie+2]&255),te.push(M(Y));return te.join("")}function J(z){for(var Q,ee=z.length,Y=ee%3,te=[],ie=16383,ye=0,re=ee-Y;ye<re;ye+=ie)te.push(Z(z,ye,ye+ie>re?re:ye+ie));return Y===1?(Q=z[ee-1],te.push(O[Q>>2]+O[Q<<4&63]+"==")):Y===2&&(Q=(z[ee-2]<<8)+z[ee-1],te.push(O[Q>>10]+O[Q>>4&63]+O[Q<<2&63]+"=")),te.join("")}return base64Js}var ieee754={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var hasRequiredIeee754;function requireIeee754(){return hasRequiredIeee754||(hasRequiredIeee754=1,ieee754.read=function(O,N,I,D,f){var k,i,c=f*8-D-1,$=(1<<c)-1,C=$>>1,M=-7,Z=I?f-1:0,J=I?-1:1,z=O[N+Z];for(Z+=J,k=z&(1<<-M)-1,z>>=-M,M+=c;M>0;k=k*256+O[N+Z],Z+=J,M-=8);for(i=k&(1<<-M)-1,k>>=-M,M+=D;M>0;i=i*256+O[N+Z],Z+=J,M-=8);if(k===0)k=1-C;else{if(k===$)return i?NaN:(z?-1:1)*(1/0);i=i+Math.pow(2,D),k=k-C}return(z?-1:1)*i*Math.pow(2,k-D)},ieee754.write=function(O,N,I,D,f,k){var i,c,$,C=k*8-f-1,M=(1<<C)-1,Z=M>>1,J=f===23?Math.pow(2,-24)-Math.pow(2,-77):0,z=D?0:k-1,Q=D?1:-1,ee=N<0||N===0&&1/N<0?1:0;for(N=Math.abs(N),isNaN(N)||N===1/0?(c=isNaN(N)?1:0,i=M):(i=Math.floor(Math.log(N)/Math.LN2),N*($=Math.pow(2,-i))<1&&(i--,$*=2),i+Z>=1?N+=J/$:N+=J*Math.pow(2,1-Z),N*$>=2&&(i++,$/=2),i+Z>=M?(c=0,i=M):i+Z>=1?(c=(N*$-1)*Math.pow(2,f),i=i+Z):(c=N*Math.pow(2,Z-1)*Math.pow(2,f),i=0));f>=8;O[I+z]=c&255,z+=Q,c/=256,f-=8);for(i=i<<f|c,C+=f;C>0;O[I+z]=i&255,z+=Q,i/=256,C-=8);O[I+z-Q]|=ee*128}),ieee754}/*!
9
9
  * The buffer module from node.js, for the browser.
10
10
  *
11
11
  * @author Feross Aboukhadijeh <https://feross.org>
12
12
  * @license MIT
13
- */var hasRequiredBuffer;function requireBuffer(){return hasRequiredBuffer||(hasRequiredBuffer=1,function($){const z=requireBase64Js(),D=requireIeee754(),j=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;$.Buffer=k,$.SlowBuffer=ce,$.INSPECT_MAX_BYTES=50;const O=2147483647;$.kMaxLength=O,k.TYPED_ARRAY_SUPPORT=I(),!k.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function I(){try{const re=new Uint8Array(1),Z={foo:function(){return 42}};return Object.setPrototypeOf(Z,Uint8Array.prototype),Object.setPrototypeOf(re,Z),re.foo()===42}catch{return!1}}Object.defineProperty(k.prototype,"parent",{enumerable:!0,get:function(){if(k.isBuffer(this))return this.buffer}}),Object.defineProperty(k.prototype,"offset",{enumerable:!0,get:function(){if(k.isBuffer(this))return this.byteOffset}});function o(re){if(re>O)throw new RangeError('The value "'+re+'" is invalid for option "size"');const Z=new Uint8Array(re);return Object.setPrototypeOf(Z,k.prototype),Z}function k(re,Z,K){if(typeof re=="number"){if(typeof Z=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return X(re)}return N(re,Z,K)}k.poolSize=8192;function N(re,Z,K){if(typeof re=="string")return Y(re,Z);if(ArrayBuffer.isView(re))return te(re);if(re==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof re);if(jt(re,ArrayBuffer)||re&&jt(re.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(jt(re,SharedArrayBuffer)||re&&jt(re.buffer,SharedArrayBuffer)))return ie(re,Z,K);if(typeof re=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const ue=re.valueOf&&re.valueOf();if(ue!=null&&ue!==re)return k.from(ue,Z,K);const ge=ne(re);if(ge)return ge;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof re[Symbol.toPrimitive]=="function")return k.from(re[Symbol.toPrimitive]("string"),Z,K);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof re)}k.from=function(re,Z,K){return N(re,Z,K)},Object.setPrototypeOf(k.prototype,Uint8Array.prototype),Object.setPrototypeOf(k,Uint8Array);function F(re){if(typeof re!="number")throw new TypeError('"size" argument must be of type number');if(re<0)throw new RangeError('The value "'+re+'" is invalid for option "size"')}function J(re,Z,K){return F(re),re<=0?o(re):Z!==void 0?typeof K=="string"?o(re).fill(Z,K):o(re).fill(Z):o(re)}k.alloc=function(re,Z,K){return J(re,Z,K)};function X(re){return F(re),o(re<0?0:oe(re)|0)}k.allocUnsafe=function(re){return X(re)},k.allocUnsafeSlow=function(re){return X(re)};function Y(re,Z){if((typeof Z!="string"||Z==="")&&(Z="utf8"),!k.isEncoding(Z))throw new TypeError("Unknown encoding: "+Z);const K=we(re,Z)|0;let ue=o(K);const ge=ue.write(re,Z);return ge!==K&&(ue=ue.slice(0,ge)),ue}function Q(re){const Z=re.length<0?0:oe(re.length)|0,K=o(Z);for(let ue=0;ue<Z;ue+=1)K[ue]=re[ue]&255;return K}function te(re){if(jt(re,Uint8Array)){const Z=new Uint8Array(re);return ie(Z.buffer,Z.byteOffset,Z.byteLength)}return Q(re)}function ie(re,Z,K){if(Z<0||re.byteLength<Z)throw new RangeError('"offset" is outside of buffer bounds');if(re.byteLength<Z+(K||0))throw new RangeError('"length" is outside of buffer bounds');let ue;return Z===void 0&&K===void 0?ue=new Uint8Array(re):K===void 0?ue=new Uint8Array(re,Z):ue=new Uint8Array(re,Z,K),Object.setPrototypeOf(ue,k.prototype),ue}function ne(re){if(k.isBuffer(re)){const Z=oe(re.length)|0,K=o(Z);return K.length===0||re.copy(K,0,0,Z),K}if(re.length!==void 0)return typeof re.length!="number"||Vt(re.length)?o(0):Q(re);if(re.type==="Buffer"&&Array.isArray(re.data))return Q(re.data)}function oe(re){if(re>=O)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+O.toString(16)+" bytes");return re|0}function ce(re){return+re!=re&&(re=0),k.alloc(+re)}k.isBuffer=function(Z){return Z!=null&&Z._isBuffer===!0&&Z!==k.prototype},k.compare=function(Z,K){if(jt(Z,Uint8Array)&&(Z=k.from(Z,Z.offset,Z.byteLength)),jt(K,Uint8Array)&&(K=k.from(K,K.offset,K.byteLength)),!k.isBuffer(Z)||!k.isBuffer(K))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Z===K)return 0;let ue=Z.length,ge=K.length;for(let Ae=0,Me=Math.min(ue,ge);Ae<Me;++Ae)if(Z[Ae]!==K[Ae]){ue=Z[Ae],ge=K[Ae];break}return ue<ge?-1:ge<ue?1:0},k.isEncoding=function(Z){switch(String(Z).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},k.concat=function(Z,K){if(!Array.isArray(Z))throw new TypeError('"list" argument must be an Array of Buffers');if(Z.length===0)return k.alloc(0);let ue;if(K===void 0)for(K=0,ue=0;ue<Z.length;++ue)K+=Z[ue].length;const ge=k.allocUnsafe(K);let Ae=0;for(ue=0;ue<Z.length;++ue){let Me=Z[ue];if(jt(Me,Uint8Array))Ae+Me.length>ge.length?(k.isBuffer(Me)||(Me=k.from(Me)),Me.copy(ge,Ae)):Uint8Array.prototype.set.call(ge,Me,Ae);else if(k.isBuffer(Me))Me.copy(ge,Ae);else throw new TypeError('"list" argument must be an Array of Buffers');Ae+=Me.length}return ge};function we(re,Z){if(k.isBuffer(re))return re.length;if(ArrayBuffer.isView(re)||jt(re,ArrayBuffer))return re.byteLength;if(typeof re!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof re);const K=re.length,ue=arguments.length>2&&arguments[2]===!0;if(!ue&&K===0)return 0;let ge=!1;for(;;)switch(Z){case"ascii":case"latin1":case"binary":return K;case"utf8":case"utf-8":return Jt(re).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return K*2;case"hex":return K>>>1;case"base64":return Yt(re).length;default:if(ge)return ue?-1:Jt(re).length;Z=(""+Z).toLowerCase(),ge=!0}}k.byteLength=we;function se(re,Z,K){let ue=!1;if((Z===void 0||Z<0)&&(Z=0),Z>this.length||((K===void 0||K>this.length)&&(K=this.length),K<=0)||(K>>>=0,Z>>>=0,K<=Z))return"";for(re||(re="utf8");;)switch(re){case"hex":return Lt(this,Z,K);case"utf8":case"utf-8":return Fe(this,Z,K);case"ascii":return St(this,Z,K);case"latin1":case"binary":return It(this,Z,K);case"base64":return je(this,Z,K);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Nt(this,Z,K);default:if(ue)throw new TypeError("Unknown encoding: "+re);re=(re+"").toLowerCase(),ue=!0}}k.prototype._isBuffer=!0;function ye(re,Z,K){const ue=re[Z];re[Z]=re[K],re[K]=ue}k.prototype.swap16=function(){const Z=this.length;if(Z%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let K=0;K<Z;K+=2)ye(this,K,K+1);return this},k.prototype.swap32=function(){const Z=this.length;if(Z%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let K=0;K<Z;K+=4)ye(this,K,K+3),ye(this,K+1,K+2);return this},k.prototype.swap64=function(){const Z=this.length;if(Z%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let K=0;K<Z;K+=8)ye(this,K,K+7),ye(this,K+1,K+6),ye(this,K+2,K+5),ye(this,K+3,K+4);return this},k.prototype.toString=function(){const Z=this.length;return Z===0?"":arguments.length===0?Fe(this,0,Z):se.apply(this,arguments)},k.prototype.toLocaleString=k.prototype.toString,k.prototype.equals=function(Z){if(!k.isBuffer(Z))throw new TypeError("Argument must be a Buffer");return this===Z?!0:k.compare(this,Z)===0},k.prototype.inspect=function(){let Z="";const K=$.INSPECT_MAX_BYTES;return Z=this.toString("hex",0,K).replace(/(.{2})/g,"$1 ").trim(),this.length>K&&(Z+=" ... "),"<Buffer "+Z+">"},j&&(k.prototype[j]=k.prototype.inspect),k.prototype.compare=function(Z,K,ue,ge,Ae){if(jt(Z,Uint8Array)&&(Z=k.from(Z,Z.offset,Z.byteLength)),!k.isBuffer(Z))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Z);if(K===void 0&&(K=0),ue===void 0&&(ue=Z?Z.length:0),ge===void 0&&(ge=0),Ae===void 0&&(Ae=this.length),K<0||ue>Z.length||ge<0||Ae>this.length)throw new RangeError("out of range index");if(ge>=Ae&&K>=ue)return 0;if(ge>=Ae)return-1;if(K>=ue)return 1;if(K>>>=0,ue>>>=0,ge>>>=0,Ae>>>=0,this===Z)return 0;let Me=Ae-ge,ot=ue-K;const _t=Math.min(Me,ot),ut=this.slice(ge,Ae),Tt=Z.slice(K,ue);for(let wt=0;wt<_t;++wt)if(ut[wt]!==Tt[wt]){Me=ut[wt],ot=Tt[wt];break}return Me<ot?-1:ot<Me?1:0};function fe(re,Z,K,ue,ge){if(re.length===0)return-1;if(typeof K=="string"?(ue=K,K=0):K>2147483647?K=2147483647:K<-2147483648&&(K=-2147483648),K=+K,Vt(K)&&(K=ge?0:re.length-1),K<0&&(K=re.length+K),K>=re.length){if(ge)return-1;K=re.length-1}else if(K<0)if(ge)K=0;else return-1;if(typeof Z=="string"&&(Z=k.from(Z,ue)),k.isBuffer(Z))return Z.length===0?-1:pe(re,Z,K,ue,ge);if(typeof Z=="number")return Z=Z&255,typeof Uint8Array.prototype.indexOf=="function"?ge?Uint8Array.prototype.indexOf.call(re,Z,K):Uint8Array.prototype.lastIndexOf.call(re,Z,K):pe(re,[Z],K,ue,ge);throw new TypeError("val must be string, number or Buffer")}function pe(re,Z,K,ue,ge){let Ae=1,Me=re.length,ot=Z.length;if(ue!==void 0&&(ue=String(ue).toLowerCase(),ue==="ucs2"||ue==="ucs-2"||ue==="utf16le"||ue==="utf-16le")){if(re.length<2||Z.length<2)return-1;Ae=2,Me/=2,ot/=2,K/=2}function _t(Tt,wt){return Ae===1?Tt[wt]:Tt.readUInt16BE(wt*Ae)}let ut;if(ge){let Tt=-1;for(ut=K;ut<Me;ut++)if(_t(re,ut)===_t(Z,Tt===-1?0:ut-Tt)){if(Tt===-1&&(Tt=ut),ut-Tt+1===ot)return Tt*Ae}else Tt!==-1&&(ut-=ut-Tt),Tt=-1}else for(K+ot>Me&&(K=Me-ot),ut=K;ut>=0;ut--){let Tt=!0;for(let wt=0;wt<ot;wt++)if(_t(re,ut+wt)!==_t(Z,wt)){Tt=!1;break}if(Tt)return ut}return-1}k.prototype.includes=function(Z,K,ue){return this.indexOf(Z,K,ue)!==-1},k.prototype.indexOf=function(Z,K,ue){return fe(this,Z,K,ue,!0)},k.prototype.lastIndexOf=function(Z,K,ue){return fe(this,Z,K,ue,!1)};function ve(re,Z,K,ue){K=Number(K)||0;const ge=re.length-K;ue?(ue=Number(ue),ue>ge&&(ue=ge)):ue=ge;const Ae=Z.length;ue>Ae/2&&(ue=Ae/2);let Me;for(Me=0;Me<ue;++Me){const ot=parseInt(Z.substr(Me*2,2),16);if(Vt(ot))return Me;re[K+Me]=ot}return Me}function Te(re,Z,K,ue){return Xt(Jt(Z,re.length-K),re,K,ue)}function me(re,Z,K,ue){return Xt(Wt(Z),re,K,ue)}function _e(re,Z,K,ue){return Xt(Yt(Z),re,K,ue)}function De(re,Z,K,ue){return Xt(cn(Z,re.length-K),re,K,ue)}k.prototype.write=function(Z,K,ue,ge){if(K===void 0)ge="utf8",ue=this.length,K=0;else if(ue===void 0&&typeof K=="string")ge=K,ue=this.length,K=0;else if(isFinite(K))K=K>>>0,isFinite(ue)?(ue=ue>>>0,ge===void 0&&(ge="utf8")):(ge=ue,ue=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Ae=this.length-K;if((ue===void 0||ue>Ae)&&(ue=Ae),Z.length>0&&(ue<0||K<0)||K>this.length)throw new RangeError("Attempt to write outside buffer bounds");ge||(ge="utf8");let Me=!1;for(;;)switch(ge){case"hex":return ve(this,Z,K,ue);case"utf8":case"utf-8":return Te(this,Z,K,ue);case"ascii":case"latin1":case"binary":return me(this,Z,K,ue);case"base64":return _e(this,Z,K,ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return De(this,Z,K,ue);default:if(Me)throw new TypeError("Unknown encoding: "+ge);ge=(""+ge).toLowerCase(),Me=!0}},k.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function je(re,Z,K){return Z===0&&K===re.length?z.fromByteArray(re):z.fromByteArray(re.slice(Z,K))}function Fe(re,Z,K){K=Math.min(re.length,K);const ue=[];let ge=Z;for(;ge<K;){const Ae=re[ge];let Me=null,ot=Ae>239?4:Ae>223?3:Ae>191?2:1;if(ge+ot<=K){let _t,ut,Tt,wt;switch(ot){case 1:Ae<128&&(Me=Ae);break;case 2:_t=re[ge+1],(_t&192)===128&&(wt=(Ae&31)<<6|_t&63,wt>127&&(Me=wt));break;case 3:_t=re[ge+1],ut=re[ge+2],(_t&192)===128&&(ut&192)===128&&(wt=(Ae&15)<<12|(_t&63)<<6|ut&63,wt>2047&&(wt<55296||wt>57343)&&(Me=wt));break;case 4:_t=re[ge+1],ut=re[ge+2],Tt=re[ge+3],(_t&192)===128&&(ut&192)===128&&(Tt&192)===128&&(wt=(Ae&15)<<18|(_t&63)<<12|(ut&63)<<6|Tt&63,wt>65535&&wt<1114112&&(Me=wt))}}Me===null?(Me=65533,ot=1):Me>65535&&(Me-=65536,ue.push(Me>>>10&1023|55296),Me=56320|Me&1023),ue.push(Me),ge+=ot}return gt(ue)}const qe=4096;function gt(re){const Z=re.length;if(Z<=qe)return String.fromCharCode.apply(String,re);let K="",ue=0;for(;ue<Z;)K+=String.fromCharCode.apply(String,re.slice(ue,ue+=qe));return K}function St(re,Z,K){let ue="";K=Math.min(re.length,K);for(let ge=Z;ge<K;++ge)ue+=String.fromCharCode(re[ge]&127);return ue}function It(re,Z,K){let ue="";K=Math.min(re.length,K);for(let ge=Z;ge<K;++ge)ue+=String.fromCharCode(re[ge]);return ue}function Lt(re,Z,K){const ue=re.length;(!Z||Z<0)&&(Z=0),(!K||K<0||K>ue)&&(K=ue);let ge="";for(let Ae=Z;Ae<K;++Ae)ge+=yn[re[Ae]];return ge}function Nt(re,Z,K){const ue=re.slice(Z,K);let ge="";for(let Ae=0;Ae<ue.length-1;Ae+=2)ge+=String.fromCharCode(ue[Ae]+ue[Ae+1]*256);return ge}k.prototype.slice=function(Z,K){const ue=this.length;Z=~~Z,K=K===void 0?ue:~~K,Z<0?(Z+=ue,Z<0&&(Z=0)):Z>ue&&(Z=ue),K<0?(K+=ue,K<0&&(K=0)):K>ue&&(K=ue),K<Z&&(K=Z);const ge=this.subarray(Z,K);return Object.setPrototypeOf(ge,k.prototype),ge};function yt(re,Z,K){if(re%1!==0||re<0)throw new RangeError("offset is not uint");if(re+Z>K)throw new RangeError("Trying to access beyond buffer length")}k.prototype.readUintLE=k.prototype.readUIntLE=function(Z,K,ue){Z=Z>>>0,K=K>>>0,ue||yt(Z,K,this.length);let ge=this[Z],Ae=1,Me=0;for(;++Me<K&&(Ae*=256);)ge+=this[Z+Me]*Ae;return ge},k.prototype.readUintBE=k.prototype.readUIntBE=function(Z,K,ue){Z=Z>>>0,K=K>>>0,ue||yt(Z,K,this.length);let ge=this[Z+--K],Ae=1;for(;K>0&&(Ae*=256);)ge+=this[Z+--K]*Ae;return ge},k.prototype.readUint8=k.prototype.readUInt8=function(Z,K){return Z=Z>>>0,K||yt(Z,1,this.length),this[Z]},k.prototype.readUint16LE=k.prototype.readUInt16LE=function(Z,K){return Z=Z>>>0,K||yt(Z,2,this.length),this[Z]|this[Z+1]<<8},k.prototype.readUint16BE=k.prototype.readUInt16BE=function(Z,K){return Z=Z>>>0,K||yt(Z,2,this.length),this[Z]<<8|this[Z+1]},k.prototype.readUint32LE=k.prototype.readUInt32LE=function(Z,K){return Z=Z>>>0,K||yt(Z,4,this.length),(this[Z]|this[Z+1]<<8|this[Z+2]<<16)+this[Z+3]*16777216},k.prototype.readUint32BE=k.prototype.readUInt32BE=function(Z,K){return Z=Z>>>0,K||yt(Z,4,this.length),this[Z]*16777216+(this[Z+1]<<16|this[Z+2]<<8|this[Z+3])},k.prototype.readBigUInt64LE=en(function(Z){Z=Z>>>0,vt(Z,"offset");const K=this[Z],ue=this[Z+7];(K===void 0||ue===void 0)&&Rt(Z,this.length-8);const ge=K+this[++Z]*2**8+this[++Z]*2**16+this[++Z]*2**24,Ae=this[++Z]+this[++Z]*2**8+this[++Z]*2**16+ue*2**24;return BigInt(ge)+(BigInt(Ae)<<BigInt(32))}),k.prototype.readBigUInt64BE=en(function(Z){Z=Z>>>0,vt(Z,"offset");const K=this[Z],ue=this[Z+7];(K===void 0||ue===void 0)&&Rt(Z,this.length-8);const ge=K*2**24+this[++Z]*2**16+this[++Z]*2**8+this[++Z],Ae=this[++Z]*2**24+this[++Z]*2**16+this[++Z]*2**8+ue;return(BigInt(ge)<<BigInt(32))+BigInt(Ae)}),k.prototype.readIntLE=function(Z,K,ue){Z=Z>>>0,K=K>>>0,ue||yt(Z,K,this.length);let ge=this[Z],Ae=1,Me=0;for(;++Me<K&&(Ae*=256);)ge+=this[Z+Me]*Ae;return Ae*=128,ge>=Ae&&(ge-=Math.pow(2,8*K)),ge},k.prototype.readIntBE=function(Z,K,ue){Z=Z>>>0,K=K>>>0,ue||yt(Z,K,this.length);let ge=K,Ae=1,Me=this[Z+--ge];for(;ge>0&&(Ae*=256);)Me+=this[Z+--ge]*Ae;return Ae*=128,Me>=Ae&&(Me-=Math.pow(2,8*K)),Me},k.prototype.readInt8=function(Z,K){return Z=Z>>>0,K||yt(Z,1,this.length),this[Z]&128?(255-this[Z]+1)*-1:this[Z]},k.prototype.readInt16LE=function(Z,K){Z=Z>>>0,K||yt(Z,2,this.length);const ue=this[Z]|this[Z+1]<<8;return ue&32768?ue|4294901760:ue},k.prototype.readInt16BE=function(Z,K){Z=Z>>>0,K||yt(Z,2,this.length);const ue=this[Z+1]|this[Z]<<8;return ue&32768?ue|4294901760:ue},k.prototype.readInt32LE=function(Z,K){return Z=Z>>>0,K||yt(Z,4,this.length),this[Z]|this[Z+1]<<8|this[Z+2]<<16|this[Z+3]<<24},k.prototype.readInt32BE=function(Z,K){return Z=Z>>>0,K||yt(Z,4,this.length),this[Z]<<24|this[Z+1]<<16|this[Z+2]<<8|this[Z+3]},k.prototype.readBigInt64LE=en(function(Z){Z=Z>>>0,vt(Z,"offset");const K=this[Z],ue=this[Z+7];(K===void 0||ue===void 0)&&Rt(Z,this.length-8);const ge=this[Z+4]+this[Z+5]*2**8+this[Z+6]*2**16+(ue<<24);return(BigInt(ge)<<BigInt(32))+BigInt(K+this[++Z]*2**8+this[++Z]*2**16+this[++Z]*2**24)}),k.prototype.readBigInt64BE=en(function(Z){Z=Z>>>0,vt(Z,"offset");const K=this[Z],ue=this[Z+7];(K===void 0||ue===void 0)&&Rt(Z,this.length-8);const ge=(K<<24)+this[++Z]*2**16+this[++Z]*2**8+this[++Z];return(BigInt(ge)<<BigInt(32))+BigInt(this[++Z]*2**24+this[++Z]*2**16+this[++Z]*2**8+ue)}),k.prototype.readFloatLE=function(Z,K){return Z=Z>>>0,K||yt(Z,4,this.length),D.read(this,Z,!0,23,4)},k.prototype.readFloatBE=function(Z,K){return Z=Z>>>0,K||yt(Z,4,this.length),D.read(this,Z,!1,23,4)},k.prototype.readDoubleLE=function(Z,K){return Z=Z>>>0,K||yt(Z,8,this.length),D.read(this,Z,!0,52,8)},k.prototype.readDoubleBE=function(Z,K){return Z=Z>>>0,K||yt(Z,8,this.length),D.read(this,Z,!1,52,8)};function tt(re,Z,K,ue,ge,Ae){if(!k.isBuffer(re))throw new TypeError('"buffer" argument must be a Buffer instance');if(Z>ge||Z<Ae)throw new RangeError('"value" argument is out of bounds');if(K+ue>re.length)throw new RangeError("Index out of range")}k.prototype.writeUintLE=k.prototype.writeUIntLE=function(Z,K,ue,ge){if(Z=+Z,K=K>>>0,ue=ue>>>0,!ge){const ot=Math.pow(2,8*ue)-1;tt(this,Z,K,ue,ot,0)}let Ae=1,Me=0;for(this[K]=Z&255;++Me<ue&&(Ae*=256);)this[K+Me]=Z/Ae&255;return K+ue},k.prototype.writeUintBE=k.prototype.writeUIntBE=function(Z,K,ue,ge){if(Z=+Z,K=K>>>0,ue=ue>>>0,!ge){const ot=Math.pow(2,8*ue)-1;tt(this,Z,K,ue,ot,0)}let Ae=ue-1,Me=1;for(this[K+Ae]=Z&255;--Ae>=0&&(Me*=256);)this[K+Ae]=Z/Me&255;return K+ue},k.prototype.writeUint8=k.prototype.writeUInt8=function(Z,K,ue){return Z=+Z,K=K>>>0,ue||tt(this,Z,K,1,255,0),this[K]=Z&255,K+1},k.prototype.writeUint16LE=k.prototype.writeUInt16LE=function(Z,K,ue){return Z=+Z,K=K>>>0,ue||tt(this,Z,K,2,65535,0),this[K]=Z&255,this[K+1]=Z>>>8,K+2},k.prototype.writeUint16BE=k.prototype.writeUInt16BE=function(Z,K,ue){return Z=+Z,K=K>>>0,ue||tt(this,Z,K,2,65535,0),this[K]=Z>>>8,this[K+1]=Z&255,K+2},k.prototype.writeUint32LE=k.prototype.writeUInt32LE=function(Z,K,ue){return Z=+Z,K=K>>>0,ue||tt(this,Z,K,4,4294967295,0),this[K+3]=Z>>>24,this[K+2]=Z>>>16,this[K+1]=Z>>>8,this[K]=Z&255,K+4},k.prototype.writeUint32BE=k.prototype.writeUInt32BE=function(Z,K,ue){return Z=+Z,K=K>>>0,ue||tt(this,Z,K,4,4294967295,0),this[K]=Z>>>24,this[K+1]=Z>>>16,this[K+2]=Z>>>8,this[K+3]=Z&255,K+4};function zt(re,Z,K,ue,ge){it(Z,ue,ge,re,K,7);let Ae=Number(Z&BigInt(4294967295));re[K++]=Ae,Ae=Ae>>8,re[K++]=Ae,Ae=Ae>>8,re[K++]=Ae,Ae=Ae>>8,re[K++]=Ae;let Me=Number(Z>>BigInt(32)&BigInt(4294967295));return re[K++]=Me,Me=Me>>8,re[K++]=Me,Me=Me>>8,re[K++]=Me,Me=Me>>8,re[K++]=Me,K}function Ot(re,Z,K,ue,ge){it(Z,ue,ge,re,K,7);let Ae=Number(Z&BigInt(4294967295));re[K+7]=Ae,Ae=Ae>>8,re[K+6]=Ae,Ae=Ae>>8,re[K+5]=Ae,Ae=Ae>>8,re[K+4]=Ae;let Me=Number(Z>>BigInt(32)&BigInt(4294967295));return re[K+3]=Me,Me=Me>>8,re[K+2]=Me,Me=Me>>8,re[K+1]=Me,Me=Me>>8,re[K]=Me,K+8}k.prototype.writeBigUInt64LE=en(function(Z,K=0){return zt(this,Z,K,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeBigUInt64BE=en(function(Z,K=0){return Ot(this,Z,K,BigInt(0),BigInt("0xffffffffffffffff"))}),k.prototype.writeIntLE=function(Z,K,ue,ge){if(Z=+Z,K=K>>>0,!ge){const _t=Math.pow(2,8*ue-1);tt(this,Z,K,ue,_t-1,-_t)}let Ae=0,Me=1,ot=0;for(this[K]=Z&255;++Ae<ue&&(Me*=256);)Z<0&&ot===0&&this[K+Ae-1]!==0&&(ot=1),this[K+Ae]=(Z/Me>>0)-ot&255;return K+ue},k.prototype.writeIntBE=function(Z,K,ue,ge){if(Z=+Z,K=K>>>0,!ge){const _t=Math.pow(2,8*ue-1);tt(this,Z,K,ue,_t-1,-_t)}let Ae=ue-1,Me=1,ot=0;for(this[K+Ae]=Z&255;--Ae>=0&&(Me*=256);)Z<0&&ot===0&&this[K+Ae+1]!==0&&(ot=1),this[K+Ae]=(Z/Me>>0)-ot&255;return K+ue},k.prototype.writeInt8=function(Z,K,ue){return Z=+Z,K=K>>>0,ue||tt(this,Z,K,1,127,-128),Z<0&&(Z=255+Z+1),this[K]=Z&255,K+1},k.prototype.writeInt16LE=function(Z,K,ue){return Z=+Z,K=K>>>0,ue||tt(this,Z,K,2,32767,-32768),this[K]=Z&255,this[K+1]=Z>>>8,K+2},k.prototype.writeInt16BE=function(Z,K,ue){return Z=+Z,K=K>>>0,ue||tt(this,Z,K,2,32767,-32768),this[K]=Z>>>8,this[K+1]=Z&255,K+2},k.prototype.writeInt32LE=function(Z,K,ue){return Z=+Z,K=K>>>0,ue||tt(this,Z,K,4,2147483647,-2147483648),this[K]=Z&255,this[K+1]=Z>>>8,this[K+2]=Z>>>16,this[K+3]=Z>>>24,K+4},k.prototype.writeInt32BE=function(Z,K,ue){return Z=+Z,K=K>>>0,ue||tt(this,Z,K,4,2147483647,-2147483648),Z<0&&(Z=4294967295+Z+1),this[K]=Z>>>24,this[K+1]=Z>>>16,this[K+2]=Z>>>8,this[K+3]=Z&255,K+4},k.prototype.writeBigInt64LE=en(function(Z,K=0){return zt(this,Z,K,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),k.prototype.writeBigInt64BE=en(function(Z,K=0){return Ot(this,Z,K,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ne(re,Z,K,ue,ge,Ae){if(K+ue>re.length)throw new RangeError("Index out of range");if(K<0)throw new RangeError("Index out of range")}function nt(re,Z,K,ue,ge){return Z=+Z,K=K>>>0,ge||Ne(re,Z,K,4),D.write(re,Z,K,ue,23,4),K+4}k.prototype.writeFloatLE=function(Z,K,ue){return nt(this,Z,K,!0,ue)},k.prototype.writeFloatBE=function(Z,K,ue){return nt(this,Z,K,!1,ue)};function Ht(re,Z,K,ue,ge){return Z=+Z,K=K>>>0,ge||Ne(re,Z,K,8),D.write(re,Z,K,ue,52,8),K+8}k.prototype.writeDoubleLE=function(Z,K,ue){return Ht(this,Z,K,!0,ue)},k.prototype.writeDoubleBE=function(Z,K,ue){return Ht(this,Z,K,!1,ue)},k.prototype.copy=function(Z,K,ue,ge){if(!k.isBuffer(Z))throw new TypeError("argument should be a Buffer");if(ue||(ue=0),!ge&&ge!==0&&(ge=this.length),K>=Z.length&&(K=Z.length),K||(K=0),ge>0&&ge<ue&&(ge=ue),ge===ue||Z.length===0||this.length===0)return 0;if(K<0)throw new RangeError("targetStart out of bounds");if(ue<0||ue>=this.length)throw new RangeError("Index out of range");if(ge<0)throw new RangeError("sourceEnd out of bounds");ge>this.length&&(ge=this.length),Z.length-K<ge-ue&&(ge=Z.length-K+ue);const Ae=ge-ue;return this===Z&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(K,ue,ge):Uint8Array.prototype.set.call(Z,this.subarray(ue,ge),K),Ae},k.prototype.fill=function(Z,K,ue,ge){if(typeof Z=="string"){if(typeof K=="string"?(ge=K,K=0,ue=this.length):typeof ue=="string"&&(ge=ue,ue=this.length),ge!==void 0&&typeof ge!="string")throw new TypeError("encoding must be a string");if(typeof ge=="string"&&!k.isEncoding(ge))throw new TypeError("Unknown encoding: "+ge);if(Z.length===1){const Me=Z.charCodeAt(0);(ge==="utf8"&&Me<128||ge==="latin1")&&(Z=Me)}}else typeof Z=="number"?Z=Z&255:typeof Z=="boolean"&&(Z=Number(Z));if(K<0||this.length<K||this.length<ue)throw new RangeError("Out of range index");if(ue<=K)return this;K=K>>>0,ue=ue===void 0?this.length:ue>>>0,Z||(Z=0);let Ae;if(typeof Z=="number")for(Ae=K;Ae<ue;++Ae)this[Ae]=Z;else{const Me=k.isBuffer(Z)?Z:k.from(Z,ge),ot=Me.length;if(ot===0)throw new TypeError('The value "'+Z+'" is invalid for argument "value"');for(Ae=0;Ae<ue-K;++Ae)this[Ae+K]=Me[Ae%ot]}return this};const At={};function et(re,Z,K){At[re]=class extends K{constructor(){super(),Object.defineProperty(this,"message",{value:Z.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${re}]`,this.stack,delete this.name}get code(){return re}set code(ge){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:ge,writable:!0})}toString(){return`${this.name} [${re}]: ${this.message}`}}}et("ERR_BUFFER_OUT_OF_BOUNDS",function(re){return re?`${re} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),et("ERR_INVALID_ARG_TYPE",function(re,Z){return`The "${re}" argument must be of type number. Received type ${typeof Z}`},TypeError),et("ERR_OUT_OF_RANGE",function(re,Z,K){let ue=`The value of "${re}" is out of range.`,ge=K;return Number.isInteger(K)&&Math.abs(K)>2**32?ge=Qe(String(K)):typeof K=="bigint"&&(ge=String(K),(K>BigInt(2)**BigInt(32)||K<-(BigInt(2)**BigInt(32)))&&(ge=Qe(ge)),ge+="n"),ue+=` It must be ${Z}. Received ${ge}`,ue},RangeError);function Qe(re){let Z="",K=re.length;const ue=re[0]==="-"?1:0;for(;K>=ue+4;K-=3)Z=`_${re.slice(K-3,K)}${Z}`;return`${re.slice(0,K)}${Z}`}function rt(re,Z,K){vt(Z,"offset"),(re[Z]===void 0||re[Z+K]===void 0)&&Rt(Z,re.length-(K+1))}function it(re,Z,K,ue,ge,Ae){if(re>K||re<Z){const Me=typeof Z=="bigint"?"n":"";let ot;throw Z===0||Z===BigInt(0)?ot=`>= 0${Me} and < 2${Me} ** ${(Ae+1)*8}${Me}`:ot=`>= -(2${Me} ** ${(Ae+1)*8-1}${Me}) and < 2 ** ${(Ae+1)*8-1}${Me}`,new At.ERR_OUT_OF_RANGE("value",ot,re)}rt(ue,ge,Ae)}function vt(re,Z){if(typeof re!="number")throw new At.ERR_INVALID_ARG_TYPE(Z,"number",re)}function Rt(re,Z,K){throw Math.floor(re)!==re?(vt(re,K),new At.ERR_OUT_OF_RANGE("offset","an integer",re)):Z<0?new At.ERR_BUFFER_OUT_OF_BOUNDS:new At.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${Z}`,re)}const Mt=/[^+/0-9A-Za-z-_]/g;function qt(re){if(re=re.split("=")[0],re=re.trim().replace(Mt,""),re.length<2)return"";for(;re.length%4!==0;)re=re+"=";return re}function Jt(re,Z){Z=Z||1/0;let K;const ue=re.length;let ge=null;const Ae=[];for(let Me=0;Me<ue;++Me){if(K=re.charCodeAt(Me),K>55295&&K<57344){if(!ge){if(K>56319){(Z-=3)>-1&&Ae.push(239,191,189);continue}else if(Me+1===ue){(Z-=3)>-1&&Ae.push(239,191,189);continue}ge=K;continue}if(K<56320){(Z-=3)>-1&&Ae.push(239,191,189),ge=K;continue}K=(ge-55296<<10|K-56320)+65536}else ge&&(Z-=3)>-1&&Ae.push(239,191,189);if(ge=null,K<128){if((Z-=1)<0)break;Ae.push(K)}else if(K<2048){if((Z-=2)<0)break;Ae.push(K>>6|192,K&63|128)}else if(K<65536){if((Z-=3)<0)break;Ae.push(K>>12|224,K>>6&63|128,K&63|128)}else if(K<1114112){if((Z-=4)<0)break;Ae.push(K>>18|240,K>>12&63|128,K>>6&63|128,K&63|128)}else throw new Error("Invalid code point")}return Ae}function Wt(re){const Z=[];for(let K=0;K<re.length;++K)Z.push(re.charCodeAt(K)&255);return Z}function cn(re,Z){let K,ue,ge;const Ae=[];for(let Me=0;Me<re.length&&!((Z-=2)<0);++Me)K=re.charCodeAt(Me),ue=K>>8,ge=K%256,Ae.push(ge),Ae.push(ue);return Ae}function Yt(re){return z.toByteArray(qt(re))}function Xt(re,Z,K,ue){let ge;for(ge=0;ge<ue&&!(ge+K>=Z.length||ge>=re.length);++ge)Z[ge+K]=re[ge];return ge}function jt(re,Z){return re instanceof Z||re!=null&&re.constructor!=null&&re.constructor.name!=null&&re.constructor.name===Z.name}function Vt(re){return re!==re}const yn=function(){const re="0123456789abcdef",Z=new Array(256);for(let K=0;K<16;++K){const ue=K*16;for(let ge=0;ge<16;++ge)Z[ue+ge]=re[K]+re[ge]}return Z}();function en(re){return typeof BigInt>"u"?Zt:re}function Zt(){throw new Error("BigInt not supported")}}(buffer)),buffer}var toolsEbml={},hasRequiredToolsEbml;function requireToolsEbml(){if(hasRequiredToolsEbml)return toolsEbml;hasRequiredToolsEbml=1;var $=toolsEbml&&toolsEbml.__assign||function(){return $=Object.assign||function(O){for(var I,o=1,k=arguments.length;o<k;o++){I=arguments[o];for(var N in I)Object.prototype.hasOwnProperty.call(I,N)&&(O[N]=I[N])}return O},$.apply(this,arguments)},z=toolsEbml&&toolsEbml.__spreadArray||function(O,I,o){if(o||arguments.length===2)for(var k=0,N=I.length,F;k<N;k++)(F||!(k in I))&&(F||(F=Array.prototype.slice.call(I,0,k)),F[k]=I[k]);return O.concat(F||Array.prototype.slice.call(I))};Object.defineProperty(toolsEbml,"__esModule",{value:!0});var D=requireTools(),j=function(){function O(){}return O.readVint=function(I,o){o===void 0&&(o=0);var k=8-Math.floor(Math.log2(I[o]));if(k>8){var N=O.readHexString(I,o,o+k);throw new Error("Unrepresentable length: ".concat(k," ").concat(N))}if(o+k>I.length)return null;for(var F=I[o]&(1<<8-k)-1,J=1;J<k;J+=1){if(J===7&&F>=Math.pow(2,8)&&I[o+7]>0)return{length:k,value:-1};F*=Math.pow(2,8),F+=I[o+J]}return{length:k,value:F}},O.writeVint=function(I){if(I<0||I>Math.pow(2,53))throw new Error("Unrepresentable value: ".concat(I));var o=1;for(o=1;o<=8&&!(I<Math.pow(2,7*o)-1);o+=1);for(var k=D.Buffer.alloc(o),N=I,F=1;F<=o;F+=1){var J=N&255;k[o-F]=J,N-=J,N/=Math.pow(2,8)}return k[0]|=1<<8-o,k},O.concatenate=function(I,o){return!I&&!o?D.Buffer.from([]):!I||I.byteLength===0?o:!o||o.byteLength===0?I:D.Buffer.from(z(z([],I,!0),o,!0))},O.readHexString=function(I,o,k){return o===void 0&&(o=0),k===void 0&&(k=I.byteLength),Array.from(I.slice(o,k)).map(function(N){return Number(N).toString(16)}).reduce(function(N,F){return"".concat(N).concat(F.padStart(2,"0"))},"")},O.readUtf8=function(I){try{return D.Buffer.from(I).toString("utf8")}catch{return null}},O.readUnsigned=function(I){var o=new DataView(I.buffer,I.byteOffset,I.byteLength);switch(I.byteLength){case 1:return o.getUint8(0);case 2:return o.getUint16(0);case 4:return o.getUint32(0)}return I.byteLength<=6?I.reduce(function(k,N){return k*256+N},0):O.readHexString(I,0,I.byteLength)},O.readSigned=function(I){var o=new DataView(I.buffer,I.byteOffset,I.byteLength);switch(I.byteLength){case 1:return o.getInt8(0);case 2:return o.getInt16(0);case 4:return o.getInt32(0);default:return NaN}},O.readFloat=function(I){var o=new DataView(I.buffer,I.byteOffset,I.byteLength);switch(I.byteLength){case 4:return o.getFloat32(0);case 8:return o.getFloat64(0);default:return NaN}},O.readDate=function(I){var o=new DataView(I.buffer,I.byteOffset,I.byteLength);switch(I.byteLength){case 1:return new Date(o.getUint8(0));case 2:return new Date(o.getUint16(0));case 4:return new Date(o.getUint32(0));case 8:return new Date(Number.parseInt(O.readHexString(I),16));default:return new Date(0)}},O.readDataFromTag=function(I,o){var k=I.type,N=I.name,F=I.track,J=I.discardable||!1,X=I.keyframe||!1,Y=null,Q;switch(k){case"u":Q=O.readUnsigned(o);break;case"f":Q=O.readFloat(o);break;case"i":Q=O.readSigned(o);break;case"s":Q=String.fromCharCode.apply(String,o);break;case"8":Q=O.readUtf8(o);break;case"d":Q=O.readDate(o);break}if(N==="SimpleBlock"||N==="Block"){var te=0,ie=O.readVint(o,te),ne=ie.length,oe=ie.value;te+=ne,F=oe,Q=O.readSigned(o.subarray(te,te+2)),te+=2,N==="SimpleBlock"&&(X=!!(o[ne+2]&128),J=!!(o[ne+2]&1)),te+=1,Y=o.subarray(te)}return $($({},I),{data:o,discardable:J,keyframe:X,payload:Y,track:F,value:Q})},O}();return toolsEbml.default=j,toolsEbml}var vint,hasRequiredVint;function requireVint(){return hasRequiredVint||(hasRequiredVint=1,vint=function($,z,D){z=z||0;for(var j=1;j<=8&&!($[z]>=Math.pow(2,8-j));j++);if(j>8)throw new Error("Unrepresentable length: "+j+" "+$.toString("hex",z,z+j));if(z+j>$.length)return null;var O,I=$[z]&(1<<8-j)-1;for(O=1;O<j;O++){if(O===7&&I>=Math.pow(2,45)&&$[z+7]>0)return{length:j,value:-1};I*=Math.pow(2,8),I+=$[z+O]}return D&&(I-=Math.pow(2,j*7-1)-1),{length:j,value:I}}),vint}var bufferReader,hasRequiredBufferReader;function requireBufferReader(){if(hasRequiredBufferReader)return bufferReader;hasRequiredBufferReader=1;var $=requireVint();function z(D){this.buffer=D,this.offset=0}return z.prototype.nextInt16BE=function(){var D=this.buffer.readInt16BE(this.offset);return this.offset+=2,D},z.prototype.nextUInt8=function(){var D=this.buffer.readUInt8(this.offset);return this.offset+=1,D},z.prototype.nextUIntV=function(){var D=$(this.buffer,this.offset);return this.offset+=D.length,D.value},z.prototype.nextIntV=function(){var D=$(this.buffer,this.offset,!0);return this.offset+=D.length,D.value},z.prototype.nextBuffer=function(D){var j=D?this.buffer.slice(this.offset,this.offset+D):this.buffer.slice(this.offset);return this.offset+=D||this.length,j},Object.defineProperty(z.prototype,"length",{get:function(){return this.buffer.length-this.offset}}),bufferReader=z,bufferReader}var ebmlBlock,hasRequiredEbmlBlock;function requireEbmlBlock(){if(hasRequiredEbmlBlock)return ebmlBlock;hasRequiredEbmlBlock=1;var $=requireBufferReader(),z=1,D=3,j=2;ebmlBlock=function(I){var o={},k=new $(I);o.trackNumber=k.nextUIntV(),o.timecode=k.nextInt16BE();var N=k.nextUInt8();o.invisible=!!(N&8),o.keyframe=!!(N&128),o.discardable=!!(N&1);var F=(N&6)>>1;return o.frames=O(k,F),o};function O(I,o){if(!o)return[I.nextBuffer()];var k,N,F=[],J=I.nextUInt8()+1;if(o===j){if(I.length%J!==0)throw new Error("Fixed-Size Lacing Error");for(N=I.length/J,k=0;k<J;k++)F.push(I.nextBuffer(N));return F}var X=[];if(o===z)for(k=0;k<J-1;k++){var Y;N=0;do Y=I.nextUInt8(),N+=Y;while(Y===255);X.push(N)}else if(o===D)for(N=I.nextUIntV(),X.push(N),k=1;k<J-1;k++)N+=I.nextIntV(),X.push(N);for(k=0;k<J-1;k++)F.push(I.nextBuffer(X[k]));return F.push(I.nextBuffer()),F}return ebmlBlock}var hasRequiredTools;function requireTools(){return hasRequiredTools||(hasRequiredTools=1,function($){Object.defineProperty($,"__esModule",{value:!0}),$.convertEBMLDateToJSDate=$.createFloatBuffer=$.createIntBuffer=$.createUIntBuffer=$.encodeValueToBuffer=$.concat=$.putRefinedMetaData=$.extractElement=$.removeElement=$.makeMetadataSeekable=$.createRIFFChunk=$.VP8BitStreamToRiffWebPBuffer=$.WebPBlockFilter=$.encodeTag=$.readBlock=$.ebmlBlock=$.writeVint=$.readVint=$.Buffer=void 0;var z=requireInt64Buffer(),D=requireEBMLEncoder(),j=requireBuffer(),O=requireToolsEbml(),I=requireEbmlBlock();$.Buffer=j.Buffer,$.readVint=O.default.readVint,$.writeVint=O.default.writeVint,$.ebmlBlock=I;function o(me){return(0,$.ebmlBlock)(new $.Buffer(me))}$.readBlock=o;function k(me,_e,De){return De===void 0&&(De=!1),se([me,De?new $.Buffer("01ffffffffffffff","hex"):(0,$.writeVint)(_e.length),_e])}$.encodeTag=k;function N(me){return me.reduce(function(_e,De){if(De.type!=="b"||De.name!=="SimpleBlock")return _e;var je=(0,$.ebmlBlock)(De.data),Fe=je.frames.some(function(qe){var gt=qe.slice(3,6).toString("hex");return gt==="9d012a"});return Fe?_e.concat(De):_e},[])}$.WebPBlockFilter=N;function F(me){var _e=J("VP8 ",me),De=se([new $.Buffer("WEBP","ascii"),_e]);return J("RIFF",De)}$.VP8BitStreamToRiffWebPBuffer=F;function J(me,_e){var De=new $.Buffer(4);return De.writeUInt32LE(_e.byteLength,0),se([new $.Buffer(me.substr(0,4),"ascii"),De,_e,new $.Buffer(_e.byteLength%2===0?0:1)])}$.createRIFFChunk=J;function X(me,_e,De){var je=Q("EBML",me),Fe=ie(je),qe=Fe+12,gt=me[me.length-1].dataEnd-qe,St=Q("Info",me);Y("Duration",St),St.splice(1,0,{name:"Duration",type:"f",data:ve(_e,8)});for(var It=ie(St),Lt=Q("Tracks",me),Nt=ie(Lt),yt=47,tt=[],zt=5+De.length*15,Ot=[],Ne=-1,nt=10,Ht=function(it){var vt=yt,Rt=vt+It,Mt=Rt+Nt,qt=Mt+zt,Jt=qt-gt;if(tt=[],tt.push({name:"SeekHead",type:"m",isEnd:!1}),tt.push({name:"Seek",type:"m",isEnd:!1}),tt.push({name:"SeekID",type:"b",data:new $.Buffer([21,73,169,102])}),tt.push({name:"SeekPosition",type:"u",data:fe(vt)}),tt.push({name:"Seek",type:"m",isEnd:!0}),tt.push({name:"Seek",type:"m",isEnd:!1}),tt.push({name:"SeekID",type:"b",data:new $.Buffer([22,84,174,107])}),tt.push({name:"SeekPosition",type:"u",data:fe(Rt)}),tt.push({name:"Seek",type:"m",isEnd:!0}),tt.push({name:"Seek",type:"m",isEnd:!1}),tt.push({name:"SeekID",type:"b",data:new $.Buffer([28,83,187,107])}),tt.push({name:"SeekPosition",type:"u",data:fe(Mt)}),tt.push({name:"Seek",type:"m",isEnd:!0}),tt.push({name:"SeekHead",type:"m",isEnd:!0}),yt=ie(tt),Ot=[],Ot.push({name:"Cues",type:"m",isEnd:!1}),De.forEach(function(Wt){var cn=Wt.CueTrack,Yt=Wt.CueClusterPosition,Xt=Wt.CueTime;Ot.push({name:"CuePoint",type:"m",isEnd:!1}),Ot.push({name:"CueTime",type:"u",data:fe(Xt)}),Ot.push({name:"CueTrackPositions",type:"m",isEnd:!1}),Ot.push({name:"CueTrack",type:"u",data:fe(cn)}),Yt-=qe,Yt+=Jt,Ot.push({name:"CueClusterPosition",type:"u",data:fe(Yt)}),Ot.push({name:"CueTrackPositions",type:"m",isEnd:!0}),Ot.push({name:"CuePoint",type:"m",isEnd:!0})}),Ot.push({name:"Cues",type:"m",isEnd:!0}),zt=ie(Ot),Ne!==Jt){if(Ne=Jt,it===nt-1)throw new Error("Failed to converge to a stable metadata size")}else return"break"},At=0;At<nt;At++){var et=Ht(At);if(et==="break")break}var Qe=[].concat.apply([],[je,{name:"Segment",type:"m",isEnd:!1,unknownSize:!0},tt,St,Lt,Ot]),rt=new D.default().encode(Qe);return rt}$.makeMetadataSeekable=X;function Y(me,_e){for(var De=-1,je=0;je<_e.length;je++){var Fe=_e[je];if(Fe.name===me)if(Fe.type==="m")if(!Fe.isEnd)De=je;else{if(De==-1)throw new Error("Detected ".concat(me," closing element before finding the start"));_e.splice(De,je-De+1);return}else{_e.splice(je,1);return}}}$.removeElement=Y;function Q(me,_e){for(var De=[],je=-1,Fe=0;Fe<_e.length;Fe++){var qe=_e[Fe];if(qe.name===me)if(qe.type==="m")if(!qe.isEnd)je=Fe;else{if(je==-1)throw new Error("Detected ".concat(me," closing element before finding the start"));De=_e.slice(je,Fe+1);break}else{De.push(_e[Fe]);break}}return De}$.extractElement=Q;function te(me,_e){Array.isArray(_e.cueInfos)&&!Array.isArray(_e.cues)&&(console.warn("putRefinedMetaData: info.cueInfos property is deprecated. please use info.cues"),_e.cues=_e.cueInfos);for(var De=[],je=[],Fe=0;Fe<me.length;Fe++){var qe=me[Fe];if(qe.type==="m"&&qe.name==="Segment"){if(De=me.slice(0,Fe),je=me.slice(Fe),qe.unknownSize){je.shift();break}throw new Error("this metadata is not streaming webm file")}}if(!(je[je.length-1].dataEnd>0))throw new Error("metadata dataEnd has wrong number");var gt=je[je.length-1].dataEnd,St=De[De.length-1].dataEnd,It=new D.default().encode(De).byteLength,Lt=It-St,Nt=gt-je[0].tagStart;je[0].tagStart-St,je[0].tagStart;var yt=new $.Buffer([24,83,128,103]),tt=new $.Buffer("01ffffffffffffff","hex"),zt=yt.byteLength+tt.byteLength,Ot=Nt,Ne;for(Ne=1;Ne<20;Ne++){var nt=St+zt+Ot,Ht=nt-gt,At=Lt+Ht,et=ne(je,At,_e),Qe=new D.default().encode(et).byteLength;if(Qe===Ot)return new D.default().encode([].concat(De,[{type:"m",name:"Segment",isEnd:!1,unknownSize:!0}],et));Ot=Qe}throw new Error("unable to refine metadata, stable size could not be found in "+Ne+" iterations!")}$.putRefinedMetaData=te;function ie(me){var _e=new D.default;return me.reduce(function(De,je){return De.concat(_e.encode([je]))},[]).reduce(function(De,je){return De+je.byteLength},0)}function ne(me,_e,De){var je=De.duration,Fe=De.clusterPtrs,qe=De.cues,gt=me.slice(0);if(typeof je=="number"){var St=!1;gt.forEach(function(Lt){Lt.type==="f"&&Lt.name==="Duration"&&(St=!0,Lt.data=ve(je,8))}),St||we(gt,"Info",[{name:"Duration",type:"f",data:ve(je,8)}])}Array.isArray(qe)&&we(gt,"Cues",ce(qe,_e));var It=[];return Array.isArray(Fe)&&(console.warn("append cluster pointers to seekhead is deprecated. please use cues"),It=oe(Fe,_e)),we(gt,"SeekHead",It,!0),gt}function oe(me,_e){var De=[];return me.forEach(function(je){De.push({name:"Seek",type:"m",isEnd:!1}),De.push({name:"SeekID",type:"b",data:new $.Buffer([31,67,182,117])}),De.push({name:"SeekPosition",type:"u",data:fe(je+_e)}),De.push({name:"Seek",type:"m",isEnd:!0})}),De}function ce(me,_e){var De=[];return me.forEach(function(je){var Fe=je.CueTrack,qe=je.CueClusterPosition,gt=je.CueTime;De.push({name:"CuePoint",type:"m",isEnd:!1}),De.push({name:"CueTime",type:"u",data:fe(gt)}),De.push({name:"CueTrackPositions",type:"m",isEnd:!1}),De.push({name:"CueTrack",type:"u",data:fe(Fe)}),De.push({name:"CueClusterPosition",type:"u",data:fe(qe+_e)}),De.push({name:"CueTrackPositions",type:"m",isEnd:!0}),De.push({name:"CuePoint",type:"m",isEnd:!0})}),De}function we(me,_e,De,je){je===void 0&&(je=!1);for(var Fe=-1,qe=0;qe<me.length;qe++){var gt=me[qe];if(gt.type==="m"&&gt.name===_e&&gt.isEnd===!1){Fe=qe;break}}Fe>=0?Array.prototype.splice.apply(me,[Fe+1,0].concat(De)):je?[].concat([{name:_e,type:"m",isEnd:!1}],De,[{name:_e,type:"m",isEnd:!0}]).reverse().forEach(function(St){me.unshift(St)}):(me.push({name:_e,type:"m",isEnd:!1}),De.forEach(function(St){me.push(St)}),me.push({name:_e,type:"m",isEnd:!0}))}function se(me){return $.Buffer.concat(me)}$.concat=se;function ye(me){var _e=new $.Buffer(0);if(me.type==="m")return me;switch(me.type){case"u":_e=fe(me.value);break;case"i":_e=pe(me.value);break;case"f":_e=ve(me.value);break;case"s":_e=new $.Buffer(me.value,"ascii");break;case"8":_e=new $.Buffer(me.value,"utf8");break;case"b":_e=me.value;break;case"d":_e=new z.Int64BE(me.value.getTime().toString()).toBuffer();break}return Object.assign({},me,{data:_e})}$.encodeValueToBuffer=ye;function fe(me){for(var _e=1;me>=Math.pow(2,8*_e);_e++);if(_e>=7)return console.warn("7bit or more bigger uint not supported."),new z.Uint64BE(me).toBuffer();var De=new $.Buffer(_e);return De.writeUIntBE(me,0,_e),De}$.createUIntBuffer=fe;function pe(me){for(var _e=1;me>=Math.pow(2,8*_e);_e++);if(_e>=7)return console.warn("7bit or more bigger uint not supported."),new z.Int64BE(me).toBuffer();var De=new $.Buffer(_e);return De.writeIntBE(me,0,_e),De}$.createIntBuffer=pe;function ve(me,_e){if(_e===void 0&&(_e=8),_e===8){var De=new $.Buffer(8);return De.writeDoubleBE(me,0),De}else if(_e===4){var De=new $.Buffer(4);return De.writeFloatBE(me,0),De}else throw new Error("float type bits must 4bytes or 8bytes")}$.createFloatBuffer=ve;function Te(me){return me instanceof Date?me:new Date(new Date("2001-01-01T00:00:00.000Z").getTime()+Number(me)/1e3/1e3)}$.convertEBMLDateToJSDate=Te}(tools)),tools}var hasRequiredEBMLDecoder;function requireEBMLDecoder(){if(hasRequiredEBMLDecoder)return EBMLDecoder;hasRequiredEBMLDecoder=1,Object.defineProperty(EBMLDecoder,"__esModule",{value:!0});var $=requireInt64Buffer(),z=requireTools(),D=requireTools(),j=requireEbmlID(),O;(function(o){o[o.STATE_TAG=1]="STATE_TAG",o[o.STATE_SIZE=2]="STATE_SIZE",o[o.STATE_CONTENT=3]="STATE_CONTENT"})(O||(O={}));var I=function(){function o(){this._buffer=new z.Buffer(0),this._tag_stack=[],this._state=O.STATE_TAG,this._cursor=0,this._total=0,this._schema=j.byEbmlID,this._result=[]}return o.prototype.decode=function(k){this.readChunk(k);var N=this._result;return this._result=[],N},o.prototype.readChunk=function(k){for(this._buffer=D.concat([this._buffer,new z.Buffer(k)]);this._cursor<this._buffer.length&&!(this._state===O.STATE_TAG&&!this.readTag()||this._state===O.STATE_SIZE&&!this.readSize()||this._state===O.STATE_CONTENT&&!this.readContent()););},o.prototype.getSchemaInfo=function(k){return this._schema[k]||{name:"unknown",level:-1,type:"unknown",description:"unknown"}},o.prototype.readTag=function(){if(this._cursor>=this._buffer.length)return!1;var k=(0,z.readVint)(this._buffer,this._cursor);if(k==null)return!1;var N=this._buffer.slice(this._cursor,this._cursor+k.length),F=N.reduce(function(Y,Q,te,ie){return Y+Q*Math.pow(16,2*(ie.length-1-te))},0),J=this.getSchemaInfo(F),X={EBML_ID:F.toString(16),schema:J,type:J.type,name:J.name,level:J.level,tagStart:this._total,tagEnd:this._total+k.length,sizeStart:this._total+k.length,sizeEnd:null,dataStart:null,dataEnd:null,dataSize:null,data:null};return this._tag_stack.push(X),this._cursor+=k.length,this._total+=k.length,this._state=O.STATE_SIZE,!0},o.prototype.readSize=function(){if(this._cursor>=this._buffer.length)return!1;var k=(0,z.readVint)(this._buffer,this._cursor);if(k==null)return!1;var N=this._tag_stack[this._tag_stack.length-1];return N.sizeEnd=N.sizeStart+k.length,N.dataStart=N.sizeEnd,N.dataSize=k.value,k.value===-1?(N.dataEnd=-1,N.type==="m"&&(N.unknownSize=!0)):N.dataEnd=N.sizeEnd+k.value,this._cursor+=k.length,this._total+=k.length,this._state=O.STATE_CONTENT,!0},o.prototype.readContent=function(){var k=this._tag_stack[this._tag_stack.length-1];if(k.type==="m"){if(k.isEnd=!1,this._result.push(k),this._state=O.STATE_TAG,k.dataSize===0){var N=Object.assign({},k,{isEnd:!0});this._result.push(N),this._tag_stack.pop()}return!0}if(this._buffer.length<this._cursor+k.dataSize)return!1;var F=this._buffer.slice(this._cursor,this._cursor+k.dataSize);switch(this._buffer=this._buffer.slice(this._cursor+k.dataSize),k.data=F,k.type){case"u":k.value=F.readUIntBE(0,F.length);break;case"i":k.value=F.readIntBE(0,F.length);break;case"f":k.value=k.dataSize===4?F.readFloatBE(0):k.dataSize===8?F.readDoubleBE(0):(console.warn("cannot read ".concat(k.dataSize," octets float. failback to 0")),0);break;case"s":k.value=F.toString("ascii");break;case"8":k.value=F.toString("utf8");break;case"b":k.value=F;break;case"d":k.value=(0,z.convertEBMLDateToJSDate)(new $.Int64BE(F).toNumber());break}if(k.value===null)throw new Error("unknown tag type:"+k.type);for(this._result.push(k),this._total+=k.dataSize,this._state=O.STATE_TAG,this._cursor=0,this._tag_stack.pop();this._tag_stack.length>0;){var J=this._tag_stack[this._tag_stack.length-1];if(J.dataEnd<0)return this._tag_stack.pop(),!0;if(this._total<J.dataEnd)break;if(J.type!=="m")throw new Error("parent element is not master element");var N=Object.assign({},J,{isEnd:!0});this._result.push(N),this._tag_stack.pop()}return!0},o}();return EBMLDecoder.default=I,EBMLDecoder}var EBMLReader={},events={exports:{}},hasRequiredEvents;function requireEvents(){if(hasRequiredEvents)return events.exports;hasRequiredEvents=1;var $=typeof Reflect=="object"?Reflect:null,z=$&&typeof $.apply=="function"?$.apply:function(ye,fe,pe){return Function.prototype.apply.call(ye,fe,pe)},D;$&&typeof $.ownKeys=="function"?D=$.ownKeys:Object.getOwnPropertySymbols?D=function(ye){return Object.getOwnPropertyNames(ye).concat(Object.getOwnPropertySymbols(ye))}:D=function(ye){return Object.getOwnPropertyNames(ye)};function j(se){console&&console.warn&&console.warn(se)}var O=Number.isNaN||function(ye){return ye!==ye};function I(){I.init.call(this)}events.exports=I,events.exports.once=oe,I.EventEmitter=I,I.prototype._events=void 0,I.prototype._eventsCount=0,I.prototype._maxListeners=void 0;var o=10;function k(se){if(typeof se!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof se)}Object.defineProperty(I,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(se){if(typeof se!="number"||se<0||O(se))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+se+".");o=se}}),I.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},I.prototype.setMaxListeners=function(ye){if(typeof ye!="number"||ye<0||O(ye))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+ye+".");return this._maxListeners=ye,this};function N(se){return se._maxListeners===void 0?I.defaultMaxListeners:se._maxListeners}I.prototype.getMaxListeners=function(){return N(this)},I.prototype.emit=function(ye){for(var fe=[],pe=1;pe<arguments.length;pe++)fe.push(arguments[pe]);var ve=ye==="error",Te=this._events;if(Te!==void 0)ve=ve&&Te.error===void 0;else if(!ve)return!1;if(ve){var me;if(fe.length>0&&(me=fe[0]),me instanceof Error)throw me;var _e=new Error("Unhandled error."+(me?" ("+me.message+")":""));throw _e.context=me,_e}var De=Te[ye];if(De===void 0)return!1;if(typeof De=="function")z(De,this,fe);else for(var je=De.length,Fe=te(De,je),pe=0;pe<je;++pe)z(Fe[pe],this,fe);return!0};function F(se,ye,fe,pe){var ve,Te,me;if(k(fe),Te=se._events,Te===void 0?(Te=se._events=Object.create(null),se._eventsCount=0):(Te.newListener!==void 0&&(se.emit("newListener",ye,fe.listener?fe.listener:fe),Te=se._events),me=Te[ye]),me===void 0)me=Te[ye]=fe,++se._eventsCount;else if(typeof me=="function"?me=Te[ye]=pe?[fe,me]:[me,fe]:pe?me.unshift(fe):me.push(fe),ve=N(se),ve>0&&me.length>ve&&!me.warned){me.warned=!0;var _e=new Error("Possible EventEmitter memory leak detected. "+me.length+" "+String(ye)+" listeners added. Use emitter.setMaxListeners() to increase limit");_e.name="MaxListenersExceededWarning",_e.emitter=se,_e.type=ye,_e.count=me.length,j(_e)}return se}I.prototype.addListener=function(ye,fe){return F(this,ye,fe,!1)},I.prototype.on=I.prototype.addListener,I.prototype.prependListener=function(ye,fe){return F(this,ye,fe,!0)};function J(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function X(se,ye,fe){var pe={fired:!1,wrapFn:void 0,target:se,type:ye,listener:fe},ve=J.bind(pe);return ve.listener=fe,pe.wrapFn=ve,ve}I.prototype.once=function(ye,fe){return k(fe),this.on(ye,X(this,ye,fe)),this},I.prototype.prependOnceListener=function(ye,fe){return k(fe),this.prependListener(ye,X(this,ye,fe)),this},I.prototype.removeListener=function(ye,fe){var pe,ve,Te,me,_e;if(k(fe),ve=this._events,ve===void 0)return this;if(pe=ve[ye],pe===void 0)return this;if(pe===fe||pe.listener===fe)--this._eventsCount===0?this._events=Object.create(null):(delete ve[ye],ve.removeListener&&this.emit("removeListener",ye,pe.listener||fe));else if(typeof pe!="function"){for(Te=-1,me=pe.length-1;me>=0;me--)if(pe[me]===fe||pe[me].listener===fe){_e=pe[me].listener,Te=me;break}if(Te<0)return this;Te===0?pe.shift():ie(pe,Te),pe.length===1&&(ve[ye]=pe[0]),ve.removeListener!==void 0&&this.emit("removeListener",ye,_e||fe)}return this},I.prototype.off=I.prototype.removeListener,I.prototype.removeAllListeners=function(ye){var fe,pe,ve;if(pe=this._events,pe===void 0)return this;if(pe.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):pe[ye]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete pe[ye]),this;if(arguments.length===0){var Te=Object.keys(pe),me;for(ve=0;ve<Te.length;++ve)me=Te[ve],me!=="removeListener"&&this.removeAllListeners(me);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(fe=pe[ye],typeof fe=="function")this.removeListener(ye,fe);else if(fe!==void 0)for(ve=fe.length-1;ve>=0;ve--)this.removeListener(ye,fe[ve]);return this};function Y(se,ye,fe){var pe=se._events;if(pe===void 0)return[];var ve=pe[ye];return ve===void 0?[]:typeof ve=="function"?fe?[ve.listener||ve]:[ve]:fe?ne(ve):te(ve,ve.length)}I.prototype.listeners=function(ye){return Y(this,ye,!0)},I.prototype.rawListeners=function(ye){return Y(this,ye,!1)},I.listenerCount=function(se,ye){return typeof se.listenerCount=="function"?se.listenerCount(ye):Q.call(se,ye)},I.prototype.listenerCount=Q;function Q(se){var ye=this._events;if(ye!==void 0){var fe=ye[se];if(typeof fe=="function")return 1;if(fe!==void 0)return fe.length}return 0}I.prototype.eventNames=function(){return this._eventsCount>0?D(this._events):[]};function te(se,ye){for(var fe=new Array(ye),pe=0;pe<ye;++pe)fe[pe]=se[pe];return fe}function ie(se,ye){for(;ye+1<se.length;ye++)se[ye]=se[ye+1];se.pop()}function ne(se){for(var ye=new Array(se.length),fe=0;fe<ye.length;++fe)ye[fe]=se[fe].listener||se[fe];return ye}function oe(se,ye){return new Promise(function(fe,pe){function ve(me){se.removeListener(ye,Te),pe(me)}function Te(){typeof se.removeListener=="function"&&se.removeListener("error",ve),fe([].slice.call(arguments))}we(se,ye,Te,{once:!0}),ye!=="error"&&ce(se,ve,{once:!0})})}function ce(se,ye,fe){typeof se.on=="function"&&we(se,"error",ye,fe)}function we(se,ye,fe,pe){if(typeof se.on=="function")pe.once?se.once(ye,fe):se.on(ye,fe);else if(typeof se.addEventListener=="function")se.addEventListener(ye,function ve(Te){pe.once&&se.removeEventListener(ye,ve),fe(Te)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof se)}return events.exports}var hasRequiredEBMLReader;function requireEBMLReader(){if(hasRequiredEBMLReader)return EBMLReader;hasRequiredEBMLReader=1;var $=EBMLReader&&EBMLReader.__extends||function(){var O=function(I,o){return O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,N){k.__proto__=N}||function(k,N){for(var F in N)Object.prototype.hasOwnProperty.call(N,F)&&(k[F]=N[F])},O(I,o)};return function(I,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");O(I,o);function k(){this.constructor=I}I.prototype=o===null?Object.create(o):(k.prototype=o.prototype,new k)}}();Object.defineProperty(EBMLReader,"__esModule",{value:!0});var z=requireEvents(),D=requireTools(),j=function(O){$(I,O);function I(){var o=O.call(this)||this;return o.logGroup="",o.hasLoggingStarted=!1,o.metadataloaded=!1,o.chunks=[],o.stack=[],o.segmentOffset=0,o.last2SimpleBlockVideoTrackTimecode=[0,0],o.last2SimpleBlockAudioTrackTimecode=[0,0],o.lastClusterTimecode=0,o.lastClusterPosition=0,o.timecodeScale=1e6,o.metadataSize=0,o.metadatas=[],o.cues=[],o.firstVideoBlockRead=!1,o.firstAudioBlockRead=!1,o.currentTrack={TrackNumber:-1,TrackType:-1,DefaultDuration:null,CodecDelay:null},o.trackTypes=[],o.trackDefaultDuration=[],o.trackCodecDelay=[],o.trackInfo={type:"nothing"},o.ended=!1,o.logging=!1,o.use_duration_every_simpleblock=!1,o.use_webp=!1,o.use_segment_info=!0,o.drop_default_duration=!0,o}return I.prototype.stop=function(){for(this.ended=!0,this.emit_segment_info();this.stack.length;)this.stack.pop(),this.logging&&console.groupEnd();this.logging&&this.hasLoggingStarted&&this.logGroup&&console.groupEnd()},I.prototype.emit_segment_info=function(){var o=this.chunks;if(this.chunks=[],this.metadataloaded){if(!this.use_segment_info)return;var F=this.lastClusterTimecode,J=this.duration,X=this.timecodeScale;this.emit("cluster",{timecode:F,data:o}),this.emit("duration",{timecodeScale:X,duration:J})}else{this.metadataloaded=!0,this.metadatas=o;var k=this.trackTypes.indexOf(1),N=this.trackTypes.indexOf(2);if(this.trackInfo=k>=0&&N>=0?{type:"both",trackNumber:k}:k>=0?{type:"video",trackNumber:k}:N>=0?{type:"audio",trackNumber:N}:{type:"nothing"},!this.use_segment_info)return;this.emit("metadata",{data:o,metadataSize:this.metadataSize})}},I.prototype.read=function(o){var k=this,N=!1;if(!this.ended){if(o.type==="m")if(o.isEnd)this.stack.pop();else{var F=this.stack[this.stack.length-1];if(F!=null&&F.level>=o.level){this.stack.pop(),this.logging&&console.groupEnd(),F.dataEnd=o.dataEnd,F.dataSize=o.dataEnd-F.dataStart,F.unknownSize=!1;var J=Object.assign({},F,{name:F.name,type:F.type,isEnd:!0});this.chunks.push(J)}this.stack.push(o)}if(o.type==="m"&&o.name=="Segment")this.segmentOffset!=0&&console.warn("Multiple segments detected!"),this.segmentOffset=o.dataStart,this.emit("segment_offset",this.segmentOffset);else if(o.type==="b"&&o.name==="SimpleBlock"){var X=D.ebmlBlock(o.data),Y=X.timecode,Q=X.trackNumber,te=X.frames;if(this.trackTypes[Q]===1){if(!this.firstVideoBlockRead&&(this.firstVideoBlockRead=!0,this.trackInfo.type==="both"||this.trackInfo.type==="video")){var ie=this.lastClusterTimecode+Y;this.cues.push({CueTrack:Q,CueClusterPosition:this.lastClusterPosition,CueTime:ie}),this.emit("cue_info",{CueTrack:Q,CueClusterPosition:this.lastClusterPosition,CueTime:this.lastClusterTimecode}),this.emit("cue",{CueTrack:Q,CueClusterPosition:this.lastClusterPosition,CueTime:ie})}this.last2SimpleBlockVideoTrackTimecode=[this.last2SimpleBlockVideoTrackTimecode[1],Y]}else if(this.trackTypes[Q]===2){if(!this.firstAudioBlockRead&&(this.firstAudioBlockRead=!0,this.trackInfo.type==="audio")){var ie=this.lastClusterTimecode+Y;this.cues.push({CueTrack:Q,CueClusterPosition:this.lastClusterPosition,CueTime:ie}),this.emit("cue_info",{CueTrack:Q,CueClusterPosition:this.lastClusterPosition,CueTime:this.lastClusterTimecode}),this.emit("cue",{CueTrack:Q,CueClusterPosition:this.lastClusterPosition,CueTime:ie})}this.last2SimpleBlockAudioTrackTimecode=[this.last2SimpleBlockAudioTrackTimecode[1],Y]}this.use_duration_every_simpleblock&&this.emit("duration",{timecodeScale:this.timecodeScale,duration:this.duration}),this.use_webp&&te.forEach(function(ne){var oe=ne.slice(3,6).toString("hex");if(oe==="9d012a"){var ce=D.VP8BitStreamToRiffWebPBuffer(ne),we=new Blob([ce],{type:"image/webp"}),se=k.duration;k.emit("webp",{currentTime:se,webp:we})}})}else o.type==="m"&&o.name==="Cluster"&&o.isEnd===!1?(this.firstVideoBlockRead=!1,this.firstAudioBlockRead=!1,this.emit_segment_info(),this.emit("cluster_ptr",o.tagStart),this.lastClusterPosition=o.tagStart):o.type==="u"&&o.name==="Timecode"?this.lastClusterTimecode=o.value:o.type==="u"&&o.name==="TimecodeScale"?this.timecodeScale=o.value:o.type==="m"&&o.name==="TrackEntry"?o.isEnd?(this.trackTypes[this.currentTrack.TrackNumber]=this.currentTrack.TrackType,this.trackDefaultDuration[this.currentTrack.TrackNumber]=this.currentTrack.DefaultDuration,this.trackCodecDelay[this.currentTrack.TrackNumber]=this.currentTrack.CodecDelay):this.currentTrack={TrackNumber:-1,TrackType:-1,DefaultDuration:null,CodecDelay:null}:o.type==="u"&&o.name==="TrackType"?this.currentTrack.TrackType=o.value:o.type==="u"&&o.name==="TrackNumber"?this.currentTrack.TrackNumber=o.value:o.type==="u"&&o.name==="CodecDelay"?this.currentTrack.CodecDelay=o.value:o.type==="u"&&o.name==="DefaultDuration"?this.drop_default_duration?(console.warn("DefaultDuration detected!, remove it"),N=!0):this.currentTrack.DefaultDuration=o.value:o.name==="unknown"&&console.warn(o);!this.metadataloaded&&o.dataEnd>0&&(this.metadataSize=o.dataEnd),N||this.chunks.push(o),this.logging&&this.put(o)}},Object.defineProperty(I.prototype,"duration",{get:function(){if(this.trackInfo.type==="nothing")return console.warn("no video, no audio track"),0;var o=0,k=0,N=0,F=this.trackDefaultDuration[this.trackInfo.trackNumber];if(typeof F=="number")o=F;else if(this.trackInfo.type==="both")if(this.last2SimpleBlockAudioTrackTimecode[1]>this.last2SimpleBlockVideoTrackTimecode[1]){o=(this.last2SimpleBlockAudioTrackTimecode[1]-this.last2SimpleBlockAudioTrackTimecode[0])*this.timecodeScale;var J=this.trackCodecDelay[this.trackTypes.indexOf(2)];typeof J=="number"&&(k=J),N=this.last2SimpleBlockAudioTrackTimecode[1]}else{o=(this.last2SimpleBlockVideoTrackTimecode[1]-this.last2SimpleBlockVideoTrackTimecode[0])*this.timecodeScale;var J=this.trackCodecDelay[this.trackTypes.indexOf(1)];typeof J=="number"&&(k=J),N=this.last2SimpleBlockVideoTrackTimecode[1]}else if(this.trackInfo.type==="video"){o=(this.last2SimpleBlockVideoTrackTimecode[1]-this.last2SimpleBlockVideoTrackTimecode[0])*this.timecodeScale;var J=this.trackCodecDelay[this.trackInfo.trackNumber];typeof J=="number"&&(k=J),N=this.last2SimpleBlockVideoTrackTimecode[1]}else if(this.trackInfo.type==="audio"){o=(this.last2SimpleBlockAudioTrackTimecode[1]-this.last2SimpleBlockAudioTrackTimecode[0])*this.timecodeScale;var J=this.trackCodecDelay[this.trackInfo.trackNumber];typeof J=="number"&&(k=J),N=this.last2SimpleBlockAudioTrackTimecode[1]}var X=(this.lastClusterTimecode+N)*this.timecodeScale+o-k,Y=X/this.timecodeScale;return Math.floor(Y)},enumerable:!1,configurable:!0}),I.prototype.addListener=function(o,k){return O.prototype.addListener.call(this,o,k)},I.prototype.put=function(o){this.hasLoggingStarted||(this.hasLoggingStarted=!0,this.logging&&this.logGroup&&console.groupCollapsed(this.logGroup)),o.type==="m"?o.isEnd?console.groupEnd():console.group(o.name+":"+o.tagStart):o.type==="b"?console.log(o.name,o.type):console.log(o.name,o.tagStart,o.type,o.value)},I}(z.EventEmitter);return EBMLReader.default=j,EBMLReader}var hasRequiredEbml;function requireEbml(){return hasRequiredEbml||(hasRequiredEbml=1,function($){var z=ebml&&ebml.__createBinding||(Object.create?function(k,N,F,J){J===void 0&&(J=F),Object.defineProperty(k,J,{enumerable:!0,get:function(){return N[F]}})}:function(k,N,F,J){J===void 0&&(J=F),k[J]=N[F]}),D=ebml&&ebml.__exportStar||function(k,N){for(var F in k)F!=="default"&&!Object.prototype.hasOwnProperty.call(N,F)&&z(N,k,F)};Object.defineProperty($,"__esModule",{value:!0}),$.tools=$.Reader=$.Encoder=$.Decoder=void 0,D(requireEBML(),$);var j=requireEBMLDecoder();$.Decoder=j.default;var O=requireEBMLEncoder();$.Encoder=O.default;var I=requireEBMLReader();$.Reader=I.default;var o=requireTools();$.tools=o}(ebml)),ebml}var hasRequiredLib;function requireLib(){if(hasRequiredLib)return lib;hasRequiredLib=1;var $=lib&&lib.__awaiter||function(O,I,o,k){function N(F){return F instanceof o?F:new o(function(J){J(F)})}return new(o||(o=Promise))(function(F,J){function X(te){try{Q(k.next(te))}catch(ie){J(ie)}}function Y(te){try{Q(k.throw(te))}catch(ie){J(ie)}}function Q(te){te.done?F(te.value):N(te.value).then(X,Y)}Q((k=k.apply(O,I||[])).next())})},z=lib&&lib.__generator||function(O,I){var o={label:0,sent:function(){if(F[0]&1)throw F[1];return F[1]},trys:[],ops:[]},k,N,F,J;return J={next:X(0),throw:X(1),return:X(2)},typeof Symbol=="function"&&(J[Symbol.iterator]=function(){return this}),J;function X(Q){return function(te){return Y([Q,te])}}function Y(Q){if(k)throw new TypeError("Generator is already executing.");for(;o;)try{if(k=1,N&&(F=Q[0]&2?N.return:Q[0]?N.throw||((F=N.return)&&F.call(N),0):N.next)&&!(F=F.call(N,Q[1])).done)return F;switch(N=0,F&&(Q=[Q[0]&2,F.value]),Q[0]){case 0:case 1:F=Q;break;case 4:return o.label++,{value:Q[1],done:!1};case 5:o.label++,N=Q[1],Q=[0];continue;case 7:Q=o.ops.pop(),o.trys.pop();continue;default:if(F=o.trys,!(F=F.length>0&&F[F.length-1])&&(Q[0]===6||Q[0]===2)){o=0;continue}if(Q[0]===3&&(!F||Q[1]>F[0]&&Q[1]<F[3])){o.label=Q[1];break}if(Q[0]===6&&o.label<F[1]){o.label=F[1],F=Q;break}if(F&&o.label<F[2]){o.label=F[2],o.ops.push(Q);break}F[2]&&o.ops.pop(),o.trys.pop();continue}Q=I.call(O,o)}catch(te){Q=[6,te],N=0}finally{k=F=0}if(Q[0]&5)throw Q[1];return{value:Q[0]?Q[1]:void 0,done:!0}}};Object.defineProperty(lib,"__esModule",{value:!0});var D=requireEbml();function j(O){return $(this,void 0,void 0,function(){var I,o,k,N,F,J,X,Y,Q,te,ie,ne;return z(this,function(oe){switch(oe.label){case 0:if(!O)throw Error("call to fixWebmDuration requires a blob");I=new D.Decoder,o=new D.Reader,k=O.stream(),N=k.getReader(),oe.label=1;case 1:return[4,N.read()];case 2:return F=oe.sent(),J=F.done,X=F.value,J?(o.stop(),[3,3]):(Y=I.decode(X),Y=Y==null?void 0:Y.filter(function(ce){return ce.type!=="unknown"}),Y.forEach(function(ce){o.read(ce)}),X=null,[3,1]);case 3:return Q=D.tools.makeMetadataSeekable(o.metadatas,o.duration,o.cues),te=new Blob([Q],{type:O.type}),ie=O.slice(o.metadataSize),ne=new Blob([te,ie],{type:O.type}),[2,ne]}})})}return lib.default=j,lib}var libExports=requireLib();const fixWebmDuration=getDefaultExportFromCjs(libExports);class StreamRecorder{constructor(){Xe(this,Kt);Xe(this,dn,!1);Xe(this,un,!1);Xe(this,Tn,0);Xe(this,On,0);Xe(this,rn,0);Xe(this,an,0);Xe(this,hn,0);Se(this,"onchange",z=>{});Se(this,"onDurationChange",z=>{});Se(this,"start",async(z="")=>{z||(z=`video_Record_${E(Date.now())}`);let D=[];return navigator.mediaDevices.getDisplayMedia({audio:!0,video:!0}).then(j=>{const O=j.getTracks();for(const o of O)o.onended=()=>this.stop();Et(this,dn,!0),Et(this,un,!1),Et(this,Kt,new MediaRecorder(j)),Re(this,Kt).start();const I=new Date().getTime();Et(this,Tn,I),Et(this,rn,I),Re(this,pn).call(this),Re(this,En).call(this),Re(this,Kt).addEventListener("dataavailable",o=>{D.push(o.data)}),Re(this,Kt).addEventListener("stop",async()=>{Et(this,dn,!1);const o=new Date().getTime();Et(this,On,o),Et(this,an,Re(this,an)+(o-Re(this,rn))),Re(this,pn).call(this),clearInterval(Re(this,hn));const k=j.getTracks();for(const Y of k)Y.stop();if(Re(this,Kt)===null)return;const N=new Blob(D,{type:Re(this,Kt).mimeType}),F=await fixWebmDuration(N),J=URL.createObjectURL(F),X=document.createElement("a");X.href=J,X.download=`${z}.mp4`,X.click(),URL.revokeObjectURL(J),D=[],Et(this,Kt,null)})})});Se(this,"pause",async()=>{var D;await new Promise(j=>setTimeout(()=>j(!0),300)),(D=Re(this,Kt))==null||D.pause(),Et(this,un,!0);const z=new Date().getTime();Et(this,an,Re(this,an)+(z-Re(this,rn))),Re(this,pn).call(this),clearInterval(Re(this,hn))});Se(this,"resume",async()=>{var D;(D=Re(this,Kt))==null||D.resume(),Et(this,un,!1);const z=new Date().getTime();Et(this,rn,z),Re(this,pn).call(this),Re(this,En).call(this)});Se(this,"stop",async()=>{var z;(z=Re(this,Kt))==null||z.stop()});Se(this,"getDuration",()=>{if(Re(this,rn)===0)return 0;let z=Re(this,an);const D=new Date().getTime();if(Re(this,dn)&&Re(this,un)===!1){const j=D-Re(this,rn);Et(this,rn,D),z=z+j}return z});Se(this,"getInfo",()=>({active:Re(this,dn),pause:Re(this,un),startTime:Re(this,Tn),endTime:Re(this,On),duration:Re(this,an)}));Xe(this,pn,()=>{const z=this.getInfo();this.onchange(z)});Xe(this,En,()=>{clearInterval(Re(this,hn)),Et(this,hn,window.setInterval(()=>{Et(this,an,this.getDuration()),this.onDurationChange(Re(this,an))},500))})}}Kt=new WeakMap,dn=new WeakMap,un=new WeakMap,Tn=new WeakMap,On=new WeakMap,rn=new WeakMap,an=new WeakMap,hn=new WeakMap,pn=new WeakMap,En=new WeakMap;var l=Object.defineProperty,y=$=>{throw TypeError($)},q=($,z,D)=>z in $?l($,z,{enumerable:!0,configurable:!0,writable:!0,value:D}):$[z]=D,s=($,z,D)=>q($,typeof z!="symbol"?z+"":z,D),P=($,z,D)=>z.has($)||y("Cannot "+D),n=($,z,D)=>(P($,z,"read from private field"),D?D.call($):z.get($)),a=($,z,D)=>z.has($)?y("Cannot add the same private member more than once"):z instanceof WeakSet?z.add($):z.set($,D),d,x,u;class p{constructor(z={}){s(this,"queue",[]),s(this,"timer",0),s(this,"activeIndex",0),s(this,"activePromise"),s(this,"options",{timeout:0}),s(this,"add",(D,j={})=>new Promise(async(O,I)=>{const o=j.timeout||this.options.timeout,k=j.key||n(this,d).call(this),N=j.describe||"";if(this.queue.findIndex(J=>J.key===k)!==-1)return I(`${k} is exist.`);const F={key:k,func:D,describe:N,timeout:o,resolve:O,reject:I};this.queue.unshift(F),this.activePromise||n(this,u).call(this)})),s(this,"clear",()=>{this.queue=[],clearTimeout(this.timer)}),a(this,d,()=>(this.activeIndex=this.activeIndex+1,`${this.activeIndex}`)),a(this,x,D=>{const j=this.queue.findIndex(O=>O.key===D);this.queue.splice(j,1)}),a(this,u,async()=>{const D=this.queue.length;if(D===0)return;const j=D-1,O=this.queue[j];this.activePromise=O;const{key:I,func:o,resolve:k,reject:N,timeout:F}=this.activePromise;F&&(this.timer=window.setTimeout(()=>{N(`pr-async-queue: ${I} is timeout.`),n(this,u).call(this)},F)),await o().then(k).catch(N).finally(()=>{clearTimeout(this.timer),this.activePromise=void 0,n(this,x).call(this,I),n(this,u).call(this)})}),this.options={timeout:0,...z}}}d=new WeakMap,x=new WeakMap,u=new WeakMap;class RoomBase{constructor(z){Se(this,"options",{appid:"",sdkToken:"",roomId:"",userId:"",earlyId:"",callType:0,debug:!1,reportErr:!0,logUrl:"https://logs1.quickvo.org",newPublishAutoSubscribe:!0});Se(this,"sdk_service_version","1.0.6");Se(this,"prohibitNotify",!1);Se(this,"isEarly",!1);Se(this,"isInRoom",!1);Se(this,"asyncQueue");Se(this,"roomState","ready");Se(this,"createAt",Date.now());Se(this,"cwsIns");Se(this,"peerIns");Se(this,"transceiverMap",new Map);Se(this,"sendChannel");Se(this,"receiveChannel");Se(this,"userMap",new Map);Se(this,"setLocalStreamActiveMap",new Map);Se(this,"phoneyStreams",new Map);Se(this,"recorder",new StreamRecorder);Se(this,"networkQualityTester",new NetworkQualityTester);Se(this,"mediaDevicesErrInfo",{microphoneCamera_audio:"",microphoneCamera_video:"",screenSharing_video:"",screenSharing_audio:""});Se(this,"reportLogs",(z,D="未知错误")=>{const{appid:j,userId:O,earlyId:I="",logUrl:o,reportErr:k}=this.options;if(!k)return;const N="web",F=J=>({ws_c_timeout:0,webrtc_c_timeout:1,join_room_error:2,publish_error:3,subscribe_error:4,close_track_error:5,heartbeat_e_timeout:6,heartbeat_i_timeout:7,quit_room_error:8})[J].toString();{const J=F(z),X={origin:N,type:J,app_id:j,user_id:O,ins_id:I,desc:D},Y=btoa(encodeURI(JSON.stringify(X))),Q=`${o}/upload/log?log_key=${Y}`;{const te=localStorage.getItem("#quickvo.logs")||JSON.stringify([]),ne=new TextEncoder().encode(te),oe=pako.deflate(ne,{gzip:!0});this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: reportLogs",{obj:X,url:Q,size:lt(oe.byteLength)}),fetch(Q,{headers:{"Content-Type":"multipart/form-data"},method:"POST",body:oe})}}});Se(this,"initPhoneyStreams",(z,D=[])=>{D.length===0&&(D=mediaType_keys);for(const j of D){const O=this.phoneyStreams.get(j);if(O){const I=O.getTracks();for(const o of I)o.stop()}switch(j){case"microphoneCamera_audio":this.phoneyStreams.set("microphoneCamera_audio",createMutedAudioStream(z));break;case"microphoneCamera_video":this.phoneyStreams.set("microphoneCamera_video",createFakeVideoStream());break;case"screenSharing_audio":this.phoneyStreams.set("screenSharing_audio",createMutedAudioStream(z));break;case"screenSharing_video":this.phoneyStreams.set("screenSharing_video",createFakeVideoStream());break}}});Se(this,"getPhoneyStreams",z=>this.phoneyStreams.get(z));Se(this,"getRoomInfo",()=>{const{options:z,roomState:D,createAt:j}=this;return{...z,roomState:D,createAt:j}});Se(this,"setRoomState",z=>{this.roomState=z;const D=enum_roomState[z],j={state:z,stateStr:D};this.cwsIns.emitNotify("onRoomState",{code:200,data:j,desc:"room state is change."})});Se(this,"setOptions",async z=>{const D={...this.options,...z};this.options=D});Se(this,"stopStream",async z=>{const D=z.getTracks();for(const j of D)j.stop()});Se(this,"getMediaDevicesErrInfo",async()=>{try{const z=await navigator.mediaDevices.enumerateDevices();z.find(j=>j.kind==="audioinput")||(this.mediaDevicesErrInfo.microphoneCamera_audio="audioinput is not available."),z.find(j=>j.kind==="videoinput")||(this.mediaDevicesErrInfo.microphoneCamera_video="videoinput is not available.")}catch(z){this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: getMediaDevicesErrInfo is error.",z)}return this.mediaDevicesErrInfo});Se(this,"getUserMediaKey",(z,D)=>`${z}-${D}`);Se(this,"getCallAction",async z=>{let D="";const j=I=>z.findIndex(({type:k,enabled:N=!0})=>k===I&&N)===-1?"0":"1";return D=`${j(0)}${D}`,D=`${j(1)}${D}`,D=`${j(2)}${D}`,D=`${j(3)}${D}`,parseInt(D,2)});Se(this,"getCallActionMap",(z=0)=>{const j=Number(z).toString(2).padStart(4,"0").split(""),[O,I,o,k]=j;return{microphoneCamera_audio:!!Number(k),microphoneCamera_video:!!Number(o),screenSharing_video:!!Number(I),screenSharing_audio:!!Number(O)}});Se(this,"getBanBehaviorMap",(z=0)=>{const j=Number(z).toString(2).padStart(4,"0").split(""),[O,I,o,k]=j;return{microphoneCamera_audio:!!Number(k),microphoneCamera_video:!!Number(o),screenSharing_video:!!Number(I),screenSharing_audio:!!Number(O)}});Se(this,"getAverageVolume",(z,D)=>{z.getByteFrequencyData(D);let j=0;for(let I=0;I<D.length;I++)j+=D[I];return Math.ceil(j/D.length)});Se(this,"getTrackNamesFormTracks",(z,D=[],j="trackName")=>{const O=[];for(const I of z){const{type:o}=I;if(D.length===0||D.includes(o)){const k=I[j];k&&O.push(`${k}`)}}return O});Se(this,"usersFilter",z=>dt(z,["id","isSelf","isOwner","joinTime","tracks","network","permissions","isPublished","updateStreams","callAction","callActionStr","callActionMap","banBehavior","banBehaviorStr","banBehaviorMap"]).sort((O,I)=>O.id.localeCompare(I.id,"en")));this.setOptions(z),this.cwsIns=new CallsWebSocket({...z}),this.asyncQueue=new p}}var m=Object.defineProperty,G=($,z,D)=>z in $?m($,z,{enumerable:!0,configurable:!0,writable:!0,value:D}):$[z]=D,e$1=($,z,D)=>G($,typeof z!="symbol"?z+"":z,D);class g{constructor(z,D){e$1(this,"inputStream",new MediaStream),e$1(this,"outputStream",new MediaStream),e$1(this,"inputGain",1),e$1(this,"enhanceGain",1),e$1(this,"bgsGain",1),e$1(this,"bgmGain",1),e$1(this,"outputGain",1),e$1(this,"mixAudioMap",new Map),e$1(this,"audioContext",new AudioContext),e$1(this,"sourceNode"),e$1(this,"inputGainNode"),e$1(this,"enhanceGainNode"),e$1(this,"bgsGainNode"),e$1(this,"bgmGainNode"),e$1(this,"analyserNode"),e$1(this,"analyserArrayData"),e$1(this,"outputGainNode"),e$1(this,"destinationNode"),e$1(this,"filterStream",j=>j),e$1(this,"stop",()=>{{const j=this.inputStream.getTracks();for(const O of j)O.stop(),this.inputStream.removeTrack(O)}}),e$1(this,"getStream",()=>this.filterStream(this.outputStream)),e$1(this,"setMute",(j=!0)=>{j?this.analyserNode.disconnect(this.outputGainNode):this.analyserNode.connect(this.outputGainNode)}),e$1(this,"setInputGain",j=>{this.inputGain=j,this.inputGainNode.gain.setValueAtTime(j,this.audioContext.currentTime)}),e$1(this,"setEnhanceGain",async j=>{this.enhanceGain=j+1,this.enhanceGainNode.gain.setValueAtTime(this.enhanceGain,this.audioContext.currentTime)}),e$1(this,"setBgsGain",j=>{this.bgsGain=j,this.bgsGainNode.gain.setValueAtTime(j,this.audioContext.currentTime)}),e$1(this,"setBgmGain",j=>{this.bgmGain=j,this.bgmGainNode.gain.setValueAtTime(j,this.audioContext.currentTime)}),e$1(this,"setOutputGain",j=>{this.outputGain=j,this.outputGainNode.gain.setValueAtTime(this.outputGain,this.audioContext.currentTime)}),e$1(this,"getVolume",()=>{const{analyserNode:j,analyserArrayData:O}=this;j.getByteFrequencyData(O);let I=0;for(let o=0;o<O.length;o++)I+=O[o];return Math.ceil(I/O.length)}),e$1(this,"mixAudio",(j,O="bgm")=>new Promise(async(I,o)=>{try{{const F=this.mixAudioMap.get(O);F&&F.stop()}const k=O==="bgs"?this.bgsGainNode:this.bgmGainNode,N=this.audioContext.createBufferSource();this.mixAudioMap.set(O,N),N.buffer=j,N.connect(k),N.onended=()=>{N.disconnect(k),this.mixAudioMap.delete(O),I(!0)},N.start(0)}catch(k){o(k)}})),e$1(this,"mixAudioStop",j=>{const O=this.mixAudioMap.get(j);O==null||O.stop()}),e$1(this,"changeMix",(j,O)=>{const I=j==="bgs"?this.bgsGainNode:this.bgmGainNode;O?I.connect(this.destinationNode):I.disconnect(this.destinationNode)}),D&&(this.audioContext=D),this.inputStream=z,this.sourceNode=this.audioContext.createMediaStreamSource(this.inputStream),this.inputGainNode=this.audioContext.createGain(),this.inputGainNode.gain.setValueAtTime(this.inputGain,this.audioContext.currentTime),this.enhanceGainNode=this.audioContext.createGain(),this.enhanceGainNode.gain.setValueAtTime(this.enhanceGain,this.audioContext.currentTime),this.bgsGainNode=this.audioContext.createGain(),this.bgsGainNode.gain.setValueAtTime(this.bgsGain,this.audioContext.currentTime),this.bgmGainNode=this.audioContext.createGain(),this.bgmGainNode.gain.setValueAtTime(this.bgmGain,this.audioContext.currentTime),this.analyserNode=this.audioContext.createAnalyser(),this.analyserNode.fftSize=512,this.analyserArrayData=new Uint8Array(this.analyserNode.frequencyBinCount),this.outputGainNode=this.audioContext.createGain(),this.outputGainNode.gain.setValueAtTime(this.outputGain,this.audioContext.currentTime),this.destinationNode=this.audioContext.createMediaStreamDestination(),this.outputStream=this.destinationNode.stream;{const{sourceNode:j,inputGainNode:O,enhanceGainNode:I,bgsGainNode:o,bgmGainNode:k,analyserNode:N,outputGainNode:F,destinationNode:J}=this;j.connect(O),O.connect(I),I.connect(N),o.connect(N),k.connect(N),I.connect(J),o.connect(J),k.connect(J),N.connect(F),F.connect(this.audioContext.destination)}this.setMute(!0),this.audioContext.resume()}}class RoomMedias extends RoomBase{constructor(D){super(D);Xe(this,bn,[]);Xe(this,Qt,new Map);Xe(this,Ut,new Map);Xe(this,on,new Map);Xe(this,sn,new Map);Xe(this,fn,new Map);Se(this,"localStreamsActionMap",new Map);Xe(this,_n,new Map);Se(this,"audioContext",new(window.AudioContext||window.webkitAudioContext));Se(this,"initMediaPhoneyStreams",(D=[])=>this.initPhoneyStreams(this.audioContext,D));Se(this,"initLocalStreamsFilter",()=>{for(const D of mediaType_keys){const j=async O=>O;Re(this,_n).set(D,j)}});Se(this,"setLocalFilterStream",(D,j)=>{Re(this,_n).set(D,j)});Xe(this,Pn,()=>{Re(this,Ut).set("microphoneCamera_audio",{autoGainControl:!0,echoCancellation:!0,noiseSuppression:!0}),Re(this,Ut).set("microphoneCamera_video",{frameRate:{min:10,ideal:30}}),Re(this,Ut).set("screenSharing_video",{frameRate:{min:10,ideal:30}}),Re(this,Ut).set("screenSharing_audio",{autoGainControl:!0,echoCancellation:!0,noiseSuppression:!0})});Xe(this,Un,()=>{Re(this,Qt).set("audioinput","default"),Re(this,Qt).set("videoinput","default"),Re(this,Qt).set("audiooutput","default")});Se(this,"emitNotifyUpdateUsersStreams",async D=>{this.cwsIns.emitNotify("onRoomUsersStreams",{code:200,data:D,desc:"users streams is change."})});Se(this,"initUserMediaStreamContext",async(D,j,O)=>{const[I]=O.getTracks();if(!I){console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: tracks.length is 0.",{userId:D,mediaType:j,stream:O});return}this.removeUserMediaStreamContext(D,j);const o=this.getUserMediaKey(D,j),{kind:k}=I;switch(k){case"audio":{const N=new MediaStream;N.addTrack(I);const F=new g(N,this.audioContext);Re(this,on).set(o,F)}break;case"video":{const N=new VideoMediaContext(I);Re(this,sn).set(o,N)}break}});Se(this,"getUserMediaStreamContext",(D,j)=>{const O=this.getUserMediaKey(D,j);if(["microphoneCamera_audio","screenSharing_audio"].includes(j))return Re(this,on).get(O);if(["microphoneCamera_video","screenSharing_video"].includes(j))return Re(this,sn).get(O)});Se(this,"getUserAudioMediaStreamContext",(D,j)=>{const O=this.getUserMediaKey(D,j);return Re(this,on).get(O)});Se(this,"removeUserMediaStreamContext",(D,j)=>{const O=this.getUserMediaKey(D,j);if(["microphoneCamera_audio","screenSharing_audio"].includes(j)){const I=Re(this,on).get(O);return I==null||I.stop(),Re(this,on).delete(O)}if(["microphoneCamera_video","screenSharing_video"].includes(j)){const I=Re(this,sn).get(O);return I==null||I.stop(),Re(this,sn).get(O)}});Se(this,"getUserStream",(D,j)=>{const O=this.getUserMediaStreamContext(D,j);return(O==null?void 0:O.getStream())||new MediaStream});Se(this,"getUserStreams",(D,j=[])=>{j.length===0&&(j=mediaType_keys);const O={};for(const I of j){const o=this.getUserStream(D,I);O[I]=o}return O});Se(this,"removeUserStreams",async(D,j=[])=>{j.length===0&&(j=mediaType_keys);for(const O of j)this.removeUserMediaStreamContext(D,O)});Se(this,"clearUserStreams",()=>{{const D=Re(this,on).values();for(const j of D)j.stop();Et(this,on,new Map)}{const D=Re(this,sn).values();for(const j of D)j.stop();Et(this,sn,new Map)}});Se(this,"setMediaTrackConstraints",async(D,j)=>{Re(this,Ut).set(D,j);const O=await this.getLocalStream(D);if(!O)return;const I=O.getTracks();if(I.length!==0)for(const o of I){const k=o.getConstraints(),F={...Re(this,Ut).get(D),...k,...j};await o.applyConstraints(F)}});Se(this,"stopLocalStreams",async(D=[])=>{D.length===0&&(D=mediaType_keys);for(const j of D){const O=Re(this,fn).get(j);O&&await this.stopStream(O),Re(this,fn).delete(j)}});Se(this,"addLocalStream",(D,j)=>{const O=Re(this,fn).get(D);O&&this.stopStream(O),Re(this,fn).set(D,j)});Se(this,"initLocalStream",async D=>{switch(D){case"microphoneCamera_audio":{const j=Re(this,Qt).get("audioinput"),O=Re(this,Ut).get("microphoneCamera_audio"),I=await navigator.mediaDevices.getUserMedia({audio:{deviceId:j,...O},video:!1});this.addLocalStream("microphoneCamera_audio",I)}break;case"microphoneCamera_video":{const j=Re(this,Qt).get("videoinput"),O=Re(this,Ut).get("microphoneCamera_video"),I=await navigator.mediaDevices.getUserMedia({audio:!1,video:{deviceId:j,...O}});this.addLocalStream("microphoneCamera_video",I)}break;case"microphoneCamera":{const j=Re(this,Qt).get("audioinput"),O=Re(this,Qt).get("videoinput"),I=Re(this,Ut).get("microphoneCamera_audio"),o=Re(this,Ut).get("microphoneCamera_video"),N=(await navigator.mediaDevices.getUserMedia({audio:{deviceId:j,...I},video:{deviceId:O,...o}})).getTracks();for(const F of N){const{kind:J}=F;if(J==="audio"){const X=new MediaStream;X.addTrack(F),this.addLocalStream("microphoneCamera_audio",X)}if(J==="video"){const X=new MediaStream;X.addTrack(F),this.addLocalStream("microphoneCamera_video",X)}}}break;case"screenSharing_audio":{const j=Re(this,Ut).get("screenSharing_audio"),I=(await navigator.mediaDevices.getDisplayMedia({audio:!0,video:!0,...j})).getTracks();for(const o of I){const{kind:k}=o;if(k==="audio"){const N=new MediaStream;N.addTrack(o),this.addLocalStream("screenSharing_audio",N)}}}break;case"screenSharing_video":{const j=Re(this,Ut).get(D),I=(await navigator.mediaDevices.getDisplayMedia({audio:!1,video:!0,...j})).getTracks();for(const o of I){const{kind:k}=o;if(k==="video"){const N=new MediaStream;N.addTrack(o),this.addLocalStream("screenSharing_video",N)}}}break;case"screenSharing":{const j=Re(this,Ut).get("screenSharing_audio"),O=Re(this,Ut).get("screenSharing_video"),o=(await navigator.mediaDevices.getDisplayMedia({audio:!0,video:!0,...j,...O})).getTracks();for(const k of o){const{kind:N}=k;if(N==="audio"){const F=new MediaStream;F.addTrack(k),this.addLocalStream("screenSharing_audio",F)}if(N==="video"){const F=new MediaStream;F.addTrack(k),this.addLocalStream("screenSharing_video",F)}}}break}});Se(this,"getLocalStream",async D=>{const j=Re(this,fn).get(D),O=Re(this,_n).get(D);let I=j;return j&&O&&(I=await O(j)),I});Se(this,"getLocalStreams",async(D=[])=>{D.length===0&&(D=mediaType_keys);const j={};for(const O of D)j[O]=await this.getLocalStream(O);return j});Xe(this,wn,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(D=>{const j=D.filter(O=>!["communications"].includes(O.deviceId));Et(this,bn,j.sort((O,I)=>O.label.localeCompare(I.label,"zh-Hans-CN",{sensitivity:"accent"})))}).catch(function(D){console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: getEnumerateDevices is err",D)}),Re(this,bn)));Xe(this,Ln,()=>{navigator.mediaDevices&&(navigator.mediaDevices.ondevicechange=async()=>{await Re(this,wn).call(this),this.cwsIns.emitNotify("onDevicechange",{code:200,data:{},desc:"device is change."})}),Re(this,wn).call(this)});Se(this,"getMediaDeviceKind",D=>Re(this,Qt).get(D));Se(this,"changeAudiooutput",async()=>{try{const D=Re(this,Qt).get("audiooutput");await this.audioContext.setSinkId(D)}catch(D){console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: setSinkId is error.",D)}});Se(this,"setDeviceKind",(D,j)=>{Re(this,Qt).set(D,j)});Se(this,"setAudioOutputDevice",D=>this.setDeviceKind("audiooutput",D));Se(this,"getEnumerateDevices",async D=>(await Re(this,wn).call(this),Re(this,bn).filter(O=>O.kind===D)));Se(this,"getEnumerateAudioinputDevices",()=>this.getEnumerateDevices("audioinput"));Se(this,"getEnumerateAudioOutputDevices",()=>this.getEnumerateDevices("audiooutput"));Se(this,"getEnumerateVideoinputDevices",()=>this.getEnumerateDevices("videoinput"));Re(this,Ln).call(this),Re(this,Un).call(this),Re(this,Pn).call(this),this.initPhoneyStreams(this.audioContext),document.addEventListener("click",()=>{var j;((j=this.audioContext)==null?void 0:j.state)==="suspended"&&this.audioContext.resume()})}}bn=new WeakMap,Qt=new WeakMap,Ut=new WeakMap,on=new WeakMap,sn=new WeakMap,fn=new WeakMap,_n=new WeakMap,Pn=new WeakMap,Un=new WeakMap,wn=new WeakMap,Ln=new WeakMap;class RoomUsers extends RoomMedias{constructor(D){super(D);Se(this,"getMaxVolumeUser",()=>{const D=Array.from(this.userMap.values(),({id:O})=>O);if(D.length===0)return;let j=[];for(const O of D){const I=this.getUserAudioMediaStreamContext(O,"microphoneCamera_audio");if(!I)continue;const o=I.getVolume();j.push({id:O,volume:o})}return j=j.sort((O,I)=>O.volume-I.volume>0?-1:1),j[0]});Se(this,"setVolume",(D,j,O)=>{const I=this.getUserAudioMediaStreamContext(D,j);I==null||I.setInputGain(O)});Se(this,"setEnhanceGain",async(D,j,O)=>{const I=this.getUserAudioMediaStreamContext(D,j);I==null||I.setEnhanceGain(O)});Se(this,"setSpeaker",(D,j,O)=>{const I=this.getUserAudioMediaStreamContext(D,j);I==null||I.setOutputGain(O);const o=O===0;I==null||I.setMute(o)});Se(this,"playBgs",(D,j,O)=>{const I=this.getUserAudioMediaStreamContext(D,j);return I==null?void 0:I.mixAudio(O,"bgs")});Se(this,"setBgsGain",(D,j,O)=>{const I=this.getUserAudioMediaStreamContext(D,j);I==null||I.setBgsGain(O)});Se(this,"stopBgs",(D,j)=>{const O=this.getUserAudioMediaStreamContext(D,j);O==null||O.mixAudioStop("bgs")});Se(this,"playBgm",(D,j,O)=>{const I=this.getUserAudioMediaStreamContext(D,j);return I==null?void 0:I.mixAudio(O,"bgm")});Se(this,"setBgmGain",(D,j,O)=>{const I=this.getUserAudioMediaStreamContext(D,j);I==null||I.setBgmGain(O)});Se(this,"stopBgm",(D,j)=>{const O=this.getUserAudioMediaStreamContext(D,j);O==null||O.mixAudioStop("bgm")});Se(this,"changBgsMix",(D,j,O)=>{const I=this.getUserAudioMediaStreamContext(D,j);I==null||I.changeMix("bgs",O)});Se(this,"changBgmMix",(D,j,O)=>{const I=this.getUserAudioMediaStreamContext(D,j);I==null||I.changeMix("bgm",O)});Se(this,"getVolume",(D,j)=>{const O=this.getUserAudioMediaStreamContext(D,j);return O==null?void 0:O.getVolume()});Se(this,"clearUsers",()=>{this.userMap=new Map});Se(this,"removeUsers",async D=>{for(const j of D)this.userMap.delete(j),await this.removeUserStreams(j)});Se(this,"createUser",async D=>{const j=Date.now(),O={id:D,permissions:0,callAction:0,callActionStr:"",callActionMap:{microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1},banBehavior:0,banBehaviorStr:"",banBehaviorMap:{microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1},callState:0,isOwner:this.userMap.size===0,isSelf:D===this.options.userId,isPublished:!1,joinTime:j,updateAt:j,network:{egress:0,ingress:0},tracks:[],channels:[],updateStreams:{microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1}};this.userMap.set(D,O)});Se(this,"getUser",async D=>(this.userMap.has(D)||await this.createUser(D),this.userMap.get(D)));Se(this,"getUsers",async(D=[])=>{D.length===0&&(D=[...this.userMap.keys()]);const j=[];for(const O of D){const I=await this.getUser(O);j.push(I)}return j});Se(this,"getAllUserTrackMids",async()=>{const D=await this.getUsers(),j=[];for(const O of D){const{tracks:I=[]}=O;for(const o of I)j.push(o.mid)}return j});Se(this,"getUserTrackByTrackName",async D=>{const j=await this.getUsers(),O=[];for(const I of j){const{tracks:o=[]}=I;for(const k of o){const{trackName:N}=k;D.includes(N)&&O.push(k)}}return O});Se(this,"getUserTrackFromMid",async D=>{const j=await this.getUsers();let O;for(const I of j){const{tracks:o=[]}=I;for(const k of o)if(k.mid===D){O=k;break}}return O});Se(this,"checkUserInRoom",D=>this.userMap.has(D));Se(this,"getUsersId",async()=>[...this.userMap.keys()]);Se(this,"getSelfInfo",async()=>await this.getUser(this.options.userId));Se(this,"updateIsPublished",async(D,j=!1)=>{const O=await this.getUser(D);O.isPublished=j});Se(this,"setUserUpdateStreams",async(D,j,O=!0)=>{const I=await this.getUser(D),o={microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1};o[j]=O,I.updateStreams=o});Se(this,"updateUserChannels",async(D,j=[],O)=>{const I=await this.getUser(D);O&&(j=[...I.channels,...j]),I.channels=j});Se(this,"updateUsertracks",async(D,j=[],O)=>{const I=await this.getUser(D);O&&(j=[...I.tracks,...j]),j=j.filter(({mid:N=""})=>N!==""),j=pt(j,["type"]),j=j.sort((N,F)=>N.type-F.type<0?-1:1);for(const N of j)N.userId=D,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 o=dt(I.tracks,["mediaType","enabled","mid","msid","trackName"]),k=dt(j,["mediaType","enabled","mid","msid","trackName"]);{const N="microphoneCamera_audio",F=k.find(Y=>Y.mediaType===N),J=o.find(Y=>Y.mediaType===N),X=JSON.stringify(F)!==JSON.stringify(J);I.updateStreams[N]=X}{const N="microphoneCamera_video",F=k.find(Y=>Y.mediaType===N),J=o.find(Y=>Y.mediaType===N),X=JSON.stringify(F)!==JSON.stringify(J);I.updateStreams[N]=X}{const N="screenSharing_audio",F=k.find(Y=>Y.mediaType===N),J=o.find(Y=>Y.mediaType===N),X=JSON.stringify(F)!==JSON.stringify(J);I.updateStreams[N]=X}{const N="screenSharing_video",F=k.find(Y=>Y.mediaType===N),J=o.find(Y=>Y.mediaType===N),X=JSON.stringify(F)!==JSON.stringify(J);I.updateStreams[N]=X}I.tracks=j});Se(this,"updateUserCallAction",async(D,j=0)=>{const O=await this.getUser(D);O.callAction=j,O.callActionStr=j.toString(2).padStart(4,"0"),O.callActionMap=this.getCallActionMap(j)});Se(this,"updateUserBehaviors",async(D,j=0)=>{const O=await this.getUser(D);O.banBehavior=j,O.banBehaviorStr=j.toString(2).padStart(4,"0"),O.banBehaviorMap=this.getBanBehaviorMap(j)});Se(this,"updateUserNetwork",async(D,j={egress:5,ingress:5})=>{const O=await this.getUser(D);O.network=j});Se(this,"updateUserPermissions",async(D,j)=>{if(j){const O=await this.getUser(D);O.permissions=j}});Se(this,"updateUserBase",async D=>{const j=await this.getUser(D);j.isSelf=D===this.options.userId,j.updateAt=Date.now()});Se(this,"updateUsers",async D=>{for(const j of D){const{id:O,tracks:I,callAction:o,permissions:k,isPublished:N}=j;await this.updateUserBase(O),await this.updateIsPublished(O,N),await this.updateUserPermissions(O,k),await this.updateUsertracks(O,I,!0),await this.updateUserCallAction(O,o),await this.updateUserNetwork(O)}});Se(this,"emitNotifyUpdateUser",async D=>{const j=await this.getUsers([D]),[O]=this.usersFilter(j);this.cwsIns.emitNotify("onRoomUser",{code:200,data:O,desc:"user info is change."})});Se(this,"emitNotifyUpdateUsers",async()=>{const D=await this.getUsers(),j=this.usersFilter(D);this.cwsIns.emitNotify("onRoomUsers",{code:200,data:j,desc:"all users info is change."})})}}const t=($,z=4294967295,D=79764919)=>{const j=new Int32Array(256);let O,I,o,k=z;for(O=0;O<256;O++){for(o=O<<24,I=8;I>0;--I)o=2147483648&o?o<<1^D:o<<1;j[O]=o}for(O=0;O<$.length;O++)k=k<<8^j[255&(k>>24^$[O])];return k},e=($,z=t)=>{const D=ne=>new Uint8Array(ne.length/2).map((oe,ce)=>parseInt(ne.substring(2*ce,2*(ce+1)),16)),j=ne=>D(ne)[0],O=new Map;[,8364,,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,,381,,,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,,382,376].forEach((ne,oe)=>O.set(ne,oe));const I=new Uint8Array($.length);let o,k,N,F=!1,J=0,X=42,Y=$.length>13&&$.substring(0,9)==="dynEncode",Q=0;Y&&(Q=11,k=j($.substring(9,Q)),k<=1&&(Q+=2,X=j($.substring(11,Q))),k===1&&(Q+=8,N=(ne=>new DataView(D(ne).buffer).getInt32(0,!0))($.substring(13,Q))));const te=256-X;for(let ne=Q;ne<$.length;ne++)if(o=$.charCodeAt(ne),o!==61||F){if(o===92&&ne<$.length-5&&Y){const oe=$.charCodeAt(ne+1);oe!==117&&oe!==85||(o=parseInt($.substring(ne+2,ne+6),16),ne+=5)}if(o>255){const oe=O.get(o);oe&&(o=oe+127)}F&&(F=!1,o-=64),I[J++]=o<X&&o>0?o+te:o-X}else F=!0;const ie=I.subarray(0,J);if(Y&&k===1){const ne=z(ie);if(ne!==N){const oe="Decode failed crc32 validation";throw console.error("`simple-yenc`\n",oe+`
14
- `,"Expected: "+N+"; Got: "+ne+`
15
- `,"Visit https://github.com/eshaz/simple-yenc for more information"),Error(oe)}}return ie};function WASMAudioDecoderCommon(){const $=Uint8Array,z=Float32Array;WASMAudioDecoderCommon.modules||Object.defineProperties(WASMAudioDecoderCommon,{modules:{value:new WeakMap},setModule:{value(D,j){WASMAudioDecoderCommon.modules.set(D,Promise.resolve(j))}},getModule:{value(D,j){let O=WASMAudioDecoderCommon.modules.get(D);return O||(j?O=WebAssembly.compile(e(j)):(j=D.wasm,O=WASMAudioDecoderCommon.inflateDynEncodeString(j).then(I=>WebAssembly.compile(I))),WASMAudioDecoderCommon.modules.set(D,O)),O}},concatFloat32:{value(D,j){let O=new z(j),I=0,o=0;for(;I<D.length;)O.set(D[I],o),o+=D[I++].length;return O}},getDecodedAudio:{value:(D,j,O,I,o)=>({errors:D,channelData:j,samplesDecoded:O,sampleRate:I,bitDepth:o})},getDecodedAudioMultiChannel:{value(D,j,O,I,o,k){let N=[],F,J;for(F=0;F<O;F++){const X=[];for(J=0;J<j.length;)X.push(j[J++][F]||[]);N.push(WASMAudioDecoderCommon.concatFloat32(X,I))}return WASMAudioDecoderCommon.getDecodedAudio(D,N,I,o,k)}},inflateDynEncodeString:{value(D){return D=e(D),new Promise(j=>{const O=String.raw`dynEncode012804c7886d(‰›•)((()>+ˆ*§§)§ˆ,§§§§)§ˆ+§§§)§+.-()(*)-+)(ˆ.7*§)i¸¸,3§(i¸¸,3/G+.••—š¡*(,˜ŽŽ(,3‡‡‰˜‡Š‰›+)2å:-œ),§H(P*DI*H(P*@I++hH)H*r,hH(H(P*<J,i)’^*<H,H(P*4’U((I-H(H*i0’J,^*DH+H-H*œšI+H,I*4)33H(H*H)“^*DH(H+H)^*@H+i§H)œi§›™3æ*).§K(iH“I/+§H,iHn,§H+i(H+i(rCJ0I,H*I-+hH,,hH(H-V)(i)œ’J.H.W)(i)’c)(H,i)“I,H-i*’I-4)33i(I.*hH(V)(H+n5(H(i*’I-i(I,i)I.+hH,i*’J+iHn,hi(I-i*I,+hH,H/’H-c)(H,iFn,hi(I,+hH,H0n5-H*V)(J(,hH/H(i)œ’J(H(V)(J(i)’c)(H)H(i)œ’H,c)(3H*i*’I*H,i)’I,4(3(-H(H,’W)(H-’I-H,i*’I,4)3(3(3H,H-’I1H+I,H.i)œH1V)(“J.i(v5(33H.-H(H,’i(c)(H,i*’I,4)333–)-§i*I*+§H*iHn,hiž73H,H(i)8(H+šJ+H)P*(H*’V)(J-“r,§H)P*,H.i)œ’H+H,“i)œ’V)(-H*i*’I*H+i)œI+H-H.’I.H,H-’i)œI,4)333Ã+)-§iø7i(^*(iü7I,*h+hH+iDn,h*hilI+i)I,+hH+,hH+iô7’H,c)(i)H+i´8’W)(œH,’I,H+i*’I+4)-+hH(H)8*J-i(p5.*h*h*hH-i')u,hH(P*(J+,hH(P*0J,H(P*,n50H+H,’H-b((3H(P*0i)’I.4)3H-i¨*n5*H-iÅ*s,hiž73H-i)œJ+V)&+I,H(H+V)æ,8(I.H(H*8*J-i(p51H-i)œJ+i¸7’V)(H(H+iø7’V)(8(’J/H(P*0J+s,hi73H+H,H.’J,’I.H(P*(m5(H.H(P*,s5.+hH,m5*H(P*(J.H+’H.H+H/“’U((b((H(H(P*0i)’J+^*0H,i)“I,4(3(3H(H.^*03H-i¨*o5)33i(73(3(3-H,H+i)žc)(H,i*’I,H+i)’I+4)33i)I-3H-3!2)0§K(i2“J,L(H,H(^*(H,H*^*4H,i(^*0H,i(^*DH,j(_*<H,H)P*(^*,H,H+P*(^*8*h*h+hH,i)8(I3i§I**h*h*h*h*h*h*hH,i*8(6+(),03H,j(_*@i*I-H,P*<J.i,’J(H,P*8J/s50H,H.i+’J0^*<i¦I*H.H,P*4J1’J.U(*H.U((J2›i')o5/H.U()I.H,H(^*<H0H1’U((H.i0œJ.i§›i0ži')™o5/H/H.H2šJ*H(’J.q50H,P*0J/H*’I-H,P*(J0,hH,P*,H-q,hi)I-423+hH*m5+H/H0’H(H1’U((b((H/i)’I/H(i)’I(H*i)“I*4(3(3H,H.^*<H,H-^*04*3iØ1U((5+i(I(i¨7i1^*(i$6iè1^*(i°7iè6^*(i¬7iÈ6^*(+hH(iÈ*n,hiÈ*I(+hH(i¨,n,hi¨,I(+hH(iØ,n,hiØ,I(+hH(iè,o,hH,i-’H(’i0c)(H(i*’I(4)33iè1i1H,i-’iÈ*8)Bi(I(+hH(ido,hH,i-’H(’i-c)(H(i*’I(4)33iÈ6iè6H,i-’iF8)BiØ1i)b((41-H,i-’H(’i/c)(H(i*’I(4)3(3(-H,i-’H(’i1c)(H(i*’I(4)3(3(-H,i-’H(’i0c)(H(i*’I(4)3(3(3H,H/^*0H,H(^*<3i(I*4*3H,H,i¸)’^*TH,H,iø-’^*PH,H,iX’^*LH,H,i(’^*HH,i-8(I(H,i-8(I-i¥I*H,i,8(I.H(iErH-iErš5)H(i©*’I1H-i)’I0i(i;H.i,’J(i(H(i(rCJ(“J*H*i;sCI*i¨1I-H(I/+hH/,hH,i-’H-V)(i)œ’H,i+8(c)(H/i)“I/H-i*’I-H*i)’I*4)-H(i)œi¨1’I/+hH(H*o,hH,i-’H/V)(i)œ’i(c)(H/i*’I/H(i)’I(4)33i¤I*H,iø-’H,i¸)’H,i-’i;8)5+H0H1’I2i(I-+hH-H2p,hH,H,iP’8*J*i(p5-H*i7u,hH,i-’H-i)œ’H*c)(H-i)’I-4*3i(I/i+I.i+I(*h*h*hH*i8“6*(*)3H-m,hi£I*403H-i)œH,’W)-I/i*I(4)3i3I.i/I(3H2H,H(8(H.’J(H-’J.p,hi¢I*4.3H,i-’H-i)œ’I*+hH(,hH*H/c)(H*i*’I*H(i)“I(4)-H.I-4+3(3(33H,W)1m,hiŸI*4,3H,iø-’H,i¸)’H,i-’H18)J(,hi¡I*H(i(p5,H1H,V)ú-H,V)ø-’o5,3H,i(’H,iX’H,i-’H1i)œ’H08)J(,hi I*H(i(p5,H0H,V)šH,V)˜’o5,3H,H,iP’H,iH’8+I*4+3(3(3H,i$6i¬78+I*3H*H3šm5(3i)I-H*i(r5)3H)H,P*0^*(H+H,P*<^*(H*I-3H,i2’L(H-33Á)+(i¨03b+(,(-(.(/(0(1(2(3(5(7(9(;(?(C(G(K(S([(c(k({(‹(›(«(Ë(ë( (*)(iø03O)()()()(*(*(*(*(+(+(+(+(,(,(,(,(-(-(-(-(i¨13M8(9(:(((0(/(1(.(2(-(3(,(4(+(5(*(6()(7(T7œ‰šœ‡Ž‰œš›*S7•œ‰Š”U”—Љ”›S0›‘–U œ`;WASMAudioDecoderCommon.getModule(WASMAudioDecoderCommon,O).then(I=>WebAssembly.instantiate(I,{})).then(({exports:I})=>{const o=new Map(Object.entries(I)),k=o.get("puff"),N=o.get("memory").buffer,F=new $(N),J=new DataView(N);let X=o.get("__heap_base");const Y=D.length,Q=X;X+=4,J.setInt32(Q,Y,!0);const te=X;X+=Y,F.set(D,te);const ie=X;X+=4,J.setInt32(ie,F.byteLength-X,!0),k(X,ie,te,Q),j(F.slice(X,X+J.getInt32(ie,!0)))})})}}}),Object.defineProperty(this,"wasm",{enumerable:!0,get:()=>this._wasm}),this.getOutputChannels=(D,j,O)=>{let I=[],o=0;for(;o<j;)I.push(D.slice(o*O,o++*O+O));return I},this.allocateTypedArray=(D,j,O=!0)=>{const I=this._wasm.malloc(j.BYTES_PER_ELEMENT*D);return O&&this._pointers.add(I),{ptr:I,len:D,buf:new j(this._wasm.HEAP,I,D)}},this.free=()=>{this._pointers.forEach(D=>{this._wasm.free(D)}),this._pointers.clear()},this.codeToString=D=>{const j=[],O=new Uint8Array(this._wasm.HEAP);for(let I=O[D];I!==0;I=O[++D])j.push(I);return String.fromCharCode.apply(null,j)},this.addError=(D,j,O,I,o,k)=>{D.push({message:j,frameLength:O,frameNumber:I,inputBytes:o,outputSamples:k})},this.instantiate=(D,j)=>(j&&WASMAudioDecoderCommon.setModule(D,j),this._wasm=new D(WASMAudioDecoderCommon).instantiate(),this._pointers=new Set,this._wasm.ready.then(()=>this))}var browser,hasRequiredBrowser;function requireBrowser(){return hasRequiredBrowser||(hasRequiredBrowser=1,browser=Worker),browser}var browserExports=requireBrowser();const NodeWorker=getDefaultExportFromCjs(browserExports),getWorker=()=>globalThis.Worker||NodeWorker;class WASMAudioDecoderWorker extends getWorker(){constructor(z,D,j,O){WASMAudioDecoderCommon.modules||new WASMAudioDecoderCommon;let I=WASMAudioDecoderCommon.modules.get(j);if(!I){let o="text/javascript",k,N=`'use strict';(${((F,J,X)=>{let Y,Q,te=new Promise(ie=>{Q=ie});self.onmessage=({data:{id:ie,command:ne,data:oe}})=>{let ce=te,we={id:ie},se;ne==="init"?(Object.defineProperties(F,{WASMAudioDecoderCommon:{value:J},EmscriptenWASM:{value:X},module:{value:oe.module},isWebWorker:{value:!0}}),Y=new F(oe.options),Q()):ne==="free"?Y.free():ne==="ready"?ce=ce.then(()=>Y.ready):ne==="reset"?ce=ce.then(()=>Y.reset()):(Object.assign(we,Y[ne](Array.isArray(oe)?oe.map(ye=>new Uint8Array(ye)):new Uint8Array(oe))),se=we.channelData?we.channelData.map(ye=>ye.buffer):[]),ce.then(()=>self.postMessage(we,se))}}).toString()})(${j}, ${WASMAudioDecoderCommon}, ${O})`;try{k=typeof process.versions.node<"u"}catch{}I=k?`data:${o};base64,${Buffer.from(N).toString("base64")}`:URL.createObjectURL(new Blob([N],{type:o})),WASMAudioDecoderCommon.modules.set(j,I)}super(I,{name:D}),this._id=Number.MIN_SAFE_INTEGER,this._enqueuedOperations=new Map,this.onmessage=({data:o})=>{const{id:k,...N}=o;this._enqueuedOperations.get(k)(N),this._enqueuedOperations.delete(k)},new O(WASMAudioDecoderCommon).getModule().then(o=>{this.postToDecoder("init",{module:o,options:z})})}async postToDecoder(z,D){return new Promise(j=>{this.postMessage({command:z,id:this._id,data:D}),this._enqueuedOperations.set(this._id++,j)})}get ready(){return this.postToDecoder("ready")}async free(){await this.postToDecoder("free").finally(()=>{this.terminate()})}async reset(){await this.postToDecoder("reset")}}const assignNames=($,z)=>{Object.defineProperty($,"name",{value:z})};function EmscriptenWASM($){function z(){}function D(_e){throw _e}var j,O;function I(){var _e=O.buffer;j=new Uint8Array(_e),new BigInt64Array(_e),new BigUint64Array(_e)}for(var o=()=>D(""),k=()=>{},N={},F=_e=>_e(),J=()=>performance.now(),X=(_e,De)=>{if(N[_e]&&(clearTimeout(N[_e].id),delete N[_e]),!De)return 0;var je=setTimeout(()=>{delete N[_e],F(()=>ve(_e,J()))},De);return N[_e]={id:je,timeout_ms:De},0},Y=Math.cos,Q=_e=>(j.length,!1),te=_e=>{throw`exit(${_e})`},ie=new Uint8Array(123),ne=25;ne>=0;--ne)ie[48+ne]=52+ne,ie[65+ne]=ne,ie[97+ne]=26+ne;ie[43]=62,ie[47]=63;var oe={d:o,c:k,e:X,a:Y,f:Q,b:te};function ce(_e){we=_e.i,se=_e.j,ye=_e.k,fe=_e.l,pe=_e.m,ve=_e.o}var we,se,ye,fe,pe,ve;function Te(_e){_e.h()}EmscriptenWASM.wasm||Object.defineProperty(EmscriptenWASM,"wasm",{get:()=>String.raw`dynEncode0158c8b8d85e¼æ=M™]™lGu³õPoš]ÐãÞ·£3² ÁÚ= ’Êöc/ÓZ8s³‹íÛ³u­Ð¥t"+¦›¦~dòR\(nº}÷£¢¢ë¢k}Ÿt¡) ,‚­äÕüP
13
+ */var hasRequiredBuffer;function requireBuffer(){return hasRequiredBuffer||(hasRequiredBuffer=1,function(O){const N=requireBase64Js(),I=requireIeee754(),D=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;O.Buffer=c,O.SlowBuffer=ie,O.INSPECT_MAX_BYTES=50;const f=2147483647;O.kMaxLength=f,c.TYPED_ARRAY_SUPPORT=k(),!c.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function k(){try{const X=new Uint8Array(1),F={foo:function(){return 42}};return Object.setPrototypeOf(F,Uint8Array.prototype),Object.setPrototypeOf(X,F),X.foo()===42}catch{return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function i(X){if(X>f)throw new RangeError('The value "'+X+'" is invalid for option "size"');const F=new Uint8Array(X);return Object.setPrototypeOf(F,c.prototype),F}function c(X,F,j){if(typeof X=="number"){if(typeof F=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Z(X)}return $(X,F,j)}c.poolSize=8192;function $(X,F,j){if(typeof X=="string")return J(X,F);if(ArrayBuffer.isView(X))return Q(X);if(X==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof X);if(Ut(X,ArrayBuffer)||X&&Ut(X.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ut(X,SharedArrayBuffer)||X&&Ut(X.buffer,SharedArrayBuffer)))return ee(X,F,j);if(typeof X=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const ae=X.valueOf&&X.valueOf();if(ae!=null&&ae!==X)return c.from(ae,F,j);const ve=Y(X);if(ve)return ve;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof X[Symbol.toPrimitive]=="function")return c.from(X[Symbol.toPrimitive]("string"),F,j);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof X)}c.from=function(X,F,j){return $(X,F,j)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array);function C(X){if(typeof X!="number")throw new TypeError('"size" argument must be of type number');if(X<0)throw new RangeError('The value "'+X+'" is invalid for option "size"')}function M(X,F,j){return C(X),X<=0?i(X):F!==void 0?typeof j=="string"?i(X).fill(F,j):i(X).fill(F):i(X)}c.alloc=function(X,F,j){return M(X,F,j)};function Z(X){return C(X),i(X<0?0:te(X)|0)}c.allocUnsafe=function(X){return Z(X)},c.allocUnsafeSlow=function(X){return Z(X)};function J(X,F){if((typeof F!="string"||F==="")&&(F="utf8"),!c.isEncoding(F))throw new TypeError("Unknown encoding: "+F);const j=ye(X,F)|0;let ae=i(j);const ve=ae.write(X,F);return ve!==j&&(ae=ae.slice(0,ve)),ae}function z(X){const F=X.length<0?0:te(X.length)|0,j=i(F);for(let ae=0;ae<F;ae+=1)j[ae]=X[ae]&255;return j}function Q(X){if(Ut(X,Uint8Array)){const F=new Uint8Array(X);return ee(F.buffer,F.byteOffset,F.byteLength)}return z(X)}function ee(X,F,j){if(F<0||X.byteLength<F)throw new RangeError('"offset" is outside of buffer bounds');if(X.byteLength<F+(j||0))throw new RangeError('"length" is outside of buffer bounds');let ae;return F===void 0&&j===void 0?ae=new Uint8Array(X):j===void 0?ae=new Uint8Array(X,F):ae=new Uint8Array(X,F,j),Object.setPrototypeOf(ae,c.prototype),ae}function Y(X){if(c.isBuffer(X)){const F=te(X.length)|0,j=i(F);return j.length===0||X.copy(j,0,0,F),j}if(X.length!==void 0)return typeof X.length!="number"||jt(X.length)?i(0):z(X);if(X.type==="Buffer"&&Array.isArray(X.data))return z(X.data)}function te(X){if(X>=f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f.toString(16)+" bytes");return X|0}function ie(X){return+X!=X&&(X=0),c.alloc(+X)}c.isBuffer=function(F){return F!=null&&F._isBuffer===!0&&F!==c.prototype},c.compare=function(F,j){if(Ut(F,Uint8Array)&&(F=c.from(F,F.offset,F.byteLength)),Ut(j,Uint8Array)&&(j=c.from(j,j.offset,j.byteLength)),!c.isBuffer(F)||!c.isBuffer(j))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(F===j)return 0;let ae=F.length,ve=j.length;for(let Ee=0,Ce=Math.min(ae,ve);Ee<Ce;++Ee)if(F[Ee]!==j[Ee]){ae=F[Ee],ve=j[Ee];break}return ae<ve?-1:ve<ae?1:0},c.isEncoding=function(F){switch(String(F).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(F,j){if(!Array.isArray(F))throw new TypeError('"list" argument must be an Array of Buffers');if(F.length===0)return c.alloc(0);let ae;if(j===void 0)for(j=0,ae=0;ae<F.length;++ae)j+=F[ae].length;const ve=c.allocUnsafe(j);let Ee=0;for(ae=0;ae<F.length;++ae){let Ce=F[ae];if(Ut(Ce,Uint8Array))Ee+Ce.length>ve.length?(c.isBuffer(Ce)||(Ce=c.from(Ce)),Ce.copy(ve,Ee)):Uint8Array.prototype.set.call(ve,Ce,Ee);else if(c.isBuffer(Ce))Ce.copy(ve,Ee);else throw new TypeError('"list" argument must be an Array of Buffers');Ee+=Ce.length}return ve};function ye(X,F){if(c.isBuffer(X))return X.length;if(ArrayBuffer.isView(X)||Ut(X,ArrayBuffer))return X.byteLength;if(typeof X!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof X);const j=X.length,ae=arguments.length>2&&arguments[2]===!0;if(!ae&&j===0)return 0;let ve=!1;for(;;)switch(F){case"ascii":case"latin1":case"binary":return j;case"utf8":case"utf-8":return Ht(X).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j*2;case"hex":return j>>>1;case"base64":return Zt(X).length;default:if(ve)return ae?-1:Ht(X).length;F=(""+F).toLowerCase(),ve=!0}}c.byteLength=ye;function re(X,F,j){let ae=!1;if((F===void 0||F<0)&&(F=0),F>this.length||((j===void 0||j>this.length)&&(j=this.length),j<=0)||(j>>>=0,F>>>=0,j<=F))return"";for(X||(X="utf8");;)switch(X){case"hex":return Mt(this,F,j);case"utf8":case"utf-8":return Pe(this,F,j);case"ascii":return _t(this,F,j);case"latin1":case"binary":return St(this,F,j);case"base64":return Ue(this,F,j);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return At(this,F,j);default:if(ae)throw new TypeError("Unknown encoding: "+X);X=(X+"").toLowerCase(),ae=!0}}c.prototype._isBuffer=!0;function de(X,F,j){const ae=X[F];X[F]=X[j],X[j]=ae}c.prototype.swap16=function(){const F=this.length;if(F%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let j=0;j<F;j+=2)de(this,j,j+1);return this},c.prototype.swap32=function(){const F=this.length;if(F%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let j=0;j<F;j+=4)de(this,j,j+3),de(this,j+1,j+2);return this},c.prototype.swap64=function(){const F=this.length;if(F%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let j=0;j<F;j+=8)de(this,j,j+7),de(this,j+1,j+6),de(this,j+2,j+5),de(this,j+3,j+4);return this},c.prototype.toString=function(){const F=this.length;return F===0?"":arguments.length===0?Pe(this,0,F):re.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(F){if(!c.isBuffer(F))throw new TypeError("Argument must be a Buffer");return this===F?!0:c.compare(this,F)===0},c.prototype.inspect=function(){let F="";const j=O.INSPECT_MAX_BYTES;return F=this.toString("hex",0,j).replace(/(.{2})/g,"$1 ").trim(),this.length>j&&(F+=" ... "),"<Buffer "+F+">"},D&&(c.prototype[D]=c.prototype.inspect),c.prototype.compare=function(F,j,ae,ve,Ee){if(Ut(F,Uint8Array)&&(F=c.from(F,F.offset,F.byteLength)),!c.isBuffer(F))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof F);if(j===void 0&&(j=0),ae===void 0&&(ae=F?F.length:0),ve===void 0&&(ve=0),Ee===void 0&&(Ee=this.length),j<0||ae>F.length||ve<0||Ee>this.length)throw new RangeError("out of range index");if(ve>=Ee&&j>=ae)return 0;if(ve>=Ee)return-1;if(j>=ae)return 1;if(j>>>=0,ae>>>=0,ve>>>=0,Ee>>>=0,this===F)return 0;let Ce=Ee-ve,tt=ae-j;const mt=Math.min(Ce,tt),ot=this.slice(ve,Ee),wt=F.slice(j,ae);for(let yt=0;yt<mt;++yt)if(ot[yt]!==wt[yt]){Ce=ot[yt],tt=wt[yt];break}return Ce<tt?-1:tt<Ce?1:0};function se(X,F,j,ae,ve){if(X.length===0)return-1;if(typeof j=="string"?(ae=j,j=0):j>2147483647?j=2147483647:j<-2147483648&&(j=-2147483648),j=+j,jt(j)&&(j=ve?0:X.length-1),j<0&&(j=X.length+j),j>=X.length){if(ve)return-1;j=X.length-1}else if(j<0)if(ve)j=0;else return-1;if(typeof F=="string"&&(F=c.from(F,ae)),c.isBuffer(F))return F.length===0?-1:ue(X,F,j,ae,ve);if(typeof F=="number")return F=F&255,typeof Uint8Array.prototype.indexOf=="function"?ve?Uint8Array.prototype.indexOf.call(X,F,j):Uint8Array.prototype.lastIndexOf.call(X,F,j):ue(X,[F],j,ae,ve);throw new TypeError("val must be string, number or Buffer")}function ue(X,F,j,ae,ve){let Ee=1,Ce=X.length,tt=F.length;if(ae!==void 0&&(ae=String(ae).toLowerCase(),ae==="ucs2"||ae==="ucs-2"||ae==="utf16le"||ae==="utf-16le")){if(X.length<2||F.length<2)return-1;Ee=2,Ce/=2,tt/=2,j/=2}function mt(wt,yt){return Ee===1?wt[yt]:wt.readUInt16BE(yt*Ee)}let ot;if(ve){let wt=-1;for(ot=j;ot<Ce;ot++)if(mt(X,ot)===mt(F,wt===-1?0:ot-wt)){if(wt===-1&&(wt=ot),ot-wt+1===tt)return wt*Ee}else wt!==-1&&(ot-=ot-wt),wt=-1}else for(j+tt>Ce&&(j=Ce-tt),ot=j;ot>=0;ot--){let wt=!0;for(let yt=0;yt<tt;yt++)if(mt(X,ot+yt)!==mt(F,yt)){wt=!1;break}if(wt)return ot}return-1}c.prototype.includes=function(F,j,ae){return this.indexOf(F,j,ae)!==-1},c.prototype.indexOf=function(F,j,ae){return se(this,F,j,ae,!0)},c.prototype.lastIndexOf=function(F,j,ae){return se(this,F,j,ae,!1)};function he(X,F,j,ae){j=Number(j)||0;const ve=X.length-j;ae?(ae=Number(ae),ae>ve&&(ae=ve)):ae=ve;const Ee=F.length;ae>Ee/2&&(ae=Ee/2);let Ce;for(Ce=0;Ce<ae;++Ce){const tt=parseInt(F.substr(Ce*2,2),16);if(jt(tt))return Ce;X[j+Ce]=tt}return Ce}function we(X,F,j,ae){return Gt(Ht(F,X.length-j),X,j,ae)}function fe(X,F,j,ae){return Gt(Ft(F),X,j,ae)}function me(X,F,j,ae){return Gt(Zt(F),X,j,ae)}function Re(X,F,j,ae){return Gt(rn(F,X.length-j),X,j,ae)}c.prototype.write=function(F,j,ae,ve){if(j===void 0)ve="utf8",ae=this.length,j=0;else if(ae===void 0&&typeof j=="string")ve=j,ae=this.length,j=0;else if(isFinite(j))j=j>>>0,isFinite(ae)?(ae=ae>>>0,ve===void 0&&(ve="utf8")):(ve=ae,ae=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Ee=this.length-j;if((ae===void 0||ae>Ee)&&(ae=Ee),F.length>0&&(ae<0||j<0)||j>this.length)throw new RangeError("Attempt to write outside buffer bounds");ve||(ve="utf8");let Ce=!1;for(;;)switch(ve){case"hex":return he(this,F,j,ae);case"utf8":case"utf-8":return we(this,F,j,ae);case"ascii":case"latin1":case"binary":return fe(this,F,j,ae);case"base64":return me(this,F,j,ae);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Re(this,F,j,ae);default:if(Ce)throw new TypeError("Unknown encoding: "+ve);ve=(""+ve).toLowerCase(),Ce=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ue(X,F,j){return F===0&&j===X.length?N.fromByteArray(X):N.fromByteArray(X.slice(F,j))}function Pe(X,F,j){j=Math.min(X.length,j);const ae=[];let ve=F;for(;ve<j;){const Ee=X[ve];let Ce=null,tt=Ee>239?4:Ee>223?3:Ee>191?2:1;if(ve+tt<=j){let mt,ot,wt,yt;switch(tt){case 1:Ee<128&&(Ce=Ee);break;case 2:mt=X[ve+1],(mt&192)===128&&(yt=(Ee&31)<<6|mt&63,yt>127&&(Ce=yt));break;case 3:mt=X[ve+1],ot=X[ve+2],(mt&192)===128&&(ot&192)===128&&(yt=(Ee&15)<<12|(mt&63)<<6|ot&63,yt>2047&&(yt<55296||yt>57343)&&(Ce=yt));break;case 4:mt=X[ve+1],ot=X[ve+2],wt=X[ve+3],(mt&192)===128&&(ot&192)===128&&(wt&192)===128&&(yt=(Ee&15)<<18|(mt&63)<<12|(ot&63)<<6|wt&63,yt>65535&&yt<1114112&&(Ce=yt))}}Ce===null?(Ce=65533,tt=1):Ce>65535&&(Ce-=65536,ae.push(Ce>>>10&1023|55296),Ce=56320|Ce&1023),ae.push(Ce),ve+=tt}return vt(ae)}const De=4096;function vt(X){const F=X.length;if(F<=De)return String.fromCharCode.apply(String,X);let j="",ae=0;for(;ae<F;)j+=String.fromCharCode.apply(String,X.slice(ae,ae+=De));return j}function _t(X,F,j){let ae="";j=Math.min(X.length,j);for(let ve=F;ve<j;++ve)ae+=String.fromCharCode(X[ve]&127);return ae}function St(X,F,j){let ae="";j=Math.min(X.length,j);for(let ve=F;ve<j;++ve)ae+=String.fromCharCode(X[ve]);return ae}function Mt(X,F,j){const ae=X.length;(!F||F<0)&&(F=0),(!j||j<0||j>ae)&&(j=ae);let ve="";for(let Ee=F;Ee<j;++Ee)ve+=dn[X[Ee]];return ve}function At(X,F,j){const ae=X.slice(F,j);let ve="";for(let Ee=0;Ee<ae.length-1;Ee+=2)ve+=String.fromCharCode(ae[Ee]+ae[Ee+1]*256);return ve}c.prototype.slice=function(F,j){const ae=this.length;F=~~F,j=j===void 0?ae:~~j,F<0?(F+=ae,F<0&&(F=0)):F>ae&&(F=ae),j<0?(j+=ae,j<0&&(j=0)):j>ae&&(j=ae),j<F&&(j=F);const ve=this.subarray(F,j);return Object.setPrototypeOf(ve,c.prototype),ve};function ct(X,F,j){if(X%1!==0||X<0)throw new RangeError("offset is not uint");if(X+F>j)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(F,j,ae){F=F>>>0,j=j>>>0,ae||ct(F,j,this.length);let ve=this[F],Ee=1,Ce=0;for(;++Ce<j&&(Ee*=256);)ve+=this[F+Ce]*Ee;return ve},c.prototype.readUintBE=c.prototype.readUIntBE=function(F,j,ae){F=F>>>0,j=j>>>0,ae||ct(F,j,this.length);let ve=this[F+--j],Ee=1;for(;j>0&&(Ee*=256);)ve+=this[F+--j]*Ee;return ve},c.prototype.readUint8=c.prototype.readUInt8=function(F,j){return F=F>>>0,j||ct(F,1,this.length),this[F]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(F,j){return F=F>>>0,j||ct(F,2,this.length),this[F]|this[F+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(F,j){return F=F>>>0,j||ct(F,2,this.length),this[F]<<8|this[F+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(F,j){return F=F>>>0,j||ct(F,4,this.length),(this[F]|this[F+1]<<8|this[F+2]<<16)+this[F+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(F,j){return F=F>>>0,j||ct(F,4,this.length),this[F]*16777216+(this[F+1]<<16|this[F+2]<<8|this[F+3])},c.prototype.readBigUInt64LE=Kt(function(F){F=F>>>0,ut(F,"offset");const j=this[F],ae=this[F+7];(j===void 0||ae===void 0)&&Tt(F,this.length-8);const ve=j+this[++F]*2**8+this[++F]*2**16+this[++F]*2**24,Ee=this[++F]+this[++F]*2**8+this[++F]*2**16+ae*2**24;return BigInt(ve)+(BigInt(Ee)<<BigInt(32))}),c.prototype.readBigUInt64BE=Kt(function(F){F=F>>>0,ut(F,"offset");const j=this[F],ae=this[F+7];(j===void 0||ae===void 0)&&Tt(F,this.length-8);const ve=j*2**24+this[++F]*2**16+this[++F]*2**8+this[++F],Ee=this[++F]*2**24+this[++F]*2**16+this[++F]*2**8+ae;return(BigInt(ve)<<BigInt(32))+BigInt(Ee)}),c.prototype.readIntLE=function(F,j,ae){F=F>>>0,j=j>>>0,ae||ct(F,j,this.length);let ve=this[F],Ee=1,Ce=0;for(;++Ce<j&&(Ee*=256);)ve+=this[F+Ce]*Ee;return Ee*=128,ve>=Ee&&(ve-=Math.pow(2,8*j)),ve},c.prototype.readIntBE=function(F,j,ae){F=F>>>0,j=j>>>0,ae||ct(F,j,this.length);let ve=j,Ee=1,Ce=this[F+--ve];for(;ve>0&&(Ee*=256);)Ce+=this[F+--ve]*Ee;return Ee*=128,Ce>=Ee&&(Ce-=Math.pow(2,8*j)),Ce},c.prototype.readInt8=function(F,j){return F=F>>>0,j||ct(F,1,this.length),this[F]&128?(255-this[F]+1)*-1:this[F]},c.prototype.readInt16LE=function(F,j){F=F>>>0,j||ct(F,2,this.length);const ae=this[F]|this[F+1]<<8;return ae&32768?ae|4294901760:ae},c.prototype.readInt16BE=function(F,j){F=F>>>0,j||ct(F,2,this.length);const ae=this[F+1]|this[F]<<8;return ae&32768?ae|4294901760:ae},c.prototype.readInt32LE=function(F,j){return F=F>>>0,j||ct(F,4,this.length),this[F]|this[F+1]<<8|this[F+2]<<16|this[F+3]<<24},c.prototype.readInt32BE=function(F,j){return F=F>>>0,j||ct(F,4,this.length),this[F]<<24|this[F+1]<<16|this[F+2]<<8|this[F+3]},c.prototype.readBigInt64LE=Kt(function(F){F=F>>>0,ut(F,"offset");const j=this[F],ae=this[F+7];(j===void 0||ae===void 0)&&Tt(F,this.length-8);const ve=this[F+4]+this[F+5]*2**8+this[F+6]*2**16+(ae<<24);return(BigInt(ve)<<BigInt(32))+BigInt(j+this[++F]*2**8+this[++F]*2**16+this[++F]*2**24)}),c.prototype.readBigInt64BE=Kt(function(F){F=F>>>0,ut(F,"offset");const j=this[F],ae=this[F+7];(j===void 0||ae===void 0)&&Tt(F,this.length-8);const ve=(j<<24)+this[++F]*2**16+this[++F]*2**8+this[++F];return(BigInt(ve)<<BigInt(32))+BigInt(this[++F]*2**24+this[++F]*2**16+this[++F]*2**8+ae)}),c.prototype.readFloatLE=function(F,j){return F=F>>>0,j||ct(F,4,this.length),I.read(this,F,!0,23,4)},c.prototype.readFloatBE=function(F,j){return F=F>>>0,j||ct(F,4,this.length),I.read(this,F,!1,23,4)},c.prototype.readDoubleLE=function(F,j){return F=F>>>0,j||ct(F,8,this.length),I.read(this,F,!0,52,8)},c.prototype.readDoubleBE=function(F,j){return F=F>>>0,j||ct(F,8,this.length),I.read(this,F,!1,52,8)};function Qe(X,F,j,ae,ve,Ee){if(!c.isBuffer(X))throw new TypeError('"buffer" argument must be a Buffer instance');if(F>ve||F<Ee)throw new RangeError('"value" argument is out of bounds');if(j+ae>X.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(F,j,ae,ve){if(F=+F,j=j>>>0,ae=ae>>>0,!ve){const tt=Math.pow(2,8*ae)-1;Qe(this,F,j,ae,tt,0)}let Ee=1,Ce=0;for(this[j]=F&255;++Ce<ae&&(Ee*=256);)this[j+Ce]=F/Ee&255;return j+ae},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(F,j,ae,ve){if(F=+F,j=j>>>0,ae=ae>>>0,!ve){const tt=Math.pow(2,8*ae)-1;Qe(this,F,j,ae,tt,0)}let Ee=ae-1,Ce=1;for(this[j+Ee]=F&255;--Ee>=0&&(Ce*=256);)this[j+Ee]=F/Ce&255;return j+ae},c.prototype.writeUint8=c.prototype.writeUInt8=function(F,j,ae){return F=+F,j=j>>>0,ae||Qe(this,F,j,1,255,0),this[j]=F&255,j+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(F,j,ae){return F=+F,j=j>>>0,ae||Qe(this,F,j,2,65535,0),this[j]=F&255,this[j+1]=F>>>8,j+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(F,j,ae){return F=+F,j=j>>>0,ae||Qe(this,F,j,2,65535,0),this[j]=F>>>8,this[j+1]=F&255,j+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(F,j,ae){return F=+F,j=j>>>0,ae||Qe(this,F,j,4,4294967295,0),this[j+3]=F>>>24,this[j+2]=F>>>16,this[j+1]=F>>>8,this[j]=F&255,j+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(F,j,ae){return F=+F,j=j>>>0,ae||Qe(this,F,j,4,4294967295,0),this[j]=F>>>24,this[j+1]=F>>>16,this[j+2]=F>>>8,this[j+3]=F&255,j+4};function Lt(X,F,j,ae,ve){et(F,ae,ve,X,j,7);let Ee=Number(F&BigInt(4294967295));X[j++]=Ee,Ee=Ee>>8,X[j++]=Ee,Ee=Ee>>8,X[j++]=Ee,Ee=Ee>>8,X[j++]=Ee;let Ce=Number(F>>BigInt(32)&BigInt(4294967295));return X[j++]=Ce,Ce=Ce>>8,X[j++]=Ce,Ce=Ce>>8,X[j++]=Ce,Ce=Ce>>8,X[j++]=Ce,j}function gt(X,F,j,ae,ve){et(F,ae,ve,X,j,7);let Ee=Number(F&BigInt(4294967295));X[j+7]=Ee,Ee=Ee>>8,X[j+6]=Ee,Ee=Ee>>8,X[j+5]=Ee,Ee=Ee>>8,X[j+4]=Ee;let Ce=Number(F>>BigInt(32)&BigInt(4294967295));return X[j+3]=Ce,Ce=Ce>>8,X[j+2]=Ce,Ce=Ce>>8,X[j+1]=Ce,Ce=Ce>>8,X[j]=Ce,j+8}c.prototype.writeBigUInt64LE=Kt(function(F,j=0){return Lt(this,F,j,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=Kt(function(F,j=0){return gt(this,F,j,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(F,j,ae,ve){if(F=+F,j=j>>>0,!ve){const mt=Math.pow(2,8*ae-1);Qe(this,F,j,ae,mt-1,-mt)}let Ee=0,Ce=1,tt=0;for(this[j]=F&255;++Ee<ae&&(Ce*=256);)F<0&&tt===0&&this[j+Ee-1]!==0&&(tt=1),this[j+Ee]=(F/Ce>>0)-tt&255;return j+ae},c.prototype.writeIntBE=function(F,j,ae,ve){if(F=+F,j=j>>>0,!ve){const mt=Math.pow(2,8*ae-1);Qe(this,F,j,ae,mt-1,-mt)}let Ee=ae-1,Ce=1,tt=0;for(this[j+Ee]=F&255;--Ee>=0&&(Ce*=256);)F<0&&tt===0&&this[j+Ee+1]!==0&&(tt=1),this[j+Ee]=(F/Ce>>0)-tt&255;return j+ae},c.prototype.writeInt8=function(F,j,ae){return F=+F,j=j>>>0,ae||Qe(this,F,j,1,127,-128),F<0&&(F=255+F+1),this[j]=F&255,j+1},c.prototype.writeInt16LE=function(F,j,ae){return F=+F,j=j>>>0,ae||Qe(this,F,j,2,32767,-32768),this[j]=F&255,this[j+1]=F>>>8,j+2},c.prototype.writeInt16BE=function(F,j,ae){return F=+F,j=j>>>0,ae||Qe(this,F,j,2,32767,-32768),this[j]=F>>>8,this[j+1]=F&255,j+2},c.prototype.writeInt32LE=function(F,j,ae){return F=+F,j=j>>>0,ae||Qe(this,F,j,4,2147483647,-2147483648),this[j]=F&255,this[j+1]=F>>>8,this[j+2]=F>>>16,this[j+3]=F>>>24,j+4},c.prototype.writeInt32BE=function(F,j,ae){return F=+F,j=j>>>0,ae||Qe(this,F,j,4,2147483647,-2147483648),F<0&&(F=4294967295+F+1),this[j]=F>>>24,this[j+1]=F>>>16,this[j+2]=F>>>8,this[j+3]=F&255,j+4},c.prototype.writeBigInt64LE=Kt(function(F,j=0){return Lt(this,F,j,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=Kt(function(F,j=0){return gt(this,F,j,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ae(X,F,j,ae,ve,Ee){if(j+ae>X.length)throw new RangeError("Index out of range");if(j<0)throw new RangeError("Index out of range")}function Ye(X,F,j,ae,ve){return F=+F,j=j>>>0,ve||Ae(X,F,j,4),I.write(X,F,j,ae,23,4),j+4}c.prototype.writeFloatLE=function(F,j,ae){return Ye(this,F,j,!0,ae)},c.prototype.writeFloatBE=function(F,j,ae){return Ye(this,F,j,!1,ae)};function qt(X,F,j,ae,ve){return F=+F,j=j>>>0,ve||Ae(X,F,j,8),I.write(X,F,j,ae,52,8),j+8}c.prototype.writeDoubleLE=function(F,j,ae){return qt(this,F,j,!0,ae)},c.prototype.writeDoubleBE=function(F,j,ae){return qt(this,F,j,!1,ae)},c.prototype.copy=function(F,j,ae,ve){if(!c.isBuffer(F))throw new TypeError("argument should be a Buffer");if(ae||(ae=0),!ve&&ve!==0&&(ve=this.length),j>=F.length&&(j=F.length),j||(j=0),ve>0&&ve<ae&&(ve=ae),ve===ae||F.length===0||this.length===0)return 0;if(j<0)throw new RangeError("targetStart out of bounds");if(ae<0||ae>=this.length)throw new RangeError("Index out of range");if(ve<0)throw new RangeError("sourceEnd out of bounds");ve>this.length&&(ve=this.length),F.length-j<ve-ae&&(ve=F.length-j+ae);const Ee=ve-ae;return this===F&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(j,ae,ve):Uint8Array.prototype.set.call(F,this.subarray(ae,ve),j),Ee},c.prototype.fill=function(F,j,ae,ve){if(typeof F=="string"){if(typeof j=="string"?(ve=j,j=0,ae=this.length):typeof ae=="string"&&(ve=ae,ae=this.length),ve!==void 0&&typeof ve!="string")throw new TypeError("encoding must be a string");if(typeof ve=="string"&&!c.isEncoding(ve))throw new TypeError("Unknown encoding: "+ve);if(F.length===1){const Ce=F.charCodeAt(0);(ve==="utf8"&&Ce<128||ve==="latin1")&&(F=Ce)}}else typeof F=="number"?F=F&255:typeof F=="boolean"&&(F=Number(F));if(j<0||this.length<j||this.length<ae)throw new RangeError("Out of range index");if(ae<=j)return this;j=j>>>0,ae=ae===void 0?this.length:ae>>>0,F||(F=0);let Ee;if(typeof F=="number")for(Ee=j;Ee<ae;++Ee)this[Ee]=F;else{const Ce=c.isBuffer(F)?F:c.from(F,ve),tt=Ce.length;if(tt===0)throw new TypeError('The value "'+F+'" is invalid for argument "value"');for(Ee=0;Ee<ae-j;++Ee)this[Ee+j]=Ce[Ee%tt]}return this};const Ot={};function Ke(X,F,j){Ot[X]=class extends j{constructor(){super(),Object.defineProperty(this,"message",{value:F.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${X}]`,this.stack,delete this.name}get code(){return X}set code(ve){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:ve,writable:!0})}toString(){return`${this.name} [${X}]: ${this.message}`}}}Ke("ERR_BUFFER_OUT_OF_BOUNDS",function(X){return X?`${X} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Ke("ERR_INVALID_ARG_TYPE",function(X,F){return`The "${X}" argument must be of type number. Received type ${typeof F}`},TypeError),Ke("ERR_OUT_OF_RANGE",function(X,F,j){let ae=`The value of "${X}" is out of range.`,ve=j;return Number.isInteger(j)&&Math.abs(j)>2**32?ve=Ve(String(j)):typeof j=="bigint"&&(ve=String(j),(j>BigInt(2)**BigInt(32)||j<-(BigInt(2)**BigInt(32)))&&(ve=Ve(ve)),ve+="n"),ae+=` It must be ${F}. Received ${ve}`,ae},RangeError);function Ve(X){let F="",j=X.length;const ae=X[0]==="-"?1:0;for(;j>=ae+4;j-=3)F=`_${X.slice(j-3,j)}${F}`;return`${X.slice(0,j)}${F}`}function Xe(X,F,j){ut(F,"offset"),(X[F]===void 0||X[F+j]===void 0)&&Tt(F,X.length-(j+1))}function et(X,F,j,ae,ve,Ee){if(X>j||X<F){const Ce=typeof F=="bigint"?"n":"";let tt;throw F===0||F===BigInt(0)?tt=`>= 0${Ce} and < 2${Ce} ** ${(Ee+1)*8}${Ce}`:tt=`>= -(2${Ce} ** ${(Ee+1)*8-1}${Ce}) and < 2 ** ${(Ee+1)*8-1}${Ce}`,new Ot.ERR_OUT_OF_RANGE("value",tt,X)}Xe(ae,ve,Ee)}function ut(X,F){if(typeof X!="number")throw new Ot.ERR_INVALID_ARG_TYPE(F,"number",X)}function Tt(X,F,j){throw Math.floor(X)!==X?(ut(X,j),new Ot.ERR_OUT_OF_RANGE("offset","an integer",X)):F<0?new Ot.ERR_BUFFER_OUT_OF_BOUNDS:new Ot.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${F}`,X)}const Ct=/[^+/0-9A-Za-z-_]/g;function Dt(X){if(X=X.split("=")[0],X=X.trim().replace(Ct,""),X.length<2)return"";for(;X.length%4!==0;)X=X+"=";return X}function Ht(X,F){F=F||1/0;let j;const ae=X.length;let ve=null;const Ee=[];for(let Ce=0;Ce<ae;++Ce){if(j=X.charCodeAt(Ce),j>55295&&j<57344){if(!ve){if(j>56319){(F-=3)>-1&&Ee.push(239,191,189);continue}else if(Ce+1===ae){(F-=3)>-1&&Ee.push(239,191,189);continue}ve=j;continue}if(j<56320){(F-=3)>-1&&Ee.push(239,191,189),ve=j;continue}j=(ve-55296<<10|j-56320)+65536}else ve&&(F-=3)>-1&&Ee.push(239,191,189);if(ve=null,j<128){if((F-=1)<0)break;Ee.push(j)}else if(j<2048){if((F-=2)<0)break;Ee.push(j>>6|192,j&63|128)}else if(j<65536){if((F-=3)<0)break;Ee.push(j>>12|224,j>>6&63|128,j&63|128)}else if(j<1114112){if((F-=4)<0)break;Ee.push(j>>18|240,j>>12&63|128,j>>6&63|128,j&63|128)}else throw new Error("Invalid code point")}return Ee}function Ft(X){const F=[];for(let j=0;j<X.length;++j)F.push(X.charCodeAt(j)&255);return F}function rn(X,F){let j,ae,ve;const Ee=[];for(let Ce=0;Ce<X.length&&!((F-=2)<0);++Ce)j=X.charCodeAt(Ce),ae=j>>8,ve=j%256,Ee.push(ve),Ee.push(ae);return Ee}function Zt(X){return N.toByteArray(Dt(X))}function Gt(X,F,j,ae){let ve;for(ve=0;ve<ae&&!(ve+j>=F.length||ve>=X.length);++ve)F[ve+j]=X[ve];return ve}function Ut(X,F){return X instanceof F||X!=null&&X.constructor!=null&&X.constructor.name!=null&&X.constructor.name===F.name}function jt(X){return X!==X}const dn=function(){const X="0123456789abcdef",F=new Array(256);for(let j=0;j<16;++j){const ae=j*16;for(let ve=0;ve<16;++ve)F[ae+ve]=X[j]+X[ve]}return F}();function Kt(X){return typeof BigInt>"u"?zt:X}function zt(){throw new Error("BigInt not supported")}}(buffer)),buffer}var toolsEbml={},hasRequiredToolsEbml;function requireToolsEbml(){if(hasRequiredToolsEbml)return toolsEbml;hasRequiredToolsEbml=1;var O=toolsEbml&&toolsEbml.__assign||function(){return O=Object.assign||function(f){for(var k,i=1,c=arguments.length;i<c;i++){k=arguments[i];for(var $ in k)Object.prototype.hasOwnProperty.call(k,$)&&(f[$]=k[$])}return f},O.apply(this,arguments)},N=toolsEbml&&toolsEbml.__spreadArray||function(f,k,i){if(i||arguments.length===2)for(var c=0,$=k.length,C;c<$;c++)(C||!(c in k))&&(C||(C=Array.prototype.slice.call(k,0,c)),C[c]=k[c]);return f.concat(C||Array.prototype.slice.call(k))};Object.defineProperty(toolsEbml,"__esModule",{value:!0});var I=requireTools(),D=function(){function f(){}return f.readVint=function(k,i){i===void 0&&(i=0);var c=8-Math.floor(Math.log2(k[i]));if(c>8){var $=f.readHexString(k,i,i+c);throw new Error("Unrepresentable length: ".concat(c," ").concat($))}if(i+c>k.length)return null;for(var C=k[i]&(1<<8-c)-1,M=1;M<c;M+=1){if(M===7&&C>=Math.pow(2,8)&&k[i+7]>0)return{length:c,value:-1};C*=Math.pow(2,8),C+=k[i+M]}return{length:c,value:C}},f.writeVint=function(k){if(k<0||k>Math.pow(2,53))throw new Error("Unrepresentable value: ".concat(k));var i=1;for(i=1;i<=8&&!(k<Math.pow(2,7*i)-1);i+=1);for(var c=I.Buffer.alloc(i),$=k,C=1;C<=i;C+=1){var M=$&255;c[i-C]=M,$-=M,$/=Math.pow(2,8)}return c[0]|=1<<8-i,c},f.concatenate=function(k,i){return!k&&!i?I.Buffer.from([]):!k||k.byteLength===0?i:!i||i.byteLength===0?k:I.Buffer.from(N(N([],k,!0),i,!0))},f.readHexString=function(k,i,c){return i===void 0&&(i=0),c===void 0&&(c=k.byteLength),Array.from(k.slice(i,c)).map(function($){return Number($).toString(16)}).reduce(function($,C){return"".concat($).concat(C.padStart(2,"0"))},"")},f.readUtf8=function(k){try{return I.Buffer.from(k).toString("utf8")}catch{return null}},f.readUnsigned=function(k){var i=new DataView(k.buffer,k.byteOffset,k.byteLength);switch(k.byteLength){case 1:return i.getUint8(0);case 2:return i.getUint16(0);case 4:return i.getUint32(0)}return k.byteLength<=6?k.reduce(function(c,$){return c*256+$},0):f.readHexString(k,0,k.byteLength)},f.readSigned=function(k){var i=new DataView(k.buffer,k.byteOffset,k.byteLength);switch(k.byteLength){case 1:return i.getInt8(0);case 2:return i.getInt16(0);case 4:return i.getInt32(0);default:return NaN}},f.readFloat=function(k){var i=new DataView(k.buffer,k.byteOffset,k.byteLength);switch(k.byteLength){case 4:return i.getFloat32(0);case 8:return i.getFloat64(0);default:return NaN}},f.readDate=function(k){var i=new DataView(k.buffer,k.byteOffset,k.byteLength);switch(k.byteLength){case 1:return new Date(i.getUint8(0));case 2:return new Date(i.getUint16(0));case 4:return new Date(i.getUint32(0));case 8:return new Date(Number.parseInt(f.readHexString(k),16));default:return new Date(0)}},f.readDataFromTag=function(k,i){var c=k.type,$=k.name,C=k.track,M=k.discardable||!1,Z=k.keyframe||!1,J=null,z;switch(c){case"u":z=f.readUnsigned(i);break;case"f":z=f.readFloat(i);break;case"i":z=f.readSigned(i);break;case"s":z=String.fromCharCode.apply(String,i);break;case"8":z=f.readUtf8(i);break;case"d":z=f.readDate(i);break}if($==="SimpleBlock"||$==="Block"){var Q=0,ee=f.readVint(i,Q),Y=ee.length,te=ee.value;Q+=Y,C=te,z=f.readSigned(i.subarray(Q,Q+2)),Q+=2,$==="SimpleBlock"&&(Z=!!(i[Y+2]&128),M=!!(i[Y+2]&1)),Q+=1,J=i.subarray(Q)}return O(O({},k),{data:i,discardable:M,keyframe:Z,payload:J,track:C,value:z})},f}();return toolsEbml.default=D,toolsEbml}var vint,hasRequiredVint;function requireVint(){return hasRequiredVint||(hasRequiredVint=1,vint=function(O,N,I){N=N||0;for(var D=1;D<=8&&!(O[N]>=Math.pow(2,8-D));D++);if(D>8)throw new Error("Unrepresentable length: "+D+" "+O.toString("hex",N,N+D));if(N+D>O.length)return null;var f,k=O[N]&(1<<8-D)-1;for(f=1;f<D;f++){if(f===7&&k>=Math.pow(2,45)&&O[N+7]>0)return{length:D,value:-1};k*=Math.pow(2,8),k+=O[N+f]}return I&&(k-=Math.pow(2,D*7-1)-1),{length:D,value:k}}),vint}var bufferReader,hasRequiredBufferReader;function requireBufferReader(){if(hasRequiredBufferReader)return bufferReader;hasRequiredBufferReader=1;var O=requireVint();function N(I){this.buffer=I,this.offset=0}return N.prototype.nextInt16BE=function(){var I=this.buffer.readInt16BE(this.offset);return this.offset+=2,I},N.prototype.nextUInt8=function(){var I=this.buffer.readUInt8(this.offset);return this.offset+=1,I},N.prototype.nextUIntV=function(){var I=O(this.buffer,this.offset);return this.offset+=I.length,I.value},N.prototype.nextIntV=function(){var I=O(this.buffer,this.offset,!0);return this.offset+=I.length,I.value},N.prototype.nextBuffer=function(I){var D=I?this.buffer.slice(this.offset,this.offset+I):this.buffer.slice(this.offset);return this.offset+=I||this.length,D},Object.defineProperty(N.prototype,"length",{get:function(){return this.buffer.length-this.offset}}),bufferReader=N,bufferReader}var ebmlBlock,hasRequiredEbmlBlock;function requireEbmlBlock(){if(hasRequiredEbmlBlock)return ebmlBlock;hasRequiredEbmlBlock=1;var O=requireBufferReader(),N=1,I=3,D=2;ebmlBlock=function(k){var i={},c=new O(k);i.trackNumber=c.nextUIntV(),i.timecode=c.nextInt16BE();var $=c.nextUInt8();i.invisible=!!($&8),i.keyframe=!!($&128),i.discardable=!!($&1);var C=($&6)>>1;return i.frames=f(c,C),i};function f(k,i){if(!i)return[k.nextBuffer()];var c,$,C=[],M=k.nextUInt8()+1;if(i===D){if(k.length%M!==0)throw new Error("Fixed-Size Lacing Error");for($=k.length/M,c=0;c<M;c++)C.push(k.nextBuffer($));return C}var Z=[];if(i===N)for(c=0;c<M-1;c++){var J;$=0;do J=k.nextUInt8(),$+=J;while(J===255);Z.push($)}else if(i===I)for($=k.nextUIntV(),Z.push($),c=1;c<M-1;c++)$+=k.nextIntV(),Z.push($);for(c=0;c<M-1;c++)C.push(k.nextBuffer(Z[c]));return C.push(k.nextBuffer()),C}return ebmlBlock}var hasRequiredTools;function requireTools(){return hasRequiredTools||(hasRequiredTools=1,function(O){Object.defineProperty(O,"__esModule",{value:!0}),O.convertEBMLDateToJSDate=O.createFloatBuffer=O.createIntBuffer=O.createUIntBuffer=O.encodeValueToBuffer=O.concat=O.putRefinedMetaData=O.extractElement=O.removeElement=O.makeMetadataSeekable=O.createRIFFChunk=O.VP8BitStreamToRiffWebPBuffer=O.WebPBlockFilter=O.encodeTag=O.readBlock=O.ebmlBlock=O.writeVint=O.readVint=O.Buffer=void 0;var N=requireInt64Buffer(),I=requireEBMLEncoder(),D=requireBuffer(),f=requireToolsEbml(),k=requireEbmlBlock();O.Buffer=D.Buffer,O.readVint=f.default.readVint,O.writeVint=f.default.writeVint,O.ebmlBlock=k;function i(fe){return(0,O.ebmlBlock)(new O.Buffer(fe))}O.readBlock=i;function c(fe,me,Re){return Re===void 0&&(Re=!1),re([fe,Re?new O.Buffer("01ffffffffffffff","hex"):(0,O.writeVint)(me.length),me])}O.encodeTag=c;function $(fe){return fe.reduce(function(me,Re){if(Re.type!=="b"||Re.name!=="SimpleBlock")return me;var Ue=(0,O.ebmlBlock)(Re.data),Pe=Ue.frames.some(function(De){var vt=De.slice(3,6).toString("hex");return vt==="9d012a"});return Pe?me.concat(Re):me},[])}O.WebPBlockFilter=$;function C(fe){var me=M("VP8 ",fe),Re=re([new O.Buffer("WEBP","ascii"),me]);return M("RIFF",Re)}O.VP8BitStreamToRiffWebPBuffer=C;function M(fe,me){var Re=new O.Buffer(4);return Re.writeUInt32LE(me.byteLength,0),re([new O.Buffer(fe.substr(0,4),"ascii"),Re,me,new O.Buffer(me.byteLength%2===0?0:1)])}O.createRIFFChunk=M;function Z(fe,me,Re){var Ue=z("EBML",fe),Pe=ee(Ue),De=Pe+12,vt=fe[fe.length-1].dataEnd-De,_t=z("Info",fe);J("Duration",_t),_t.splice(1,0,{name:"Duration",type:"f",data:he(me,8)});for(var St=ee(_t),Mt=z("Tracks",fe),At=ee(Mt),ct=47,Qe=[],Lt=5+Re.length*15,gt=[],Ae=-1,Ye=10,qt=function(et){var ut=ct,Tt=ut+St,Ct=Tt+At,Dt=Ct+Lt,Ht=Dt-vt;if(Qe=[],Qe.push({name:"SeekHead",type:"m",isEnd:!1}),Qe.push({name:"Seek",type:"m",isEnd:!1}),Qe.push({name:"SeekID",type:"b",data:new O.Buffer([21,73,169,102])}),Qe.push({name:"SeekPosition",type:"u",data:se(ut)}),Qe.push({name:"Seek",type:"m",isEnd:!0}),Qe.push({name:"Seek",type:"m",isEnd:!1}),Qe.push({name:"SeekID",type:"b",data:new O.Buffer([22,84,174,107])}),Qe.push({name:"SeekPosition",type:"u",data:se(Tt)}),Qe.push({name:"Seek",type:"m",isEnd:!0}),Qe.push({name:"Seek",type:"m",isEnd:!1}),Qe.push({name:"SeekID",type:"b",data:new O.Buffer([28,83,187,107])}),Qe.push({name:"SeekPosition",type:"u",data:se(Ct)}),Qe.push({name:"Seek",type:"m",isEnd:!0}),Qe.push({name:"SeekHead",type:"m",isEnd:!0}),ct=ee(Qe),gt=[],gt.push({name:"Cues",type:"m",isEnd:!1}),Re.forEach(function(Ft){var rn=Ft.CueTrack,Zt=Ft.CueClusterPosition,Gt=Ft.CueTime;gt.push({name:"CuePoint",type:"m",isEnd:!1}),gt.push({name:"CueTime",type:"u",data:se(Gt)}),gt.push({name:"CueTrackPositions",type:"m",isEnd:!1}),gt.push({name:"CueTrack",type:"u",data:se(rn)}),Zt-=De,Zt+=Ht,gt.push({name:"CueClusterPosition",type:"u",data:se(Zt)}),gt.push({name:"CueTrackPositions",type:"m",isEnd:!0}),gt.push({name:"CuePoint",type:"m",isEnd:!0})}),gt.push({name:"Cues",type:"m",isEnd:!0}),Lt=ee(gt),Ae!==Ht){if(Ae=Ht,et===Ye-1)throw new Error("Failed to converge to a stable metadata size")}else return"break"},Ot=0;Ot<Ye;Ot++){var Ke=qt(Ot);if(Ke==="break")break}var Ve=[].concat.apply([],[Ue,{name:"Segment",type:"m",isEnd:!1,unknownSize:!0},Qe,_t,Mt,gt]),Xe=new I.default().encode(Ve);return Xe}O.makeMetadataSeekable=Z;function J(fe,me){for(var Re=-1,Ue=0;Ue<me.length;Ue++){var Pe=me[Ue];if(Pe.name===fe)if(Pe.type==="m")if(!Pe.isEnd)Re=Ue;else{if(Re==-1)throw new Error("Detected ".concat(fe," closing element before finding the start"));me.splice(Re,Ue-Re+1);return}else{me.splice(Ue,1);return}}}O.removeElement=J;function z(fe,me){for(var Re=[],Ue=-1,Pe=0;Pe<me.length;Pe++){var De=me[Pe];if(De.name===fe)if(De.type==="m")if(!De.isEnd)Ue=Pe;else{if(Ue==-1)throw new Error("Detected ".concat(fe," closing element before finding the start"));Re=me.slice(Ue,Pe+1);break}else{Re.push(me[Pe]);break}}return Re}O.extractElement=z;function Q(fe,me){Array.isArray(me.cueInfos)&&!Array.isArray(me.cues)&&(console.warn("putRefinedMetaData: info.cueInfos property is deprecated. please use info.cues"),me.cues=me.cueInfos);for(var Re=[],Ue=[],Pe=0;Pe<fe.length;Pe++){var De=fe[Pe];if(De.type==="m"&&De.name==="Segment"){if(Re=fe.slice(0,Pe),Ue=fe.slice(Pe),De.unknownSize){Ue.shift();break}throw new Error("this metadata is not streaming webm file")}}if(!(Ue[Ue.length-1].dataEnd>0))throw new Error("metadata dataEnd has wrong number");var vt=Ue[Ue.length-1].dataEnd,_t=Re[Re.length-1].dataEnd,St=new I.default().encode(Re).byteLength,Mt=St-_t,At=vt-Ue[0].tagStart;Ue[0].tagStart-_t,Ue[0].tagStart;var ct=new O.Buffer([24,83,128,103]),Qe=new O.Buffer("01ffffffffffffff","hex"),Lt=ct.byteLength+Qe.byteLength,gt=At,Ae;for(Ae=1;Ae<20;Ae++){var Ye=_t+Lt+gt,qt=Ye-vt,Ot=Mt+qt,Ke=Y(Ue,Ot,me),Ve=new I.default().encode(Ke).byteLength;if(Ve===gt)return new I.default().encode([].concat(Re,[{type:"m",name:"Segment",isEnd:!1,unknownSize:!0}],Ke));gt=Ve}throw new Error("unable to refine metadata, stable size could not be found in "+Ae+" iterations!")}O.putRefinedMetaData=Q;function ee(fe){var me=new I.default;return fe.reduce(function(Re,Ue){return Re.concat(me.encode([Ue]))},[]).reduce(function(Re,Ue){return Re+Ue.byteLength},0)}function Y(fe,me,Re){var Ue=Re.duration,Pe=Re.clusterPtrs,De=Re.cues,vt=fe.slice(0);if(typeof Ue=="number"){var _t=!1;vt.forEach(function(Mt){Mt.type==="f"&&Mt.name==="Duration"&&(_t=!0,Mt.data=he(Ue,8))}),_t||ye(vt,"Info",[{name:"Duration",type:"f",data:he(Ue,8)}])}Array.isArray(De)&&ye(vt,"Cues",ie(De,me));var St=[];return Array.isArray(Pe)&&(console.warn("append cluster pointers to seekhead is deprecated. please use cues"),St=te(Pe,me)),ye(vt,"SeekHead",St,!0),vt}function te(fe,me){var Re=[];return fe.forEach(function(Ue){Re.push({name:"Seek",type:"m",isEnd:!1}),Re.push({name:"SeekID",type:"b",data:new O.Buffer([31,67,182,117])}),Re.push({name:"SeekPosition",type:"u",data:se(Ue+me)}),Re.push({name:"Seek",type:"m",isEnd:!0})}),Re}function ie(fe,me){var Re=[];return fe.forEach(function(Ue){var Pe=Ue.CueTrack,De=Ue.CueClusterPosition,vt=Ue.CueTime;Re.push({name:"CuePoint",type:"m",isEnd:!1}),Re.push({name:"CueTime",type:"u",data:se(vt)}),Re.push({name:"CueTrackPositions",type:"m",isEnd:!1}),Re.push({name:"CueTrack",type:"u",data:se(Pe)}),Re.push({name:"CueClusterPosition",type:"u",data:se(De+me)}),Re.push({name:"CueTrackPositions",type:"m",isEnd:!0}),Re.push({name:"CuePoint",type:"m",isEnd:!0})}),Re}function ye(fe,me,Re,Ue){Ue===void 0&&(Ue=!1);for(var Pe=-1,De=0;De<fe.length;De++){var vt=fe[De];if(vt.type==="m"&&vt.name===me&&vt.isEnd===!1){Pe=De;break}}Pe>=0?Array.prototype.splice.apply(fe,[Pe+1,0].concat(Re)):Ue?[].concat([{name:me,type:"m",isEnd:!1}],Re,[{name:me,type:"m",isEnd:!0}]).reverse().forEach(function(_t){fe.unshift(_t)}):(fe.push({name:me,type:"m",isEnd:!1}),Re.forEach(function(_t){fe.push(_t)}),fe.push({name:me,type:"m",isEnd:!0}))}function re(fe){return O.Buffer.concat(fe)}O.concat=re;function de(fe){var me=new O.Buffer(0);if(fe.type==="m")return fe;switch(fe.type){case"u":me=se(fe.value);break;case"i":me=ue(fe.value);break;case"f":me=he(fe.value);break;case"s":me=new O.Buffer(fe.value,"ascii");break;case"8":me=new O.Buffer(fe.value,"utf8");break;case"b":me=fe.value;break;case"d":me=new N.Int64BE(fe.value.getTime().toString()).toBuffer();break}return Object.assign({},fe,{data:me})}O.encodeValueToBuffer=de;function se(fe){for(var me=1;fe>=Math.pow(2,8*me);me++);if(me>=7)return console.warn("7bit or more bigger uint not supported."),new N.Uint64BE(fe).toBuffer();var Re=new O.Buffer(me);return Re.writeUIntBE(fe,0,me),Re}O.createUIntBuffer=se;function ue(fe){for(var me=1;fe>=Math.pow(2,8*me);me++);if(me>=7)return console.warn("7bit or more bigger uint not supported."),new N.Int64BE(fe).toBuffer();var Re=new O.Buffer(me);return Re.writeIntBE(fe,0,me),Re}O.createIntBuffer=ue;function he(fe,me){if(me===void 0&&(me=8),me===8){var Re=new O.Buffer(8);return Re.writeDoubleBE(fe,0),Re}else if(me===4){var Re=new O.Buffer(4);return Re.writeFloatBE(fe,0),Re}else throw new Error("float type bits must 4bytes or 8bytes")}O.createFloatBuffer=he;function we(fe){return fe instanceof Date?fe:new Date(new Date("2001-01-01T00:00:00.000Z").getTime()+Number(fe)/1e3/1e3)}O.convertEBMLDateToJSDate=we}(tools)),tools}var hasRequiredEBMLDecoder;function requireEBMLDecoder(){if(hasRequiredEBMLDecoder)return EBMLDecoder;hasRequiredEBMLDecoder=1,Object.defineProperty(EBMLDecoder,"__esModule",{value:!0});var O=requireInt64Buffer(),N=requireTools(),I=requireTools(),D=requireEbmlID(),f;(function(i){i[i.STATE_TAG=1]="STATE_TAG",i[i.STATE_SIZE=2]="STATE_SIZE",i[i.STATE_CONTENT=3]="STATE_CONTENT"})(f||(f={}));var k=function(){function i(){this._buffer=new N.Buffer(0),this._tag_stack=[],this._state=f.STATE_TAG,this._cursor=0,this._total=0,this._schema=D.byEbmlID,this._result=[]}return i.prototype.decode=function(c){this.readChunk(c);var $=this._result;return this._result=[],$},i.prototype.readChunk=function(c){for(this._buffer=I.concat([this._buffer,new N.Buffer(c)]);this._cursor<this._buffer.length&&!(this._state===f.STATE_TAG&&!this.readTag()||this._state===f.STATE_SIZE&&!this.readSize()||this._state===f.STATE_CONTENT&&!this.readContent()););},i.prototype.getSchemaInfo=function(c){return this._schema[c]||{name:"unknown",level:-1,type:"unknown",description:"unknown"}},i.prototype.readTag=function(){if(this._cursor>=this._buffer.length)return!1;var c=(0,N.readVint)(this._buffer,this._cursor);if(c==null)return!1;var $=this._buffer.slice(this._cursor,this._cursor+c.length),C=$.reduce(function(J,z,Q,ee){return J+z*Math.pow(16,2*(ee.length-1-Q))},0),M=this.getSchemaInfo(C),Z={EBML_ID:C.toString(16),schema:M,type:M.type,name:M.name,level:M.level,tagStart:this._total,tagEnd:this._total+c.length,sizeStart:this._total+c.length,sizeEnd:null,dataStart:null,dataEnd:null,dataSize:null,data:null};return this._tag_stack.push(Z),this._cursor+=c.length,this._total+=c.length,this._state=f.STATE_SIZE,!0},i.prototype.readSize=function(){if(this._cursor>=this._buffer.length)return!1;var c=(0,N.readVint)(this._buffer,this._cursor);if(c==null)return!1;var $=this._tag_stack[this._tag_stack.length-1];return $.sizeEnd=$.sizeStart+c.length,$.dataStart=$.sizeEnd,$.dataSize=c.value,c.value===-1?($.dataEnd=-1,$.type==="m"&&($.unknownSize=!0)):$.dataEnd=$.sizeEnd+c.value,this._cursor+=c.length,this._total+=c.length,this._state=f.STATE_CONTENT,!0},i.prototype.readContent=function(){var c=this._tag_stack[this._tag_stack.length-1];if(c.type==="m"){if(c.isEnd=!1,this._result.push(c),this._state=f.STATE_TAG,c.dataSize===0){var $=Object.assign({},c,{isEnd:!0});this._result.push($),this._tag_stack.pop()}return!0}if(this._buffer.length<this._cursor+c.dataSize)return!1;var C=this._buffer.slice(this._cursor,this._cursor+c.dataSize);switch(this._buffer=this._buffer.slice(this._cursor+c.dataSize),c.data=C,c.type){case"u":c.value=C.readUIntBE(0,C.length);break;case"i":c.value=C.readIntBE(0,C.length);break;case"f":c.value=c.dataSize===4?C.readFloatBE(0):c.dataSize===8?C.readDoubleBE(0):(console.warn("cannot read ".concat(c.dataSize," octets float. failback to 0")),0);break;case"s":c.value=C.toString("ascii");break;case"8":c.value=C.toString("utf8");break;case"b":c.value=C;break;case"d":c.value=(0,N.convertEBMLDateToJSDate)(new O.Int64BE(C).toNumber());break}if(c.value===null)throw new Error("unknown tag type:"+c.type);for(this._result.push(c),this._total+=c.dataSize,this._state=f.STATE_TAG,this._cursor=0,this._tag_stack.pop();this._tag_stack.length>0;){var M=this._tag_stack[this._tag_stack.length-1];if(M.dataEnd<0)return this._tag_stack.pop(),!0;if(this._total<M.dataEnd)break;if(M.type!=="m")throw new Error("parent element is not master element");var $=Object.assign({},M,{isEnd:!0});this._result.push($),this._tag_stack.pop()}return!0},i}();return EBMLDecoder.default=k,EBMLDecoder}var EBMLReader={},events={exports:{}},hasRequiredEvents;function requireEvents(){if(hasRequiredEvents)return events.exports;hasRequiredEvents=1;var O=typeof Reflect=="object"?Reflect:null,N=O&&typeof O.apply=="function"?O.apply:function(de,se,ue){return Function.prototype.apply.call(de,se,ue)},I;O&&typeof O.ownKeys=="function"?I=O.ownKeys:Object.getOwnPropertySymbols?I=function(de){return Object.getOwnPropertyNames(de).concat(Object.getOwnPropertySymbols(de))}:I=function(de){return Object.getOwnPropertyNames(de)};function D(re){console&&console.warn&&console.warn(re)}var f=Number.isNaN||function(de){return de!==de};function k(){k.init.call(this)}events.exports=k,events.exports.once=te,k.EventEmitter=k,k.prototype._events=void 0,k.prototype._eventsCount=0,k.prototype._maxListeners=void 0;var i=10;function c(re){if(typeof re!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof re)}Object.defineProperty(k,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(re){if(typeof re!="number"||re<0||f(re))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+re+".");i=re}}),k.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},k.prototype.setMaxListeners=function(de){if(typeof de!="number"||de<0||f(de))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+de+".");return this._maxListeners=de,this};function $(re){return re._maxListeners===void 0?k.defaultMaxListeners:re._maxListeners}k.prototype.getMaxListeners=function(){return $(this)},k.prototype.emit=function(de){for(var se=[],ue=1;ue<arguments.length;ue++)se.push(arguments[ue]);var he=de==="error",we=this._events;if(we!==void 0)he=he&&we.error===void 0;else if(!he)return!1;if(he){var fe;if(se.length>0&&(fe=se[0]),fe instanceof Error)throw fe;var me=new Error("Unhandled error."+(fe?" ("+fe.message+")":""));throw me.context=fe,me}var Re=we[de];if(Re===void 0)return!1;if(typeof Re=="function")N(Re,this,se);else for(var Ue=Re.length,Pe=Q(Re,Ue),ue=0;ue<Ue;++ue)N(Pe[ue],this,se);return!0};function C(re,de,se,ue){var he,we,fe;if(c(se),we=re._events,we===void 0?(we=re._events=Object.create(null),re._eventsCount=0):(we.newListener!==void 0&&(re.emit("newListener",de,se.listener?se.listener:se),we=re._events),fe=we[de]),fe===void 0)fe=we[de]=se,++re._eventsCount;else if(typeof fe=="function"?fe=we[de]=ue?[se,fe]:[fe,se]:ue?fe.unshift(se):fe.push(se),he=$(re),he>0&&fe.length>he&&!fe.warned){fe.warned=!0;var me=new Error("Possible EventEmitter memory leak detected. "+fe.length+" "+String(de)+" listeners added. Use emitter.setMaxListeners() to increase limit");me.name="MaxListenersExceededWarning",me.emitter=re,me.type=de,me.count=fe.length,D(me)}return re}k.prototype.addListener=function(de,se){return C(this,de,se,!1)},k.prototype.on=k.prototype.addListener,k.prototype.prependListener=function(de,se){return C(this,de,se,!0)};function M(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Z(re,de,se){var ue={fired:!1,wrapFn:void 0,target:re,type:de,listener:se},he=M.bind(ue);return he.listener=se,ue.wrapFn=he,he}k.prototype.once=function(de,se){return c(se),this.on(de,Z(this,de,se)),this},k.prototype.prependOnceListener=function(de,se){return c(se),this.prependListener(de,Z(this,de,se)),this},k.prototype.removeListener=function(de,se){var ue,he,we,fe,me;if(c(se),he=this._events,he===void 0)return this;if(ue=he[de],ue===void 0)return this;if(ue===se||ue.listener===se)--this._eventsCount===0?this._events=Object.create(null):(delete he[de],he.removeListener&&this.emit("removeListener",de,ue.listener||se));else if(typeof ue!="function"){for(we=-1,fe=ue.length-1;fe>=0;fe--)if(ue[fe]===se||ue[fe].listener===se){me=ue[fe].listener,we=fe;break}if(we<0)return this;we===0?ue.shift():ee(ue,we),ue.length===1&&(he[de]=ue[0]),he.removeListener!==void 0&&this.emit("removeListener",de,me||se)}return this},k.prototype.off=k.prototype.removeListener,k.prototype.removeAllListeners=function(de){var se,ue,he;if(ue=this._events,ue===void 0)return this;if(ue.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):ue[de]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete ue[de]),this;if(arguments.length===0){var we=Object.keys(ue),fe;for(he=0;he<we.length;++he)fe=we[he],fe!=="removeListener"&&this.removeAllListeners(fe);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(se=ue[de],typeof se=="function")this.removeListener(de,se);else if(se!==void 0)for(he=se.length-1;he>=0;he--)this.removeListener(de,se[he]);return this};function J(re,de,se){var ue=re._events;if(ue===void 0)return[];var he=ue[de];return he===void 0?[]:typeof he=="function"?se?[he.listener||he]:[he]:se?Y(he):Q(he,he.length)}k.prototype.listeners=function(de){return J(this,de,!0)},k.prototype.rawListeners=function(de){return J(this,de,!1)},k.listenerCount=function(re,de){return typeof re.listenerCount=="function"?re.listenerCount(de):z.call(re,de)},k.prototype.listenerCount=z;function z(re){var de=this._events;if(de!==void 0){var se=de[re];if(typeof se=="function")return 1;if(se!==void 0)return se.length}return 0}k.prototype.eventNames=function(){return this._eventsCount>0?I(this._events):[]};function Q(re,de){for(var se=new Array(de),ue=0;ue<de;++ue)se[ue]=re[ue];return se}function ee(re,de){for(;de+1<re.length;de++)re[de]=re[de+1];re.pop()}function Y(re){for(var de=new Array(re.length),se=0;se<de.length;++se)de[se]=re[se].listener||re[se];return de}function te(re,de){return new Promise(function(se,ue){function he(fe){re.removeListener(de,we),ue(fe)}function we(){typeof re.removeListener=="function"&&re.removeListener("error",he),se([].slice.call(arguments))}ye(re,de,we,{once:!0}),de!=="error"&&ie(re,he,{once:!0})})}function ie(re,de,se){typeof re.on=="function"&&ye(re,"error",de,se)}function ye(re,de,se,ue){if(typeof re.on=="function")ue.once?re.once(de,se):re.on(de,se);else if(typeof re.addEventListener=="function")re.addEventListener(de,function he(we){ue.once&&re.removeEventListener(de,he),se(we)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof re)}return events.exports}var hasRequiredEBMLReader;function requireEBMLReader(){if(hasRequiredEBMLReader)return EBMLReader;hasRequiredEBMLReader=1;var O=EBMLReader&&EBMLReader.__extends||function(){var f=function(k,i){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,$){c.__proto__=$}||function(c,$){for(var C in $)Object.prototype.hasOwnProperty.call($,C)&&(c[C]=$[C])},f(k,i)};return function(k,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");f(k,i);function c(){this.constructor=k}k.prototype=i===null?Object.create(i):(c.prototype=i.prototype,new c)}}();Object.defineProperty(EBMLReader,"__esModule",{value:!0});var N=requireEvents(),I=requireTools(),D=function(f){O(k,f);function k(){var i=f.call(this)||this;return i.logGroup="",i.hasLoggingStarted=!1,i.metadataloaded=!1,i.chunks=[],i.stack=[],i.segmentOffset=0,i.last2SimpleBlockVideoTrackTimecode=[0,0],i.last2SimpleBlockAudioTrackTimecode=[0,0],i.lastClusterTimecode=0,i.lastClusterPosition=0,i.timecodeScale=1e6,i.metadataSize=0,i.metadatas=[],i.cues=[],i.firstVideoBlockRead=!1,i.firstAudioBlockRead=!1,i.currentTrack={TrackNumber:-1,TrackType:-1,DefaultDuration:null,CodecDelay:null},i.trackTypes=[],i.trackDefaultDuration=[],i.trackCodecDelay=[],i.trackInfo={type:"nothing"},i.ended=!1,i.logging=!1,i.use_duration_every_simpleblock=!1,i.use_webp=!1,i.use_segment_info=!0,i.drop_default_duration=!0,i}return k.prototype.stop=function(){for(this.ended=!0,this.emit_segment_info();this.stack.length;)this.stack.pop(),this.logging&&console.groupEnd();this.logging&&this.hasLoggingStarted&&this.logGroup&&console.groupEnd()},k.prototype.emit_segment_info=function(){var i=this.chunks;if(this.chunks=[],this.metadataloaded){if(!this.use_segment_info)return;var C=this.lastClusterTimecode,M=this.duration,Z=this.timecodeScale;this.emit("cluster",{timecode:C,data:i}),this.emit("duration",{timecodeScale:Z,duration:M})}else{this.metadataloaded=!0,this.metadatas=i;var c=this.trackTypes.indexOf(1),$=this.trackTypes.indexOf(2);if(this.trackInfo=c>=0&&$>=0?{type:"both",trackNumber:c}:c>=0?{type:"video",trackNumber:c}:$>=0?{type:"audio",trackNumber:$}:{type:"nothing"},!this.use_segment_info)return;this.emit("metadata",{data:i,metadataSize:this.metadataSize})}},k.prototype.read=function(i){var c=this,$=!1;if(!this.ended){if(i.type==="m")if(i.isEnd)this.stack.pop();else{var C=this.stack[this.stack.length-1];if(C!=null&&C.level>=i.level){this.stack.pop(),this.logging&&console.groupEnd(),C.dataEnd=i.dataEnd,C.dataSize=i.dataEnd-C.dataStart,C.unknownSize=!1;var M=Object.assign({},C,{name:C.name,type:C.type,isEnd:!0});this.chunks.push(M)}this.stack.push(i)}if(i.type==="m"&&i.name=="Segment")this.segmentOffset!=0&&console.warn("Multiple segments detected!"),this.segmentOffset=i.dataStart,this.emit("segment_offset",this.segmentOffset);else if(i.type==="b"&&i.name==="SimpleBlock"){var Z=I.ebmlBlock(i.data),J=Z.timecode,z=Z.trackNumber,Q=Z.frames;if(this.trackTypes[z]===1){if(!this.firstVideoBlockRead&&(this.firstVideoBlockRead=!0,this.trackInfo.type==="both"||this.trackInfo.type==="video")){var ee=this.lastClusterTimecode+J;this.cues.push({CueTrack:z,CueClusterPosition:this.lastClusterPosition,CueTime:ee}),this.emit("cue_info",{CueTrack:z,CueClusterPosition:this.lastClusterPosition,CueTime:this.lastClusterTimecode}),this.emit("cue",{CueTrack:z,CueClusterPosition:this.lastClusterPosition,CueTime:ee})}this.last2SimpleBlockVideoTrackTimecode=[this.last2SimpleBlockVideoTrackTimecode[1],J]}else if(this.trackTypes[z]===2){if(!this.firstAudioBlockRead&&(this.firstAudioBlockRead=!0,this.trackInfo.type==="audio")){var ee=this.lastClusterTimecode+J;this.cues.push({CueTrack:z,CueClusterPosition:this.lastClusterPosition,CueTime:ee}),this.emit("cue_info",{CueTrack:z,CueClusterPosition:this.lastClusterPosition,CueTime:this.lastClusterTimecode}),this.emit("cue",{CueTrack:z,CueClusterPosition:this.lastClusterPosition,CueTime:ee})}this.last2SimpleBlockAudioTrackTimecode=[this.last2SimpleBlockAudioTrackTimecode[1],J]}this.use_duration_every_simpleblock&&this.emit("duration",{timecodeScale:this.timecodeScale,duration:this.duration}),this.use_webp&&Q.forEach(function(Y){var te=Y.slice(3,6).toString("hex");if(te==="9d012a"){var ie=I.VP8BitStreamToRiffWebPBuffer(Y),ye=new Blob([ie],{type:"image/webp"}),re=c.duration;c.emit("webp",{currentTime:re,webp:ye})}})}else i.type==="m"&&i.name==="Cluster"&&i.isEnd===!1?(this.firstVideoBlockRead=!1,this.firstAudioBlockRead=!1,this.emit_segment_info(),this.emit("cluster_ptr",i.tagStart),this.lastClusterPosition=i.tagStart):i.type==="u"&&i.name==="Timecode"?this.lastClusterTimecode=i.value:i.type==="u"&&i.name==="TimecodeScale"?this.timecodeScale=i.value:i.type==="m"&&i.name==="TrackEntry"?i.isEnd?(this.trackTypes[this.currentTrack.TrackNumber]=this.currentTrack.TrackType,this.trackDefaultDuration[this.currentTrack.TrackNumber]=this.currentTrack.DefaultDuration,this.trackCodecDelay[this.currentTrack.TrackNumber]=this.currentTrack.CodecDelay):this.currentTrack={TrackNumber:-1,TrackType:-1,DefaultDuration:null,CodecDelay:null}:i.type==="u"&&i.name==="TrackType"?this.currentTrack.TrackType=i.value:i.type==="u"&&i.name==="TrackNumber"?this.currentTrack.TrackNumber=i.value:i.type==="u"&&i.name==="CodecDelay"?this.currentTrack.CodecDelay=i.value:i.type==="u"&&i.name==="DefaultDuration"?this.drop_default_duration?(console.warn("DefaultDuration detected!, remove it"),$=!0):this.currentTrack.DefaultDuration=i.value:i.name==="unknown"&&console.warn(i);!this.metadataloaded&&i.dataEnd>0&&(this.metadataSize=i.dataEnd),$||this.chunks.push(i),this.logging&&this.put(i)}},Object.defineProperty(k.prototype,"duration",{get:function(){if(this.trackInfo.type==="nothing")return console.warn("no video, no audio track"),0;var i=0,c=0,$=0,C=this.trackDefaultDuration[this.trackInfo.trackNumber];if(typeof C=="number")i=C;else if(this.trackInfo.type==="both")if(this.last2SimpleBlockAudioTrackTimecode[1]>this.last2SimpleBlockVideoTrackTimecode[1]){i=(this.last2SimpleBlockAudioTrackTimecode[1]-this.last2SimpleBlockAudioTrackTimecode[0])*this.timecodeScale;var M=this.trackCodecDelay[this.trackTypes.indexOf(2)];typeof M=="number"&&(c=M),$=this.last2SimpleBlockAudioTrackTimecode[1]}else{i=(this.last2SimpleBlockVideoTrackTimecode[1]-this.last2SimpleBlockVideoTrackTimecode[0])*this.timecodeScale;var M=this.trackCodecDelay[this.trackTypes.indexOf(1)];typeof M=="number"&&(c=M),$=this.last2SimpleBlockVideoTrackTimecode[1]}else if(this.trackInfo.type==="video"){i=(this.last2SimpleBlockVideoTrackTimecode[1]-this.last2SimpleBlockVideoTrackTimecode[0])*this.timecodeScale;var M=this.trackCodecDelay[this.trackInfo.trackNumber];typeof M=="number"&&(c=M),$=this.last2SimpleBlockVideoTrackTimecode[1]}else if(this.trackInfo.type==="audio"){i=(this.last2SimpleBlockAudioTrackTimecode[1]-this.last2SimpleBlockAudioTrackTimecode[0])*this.timecodeScale;var M=this.trackCodecDelay[this.trackInfo.trackNumber];typeof M=="number"&&(c=M),$=this.last2SimpleBlockAudioTrackTimecode[1]}var Z=(this.lastClusterTimecode+$)*this.timecodeScale+i-c,J=Z/this.timecodeScale;return Math.floor(J)},enumerable:!1,configurable:!0}),k.prototype.addListener=function(i,c){return f.prototype.addListener.call(this,i,c)},k.prototype.put=function(i){this.hasLoggingStarted||(this.hasLoggingStarted=!0,this.logging&&this.logGroup&&console.groupCollapsed(this.logGroup)),i.type==="m"?i.isEnd?console.groupEnd():console.group(i.name+":"+i.tagStart):i.type==="b"?console.log(i.name,i.type):console.log(i.name,i.tagStart,i.type,i.value)},k}(N.EventEmitter);return EBMLReader.default=D,EBMLReader}var hasRequiredEbml;function requireEbml(){return hasRequiredEbml||(hasRequiredEbml=1,function(O){var N=ebml&&ebml.__createBinding||(Object.create?function(c,$,C,M){M===void 0&&(M=C),Object.defineProperty(c,M,{enumerable:!0,get:function(){return $[C]}})}:function(c,$,C,M){M===void 0&&(M=C),c[M]=$[C]}),I=ebml&&ebml.__exportStar||function(c,$){for(var C in c)C!=="default"&&!Object.prototype.hasOwnProperty.call($,C)&&N($,c,C)};Object.defineProperty(O,"__esModule",{value:!0}),O.tools=O.Reader=O.Encoder=O.Decoder=void 0,I(requireEBML(),O);var D=requireEBMLDecoder();O.Decoder=D.default;var f=requireEBMLEncoder();O.Encoder=f.default;var k=requireEBMLReader();O.Reader=k.default;var i=requireTools();O.tools=i}(ebml)),ebml}var hasRequiredLib;function requireLib(){if(hasRequiredLib)return lib;hasRequiredLib=1;var O=lib&&lib.__awaiter||function(f,k,i,c){function $(C){return C instanceof i?C:new i(function(M){M(C)})}return new(i||(i=Promise))(function(C,M){function Z(Q){try{z(c.next(Q))}catch(ee){M(ee)}}function J(Q){try{z(c.throw(Q))}catch(ee){M(ee)}}function z(Q){Q.done?C(Q.value):$(Q.value).then(Z,J)}z((c=c.apply(f,k||[])).next())})},N=lib&&lib.__generator||function(f,k){var i={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},c,$,C,M;return M={next:Z(0),throw:Z(1),return:Z(2)},typeof Symbol=="function"&&(M[Symbol.iterator]=function(){return this}),M;function Z(z){return function(Q){return J([z,Q])}}function J(z){if(c)throw new TypeError("Generator is already executing.");for(;i;)try{if(c=1,$&&(C=z[0]&2?$.return:z[0]?$.throw||((C=$.return)&&C.call($),0):$.next)&&!(C=C.call($,z[1])).done)return C;switch($=0,C&&(z=[z[0]&2,C.value]),z[0]){case 0:case 1:C=z;break;case 4:return i.label++,{value:z[1],done:!1};case 5:i.label++,$=z[1],z=[0];continue;case 7:z=i.ops.pop(),i.trys.pop();continue;default:if(C=i.trys,!(C=C.length>0&&C[C.length-1])&&(z[0]===6||z[0]===2)){i=0;continue}if(z[0]===3&&(!C||z[1]>C[0]&&z[1]<C[3])){i.label=z[1];break}if(z[0]===6&&i.label<C[1]){i.label=C[1],C=z;break}if(C&&i.label<C[2]){i.label=C[2],i.ops.push(z);break}C[2]&&i.ops.pop(),i.trys.pop();continue}z=k.call(f,i)}catch(Q){z=[6,Q],$=0}finally{c=C=0}if(z[0]&5)throw z[1];return{value:z[0]?z[1]:void 0,done:!0}}};Object.defineProperty(lib,"__esModule",{value:!0});var I=requireEbml();function D(f){return O(this,void 0,void 0,function(){var k,i,c,$,C,M,Z,J,z,Q,ee,Y;return N(this,function(te){switch(te.label){case 0:if(!f)throw Error("call to fixWebmDuration requires a blob");k=new I.Decoder,i=new I.Reader,c=f.stream(),$=c.getReader(),te.label=1;case 1:return[4,$.read()];case 2:return C=te.sent(),M=C.done,Z=C.value,M?(i.stop(),[3,3]):(J=k.decode(Z),J=J==null?void 0:J.filter(function(ie){return ie.type!=="unknown"}),J.forEach(function(ie){i.read(ie)}),Z=null,[3,1]);case 3:return z=I.tools.makeMetadataSeekable(i.metadatas,i.duration,i.cues),Q=new Blob([z],{type:f.type}),ee=f.slice(i.metadataSize),Y=new Blob([Q,ee],{type:f.type}),[2,Y]}})})}return lib.default=D,lib}var libExports=requireLib();const fixWebmDuration=getDefaultExportFromCjs(libExports);class StreamRecorder{constructor(){Ge(this,Wt);Ge(this,cn,!1);Ge(this,an,!1);Ge(this,gn,0);Ge(this,kn,0);Ge(this,Xt,0);Ge(this,tn,0);Ge(this,ln,0);_e(this,"onchange",N=>{});_e(this,"onDurationChange",N=>{});_e(this,"start",async(N="")=>{N||(N=`video_Record_${E(Date.now())}`);let I=[];return navigator.mediaDevices.getDisplayMedia({audio:!0,video:!0}).then(D=>{const f=D.getTracks();for(const i of f)i.onended=()=>this.stop();kt(this,cn,!0),kt(this,an,!1),kt(this,Wt,new MediaRecorder(D)),Oe(this,Wt).start();const k=new Date().getTime();kt(this,gn,k),kt(this,Xt,k),Oe(this,un).call(this),Oe(this,Sn).call(this),Oe(this,Wt).addEventListener("dataavailable",i=>{I.push(i.data)}),Oe(this,Wt).addEventListener("stop",async()=>{kt(this,cn,!1);const i=new Date().getTime();kt(this,kn,i),kt(this,tn,Oe(this,tn)+(i-Oe(this,Xt))),Oe(this,un).call(this),clearInterval(Oe(this,ln));const c=D.getTracks();for(const J of c)J.stop();if(Oe(this,Wt)===null)return;const $=new Blob(I,{type:Oe(this,Wt).mimeType}),C=await fixWebmDuration($),M=URL.createObjectURL(C),Z=document.createElement("a");Z.href=M,Z.download=`${N}.mp4`,Z.click(),URL.revokeObjectURL(M),I=[],kt(this,Wt,null)})})});_e(this,"pause",async()=>{var I;await new Promise(D=>setTimeout(()=>D(!0),300)),(I=Oe(this,Wt))==null||I.pause(),kt(this,an,!0);const N=new Date().getTime();kt(this,tn,Oe(this,tn)+(N-Oe(this,Xt))),Oe(this,un).call(this),clearInterval(Oe(this,ln))});_e(this,"resume",async()=>{var I;(I=Oe(this,Wt))==null||I.resume(),kt(this,an,!1);const N=new Date().getTime();kt(this,Xt,N),Oe(this,un).call(this),Oe(this,Sn).call(this)});_e(this,"stop",async()=>{var N;(N=Oe(this,Wt))==null||N.stop()});_e(this,"getDuration",()=>{if(Oe(this,Xt)===0)return 0;let N=Oe(this,tn);const I=new Date().getTime();if(Oe(this,cn)&&Oe(this,an)===!1){const D=I-Oe(this,Xt);kt(this,Xt,I),N=N+D}return N});_e(this,"getInfo",()=>({active:Oe(this,cn),pause:Oe(this,an),startTime:Oe(this,gn),endTime:Oe(this,kn),duration:Oe(this,tn)}));Ge(this,un,()=>{const N=this.getInfo();this.onchange(N)});Ge(this,Sn,()=>{clearInterval(Oe(this,ln)),kt(this,ln,window.setInterval(()=>{kt(this,tn,this.getDuration()),this.onDurationChange(Oe(this,tn))},500))})}}Wt=new WeakMap,cn=new WeakMap,an=new WeakMap,gn=new WeakMap,kn=new WeakMap,Xt=new WeakMap,tn=new WeakMap,ln=new WeakMap,un=new WeakMap,Sn=new WeakMap;var l=Object.defineProperty,y=O=>{throw TypeError(O)},q=(O,N,I)=>N in O?l(O,N,{enumerable:!0,configurable:!0,writable:!0,value:I}):O[N]=I,s=(O,N,I)=>q(O,typeof N!="symbol"?N+"":N,I),P=(O,N,I)=>N.has(O)||y("Cannot "+I),n=(O,N,I)=>(P(O,N,"read from private field"),I?I.call(O):N.get(O)),a=(O,N,I)=>N.has(O)?y("Cannot add the same private member more than once"):N instanceof WeakSet?N.add(O):N.set(O,I),d,x,u;class p{constructor(N={}){s(this,"queue",[]),s(this,"timer",0),s(this,"activeIndex",0),s(this,"activePromise"),s(this,"options",{timeout:0}),s(this,"add",(I,D={})=>new Promise(async(f,k)=>{const i=D.timeout||this.options.timeout,c=D.key||n(this,d).call(this),$=D.describe||"";if(this.queue.findIndex(M=>M.key===c)!==-1)return k(`${c} is exist.`);const C={key:c,func:I,describe:$,timeout:i,resolve:f,reject:k};this.queue.unshift(C),this.activePromise||n(this,u).call(this)})),s(this,"clear",()=>{this.queue=[],clearTimeout(this.timer)}),a(this,d,()=>(this.activeIndex=this.activeIndex+1,`${this.activeIndex}`)),a(this,x,I=>{const D=this.queue.findIndex(f=>f.key===I);this.queue.splice(D,1)}),a(this,u,async()=>{const I=this.queue.length;if(I===0)return;const D=I-1,f=this.queue[D];this.activePromise=f;const{key:k,func:i,resolve:c,reject:$,timeout:C}=this.activePromise;C&&(this.timer=window.setTimeout(()=>{$(`pr-async-queue: ${k} is timeout.`),n(this,u).call(this)},C)),await i().then(c).catch($).finally(()=>{clearTimeout(this.timer),this.activePromise=void 0,n(this,x).call(this,k),n(this,u).call(this)})}),this.options={timeout:0,...N}}}d=new WeakMap,x=new WeakMap,u=new WeakMap;class RoomBase{constructor(N){_e(this,"options",{appid:"",sdkToken:"",roomId:"",userId:"",earlyId:"",callType:0,debug:!1,reportErr:!0,logUrl:"https://logs1.quickvo.org",newPublishAutoSubscribe:!0});_e(this,"sdk_service_version","1.0.6");_e(this,"prohibitNotify",!1);_e(this,"isEarly",!1);_e(this,"isInRoom",!1);_e(this,"asyncQueue");_e(this,"roomState","ready");_e(this,"createAt",Date.now());_e(this,"cwsIns");_e(this,"peerIns");_e(this,"transceiverMap",new Map);_e(this,"sendChannel");_e(this,"receiveChannel");_e(this,"userMap",new Map);_e(this,"setLocalStreamActiveMap",new Map);_e(this,"phoneyStreams",new Map);_e(this,"recorder",new StreamRecorder);_e(this,"networkQualityTester",new NetworkQualityTester);_e(this,"mediaDevicesErrInfo",{microphoneCamera_audio:"",microphoneCamera_video:"",screenSharing_video:"",screenSharing_audio:""});_e(this,"reportLogs",(N,I="未知错误")=>{const{appid:D,userId:f,earlyId:k="",logUrl:i,reportErr:c}=this.options;if(!c)return;const $="web",C=M=>({ws_c_timeout:0,webrtc_c_timeout:1,join_room_error:2,publish_error:3,subscribe_error:4,close_track_error:5,heartbeat_e_timeout:6,heartbeat_i_timeout:7,quit_room_error:8})[M].toString();{const M=C(N),Z={origin:$,type:M,app_id:D,user_id:f,ins_id:k,desc:I},J=btoa(encodeURI(JSON.stringify(Z))),z=`${i}/upload/log?log_key=${J}`;{const Q=localStorage.getItem("#quickvo.logs")||JSON.stringify([]),Y=new TextEncoder().encode(Q),te=pako.deflate(Y,{gzip:!0});this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: reportLogs",{obj:Z,url:z,size:lt(te.byteLength)}),fetch(z,{headers:{"Content-Type":"multipart/form-data"},method:"POST",body:te})}}});_e(this,"initPhoneyStreams",(N,I=[])=>{I.length===0&&(I=mediaType_keys);for(const D of I){const f=this.phoneyStreams.get(D);if(f){const k=f.getTracks();for(const i of k)i.stop()}switch(D){case"microphoneCamera_audio":this.phoneyStreams.set("microphoneCamera_audio",createMutedAudioStream(N));break;case"microphoneCamera_video":this.phoneyStreams.set("microphoneCamera_video",createFakeVideoStream());break;case"screenSharing_audio":this.phoneyStreams.set("screenSharing_audio",createMutedAudioStream(N));break;case"screenSharing_video":this.phoneyStreams.set("screenSharing_video",createFakeVideoStream());break}}});_e(this,"getPhoneyStreams",N=>this.phoneyStreams.get(N));_e(this,"getRoomInfo",()=>{const{options:N,roomState:I,createAt:D}=this;return{...N,roomState:I,createAt:D}});_e(this,"setRoomState",N=>{this.roomState=N;const I=enum_roomState[N],D={state:N,stateStr:I};this.cwsIns.emitNotify("onRoomState",{code:200,data:D,desc:"room state is change."})});_e(this,"setOptions",async N=>{const I={...this.options,...N};this.options=I});_e(this,"stopStream",async N=>{const I=N.getTracks();for(const D of I)D.stop()});_e(this,"getMediaDevicesErrInfo",async()=>{try{const N=await navigator.mediaDevices.enumerateDevices();N.find(D=>D.kind==="audioinput")||(this.mediaDevicesErrInfo.microphoneCamera_audio="audioinput is not available."),N.find(D=>D.kind==="videoinput")||(this.mediaDevicesErrInfo.microphoneCamera_video="videoinput is not available.")}catch(N){this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: getMediaDevicesErrInfo is error.",N)}return this.mediaDevicesErrInfo});_e(this,"getUserMediaKey",(N,I)=>`${N}-${I}`);_e(this,"getCallAction",async N=>{let I="";const D=k=>N.findIndex(({type:c,enabled:$=!0})=>c===k&&$)===-1?"0":"1";return I=`${D(0)}${I}`,I=`${D(1)}${I}`,I=`${D(2)}${I}`,I=`${D(3)}${I}`,parseInt(I,2)});_e(this,"getCallActionMap",(N=0)=>{const D=Number(N).toString(2).padStart(4,"0").split(""),[f,k,i,c]=D;return{microphoneCamera_audio:!!Number(c),microphoneCamera_video:!!Number(i),screenSharing_video:!!Number(k),screenSharing_audio:!!Number(f)}});_e(this,"getBanBehaviorMap",(N=0)=>{const D=Number(N).toString(2).padStart(4,"0").split(""),[f,k,i,c]=D;return{microphoneCamera_audio:!!Number(c),microphoneCamera_video:!!Number(i),screenSharing_video:!!Number(k),screenSharing_audio:!!Number(f)}});_e(this,"getAverageVolume",(N,I)=>{N.getByteFrequencyData(I);let D=0;for(let k=0;k<I.length;k++)D+=I[k];return Math.ceil(D/I.length)});_e(this,"getTrackNamesFormTracks",(N,I=[],D="trackName")=>{const f=[];for(const k of N){const{type:i}=k;if(I.length===0||I.includes(i)){const c=k[D];c&&f.push(`${c}`)}}return f});_e(this,"usersFilter",N=>dt(N,["id","isSelf","isOwner","joinTime","tracks","network","permissions","isPublished","updateStreams","callAction","callActionStr","callActionMap","banBehavior","banBehaviorStr","banBehaviorMap"]).sort((f,k)=>f.id.localeCompare(k.id,"en")));this.setOptions(N),this.cwsIns=new CallsWebSocket({...N}),this.asyncQueue=new p}}var m=Object.defineProperty,G=(O,N,I)=>N in O?m(O,N,{enumerable:!0,configurable:!0,writable:!0,value:I}):O[N]=I,e$1=(O,N,I)=>G(O,typeof N!="symbol"?N+"":N,I);class g{constructor(N,I){e$1(this,"inputStream",new MediaStream),e$1(this,"outputStream",new MediaStream),e$1(this,"inputGain",1),e$1(this,"enhanceGain",1),e$1(this,"bgsGain",1),e$1(this,"bgmGain",1),e$1(this,"outputGain",1),e$1(this,"mixAudioMap",new Map),e$1(this,"audioContext",new AudioContext),e$1(this,"sourceNode"),e$1(this,"inputGainNode"),e$1(this,"enhanceGainNode"),e$1(this,"bgsGainNode"),e$1(this,"bgmGainNode"),e$1(this,"analyserNode"),e$1(this,"analyserArrayData"),e$1(this,"outputGainNode"),e$1(this,"destinationNode"),e$1(this,"filterStream",D=>D),e$1(this,"stop",()=>{{const D=this.inputStream.getTracks();for(const f of D)f.stop(),this.inputStream.removeTrack(f)}}),e$1(this,"getStream",()=>this.filterStream(this.outputStream)),e$1(this,"setMute",(D=!0)=>{D?this.analyserNode.disconnect(this.outputGainNode):this.analyserNode.connect(this.outputGainNode)}),e$1(this,"setInputGain",D=>{this.inputGain=D,this.inputGainNode.gain.setValueAtTime(D,this.audioContext.currentTime)}),e$1(this,"setEnhanceGain",async D=>{this.enhanceGain=D+1,this.enhanceGainNode.gain.setValueAtTime(this.enhanceGain,this.audioContext.currentTime)}),e$1(this,"setBgsGain",D=>{this.bgsGain=D,this.bgsGainNode.gain.setValueAtTime(D,this.audioContext.currentTime)}),e$1(this,"setBgmGain",D=>{this.bgmGain=D,this.bgmGainNode.gain.setValueAtTime(D,this.audioContext.currentTime)}),e$1(this,"setOutputGain",D=>{this.outputGain=D,this.outputGainNode.gain.setValueAtTime(this.outputGain,this.audioContext.currentTime)}),e$1(this,"getVolume",()=>{const{analyserNode:D,analyserArrayData:f}=this;D.getByteFrequencyData(f);let k=0;for(let i=0;i<f.length;i++)k+=f[i];return Math.ceil(k/f.length)}),e$1(this,"mixAudio",(D,f="bgm")=>new Promise(async(k,i)=>{try{{const C=this.mixAudioMap.get(f);C&&C.stop()}const c=f==="bgs"?this.bgsGainNode:this.bgmGainNode,$=this.audioContext.createBufferSource();this.mixAudioMap.set(f,$),$.buffer=D,$.connect(c),$.onended=()=>{$.disconnect(c),this.mixAudioMap.delete(f),k(!0)},$.start(0)}catch(c){i(c)}})),e$1(this,"mixAudioStop",D=>{const f=this.mixAudioMap.get(D);f==null||f.stop()}),e$1(this,"changeMix",(D,f)=>{const k=D==="bgs"?this.bgsGainNode:this.bgmGainNode;f?k.connect(this.destinationNode):k.disconnect(this.destinationNode)}),I&&(this.audioContext=I),this.inputStream=N,this.sourceNode=this.audioContext.createMediaStreamSource(this.inputStream),this.inputGainNode=this.audioContext.createGain(),this.inputGainNode.gain.setValueAtTime(this.inputGain,this.audioContext.currentTime),this.enhanceGainNode=this.audioContext.createGain(),this.enhanceGainNode.gain.setValueAtTime(this.enhanceGain,this.audioContext.currentTime),this.bgsGainNode=this.audioContext.createGain(),this.bgsGainNode.gain.setValueAtTime(this.bgsGain,this.audioContext.currentTime),this.bgmGainNode=this.audioContext.createGain(),this.bgmGainNode.gain.setValueAtTime(this.bgmGain,this.audioContext.currentTime),this.analyserNode=this.audioContext.createAnalyser(),this.analyserNode.fftSize=512,this.analyserArrayData=new Uint8Array(this.analyserNode.frequencyBinCount),this.outputGainNode=this.audioContext.createGain(),this.outputGainNode.gain.setValueAtTime(this.outputGain,this.audioContext.currentTime),this.destinationNode=this.audioContext.createMediaStreamDestination(),this.outputStream=this.destinationNode.stream;{const{sourceNode:D,inputGainNode:f,enhanceGainNode:k,bgsGainNode:i,bgmGainNode:c,analyserNode:$,outputGainNode:C,destinationNode:M}=this;D.connect(f),f.connect(k),k.connect($),i.connect($),c.connect($),k.connect(M),i.connect(M),c.connect(M),$.connect(C),C.connect(this.audioContext.destination)}this.setMute(!0),this.audioContext.resume()}}class RoomMedias extends RoomBase{constructor(I){super(I);Ge(this,pn,[]);Ge(this,Vt,new Map);Ge(this,Nt,new Map);Ge(this,en,new Map);Ge(this,nn,new Map);Ge(this,sn,new Map);_e(this,"localStreamsActionMap",new Map);Ge(this,mn,new Map);_e(this,"audioContext",new(window.AudioContext||window.webkitAudioContext));_e(this,"initMediaPhoneyStreams",(I=[])=>this.initPhoneyStreams(this.audioContext,I));_e(this,"initLocalStreamsFilter",()=>{for(const I of mediaType_keys){const D=async f=>f;Oe(this,mn).set(I,D)}});_e(this,"setLocalFilterStream",(I,D)=>{Oe(this,mn).set(I,D)});Ge(this,Nn,()=>{Oe(this,Nt).set("microphoneCamera_audio",{autoGainControl:!0,echoCancellation:!0,noiseSuppression:!0}),Oe(this,Nt).set("microphoneCamera_video",{frameRate:{min:10,ideal:30}}),Oe(this,Nt).set("screenSharing_video",{frameRate:{min:10,ideal:30}}),Oe(this,Nt).set("screenSharing_audio",{autoGainControl:!0,echoCancellation:!0,noiseSuppression:!0})});Ge(this,Mn,()=>{Oe(this,Vt).set("audioinput","default"),Oe(this,Vt).set("videoinput","default"),Oe(this,Vt).set("audiooutput","default")});_e(this,"emitNotifyUpdateUsersStreams",async I=>{this.cwsIns.emitNotify("onRoomUsersStreams",{code:200,data:I,desc:"users streams is change."})});_e(this,"initUserMediaStreamContext",async(I,D,f)=>{const[k]=f.getTracks();if(!k){console.warn("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: tracks.length is 0.",{userId:I,mediaType:D,stream:f});return}this.removeUserMediaStreamContext(I,D);const i=this.getUserMediaKey(I,D),{kind:c}=k;switch(c){case"audio":{const $=new MediaStream;$.addTrack(k);const C=new g($,this.audioContext);Oe(this,en).set(i,C)}break;case"video":{const $=new VideoMediaContext(k);Oe(this,nn).set(i,$)}break}});_e(this,"getUserMediaStreamContext",(I,D)=>{const f=this.getUserMediaKey(I,D);if(["microphoneCamera_audio","screenSharing_audio"].includes(D))return Oe(this,en).get(f);if(["microphoneCamera_video","screenSharing_video"].includes(D))return Oe(this,nn).get(f)});_e(this,"getUserAudioMediaStreamContext",(I,D)=>{const f=this.getUserMediaKey(I,D);return Oe(this,en).get(f)});_e(this,"removeUserMediaStreamContext",(I,D)=>{const f=this.getUserMediaKey(I,D);if(["microphoneCamera_audio","screenSharing_audio"].includes(D)){const k=Oe(this,en).get(f);return k==null||k.stop(),Oe(this,en).delete(f)}if(["microphoneCamera_video","screenSharing_video"].includes(D)){const k=Oe(this,nn).get(f);return k==null||k.stop(),Oe(this,nn).get(f)}});_e(this,"getUserStream",(I,D)=>{const f=this.getUserMediaStreamContext(I,D);return(f==null?void 0:f.getStream())||new MediaStream});_e(this,"getUserStreams",(I,D=[])=>{D.length===0&&(D=mediaType_keys);const f={};for(const k of D){const i=this.getUserStream(I,k);f[k]=i}return f});_e(this,"removeUserStreams",async(I,D=[])=>{D.length===0&&(D=mediaType_keys);for(const f of D)this.removeUserMediaStreamContext(I,f)});_e(this,"clearUserStreams",()=>{{const I=Oe(this,en).values();for(const D of I)D.stop();kt(this,en,new Map)}{const I=Oe(this,nn).values();for(const D of I)D.stop();kt(this,nn,new Map)}});_e(this,"setMediaTrackConstraints",async(I,D)=>{Oe(this,Nt).set(I,D);const f=await this.getLocalStream(I);if(!f)return;const k=f.getTracks();if(k.length!==0)for(const i of k){const c=i.getConstraints(),C={...Oe(this,Nt).get(I),...c,...D};await i.applyConstraints(C)}});_e(this,"stopLocalStreams",async(I=[])=>{I.length===0&&(I=mediaType_keys);for(const D of I){const f=Oe(this,sn).get(D);f&&await this.stopStream(f),Oe(this,sn).delete(D)}});_e(this,"addLocalStream",(I,D)=>{const f=Oe(this,sn).get(I);f&&this.stopStream(f),Oe(this,sn).set(I,D)});_e(this,"initLocalStream",async I=>{switch(I){case"microphoneCamera_audio":{const D=Oe(this,Vt).get("audioinput"),f=Oe(this,Nt).get("microphoneCamera_audio"),k=await navigator.mediaDevices.getUserMedia({audio:{deviceId:D,...f},video:!1});this.addLocalStream("microphoneCamera_audio",k)}break;case"microphoneCamera_video":{const D=Oe(this,Vt).get("videoinput"),f=Oe(this,Nt).get("microphoneCamera_video"),k=await navigator.mediaDevices.getUserMedia({audio:!1,video:{deviceId:D,...f}});this.addLocalStream("microphoneCamera_video",k)}break;case"microphoneCamera":{const D=Oe(this,Vt).get("audioinput"),f=Oe(this,Vt).get("videoinput"),k=Oe(this,Nt).get("microphoneCamera_audio"),i=Oe(this,Nt).get("microphoneCamera_video"),$=(await navigator.mediaDevices.getUserMedia({audio:{deviceId:D,...k},video:{deviceId:f,...i}})).getTracks();for(const C of $){const{kind:M}=C;if(M==="audio"){const Z=new MediaStream;Z.addTrack(C),this.addLocalStream("microphoneCamera_audio",Z)}if(M==="video"){const Z=new MediaStream;Z.addTrack(C),this.addLocalStream("microphoneCamera_video",Z)}}}break;case"screenSharing_audio":{const D=Oe(this,Nt).get("screenSharing_audio"),k=(await navigator.mediaDevices.getDisplayMedia({audio:!0,video:!0,...D})).getTracks();for(const i of k){const{kind:c}=i;if(c==="audio"){const $=new MediaStream;$.addTrack(i),this.addLocalStream("screenSharing_audio",$)}}}break;case"screenSharing_video":{const D=Oe(this,Nt).get(I),k=(await navigator.mediaDevices.getDisplayMedia({audio:!1,video:!0,...D})).getTracks();for(const i of k){const{kind:c}=i;if(c==="video"){const $=new MediaStream;$.addTrack(i),this.addLocalStream("screenSharing_video",$)}}}break;case"screenSharing":{const D=Oe(this,Nt).get("screenSharing_audio"),f=Oe(this,Nt).get("screenSharing_video"),i=(await navigator.mediaDevices.getDisplayMedia({audio:!0,video:!0,...D,...f})).getTracks();for(const c of i){const{kind:$}=c;if($==="audio"){const C=new MediaStream;C.addTrack(c),this.addLocalStream("screenSharing_audio",C)}if($==="video"){const C=new MediaStream;C.addTrack(c),this.addLocalStream("screenSharing_video",C)}}}break}});_e(this,"getLocalStream",async I=>{const D=Oe(this,sn).get(I),f=Oe(this,mn).get(I);let k=D;return D&&f&&(k=await f(D)),k});_e(this,"getLocalStreams",async(I=[])=>{I.length===0&&(I=mediaType_keys);const D={};for(const f of I)D[f]=await this.getLocalStream(f);return D});Ge(this,yn,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(I=>{const D=I.filter(f=>!["communications"].includes(f.deviceId));kt(this,pn,D.sort((f,k)=>f.label.localeCompare(k.label,"zh-Hans-CN",{sensitivity:"accent"})))}).catch(function(I){console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: getEnumerateDevices is err",I)}),Oe(this,pn)));Ge(this,qn,()=>{navigator.mediaDevices&&(navigator.mediaDevices.ondevicechange=async()=>{await Oe(this,yn).call(this),this.cwsIns.emitNotify("onDevicechange",{code:200,data:{},desc:"device is change."})}),Oe(this,yn).call(this)});_e(this,"getMediaDeviceKind",I=>Oe(this,Vt).get(I));_e(this,"changeAudiooutput",async()=>{try{const I=Oe(this,Vt).get("audiooutput");await this.audioContext.setSinkId(I)}catch(I){console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: setSinkId is error.",I)}});_e(this,"setDeviceKind",(I,D)=>{Oe(this,Vt).set(I,D)});_e(this,"setAudioOutputDevice",I=>this.setDeviceKind("audiooutput",I));_e(this,"getEnumerateDevices",async I=>(await Oe(this,yn).call(this),Oe(this,pn).filter(f=>f.kind===I)));_e(this,"getEnumerateAudioinputDevices",()=>this.getEnumerateDevices("audioinput"));_e(this,"getEnumerateAudioOutputDevices",()=>this.getEnumerateDevices("audiooutput"));_e(this,"getEnumerateVideoinputDevices",()=>this.getEnumerateDevices("videoinput"));Oe(this,qn).call(this),Oe(this,Mn).call(this),Oe(this,Nn).call(this),this.initPhoneyStreams(this.audioContext),document.addEventListener("click",()=>{var D;((D=this.audioContext)==null?void 0:D.state)==="suspended"&&this.audioContext.resume()})}}pn=new WeakMap,Vt=new WeakMap,Nt=new WeakMap,en=new WeakMap,nn=new WeakMap,sn=new WeakMap,mn=new WeakMap,Nn=new WeakMap,Mn=new WeakMap,yn=new WeakMap,qn=new WeakMap;class RoomUsers extends RoomMedias{constructor(I){super(I);_e(this,"getMaxVolumeUser",()=>{const I=Array.from(this.userMap.values(),({id:f})=>f);if(I.length===0)return;let D=[];for(const f of I){const k=this.getUserAudioMediaStreamContext(f,"microphoneCamera_audio");if(!k)continue;const i=k.getVolume();D.push({id:f,volume:i})}return D=D.sort((f,k)=>f.volume-k.volume>0?-1:1),D[0]});_e(this,"setVolume",(I,D,f)=>{const k=this.getUserAudioMediaStreamContext(I,D);k==null||k.setInputGain(f)});_e(this,"setEnhanceGain",async(I,D,f)=>{const k=this.getUserAudioMediaStreamContext(I,D);k==null||k.setEnhanceGain(f)});_e(this,"setSpeaker",(I,D,f)=>{const k=this.getUserAudioMediaStreamContext(I,D);k==null||k.setOutputGain(f);const i=f===0;k==null||k.setMute(i)});_e(this,"playBgs",(I,D,f)=>{const k=this.getUserAudioMediaStreamContext(I,D);return k==null?void 0:k.mixAudio(f,"bgs")});_e(this,"setBgsGain",(I,D,f)=>{const k=this.getUserAudioMediaStreamContext(I,D);k==null||k.setBgsGain(f)});_e(this,"stopBgs",(I,D)=>{const f=this.getUserAudioMediaStreamContext(I,D);f==null||f.mixAudioStop("bgs")});_e(this,"playBgm",(I,D,f)=>{const k=this.getUserAudioMediaStreamContext(I,D);return k==null?void 0:k.mixAudio(f,"bgm")});_e(this,"setBgmGain",(I,D,f)=>{const k=this.getUserAudioMediaStreamContext(I,D);k==null||k.setBgmGain(f)});_e(this,"stopBgm",(I,D)=>{const f=this.getUserAudioMediaStreamContext(I,D);f==null||f.mixAudioStop("bgm")});_e(this,"changBgsMix",(I,D,f)=>{const k=this.getUserAudioMediaStreamContext(I,D);k==null||k.changeMix("bgs",f)});_e(this,"changBgmMix",(I,D,f)=>{const k=this.getUserAudioMediaStreamContext(I,D);k==null||k.changeMix("bgm",f)});_e(this,"getVolume",(I,D)=>{const f=this.getUserAudioMediaStreamContext(I,D);return f==null?void 0:f.getVolume()});_e(this,"clearUsers",()=>{this.userMap=new Map});_e(this,"removeUsers",async I=>{for(const D of I)this.userMap.delete(D),await this.removeUserStreams(D)});_e(this,"createUser",async I=>{const D=Date.now(),f={id:I,permissions:0,callAction:0,callActionStr:"",callActionMap:{microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1},banBehavior:0,banBehaviorStr:"",banBehaviorMap:{microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1},callState:0,isOwner:this.userMap.size===0,isSelf:I===this.options.userId,isPublished:!1,joinTime:D,updateAt:D,network:{egress:0,ingress:0},tracks:[],channels:[],updateStreams:{microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1}};this.userMap.set(I,f)});_e(this,"getUser",async I=>(this.userMap.has(I)||await this.createUser(I),this.userMap.get(I)));_e(this,"getUsers",async(I=[])=>{I.length===0&&(I=[...this.userMap.keys()]);const D=[];for(const f of I){const k=await this.getUser(f);D.push(k)}return D});_e(this,"getAllUserTrackMids",async()=>{const I=await this.getUsers(),D=[];for(const f of I){const{tracks:k=[]}=f;for(const i of k)D.push(i.mid)}return D});_e(this,"getUserTrackByTrackName",async I=>{const D=await this.getUsers(),f=[];for(const k of D){const{tracks:i=[]}=k;for(const c of i){const{trackName:$}=c;I.includes($)&&f.push(c)}}return f});_e(this,"getUserTrackFromMid",async I=>{const D=await this.getUsers();let f;for(const k of D){const{tracks:i=[]}=k;for(const c of i)if(c.mid===I){f=c;break}}return f});_e(this,"checkUserInRoom",I=>this.userMap.has(I));_e(this,"getUsersId",async()=>[...this.userMap.keys()]);_e(this,"getSelfInfo",async()=>await this.getUser(this.options.userId));_e(this,"updateIsPublished",async(I,D=!1)=>{const f=await this.getUser(I);f.isPublished=D});_e(this,"setUserUpdateStreams",async(I,D,f=!0)=>{const k=await this.getUser(I),i={microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1};i[D]=f,k.updateStreams=i});_e(this,"updateUserChannels",async(I,D=[],f)=>{const k=await this.getUser(I);f&&(D=[...k.channels,...D]),k.channels=D});_e(this,"updateUsertracks",async(I,D=[],f)=>{const k=await this.getUser(I);f&&(D=[...k.tracks,...D]),D=D.filter(({mid:$=""})=>$!==""),D=pt(D,["type"]),D=D.sort(($,C)=>$.type-C.type<0?-1:1);for(const $ of D)$.userId=I,$.mediaType=mediaType_keys[$.type],$.enabled===void 0&&($.enabled=!0);k.updateStreams={microphoneCamera_audio:!1,microphoneCamera_video:!1,screenSharing_video:!1,screenSharing_audio:!1};const i=dt(k.tracks,["mediaType","enabled","mid","msid","trackName"]),c=dt(D,["mediaType","enabled","mid","msid","trackName"]);{const $="microphoneCamera_audio",C=c.find(J=>J.mediaType===$),M=i.find(J=>J.mediaType===$),Z=JSON.stringify(C)!==JSON.stringify(M);k.updateStreams[$]=Z}{const $="microphoneCamera_video",C=c.find(J=>J.mediaType===$),M=i.find(J=>J.mediaType===$),Z=JSON.stringify(C)!==JSON.stringify(M);k.updateStreams[$]=Z}{const $="screenSharing_audio",C=c.find(J=>J.mediaType===$),M=i.find(J=>J.mediaType===$),Z=JSON.stringify(C)!==JSON.stringify(M);k.updateStreams[$]=Z}{const $="screenSharing_video",C=c.find(J=>J.mediaType===$),M=i.find(J=>J.mediaType===$),Z=JSON.stringify(C)!==JSON.stringify(M);k.updateStreams[$]=Z}k.tracks=D});_e(this,"updateUserCallAction",async(I,D=0)=>{const f=await this.getUser(I);f.callAction=D,f.callActionStr=D.toString(2).padStart(4,"0"),f.callActionMap=this.getCallActionMap(D)});_e(this,"updateUserBehaviors",async(I,D=0)=>{const f=await this.getUser(I);f.banBehavior=D,f.banBehaviorStr=D.toString(2).padStart(4,"0"),f.banBehaviorMap=this.getBanBehaviorMap(D)});_e(this,"updateUserNetwork",async(I,D={egress:5,ingress:5})=>{const f=await this.getUser(I);f.network=D});_e(this,"updateUserPermissions",async(I,D)=>{if(D){const f=await this.getUser(I);f.permissions=D}});_e(this,"updateUserBase",async I=>{const D=await this.getUser(I);D.isSelf=I===this.options.userId,D.updateAt=Date.now()});_e(this,"updateUsers",async I=>{for(const D of I){const{id:f,tracks:k,callAction:i,permissions:c,isPublished:$}=D;await this.updateUserBase(f),await this.updateIsPublished(f,$),await this.updateUserPermissions(f,c),await this.updateUsertracks(f,k,!0),await this.updateUserCallAction(f,i),await this.updateUserNetwork(f)}});_e(this,"emitNotifyUpdateUser",async I=>{const D=await this.getUsers([I]),[f]=this.usersFilter(D);this.cwsIns.emitNotify("onRoomUser",{code:200,data:f,desc:"user info is change."})});_e(this,"emitNotifyUpdateUsers",async()=>{const I=await this.getUsers(),D=this.usersFilter(I);this.cwsIns.emitNotify("onRoomUsers",{code:200,data:D,desc:"all users info is change."})})}}const t=(O,N=4294967295,I=79764919)=>{const D=new Int32Array(256);let f,k,i,c=N;for(f=0;f<256;f++){for(i=f<<24,k=8;k>0;--k)i=2147483648&i?i<<1^I:i<<1;D[f]=i}for(f=0;f<O.length;f++)c=c<<8^D[255&(c>>24^O[f])];return c},e=(O,N=t)=>{const I=Y=>new Uint8Array(Y.length/2).map((te,ie)=>parseInt(Y.substring(2*ie,2*(ie+1)),16)),D=Y=>I(Y)[0],f=new Map;[,8364,,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,,381,,,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,,382,376].forEach((Y,te)=>f.set(Y,te));const k=new Uint8Array(O.length);let i,c,$,C=!1,M=0,Z=42,J=O.length>13&&O.substring(0,9)==="dynEncode",z=0;J&&(z=11,c=D(O.substring(9,z)),c<=1&&(z+=2,Z=D(O.substring(11,z))),c===1&&(z+=8,$=(Y=>new DataView(I(Y).buffer).getInt32(0,!0))(O.substring(13,z))));const Q=256-Z;for(let Y=z;Y<O.length;Y++)if(i=O.charCodeAt(Y),i!==61||C){if(i===92&&Y<O.length-5&&J){const te=O.charCodeAt(Y+1);te!==117&&te!==85||(i=parseInt(O.substring(Y+2,Y+6),16),Y+=5)}if(i>255){const te=f.get(i);te&&(i=te+127)}C&&(C=!1,i-=64),k[M++]=i<Z&&i>0?i+Q:i-Z}else C=!0;const ee=k.subarray(0,M);if(J&&c===1){const Y=N(ee);if(Y!==$){const te="Decode failed crc32 validation";throw console.error("`simple-yenc`\n",te+`
14
+ `,"Expected: "+$+"; Got: "+Y+`
15
+ `,"Visit https://github.com/eshaz/simple-yenc for more information"),Error(te)}}return ee};function WASMAudioDecoderCommon(){const O=Uint8Array,N=Float32Array;WASMAudioDecoderCommon.modules||Object.defineProperties(WASMAudioDecoderCommon,{modules:{value:new WeakMap},setModule:{value(I,D){WASMAudioDecoderCommon.modules.set(I,Promise.resolve(D))}},getModule:{value(I,D){let f=WASMAudioDecoderCommon.modules.get(I);return f||(D?f=WebAssembly.compile(e(D)):(D=I.wasm,f=WASMAudioDecoderCommon.inflateDynEncodeString(D).then(k=>WebAssembly.compile(k))),WASMAudioDecoderCommon.modules.set(I,f)),f}},concatFloat32:{value(I,D){let f=new N(D),k=0,i=0;for(;k<I.length;)f.set(I[k],i),i+=I[k++].length;return f}},getDecodedAudio:{value:(I,D,f,k,i)=>({errors:I,channelData:D,samplesDecoded:f,sampleRate:k,bitDepth:i})},getDecodedAudioMultiChannel:{value(I,D,f,k,i,c){let $=[],C,M;for(C=0;C<f;C++){const Z=[];for(M=0;M<D.length;)Z.push(D[M++][C]||[]);$.push(WASMAudioDecoderCommon.concatFloat32(Z,k))}return WASMAudioDecoderCommon.getDecodedAudio(I,$,k,i,c)}},inflateDynEncodeString:{value(I){return I=e(I),new Promise(D=>{const f=String.raw`dynEncode012804c7886d(‰›•)((()>+ˆ*§§)§ˆ,§§§§)§ˆ+§§§)§+.-()(*)-+)(ˆ.7*§)i¸¸,3§(i¸¸,3/G+.••—š¡*(,˜ŽŽ(,3‡‡‰˜‡Š‰›+)2å:-œ),§H(P*DI*H(P*@I++hH)H*r,hH(H(P*<J,i)’^*<H,H(P*4’U((I-H(H*i0’J,^*DH+H-H*œšI+H,I*4)33H(H*H)“^*DH(H+H)^*@H+i§H)œi§›™3æ*).§K(iH“I/+§H,iHn,§H+i(H+i(rCJ0I,H*I-+hH,,hH(H-V)(i)œ’J.H.W)(i)’c)(H,i)“I,H-i*’I-4)33i(I.*hH(V)(H+n5(H(i*’I-i(I,i)I.+hH,i*’J+iHn,hi(I-i*I,+hH,H/’H-c)(H,iFn,hi(I,+hH,H0n5-H*V)(J(,hH/H(i)œ’J(H(V)(J(i)’c)(H)H(i)œ’H,c)(3H*i*’I*H,i)’I,4(3(-H(H,’W)(H-’I-H,i*’I,4)3(3(3H,H-’I1H+I,H.i)œH1V)(“J.i(v5(33H.-H(H,’i(c)(H,i*’I,4)333–)-§i*I*+§H*iHn,hiž73H,H(i)8(H+šJ+H)P*(H*’V)(J-“r,§H)P*,H.i)œ’H+H,“i)œ’V)(-H*i*’I*H+i)œI+H-H.’I.H,H-’i)œI,4)333Ã+)-§iø7i(^*(iü7I,*h+hH+iDn,h*hilI+i)I,+hH+,hH+iô7’H,c)(i)H+i´8’W)(œH,’I,H+i*’I+4)-+hH(H)8*J-i(p5.*h*h*hH-i')u,hH(P*(J+,hH(P*0J,H(P*,n50H+H,’H-b((3H(P*0i)’I.4)3H-i¨*n5*H-iÅ*s,hiž73H-i)œJ+V)&+I,H(H+V)æ,8(I.H(H*8*J-i(p51H-i)œJ+i¸7’V)(H(H+iø7’V)(8(’J/H(P*0J+s,hi73H+H,H.’J,’I.H(P*(m5(H.H(P*,s5.+hH,m5*H(P*(J.H+’H.H+H/“’U((b((H(H(P*0i)’J+^*0H,i)“I,4(3(3H(H.^*03H-i¨*o5)33i(73(3(3-H,H+i)žc)(H,i*’I,H+i)’I+4)33i)I-3H-3!2)0§K(i2“J,L(H,H(^*(H,H*^*4H,i(^*0H,i(^*DH,j(_*<H,H)P*(^*,H,H+P*(^*8*h*h+hH,i)8(I3i§I**h*h*h*h*h*h*hH,i*8(6+(),03H,j(_*@i*I-H,P*<J.i,’J(H,P*8J/s50H,H.i+’J0^*<i¦I*H.H,P*4J1’J.U(*H.U((J2›i')o5/H.U()I.H,H(^*<H0H1’U((H.i0œJ.i§›i0ži')™o5/H/H.H2šJ*H(’J.q50H,P*0J/H*’I-H,P*(J0,hH,P*,H-q,hi)I-423+hH*m5+H/H0’H(H1’U((b((H/i)’I/H(i)’I(H*i)“I*4(3(3H,H.^*<H,H-^*04*3iØ1U((5+i(I(i¨7i1^*(i$6iè1^*(i°7iè6^*(i¬7iÈ6^*(+hH(iÈ*n,hiÈ*I(+hH(i¨,n,hi¨,I(+hH(iØ,n,hiØ,I(+hH(iè,o,hH,i-’H(’i0c)(H(i*’I(4)33iè1i1H,i-’iÈ*8)Bi(I(+hH(ido,hH,i-’H(’i-c)(H(i*’I(4)33iÈ6iè6H,i-’iF8)BiØ1i)b((41-H,i-’H(’i/c)(H(i*’I(4)3(3(-H,i-’H(’i1c)(H(i*’I(4)3(3(-H,i-’H(’i0c)(H(i*’I(4)3(3(3H,H/^*0H,H(^*<3i(I*4*3H,H,i¸)’^*TH,H,iø-’^*PH,H,iX’^*LH,H,i(’^*HH,i-8(I(H,i-8(I-i¥I*H,i,8(I.H(iErH-iErš5)H(i©*’I1H-i)’I0i(i;H.i,’J(i(H(i(rCJ(“J*H*i;sCI*i¨1I-H(I/+hH/,hH,i-’H-V)(i)œ’H,i+8(c)(H/i)“I/H-i*’I-H*i)’I*4)-H(i)œi¨1’I/+hH(H*o,hH,i-’H/V)(i)œ’i(c)(H/i*’I/H(i)’I(4)33i¤I*H,iø-’H,i¸)’H,i-’i;8)5+H0H1’I2i(I-+hH-H2p,hH,H,iP’8*J*i(p5-H*i7u,hH,i-’H-i)œ’H*c)(H-i)’I-4*3i(I/i+I.i+I(*h*h*hH*i8“6*(*)3H-m,hi£I*403H-i)œH,’W)-I/i*I(4)3i3I.i/I(3H2H,H(8(H.’J(H-’J.p,hi¢I*4.3H,i-’H-i)œ’I*+hH(,hH*H/c)(H*i*’I*H(i)“I(4)-H.I-4+3(3(33H,W)1m,hiŸI*4,3H,iø-’H,i¸)’H,i-’H18)J(,hi¡I*H(i(p5,H1H,V)ú-H,V)ø-’o5,3H,i(’H,iX’H,i-’H1i)œ’H08)J(,hi I*H(i(p5,H0H,V)šH,V)˜’o5,3H,H,iP’H,iH’8+I*4+3(3(3H,i$6i¬78+I*3H*H3šm5(3i)I-H*i(r5)3H)H,P*0^*(H+H,P*<^*(H*I-3H,i2’L(H-33Á)+(i¨03b+(,(-(.(/(0(1(2(3(5(7(9(;(?(C(G(K(S([(c(k({(‹(›(«(Ë(ë( (*)(iø03O)()()()(*(*(*(*(+(+(+(+(,(,(,(,(-(-(-(-(i¨13M8(9(:(((0(/(1(.(2(-(3(,(4(+(5(*(6()(7(T7œ‰šœ‡Ž‰œš›*S7•œ‰Š”U”—Љ”›S0›‘–U œ`;WASMAudioDecoderCommon.getModule(WASMAudioDecoderCommon,f).then(k=>WebAssembly.instantiate(k,{})).then(({exports:k})=>{const i=new Map(Object.entries(k)),c=i.get("puff"),$=i.get("memory").buffer,C=new O($),M=new DataView($);let Z=i.get("__heap_base");const J=I.length,z=Z;Z+=4,M.setInt32(z,J,!0);const Q=Z;Z+=J,C.set(I,Q);const ee=Z;Z+=4,M.setInt32(ee,C.byteLength-Z,!0),c(Z,ee,Q,z),D(C.slice(Z,Z+M.getInt32(ee,!0)))})})}}}),Object.defineProperty(this,"wasm",{enumerable:!0,get:()=>this._wasm}),this.getOutputChannels=(I,D,f)=>{let k=[],i=0;for(;i<D;)k.push(I.slice(i*f,i++*f+f));return k},this.allocateTypedArray=(I,D,f=!0)=>{const k=this._wasm.malloc(D.BYTES_PER_ELEMENT*I);return f&&this._pointers.add(k),{ptr:k,len:I,buf:new D(this._wasm.HEAP,k,I)}},this.free=()=>{this._pointers.forEach(I=>{this._wasm.free(I)}),this._pointers.clear()},this.codeToString=I=>{const D=[],f=new Uint8Array(this._wasm.HEAP);for(let k=f[I];k!==0;k=f[++I])D.push(k);return String.fromCharCode.apply(null,D)},this.addError=(I,D,f,k,i,c)=>{I.push({message:D,frameLength:f,frameNumber:k,inputBytes:i,outputSamples:c})},this.instantiate=(I,D)=>(D&&WASMAudioDecoderCommon.setModule(I,D),this._wasm=new I(WASMAudioDecoderCommon).instantiate(),this._pointers=new Set,this._wasm.ready.then(()=>this))}var browser,hasRequiredBrowser;function requireBrowser(){return hasRequiredBrowser||(hasRequiredBrowser=1,browser=Worker),browser}var browserExports=requireBrowser();const NodeWorker=getDefaultExportFromCjs(browserExports),getWorker=()=>globalThis.Worker||NodeWorker;class WASMAudioDecoderWorker extends getWorker(){constructor(N,I,D,f){WASMAudioDecoderCommon.modules||new WASMAudioDecoderCommon;let k=WASMAudioDecoderCommon.modules.get(D);if(!k){let i="text/javascript",c,$=`'use strict';(${((C,M,Z)=>{let J,z,Q=new Promise(ee=>{z=ee});self.onmessage=({data:{id:ee,command:Y,data:te}})=>{let ie=Q,ye={id:ee},re;Y==="init"?(Object.defineProperties(C,{WASMAudioDecoderCommon:{value:M},EmscriptenWASM:{value:Z},module:{value:te.module},isWebWorker:{value:!0}}),J=new C(te.options),z()):Y==="free"?J.free():Y==="ready"?ie=ie.then(()=>J.ready):Y==="reset"?ie=ie.then(()=>J.reset()):(Object.assign(ye,J[Y](Array.isArray(te)?te.map(de=>new Uint8Array(de)):new Uint8Array(te))),re=ye.channelData?ye.channelData.map(de=>de.buffer):[]),ie.then(()=>self.postMessage(ye,re))}}).toString()})(${D}, ${WASMAudioDecoderCommon}, ${f})`;try{c=typeof process.versions.node<"u"}catch{}k=c?`data:${i};base64,${Buffer.from($).toString("base64")}`:URL.createObjectURL(new Blob([$],{type:i})),WASMAudioDecoderCommon.modules.set(D,k)}super(k,{name:I}),this._id=Number.MIN_SAFE_INTEGER,this._enqueuedOperations=new Map,this.onmessage=({data:i})=>{const{id:c,...$}=i;this._enqueuedOperations.get(c)($),this._enqueuedOperations.delete(c)},new f(WASMAudioDecoderCommon).getModule().then(i=>{this.postToDecoder("init",{module:i,options:N})})}async postToDecoder(N,I){return new Promise(D=>{this.postMessage({command:N,id:this._id,data:I}),this._enqueuedOperations.set(this._id++,D)})}get ready(){return this.postToDecoder("ready")}async free(){await this.postToDecoder("free").finally(()=>{this.terminate()})}async reset(){await this.postToDecoder("reset")}}const assignNames=(O,N)=>{Object.defineProperty(O,"name",{value:N})};function EmscriptenWASM(O){function N(){}function I(me){throw me}var D,f;function k(){var me=f.buffer;D=new Uint8Array(me),new BigInt64Array(me),new BigUint64Array(me)}for(var i=()=>I(""),c=()=>{},$={},C=me=>me(),M=()=>performance.now(),Z=(me,Re)=>{if($[me]&&(clearTimeout($[me].id),delete $[me]),!Re)return 0;var Ue=setTimeout(()=>{delete $[me],C(()=>he(me,M()))},Re);return $[me]={id:Ue,timeout_ms:Re},0},J=Math.cos,z=me=>(D.length,!1),Q=me=>{throw`exit(${me})`},ee=new Uint8Array(123),Y=25;Y>=0;--Y)ee[48+Y]=52+Y,ee[65+Y]=Y,ee[97+Y]=26+Y;ee[43]=62,ee[47]=63;var te={d:i,c,e:Z,a:J,f:z,b:Q};function ie(me){ye=me.i,re=me.j,de=me.k,se=me.l,ue=me.m,he=me.o}var ye,re,de,se,ue,he;function we(me){me.h()}EmscriptenWASM.wasm||Object.defineProperty(EmscriptenWASM,"wasm",{get:()=>String.raw`dynEncode0158c8b8d85e¼æ=M™]™lGu³õPoš]ÐãÞ·£3² ÁÚ= ’Êöc/ÓZ8s³‹íÛ³u­Ð¥t"+¦›¦~dòR\(nº}÷£¢¢ë¢k}Ÿt¡) ,‚­äÕüP
16
16
  *øüäÖeù‡i“ ÝWŠÍ¦ÖPMŸ¨[æu>Ü(«l‹'Ë$c‡˜¿9ZEúº¼ù‹¼=}ŠŒäÍÂý²­‚\åô҅'.õt­ÅXî=}~õ"uÊr˜ÁýóòÝ ÔúéÊ
17
17
  /Αÿ4ñ3‚sl¬8mæÑå›68à8uNÑçm–hÔ¶©hwÒ½¸t¡î¾¾|®½®­ê²
18
18
  #Hzò44›Bv  ½!;1Û÷Ô±xü½#Ó–7(‰…‹‹0#,È$Ï#$$GÓé­Ë Eä àoç7ãoéJÉíŒï7±çO—HAŸWᐕì@ì‘>j‰_Ž»·ÄBg¡& ºËáPÍþՂâ|óZ†5qœíœê£Š1Œ(£=Mj»‰-³;œÉb¸m͂IÙ㇒ˆ•[@œºšk„¶äáV9t#wäԋy£óþN÷¸å‘KS W£)ýŒÌQ<¼°ì=}=}ʗÌ@㈼¤j­@V¸0Wïú!÷ý£¾±²BMðôŠ=MãÕ2Úÿ¤ÜïV&¸á„ÇòßBÕØ&eÞj«@ߎ¥¬/ϛ©‹Ì).ø~|V‡}o:¶çBj '¯ÅIÝŽBVU0¦~VBq´µOF#їÈV„ï Ÿó>±w…5ooø«–òÏ©2ú*Yó€×&؛scò,ó•Wû® =M‹«À•3ÃUK£AhV!.ßÖª3œ3p‹êPÃ¥“¢’;אòZ¹N´*Rwç²Ã= +2pæOôŽïÈ5 È5p£µ~ØÎE2¿×z݊ê…LÂP7]‹O(&³BTJn™6‹ìŒ‡¬vøzšýO˜b_¯ëSº [Þá4'þI&xa^í’‡‚k¨a¨­(bñý"w®×‰ŽµØg),LèÏþ¬1‡×Ÿü= àúN(5F:‘kTçZ„òË"êþÄUψa%/ Áïâ׀ž*Ï3}~èKŒŒƒKnw‡][ŽsÆ\3²( •¥o)1™|•”()¥Õå¾!?= Ó¹O4xÙ¨ ÌÕÆh£§Š×w¬¢¾9B{ÍØJÙ÷Âwf«E¢ÒpBÒGïÎUƒW‘¾£—ÓYáƒG»‚mU^ðÛ7L„ôyí¾7Nì?}Ádtœ|Öñåu&qýŸ’q¶
@@ -203,4 +203,4 @@ DÙ VààÍ³ÄvÒ2; 5c±-ìʞ‹öª§}Ou¡ƒ¡‡¦ƒîGÇ D
203
203
  Ùup3‹q@ݱu„Xt•X07=M˜‡p_¤I¬ø®®[¦ó[ÀRŠ˜VsX?F^":hˆa?ØÎeÄQc{Yíz’0j¹{b ×c˜4ö–= %¡›ì?XÜñÊ,ŒxþÀŠf©û‡y O}:Fà= NuÙO_hÌÍtÝg|ȳ]²(aŸ= žTÜøN»j/Ì|éŽÚœ{^ëÐÖ{¡•Çzñú_|Åûl*†Ztì{8ޝa@©¥Z”K؍¨c¿iš<±†üFÇkº-cy 5±4§o9ы,;KzÌ $à1I=MºôÉ©¤=MêÈ5
204
204
  }õíë(—ŒðìÍäWD„?£©ÿ㪔=M äҕ±ì6í)ˆ‘ÏÙtbFÐöÚFÈ´Ù§R‚1.]¢¦¨ùû­,9ï‚tö»LÂô⍦qªk{ä(9«ž4>°»ŽB‰¶ñ»šGÓ½vÃâ£d$°AŠ‹†0ô‰¼¦­d=M¢«£ Àß}â$ æ0òÊ6¾%¼>3(…-D+ÂÔÂ…o7#æFåEIîkNDÒ_&Š3iÍHÌúk&@â‹k1ýîW¶ƒY¬ŽXޖXáXâ¢XEeØØÈ\‘gi,Ç~æ{™…Ü-ïœÈÛx6„Û{—í8+¾\g¦ñ۟írŠô9³®°3D_åãxQÈxþÚ·/ª= Íu_̛uL•^t^{g9áqž?ª•(üo!€*Írâ&ÚËì÷¨Pd׺ÓG)àþê¤sJ’…ñAÉå$†AÐNÎç˜õn„D1MøhO¥me Q†Ê¸[F< ^MBÜÛ
205
205
   Aãϧüï†4î%M°6M…ùtN)›FR˜[¾F™qV6¥óðlœò©Ë= c»R =}Ù8õ.­%BÂIµÃI&æ×U”1Q«Ïñ3&ÑóÓÝ»“ñ²eL°(ÑòOzBð·Q]üôföê+h.³´)ÅKé¥JR#/GóuÉɾ¯Áõ¿-½ñ'î<·Q ¼=MÛ²6+þ筓Ydb_öcHm™öôزj¾…nÚ7aÌvؓOå¹÷e0Ff˜ÊÈønØ#?ÁhÊÀcœ–Ýåõ(å û)ü)éðк¿ÓÜ¡]q†ákÈۚÝL·ºrCMmp_ÀÏ Óìcç6®þsosÒÝóô1¬Ã6<2#Ò±Cˆ“65Q"4ŠB&pç
206
- gUn…g= !þ+µèm M½Êê½½²¦é%0Yg~´p5.\Ø®z‚y9%Ôiܒ!Ùc‰ÝŦH>ÓX ÿZR’[¬&ønÇl’Ó_:ïi«ñ<ø"QÚ©yz …®ªOL¥ÎêŠÌÝi?Ê‚'/Ne»:2NÅÝ_òspüR Oø!!ù+##üÓkéªX-fpd“q[U*]@ ö¨5͔pÖYhܪ= › ÛN3{ü® À)¡9þ‘ž-1® ÂcBNö÷0+È6ò„Òэ;lÅ^_>ÓÛQ&jðMIŠì¤³àlS×j΀¢@ȝåÕ¢•­on‡=M°©xÉûÖäav=MM©²öÖ¹?{ß ßî€øyÛ= ‰„0òûÏ4gr’èNÒíÏqëðð-êö¸†ᖥ$¨”Q.Ò4ä¿V$N_Ý><´æë[⑲F#T1É'utÿZXÁ“š(ošàx¡Jo˜"­ö–ùSæ÷ÒUFÓs* U¡ ÓºUµøGáL¨÷©ASjÕ®'!L‹¢ÕvC¿m·Gžâ¼N¹Ÿ³OÃで1T:ê¹\Z£ËZæ.î}ª°O'ãà¾I;ûÁ€HÃä&ÃÐÐK@3EÅÓÉ>½e@ã/òi¡’|ÌE³{ñSCm…ÎëöÁÐÐ%Ó>dš''¶9Á/T.N?äª †æÿÀÐÐ%Ó¶ ö¾ì¦)ÃÕ÷×"e|ÚþBåýrv¶K6“ŸŒöuâÐÌRÎËýæ×%I­OIø¦Ä(HTJ†~),ÕDCWWÃö(›VwV=M§TsLP³ þV'tT#¡ZLŽêé;ßù[`});var me={a:oe};this.setModule=_e=>{$.setModule(EmscriptenWASM,_e)},this.getModule=()=>$.getModule(EmscriptenWASM),this.instantiate=()=>(this.getModule().then(_e=>WebAssembly.instantiate(_e,me)).then(_e=>{const De=_e.exports;ce(De),O=De.g,I(),Te(De),z()}),this.ready=new Promise(_e=>{z=_e}).then(()=>{this.HEAP=O.buffer,this.malloc=se,this.free=pe,this.opus_frame_decoder_create=we,this.opus_frame_decode_float_deinterleaved=ye,this.opus_frame_decoder_destroy=fe}),this)}function OpusDecoder($={}){OpusDecoder.errors||Object.defineProperties(OpusDecoder,{errors:{value:new Map([[-1,"OPUS_BAD_ARG: One or more invalid/out of range arguments"],[-2,"OPUS_BUFFER_TOO_SMALL: Not enough bytes allocated in the buffer"],[-3,"OPUS_INTERNAL_ERROR: An internal error was detected"],[-4,"OPUS_INVALID_PACKET: The compressed data passed is corrupted"],[-5,"OPUS_UNIMPLEMENTED: Invalid/unsupported request number"],[-6,"OPUS_INVALID_STATE: An encoder or decoder structure is invalid or already freed"],[-7,"OPUS_ALLOC_FAIL: Memory allocation has failed"]])}}),this._init=()=>new this._WASMAudioDecoderCommon(this).instantiate(this._EmscriptenWASM,this._module).then(J=>{this._common=J,this._inputBytes=0,this._outputSamples=0,this._frameNumber=0,this._input=this._common.allocateTypedArray(this._inputSize,Uint8Array),this._output=this._common.allocateTypedArray(this._outputChannels*this._outputChannelSize,Float32Array);const X=this._common.allocateTypedArray(this._channels,Uint8Array);X.buf.set(this._channelMappingTable),this._decoder=this._common.wasm.opus_frame_decoder_create(this._sampleRate,this._channels,this._streamCount,this._coupledStreamCount,X.ptr,this._preSkip,this._forceStereo)}),Object.defineProperty(this,"ready",{enumerable:!0,get:()=>this._ready}),this.reset=()=>(this.free(),this._init()),this.free=()=>{this._common.free(),this._common.wasm.opus_frame_decoder_destroy(this._decoder),this._common.wasm.free(this._decoder)},this._decode=J=>{if(!(J instanceof Uint8Array))throw Error("Data to decode must be Uint8Array. Instead got "+typeof J);this._input.buf.set(J);let X=this._common.wasm.opus_frame_decode_float_deinterleaved(this._decoder,this._input.ptr,J.length,this._output.ptr),Y;return X<0&&(Y="libopus "+X+" "+(OpusDecoder.errors.get(X)||"Unknown Error"),console.error(Y),X=0),{outputBuffer:this._common.getOutputChannels(this._output.buf,this._outputChannels,X),samplesDecoded:X,error:Y}},this.decodeFrame=J=>{let X=[];const Y=this._decode(J);return Y.error&&this._common.addError(X,Y.error,J.length,this._frameNumber,this._inputBytes,this._outputSamples),this._frameNumber++,this._inputBytes+=J.length,this._outputSamples+=Y.samplesDecoded,this._WASMAudioDecoderCommon.getDecodedAudioMultiChannel(X,[Y.outputBuffer],this._outputChannels,Y.samplesDecoded,this._sampleRate)},this.decodeFrames=J=>{let X=[],Y=[],Q=0,te=0;for(;te<J.length;){const ie=J[te++],ne=this._decode(ie);X.push(ne.outputBuffer),Q+=ne.samplesDecoded,ne.error&&this._common.addError(Y,ne.error,ie.length,this._frameNumber,this._inputBytes,this._outputSamples),this._frameNumber++,this._inputBytes+=ie.length,this._outputSamples+=ne.samplesDecoded}return this._WASMAudioDecoderCommon.getDecodedAudioMultiChannel(Y,X,this._outputChannels,Q,this._sampleRate)},this._isWebWorker=OpusDecoder.isWebWorker,this._WASMAudioDecoderCommon=OpusDecoder.WASMAudioDecoderCommon||WASMAudioDecoderCommon,this._EmscriptenWASM=OpusDecoder.EmscriptenWASM||EmscriptenWASM,this._module=OpusDecoder.module;const z=8,D=J=>typeof J=="number",j=$.sampleRate,O=$.channels,I=$.streamCount,o=$.coupledStreamCount,k=$.channelMappingTable,N=$.preSkip,F=$.forceStereo?1:0;if(O>2&&(!D(I)||!D(o)||!Array.isArray(k)))throw new Error("Invalid Opus Decoder Options for multichannel decoding.");return this._sampleRate=[8e3,12e3,16e3,24e3,48e3].includes(j)?j:48e3,this._channels=D(O)?O:2,this._streamCount=D(I)?I:1,this._coupledStreamCount=D(o)?o:this._channels-1,this._channelMappingTable=k||(this._channels===2?[0,1]:[0]),this._preSkip=N||0,this._forceStereo=O<=z&&O!=2?F:0,this._inputSize=32e3*.12*this._channels,this._outputChannelSize=120*48,this._outputChannels=this._forceStereo?2:this._channels,this._ready=this._init(),this}class OpusDecoderWebWorker extends WASMAudioDecoderWorker{constructor(z){super(z,"opus-decoder",OpusDecoder,EmscriptenWASM)}async decodeFrame(z){return this.postToDecoder("decodeFrame",z)}async decodeFrames(z){return this.postToDecoder("decodeFrames",z)}}assignNames(OpusDecoder,"OpusDecoder"),assignNames(OpusDecoderWebWorker,"OpusDecoderWebWorker"),new OpusDecoder;class RoomPeer extends RoomUsers{constructor(D){super(D);Se(this,"getPeerStatsTimer",0);Se(this,"reports",[]);Xe(this,In,[]);Se(this,"peerNetwork",{inboundBytes:0,outboundBytes:0,lostRate:"0.00",roundTripTime:"0",jitter:"0"});Se(this,"initPeer",()=>{var D;(D=this.peerIns)==null||D.close(),this.transceiverMap=new Map,this.peerIns=new RTCPeerConnection({iceServers:[{urls:"stun:stun.cloudflare.com:3478"}],bundlePolicy:"max-bundle"}),this.peerIns.createDataChannel("scapegoat-channel"),Re(this,Hn).call(this),Re(this,jn).call(this)});Se(this,"getNatType",async()=>{});Se(this,"initSendChannel",(D="",j)=>{});Se(this,"initReceiveChannel",(D="",j)=>{});Se(this,"replaceSenderStream",async(D=[],j)=>{const{userId:O}=this.options;D.length===0&&(D=mediaType_keys);for(const I of D){const o=this.transceiverMap.get(I);let k;if(o){const{sender:N}=o;j?k=this.getUserStream(O,I):k=this.getPhoneyStreams(I);const[F]=k.getTracks();F&&await N.replaceTrack(F)}}});Se(this,"getSenderTracks",async(D=[])=>{const j=[];for(const O of D){const I=this.transceiverMap.get(O);if(!I)continue;const{mid:o,sender:k}=I,{track:N}=k;if(!N)continue;const{id:F,enabled:J}=N,X=mediaType_keys.findIndex(Q=>Q===O),Y={type:X,enabled:J,trackName:`web-${X}-${F}`,location:"local",mid:o};j.push(Y)}return j});Se(this,"addSenders",async(D=[])=>{D.length===0&&(this.peerIns.addTransceiver("audio",{direction:"sendonly"}),this.peerIns.addTransceiver("video",{direction:"sendonly"}));const j=[];for(const O of D){if(this.transceiverMap.get(O))continue;const o=this.getPhoneyStreams(O),[k]=o.getTracks(),N=this.peerIns.addTransceiver(k,{direction:"sendonly"});this.transceiverMap.set(O,N),j.push(O)}if(D.length===0||j.length!==0){const O=await this.peerIns.createOffer();if(this.options.debug){const I=libExports$1.parse(O.sdp),o=dt(I.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->quickvo: setLocalDescription",{msidArr:o,sdpJson:I,description:O})}await this.peerIns.setLocalDescription(O)}return j});Se(this,"removeSenders",async(D=[])=>{D.length===0&&(D=mediaType_keys);for(const j of D)this.transceiverMap.has(j)&&this.transceiverMap.delete(j)});Se(this,"onSubscribeUserTracks",D=>{let j=0;return new Promise(async O=>{const I=[];for(const o of D){const{tracks:k=[]}=o;for(const N of k){const{trackName:F,mid:J}=N,[X]=await this.getUserTrackByTrackName([F]);I.push({...X,mid:J})}}{let o=[];const k=async()=>{clearTimeout(j);const F=new Map;for(const X of o){const{userId:Y,mediaType:Q}=X;if(!Y||!Q)continue;F.has(Y)||F.set(Y,{userId:Y,tracks:[],updateStreams:{}});const ie=F.get(Y);ie.tracks.push(X),ie.updateStreams[Q]=!0}const J=[...F.values()];for(const X of J){const{userId:Y,tracks:Q}=X;await this.updateUsertracks(Y,Q,!0)}await this.emitNotifyUpdateUsersStreams(J),this.peerIns.removeEventListener("track",N);{const X=Array.from(I,te=>te.trackName),Y=Array.from(o,te=>te.trackName),Q=X.filter(te=>!Y.includes(te));O({target:X,success:Y,fail:Q})}},N=async F=>{const{streams:J,transceiver:X}=F,[Y]=J,{mid:Q,receiver:te}=X,{track:ie}=te,{id:ne}=ie,oe=I.find(se=>se.mid===`${Q}`);if(!oe)return;const{userId:ce,mediaType:we}=oe;if(!(!ce||!we)){{const se={...oe,mid:Q,msid:ne};o.push(se)}this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#00b60f;",`------->quickvo: await subscribe ${o.length}/${I.length}`,{mediaType:we,mid:Q,userTrack:oe,e:F});{const se=new Audio;if(se.srcObject=Y,await this.initUserMediaStreamContext(ce,we,Y),we==="microphoneCamera_audio"||we==="screenSharing_audio"){const ye=this.getUserAudioMediaStreamContext(ce,we);ye==null||ye.setMute(!1)}}I.length===o.length&&k()}};this.peerIns.addEventListener("track",N),j=window.setTimeout(()=>{this.reportLogs("subscribe_error",`incomplete subscription. (${o.length}/${I.length})`),k()},5*1e3)}})});Xe(this,Hn,()=>{let D=0;const j=()=>{this.peerIns.close(),this.setRoomState("closed")};this.peerIns.oniceconnectionstatechange=async()=>{const O=this.peerIns.iceConnectionState;switch(clearTimeout(D),O){case"connected":{this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#00b60f;",`------->quickvo: connectionState:${O}`),this.setRoomState("connected");for(const I of Re(this,In))await I()}break;case"disconnected":this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#b64900;",`------->quickvo: connectionState:${O}`),D=window.setTimeout(j,30*1e3);break;case"failed":this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#b60000;",`------->quickvo: connectionState:${O}`),this.setRoomState("failed");break;case"closed":this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#b60000;",`------->quickvo: connectionState:${O}`),j();break;default:this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#b64900;",`------->quickvo: connectionState:${O}`);break}}});Se(this,"iceConnected",()=>new Promise(D=>{if(this.peerIns.iceConnectionState==="connected")return D(!0);Re(this,In).push(D)}));Se(this,"closeUserTracks",async(D,j=[],O=!1)=>{const I=[];for(const F of j){const{trackName:J,msid:X}=F;I.push(J),X&&I.push(X)}const o=F=>I.includes(F),k=this.peerIns.getTransceivers();for(const F of k){const{mid:J,sender:X,receiver:Y}=F;X.track&&o(X.track.id)&&(F.stop(),this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;",`------->quickvo: transceiver.sender: ${J} is stop.`,F)),Y.track&&o(Y.track.id)&&(F.stop(),this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;",`------->quickvo: transceiver.receiver: ${J} is stop.`,F))}const N=await this.getUser(D);if(N){for(const F of N.tracks){const{trackName:J,msid:X,userId:Y,mediaType:Q}=F;!Y||!Q||!o(J)||(this.removeUserMediaStreamContext(Y,Q),X&&delete F.msid)}if(O){const F=N.tracks.filter(({trackName:J})=>!o(J));await this.updateUsertracks(D,F,!1)}}});Se(this,"createOffer",async()=>{const D=await this.peerIns.createOffer();if(this.options.debug){const j=libExports$1.parse(D.sdp),O=dt(j.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->quickvo: createOffer",{msidArr:O,sdpJson:j,description:D})}await this.peerIns.setLocalDescription(D)});Se(this,"createAnswer",async()=>{const D=await this.peerIns.createAnswer();if(this.options.debug){const j=libExports$1.parse(D.sdp),O=dt(j.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->quickvo: createAnswer",{msidArr:O,sdpJson:j,description:D})}await this.peerIns.setLocalDescription(D)});Se(this,"getSdp",()=>{var D;return(D=this.peerIns.localDescription)==null?void 0:D.sdp});Se(this,"setRemoteDescription",async D=>{if(this.options.debug){const j=libExports$1.parse(D.sdp),O=dt(j.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->quickvo: setRemoteDescription",{msidArr:O,sdpJson:j,description:D})}return await this.peerIns.setRemoteDescription(D),D});Se(this,"setCallStrategy",async(D,j=[])=>{j.length===0&&(j=mediaType_keys);let O="balanced";switch(D){case"qualityPriority":O="maintain-resolution";break;case"fluencyPriority":O="maintain-framerate";break;case"balancedDowngrade":O="balanced";break}const I=await this.getSelfInfo(),o=Array.from(I.tracks,({trackName:N})=>N),k=this.peerIns.getSenders();for(const N of k){const{track:F}=N;if(!F||!o.includes(F.id))continue;const J=N.getParameters();N.setParameters({...J,degradationPreference:O})}});Se(this,"setRTCRtpSenderParameters",D=>{try{const j=this.peerIns.getSenders();for(const O of j){const I=O.getParameters();O.setParameters({...I,...D})}}catch(j){console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: setRTCRtpSenderParameters is error.",j)}});Se(this,"getReportsByMid",async(D=[])=>D.length===0?this.reports:this.reports.filter(j=>D.includes(j.mid)));Se(this,"getRoomNetwork",()=>this.peerNetwork);Se(this,"getPeerNetwork",()=>this.peerNetwork);Xe(this,Fn,async()=>{try{const D=await this.peerIns.getStats(),j=["inbound-rtp","remote-inbound-rtp","outbound-rtp","transport"],I=[...D.values()].filter(ye=>j.includes(ye.type));let o=0,k=0,N=0,F=0,J=0,X=0,Y=[],Q=[];for(const ye of this.reports){const{packetsSent:fe,packetsLost:pe}=ye;fe&&(N+=fe),pe&&(F+=pe)}this.reports=I;for(const ye of this.reports){const{bytesSent:fe,bytesReceived:pe,packetsSent:ve,packetsLost:Te,roundTripTime:me,jitter:_e}=ye;fe&&(k=fe),pe&&(o=pe),ve&&(J+=ve),Te&&(X+=Te),me&&Y.push((me*100).toFixed(2)),_e&&Q.push(_e.toFixed(2))}Q.sort().reverse(),Y.sort().reverse();const te=J-N,ie=X-F,ne=te===0?"0.00":(ie/te).toFixed(2),[oe="0"]=Y,[ce="0"]=Q,we={outboundBytes:k,inboundBytes:o,lostRate:ne,roundTripTime:oe,jitter:ce};this.peerNetwork=we;const se=(ye,fe,pe)=>{const ve=Number(ye),Te=Number(fe),me=Number(pe);let _e="0";return ve<.03&&Te<100&&me<.05?_e="5":ve<.06&&Te<160&&me<.1?_e="4":ve<.1&&Te<250&&me<.15?_e="3":ve<.15&&Te<400&&me<.2?_e="2":_e="1",Number(_e)};{const ye=se(ne,oe,ce),fe=await this.getSelfInfo(),{network:pe}=fe,ve={egress:ye,ingress:ye};$t("updateUserNetwork",async()=>{if(await this.updateUserNetwork(this.options.userId,ve),JSON.stringify(pe)!==JSON.stringify(ve)){this.emitNotifyUpdateUsers();const{userId:_e,roomId:De}=this.options;this.cwsIns.sendMessage({event:"networkQualityChange",data:{...ve,userId:_e,roomId:De}},!1)}},3*1e3)}}catch(D){console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: setNetQuality is err.",D)}});Xe(this,jn,()=>{const D=async()=>{this.peerIns.connectionState!=="connected"||!this.options.roomId||Re(this,Fn).call(this)};this.getPeerStatsTimer=window.setInterval(D,1*1e3)});Se(this,"stopGetPeerStats",()=>clearInterval(this.getPeerStatsTimer))}}In=new WeakMap,Hn=new WeakMap,Fn=new WeakMap,jn=new WeakMap;class RoomCalls extends RoomPeer{constructor(D){super(D);Xe(this,gn,0);Xe(this,xn,[]);Se(this,"setLocalStream",(D,j)=>new Promise(async(O,I)=>{try{typeof D=="string"&&(D=[D]);for(const k of D)this.localStreamsActionMap.set(k,j);if(j){if(D.includes("microphoneCamera_audio")&&D.includes("microphoneCamera_video")?await this.initLocalStream("microphoneCamera"):D.includes("microphoneCamera_audio")?await this.initLocalStream("microphoneCamera_audio"):D.includes("microphoneCamera_video")?await this.initLocalStream("microphoneCamera_video"):D.includes("screenSharing_audio")&&D.includes("screenSharing_video")?await this.initLocalStream("screenSharing"):D.includes("screenSharing_audio")&&!D.includes("screenSharing_video")?await this.initLocalStream("screenSharing_audio"):D.includes("screenSharing_video")&&!D.includes("screenSharing_audio")&&await this.initLocalStream("screenSharing_video"),D.includes("screenSharing_audio")){const k=await this.getLocalStream("screenSharing_audio");if(k){const N=k.getTracks();for(const F of N)F.onended=()=>this.stopPublish(["screenSharing_audio","screenSharing_video"])}}if(D.includes("screenSharing_video")){const k=await this.getLocalStream("screenSharing_video");if(k){const N=k.getTracks();for(const F of N)F.onended=()=>this.stopPublish(["screenSharing_audio","screenSharing_video"])}}}else await this.stopLocalStreams(D);const o=await this.getLocalStreams(D);await this.cwsIns.emitNotify("onLocalStream",{code:200,data:o,desc:"local stream is change."}),O(o)}catch(o){I(o)}}));Se(this,"setMediaDeviceKind",(D,j)=>new Promise(async(O,I)=>{this.setDeviceKind(D,j);const o=await this.getSelfInfo(),{id:k,tracks:N=[],callActionMap:F}=o,J=[],X=async Y=>{const Q=this.localStreamsActionMap.get(Y),te=N.find(ne=>ne.mediaType===Y),ie=F[Y];if(Q){J.push(Y),await this.stopLocalStreams([Y]);try{await this.initLocalStream(Y)}catch(ne){this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: initLocalStream is error.",ne),await this.inactiveTracks([Y],!1),I(ne)}}if(te){const ne=await this.getLocalStream(Y);ne&&(await this.initUserMediaStreamContext(k,Y,ne),ie&&await this.replaceSenderStream([Y],!0))}{const ne=await this.getLocalStreams(J);await this.cwsIns.emitNotify("onLocalStream",{code:200,data:ne,desc:"local stream is change."}),await this.emitNotifyUpdateUsers(),O(!0)}};D==="audioinput"&&await X("microphoneCamera_audio"),D==="videoinput"&&await X("microphoneCamera_video"),D==="audiooutput"&&(await this.changeAudiooutput(),O(!0))}));Se(this,"changeScreenSharing",async D=>{const j=await this.getSelfInfo(),{tracks:O=[],callActionMap:I}=j;try{await this.setLocalStream(D,!0);for(const o of D)O.find(N=>N.mediaType===o&&I[o])&&await this.replaceSenderStream([o],!0)}catch(o){this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: changeScreenSharing is error.",o)}});Se(this,"createSession",()=>new Promise(async(D,j)=>{try{await this.addSenders(),await this.cwsIns.sendMessage({event:"connectCF",data:{sdp:this.getSdp()}}).then(async O=>{const{code:I=0,desc:o,data:k}=O;if(I!==200)throw new Error(o);const{remoteSdp:N}=k;if(this.options.debug){const F=libExports$1.parse(N),J=dt(F.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->quickvo: setLocalDescription",{msidArr:J,sdpJson:F})}await this.setRemoteDescription({type:"answer",sdp:N}),await this.iceConnected().then(()=>{D(!0)})})}catch(O){j(O)}}));Se(this,"earlyConnect",(D=[])=>{this.isEarly=!0;const j=()=>new Promise(O=>{Re(this,Rn).call(this).then(async()=>{await this.createSession(),D.length===0&&(D=["microphoneCamera_audio","microphoneCamera_video"]),await Re(this,An).call(this,D),O(!0)})});this.asyncQueue.add(j,{describe:"earlyConnect"})});Se(this,"joinRoom",async D=>new Promise(async(j,O)=>{try{this.setOptions(D),this.isEarly===!1&&await Re(this,Rn).call(this),await Re(this,Jn).call(this),this.clearUsers();const{roomId:I,userId:o,callType:k,sdkToken:N}=this.options;await this.cwsIns.sendMessage({event:this.isEarly?"joinRoomEx":"joinRoom",data:{callType:k,roomId:I,user:{id:o,tracks:[],callAction:0},token:N},version:2}).then(async F=>{const{code:J=0,desc:X="服务器繁忙",data:Y}=F;if(J!==200)throw new Error(X);const{roomId:Q="",roomUsers:te=[]}=Y;if(Q!==I)return O("加入的房间不匹配");this.isInRoom=!0,this.initHeartbeat(),this.isEarly===!1&&await this.createSession(),await this.updateUsers(te);const ie=[];for(const oe of te){const{id:ce,channelCache:we}=oe,{channels:se=[]}=we;await this.updateUserBehaviors(ce,oe.behavior),await this.updateUserChannels(ce,se,!1),se.length!==0&&ie.push({userId:ce,channels:se})}await this.subChannel(ie),await this.emitNotifyUpdateUsers();const ne=await this.getUsers();j(ne)})}catch(I){O(I)}}));Se(this,"quitRoom",()=>new Promise(async D=>{const{roomId:j,userId:O}=this.options,I={roomId:j,user:{id:O}};try{this.isInRoom=!1,clearInterval(Re(this,gn)),await this.stopLocalStreams(),this.stopSubscribe(),this.stopGetPeerStats(),this.clearUsers(),this.clearUserStreams(),this.cwsIns.clearEvents(),this.setRoomState("ready")}catch(o){this.reportLogs("quit_room_error",o.message||o)}await new Promise(o=>setTimeout(()=>o(!0),300)),await this.cwsIns.sendMessage({event:"quitRoom",data:I}),D(!0)}));Se(this,"quitRoomEx",()=>new Promise(async D=>{const{roomId:j,userId:O}=this.options,I={roomId:j,user:{id:O}};try{this.isInRoom=!1,this.stopHeartbeat(),this.initHeartbeat(),await this.stopLocalStreams(),this.stopSubscribe(),this.stopGetPeerStats(),this.clearUsers(),this.clearUserStreams()}catch(o){this.reportLogs("quit_room_error",o.message||o)}await new Promise(o=>setTimeout(()=>o(!0),300)),this.cwsIns.sendMessage({event:"quitRoomEx",data:I}),D(!0)}));Se(this,"syncRoomInfo",()=>new Promise(async(D,j)=>{const{userId:O}=this.options,I=await this.getUser(O),{id:o=O,callAction:k=0}=I;await this.cwsIns.sendMessage({event:"syncRoomInfo",data:{user:{id:o,callAction:k}}}).then(async N=>{const{code:F=0,desc:J}=N;if(F!==200)throw new Error(J);const X=N.data.users;this.clearUsers(),await this.updateUsers(X),await this.updateUsertracks(I.id,I.tracks,!1);{const Y=await this.getUsers();D(Y)}}).catch(N=>j(N))}));Se(this,"checkInRoom",()=>new Promise(async D=>{const{userId:j}=this.options,O=await this.getUser(j),{id:I=j,callAction:o=0}=O;await this.cwsIns.sendMessage({event:"syncRoomInfo",data:{user:{id:I,callAction:o}}}).then(async k=>{const{code:N=0,desc:F}=k;if(N!==200)throw new Error(F);return k.data.users.find(Y=>Y.id===this.options.userId)?D(!0):D(!1)}).catch(()=>D(!1))}));Se(this,"publish",D=>{const j=()=>new Promise(async(O,I)=>{try{{const Y=await this.getSelfInfo(),{banBehaviorMap:Q}=Y;let te=!0;for(const ie of D)if(Q[ie]){te=!1;break}if(te===!1)return I("publish is error: prohibited by administrator.")}try{await this.setLocalStream(D,!0)}catch(Y){this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: setLocalStream is error.",Y)}const o=await this.getSelfInfo(),k=[];for(const Y of D){{const Q=this.getPhoneyStreams(Y);await this.initUserMediaStreamContext(o.id,Y,Q)}{const Q=await this.getLocalStream(Y);Q?await this.initUserMediaStreamContext(o.id,Y,Q):k.push(Y)}}const N=D.filter(Y=>!k.includes(Y)||["microphoneCamera_audio","microphoneCamera_video"].includes(Y));await this.replaceSenderStream(D,!1),await Re(this,An).call(this,N);const F=await this.getSenderTracks(N),J=[...o.tracks,...F];await this.updateUsertracks(o.id,J,!0),k.length!==0&&await this.inactiveTracks(k,!1),N.length!==0&&await this.replaceSenderStream(N,!0);const X=await this.getCallAction(J);await Re(this,kn).call(this,X),await new Promise(Y=>setTimeout(()=>Y(!0),230)),Re(this,zn).call(this,D);{await this.emitNotifyUpdateUsers();const Y=await this.getSelfInfo();O(Y)}}catch(o){this.reportLogs("publish_error",o.message||o),I(o)}});return this.asyncQueue.add(j,{describe:"publish"})});Se(this,"stopPublish",(D=[])=>{const j=()=>new Promise(async(O,I)=>{try{const o=await this.getSelfInfo();D.length===0&&(D=mediaType_keys);const k=o.tracks.filter(({mediaType:F})=>F&&D.includes(F)),N=async()=>{this.initMediaPhoneyStreams(D);const F=await this.getSelfInfo();await this.emitNotifyUpdateUsers(),O(F)};if(k.length===0)return N();await this.replaceSenderStream(D,!0),await this.closeUserTracks(o.id,k,!0),await this.removeSenders(D);{const F=await this.getCallAction(o.tracks);await Re(this,kn).call(this,F)}await this.createOffer(),await this.cwsIns.sendMessage({event:"closeTrack",data:{roomId:this.options.roomId,sdp:this.getSdp(),tracks:k}}).then(async F=>{const{code:J=0,data:X,desc:Y}=F;if(J!==200)throw new Error(Y);const{remoteSdp:Q}=X;await this.setRemoteDescription({type:"answer",sdp:Q}),N()})}catch(o){this.reportLogs("close_track_error",o.message||o),I(o)}});return this.asyncQueue.add(j,{describe:"stopPublish"})});Se(this,"subscribe",(D=[],j=3)=>{const O=()=>new Promise(async(I,o)=>{try{await this.iceConnected();const k=await this.getUsers();let N=[];for(const Y of k){const{isSelf:Q,tracks:te=[]}=Y;if(!Q){const ie=te.filter(({trackName:ne,mid:oe=""})=>oe!==""&&(D.includes(ne)||D.length===0));ie.length!==0&&N.push({...Y,tracks:ie})}}const F=async(Y={})=>{const Q=Array.from(N,({id:ie})=>ie),te=await this.getUsers(Q);await this.emitNotifyUpdateUsers(),I({users:te,detail:Y})};if(N.length===0)return F();const J=[];for(const Y of N){const{id:Q,tracks:te}=Y,ie=dt(te,["type","trackName"]),ne={id:Q,tracks:ie};J.push(ne)}const X=async()=>{await this.cwsIns.sendMessage({event:"subscribe",data:{users:J}}).then(async Y=>{const{code:Q=0,data:te,desc:ie}=Y;if(Q===2017&&ie.includes("renegotiation is expected before pulling or pushing tracks")&&await this.renegotiate(),Q!==200){if(j>=0)return j--,await X();throw new Error(ie)}const{remoteSdp:ne,users:oe=[]}=te;this.onSubscribeUserTracks(oe).then(async ce=>{await this.renegotiate().then(()=>F(ce))}).catch(ce=>{throw new Error(ce)}),await this.setRemoteDescription({type:"offer",sdp:ne})})};await X()}catch(k){this.reportLogs("subscribe_error",k.message||k),o(k)}});return this.asyncQueue.add(O,{describe:"subscribe"})});Se(this,"renegotiate",()=>new Promise(async(D,j)=>{try{await this.createAnswer(),await this.cwsIns.sendMessage({event:"renegotiate",data:{sdp:this.getSdp()}}).then(O=>{const{code:I=0,desc:o}=O;if(I!==200)throw new Error(o);D(O)})}catch(O){j(O)}}));Se(this,"stopSubscribe",(D=[])=>{const j=()=>new Promise(async(O,I)=>{try{const o=await this.getUsers(),k=[];for(const F of o){const{tracks:J=[]}=F;for(const X of J){const{type:Y,mid:Q,trackName:te,mediaType:ie,msid:ne}=X;if(!(!ie||!ne)&&(D.length===0||D.includes(te))){const oe={type:Y,mid:Q,trackName:ne};k.push(oe),await this.closeUserTracks(F.id,[X])}}}const N=async()=>{await this.emitNotifyUpdateUsers(),O(!0)};if(k.length===0)return N();await this.createOffer(),await this.cwsIns.sendMessage({event:"closeTrack",data:{roomId:this.options.roomId,sdp:this.getSdp(),tracks:k}}).then(async F=>{const{remoteSdp:J}=F.data;await this.setRemoteDescription({type:"answer",sdp:J})}),N()}catch(o){this.reportLogs("close_track_error",o.message||o),I(o)}});return this.asyncQueue.add(j,{describe:"stopSubscribe"})});Se(this,"inactiveTracks",async(D,j)=>new Promise(async O=>{const I=await this.getSelfInfo();if(!I||!I.id)return O(!0);const{tracks:o=[]}=I,k=[...o];for(let F of k){const{mediaType:J}=F;if(J&&D.includes(J)){F.enabled=j;const X=await this.getLocalStream(J);if(!X)continue;const Y=X.getTracks();for(const Q of Y)Q.enabled=j}}await this.replaceSenderStream(D,j);const N=await this.getCallAction(k);await Re(this,kn).call(this,N),await this.emitNotifyUpdateUsers(),O(!0)}));Se(this,"setBanBehaviors",D=>new Promise(async(j,O)=>{try{const{roomId:I}=this.options,o=[];for(const k of D){const{id:N,banBehaviors:F}=k,J=Object.keys(F);if(J.length===0)continue;const X=[];for(const Q of J){const te=mediaType_keys.findIndex(oe=>oe===Q),ie=F[Q],ne={type:te,behavior:ie};X.push(ne)}const Y={id:N,behaviors:X};o.push(Y)}await this.cwsIns.sendMessage({event:"preventUsersBehavior",data:{roomId:I,users:o}}).then(async k=>{const{code:N=0,desc:F}=k;if(N!==200)return O(F);j(k)})}catch(I){O(I)}}));Se(this,"pubChannel",()=>new Promise(async(D,j)=>{const I=[{dataChannelName:"web-channe"}];await this.cwsIns.sendMessage({event:"pubChannel",data:{channels:I}}).then(async o=>{const{code:k=0,data:N,desc:F}=o;if(k!==200)throw new Error(F);const{channels:J=[]}=N;for(const X of J){const{channels:Y=[]}=X;for(const Q of Y){const{dataChannelName:te,id:ie}=Q;this.initSendChannel(te,ie)}}D(!0)}).catch(o=>{j(o)})}));Se(this,"subChannel",(D=[])=>new Promise(async j=>{if(D.length===0)return j(!0);await this.cwsIns.sendMessage({event:"subChannel",data:{channels:D}}).then(async O=>{const{code:I=0,data:o,desc:k}=O;if(I!==200)throw new Error(k);const{channels:N=[]}=o;for(const F of N){const{channels:J=[]}=F;for(const X of J){const{dataChannelName:Y,id:Q}=X;this.initReceiveChannel(Y,Q)}}})}));Se(this,"debugger",()=>new Promise(async(D,j)=>{await this.cwsIns.sendMessage({event:"debugger"},!1).then(async O=>{if(O.code!==200)return j(O.desc);D(!0)}).catch(O=>{j(O)})}));Se(this,"shutdown",()=>new Promise(async(D,j)=>{await this.cwsIns.sendMessage({event:"shutdown"},!1).then(async O=>{if(O.code!==200)return j(O.desc);D(!0)}).catch(O=>{j(O)})}));Se(this,"initHeartbeat",()=>{this.stopHeartbeat();const D=()=>this.cwsIns.sendMessage({event:this.isInRoom?"heartbeat":"heartbeatEx"},!1),j=this.isInRoom?5*1e3:30*1e3;Et(this,gn,window.setInterval(D,j)),D()});Se(this,"stopHeartbeat",()=>{clearInterval(Re(this,gn))});Xe(this,zn,async D=>new Promise(async(j,O)=>{try{const{roomId:I}=this.options;if(!I)return;const{id:o,tracks:k=[]}=await this.getSelfInfo(),N=k.filter(F=>F.mediaType&&D.includes(F.mediaType));if(N.length===0)return;await this.cwsIns.sendMessage({event:"pubNotify",data:{roomId:I,user:{id:o,tracks:N}}}),j(!0)}catch(I){O(I)}}));Xe(this,kn,async D=>new Promise(async(j,O)=>{const{roomId:I,userId:o}=this.options,k={roomId:I,user:{id:o,callAction:D}};await this.cwsIns.sendMessage({event:"updateCall",data:k}).then(async N=>{const{code:F=0}=N;if(F!==200)return O(N);await this.updateUserCallAction(o,D),j(D)}).catch(N=>O(N))}));Xe(this,Rn,()=>new Promise(async(D,j)=>{try{if(["connecting","connected"].includes(this.cwsIns.state))return D(!0);this.cwsIns.clearEvents(),this.initPeer();const{appid:O,roomId:I,userId:o}=this.options;if(!O)return j("quickvo: createWs is error. You must first use QuickVO.setOptions to set the appid.");const k={c:O,r:I,v:this.sdk_service_version};if(this.isEarly){const F=xt();k.i=F,this.setOptions({earlyId:F})}else k.b=o;this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: createWs",k);const N=btoa(encodeURI(JSON.stringify(k)));await this.cwsIns.connect(N),this.initHeartbeat();for(const F of Re(this,xn))await F();D(!0)}catch(O){console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: createWs is error.",O),this.reportLogs("ws_c_timeout",O.message||O),j(O)}}));Xe(this,An,async D=>new Promise(async(j,O)=>{try{await this.iceConnected();const I=await this.addSenders(D),o=await this.getSenderTracks(I);if(o.length===0)return j(!0);await this.cwsIns.sendMessage({event:"publish",data:{sdp:this.getSdp(),tracks:o,callAction:0}}).then(async k=>{const{code:N=0,desc:F,data:J}=k;if(N!==200)throw new Error(F);const{remoteSdp:X}=J;await this.setRemoteDescription({type:"answer",sdp:X}),j(!0)})}catch(I){this.reportLogs("publish_error",I.message||I),await this.removeSenders(D),O(I)}}));Xe(this,Jn,()=>new Promise(D=>{if(this.cwsIns.state==="connected")return D(!0);Re(this,xn).push(D)}))}}gn=new WeakMap,xn=new WeakMap,zn=new WeakMap,kn=new WeakMap,Rn=new WeakMap,An=new WeakMap,Jn=new WeakMap;class Room extends RoomCalls{constructor(z){super(z)}}class QuickVO extends Room{constructor(D){super(D);Xe(this,mn,new Map);Se(this,"reconstruct",async()=>{if(this.cwsIns.state!=="connected")return;this.setRoomState("ready"),this.initMediaPhoneyStreams(),this.asyncQueue.clear(),this.initPeer(),await this.createSession();const D=[],j=[],O=await this.getUsers();for(const I of O){const{isSelf:o,callActionMap:k,tracks:N=[]}=I;if(o)for(const F of mediaType_keys)k[F]&&D.push(F);for(const F of N)F.msid&&j.push(F.trackName)}await this.syncRoomInfo(),await this.publish(D),await this.subscribe(j)});Xe(this,Wn,()=>{{const D=async j=>{const{state:O}=j.data;if(O==="closed"){const{roomId:I,userId:o}=this.options,k={roomId:I,user:{id:o}};this.stopHeartbeat(),this.cwsIns.sendMessage({event:"quitRoom",data:k}),this.cwsIns.close(),this.reportLogs("webrtc_c_timeout","webrtc state is closed.")}};this.cwsIns.addNotify({event:"onRoomState",callback:D},!0)}{const D=async j=>{const{qualities:O=[]}=j.data,[I]=O;if(!(I&&I.userId===this.options.userId&&O.length===1)){for(const o of O){const{userId:k,egress:N,ingress:F}=o;this.checkUserInRoom(k)&&await this.updateUserNetwork(k,{egress:N,ingress:F})}await this.emitNotifyUpdateUsers()}};this.cwsIns.addNotify({event:"onNetQuality",callback:D},!0)}{const D=async j=>{const O=j.data.user;await this.updateUsers([O]),await this.updateUsertracks(O.id,O.track,!1),await this.updateUserBehaviors(O.id,O.behavior),await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onJoinRoom",callback:D},!0)}{const D=async j=>{await this.removeUsers([j.data.user.id]),await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onQuitRoom",callback:D},!0)}{const D=async j=>{const{user:O}=j.data,{id:I,tracks:o=[],callAction:k=0}=O;if(await this.updateUserCallAction(I,k),await this.updateUserPermissions(I,3),await this.updateUsertracks(I,o,!0),this.options.newPublishAutoSubscribe){const N=this.getTrackNamesFormTracks(o);await this.subscribe(N)}else await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onPublish",callback:D},!0)}{const D=async j=>{const O=[j.data];this.subChannel(O)};this.cwsIns.addNotify({event:"onDataChannelPublish",callback:D},!0)}{const D=async j=>{const{id:O,tracks:I}=j.data.user;O!==this.options.userId&&(await this.closeUserTracks(O,I,!0),await this.emitNotifyUpdateUsers())};this.cwsIns.addNotify({event:"onCloseTrack",callback:D},!0)}{const D=async j=>{const{id:O,callAction:I}=j.data.user;this.checkUserInRoom(O)&&(await this.updateUserCallAction(O,I),this.emitNotifyUpdateUsers())};this.cwsIns.addNotify({event:"onUpdateCall",callback:D},!0)}{const D=async j=>{const{user:O}=j.data,{id:I,permissions:o=1}=O;o===1?await this.removeUsers([I]):o===3&&await this.updateUsers([O]),await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onUpdatePermissions",callback:D},!0)}{const D=async j=>{const{users:O}=j.data;for(const I of O){const{id:o,behavior:k}=I;await this.updateUserBehaviors(o,k)}await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onUpdateBehavior",callback:D},!0)}this.cwsIns.addNotify({event:"onTokenExpired",callback:async D=>this.destroy()},!0),this.cwsIns.addNotify({event:"destroyRoom",callback:this.destroy},!0)});Se(this,"addNotify",D=>this.cwsIns.addNotify(D));Xe(this,Vn,()=>{});Xe(this,Zn,()=>{this.cwsIns.onReconnectSuccess=async()=>{await this.checkInRoom()?await this.reconstruct():this.setRoomState("closed")}});Xe(this,Gn,async()=>{this.cwsIns.onReconnectStop=async()=>{this.setRoomState("closed")}});Se(this,"addRequestAnimationFrame",async(D,j)=>{{const I=Re(this,mn).get(D);I&&cancelAnimationFrame(I)}const O=(I=Date.now())=>{j(I);const o=requestAnimationFrame(O);Re(this,mn).set(D,o)};O()});Se(this,"clearRequestAnimationFrame",async(D=[])=>{D.length===0&&(D=[...Re(this,mn).keys()]);const j=[];for(const O of D){const I=Re(this,mn).get(O);I&&(cancelAnimationFrame(I),j.push(I))}return j});Se(this,"destroy",async()=>{this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 销毁SDK"),this.cwsIns.emitNotify("onDestroy",{code:200,data:{},desc:"sdk is destroy."}),this.stopLocalStreams(),await new Promise(D=>setTimeout(()=>D(!0),300)),this.stopGetPeerStats(),this.clearUsers(),this.clearUserStreams(),this.stopHeartbeat(),this.cwsIns.clearEvents(),this.cwsIns.close()});Re(this,Vn).call(this),Re(this,Zn).call(this),Re(this,Gn).call(this),Re(this,Wn).call(this)}}mn=new WeakMap,Wn=new WeakMap,Vn=new WeakMap,Zn=new WeakMap,Gn=new WeakMap,exports.QuickVO=QuickVO,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})});
206
+ gUn…g= !þ+µèm M½Êê½½²¦é%0Yg~´p5.\Ø®z‚y9%Ôiܒ!Ùc‰ÝŦH>ÓX ÿZR’[¬&ønÇl’Ó_:ïi«ñ<ø"QÚ©yz …®ªOL¥ÎêŠÌÝi?Ê‚'/Ne»:2NÅÝ_òspüR Oø!!ù+##üÓkéªX-fpd“q[U*]@ ö¨5͔pÖYhܪ= › ÛN3{ü® À)¡9þ‘ž-1® ÂcBNö÷0+È6ò„Òэ;lÅ^_>ÓÛQ&jðMIŠì¤³àlS×j΀¢@ȝåÕ¢•­on‡=M°©xÉûÖäav=MM©²öÖ¹?{ß ßî€øyÛ= ‰„0òûÏ4gr’èNÒíÏqëðð-êö¸†ᖥ$¨”Q.Ò4ä¿V$N_Ý><´æë[⑲F#T1É'utÿZXÁ“š(ošàx¡Jo˜"­ö–ùSæ÷ÒUFÓs* U¡ ÓºUµøGáL¨÷©ASjÕ®'!L‹¢ÕvC¿m·Gžâ¼N¹Ÿ³OÃで1T:ê¹\Z£ËZæ.î}ª°O'ãà¾I;ûÁ€HÃä&ÃÐÐK@3EÅÓÉ>½e@ã/òi¡’|ÌE³{ñSCm…ÎëöÁÐÐ%Ó>dš''¶9Á/T.N?äª †æÿÀÐÐ%Ó¶ ö¾ì¦)ÃÕ÷×"e|ÚþBåýrv¶K6“ŸŒöuâÐÌRÎËýæ×%I­OIø¦Ä(HTJ†~),ÕDCWWÃö(›VwV=M§TsLP³ þV'tT#¡ZLŽêé;ßù[`});var fe={a:te};this.setModule=me=>{O.setModule(EmscriptenWASM,me)},this.getModule=()=>O.getModule(EmscriptenWASM),this.instantiate=()=>(this.getModule().then(me=>WebAssembly.instantiate(me,fe)).then(me=>{const Re=me.exports;ie(Re),f=Re.g,k(),we(Re),N()}),this.ready=new Promise(me=>{N=me}).then(()=>{this.HEAP=f.buffer,this.malloc=re,this.free=ue,this.opus_frame_decoder_create=ye,this.opus_frame_decode_float_deinterleaved=de,this.opus_frame_decoder_destroy=se}),this)}function OpusDecoder(O={}){OpusDecoder.errors||Object.defineProperties(OpusDecoder,{errors:{value:new Map([[-1,"OPUS_BAD_ARG: One or more invalid/out of range arguments"],[-2,"OPUS_BUFFER_TOO_SMALL: Not enough bytes allocated in the buffer"],[-3,"OPUS_INTERNAL_ERROR: An internal error was detected"],[-4,"OPUS_INVALID_PACKET: The compressed data passed is corrupted"],[-5,"OPUS_UNIMPLEMENTED: Invalid/unsupported request number"],[-6,"OPUS_INVALID_STATE: An encoder or decoder structure is invalid or already freed"],[-7,"OPUS_ALLOC_FAIL: Memory allocation has failed"]])}}),this._init=()=>new this._WASMAudioDecoderCommon(this).instantiate(this._EmscriptenWASM,this._module).then(M=>{this._common=M,this._inputBytes=0,this._outputSamples=0,this._frameNumber=0,this._input=this._common.allocateTypedArray(this._inputSize,Uint8Array),this._output=this._common.allocateTypedArray(this._outputChannels*this._outputChannelSize,Float32Array);const Z=this._common.allocateTypedArray(this._channels,Uint8Array);Z.buf.set(this._channelMappingTable),this._decoder=this._common.wasm.opus_frame_decoder_create(this._sampleRate,this._channels,this._streamCount,this._coupledStreamCount,Z.ptr,this._preSkip,this._forceStereo)}),Object.defineProperty(this,"ready",{enumerable:!0,get:()=>this._ready}),this.reset=()=>(this.free(),this._init()),this.free=()=>{this._common.free(),this._common.wasm.opus_frame_decoder_destroy(this._decoder),this._common.wasm.free(this._decoder)},this._decode=M=>{if(!(M instanceof Uint8Array))throw Error("Data to decode must be Uint8Array. Instead got "+typeof M);this._input.buf.set(M);let Z=this._common.wasm.opus_frame_decode_float_deinterleaved(this._decoder,this._input.ptr,M.length,this._output.ptr),J;return Z<0&&(J="libopus "+Z+" "+(OpusDecoder.errors.get(Z)||"Unknown Error"),console.error(J),Z=0),{outputBuffer:this._common.getOutputChannels(this._output.buf,this._outputChannels,Z),samplesDecoded:Z,error:J}},this.decodeFrame=M=>{let Z=[];const J=this._decode(M);return J.error&&this._common.addError(Z,J.error,M.length,this._frameNumber,this._inputBytes,this._outputSamples),this._frameNumber++,this._inputBytes+=M.length,this._outputSamples+=J.samplesDecoded,this._WASMAudioDecoderCommon.getDecodedAudioMultiChannel(Z,[J.outputBuffer],this._outputChannels,J.samplesDecoded,this._sampleRate)},this.decodeFrames=M=>{let Z=[],J=[],z=0,Q=0;for(;Q<M.length;){const ee=M[Q++],Y=this._decode(ee);Z.push(Y.outputBuffer),z+=Y.samplesDecoded,Y.error&&this._common.addError(J,Y.error,ee.length,this._frameNumber,this._inputBytes,this._outputSamples),this._frameNumber++,this._inputBytes+=ee.length,this._outputSamples+=Y.samplesDecoded}return this._WASMAudioDecoderCommon.getDecodedAudioMultiChannel(J,Z,this._outputChannels,z,this._sampleRate)},this._isWebWorker=OpusDecoder.isWebWorker,this._WASMAudioDecoderCommon=OpusDecoder.WASMAudioDecoderCommon||WASMAudioDecoderCommon,this._EmscriptenWASM=OpusDecoder.EmscriptenWASM||EmscriptenWASM,this._module=OpusDecoder.module;const N=8,I=M=>typeof M=="number",D=O.sampleRate,f=O.channels,k=O.streamCount,i=O.coupledStreamCount,c=O.channelMappingTable,$=O.preSkip,C=O.forceStereo?1:0;if(f>2&&(!I(k)||!I(i)||!Array.isArray(c)))throw new Error("Invalid Opus Decoder Options for multichannel decoding.");return this._sampleRate=[8e3,12e3,16e3,24e3,48e3].includes(D)?D:48e3,this._channels=I(f)?f:2,this._streamCount=I(k)?k:1,this._coupledStreamCount=I(i)?i:this._channels-1,this._channelMappingTable=c||(this._channels===2?[0,1]:[0]),this._preSkip=$||0,this._forceStereo=f<=N&&f!=2?C:0,this._inputSize=32e3*.12*this._channels,this._outputChannelSize=120*48,this._outputChannels=this._forceStereo?2:this._channels,this._ready=this._init(),this}class OpusDecoderWebWorker extends WASMAudioDecoderWorker{constructor(N){super(N,"opus-decoder",OpusDecoder,EmscriptenWASM)}async decodeFrame(N){return this.postToDecoder("decodeFrame",N)}async decodeFrames(N){return this.postToDecoder("decodeFrames",N)}}assignNames(OpusDecoder,"OpusDecoder"),assignNames(OpusDecoderWebWorker,"OpusDecoderWebWorker"),new OpusDecoder;class RoomPeer extends RoomUsers{constructor(I){super(I);_e(this,"getPeerStatsTimer",0);_e(this,"reports",[]);_e(this,"candidates",[]);Ge(this,Tn,[]);Ge(this,vn,0);_e(this,"peerNetwork",{inboundBytes:0,outboundBytes:0,lostRate:"0.00",roundTripTime:"0",jitter:"0"});_e(this,"initPeer",()=>{var I;clearTimeout(Oe(this,vn)),this.transceiverMap=new Map,(I=this.peerIns)==null||I.close(),this.peerIns=void 0,this.peerIns=new RTCPeerConnection({iceServers:[{urls:"stun:stun.cloudflare.com:3478"}],bundlePolicy:"max-bundle"}),this.peerIns.createDataChannel("scapegoat-channel"),Oe(this,Pn).call(this),Oe(this,Ln).call(this)});_e(this,"getNatType",()=>"normal");_e(this,"initSendChannel",(I="",D)=>{});_e(this,"initReceiveChannel",(I="",D)=>{});_e(this,"replaceSenderStream",async(I=[],D)=>{const{userId:f}=this.options;I.length===0&&(I=mediaType_keys);for(const k of I){const i=this.transceiverMap.get(k);let c;if(i){const{sender:$}=i;D?c=this.getUserStream(f,k):c=this.getPhoneyStreams(k);const[C]=c.getTracks();C&&await $.replaceTrack(C)}}});_e(this,"getSenderTracks",async(I=[])=>{const D=[];for(const f of I){const k=this.transceiverMap.get(f);if(!k)continue;const{mid:i,sender:c}=k,{track:$}=c;if(!$)continue;const{id:C,enabled:M}=$,Z=mediaType_keys.findIndex(z=>z===f),J={type:Z,enabled:M,trackName:`web-${Z}-${C}`,location:"local",mid:i};D.push(J)}return D});_e(this,"addSenders",async(I=[])=>{I.length===0&&(this.peerIns.addTransceiver("audio",{direction:"sendonly"}),this.peerIns.addTransceiver("video",{direction:"sendonly"}));const D=[];for(const f of I){if(this.transceiverMap.get(f))continue;const i=this.getPhoneyStreams(f),[c]=i.getTracks(),$=this.peerIns.addTransceiver(c,{direction:"sendonly"});this.transceiverMap.set(f,$),D.push(f)}if(I.length===0||D.length!==0){const f=await this.peerIns.createOffer();if(this.options.debug){const k=libExports$1.parse(f.sdp),i=dt(k.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->quickvo: setLocalDescription",{msidArr:i,sdpJson:k,description:f})}await this.peerIns.setLocalDescription(f)}return D});_e(this,"removeSenders",async(I=[])=>{I.length===0&&(I=mediaType_keys);for(const D of I)this.transceiverMap.has(D)&&this.transceiverMap.delete(D)});_e(this,"onSubscribeUserTracks",I=>{let D=0;return new Promise(async f=>{const k=[];for(const i of I){const{tracks:c=[]}=i;for(const $ of c){const{trackName:C,mid:M}=$,[Z]=await this.getUserTrackByTrackName([C]);k.push({...Z,mid:M})}}{let i=[];const c=async()=>{clearTimeout(D);const C=new Map;for(const Z of i){const{userId:J,mediaType:z}=Z;if(!J||!z)continue;C.has(J)||C.set(J,{userId:J,tracks:[],updateStreams:{}});const ee=C.get(J);ee.tracks.push(Z),ee.updateStreams[z]=!0}const M=[...C.values()];for(const Z of M){const{userId:J,tracks:z}=Z;await this.updateUsertracks(J,z,!0)}await this.emitNotifyUpdateUsersStreams(M),this.peerIns.removeEventListener("track",$);{const Z=Array.from(k,Q=>Q.trackName),J=Array.from(i,Q=>Q.trackName),z=Z.filter(Q=>!J.includes(Q));f({target:Z,success:J,fail:z})}},$=async C=>{const{streams:M,transceiver:Z}=C,[J]=M,{mid:z,receiver:Q}=Z,{track:ee}=Q,{id:Y}=ee,te=k.find(re=>re.mid===`${z}`);if(!te)return;const{userId:ie,mediaType:ye}=te;if(!(!ie||!ye)){{const re={...te,mid:z,msid:Y};i.push(re)}this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#00b60f;",`------->quickvo: await subscribe ${i.length}/${k.length}`,{mediaType:ye,mid:z,userTrack:te,e:C});{const re=new Audio;if(re.srcObject=J,await this.initUserMediaStreamContext(ie,ye,J),ye==="microphoneCamera_audio"||ye==="screenSharing_audio"){const de=this.getUserAudioMediaStreamContext(ie,ye);de==null||de.setMute(!1)}}k.length===i.length&&c()}};this.peerIns.addEventListener("track",$),D=window.setTimeout(()=>{this.reportLogs("subscribe_error",`incomplete subscription. (${i.length}/${k.length})`),c()},5*1e3)}})});Ge(this,Pn,()=>{const I=()=>{this.peerIns.close(),this.setRoomState("closed")};this.peerIns.oniceconnectionstatechange=async()=>{const D=this.peerIns.iceConnectionState;switch(clearTimeout(Oe(this,vn)),D){case"connected":{this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#00b60f;",`------->quickvo: connectionState:${D}`),this.setRoomState("connected");for(const f of Oe(this,Tn))await f()}break;case"disconnected":this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#b64900;",`------->quickvo: connectionState:${D}`),kt(this,vn,window.setTimeout(I,30*1e3));break;case"failed":this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#b60000;",`------->quickvo: connectionState:${D}`),this.setRoomState("failed");break;case"closed":this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#b60000;",`------->quickvo: connectionState:${D}`),I();break;default:this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#b64900;",`------->quickvo: connectionState:${D}`);break}}});_e(this,"iceConnected",()=>new Promise(I=>{if(this.peerIns.iceConnectionState==="connected")return I(!0);Oe(this,Tn).push(I)}));_e(this,"closeUserTracks",async(I,D=[],f=!1)=>{const k=[];for(const C of D){const{trackName:M,msid:Z}=C;k.push(M),Z&&k.push(Z)}const i=C=>k.includes(C),c=this.peerIns.getTransceivers();for(const C of c){const{mid:M,sender:Z,receiver:J}=C;Z.track&&i(Z.track.id)&&(C.stop(),this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;",`------->quickvo: transceiver.sender: ${M} is stop.`,C)),J.track&&i(J.track.id)&&(C.stop(),this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;",`------->quickvo: transceiver.receiver: ${M} is stop.`,C))}const $=await this.getUser(I);if($){for(const C of $.tracks){const{trackName:M,msid:Z,userId:J,mediaType:z}=C;!J||!z||!i(M)||(this.removeUserMediaStreamContext(J,z),Z&&delete C.msid)}if(f){const C=$.tracks.filter(({trackName:M})=>!i(M));await this.updateUsertracks(I,C,!1)}}});_e(this,"createOffer",async()=>{const I=await this.peerIns.createOffer();if(this.options.debug){const D=libExports$1.parse(I.sdp),f=dt(D.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->quickvo: createOffer",{msidArr:f,sdpJson:D,description:I})}await this.peerIns.setLocalDescription(I)});_e(this,"createAnswer",async()=>{const I=await this.peerIns.createAnswer();if(this.options.debug){const D=libExports$1.parse(I.sdp),f=dt(D.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->quickvo: createAnswer",{msidArr:f,sdpJson:D,description:I})}await this.peerIns.setLocalDescription(I)});_e(this,"getSdp",()=>{var I;return(I=this.peerIns.localDescription)==null?void 0:I.sdp});_e(this,"setRemoteDescription",async I=>{if(this.options.debug){const D=libExports$1.parse(I.sdp),f=dt(D.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->quickvo: setRemoteDescription",{msidArr:f,sdpJson:D,description:I})}return await this.peerIns.setRemoteDescription(I),I});_e(this,"setCallStrategy",async(I,D=[])=>{D.length===0&&(D=mediaType_keys);let f="balanced";switch(I){case"qualityPriority":f="maintain-resolution";break;case"fluencyPriority":f="maintain-framerate";break;case"balancedDowngrade":f="balanced";break}const k=await this.getSelfInfo(),i=Array.from(k.tracks,({trackName:$})=>$),c=this.peerIns.getSenders();for(const $ of c){const{track:C}=$;if(!C||!i.includes(C.id))continue;const M=$.getParameters();$.setParameters({...M,degradationPreference:f})}});_e(this,"setRTCRtpSenderParameters",I=>{try{const D=this.peerIns.getSenders();for(const f of D){const k=f.getParameters();f.setParameters({...k,...I})}}catch(D){console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: setRTCRtpSenderParameters is error.",D)}});_e(this,"getReportsByMid",async(I=[])=>I.length===0?this.reports:this.reports.filter(D=>I.includes(D.mid)));_e(this,"getRoomNetwork",()=>this.peerNetwork);_e(this,"getPeerNetwork",()=>this.peerNetwork);Ge(this,Un,async()=>{try{const I=await this.peerIns.getStats(),D=["inbound-rtp","remote-inbound-rtp","outbound-rtp","transport"],k=[...I.values()].filter(de=>D.includes(de.type));let i=0,c=0,$=0,C=0,M=0,Z=0,J=[],z=[];for(const de of this.reports){const{packetsSent:se,packetsLost:ue}=de;se&&($+=se),ue&&(C+=ue)}this.reports=k;for(const de of this.reports){const{bytesSent:se,bytesReceived:ue,packetsSent:he,packetsLost:we,roundTripTime:fe,jitter:me}=de;se&&(c=se),ue&&(i=ue),he&&(M+=he),we&&(Z+=we),fe&&J.push((fe*100).toFixed(2)),me&&z.push(me.toFixed(2))}z.sort().reverse(),J.sort().reverse();const Q=M-$,ee=Z-C,Y=Q===0?"0.00":(ee/Q).toFixed(2),[te="0"]=J,[ie="0"]=z,ye={outboundBytes:c,inboundBytes:i,lostRate:Y,roundTripTime:te,jitter:ie};this.peerNetwork=ye;const re=(de,se,ue)=>{const he=Number(de),we=Number(se),fe=Number(ue);let me="0";return he<.03&&we<100&&fe<.05?me="5":he<.06&&we<160&&fe<.1?me="4":he<.1&&we<250&&fe<.15?me="3":he<.15&&we<400&&fe<.2?me="2":me="1",Number(me)};{const de=re(Y,te,ie),se=await this.getSelfInfo(),{network:ue}=se,he={egress:de,ingress:de};$t("updateUserNetwork",async()=>{if(await this.updateUserNetwork(this.options.userId,he),JSON.stringify(ue)!==JSON.stringify(he)){this.emitNotifyUpdateUsers();const{userId:me,roomId:Re}=this.options;this.cwsIns.sendMessage({event:"networkQualityChange",data:{...he,userId:me,roomId:Re}},!1)}},3*1e3)}}catch(I){console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: setNetQuality is err.",I)}});Ge(this,Ln,()=>{const I=async()=>{this.peerIns.connectionState!=="connected"||!this.options.roomId||Oe(this,Un).call(this)};this.getPeerStatsTimer=window.setInterval(I,1*1e3)});_e(this,"stopGetPeerStats",()=>clearInterval(this.getPeerStatsTimer))}}Tn=new WeakMap,vn=new WeakMap,Pn=new WeakMap,Un=new WeakMap,Ln=new WeakMap;class RoomCalls extends RoomPeer{constructor(I){super(I);Ge(this,bn,0);Ge(this,On,[]);_e(this,"setLocalStream",(I,D)=>new Promise(async(f,k)=>{try{typeof I=="string"&&(I=[I]);for(const c of I)this.localStreamsActionMap.set(c,D);if(D){if(I.includes("microphoneCamera_audio")&&I.includes("microphoneCamera_video")?await this.initLocalStream("microphoneCamera"):I.includes("microphoneCamera_audio")?await this.initLocalStream("microphoneCamera_audio"):I.includes("microphoneCamera_video")?await this.initLocalStream("microphoneCamera_video"):I.includes("screenSharing_audio")&&I.includes("screenSharing_video")?await this.initLocalStream("screenSharing"):I.includes("screenSharing_audio")&&!I.includes("screenSharing_video")?await this.initLocalStream("screenSharing_audio"):I.includes("screenSharing_video")&&!I.includes("screenSharing_audio")&&await this.initLocalStream("screenSharing_video"),I.includes("screenSharing_audio")){const c=await this.getLocalStream("screenSharing_audio");if(c){const $=c.getTracks();for(const C of $)C.onended=()=>this.stopPublish(["screenSharing_audio","screenSharing_video"])}}if(I.includes("screenSharing_video")){const c=await this.getLocalStream("screenSharing_video");if(c){const $=c.getTracks();for(const C of $)C.onended=()=>this.stopPublish(["screenSharing_audio","screenSharing_video"])}}}else await this.stopLocalStreams(I);const i=await this.getLocalStreams(I);await this.cwsIns.emitNotify("onLocalStream",{code:200,data:i,desc:"local stream is change."}),f(i)}catch(i){k(i)}}));_e(this,"setMediaDeviceKind",(I,D)=>new Promise(async(f,k)=>{this.setDeviceKind(I,D);const i=await this.getSelfInfo(),{id:c,tracks:$=[],callActionMap:C}=i,M=[],Z=async J=>{const z=this.localStreamsActionMap.get(J),Q=$.find(Y=>Y.mediaType===J),ee=C[J];if(z){M.push(J),await this.stopLocalStreams([J]);try{await this.initLocalStream(J)}catch(Y){this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: initLocalStream is error.",Y),await this.inactiveTracks([J],!1),k(Y)}}if(Q){const Y=await this.getLocalStream(J);Y&&(await this.initUserMediaStreamContext(c,J,Y),ee&&await this.replaceSenderStream([J],!0))}{const Y=await this.getLocalStreams(M);await this.cwsIns.emitNotify("onLocalStream",{code:200,data:Y,desc:"local stream is change."}),await this.emitNotifyUpdateUsers(),f(!0)}};I==="audioinput"&&await Z("microphoneCamera_audio"),I==="videoinput"&&await Z("microphoneCamera_video"),I==="audiooutput"&&(await this.changeAudiooutput(),f(!0))}));_e(this,"changeScreenSharing",async I=>{const D=await this.getSelfInfo(),{tracks:f=[],callActionMap:k}=D;try{await this.setLocalStream(I,!0);for(const i of I)f.find($=>$.mediaType===i&&k[i])&&await this.replaceSenderStream([i],!0)}catch(i){this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: changeScreenSharing is error.",i)}});_e(this,"createSession",()=>new Promise(async(I,D)=>{try{await this.addSenders(),await this.cwsIns.sendMessage({event:"connectCF",data:{sdp:this.getSdp()}}).then(async f=>{const{code:k=0,desc:i,data:c}=f;if(k!==200)throw new Error(i);const{remoteSdp:$}=c;if(this.options.debug){const C=libExports$1.parse($),M=dt(C.media,["mid","msid","type"]);console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#ffffff;","------->quickvo: setLocalDescription",{msidArr:M,sdpJson:C})}await this.setRemoteDescription({type:"answer",sdp:$}),await this.iceConnected().then(()=>{I(!0)})})}catch(f){D(f)}}));_e(this,"earlyConnect",(I=[])=>{this.isEarly=!0;const D=()=>new Promise(f=>{Oe(this,En).call(this).then(async()=>{await this.createSession(),I.length===0&&(I=["microphoneCamera_audio","microphoneCamera_video"]),await Oe(this,In).call(this,I),f(!0)})});this.asyncQueue.add(D,{describe:"earlyConnect"})});_e(this,"joinRoom",async I=>new Promise(async(D,f)=>{try{this.setOptions(I),this.asyncQueue.clear(),this.isEarly===!1&&await Oe(this,En).call(this),await Oe(this,Fn).call(this),this.clearUsers();const{roomId:k,userId:i,callType:c,sdkToken:$}=this.options;await this.cwsIns.sendMessage({event:this.isEarly?"joinRoomEx":"joinRoom",data:{callType:c,roomId:k,user:{id:i,tracks:[],callAction:0},token:$},version:2}).then(async C=>{const{code:M=0,desc:Z="服务器繁忙",data:J}=C;if(M!==200)throw new Error(Z);const{roomId:z="",roomUsers:Q=[]}=J;if(z!==k)return f("加入的房间不匹配");this.isInRoom=!0,this.initHeartbeat(),this.isEarly===!1&&await this.createSession(),await this.updateUsers(Q);const ee=[];for(const te of Q){const{id:ie,channelCache:ye}=te,{channels:re=[]}=ye;await this.updateUserBehaviors(ie,te.behavior),await this.updateUserChannels(ie,re,!1),re.length!==0&&ee.push({userId:ie,channels:re})}await this.subChannel(ee),await this.emitNotifyUpdateUsers();const Y=await this.getUsers();D(Y)})}catch(k){f(k)}}));_e(this,"quitRoom",()=>new Promise(async I=>{const{roomId:D,userId:f}=this.options,k={roomId:D,user:{id:f}};try{this.isInRoom=!1,this.asyncQueue.clear(),clearInterval(Oe(this,bn)),await this.stopLocalStreams(),this.stopSubscribe(),this.stopGetPeerStats(),this.clearUsers(),this.clearUserStreams(),this.cwsIns.clearEvents(),this.setRoomState("ready")}catch(i){this.reportLogs("quit_room_error",i.message||i)}await new Promise(i=>setTimeout(()=>i(!0),300)),await this.cwsIns.sendMessage({event:"quitRoom",data:k}),I(!0)}));_e(this,"quitRoomEx",()=>new Promise(async I=>{const{roomId:D,userId:f}=this.options,k={roomId:D,user:{id:f}};try{this.isInRoom=!1,this.asyncQueue.clear(),this.stopHeartbeat(),this.initHeartbeat(),await this.stopLocalStreams(),this.stopSubscribe(),this.stopGetPeerStats(),this.clearUsers(),this.clearUserStreams()}catch(i){this.reportLogs("quit_room_error",i.message||i)}await new Promise(i=>setTimeout(()=>i(!0),300)),this.cwsIns.sendMessage({event:"quitRoomEx",data:k}),I(!0)}));_e(this,"syncRoomInfo",()=>new Promise(async(I,D)=>{const{userId:f}=this.options,k=await this.getUser(f),{id:i=f,callAction:c=0}=k;await this.cwsIns.sendMessage({event:"syncRoomInfo",data:{user:{id:i,callAction:c}}}).then(async $=>{const{code:C=0,desc:M}=$;if(C!==200)throw new Error(M);const Z=$.data.users;this.clearUsers(),await this.updateUsers(Z),await this.updateUsertracks(k.id,k.tracks,!1);{const J=await this.getUsers();I(J)}}).catch($=>D($))}));_e(this,"checkInRoom",()=>new Promise(async I=>{const{userId:D}=this.options,f=await this.getUser(D),{id:k=D,callAction:i=0}=f;await this.cwsIns.sendMessage({event:"syncRoomInfo",data:{user:{id:k,callAction:i}}}).then(async c=>{var J;const{code:$=0,desc:C}=c;if($!==200)throw new Error(C);const M=c.data.users;return(J=c.data)!=null&&J.isActive||M.find(z=>z.id===this.options.userId)?I(!0):I(!1)}).catch(()=>I(!1))}));_e(this,"publish",I=>{const D=()=>new Promise(async(f,k)=>{try{{const J=await this.getSelfInfo(),{banBehaviorMap:z}=J;let Q=!0;for(const ee of I)if(z[ee]){Q=!1;break}if(Q===!1)return k("publish is error: prohibited by administrator.")}try{await this.setLocalStream(I,!0)}catch(J){this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: setLocalStream is error.",J)}const i=await this.getSelfInfo(),c=[];for(const J of I){{const z=this.getPhoneyStreams(J);await this.initUserMediaStreamContext(i.id,J,z)}{const z=await this.getLocalStream(J);z?await this.initUserMediaStreamContext(i.id,J,z):c.push(J)}}const $=I.filter(J=>!c.includes(J)||["microphoneCamera_audio","microphoneCamera_video"].includes(J));await this.replaceSenderStream(I,!1),await Oe(this,In).call(this,$);const C=await this.getSenderTracks($),M=[...i.tracks,...C];await this.updateUsertracks(i.id,M,!0),c.length!==0&&await this.inactiveTracks(c,!1),$.length!==0&&await this.replaceSenderStream($,!0);const Z=await this.getCallAction(M);await Oe(this,_n).call(this,Z),await new Promise(J=>setTimeout(()=>J(!0),230)),Oe(this,Hn).call(this,I);{await this.emitNotifyUpdateUsers();const J=await this.getSelfInfo();f(J)}}catch(i){this.reportLogs("publish_error",i.message||i),k(i)}});return this.asyncQueue.add(D,{describe:"publish"})});_e(this,"stopPublish",(I=[])=>{const D=()=>new Promise(async(f,k)=>{try{const i=await this.getSelfInfo();I.length===0&&(I=mediaType_keys);const c=i.tracks.filter(({mediaType:C})=>C&&I.includes(C)),$=async()=>{this.initMediaPhoneyStreams(I);const C=await this.getSelfInfo();await this.emitNotifyUpdateUsers(),f(C)};if(c.length===0)return $();await this.replaceSenderStream(I,!0),await this.closeUserTracks(i.id,c,!0),await this.removeSenders(I);{const C=await this.getCallAction(i.tracks);await Oe(this,_n).call(this,C)}await this.createOffer(),await this.cwsIns.sendMessage({event:"closeTrack",data:{roomId:this.options.roomId,sdp:this.getSdp(),tracks:c}}).then(async C=>{const{code:M=0,data:Z,desc:J}=C;if(M!==200)throw new Error(J);const{remoteSdp:z}=Z;await this.setRemoteDescription({type:"answer",sdp:z}),$()})}catch(i){this.reportLogs("close_track_error",i.message||i),k(i)}});return this.asyncQueue.add(D,{describe:"stopPublish"})});_e(this,"subscribe",(I=[],D=3)=>{const f=()=>new Promise(async(k,i)=>{try{await this.iceConnected();const c=await this.getUsers();let $=[];for(const J of c){const{isSelf:z,tracks:Q=[]}=J;if(!z){const ee=Q.filter(({trackName:Y,mid:te=""})=>te!==""&&(I.includes(Y)||I.length===0));ee.length!==0&&$.push({...J,tracks:ee})}}const C=async(J={})=>{const z=Array.from($,({id:ee})=>ee),Q=await this.getUsers(z);await this.emitNotifyUpdateUsers(),k({users:Q,detail:J})};if($.length===0)return C();const M=[];for(const J of $){const{id:z,tracks:Q}=J,ee=dt(Q,["type","trackName"]),Y={id:z,tracks:ee};M.push(Y)}const Z=async()=>{await this.cwsIns.sendMessage({event:"subscribe",data:{users:M}}).then(async J=>{const{code:z=0,data:Q,desc:ee}=J;if(z===2017&&ee.includes("renegotiation is expected before pulling or pushing tracks")&&await this.renegotiate(),z!==200){if(D>=0)return D--,await Z();throw new Error(ee)}const{remoteSdp:Y,users:te=[]}=Q;this.onSubscribeUserTracks(te).then(async ie=>{await this.renegotiate().then(()=>C(ie))}).catch(ie=>{throw new Error(ie)}),await this.setRemoteDescription({type:"offer",sdp:Y})})};await Z()}catch(c){this.reportLogs("subscribe_error",c.message||c),i(c)}});return this.asyncQueue.add(f,{describe:"subscribe"})});_e(this,"renegotiate",()=>new Promise(async(I,D)=>{try{await this.createAnswer(),await this.cwsIns.sendMessage({event:"renegotiate",data:{sdp:this.getSdp()}}).then(f=>{const{code:k=0,desc:i}=f;if(k!==200)throw new Error(i);I(f)})}catch(f){D(f)}}));_e(this,"stopSubscribe",(I=[])=>{const D=()=>new Promise(async(f,k)=>{try{const i=await this.getUsers(),c=[];for(const C of i){const{tracks:M=[]}=C;for(const Z of M){const{type:J,mid:z,trackName:Q,mediaType:ee,msid:Y}=Z;if(!(!ee||!Y)&&(I.length===0||I.includes(Q))){const te={type:J,mid:z,trackName:Y};c.push(te),await this.closeUserTracks(C.id,[Z])}}}const $=async()=>{await this.emitNotifyUpdateUsers(),f(!0)};if(c.length===0)return $();await this.createOffer(),await this.cwsIns.sendMessage({event:"closeTrack",data:{roomId:this.options.roomId,sdp:this.getSdp(),tracks:c}}).then(async C=>{const{remoteSdp:M}=C.data;await this.setRemoteDescription({type:"answer",sdp:M})}),$()}catch(i){this.reportLogs("close_track_error",i.message||i),k(i)}});return this.asyncQueue.add(D,{describe:"stopSubscribe"})});_e(this,"inactiveTracks",async(I,D)=>new Promise(async f=>{const k=await this.getSelfInfo();if(!k||!k.id)return f(!0);const{tracks:i=[]}=k,c=[...i];for(let C of c){const{mediaType:M}=C;if(M&&I.includes(M)){C.enabled=D;const Z=await this.getLocalStream(M);if(!Z)continue;const J=Z.getTracks();for(const z of J)z.enabled=D}}await this.replaceSenderStream(I,D);const $=await this.getCallAction(c);await Oe(this,_n).call(this,$),await this.emitNotifyUpdateUsers(),f(!0)}));_e(this,"setBanBehaviors",I=>new Promise(async(D,f)=>{try{const{roomId:k}=this.options,i=[];for(const c of I){const{id:$,banBehaviors:C}=c,M=Object.keys(C);if(M.length===0)continue;const Z=[];for(const z of M){const Q=mediaType_keys.findIndex(te=>te===z),ee=C[z],Y={type:Q,behavior:ee};Z.push(Y)}const J={id:$,behaviors:Z};i.push(J)}await this.cwsIns.sendMessage({event:"preventUsersBehavior",data:{roomId:k,users:i}}).then(async c=>{const{code:$=0,desc:C}=c;if($!==200)return f(C);D(c)})}catch(k){f(k)}}));_e(this,"pubChannel",()=>new Promise(async(I,D)=>{const k=[{dataChannelName:"web-channe"}];await this.cwsIns.sendMessage({event:"pubChannel",data:{channels:k}}).then(async i=>{const{code:c=0,data:$,desc:C}=i;if(c!==200)throw new Error(C);const{channels:M=[]}=$;for(const Z of M){const{channels:J=[]}=Z;for(const z of J){const{dataChannelName:Q,id:ee}=z;this.initSendChannel(Q,ee)}}I(!0)}).catch(i=>{D(i)})}));_e(this,"subChannel",(I=[])=>new Promise(async D=>{if(I.length===0)return D(!0);await this.cwsIns.sendMessage({event:"subChannel",data:{channels:I}}).then(async f=>{const{code:k=0,data:i,desc:c}=f;if(k!==200)throw new Error(c);const{channels:$=[]}=i;for(const C of $){const{channels:M=[]}=C;for(const Z of M){const{dataChannelName:J,id:z}=Z;this.initReceiveChannel(J,z)}}})}));_e(this,"debugger",()=>new Promise(async(I,D)=>{await this.cwsIns.sendMessage({event:"debugger"},!1).then(async f=>{if(f.code!==200)return D(f.desc);I(!0)}).catch(f=>{D(f)})}));_e(this,"shutdown",()=>new Promise(async(I,D)=>{await this.cwsIns.sendMessage({event:"shutdown"},!1).then(async f=>{if(f.code!==200)return D(f.desc);I(!0)}).catch(f=>{D(f)})}));_e(this,"initHeartbeat",()=>{this.stopHeartbeat();const I=()=>this.cwsIns.sendMessage({event:this.isInRoom?"heartbeat":"heartbeatEx"},!1),D=this.isInRoom?5*1e3:30*1e3;kt(this,bn,window.setInterval(I,D)),I()});_e(this,"stopHeartbeat",()=>{clearInterval(Oe(this,bn))});Ge(this,Hn,async I=>new Promise(async(D,f)=>{try{const{roomId:k}=this.options;if(!k)return;const{id:i,tracks:c=[]}=await this.getSelfInfo(),$=c.filter(C=>C.mediaType&&I.includes(C.mediaType));if($.length===0)return;await this.cwsIns.sendMessage({event:"pubNotify",data:{roomId:k,user:{id:i,tracks:$}}}),D(!0)}catch(k){f(k)}}));Ge(this,_n,async I=>new Promise(async(D,f)=>{const{roomId:k,userId:i}=this.options,c={roomId:k,user:{id:i,callAction:I}};await this.cwsIns.sendMessage({event:"updateCall",data:c}).then(async $=>{const{code:C=0}=$;if(C!==200)return f($);await this.updateUserCallAction(i,I),D(I)}).catch($=>f($))}));Ge(this,En,()=>new Promise(async(I,D)=>{try{if(["connecting","connected"].includes(this.cwsIns.state))return I(!0);this.cwsIns.clearEvents(),this.initPeer();const{appid:f,roomId:k,userId:i}=this.options;if(!f)return D("quickvo: createWs is error. You must first use QuickVO.setOptions to set the appid.");const c={c:f,r:k,v:this.sdk_service_version};if(this.isEarly){const C=xt();c.i=C,this.setOptions({earlyId:C})}else c.b=i;this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: createWs",c);const $=btoa(encodeURI(JSON.stringify(c)));await this.cwsIns.connect($),this.initHeartbeat();for(const C of Oe(this,On))await C();I(!0)}catch(f){console.error("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: createWs is error.",f),this.reportLogs("ws_c_timeout",f.message||f),D(f)}}));Ge(this,In,async I=>new Promise(async(D,f)=>{try{await this.iceConnected();const k=await this.addSenders(I),i=await this.getSenderTracks(k);if(i.length===0)return D(!0);await this.cwsIns.sendMessage({event:"publish",data:{sdp:this.getSdp(),tracks:i,callAction:0}}).then(async c=>{const{code:$=0,desc:C,data:M}=c;if($!==200)throw new Error(C);const{remoteSdp:Z}=M;await this.setRemoteDescription({type:"answer",sdp:Z}),D(!0)})}catch(k){this.reportLogs("publish_error",k.message||k),await this.removeSenders(I),f(k)}}));Ge(this,Fn,()=>new Promise(I=>{if(this.cwsIns.state==="connected")return I(!0);Oe(this,On).push(I)}))}}bn=new WeakMap,On=new WeakMap,Hn=new WeakMap,_n=new WeakMap,En=new WeakMap,In=new WeakMap,Fn=new WeakMap;class Room extends RoomCalls{constructor(N){super(N)}}class QuickVO extends Room{constructor(I){super(I);Ge(this,fn,new Map);_e(this,"reconstruct",async()=>{if(this.cwsIns.state!=="connected")return;this.setRoomState("ready"),this.initMediaPhoneyStreams(),this.asyncQueue.clear(),this.initPeer(),await this.createSession();const I=[],D=[],f=await this.getUsers();for(const k of f){const{isSelf:i,callActionMap:c,tracks:$=[]}=k;if(i)for(const C of mediaType_keys)c[C]&&I.push(C);for(const C of $)C.msid&&D.push(C.trackName)}await this.syncRoomInfo(),await this.publish(I),await this.subscribe(D)});Ge(this,jn,()=>{{const I=async D=>{const{state:f}=D.data;if(f==="closed"){const{roomId:k,userId:i}=this.options,c={roomId:k,user:{id:i}};this.stopHeartbeat(),this.cwsIns.sendMessage({event:"quitRoom",data:c}),this.cwsIns.close(),this.reportLogs("webrtc_c_timeout","webrtc state is closed.")}};this.cwsIns.addNotify({event:"onRoomState",callback:I},!0)}{const I=async D=>{const{qualities:f=[]}=D.data,[k]=f;if(!(k&&k.userId===this.options.userId&&f.length===1)){for(const i of f){const{userId:c,egress:$,ingress:C}=i;this.checkUserInRoom(c)&&await this.updateUserNetwork(c,{egress:$,ingress:C})}await this.emitNotifyUpdateUsers()}};this.cwsIns.addNotify({event:"onNetQuality",callback:I},!0)}{const I=async D=>{const f=D.data.user;await this.updateUsers([f]),await this.updateUsertracks(f.id,f.track,!1),await this.updateUserBehaviors(f.id,f.behavior),await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onJoinRoom",callback:I},!0)}{const I=async D=>{await this.removeUsers([D.data.user.id]),await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onQuitRoom",callback:I},!0)}{const I=async D=>{const{user:f}=D.data,{id:k,tracks:i=[],callAction:c=0}=f;if(await this.updateUserCallAction(k,c),await this.updateUserPermissions(k,3),await this.updateUsertracks(k,i,!0),this.options.newPublishAutoSubscribe){const $=this.getTrackNamesFormTracks(i);await this.subscribe($)}else await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onPublish",callback:I},!0)}{const I=async D=>{const f=[D.data];this.subChannel(f)};this.cwsIns.addNotify({event:"onDataChannelPublish",callback:I},!0)}{const I=async D=>{const{id:f,tracks:k}=D.data.user;f!==this.options.userId&&(await this.closeUserTracks(f,k,!0),await this.emitNotifyUpdateUsers())};this.cwsIns.addNotify({event:"onCloseTrack",callback:I},!0)}{const I=async D=>{const{id:f,callAction:k}=D.data.user;this.checkUserInRoom(f)&&(await this.updateUserCallAction(f,k),this.emitNotifyUpdateUsers())};this.cwsIns.addNotify({event:"onUpdateCall",callback:I},!0)}{const I=async D=>{const{user:f}=D.data,{id:k,permissions:i=1}=f;i===1?await this.removeUsers([k]):i===3&&await this.updateUsers([f]),await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onUpdatePermissions",callback:I},!0)}{const I=async D=>{const{users:f}=D.data;for(const k of f){const{id:i,behavior:c}=k;await this.updateUserBehaviors(i,c)}await this.emitNotifyUpdateUsers()};this.cwsIns.addNotify({event:"onUpdateBehavior",callback:I},!0)}this.cwsIns.addNotify({event:"onTokenExpired",callback:async I=>this.destroy()},!0),this.cwsIns.addNotify({event:"destroyRoom",callback:this.destroy},!0)});_e(this,"addNotify",I=>this.cwsIns.addNotify(I));Ge(this,zn,()=>{});Ge(this,Jn,()=>{this.cwsIns.onReconnectSuccess=async()=>{await this.checkInRoom()?await this.reconstruct():this.setRoomState("closed")}});Ge(this,Wn,async()=>{this.cwsIns.onReconnectStop=async()=>{this.setRoomState("closed")}});_e(this,"addRequestAnimationFrame",async(I,D)=>{{const k=Oe(this,fn).get(I);k&&cancelAnimationFrame(k)}const f=(k=Date.now())=>{D(k);const i=requestAnimationFrame(f);Oe(this,fn).set(I,i)};f()});_e(this,"clearRequestAnimationFrame",async(I=[])=>{I.length===0&&(I=[...Oe(this,fn).keys()]);const D=[];for(const f of I){const k=Oe(this,fn).get(f);k&&(cancelAnimationFrame(k),D.push(k))}return D});_e(this,"destroy",async()=>{this.options.debug&&console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m","color:#0097ff;","------->quickvo: 销毁SDK"),this.cwsIns.emitNotify("onDestroy",{code:200,data:{},desc:"sdk is destroy."}),this.stopLocalStreams(),await new Promise(I=>setTimeout(()=>I(!0),300)),this.stopGetPeerStats(),this.clearUsers(),this.clearUserStreams(),this.stopHeartbeat(),this.cwsIns.clearEvents(),this.cwsIns.close()});Oe(this,zn).call(this),Oe(this,Jn).call(this),Oe(this,Wn).call(this),Oe(this,jn).call(this)}}fn=new WeakMap,jn=new WeakMap,zn=new WeakMap,Jn=new WeakMap,Wn=new WeakMap,exports.QuickVO=QuickVO,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})});