quickvo-player 0.0.5 → 0.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.
package/dist/index.js CHANGED
@@ -1,71 +1,84 @@
1
- var U = Object.defineProperty;
2
- var D = (f) => {
3
- throw TypeError(f);
1
+ var Z = Object.defineProperty;
2
+ var X = (h) => {
3
+ throw TypeError(h);
4
4
  };
5
- var W = (f, o, u) => o in f ? U(f, o, { enumerable: !0, configurable: !0, writable: !0, value: u }) : f[o] = u;
6
- var b = (f, o, u) => W(f, typeof o != "symbol" ? o + "" : o, u), B = (f, o, u) => o.has(f) || D("Cannot " + u);
7
- var x = (f, o, u) => (B(f, o, "read from private field"), u ? u.call(f) : o.get(f)), P = (f, o, u) => o.has(f) ? D("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(f) : o.set(f, u), C = (f, o, u, c) => (B(f, o, "write to private field"), c ? c.call(f, u) : o.set(f, u), u);
8
- const L = '(function(){"use strict";const U=new TextDecoder("utf-8"),H=(e,s)=>{const a=e.getUint8(s),t=a>>7&1,n=a>>5&3,r=a&31;return{forbidden_zero_bit:t,nal_ref_idc:n,nal_unit_type:r}},b=(e,s)=>e.getUint8(s),P=(e,s,a)=>{const t=new Uint8Array(e.buffer.slice(s,s+a));return U?.decode(t)||""},T=(e,s,a)=>{let t=s,n,r=0;switch(a){case 0:n=e.getFloat64(t,!1),r=8;break;case 1:n=!!e.getUint8(t),r=1;break;case 2:{n="";const o=e.getUint16(t,!1);t=t+2;const c=new Int8Array(e.buffer,t,o).filter(d=>d!==0);n=(U?.decode(c)||"").trim(),r=2+o}break;case 3:for(n={};t<e.byteLength;){const o=e.getUint16(t,!1);if(o===0)break;t=t+2;const c=P(e,t,o);t=t+o;const g=b(e,t);if(g===6)break;t=t+1;const d=T(e,t,g);t=t+d.length,n[c]=d.value,r=2+o+1+d.length}break;case 8:{n={};const o=e.getUint32(t,!1);t=t+4;for(let c=0;c<o;c++){const g=e.getUint16(t,!1);t=t+2;const d=P(e,t,g);t=t+g;const h=b(e,t);t=t+1;const l=T(e,t,h);t=t+l.length,n[d]=l.value,r=2+g+1+l.length}}break;case 10:{n=[];const o=e.getUint32(t,!1);t=t+4;for(let c=0;c<o;c++){const g=b(e,t);t=t+1;const d=T(e,t,g);t=t+d.length,n.push(d.value),r=1+d.length}}break}return{amfType:a,length:r,value:n}},m=(e,s)=>e.getUint8(s)<<16|e.getUint8(s+1)<<8|e.getUint8(s+2);var u={header:{getSignature:e=>{const s=new Int8Array(e.buffer.slice(0,3));return U?.decode(s)||""},getVersion:e=>e.getUint8(3),getFlags:e=>{const a=e.getUint8(0).toString(2).padStart(5,"0").split(""),[,,t,,n]=a;return{audio:n==="1",video:t==="1"}},getDataOffset:e=>e.getUint32(5)},getPreviousTagSize:(e,s)=>e.getUint32(s),isSurplusTag:(e,s)=>{let a=!0;const t=e.byteLength;if(s+4>t)a=!1;else if(s+4+11>t)a=!1;else{const n=m(e,s+4+1);s+4+11+n>t&&(a=!1)}return a},tag:{tagHeader:{getTagType:(e,s)=>{const a=e.getUint8(s);let t;switch(a){case 18:t="script";break;case 8:t="audio";break;case 9:t="video";break}return t},getDataSize:(e,s)=>m(e,s+1),getTimestamp:(e,s)=>m(e,s+4),getTimestampExtended:(e,s)=>e.getUint8(s+7),getStreamID:(e,s)=>m(e,s+8)},tagBody:{parseAudio:(e,s,a)=>{let t=s;const n=e.getUint8(t),r=n>>4&15,i=n>>2&3,o=n>>1&1,c=n&1;t=t+1;const g=e.getUint8(t);t=t+1;const d=a-2,h=new Uint8Array(e.buffer.slice(t,t+d));if(r===10&&g===0){const l=e.getUint8(t),p=e.getUint8(t+1),f=(l&248)>>3,y=(l&7)<<1|p>>7,S=(p&120)>>3,A=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],D=`mp4a.40.${f}`,z=A[y];return{soundFormat:r,soundRate:i,soundSize:o,soundType:c,accPacketType:g,data:h,audioObjectType:f,samplingFrequencyIndex:y,channelConfiguration:S,codec:D,sampleRate:z}}return{soundFormat:r,soundRate:i,soundSize:o,soundType:c,accPacketType:g,data:h}},parseVideo:(e,s,a)=>{let t=s;const n=e.getUint8(t),r=n>>4&15,i=n&15;t=t+1;const o=e.getUint8(t);t=t+1;const c=m(e,t);t=t+3;const g=a-5,d=new Uint8Array(e.buffer.slice(t,t+g));switch(i){case 7:if(o===0){const h=e.getUint8(t);if(t=t+1,h!==1)throw new Error("Invalid AVC version");const l=e.getUint8(t)&255;t=t+1;const p=e.getUint8(t)&255;t=t+1;const f=e.getUint8(t)&255;t=t+1;const A=`avc1.${Array.from([l,p,f],E=>E.toString(16).padStart(2,"0")).join("")}`,D=(e.getUint8(t)&3)-1;t=t+1;const z=e.getUint8(t)&31;t=t+1;const _=e.getUint16(t,!1);t=t+2;const O=new Uint8Array(e.buffer.slice(t,t+_));t=t+_;const I=e.getUint8(t)&31;t=t+1;const x=e.getUint16(t,!1);t=t+2;const M=new Uint8Array(e.buffer.slice(t,t+x));return t=t+x,{frameType:r,codecID:i,avcPacketType:o,cts:c,data:d,version:h,codec:A,profile:l,compatibility:p,level:f,lengthSizeMinusOne:D,numOfSequenceParameterSets:z,sequenceParameterSetLength:_,sps:O,numOfPictureParameterSets:I,pictureParameterSetLength:x,pps:M}}else if(o===1){const h=[],l=t+a-5;for(;t+4<l;){const p=e.getUint32(t,!1);t=t+4;const f=H(e,t);t=t+1;const y=p-1,S=new Uint8Array(e.buffer.slice(t,t+y));t=t+y,h.push({size:p,header:f,payload:S})}return{frameType:r,codecID:i,avcPacketType:o,cts:c,data:d,nalus:h}}break;default:throw new Error("Unsupported codecID")}return{frameType:r,codecID:i,avcPacketType:o,cts:c,data:d}},parseMetaData:(e,s)=>{let a=s;{if(e.getUint8(a)!==2)throw new Error("Invalid AMF type for onMetaData (expected 0x02)");a=a+1}const t=e.getUint16(a,!1);a=a+2;{const i=new Int8Array(e.buffer.slice(a,a+t));if((U?.decode(i)||"")!=="onMetaData")throw new Error("Expected \'onMetaData\' string");a=a+t}const n=b(e,a);return a=a+1,T(e,a,n).value}}}};class L{parseSpeed=8;pendingPayloads=[];payload=new Uint8Array(0);offset=0;is_parsing=!1;header;tag;on={};constructor(){}init=()=>{this.destroy()};push=s=>{this.pendingPayloads.push(s),this.is_parsing||this.parse()};destroy=()=>{this.pendingPayloads=[],this.payload=new Uint8Array(0),this.offset=0,this.is_parsing=!1,this.header=void 0,this.tag=void 0};parse=async()=>{for(this.is_parsing=!0;;){const s=this.pendingPayloads.shift();if(!s)break;const a=new Uint8Array(this.payload.byteLength+s.byteLength);a.set(this.payload,0),a.set(s,this.payload.byteLength),this.payload=a;const t=new DataView(this.payload.buffer);this.header||this.parseHeader(t),await this.parseTag(t)}this.is_parsing=!1};parseHeader=s=>(this.header={signature:u.header.getSignature(s),version:u.header.getVersion(s),flags:u.header.getFlags(s),dataOffset:u.header.getDataOffset(s)},this.offset=this.header?.dataOffset,this.on.header&&this.on.header(this.header),this.header);parseTag=async s=>{const a=(n,r)=>({tagType:u.tag.tagHeader.getTagType(n,r),dataSize:u.tag.tagHeader.getDataSize(n,r),timestamp:u.tag.tagHeader.getTimestamp(n,r),timestampExtended:u.tag.tagHeader.getTimestampExtended(n,r),streamID:u.tag.tagHeader.getStreamID(n,r)}),t=(n,r,i,o)=>{let c;switch(n){case"script":c=u.tag.tagBody.parseMetaData(r,i);break;case"audio":c=u.tag.tagBody.parseAudio(r,i,o);break;case"video":c=u.tag.tagBody.parseVideo(r,i,o);break}return c};for(;this.offset<s.byteLength;){if(u.isSurplusTag(s,this.offset)===!1){this.payload=this.payload.slice(this.offset),this.offset=0;break}const r=a(s,this.offset+4),{tagType:i,dataSize:o}=r;if(!i)break;const c=t(i,s,this.offset+4+11,o);this.tag={header:r,body:c},this.on.tag&&this.on.tag(this.tag),this.offset=this.offset+4+11+o,await new Promise(g=>setTimeout(()=>g(!0),this.parseSpeed))}}}const k=new L;k.on.header=e=>postMessage({action:"onHeader",data:e}),k.on.tag=e=>postMessage({action:"onTag",data:e}),onmessage=e=>{const{action:s,data:a}=e.data,t=k[s];t&&t(a)}})();\n', A = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", L], { type: "text/javascript;charset=utf-8" });
9
- function E(f) {
5
+ var tt = (h, o, a) => o in h ? Z(h, o, { enumerable: !0, configurable: !0, writable: !0, value: a }) : h[o] = a;
6
+ var m = (h, o, a) => tt(h, typeof o != "symbol" ? o + "" : o, a), Q = (h, o, a) => o.has(h) || X("Cannot " + a);
7
+ var I = (h, o, a) => (Q(h, o, "read from private field"), a ? a.call(h) : o.get(h)), J = (h, o, a) => o.has(h) ? X("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(h) : o.set(h, a), K = (h, o, a, u) => (Q(h, o, "write to private field"), u ? u.call(h, a) : o.set(h, a), a);
8
+ const D = '(function(){"use strict";class P{pendingPayloads=[];payload=new Uint8Array(0);chunks=[];push=t=>{this.pendingPayloads.push(t)};next=(t=0)=>{this.payload=this.payload.slice(t);const s=this.pendingPayloads.shift();if(!s)return!1;const e=new Uint8Array(this.payload.byteLength+s.byteLength);return e.set(this.payload,0),e.set(s,this.payload.byteLength),this.payload=e,new DataView(this.payload.buffer)};pushChunk=t=>{this.chunks.push(t),this.chunks.length>1e3&&this.chunks.shift()};destroy=()=>{this.pendingPayloads=[],this.payload=new Uint8Array(0),this.chunks=[]}}const I=(y,t)=>{const s=new Uint8Array(y),e=new Uint8Array(t),n=new Uint8Array(11+s.length+e.length);let a=0;return n[a++]=1,n[a++]=s[1],n[a++]=s[2],n[a++]=s[3],n[a++]=255,n[a++]=225,n[a++]=s.length>>8&255,n[a++]=s.length&255,n.set(s,a),a+=s.length,n[a++]=1,n[a++]=e.length>>8&255,n[a++]=e.length&255,n.set(e,a),n},T=y=>{let t=0;const s=new DataView(y.buffer),e=s.getUint8(t);if(t=t+1,e!==1)throw new Error("Invalid AVC version");const n=s.getUint8(t)&255;t=t+1;const a=s.getUint8(t)&255;t=t+1;const o=s.getUint8(t)&255;t=t+1;const c=`avc1.${Array.from([n,a,o],U=>U.toString(16).padStart(2,"0")).join("")}`,r=(s.getUint8(t)&3)-1;t=t+1;const g=s.getUint8(t)&31;t=t+1;const p=s.getUint16(t,!1);t=t+2;const h=new Uint8Array(s.buffer.slice(t,t+p));t=t+p;const d=s.getUint8(t)&31;t=t+1;const u=s.getUint16(t,!1);t=t+2;const f=new Uint8Array(s.buffer.slice(t,t+u));return t=t+u,{version:e,codec:c,profile:n,compatibility:a,level:o,lengthSizeMinusOne:r,numOfSequenceParameterSets:g,sequenceParameterSetLength:p,sps:h,numOfPictureParameterSets:d,pictureParameterSetLength:u,pps:f}},M=y=>{const t=new Uint8Array(4+y.length);return new DataView(t.buffer).setUint32(0,y.length,!1),t.set(y,4),t},C=y=>{let t=0;for(const n of y)t+=n.length;const s=new Uint8Array(t);let e=0;for(const n of y){const a=n;s.set(a,e),e+=a.length}return s},D=y=>{let t="unknown";switch(y){case 1:case 2:case 27:case 36:t="video";break;case 3:case 4:case 15:t="audio";break;case 6:t="subtitle";break;case 134:t="ad";break}return t};class x{pat;pmt;audioConfig;videoConfig;payloadMap=new Map;on={};constructor(){}parse=async t=>{let s=0;for(;!(s+188>t.byteLength);){if(t.getInt8(s)!=71){s++;continue}await this.parsePacket(t,s),s+=188}return s};parsePacket=async(t,s)=>{if(s+188>t.byteLength)throw new Error("Invalid TS packet");if(t.getUint8(s)!==71)throw new Error("Invalid TS packet");let e=s;const n=this.parseHeader(t,e);e+=4;const{transport_error_indicator:a,pid:o,payload_unit_start_indicator:l,adaptation_field_control:i}=n;if(a===1||o===void 0)return;let c=184;if(i===2||i===3){const r=t.getUint8(e);e+=1,this.parseAdaptationField(t,e),e+=r,c-=r}if(i===3&&(c-=1),i===1||i===3){const r=new Uint8Array(t.buffer.slice(e,e+c));if(o===0)return this.parsePAT(t,e);{const{programs:h=[]}=this.pat||{};if(h.find(u=>u.pmt_pid===o))return this.parsePMT(t,e)}const{streams:g=[]}=this.pmt||{},p=g.find(h=>h.elementary_pid===o);if(p){if(l===1){const h=this.payloadMap.get(o);if(h){switch(p.kind){case"audio":{const d=await this.parseAudio(h);this.on.chunk&&this.on.chunk(d)}break;case"video":{const d=await this.parseVideo(h);this.on.chunk&&this.on.chunk(d),await new Promise(u=>setTimeout(()=>u(!0),8))}break}this.payloadMap.delete(o)}}{this.payloadMap.has(o)||this.payloadMap.set(o,new Uint8Array);const h=this.payloadMap.get(o),d=new Uint8Array(h.byteLength+r.byteLength);d.set(h,0),d.set(r,h.byteLength),this.payloadMap.set(o,d)}}}};parseHeader=(t,s)=>{let e=s;const n=t.getUint8(e),a=t.getUint8(e+1),o=t.getUint8(e+2),l=t.getUint8(e+3),i=(a&128)>>7;if(i===1)return{sync_byte:n,transport_error_indicator:i};const c=(a&64)>>6,r=(a&32)>>5,g=(a&31)<<8|o,p=(l&192)>>6,h=l>>4&3,d=l&15;return{sync_byte:n,transport_error_indicator:i,payload_unit_start_indicator:c,transport_priority:r,pid:g,transport_scrambling_control:p,adaptation_field_control:h,continuity_counter:d}};parsePAT=(t,s)=>{let e=s,n;{const l=t.getUint8(e);e+=1;const i=t.getUint8(e);if(e+=1,i!==0)throw new Error("Invalid PAT table_id");const c=t.getUint16(e)&4095;e+=2;const r=t.getUint16(e);e+=2;const g=(t.getUint8(e)&62)>>1,p=t.getUint8(e)&1;e+=1;const h=t.getUint8(e);e+=1;const d=t.getUint8(e);e+=1,n={pointer_field:l,table_id:i,section_length:c,transport_stream_id:r,version_number:g,current_next_indicator:p,section_number:h,last_section_number:d}}const a=[];{const l=n.section_length-5-4,i=e+l;for(;e<i;){const c=t.getUint16(e),r=t.getUint16(e+2)&8191;e+=4,c!==0&&r>=32&&r<=8190&&a.push({program_number:c,pmt_pid:r})}}const o=t.getUint32(e);this.pat={header:n,programs:a,crc32:o},this.on.debug&&this.on.debug({pat:this.pat})};parsePMT=(t,s)=>{let e=s,n;{const l=t.getUint8(e);e+=1;const i=t.getUint8(e);if(e+=1,i!==2)throw new Error("Invalid PMT table_id");const c=t.getUint16(e)&4095;e+=2;const r=t.getUint16(e);e+=2;const g=(t.getUint8(e)&62)>>1,p=t.getUint8(e)&1;e+=1;const h=t.getUint8(e);e+=1;const d=t.getUint8(e);e+=1;const u=t.getUint16(e)&8191;e+=2;const f=t.getUint16(e)&4095;e+=2,n={pointer_field:l,table_id:i,section_length:c,transport_stream_id:r,version_number:g,current_next_indicator:p,section_number:h,last_section_number:d,pcr_pid:u,program_info_length:f}}const a=[];{const l=n.section_length-9-4,i=e+l;for(;e<i;){const c=t.getUint8(e),r=D(c),g=t.getUint16(e+1)&8191,p=t.getUint16(e+3)&4095;if(e+=5,g<32||g>8190){console.warn(`Invalid elementary_pid: 0x${g.toString(16)}`);continue}a.push({kind:r,stream_type:c,elementary_pid:g,es_info_length:p})}}const o=t.getUint32(e);this.pmt={header:n,streams:a,crc32:o},this.on.debug&&this.on.debug({pmt:this.pmt})};parseAdaptationField=(t,s)=>{let e=s,n,a,o,l;const i=t.getUint8(e),c=!!(i&128),r=!!(i&64),g=!!(i&32),p=!!(i&16),h=!!(i&8),d=!!(i&4),u=!!(i&2),f=!!(i&1);e+=1;const U=(_,m)=>{let b=BigInt(0);b|=BigInt(_.getUint16(m))<<25n,b|=BigInt(_.getUint16(m+1))<<17n,b|=BigInt(_.getUint16(m+2))<<9n,b|=BigInt(_.getUint16(m+3))<<1n,b|=BigInt(_.getUint16(m+4)>>7);const S=(_.getUint16(m+4)&1)<<8|_.getUint16(m+5);return b=b*300n+BigInt(S),b};if(p&&(n=U(t,e),e+=6),h&&(a=U(t,e),e+=6),d&&(o=t.getInt8(e),e+=1),u){const _=t.getUint8(e);e+=1,l=new Uint8Array(t.buffer,e,_),e+=_}return{discontinuity_indicator:c,random_access_indicator:r,elementary_stream_priority_indicator:g,pcr_flag:p,opcr_flag:h,splicing_point_flag:d,transport_private_data_flag:u,adaptation_field_extension_flag:f,pcr:n,opcr:a,splice_countdown:o,transport_private_data:l}};parseAudio=async t=>{const s=new DataView(t.buffer);let e=0,n,a;{const o=s.getUint8(e)===0&&s.getUint8(e+1)===0&&s.getUint8(e+2)===1;if(e+=3,!o)throw new Error("invalid ts audio payload.");const l=s.getUint8(e);e+=1;const i=s.getUint8(e)<<8|s.getUint8(e+1);e+=2;let c,r,g,p,h;{const f=s.getUint8(e);e+=1,c=f>>4&3,r=(f>>3&1)===1,g=(f>>2&1)===1,p=(f>>1&1)===1,h=(f&1)===1}let d,u;{const f=s.getUint8(e);e+=1;const U=f>>6,_=s.getUint8(e);e+=1,(U&2)===2&&(d=this.parsePtsDts(s,e)),(U&1)===1?u=this.parsePtsDts(s,e+5):u=d,e+=_}n={stream_id:l,pes_packet_length:i,scrambling_control:c,priority:r,data_alignment:g,copyright:p,original_copy:h,pts:d,dts:u}}a=t.slice(e);{if(!this.audioConfig){const r=s.getUint8(e);if(e+=1,r===255){const g=s.getUint8(e),p=s.getUint8(e+1),h=p>>2&3,d=(g&248)>>3&3,u=p>>6&3,U=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350][h],_=`mp4a.40.${d}`,m=u===3?1:2;this.audioConfig={kind:"audio",codec:_,sampleRate:U,numberOfChannels:m},this.on.config&&this.on.config(this.audioConfig)}}const{dts:o=0,pts:l=0}=n,i=l-o,c=a.slice(7);return{kind:"audio",type:"key",dts:o,pts:l,cts:i,data:c,pes_payload:a}}};parseVideo=async t=>{const s=new DataView(t.buffer);let e=0,n,a;{const o=s.getUint8(e)===0&&s.getUint8(e+1)===0&&s.getUint8(e+2)===1;if(e+=3,!o)throw new Error("invalid ts video payload.");const l=s.getUint8(e);e+=1;const i=s.getUint8(e)<<8|s.getUint8(e+1);e+=2;let c,r,g,p,h;{const f=s.getUint8(e);e+=1,c=f>>4&3,r=(f>>3&1)===1,g=(f>>2&1)===1,p=(f>>1&1)===1,h=(f&1)===1}let d,u;{const f=s.getUint8(e);e+=1;const U=f>>6,_=s.getUint8(e);e+=1,(U&2)===2&&(d=this.parsePtsDts(s,e)),(U&1)===1?u=this.parsePtsDts(s,e+5):u=d,e+=_}n={stream_id:l,pes_packet_length:i,scrambling_control:c,priority:r,data_alignment:g,copyright:p,original_copy:h,pts:d,dts:u}}a=t.slice(e);{const o=this.getNalus(a);if(!this.videoConfig){let h,d;if(h=o.find(f=>f.type===7)?.nalu.slice(4),d=o.find(f=>f.type===8)?.nalu.slice(4),h&&d){const u=I(h,d),{codec:f}=T(u);this.videoConfig={kind:"video",codec:f,description:u,sps:h,pps:d},this.on.config&&this.on.config(this.videoConfig)}}const l=[];let i="delta";for(const h of o){const{type:d,nalu:u}=h;switch(d){case 6:case 9:l.push(u);break;case 1:i="delta",l.push(u);break;case 5:i="key",l.push(u);break}}const c=C(l),{dts:r=0,pts:g=0}=n,p=g-r;return{kind:"video",type:i,dts:r,pts:g,cts:p,data:c,nalus:l}}};parsePtsDts(t,s){const e=t.getUint8(s),n=t.getUint8(s+1),a=t.getUint8(s+2),o=t.getUint8(s+3),l=t.getUint8(s+4),i=(BigInt(e)&0b00001110n)<<29n|(BigInt(n)&0b11111111n)<<22n|(BigInt(a)&0b11111110n)<<14n|(BigInt(o)&0b11111111n)<<7n|(BigInt(l)&0b11111110n)>>1n;return Number(i)/90}getNalus=t=>{const s=[];let e=0;for(;!(e+4>t.byteLength);){if(t[e]!==0||t[e+1]!==0||t[e+2]!==1){e+=1;continue}e+=3;let n=e;const a=t[e]&31;for(e+=1;!(e+1>t.byteLength);){if(t[e]!==0||t[e+1]!==0||t[e+2]!==1){e+=1;continue}break}let o=e-n;if(t[e-1]===0&&(o-=1),o!==0){const l=t.slice(n,n+o),i=M(l);s.push({type:a,nalu:i})}}return s}}const k=(y,t)=>y.getUint8(t)<<16|y.getUint8(t+1)<<8|y.getUint8(t+2);class O{audioConfig;videoConfig;header;textDecoder=new TextDecoder("utf-8");on={};constructor(){}parse=async t=>{let s=0;for(this.header||(this.parseHeader(t,s),s+=9);this.isSurplusTag(t,s)!==!1;){const n=this.parseTagHeader(t,s+4),{tagType:a,dataSize:o,timestamp:l}=n;if(a){const i=this.parseTagBody(a,t,s+4+11,o);switch(a){case"script":this.on.info&&this.on.info(i);break;case"audio":{const{accPacketType:c}=i;if(c===0){const{codec:r,sampleRate:g,channelConfiguration:p}=i;this.audioConfig={kind:"audio",codec:r,sampleRate:g,numberOfChannels:p},this.on.config&&this.on.config(this.audioConfig)}else{const{cts:r,data:g}=i,p="key",h=r===void 0?void 0:r+l;this.on.chunk&&this.on.chunk({kind:"audio",type:p,dts:l,pts:h,cts:r,data:g})}}break;case"video":{const{avcPacketType:c}=i;if(c===0){const{codec:r,sps:g,pps:p,data:h}=i;this.videoConfig={kind:"video",codec:r,description:h,sps:g,pps:p},this.on.config&&this.on.config(this.videoConfig)}else{const{frameType:r,cts:g,data:p,nalus:h}=i,d=r===1?"key":"delta",u=g===void 0?void 0:g+l;this.on.chunk&&this.on.chunk({kind:"video",type:d,dts:l,pts:u,cts:g,data:p,nalus:h})}}break}s=s+4+11+o}await new Promise(i=>setTimeout(()=>i(!0),8))}return s};parseHeader=(t,s)=>{let e,n,a,o;e=t.getUint8(s)<<16|t.getUint8(s+1)<<8|t.getUint8(s+2),n=t.getUint8(3);{const i=t.getUint8(0).toString(2).padStart(5,"0").split(""),[,,c,,r]=i;a={audio:r==="1",video:c==="1"}}o=t.getUint32(5),this.header={signature:e,version:n,flags:a,dataOffset:o}};isSurplusTag=(t,s)=>{let e=!0;const n=t.byteLength;if(s+4>n)e=!1;else if(s+4+11>n)e=!1;else{const a=k(t,s+4+1);s+4+11+a>n&&(e=!1)}return e};parseTagHeader=(t,s)=>{let e,n,a,o,l;{const i=t.getUint8(s);let c;switch(i){case 18:c="script";break;case 8:c="audio";break;case 9:c="video";break}e=c}return n=k(t,s+1),a=k(t,s+4),o=t.getUint8(s+7),l=k(t,s+8),{tagType:e,dataSize:n,timestamp:a,timestampExtended:o,streamID:l}};parseTagBody=(t,s,e,n)=>{let a;switch(t){case"script":a=this.parseMetaData(s,e);break;case"audio":a=this.parseAudio(s,e,n);break;case"video":a=this.parseVideo(s,e,n);break}return a};parseMetaData=(t,s)=>{let e=s;{if(t.getUint8(e)!==2)throw new Error("Invalid AMF type for onMetaData (expected 0x02)");e=e+1}const n=t.getUint16(e,!1);e=e+2;{const l=new Int8Array(t.buffer.slice(e,e+n));if((this.textDecoder?.decode(l)||"")!=="onMetaData")throw new Error("Expected \'onMetaData\' string");e=e+n}const a=this.getAmfType(t,e);return e=e+1,this.getAMFValue(t,e,a).value};parseAudio=(t,s,e)=>{let n=s;const a=t.getUint8(n),o=a>>4&15,l=a>>2&3,i=a>>1&1,c=a&1;n=n+1;const r=t.getUint8(n);n=n+1;const g=e-2,p=new Uint8Array(t.buffer.slice(n,n+g));if(o===10&&r===0){const h=t.getUint8(n),d=t.getUint8(n+1),u=(h&248)>>3,f=(h&7)<<1|d>>7,U=(d&120)>>3,_=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],m=`mp4a.40.${u}`,b=_[f];return{soundFormat:o,soundRate:l,soundSize:i,soundType:c,accPacketType:r,data:p,audioObjectType:u,samplingFrequencyIndex:f,channelConfiguration:U,codec:m,sampleRate:b}}return{soundFormat:o,soundRate:l,soundSize:i,soundType:c,accPacketType:r,data:p}};parseVideo=(t,s,e)=>{let n=s;const a=t.getUint8(n),o=a>>4&15,l=a&15;n=n+1;const i=t.getUint8(n);n=n+1;const c=k(t,n);n=n+3;const r=e-5,g=new Uint8Array(t.buffer.slice(n,n+r));switch(l){case 7:if(i===0){const p=T(g);return{frameType:o,codecID:l,avcPacketType:i,cts:c,data:g,...p}}else if(i===1){const p=[],h=n+e-5;for(;!(n+4>h);){const d=t.getUint32(n,!1),u=new Uint8Array(t.buffer.slice(n,n+4+d));n+=4+d,p.push(u)}return{frameType:o,codecID:l,avcPacketType:i,cts:c,data:g,nalus:p}}break;default:throw new Error("Unsupported codecID")}return{frameType:o,codecID:l,avcPacketType:i,cts:c,data:g}};getAmfType=(t,s)=>t.getUint8(s);getAMFName=(t,s,e)=>{const n=new Uint8Array(t.buffer.slice(s,s+e));return this.textDecoder?.decode(n)||""};getAMFValue=(t,s,e)=>{let n=s,a,o=0;switch(e){case 0:a=t.getFloat64(n,!1),o=8;break;case 1:a=!!t.getUint8(n),o=1;break;case 2:{a="";const i=t.getUint16(n,!1);n=n+2;const c=new Int8Array(t.buffer,n,i).filter(g=>g!==0);a=(this.textDecoder?.decode(c)||"").trim(),o=2+i}break;case 3:for(a={};n<t.byteLength;){const i=t.getUint16(n,!1);if(i===0)break;n=n+2;const c=this.getAMFName(t,n,i);n=n+i;const r=this.getAmfType(t,n);if(r===6)break;n=n+1;const g=this.getAMFValue(t,n,r);n=n+g.length,a[c]=g.value,o=2+i+1+g.length}break;case 8:{a={};const i=t.getUint32(n,!1);n=n+4;for(let c=0;c<i;c++){const r=t.getUint16(n,!1);n=n+2;const g=this.getAMFName(t,n,r);n=n+r;const p=this.getAmfType(t,n);n=n+1;const h=this.getAMFValue(t,n,p);n=n+h.length,a[g]=h.value,o=2+r+1+h.length}}break;case 10:{a=[];const i=t.getUint32(n,!1);n=n+4;for(let c=0;c<i;c++){const r=this.getAmfType(t,n);n=n+1;const g=this.getAMFValue(t,n,r);n=n+g.length,a.push(g.value),o=1+g.length}}break}return{amfType:e,length:o,value:a}}}class L{pattern;cacher=new P;isParseing=!1;offset=0;on={};parser;constructor(){}init=t=>{switch(this.destroy(),this.pattern=t,this.pattern){case"flv":this.parser=new O;break;case"hls":this.parser=new x;break;default:throw new Error("is error pattern.")}this.parser.on.debug=s=>this.on.debug&&this.on.debug(s),this.parser.on.info=s=>this.on.info&&this.on.info(s),this.parser.on.config=s=>this.on.config&&this.on.config(s),this.parser.on.chunk=s=>{this.cacher.pushChunk(s),this.on.chunk&&this.on.chunk(s)}};push=t=>{this.cacher.push(t),this.isParseing===!1&&this.parse()};destroy=()=>{this.cacher.destroy(),this.isParseing=!1,this.offset=0};parse=async()=>{try{if(this.isParseing=!0,!this.pattern)throw new Error("You need to set the pattern.");if(!this.parser)throw new Error("You need to init parser.");for(;;){const t=this.cacher.next(this.offset);if(this.offset=0,!t)break;this.offset=await this.parser.parse(t)}this.isParseing=!1}catch{this.destroy()}}}const A=new L;A.on.debug=y=>postMessage({action:"onDebug",data:y}),A.on.info=y=>postMessage({action:"onInfo",data:y}),A.on.config=y=>postMessage({action:"onConfig",data:y}),A.on.chunk=y=>postMessage({action:"onChunk",data:y}),onmessage=y=>{const{action:t,data:s}=y.data,e=A[t];e&&e(s)}})();\n', v = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", D], { type: "text/javascript;charset=utf-8" });
9
+ function B(h) {
10
10
  let o;
11
11
  try {
12
- if (o = A && (self.URL || self.webkitURL).createObjectURL(A), !o) throw "";
13
- const u = new Worker(o, {
14
- name: f == null ? void 0 : f.name
12
+ if (o = v && (self.URL || self.webkitURL).createObjectURL(v), !o) throw "";
13
+ const a = new Worker(o, {
14
+ name: h == null ? void 0 : h.name
15
15
  });
16
- return u.addEventListener("error", () => {
16
+ return a.addEventListener("error", () => {
17
17
  (self.URL || self.webkitURL).revokeObjectURL(o);
18
- }), u;
18
+ }), a;
19
19
  } catch {
20
20
  return new Worker(
21
- "data:text/javascript;charset=utf-8," + encodeURIComponent(L),
21
+ "data:text/javascript;charset=utf-8," + encodeURIComponent(D),
22
22
  {
23
- name: f == null ? void 0 : f.name
23
+ name: h == null ? void 0 : h.name
24
24
  }
25
25
  );
26
26
  }
27
27
  }
28
- class _ {
28
+ class L {
29
29
  constructor() {
30
- b(this, "worker", new E());
31
- b(this, "on", {});
32
- b(this, "init", () => this.worker.postMessage({ action: "init" }));
33
- b(this, "push", (o) => this.worker.postMessage({ action: "push", data: o }));
34
- b(this, "destroy", () => {
30
+ m(this, "worker", new B());
31
+ m(this, "on", {});
32
+ m(this, "init", (o) => this.worker.postMessage({ action: "init", data: o }));
33
+ m(this, "push", (o) => this.worker.postMessage({ action: "push", data: o }));
34
+ m(this, "destroy", () => {
35
35
  this.worker.postMessage({ action: "destroy", data: {} }), this.worker.terminate();
36
36
  });
37
37
  this.worker.onmessage = (o) => {
38
- const { action: u, data: c } = o.data;
39
- u === "onHeader" && this.on.header && this.on.header(c), u === "onTag" && this.on.tag && this.on.tag(c);
38
+ const { action: a, data: u } = o.data;
39
+ switch (a) {
40
+ case "onInfo":
41
+ this.on.info && this.on.info(u);
42
+ break;
43
+ case "onConfig":
44
+ this.on.config && this.on.config(u);
45
+ break;
46
+ case "onDebug":
47
+ this.on.debug && this.on.debug(u);
48
+ break;
49
+ case "onChunk":
50
+ this.on.chunk && this.on.chunk(u);
51
+ break;
52
+ }
40
53
  };
41
54
  }
42
55
  }
43
- const N = `(function(){"use strict";class r{audioDecoderConfig;audioDecoder;videoDecoderConfig;videoDecoder;hasKeyFrame=!1;on={audio:{},video:{}};constructor(){}audio={init:i=>{this.audio.destroy(),this.audioDecoderConfig={...i},this.audioDecoder=new AudioDecoder({output:e=>{this.on.audio.decode&&this.on.audio.decode(e)},error:e=>{this.on.audio.error&&this.on.audio.error(e)}}),this.audioDecoder.configure(this.audioDecoderConfig)},decode:i=>{if(!this.audioDecoder)return;const e=new EncodedAudioChunk(i);this.audioDecoder.decode(e)},flush:()=>{this.audioDecoder?.flush()},destroy:()=>{this.audioDecoderConfig=void 0,this.audioDecoder?.close(),this.audioDecoder=void 0}};video={init:i=>{this.video.destroy(),this.videoDecoderConfig={...i},this.videoDecoder=new VideoDecoder({output:async e=>{const d=await createImageBitmap(e),s=e.timestamp;e.close(),d.width>0&&d.height>0?this.on.video.decode&&this.on.video.decode({timestamp:s,bitmap:d}):d.close()},error:e=>{this.on.video.error&&this.on.video.error(e)}}),this.videoDecoder.configure(this.videoDecoderConfig)},decode:i=>{if(this.videoDecoder&&(i.type==="key"&&(this.hasKeyFrame=!0),this.hasKeyFrame&&this.videoDecoder.decodeQueueSize<2)){const e=new EncodedVideoChunk(i);this.videoDecoder.decode(e)}},flush:()=>{this.videoDecoder?.flush()},destroy:()=>{this.videoDecoderConfig=void 0,this.videoDecoder?.close(),this.videoDecoder=void 0,this.hasKeyFrame=!1}}}const t=new r;t.on.audio.decode=o=>postMessage({type:"audio",action:"onDecode",data:o}),t.on.audio.error=o=>postMessage({type:"audio",action:"onError",data:o}),t.on.video.decode=o=>postMessage({type:"video",action:"onDecode",data:o}),t.on.video.error=o=>postMessage({type:"video",action:"onError",data:o}),onmessage=o=>{const{type:i,action:e,data:d}=o.data,s=t[i][e];s&&s(d)}})();
44
- `, R = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", N], { type: "text/javascript;charset=utf-8" });
45
- function V(f) {
56
+ const M = `(function(){"use strict";class r{audioDecoderConfig;audioDecoder;videoDecoderConfig;videoDecoder;hasKeyFrame=!1;on={audio:{},video:{}};constructor(){}audio={init:i=>{this.audio.destroy(),this.audioDecoderConfig={...i},this.audioDecoder=new AudioDecoder({output:e=>{this.on.audio.decode&&this.on.audio.decode(e)},error:e=>{this.on.audio.error&&this.on.audio.error(e)}}),this.audioDecoder.configure(this.audioDecoderConfig)},decode:i=>{if(!this.audioDecoder)return;const e=new EncodedAudioChunk(i);this.audioDecoder.decode(e)},flush:()=>{this.audioDecoder?.flush()},destroy:()=>{this.audioDecoderConfig=void 0,this.audioDecoder?.close(),this.audioDecoder=void 0}};video={init:i=>{this.video.destroy(),this.videoDecoderConfig={...i},this.videoDecoder=new VideoDecoder({output:async e=>{const d=await createImageBitmap(e),s=e.timestamp;e.close(),d.width>0&&d.height>0?this.on.video.decode&&this.on.video.decode({timestamp:s,bitmap:d}):d.close()},error:e=>{console.log("\\x1B[38;2;0;151;255m%c%s\\x1B[0m","color:#0097ff;","------->Breathe: e",e),this.on.video.error&&this.on.video.error(e)}}),this.videoDecoder.configure(this.videoDecoderConfig)},decode:i=>{if(this.videoDecoder&&(i.type==="key"&&(this.hasKeyFrame=!0),this.hasKeyFrame&&this.videoDecoder.decodeQueueSize<2)){const e=new EncodedVideoChunk(i);this.videoDecoder.decode(e)}},flush:()=>{this.videoDecoder?.flush()},destroy:()=>{this.videoDecoderConfig=void 0,this.videoDecoder?.close(),this.videoDecoder=void 0,this.hasKeyFrame=!1}}}const t=new r;t.on.audio.decode=o=>postMessage({type:"audio",action:"onDecode",data:o}),t.on.audio.error=o=>postMessage({type:"audio",action:"onError",data:o}),t.on.video.decode=o=>postMessage({type:"video",action:"onDecode",data:o}),t.on.video.error=o=>postMessage({type:"video",action:"onError",data:o}),onmessage=o=>{const{type:i,action:e,data:d}=o.data,s=t[i][e];s&&s(d)}})();
57
+ `, T = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", M], { type: "text/javascript;charset=utf-8" });
58
+ function F(h) {
46
59
  let o;
47
60
  try {
48
- if (o = R && (self.URL || self.webkitURL).createObjectURL(R), !o) throw "";
49
- const u = new Worker(o, {
50
- name: f == null ? void 0 : f.name
61
+ if (o = T && (self.URL || self.webkitURL).createObjectURL(T), !o) throw "";
62
+ const a = new Worker(o, {
63
+ name: h == null ? void 0 : h.name
51
64
  });
52
- return u.addEventListener("error", () => {
65
+ return a.addEventListener("error", () => {
53
66
  (self.URL || self.webkitURL).revokeObjectURL(o);
54
- }), u;
67
+ }), a;
55
68
  } catch {
56
69
  return new Worker(
57
- "data:text/javascript;charset=utf-8," + encodeURIComponent(N),
70
+ "data:text/javascript;charset=utf-8," + encodeURIComponent(M),
58
71
  {
59
- name: f == null ? void 0 : f.name
72
+ name: h == null ? void 0 : h.name
60
73
  }
61
74
  );
62
75
  }
63
76
  }
64
- class j {
77
+ class N {
65
78
  constructor() {
66
- b(this, "worker", new V());
67
- b(this, "on", { audio: {}, video: {} });
68
- b(this, "audio", {
79
+ m(this, "worker", new F());
80
+ m(this, "on", { audio: {}, video: {} });
81
+ m(this, "audio", {
69
82
  init: (o) => this.worker.postMessage({ type: "audio", action: "init", data: o }),
70
83
  decode: (o) => this.worker.postMessage({ type: "audio", action: "decode", data: o }),
71
84
  flush: () => this.worker.postMessage({ type: "audio", action: "flush" }),
@@ -73,7 +86,7 @@ class j {
73
86
  this.worker.postMessage({ type: "audio", action: "destroy" });
74
87
  }
75
88
  });
76
- b(this, "video", {
89
+ m(this, "video", {
77
90
  init: (o) => this.worker.postMessage({ type: "video", action: "init", data: o }),
78
91
  decode: (o) => this.worker.postMessage({ type: "video", action: "decode", data: o }),
79
92
  flush: () => this.worker.postMessage({ type: "video", action: "flush" }),
@@ -81,160 +94,125 @@ class j {
81
94
  this.worker.postMessage({ type: "video", action: "destroy", data: {} });
82
95
  }
83
96
  });
84
- b(this, "destroy", () => {
97
+ m(this, "destroy", () => {
85
98
  this.worker.postMessage({ type: "audio", action: "destroy" }), this.worker.postMessage({ type: "video", action: "destroy", data: {} }), this.worker.terminate();
86
99
  });
87
100
  this.worker.onmessage = (o) => {
88
- const { type: u, action: c, data: r } = o.data;
89
- switch (u) {
101
+ const { type: a, action: u, data: n } = o.data;
102
+ switch (a) {
90
103
  case "audio":
91
- c === "onDecode" && this.on.audio.decode && this.on.audio.decode(r), c === "onError" && this.on.audio.error && this.on.audio.error(r);
104
+ u === "onDecode" && this.on.audio.decode && this.on.audio.decode(n), u === "onError" && this.on.audio.error && this.on.audio.error(n);
92
105
  break;
93
106
  case "video":
94
- c === "onDecode" && this.on.video.decode && this.on.video.decode(r), c === "onError" && this.on.video.error && this.on.video.error(r);
107
+ u === "onDecode" && this.on.video.decode && this.on.video.decode(n), u === "onError" && this.on.video.error && this.on.video.error(n);
95
108
  break;
96
109
  }
97
110
  };
98
111
  }
99
112
  }
100
- const F = `(function(){"use strict";class r{isRendering=!1;pendingFrames=[];offscreenCanvas;writable;writer;ctx;cutOption;baseTime=0;pause=!1;shader=["stream"];constructor(){}init=({offscreenCanvas:e,baseTime:t=performance.timeOrigin,writable:i})=>{this.destroy(),this.offscreenCanvas=e,this.writable=i,this.writer=this.writable.getWriter(),this.ctx=this.offscreenCanvas.getContext("2d"),this.baseTime=t};setShader=e=>{this.shader=e};setSize=({width:e,height:t})=>{this.offscreenCanvas&&(this.offscreenCanvas.width=e,this.offscreenCanvas.height=t)};destroy=()=>{this.isRendering=!1,this.pendingFrames=[],this.offscreenCanvas=void 0,this.ctx=void 0,this.baseTime=0};push=e=>{this.pendingFrames.push(e),this.isRendering===!1&&setTimeout(this.renderFrame,0)};setCut=e=>{this.cutOption=e};setPause=e=>{this.pause=e,this.isRendering===!1&&setTimeout(this.renderFrame,0)};calculateTimeUntilNextFrame=e=>{const t=performance.timeOrigin+performance.now(),s=this.baseTime+e/1e3-t;return Math.max(0,s)};renderFrame=async()=>{for(this.isRendering=!0;;){const e=this.pendingFrames.shift();if(!e)break;let{timestamp:t,bitmap:i}=e;if(this.cutOption){const{sx:a=0,sy:c=0,sw:m=i.width,sh:o=i.height}=this.cutOption;i=await createImageBitmap(i,a,c,m,o)}const s=this.calculateTimeUntilNextFrame(t);await new Promise(a=>setTimeout(()=>a(!0),s)),this.drawImage({timestamp:t,bitmap:i}),this.cutOption&&i.close()}this.isRendering=!1};drawImage=e=>{if(this.pause!==!0){if(this.shader.includes("stream")){const t=new VideoFrame(e.bitmap,{timestamp:e.timestamp});this.writer.write(t),t.close()}this.shader.includes("canvas")&&this.ctx&&this.offscreenCanvas&&this.ctx.drawImage(e.bitmap,0,0,this.offscreenCanvas.width,this.offscreenCanvas.height)}}}const h=new r;onmessage=n=>{const{action:e,data:t}=n.data,i=h[e];i&&i(t)}})();
101
- `, M = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", F], { type: "text/javascript;charset=utf-8" });
102
- function H(f) {
103
- let o;
104
- try {
105
- if (o = M && (self.URL || self.webkitURL).createObjectURL(M), !o) throw "";
106
- const u = new Worker(o, {
107
- name: f == null ? void 0 : f.name
108
- });
109
- return u.addEventListener("error", () => {
110
- (self.URL || self.webkitURL).revokeObjectURL(o);
111
- }), u;
112
- } catch {
113
- return new Worker(
114
- "data:text/javascript;charset=utf-8," + encodeURIComponent(F),
115
- {
116
- name: f == null ? void 0 : f.name
117
- }
118
- );
119
- }
120
- }
121
- class $ {
122
- constructor() {
123
- b(this, "worker", new H());
124
- b(this, "init", ({ offscreenCanvas: o, baseTime: u = 0, writable: c }) => this.worker.postMessage({ action: "init", data: { offscreenCanvas: o, baseTime: u, writable: c } }, [o, c]));
125
- b(this, "setShader", (o) => this.worker.postMessage({ action: "setShader", data: o }));
126
- b(this, "setSize", ({ width: o, height: u }) => this.worker.postMessage({ action: "setSize", data: { width: o, height: u } }));
127
- b(this, "push", (o) => this.worker.postMessage({ action: "push", data: o }));
128
- b(this, "setCut", async (o) => this.worker.postMessage({ action: "setCut", data: o }));
129
- b(this, "setPause", (o) => this.worker.postMessage({ action: "setPause", data: o }));
130
- b(this, "destroy", () => {
131
- this.worker.postMessage({ action: "destroy", data: {} }), this.worker.terminate();
132
- });
133
- }
134
- }
135
- var q = Object.defineProperty, K = (f, o, u) => o in f ? q(f, o, { enumerable: !0, configurable: !0, writable: !0, value: u }) : f[o] = u, h = (f, o, u) => K(f, typeof o != "symbol" ? o + "" : o, u);
136
- class Q {
137
- constructor(o, u) {
138
- h(this, "inputStream", new MediaStream()), h(this, "outputStream", new MediaStream()), h(this, "inputGain", 1), h(this, "enhanceGain", 1), h(this, "bgsGain", 1), h(this, "bgmGain", 1), h(this, "outputGain", 1), h(this, "mixAudioMap", /* @__PURE__ */ new Map()), h(this, "audioContext", new AudioContext()), h(this, "sourceNode"), h(this, "inputGainNode"), h(this, "enhanceGainNode"), h(this, "bgsGainNode"), h(this, "bgmGainNode"), h(this, "analyserNode"), h(this, "analyserArrayData"), h(this, "outputGainNode"), h(this, "destinationNode"), h(this, "filterStream", (c) => c), h(this, "stop", () => {
113
+ var E = Object.defineProperty, G = (h, o, a) => o in h ? E(h, o, { enumerable: !0, configurable: !0, writable: !0, value: a }) : h[o] = a, y = (h, o, a) => G(h, typeof o != "symbol" ? o + "" : o, a);
114
+ class O {
115
+ constructor(o, a) {
116
+ y(this, "inputStream", new MediaStream()), y(this, "outputStream", new MediaStream()), y(this, "inputGain", 1), y(this, "enhanceGain", 1), y(this, "bgsGain", 1), y(this, "bgmGain", 1), y(this, "outputGain", 1), y(this, "mixAudioMap", /* @__PURE__ */ new Map()), y(this, "audioContext", new AudioContext()), y(this, "sourceNode"), y(this, "inputGainNode"), y(this, "enhanceGainNode"), y(this, "bgsGainNode"), y(this, "bgmGainNode"), y(this, "analyserNode"), y(this, "analyserArrayData"), y(this, "outputGainNode"), y(this, "destinationNode"), y(this, "filterStream", (u) => u), y(this, "stop", () => {
139
117
  {
140
- const c = this.inputStream.getTracks();
141
- for (const r of c)
142
- r.stop(), this.inputStream.removeTrack(r);
118
+ const u = this.inputStream.getTracks();
119
+ for (const n of u)
120
+ n.stop(), this.inputStream.removeTrack(n);
143
121
  }
144
- }), h(this, "getStream", () => this.filterStream(this.outputStream)), h(this, "setMute", (c = !0) => {
145
- c ? this.analyserNode.disconnect(this.outputGainNode) : this.analyserNode.connect(this.outputGainNode);
146
- }), h(this, "setInputGain", (c) => {
147
- this.inputGain = c, this.inputGainNode.gain.setValueAtTime(c, this.audioContext.currentTime);
148
- }), h(this, "setEnhanceGain", async (c) => {
149
- this.enhanceGain = c + 1, this.enhanceGainNode.gain.setValueAtTime(this.enhanceGain, this.audioContext.currentTime);
150
- }), h(this, "setBgsGain", (c) => {
151
- this.bgsGain = c, this.bgsGainNode.gain.setValueAtTime(c, this.audioContext.currentTime);
152
- }), h(this, "setBgmGain", (c) => {
153
- this.bgmGain = c, this.bgmGainNode.gain.setValueAtTime(c, this.audioContext.currentTime);
154
- }), h(this, "setOutputGain", (c) => {
155
- this.outputGain = c, this.outputGainNode.gain.setValueAtTime(this.outputGain, this.audioContext.currentTime);
156
- }), h(this, "getVolume", () => {
157
- const { analyserNode: c, analyserArrayData: r } = this;
158
- c.getByteFrequencyData(r);
159
- let n = 0;
160
- for (let i = 0; i < r.length; i++)
161
- n += r[i];
162
- return Math.ceil(n / r.length);
163
- }), h(this, "mixAudio", (c, r = "bgm") => new Promise(async (n, i) => {
122
+ }), y(this, "getStream", () => this.filterStream(this.outputStream)), y(this, "setMute", (u = !0) => {
123
+ u ? this.analyserNode.disconnect(this.outputGainNode) : this.analyserNode.connect(this.outputGainNode);
124
+ }), y(this, "setInputGain", (u) => {
125
+ this.inputGain = u, this.inputGainNode.gain.setValueAtTime(u, this.audioContext.currentTime);
126
+ }), y(this, "setEnhanceGain", async (u) => {
127
+ this.enhanceGain = u + 1, this.enhanceGainNode.gain.setValueAtTime(this.enhanceGain, this.audioContext.currentTime);
128
+ }), y(this, "setBgsGain", (u) => {
129
+ this.bgsGain = u, this.bgsGainNode.gain.setValueAtTime(u, this.audioContext.currentTime);
130
+ }), y(this, "setBgmGain", (u) => {
131
+ this.bgmGain = u, this.bgmGainNode.gain.setValueAtTime(u, this.audioContext.currentTime);
132
+ }), y(this, "setOutputGain", (u) => {
133
+ this.outputGain = u, this.outputGainNode.gain.setValueAtTime(this.outputGain, this.audioContext.currentTime);
134
+ }), y(this, "getVolume", () => {
135
+ const { analyserNode: u, analyserArrayData: n } = this;
136
+ u.getByteFrequencyData(n);
137
+ let r = 0;
138
+ for (let i = 0; i < n.length; i++)
139
+ r += n[i];
140
+ return Math.ceil(r / n.length);
141
+ }), y(this, "mixAudio", (u, n = "bgm") => new Promise(async (r, i) => {
164
142
  try {
165
143
  {
166
- const s = this.mixAudioMap.get(r);
144
+ const s = this.mixAudioMap.get(n);
167
145
  s && s.stop();
168
146
  }
169
- const e = r === "bgs" ? this.bgsGainNode : this.bgmGainNode, t = this.audioContext.createBufferSource();
170
- this.mixAudioMap.set(r, t), t.buffer = c, t.connect(e), t.onended = () => {
171
- t.disconnect(e), this.mixAudioMap.delete(r), n(!0);
172
- }, t.start(0);
173
- } catch (e) {
174
- i(e);
147
+ const t = n === "bgs" ? this.bgsGainNode : this.bgmGainNode, e = this.audioContext.createBufferSource();
148
+ this.mixAudioMap.set(n, e), e.buffer = u, e.connect(t), e.onended = () => {
149
+ e.disconnect(t), this.mixAudioMap.delete(n), r(!0);
150
+ }, e.start(0);
151
+ } catch (t) {
152
+ i(t);
175
153
  }
176
- })), h(this, "mixAudioStop", (c) => {
177
- const r = this.mixAudioMap.get(c);
178
- r == null || r.stop();
179
- }), h(this, "changeMix", (c, r) => {
180
- const n = c === "bgs" ? this.bgsGainNode : this.bgmGainNode;
181
- r ? n.connect(this.destinationNode) : n.disconnect(this.destinationNode);
182
- }), u && (this.audioContext = u), this.inputStream = o, 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;
154
+ })), y(this, "mixAudioStop", (u) => {
155
+ const n = this.mixAudioMap.get(u);
156
+ n == null || n.stop();
157
+ }), y(this, "changeMix", (u, n) => {
158
+ const r = u === "bgs" ? this.bgsGainNode : this.bgmGainNode;
159
+ n ? r.connect(this.destinationNode) : r.disconnect(this.destinationNode);
160
+ }), a && (this.audioContext = a), this.inputStream = o, 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;
183
161
  {
184
- const { sourceNode: c, inputGainNode: r, enhanceGainNode: n, bgsGainNode: i, bgmGainNode: e, analyserNode: t, outputGainNode: s, destinationNode: l } = this;
185
- c.connect(r), r.connect(n), n.connect(t), i.connect(t), e.connect(t), n.connect(l), i.connect(l), e.connect(l), t.connect(s), s.connect(this.audioContext.destination);
162
+ const { sourceNode: u, inputGainNode: n, enhanceGainNode: r, bgsGainNode: i, bgmGainNode: t, analyserNode: e, outputGainNode: s, destinationNode: l } = this;
163
+ u.connect(n), n.connect(r), r.connect(e), i.connect(e), t.connect(e), r.connect(l), i.connect(l), t.connect(l), e.connect(s), s.connect(this.audioContext.destination);
186
164
  }
187
165
  this.setMute(!0), this.audioContext.resume();
188
166
  }
189
167
  }
190
- const J = async (f, o) => {
168
+ const W = async (h, o) => {
191
169
  try {
192
- const { format: u, numberOfChannels: c, numberOfFrames: r, sampleRate: n } = o, i = f.createBuffer(c, r, n);
193
- for (let e = 0; e < c; e++) {
194
- const t = o.allocationSize({ planeIndex: e }), s = new Uint8Array(t);
195
- o.copyTo(s, { planeIndex: e });
196
- const l = new DataView(s.buffer), a = i.getChannelData(e);
197
- for (let d = 0; d < r; d++) {
198
- let y;
199
- switch (u) {
170
+ const { format: a, numberOfChannels: u, numberOfFrames: n, sampleRate: r } = o, i = h.createBuffer(u, n, r);
171
+ for (let t = 0; t < u; t++) {
172
+ const e = o.allocationSize({ planeIndex: t }), s = new Uint8Array(e);
173
+ o.copyTo(s, { planeIndex: t });
174
+ const l = new DataView(s.buffer), c = i.getChannelData(t);
175
+ for (let d = 0; d < n; d++) {
176
+ let p;
177
+ switch (a) {
200
178
  case "s16":
201
179
  // 16-bit signed PCM (范围: -32768 ~ 32767)
202
180
  case "s16-planar":
203
- y = l.getInt16(d * 2, !0) / 32768;
181
+ p = l.getInt16(d * 2, !0) / 32768;
204
182
  break;
205
183
  case "f32":
206
184
  // 32-bit float (范围: -1.0 ~ 1.0)
207
185
  case "f32-planar":
208
- y = l.getFloat32(d * 4, !0);
186
+ p = l.getFloat32(d * 4, !0);
209
187
  break;
210
188
  case "u8":
211
189
  // 8-bit unsigned (范围: 0 ~ 255)
212
190
  case "u8-planar":
213
- y = (l.getUint8(d) - 128) / 128;
191
+ p = (l.getUint8(d) - 128) / 128;
214
192
  break;
215
193
  default:
216
- throw new Error(`Unsupported audio format: ${u}`);
194
+ throw new Error(`Unsupported audio format: ${a}`);
217
195
  }
218
- a[d] = Math.max(-1, Math.min(1, y));
196
+ c[d] = Math.max(-1, Math.min(1, p));
219
197
  }
220
198
  }
221
199
  return i;
222
- } catch (u) {
223
- throw console.error("Failed to convert AudioData to AudioBuffer:", u), u;
200
+ } catch (a) {
201
+ throw console.error("Failed to convert AudioData to AudioBuffer:", a), a;
224
202
  }
225
203
  };
226
- class X {
204
+ class V {
227
205
  constructor() {
228
- b(this, "prAudioStream");
229
- b(this, "audioContext");
230
- b(this, "destination");
231
- b(this, "stream", new MediaStream());
232
- b(this, "nextStartTime", 0);
233
- b(this, "pendingSources", []);
234
- b(this, "init", (o) => {
235
- o || (o = new (window.AudioContext || window.webkitAudioContext)()), this.audioContext = o, this.destination = this.audioContext.createMediaStreamDestination(), this.stream = new MediaStream(), this.stream.addTrack(this.destination.stream.getAudioTracks()[0]), this.prAudioStream = new Q(this.stream, this.audioContext), this.nextStartTime = 0, this.pendingSources = [];
206
+ m(this, "prAudioStream");
207
+ m(this, "audioContext");
208
+ m(this, "destination");
209
+ m(this, "stream", new MediaStream());
210
+ m(this, "nextStartTime", 0);
211
+ m(this, "pendingSources", []);
212
+ m(this, "init", (o) => {
213
+ o || (o = new (window.AudioContext || window.webkitAudioContext)()), this.audioContext = o, this.destination = this.audioContext.createMediaStreamDestination(), this.stream = new MediaStream(), this.stream.addTrack(this.destination.stream.getAudioTracks()[0]), this.prAudioStream = new O(this.stream, this.audioContext), this.nextStartTime = 0, this.pendingSources = [];
236
214
  });
237
- b(this, "getStream", () => {
215
+ m(this, "getStream", () => {
238
216
  var o;
239
217
  return (o = this.prAudioStream) == null ? void 0 : o.getStream();
240
218
  });
@@ -242,297 +220,479 @@ class X {
242
220
  async push(o) {
243
221
  try {
244
222
  if (!this.audioContext || !this.destination) return;
245
- const u = await J(this.audioContext, o);
246
- if (!u) return;
247
- const c = this.audioContext.createBufferSource();
248
- c.buffer = u, c.connect(this.destination);
249
- const r = Math.max(this.nextStartTime, this.audioContext.currentTime);
250
- this.nextStartTime = r + u.duration, c.start(r), this.pendingSources.push(c), c.onended = () => {
251
- this.pendingSources = this.pendingSources.filter((n) => n !== c);
223
+ const a = await W(this.audioContext, o);
224
+ if (!a) return;
225
+ const u = this.audioContext.createBufferSource();
226
+ u.buffer = a, u.connect(this.destination);
227
+ const n = Math.max(this.nextStartTime, this.audioContext.currentTime);
228
+ this.nextStartTime = n + a.duration, u.start(n), this.pendingSources.push(u), u.onended = () => {
229
+ this.pendingSources = this.pendingSources.filter((r) => r !== u);
252
230
  }, this.audioContext.state === "suspended" && await this.audioContext.resume();
253
231
  } finally {
254
232
  o.close();
255
233
  }
256
234
  }
257
235
  destroy() {
258
- var o, u;
259
- (o = this.audioContext) == null || o.close(), this.audioContext = void 0, this.destination = void 0, this.nextStartTime = 0, (u = this.prAudioStream) == null || u.stop(), this.pendingSources.forEach((c) => c.stop()), this.pendingSources = [];
236
+ var o, a;
237
+ (o = this.audioContext) == null || o.close(), this.audioContext = void 0, this.destination = void 0, this.nextStartTime = 0, (a = this.prAudioStream) == null || a.stop(), this.pendingSources.forEach((u) => u.stop()), this.pendingSources = [];
260
238
  }
261
239
  }
262
- var S, T;
263
- class Y {
240
+ const S = `(function(){"use strict";class r{isRendering=!1;pendingFrames=[];offscreenCanvas;writable;writer;ctx;cutOption;baseTime=0;pause=!1;shader=["stream"];constructor(){}init=({offscreenCanvas:e,writable:t})=>{this.destroy(),this.offscreenCanvas=e,this.writable=t,this.writer=this.writable.getWriter(),this.ctx=this.offscreenCanvas.getContext("2d")};setBaseTime=e=>{this.baseTime=e};setShader=e=>{this.shader=e};setSize=({width:e,height:t})=>{this.offscreenCanvas&&(this.offscreenCanvas.width=e,this.offscreenCanvas.height=t)};destroy=()=>{this.isRendering=!1,this.pendingFrames=[],this.offscreenCanvas=void 0,this.ctx=void 0,this.baseTime=0};push=e=>{this.pendingFrames.push(e),this.isRendering===!1&&setTimeout(this.renderFrame,0)};setCut=e=>{this.cutOption=e};setPause=e=>{this.pause=e,this.isRendering===!1&&setTimeout(this.renderFrame,0)};calculateTimeUntilNextFrame=e=>{const t=performance.timeOrigin+performance.now(),i=this.baseTime+e/1e3-t;return Math.max(0,i)};renderFrame=async()=>{for(this.isRendering=!0;;){const e=this.pendingFrames.shift();if(!e)break;let{timestamp:t,bitmap:s}=e;if(this.cutOption){const{sx:a=0,sy:c=0,sw:m=s.width,sh:o=s.height}=this.cutOption;s=await createImageBitmap(s,a,c,m,o)}const i=this.calculateTimeUntilNextFrame(t);await new Promise(a=>setTimeout(()=>a(!0),i)),this.drawImage({timestamp:t,bitmap:s}),this.cutOption&&s.close()}this.isRendering=!1};drawImage=e=>{if(this.pause!==!0){if(this.shader.includes("stream")){const t=new VideoFrame(e.bitmap,{timestamp:e.timestamp});this.writer.write(t),t.close()}this.shader.includes("canvas")&&this.ctx&&this.offscreenCanvas&&this.ctx.drawImage(e.bitmap,0,0,this.offscreenCanvas.width,this.offscreenCanvas.height)}}}const h=new r;onmessage=n=>{const{action:e,data:t}=n.data,s=h[e];s&&s(t)}})();
241
+ `, x = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", S], { type: "text/javascript;charset=utf-8" });
242
+ function j(h) {
243
+ let o;
244
+ try {
245
+ if (o = x && (self.URL || self.webkitURL).createObjectURL(x), !o) throw "";
246
+ const a = new Worker(o, {
247
+ name: h == null ? void 0 : h.name
248
+ });
249
+ return a.addEventListener("error", () => {
250
+ (self.URL || self.webkitURL).revokeObjectURL(o);
251
+ }), a;
252
+ } catch {
253
+ return new Worker(
254
+ "data:text/javascript;charset=utf-8," + encodeURIComponent(S),
255
+ {
256
+ name: h == null ? void 0 : h.name
257
+ }
258
+ );
259
+ }
260
+ }
261
+ class z {
262
+ constructor() {
263
+ m(this, "worker", new j());
264
+ m(this, "init", ({ offscreenCanvas: o, writable: a }) => this.worker.postMessage({ action: "init", data: { offscreenCanvas: o, writable: a } }, [o, a]));
265
+ m(this, "setShader", (o) => this.worker.postMessage({ action: "setShader", data: o }));
266
+ m(this, "setBaseTime", (o) => this.worker.postMessage({ action: "setBaseTime", data: o }));
267
+ m(this, "setSize", ({ width: o, height: a }) => this.worker.postMessage({ action: "setSize", data: { width: o, height: a } }));
268
+ m(this, "push", (o) => this.worker.postMessage({ action: "push", data: o }));
269
+ m(this, "setCut", async (o) => this.worker.postMessage({ action: "setCut", data: o }));
270
+ m(this, "setPause", (o) => this.worker.postMessage({ action: "setPause", data: o }));
271
+ m(this, "destroy", () => {
272
+ this.worker.postMessage({ action: "destroy", data: {} }), this.worker.terminate();
273
+ });
274
+ }
275
+ }
276
+ const $ = (h) => {
277
+ const o = h.toLowerCase();
278
+ return o.includes(".m3u8") || o.includes("hls") || o.includes("master.m3u8") || o.match(/index\d*\.m3u8/) ? "hls" : o.includes(".mpd") || o.includes("dash") ? "dash" : o.startsWith("rtmp://") || o.startsWith("rtmps://") ? "rtmp" : o.includes(".flv") || o.includes("flv") && !o.includes("flash") ? "flv" : "unknown";
279
+ }, P = (h) => {
280
+ const o = (h == null ? void 0 : h.getTracks()) || [];
281
+ for (const a of o)
282
+ a.stop();
283
+ }, A = () => {
284
+ const h = new z(), o = document.createElement("canvas"), a = o.transferControlToOffscreen(), u = new MediaStreamTrackGenerator({ kind: "video" }), n = new MediaStream([u]), r = () => {
285
+ h.destroy(), P(n);
286
+ };
287
+ return h.init({ offscreenCanvas: a, writable: u.writable }), { worker: h, canvas: o, stream: n, destroy: r };
288
+ };
289
+ class H {
290
+ constructor() {
291
+ m(this, "resolvesMap", /* @__PURE__ */ new Map());
292
+ m(this, "index", 0);
293
+ /**
294
+ *
295
+ * @param eventKey 唯一key
296
+ * @param checkFun 检测函数
297
+ * @param timeout 超时时间 ms
298
+ * @returns
299
+ */
300
+ m(this, "add", (o, a = () => !1, u = 0) => new Promise((n) => {
301
+ var t, e;
302
+ if (a()) return n(!0);
303
+ this.resolvesMap.has(o) || this.resolvesMap.set(o, /* @__PURE__ */ new Map()), this.index++;
304
+ const r = `${this.index}`;
305
+ if (u = Math.max(0, u), u === 0) {
306
+ (t = this.resolvesMap.get(o)) == null || t.set(r, { resolve: n, timer: 0 });
307
+ return;
308
+ }
309
+ const i = window.setTimeout(() => {
310
+ this.emit(o);
311
+ }, u);
312
+ (e = this.resolvesMap.get(o)) == null || e.set(r, { resolve: n, timer: i });
313
+ }));
314
+ m(this, "emit", async (o) => {
315
+ const a = this.resolvesMap.get(o);
316
+ if (!a) return;
317
+ const u = [...a.keys()];
318
+ for (const n of u) {
319
+ const r = a.get(n);
320
+ r && (clearTimeout(r.timer), r.resolve(), a.delete(n));
321
+ }
322
+ });
323
+ }
324
+ }
325
+ const Y = (h) => {
326
+ const o = new DataView(h.buffer);
327
+ let a = 0, u, n, r;
328
+ u = o.getUint32(a, !1), a += 4;
329
+ {
330
+ const i = o.getUint8(a), t = i >> 7 & 1, e = i >> 5 & 3, s = i & 31;
331
+ n = { forbidden_zero_bit: t, nal_ref_idc: e, nal_unit_type: s }, a += 1;
332
+ }
333
+ {
334
+ const i = u - 1;
335
+ r = new Uint8Array(o.buffer.slice(a, a + i));
336
+ }
337
+ return { size: u, header: n, data: r };
338
+ };
339
+ var q, U;
340
+ class C {
264
341
  constructor(o = {}) {
265
- P(this, S, {
266
- timeout: 5 * 1e3
342
+ J(this, q, {
343
+ timeout: 5 * 1e3,
344
+ check: !1
267
345
  });
268
- P(this, T);
346
+ J(this, U);
269
347
  /**
270
348
  *
271
349
  * @param input string | URL | Request
272
350
  * @param init RequestInit
273
351
  */
274
- b(this, "check", (o, u) => new Promise(async (c, r) => {
352
+ m(this, "check", (o, a) => new Promise(async (u, n) => {
275
353
  var i;
276
- this.stop(), C(this, T, new AbortController());
277
- const n = window.setTimeout(() => {
278
- var e;
279
- (e = x(this, T)) == null || e.abort("Timeout."), r({ status: "timeout", reason: "" });
280
- }, x(this, S).timeout);
354
+ this.stop(), K(this, U, new AbortController());
355
+ const r = window.setTimeout(() => {
356
+ var t;
357
+ (t = I(this, U)) == null || t.abort("Timeout."), n({ status: "timeout", reason: "" });
358
+ }, I(this, q).timeout);
281
359
  try {
282
- const e = await fetch(o, { ...u, method: "HEAD", signal: (i = x(this, T)) == null ? void 0 : i.signal });
283
- e.status === 200 ? c({ status: "successed", reason: "" }) : r({ status: "failed", reason: `${e.status}` });
284
- } catch (e) {
285
- r({ status: "error", reason: e.message });
360
+ const t = await fetch(o, { ...a, method: "HEAD", signal: (i = I(this, U)) == null ? void 0 : i.signal });
361
+ t.status === 200 ? u({ status: "successed", reason: "" }) : n({ status: "failed", reason: `${t.status}` });
362
+ } catch (t) {
363
+ n({ status: "error", reason: t.message });
286
364
  }
287
- clearTimeout(n);
365
+ clearTimeout(r);
288
366
  }));
289
367
  /**
290
368
  *
291
369
  * @param input string | URL | Request
292
370
  * @param init RequestInit
293
371
  */
294
- b(this, "request", async (o, u) => new Promise(async (c, r) => {
295
- var n;
372
+ m(this, "request", async (o, a) => new Promise(async (u, n) => {
373
+ var r;
296
374
  try {
297
- await this.check(o, u), C(this, T, new AbortController());
298
- const i = await fetch(o, { ...u, signal: (n = x(this, T)) == null ? void 0 : n.signal });
299
- c(i);
375
+ I(this, q).check && await this.check(o, a), K(this, U, new AbortController());
376
+ const i = await fetch(o, { ...a, signal: (r = I(this, U)) == null ? void 0 : r.signal });
377
+ u(i);
300
378
  } catch (i) {
301
- this.stop(), r(i);
379
+ this.stop(), n(i);
302
380
  }
303
381
  }));
304
382
  /**
305
383
  * stop
306
384
  */
307
- b(this, "stop", () => {
385
+ m(this, "stop", () => {
308
386
  var o;
309
- ((o = x(this, T)) == null ? void 0 : o.signal.aborted) === !1 && x(this, T).abort("Actively stop.");
387
+ ((o = I(this, U)) == null ? void 0 : o.signal.aborted) === !1 && I(this, U).abort("Actively stop.");
310
388
  });
311
- C(this, S, { ...x(this, S), ...o });
389
+ K(this, q, { ...I(this, q), ...o });
312
390
  }
313
391
  }
314
- S = new WeakMap(), T = new WeakMap();
315
- const O = (f) => {
316
- const o = (f == null ? void 0 : f.getTracks()) || [];
317
- for (const u of o)
318
- u.stop();
319
- }, G = (f) => {
320
- const o = new $(), u = document.createElement("canvas"), c = u.transferControlToOffscreen(), r = new MediaStreamTrackGenerator({ kind: "video" }), n = new MediaStream([r]), i = () => {
321
- o.destroy(), O(n);
322
- };
323
- return o.init({ offscreenCanvas: c, baseTime: f, writable: r.writable }), { worker: o, canvas: u, stream: n, destroy: i };
324
- };
325
- class be {
326
- constructor() {
327
- b(this, "prFetch", new Y());
328
- b(this, "demuxerWorker");
329
- b(this, "decoderWorker");
330
- b(this, "audioPlayer");
331
- b(this, "renderWorker");
332
- b(this, "renderBaseTime", 0);
333
- b(this, "stream");
334
- b(this, "canvas");
335
- b(this, "on", { demuxer: {}, decoder: {} });
336
- b(this, "cutRenders", /* @__PURE__ */ new Map());
392
+ q = new WeakMap(), U = new WeakMap();
393
+ class et {
394
+ constructor(o = {}) {
395
+ m(this, "option", {
396
+ debug: !1
397
+ });
398
+ m(this, "prFetch", new C());
399
+ m(this, "prResolves", new H());
400
+ m(this, "url", "");
401
+ m(this, "demuxerWorker");
402
+ m(this, "decoderWorker");
403
+ m(this, "audioPlayer");
404
+ m(this, "renderWorker");
405
+ m(this, "renderBaseTime");
406
+ m(this, "stream");
407
+ m(this, "canvas");
408
+ m(this, "on", { demuxer: {}, decoder: {} });
409
+ m(this, "cutRenders", /* @__PURE__ */ new Map());
337
410
  // @ts-ignore
338
- b(this, "trackGenerator");
411
+ m(this, "trackGenerator");
339
412
  /**
340
413
  * 初始化
341
414
  */
342
- b(this, "init", () => {
343
- this.initDemuxer(), this.initDecoder(), this.audioPlayer = new X(), this.audioPlayer.init(), this.initRender();
415
+ m(this, "init", () => {
416
+ this.initDecoder(), this.audioPlayer = new V(), this.audioPlayer.init(), this.initRender();
344
417
  });
345
418
  /**
346
419
  * 开始播放
347
420
  * @param url : string
348
421
  */
349
- b(this, "start", async (o) => (this.stop(), this.renderBaseTime = (/* @__PURE__ */ new Date()).getTime(), this.init(), this.prFetch.request(o).then(async (u) => {
350
- var n;
351
- const c = (n = u.body) == null ? void 0 : n.getReader();
352
- if (!c) throw new Error("Reader is error.");
353
- const r = () => {
354
- c.read().then(({ done: i, value: e }) => {
355
- var t;
356
- e && ((t = this.demuxerWorker) == null || t.push(e)), !i && r();
357
- }).catch((i) => {
358
- if (i.name !== "AbortError") throw i;
359
- });
360
- };
361
- r();
362
- }).catch((u) => {
363
- console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->Breathe: err", u);
364
- })));
422
+ m(this, "start", async (o) => {
423
+ this.stop(), this.url = o, this.init();
424
+ const a = $(o);
425
+ if (a === "unknown") throw new Error("This address cannot be parsed.");
426
+ switch (this.initDemuxer(a), a) {
427
+ case "flv":
428
+ this.flv.start();
429
+ break;
430
+ case "hls":
431
+ this.hls.start();
432
+ break;
433
+ }
434
+ });
365
435
  /**
366
436
  * 停止
367
437
  */
368
- b(this, "stop", async () => {
369
- var u, c, r, n;
438
+ m(this, "stop", async () => {
439
+ var a, u, n, r;
370
440
  try {
371
- this.prFetch.stop();
441
+ clearInterval(this.hls.getSegmentsTimer), this.prFetch.stop();
372
442
  } catch (i) {
373
- console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->Breathe: error", i);
443
+ console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->pr-player: error", i);
374
444
  }
375
- (u = this.demuxerWorker) == null || u.destroy(), (c = this.decoderWorker) == null || c.destroy(), (r = this.renderWorker) == null || r.destroy(), O(this.stream);
445
+ (a = this.demuxerWorker) == null || a.destroy(), (u = this.decoderWorker) == null || u.destroy(), (n = this.renderWorker) == null || n.destroy(), P(this.stream);
376
446
  const o = [...this.cutRenders.keys()];
377
447
  for (const i of o)
378
448
  this.cut.remove(i);
379
- (n = this.audioPlayer) == null || n.destroy(), this.renderBaseTime = 0, this.canvas = void 0;
380
- });
381
- /**
382
- * 监听媒体 tag
383
- */
384
- b(this, "onTag", (o) => {
385
- var i;
386
- if (!this.decoderWorker) return;
387
- const { header: u, body: c } = o, { tagType: r, timestamp: n } = u;
388
- switch (r) {
389
- case "script":
390
- {
391
- const { width: e, height: t } = c;
392
- (i = this.renderWorker) == null || i.setSize({ width: e, height: t }), this.on.demuxer.script && this.on.demuxer.script(o);
393
- }
394
- break;
395
- case "audio":
396
- {
397
- const { accPacketType: e, data: t } = c;
398
- if (e === 0) {
399
- const { codec: s, sampleRate: l, channelConfiguration: a } = c, d = { codec: s, sampleRate: l, numberOfChannels: a, description: new Uint8Array([]) };
400
- this.decoderWorker.audio.init(d);
401
- } else e === 1 && this.decoderWorker.audio.decode({ type: "key", timestamp: n * 1, data: t });
402
- this.on.demuxer.audio && this.on.demuxer.audio(o);
403
- }
404
- break;
405
- case "video":
406
- {
407
- const { avcPacketType: e, frameType: t, data: s, nalus: l = [] } = c;
408
- if (e === 0) {
409
- const { codec: a, data: d } = c;
410
- this.decoderWorker.video.init({ codec: a, description: d });
411
- } else if (e === 1) {
412
- const a = t === 1 ? "key" : "delta";
413
- this.decoderWorker.video.decode({ type: a, timestamp: n * 1e3, data: s });
414
- for (const d of l) {
415
- const { header: y, payload: p } = d, { nal_unit_type: w } = y;
416
- w === 6 && this.on.demuxer.sei && this.on.demuxer.sei(p);
417
- }
418
- }
419
- this.on.demuxer.video && this.on.demuxer.video(o);
420
- }
421
- break;
422
- }
449
+ (r = this.audioPlayer) == null || r.destroy(), this.renderBaseTime = void 0, this.canvas = void 0;
423
450
  });
424
- /**
425
- * 初始化分离器
426
- */
427
- b(this, "initDemuxer", () => {
428
- this.demuxerWorker = new _(), this.demuxerWorker.init(), this.demuxerWorker.on.tag = this.onTag;
429
- });
430
- /**
431
- * 初始化解码器
432
- */
433
- b(this, "initDecoder", () => {
434
- this.decoderWorker = new j(), this.decoderWorker.on.audio.decode = (o) => {
435
- var u;
436
- (u = this.audioPlayer) == null || u.push(o), this.on.decoder.audio && this.on.decoder.audio(o);
437
- }, this.decoderWorker.on.audio.error = (o) => {
438
- this.stop(), this.on.error && this.on.error(o);
439
- }, this.decoderWorker.on.video.decode = async (o) => {
440
- var c, r;
441
- (c = this.renderWorker) == null || c.push(o);
442
- const u = [...this.cutRenders.keys()];
443
- for (const n of u)
444
- (r = this.cutRenders.get(n)) == null || r.worker.push(o);
445
- this.on.decoder.video && this.on.decoder.video(o), o.bitmap.close();
446
- }, this.decoderWorker.on.video.error = (o) => {
447
- this.stop(), this.on.error && this.on.error(o);
448
- };
449
- });
450
- /**
451
- * 初始化渲染器
452
- */
453
- b(this, "initRender", () => {
454
- const { worker: o, canvas: u, stream: c } = G(this.renderBaseTime);
455
- this.renderWorker = o, this.canvas = u, this.stream = c, this.renderWorker.setPause(!1);
456
- });
457
- b(this, "getCanvas", () => this.canvas);
458
- b(this, "getStream", () => this.stream);
459
- b(this, "setPause", (o) => {
460
- var u;
461
- (u = this.renderWorker) == null || u.setPause(o);
451
+ m(this, "getCanvas", () => this.canvas);
452
+ m(this, "getStream", () => this.stream);
453
+ m(this, "setPause", (o) => {
454
+ var a;
455
+ (a = this.renderWorker) == null || a.setPause(o);
462
456
  });
463
457
  /**
464
458
  * 设置渲染模式
465
459
  */
466
- b(this, "setShader", (o) => {
467
- var u;
468
- (u = this.renderWorker) == null || u.setShader(o);
460
+ m(this, "setShader", (o) => {
461
+ var a;
462
+ (a = this.renderWorker) == null || a.setShader(o);
469
463
  });
470
464
  /**
471
465
  * 是否静音 默认为true
472
466
  * @param state?: boolean
473
467
  */
474
- b(this, "setMute", (o) => {
475
- var u, c;
476
- return (c = (u = this.audioPlayer) == null ? void 0 : u.prAudioStream) == null ? void 0 : c.setMute(o);
468
+ m(this, "setMute", (o) => {
469
+ var a, u;
470
+ return (u = (a = this.audioPlayer) == null ? void 0 : a.prAudioStream) == null ? void 0 : u.setMute(o);
477
471
  });
478
- b(this, "cut", {
472
+ /**
473
+ * 是否已准备好
474
+ */
475
+ m(this, "isReady", () => {
476
+ const o = () => {
477
+ var a;
478
+ return ((a = this.stream) == null ? void 0 : a.active) === !0;
479
+ };
480
+ return this.prResolves.add("isReady", o);
481
+ });
482
+ m(this, "cut", {
479
483
  /**
480
484
  * 创建剪切
481
485
  */
482
- create: (o, u) => {
483
- let c = this.cutRenders.get(o);
484
- return c ? (c.worker.setCut(u), c.worker.setPause(!1), c) : (c = G(this.renderBaseTime), c.worker.setCut(u), this.cutRenders.set(o, c), c);
486
+ create: (o, a) => {
487
+ let u = this.cutRenders.get(o);
488
+ return u ? (u.worker.setCut(a), u.worker.setPause(!1), u) : (u = A(), u.worker.setBaseTime(this.renderBaseTime || 0), u.worker.setCut(a), this.cutRenders.set(o, u), u);
485
489
  },
486
490
  getCanvas: (o) => {
487
- var u;
488
- return (u = this.cutRenders.get(o)) == null ? void 0 : u.canvas;
491
+ var a;
492
+ return (a = this.cutRenders.get(o)) == null ? void 0 : a.canvas;
489
493
  },
490
494
  getStream: (o) => {
491
- var u;
492
- return (u = this.cutRenders.get(o)) == null ? void 0 : u.stream;
495
+ var a;
496
+ return (a = this.cutRenders.get(o)) == null ? void 0 : a.stream;
493
497
  },
494
- setPause: (o, u) => {
495
- var c;
496
- (c = this.cutRenders.get(o)) == null || c.worker.setPause(u);
498
+ setPause: (o, a) => {
499
+ var u;
500
+ (u = this.cutRenders.get(o)) == null || u.worker.setPause(a);
497
501
  },
498
502
  /**
499
503
  * 设置渲染模式
500
504
  */
501
- setShader: (o, u) => {
502
- var c;
503
- (c = this.cutRenders.get(o)) == null || c.worker.setShader(u);
505
+ setShader: (o, a) => {
506
+ var u;
507
+ (u = this.cutRenders.get(o)) == null || u.worker.setShader(a);
504
508
  },
505
509
  /**
506
510
  * 移除剪切
507
511
  */
508
512
  remove: (o) => {
509
- var u;
510
- (u = this.cutRenders.get(o)) == null || u.destroy(), this.cutRenders.delete(o);
513
+ var a;
514
+ (a = this.cutRenders.get(o)) == null || a.destroy(), this.cutRenders.delete(o);
515
+ }
516
+ });
517
+ /**
518
+ * 初始化解复器
519
+ */
520
+ m(this, "initDemuxer", (o) => {
521
+ this.demuxerWorker = new L(), this.demuxerWorker.init(o), this.demuxerWorker.on.debug = (a) => {
522
+ this.option.debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->pr-player: debug", a);
523
+ }, this.demuxerWorker.on.info = (a) => {
524
+ this.option.debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->pr-player: info", a), this.on.demuxer.info && this.on.demuxer.info(a);
525
+ }, this.demuxerWorker.on.config = (a) => {
526
+ var n, r;
527
+ this.option.debug && console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->pr-player: config", a), this.on.demuxer.config && this.on.demuxer.config(a);
528
+ const { kind: u } = a;
529
+ switch (u) {
530
+ case "audio":
531
+ {
532
+ const { codec: i, sampleRate: t, numberOfChannels: e } = a;
533
+ (n = this.decoderWorker) == null || n.audio.init({ codec: i, sampleRate: t, numberOfChannels: e });
534
+ }
535
+ break;
536
+ case "video":
537
+ {
538
+ const { codec: i, description: t } = a;
539
+ (r = this.decoderWorker) == null || r.video.init({ codec: i, description: t });
540
+ }
541
+ break;
542
+ }
543
+ }, this.demuxerWorker.on.chunk = (a) => {
544
+ var n;
545
+ if (this.on.demuxer.chunk && this.on.demuxer.chunk(a), !this.decoderWorker) return;
546
+ const { kind: u } = a;
547
+ switch (u) {
548
+ case "audio":
549
+ {
550
+ const { type: r, dts: i, data: t } = a, e = i * 1;
551
+ this.decoderWorker.audio.decode({ type: r, timestamp: e, data: t });
552
+ }
553
+ break;
554
+ case "video":
555
+ {
556
+ const { type: r, dts: i, data: t, nalus: e = [] } = a;
557
+ if (this.renderBaseTime === void 0) {
558
+ const l = (/* @__PURE__ */ new Date()).getTime();
559
+ this.renderBaseTime = l - i, (n = this.renderWorker) == null || n.setBaseTime(this.renderBaseTime);
560
+ }
561
+ const s = i * 1e3;
562
+ this.decoderWorker.video.decode({ type: r, timestamp: s, data: t });
563
+ for (const l of e) {
564
+ if (l.byteLength <= 4) continue;
565
+ const { header: c, data: d } = Y(l), { nal_unit_type: p } = c;
566
+ p === 6 && this.on.demuxer.sei && this.on.demuxer.sei(d);
567
+ }
568
+ }
569
+ break;
570
+ }
571
+ };
572
+ });
573
+ /**
574
+ * 初始化解码器
575
+ */
576
+ m(this, "initDecoder", () => {
577
+ this.decoderWorker = new N(), this.decoderWorker.on.audio.decode = (o) => {
578
+ var a;
579
+ (a = this.audioPlayer) == null || a.push(o), this.on.decoder.audio && this.on.decoder.audio(o);
580
+ }, this.decoderWorker.on.audio.error = (o) => {
581
+ this.stop(), this.on.error && this.on.error(o);
582
+ }, this.decoderWorker.on.video.decode = async (o) => {
583
+ var u, n;
584
+ (u = this.renderWorker) == null || u.push(o);
585
+ const a = [...this.cutRenders.keys()];
586
+ for (const r of a)
587
+ (n = this.cutRenders.get(r)) == null || n.worker.push(o);
588
+ this.on.decoder.video && this.on.decoder.video(o), o.bitmap.close();
589
+ }, this.decoderWorker.on.video.error = (o) => {
590
+ this.stop(), this.on.error && this.on.error(o);
591
+ };
592
+ });
593
+ /**
594
+ * 初始化渲染器
595
+ */
596
+ m(this, "initRender", () => {
597
+ const { worker: o, canvas: a, stream: u } = A();
598
+ this.renderWorker = o, this.canvas = a, this.stream = u, this.renderWorker.setPause(!1);
599
+ });
600
+ m(this, "flv", {
601
+ start: async () => {
602
+ var o, a;
603
+ try {
604
+ const u = (o = (await this.prFetch.request(this.url)).body) == null ? void 0 : o.getReader();
605
+ if (!u) throw new Error("reader is error.");
606
+ for (; ; ) {
607
+ const { done: n, value: r } = await u.read();
608
+ if (r && ((a = this.demuxerWorker) == null || a.push(r)), n) break;
609
+ }
610
+ } catch (u) {
611
+ if ((u == null ? void 0 : u.name) !== "AbortError") throw Error(u);
612
+ }
613
+ }
614
+ });
615
+ m(this, "hls", {
616
+ isLive: !1,
617
+ urls: [],
618
+ url: "",
619
+ getSegmentsTimer: 0,
620
+ parse: async (o) => {
621
+ const a = new TextDecoder("utf-8").decode(o).split(`
622
+ `).map((e) => e.replace("\r", "")), u = this.url.substring(0, this.url.lastIndexOf("/") + 1);
623
+ let n = 4, r = 0, i = !1;
624
+ const t = [];
625
+ for (const e of a)
626
+ e.startsWith("#EXTINF:") ? n = parseFloat(e.split(":")[1].split(",")[0]) : e.startsWith("#EXT-X-TARGETDURATION:") ? r = parseInt(e.split(":")[1]) : e.startsWith("#EXT-X-ENDLIST") ? i = !1 : e.startsWith("#EXT-X-MEDIA-SEQUENCE:") ? i = !0 : e.includes(".ts") && !e.startsWith("#") && t.push({
627
+ url: e.startsWith("http") ? e : u + e,
628
+ duration: n,
629
+ isLive: i
630
+ });
631
+ return { baseUrl: u, targetDuration: r, isLive: i, segments: t };
632
+ },
633
+ getSegments: async () => {
634
+ var a;
635
+ const o = (a = (await new C().request(this.url)).body) == null ? void 0 : a.getReader();
636
+ if (!o) throw new Error("reader is error.");
637
+ for (; ; ) {
638
+ const { done: u, value: n } = await o.read();
639
+ if (n) {
640
+ const r = await this.hls.parse(n), { segments: i = [], isLive: t = !1 } = r;
641
+ this.hls.isLive = t;
642
+ let e = Array.from(i, (l) => l.url);
643
+ const s = e.findIndex((l) => l === this.hls.url);
644
+ s !== -1 && (e = e.slice(s + 1)), this.hls.urls = e;
645
+ }
646
+ if (u) break;
647
+ }
648
+ },
649
+ getData: async () => {
650
+ },
651
+ start: async () => {
652
+ var o, a;
653
+ try {
654
+ for (await this.hls.getSegments(), this.hls.getSegmentsTimer = window.setInterval(this.hls.getSegments, 1e3), this.hls.isLive === !1 && clearInterval(this.hls.getSegmentsTimer); ; ) {
655
+ const u = this.hls.urls.shift();
656
+ if (u) {
657
+ this.hls.url = u;
658
+ const n = (o = (await this.prFetch.request(u)).body) == null ? void 0 : o.getReader();
659
+ if (!n) throw new Error("segment reader is error.");
660
+ for (; ; ) {
661
+ const { done: r, value: i } = await n.read();
662
+ if (i && ((a = this.demuxerWorker) == null || a.push(i)), r) break;
663
+ }
664
+ }
665
+ await new Promise((n) => setTimeout(() => n(!0), 500));
666
+ }
667
+ } catch (u) {
668
+ if ((u == null ? void 0 : u.name) !== "AbortError") throw Error(u);
669
+ }
511
670
  }
512
671
  });
672
+ const { debug: a = !1 } = o;
673
+ this.option.debug = a;
513
674
  }
514
675
  }
515
- new TextDecoder("utf-8");
516
676
  var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, indexMinimal = {}, minimal$1 = {}, aspromise, hasRequiredAspromise;
517
677
  function requireAspromise() {
518
678
  if (hasRequiredAspromise) return aspromise;
519
- hasRequiredAspromise = 1, aspromise = f;
520
- function f(o, u) {
521
- for (var c = new Array(arguments.length - 1), r = 0, n = 2, i = !0; n < arguments.length; )
522
- c[r++] = arguments[n++];
523
- return new Promise(function(t, s) {
524
- c[r] = function(a) {
679
+ hasRequiredAspromise = 1, aspromise = h;
680
+ function h(o, a) {
681
+ for (var u = new Array(arguments.length - 1), n = 0, r = 2, i = !0; r < arguments.length; )
682
+ u[n++] = arguments[r++];
683
+ return new Promise(function(e, s) {
684
+ u[n] = function(c) {
525
685
  if (i)
526
- if (i = !1, a)
527
- s(a);
686
+ if (i = !1, c)
687
+ s(c);
528
688
  else {
529
- for (var d = new Array(arguments.length - 1), y = 0; y < d.length; )
530
- d[y++] = arguments[y];
531
- t.apply(null, d);
689
+ for (var d = new Array(arguments.length - 1), p = 0; p < d.length; )
690
+ d[p++] = arguments[p];
691
+ e.apply(null, d);
532
692
  }
533
693
  };
534
694
  try {
535
- o.apply(u || null, c);
695
+ o.apply(a || null, u);
536
696
  } catch (l) {
537
697
  i && (i = !1, s(l));
538
698
  }
@@ -542,95 +702,95 @@ function requireAspromise() {
542
702
  }
543
703
  var base64 = {}, hasRequiredBase64;
544
704
  function requireBase64() {
545
- return hasRequiredBase64 || (hasRequiredBase64 = 1, function(f) {
546
- var o = f;
547
- o.length = function(e) {
548
- var t = e.length;
549
- if (!t)
705
+ return hasRequiredBase64 || (hasRequiredBase64 = 1, function(h) {
706
+ var o = h;
707
+ o.length = function(t) {
708
+ var e = t.length;
709
+ if (!e)
550
710
  return 0;
551
- for (var s = 0; --t % 4 > 1 && e.charAt(t) === "="; )
711
+ for (var s = 0; --e % 4 > 1 && t.charAt(e) === "="; )
552
712
  ++s;
553
- return Math.ceil(e.length * 3) / 4 - s;
713
+ return Math.ceil(t.length * 3) / 4 - s;
554
714
  };
555
- for (var u = new Array(64), c = new Array(123), r = 0; r < 64; )
556
- c[u[r] = r < 26 ? r + 65 : r < 52 ? r + 71 : r < 62 ? r - 4 : r - 59 | 43] = r++;
557
- o.encode = function(e, t, s) {
558
- for (var l = null, a = [], d = 0, y = 0, p; t < s; ) {
559
- var w = e[t++];
560
- switch (y) {
715
+ for (var a = new Array(64), u = new Array(123), n = 0; n < 64; )
716
+ u[a[n] = n < 26 ? n + 65 : n < 52 ? n + 71 : n < 62 ? n - 4 : n - 59 | 43] = n++;
717
+ o.encode = function(t, e, s) {
718
+ for (var l = null, c = [], d = 0, p = 0, f; e < s; ) {
719
+ var w = t[e++];
720
+ switch (p) {
561
721
  case 0:
562
- a[d++] = u[w >> 2], p = (w & 3) << 4, y = 1;
722
+ c[d++] = a[w >> 2], f = (w & 3) << 4, p = 1;
563
723
  break;
564
724
  case 1:
565
- a[d++] = u[p | w >> 4], p = (w & 15) << 2, y = 2;
725
+ c[d++] = a[f | w >> 4], f = (w & 15) << 2, p = 2;
566
726
  break;
567
727
  case 2:
568
- a[d++] = u[p | w >> 6], a[d++] = u[w & 63], y = 0;
728
+ c[d++] = a[f | w >> 6], c[d++] = a[w & 63], p = 0;
569
729
  break;
570
730
  }
571
- d > 8191 && ((l || (l = [])).push(String.fromCharCode.apply(String, a)), d = 0);
731
+ d > 8191 && ((l || (l = [])).push(String.fromCharCode.apply(String, c)), d = 0);
572
732
  }
573
- return y && (a[d++] = u[p], a[d++] = 61, y === 1 && (a[d++] = 61)), l ? (d && l.push(String.fromCharCode.apply(String, a.slice(0, d))), l.join("")) : String.fromCharCode.apply(String, a.slice(0, d));
733
+ return p && (c[d++] = a[f], c[d++] = 61, p === 1 && (c[d++] = 61)), l ? (d && l.push(String.fromCharCode.apply(String, c.slice(0, d))), l.join("")) : String.fromCharCode.apply(String, c.slice(0, d));
574
734
  };
575
- var n = "invalid encoding";
576
- o.decode = function(e, t, s) {
577
- for (var l = s, a = 0, d, y = 0; y < e.length; ) {
578
- var p = e.charCodeAt(y++);
579
- if (p === 61 && a > 1)
735
+ var r = "invalid encoding";
736
+ o.decode = function(t, e, s) {
737
+ for (var l = s, c = 0, d, p = 0; p < t.length; ) {
738
+ var f = t.charCodeAt(p++);
739
+ if (f === 61 && c > 1)
580
740
  break;
581
- if ((p = c[p]) === void 0)
582
- throw Error(n);
583
- switch (a) {
741
+ if ((f = u[f]) === void 0)
742
+ throw Error(r);
743
+ switch (c) {
584
744
  case 0:
585
- d = p, a = 1;
745
+ d = f, c = 1;
586
746
  break;
587
747
  case 1:
588
- t[s++] = d << 2 | (p & 48) >> 4, d = p, a = 2;
748
+ e[s++] = d << 2 | (f & 48) >> 4, d = f, c = 2;
589
749
  break;
590
750
  case 2:
591
- t[s++] = (d & 15) << 4 | (p & 60) >> 2, d = p, a = 3;
751
+ e[s++] = (d & 15) << 4 | (f & 60) >> 2, d = f, c = 3;
592
752
  break;
593
753
  case 3:
594
- t[s++] = (d & 3) << 6 | p, a = 0;
754
+ e[s++] = (d & 3) << 6 | f, c = 0;
595
755
  break;
596
756
  }
597
757
  }
598
- if (a === 1)
599
- throw Error(n);
758
+ if (c === 1)
759
+ throw Error(r);
600
760
  return s - l;
601
- }, o.test = function(e) {
602
- return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e);
761
+ }, o.test = function(t) {
762
+ return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t);
603
763
  };
604
764
  }(base64)), base64;
605
765
  }
606
766
  var eventemitter, hasRequiredEventemitter;
607
767
  function requireEventemitter() {
608
768
  if (hasRequiredEventemitter) return eventemitter;
609
- hasRequiredEventemitter = 1, eventemitter = f;
610
- function f() {
769
+ hasRequiredEventemitter = 1, eventemitter = h;
770
+ function h() {
611
771
  this._listeners = {};
612
772
  }
613
- return f.prototype.on = function(u, c, r) {
614
- return (this._listeners[u] || (this._listeners[u] = [])).push({
615
- fn: c,
616
- ctx: r || this
773
+ return h.prototype.on = function(a, u, n) {
774
+ return (this._listeners[a] || (this._listeners[a] = [])).push({
775
+ fn: u,
776
+ ctx: n || this
617
777
  }), this;
618
- }, f.prototype.off = function(u, c) {
619
- if (u === void 0)
778
+ }, h.prototype.off = function(a, u) {
779
+ if (a === void 0)
620
780
  this._listeners = {};
621
- else if (c === void 0)
622
- this._listeners[u] = [];
781
+ else if (u === void 0)
782
+ this._listeners[a] = [];
623
783
  else
624
- for (var r = this._listeners[u], n = 0; n < r.length; )
625
- r[n].fn === c ? r.splice(n, 1) : ++n;
784
+ for (var n = this._listeners[a], r = 0; r < n.length; )
785
+ n[r].fn === u ? n.splice(r, 1) : ++r;
626
786
  return this;
627
- }, f.prototype.emit = function(u) {
628
- var c = this._listeners[u];
629
- if (c) {
630
- for (var r = [], n = 1; n < arguments.length; )
631
- r.push(arguments[n++]);
632
- for (n = 0; n < c.length; )
633
- c[n].fn.apply(c[n++].ctx, r);
787
+ }, h.prototype.emit = function(a) {
788
+ var u = this._listeners[a];
789
+ if (u) {
790
+ for (var n = [], r = 1; r < arguments.length; )
791
+ n.push(arguments[r++]);
792
+ for (r = 0; r < u.length; )
793
+ u[r].fn.apply(u[r++].ctx, n);
634
794
  }
635
795
  return this;
636
796
  }, eventemitter;
@@ -638,112 +798,112 @@ function requireEventemitter() {
638
798
  var float, hasRequiredFloat;
639
799
  function requireFloat() {
640
800
  if (hasRequiredFloat) return float;
641
- hasRequiredFloat = 1, float = f(f);
642
- function f(n) {
801
+ hasRequiredFloat = 1, float = h(h);
802
+ function h(r) {
643
803
  return typeof Float32Array < "u" ? function() {
644
- var i = new Float32Array([-0]), e = new Uint8Array(i.buffer), t = e[3] === 128;
645
- function s(y, p, w) {
646
- i[0] = y, p[w] = e[0], p[w + 1] = e[1], p[w + 2] = e[2], p[w + 3] = e[3];
804
+ var i = new Float32Array([-0]), t = new Uint8Array(i.buffer), e = t[3] === 128;
805
+ function s(p, f, w) {
806
+ i[0] = p, f[w] = t[0], f[w + 1] = t[1], f[w + 2] = t[2], f[w + 3] = t[3];
647
807
  }
648
- function l(y, p, w) {
649
- i[0] = y, p[w] = e[3], p[w + 1] = e[2], p[w + 2] = e[1], p[w + 3] = e[0];
808
+ function l(p, f, w) {
809
+ i[0] = p, f[w] = t[3], f[w + 1] = t[2], f[w + 2] = t[1], f[w + 3] = t[0];
650
810
  }
651
- n.writeFloatLE = t ? s : l, n.writeFloatBE = t ? l : s;
652
- function a(y, p) {
653
- return e[0] = y[p], e[1] = y[p + 1], e[2] = y[p + 2], e[3] = y[p + 3], i[0];
811
+ r.writeFloatLE = e ? s : l, r.writeFloatBE = e ? l : s;
812
+ function c(p, f) {
813
+ return t[0] = p[f], t[1] = p[f + 1], t[2] = p[f + 2], t[3] = p[f + 3], i[0];
654
814
  }
655
- function d(y, p) {
656
- return e[3] = y[p], e[2] = y[p + 1], e[1] = y[p + 2], e[0] = y[p + 3], i[0];
815
+ function d(p, f) {
816
+ return t[3] = p[f], t[2] = p[f + 1], t[1] = p[f + 2], t[0] = p[f + 3], i[0];
657
817
  }
658
- n.readFloatLE = t ? a : d, n.readFloatBE = t ? d : a;
818
+ r.readFloatLE = e ? c : d, r.readFloatBE = e ? d : c;
659
819
  }() : function() {
660
- function i(t, s, l, a) {
820
+ function i(e, s, l, c) {
661
821
  var d = s < 0 ? 1 : 0;
662
822
  if (d && (s = -s), s === 0)
663
- t(1 / s > 0 ? (
823
+ e(1 / s > 0 ? (
664
824
  /* positive */
665
825
  0
666
826
  ) : (
667
827
  /* negative 0 */
668
828
  2147483648
669
- ), l, a);
829
+ ), l, c);
670
830
  else if (isNaN(s))
671
- t(2143289344, l, a);
831
+ e(2143289344, l, c);
672
832
  else if (s > 34028234663852886e22)
673
- t((d << 31 | 2139095040) >>> 0, l, a);
833
+ e((d << 31 | 2139095040) >>> 0, l, c);
674
834
  else if (s < 11754943508222875e-54)
675
- t((d << 31 | Math.round(s / 1401298464324817e-60)) >>> 0, l, a);
835
+ e((d << 31 | Math.round(s / 1401298464324817e-60)) >>> 0, l, c);
676
836
  else {
677
- var y = Math.floor(Math.log(s) / Math.LN2), p = Math.round(s * Math.pow(2, -y) * 8388608) & 8388607;
678
- t((d << 31 | y + 127 << 23 | p) >>> 0, l, a);
837
+ var p = Math.floor(Math.log(s) / Math.LN2), f = Math.round(s * Math.pow(2, -p) * 8388608) & 8388607;
838
+ e((d << 31 | p + 127 << 23 | f) >>> 0, l, c);
679
839
  }
680
840
  }
681
- n.writeFloatLE = i.bind(null, o), n.writeFloatBE = i.bind(null, u);
682
- function e(t, s, l) {
683
- var a = t(s, l), d = (a >> 31) * 2 + 1, y = a >>> 23 & 255, p = a & 8388607;
684
- return y === 255 ? p ? NaN : d * (1 / 0) : y === 0 ? d * 1401298464324817e-60 * p : d * Math.pow(2, y - 150) * (p + 8388608);
841
+ r.writeFloatLE = i.bind(null, o), r.writeFloatBE = i.bind(null, a);
842
+ function t(e, s, l) {
843
+ var c = e(s, l), d = (c >> 31) * 2 + 1, p = c >>> 23 & 255, f = c & 8388607;
844
+ return p === 255 ? f ? NaN : d * (1 / 0) : p === 0 ? d * 1401298464324817e-60 * f : d * Math.pow(2, p - 150) * (f + 8388608);
685
845
  }
686
- n.readFloatLE = e.bind(null, c), n.readFloatBE = e.bind(null, r);
846
+ r.readFloatLE = t.bind(null, u), r.readFloatBE = t.bind(null, n);
687
847
  }(), typeof Float64Array < "u" ? function() {
688
- var i = new Float64Array([-0]), e = new Uint8Array(i.buffer), t = e[7] === 128;
689
- function s(y, p, w) {
690
- i[0] = y, p[w] = e[0], p[w + 1] = e[1], p[w + 2] = e[2], p[w + 3] = e[3], p[w + 4] = e[4], p[w + 5] = e[5], p[w + 6] = e[6], p[w + 7] = e[7];
848
+ var i = new Float64Array([-0]), t = new Uint8Array(i.buffer), e = t[7] === 128;
849
+ function s(p, f, w) {
850
+ i[0] = p, f[w] = t[0], f[w + 1] = t[1], f[w + 2] = t[2], f[w + 3] = t[3], f[w + 4] = t[4], f[w + 5] = t[5], f[w + 6] = t[6], f[w + 7] = t[7];
691
851
  }
692
- function l(y, p, w) {
693
- i[0] = y, p[w] = e[7], p[w + 1] = e[6], p[w + 2] = e[5], p[w + 3] = e[4], p[w + 4] = e[3], p[w + 5] = e[2], p[w + 6] = e[1], p[w + 7] = e[0];
852
+ function l(p, f, w) {
853
+ i[0] = p, f[w] = t[7], f[w + 1] = t[6], f[w + 2] = t[5], f[w + 3] = t[4], f[w + 4] = t[3], f[w + 5] = t[2], f[w + 6] = t[1], f[w + 7] = t[0];
694
854
  }
695
- n.writeDoubleLE = t ? s : l, n.writeDoubleBE = t ? l : s;
696
- function a(y, p) {
697
- return e[0] = y[p], e[1] = y[p + 1], e[2] = y[p + 2], e[3] = y[p + 3], e[4] = y[p + 4], e[5] = y[p + 5], e[6] = y[p + 6], e[7] = y[p + 7], i[0];
855
+ r.writeDoubleLE = e ? s : l, r.writeDoubleBE = e ? l : s;
856
+ function c(p, f) {
857
+ return t[0] = p[f], t[1] = p[f + 1], t[2] = p[f + 2], t[3] = p[f + 3], t[4] = p[f + 4], t[5] = p[f + 5], t[6] = p[f + 6], t[7] = p[f + 7], i[0];
698
858
  }
699
- function d(y, p) {
700
- return e[7] = y[p], e[6] = y[p + 1], e[5] = y[p + 2], e[4] = y[p + 3], e[3] = y[p + 4], e[2] = y[p + 5], e[1] = y[p + 6], e[0] = y[p + 7], i[0];
859
+ function d(p, f) {
860
+ return t[7] = p[f], t[6] = p[f + 1], t[5] = p[f + 2], t[4] = p[f + 3], t[3] = p[f + 4], t[2] = p[f + 5], t[1] = p[f + 6], t[0] = p[f + 7], i[0];
701
861
  }
702
- n.readDoubleLE = t ? a : d, n.readDoubleBE = t ? d : a;
862
+ r.readDoubleLE = e ? c : d, r.readDoubleBE = e ? d : c;
703
863
  }() : function() {
704
- function i(t, s, l, a, d, y) {
705
- var p = a < 0 ? 1 : 0;
706
- if (p && (a = -a), a === 0)
707
- t(0, d, y + s), t(1 / a > 0 ? (
864
+ function i(e, s, l, c, d, p) {
865
+ var f = c < 0 ? 1 : 0;
866
+ if (f && (c = -c), c === 0)
867
+ e(0, d, p + s), e(1 / c > 0 ? (
708
868
  /* positive */
709
869
  0
710
870
  ) : (
711
871
  /* negative 0 */
712
872
  2147483648
713
- ), d, y + l);
714
- else if (isNaN(a))
715
- t(0, d, y + s), t(2146959360, d, y + l);
716
- else if (a > 17976931348623157e292)
717
- t(0, d, y + s), t((p << 31 | 2146435072) >>> 0, d, y + l);
873
+ ), d, p + l);
874
+ else if (isNaN(c))
875
+ e(0, d, p + s), e(2146959360, d, p + l);
876
+ else if (c > 17976931348623157e292)
877
+ e(0, d, p + s), e((f << 31 | 2146435072) >>> 0, d, p + l);
718
878
  else {
719
879
  var w;
720
- if (a < 22250738585072014e-324)
721
- w = a / 5e-324, t(w >>> 0, d, y + s), t((p << 31 | w / 4294967296) >>> 0, d, y + l);
880
+ if (c < 22250738585072014e-324)
881
+ w = c / 5e-324, e(w >>> 0, d, p + s), e((f << 31 | w / 4294967296) >>> 0, d, p + l);
722
882
  else {
723
- var v = Math.floor(Math.log(a) / Math.LN2);
724
- v === 1024 && (v = 1023), w = a * Math.pow(2, -v), t(w * 4503599627370496 >>> 0, d, y + s), t((p << 31 | v + 1023 << 20 | w * 1048576 & 1048575) >>> 0, d, y + l);
883
+ var b = Math.floor(Math.log(c) / Math.LN2);
884
+ b === 1024 && (b = 1023), w = c * Math.pow(2, -b), e(w * 4503599627370496 >>> 0, d, p + s), e((f << 31 | b + 1023 << 20 | w * 1048576 & 1048575) >>> 0, d, p + l);
725
885
  }
726
886
  }
727
887
  }
728
- n.writeDoubleLE = i.bind(null, o, 0, 4), n.writeDoubleBE = i.bind(null, u, 4, 0);
729
- function e(t, s, l, a, d) {
730
- var y = t(a, d + s), p = t(a, d + l), w = (p >> 31) * 2 + 1, v = p >>> 20 & 2047, m = 4294967296 * (p & 1048575) + y;
731
- return v === 2047 ? m ? NaN : w * (1 / 0) : v === 0 ? w * 5e-324 * m : w * Math.pow(2, v - 1075) * (m + 4503599627370496);
888
+ r.writeDoubleLE = i.bind(null, o, 0, 4), r.writeDoubleBE = i.bind(null, a, 4, 0);
889
+ function t(e, s, l, c, d) {
890
+ var p = e(c, d + s), f = e(c, d + l), w = (f >> 31) * 2 + 1, b = f >>> 20 & 2047, g = 4294967296 * (f & 1048575) + p;
891
+ return b === 2047 ? g ? NaN : w * (1 / 0) : b === 0 ? w * 5e-324 * g : w * Math.pow(2, b - 1075) * (g + 4503599627370496);
732
892
  }
733
- n.readDoubleLE = e.bind(null, c, 0, 4), n.readDoubleBE = e.bind(null, r, 4, 0);
734
- }(), n;
893
+ r.readDoubleLE = t.bind(null, u, 0, 4), r.readDoubleBE = t.bind(null, n, 4, 0);
894
+ }(), r;
735
895
  }
736
- function o(n, i, e) {
737
- i[e] = n & 255, i[e + 1] = n >>> 8 & 255, i[e + 2] = n >>> 16 & 255, i[e + 3] = n >>> 24;
896
+ function o(r, i, t) {
897
+ i[t] = r & 255, i[t + 1] = r >>> 8 & 255, i[t + 2] = r >>> 16 & 255, i[t + 3] = r >>> 24;
738
898
  }
739
- function u(n, i, e) {
740
- i[e] = n >>> 24, i[e + 1] = n >>> 16 & 255, i[e + 2] = n >>> 8 & 255, i[e + 3] = n & 255;
899
+ function a(r, i, t) {
900
+ i[t] = r >>> 24, i[t + 1] = r >>> 16 & 255, i[t + 2] = r >>> 8 & 255, i[t + 3] = r & 255;
741
901
  }
742
- function c(n, i) {
743
- return (n[i] | n[i + 1] << 8 | n[i + 2] << 16 | n[i + 3] << 24) >>> 0;
902
+ function u(r, i) {
903
+ return (r[i] | r[i + 1] << 8 | r[i + 2] << 16 | r[i + 3] << 24) >>> 0;
744
904
  }
745
- function r(n, i) {
746
- return (n[i] << 24 | n[i + 1] << 16 | n[i + 2] << 8 | n[i + 3]) >>> 0;
905
+ function n(r, i) {
906
+ return (r[i] << 24 | r[i + 1] << 16 | r[i + 2] << 8 | r[i + 3]) >>> 0;
747
907
  }
748
908
  return float;
749
909
  }
@@ -756,7 +916,7 @@ function requireInquire() {
756
916
  var mod = eval("quire".replace(/^/, "re"))(moduleName);
757
917
  if (mod && (mod.length || Object.keys(mod).length))
758
918
  return mod;
759
- } catch (f) {
919
+ } catch (h) {
760
920
  }
761
921
  return null;
762
922
  }
@@ -764,38 +924,38 @@ function requireInquire() {
764
924
  }
765
925
  var utf8 = {}, hasRequiredUtf8;
766
926
  function requireUtf8() {
767
- return hasRequiredUtf8 || (hasRequiredUtf8 = 1, function(f) {
768
- var o = f;
769
- o.length = function(c) {
770
- for (var r = 0, n = 0, i = 0; i < c.length; ++i)
771
- n = c.charCodeAt(i), n < 128 ? r += 1 : n < 2048 ? r += 2 : (n & 64512) === 55296 && (c.charCodeAt(i + 1) & 64512) === 56320 ? (++i, r += 4) : r += 3;
772
- return r;
773
- }, o.read = function(c, r, n) {
774
- var i = n - r;
927
+ return hasRequiredUtf8 || (hasRequiredUtf8 = 1, function(h) {
928
+ var o = h;
929
+ o.length = function(u) {
930
+ for (var n = 0, r = 0, i = 0; i < u.length; ++i)
931
+ r = u.charCodeAt(i), r < 128 ? n += 1 : r < 2048 ? n += 2 : (r & 64512) === 55296 && (u.charCodeAt(i + 1) & 64512) === 56320 ? (++i, n += 4) : n += 3;
932
+ return n;
933
+ }, o.read = function(u, n, r) {
934
+ var i = r - n;
775
935
  if (i < 1)
776
936
  return "";
777
- for (var e = null, t = [], s = 0, l; r < n; )
778
- l = c[r++], l < 128 ? t[s++] = l : l > 191 && l < 224 ? t[s++] = (l & 31) << 6 | c[r++] & 63 : l > 239 && l < 365 ? (l = ((l & 7) << 18 | (c[r++] & 63) << 12 | (c[r++] & 63) << 6 | c[r++] & 63) - 65536, t[s++] = 55296 + (l >> 10), t[s++] = 56320 + (l & 1023)) : t[s++] = (l & 15) << 12 | (c[r++] & 63) << 6 | c[r++] & 63, s > 8191 && ((e || (e = [])).push(String.fromCharCode.apply(String, t)), s = 0);
779
- return e ? (s && e.push(String.fromCharCode.apply(String, t.slice(0, s))), e.join("")) : String.fromCharCode.apply(String, t.slice(0, s));
780
- }, o.write = function(c, r, n) {
781
- for (var i = n, e, t, s = 0; s < c.length; ++s)
782
- e = c.charCodeAt(s), e < 128 ? r[n++] = e : e < 2048 ? (r[n++] = e >> 6 | 192, r[n++] = e & 63 | 128) : (e & 64512) === 55296 && ((t = c.charCodeAt(s + 1)) & 64512) === 56320 ? (e = 65536 + ((e & 1023) << 10) + (t & 1023), ++s, r[n++] = e >> 18 | 240, r[n++] = e >> 12 & 63 | 128, r[n++] = e >> 6 & 63 | 128, r[n++] = e & 63 | 128) : (r[n++] = e >> 12 | 224, r[n++] = e >> 6 & 63 | 128, r[n++] = e & 63 | 128);
783
- return n - i;
937
+ for (var t = null, e = [], s = 0, l; n < r; )
938
+ l = u[n++], l < 128 ? e[s++] = l : l > 191 && l < 224 ? e[s++] = (l & 31) << 6 | u[n++] & 63 : l > 239 && l < 365 ? (l = ((l & 7) << 18 | (u[n++] & 63) << 12 | (u[n++] & 63) << 6 | u[n++] & 63) - 65536, e[s++] = 55296 + (l >> 10), e[s++] = 56320 + (l & 1023)) : e[s++] = (l & 15) << 12 | (u[n++] & 63) << 6 | u[n++] & 63, s > 8191 && ((t || (t = [])).push(String.fromCharCode.apply(String, e)), s = 0);
939
+ return t ? (s && t.push(String.fromCharCode.apply(String, e.slice(0, s))), t.join("")) : String.fromCharCode.apply(String, e.slice(0, s));
940
+ }, o.write = function(u, n, r) {
941
+ for (var i = r, t, e, s = 0; s < u.length; ++s)
942
+ t = u.charCodeAt(s), t < 128 ? n[r++] = t : t < 2048 ? (n[r++] = t >> 6 | 192, n[r++] = t & 63 | 128) : (t & 64512) === 55296 && ((e = u.charCodeAt(s + 1)) & 64512) === 56320 ? (t = 65536 + ((t & 1023) << 10) + (e & 1023), ++s, n[r++] = t >> 18 | 240, n[r++] = t >> 12 & 63 | 128, n[r++] = t >> 6 & 63 | 128, n[r++] = t & 63 | 128) : (n[r++] = t >> 12 | 224, n[r++] = t >> 6 & 63 | 128, n[r++] = t & 63 | 128);
943
+ return r - i;
784
944
  };
785
945
  }(utf8)), utf8;
786
946
  }
787
947
  var pool_1, hasRequiredPool;
788
948
  function requirePool() {
789
949
  if (hasRequiredPool) return pool_1;
790
- hasRequiredPool = 1, pool_1 = f;
791
- function f(o, u, c) {
792
- var r = c || 8192, n = r >>> 1, i = null, e = r;
950
+ hasRequiredPool = 1, pool_1 = h;
951
+ function h(o, a, u) {
952
+ var n = u || 8192, r = n >>> 1, i = null, t = n;
793
953
  return function(s) {
794
- if (s < 1 || s > n)
954
+ if (s < 1 || s > r)
795
955
  return o(s);
796
- e + s > r && (i = o(r), e = 0);
797
- var l = u.call(i, e, e += s);
798
- return e & 7 && (e = (e | 7) + 1), l;
956
+ t + s > n && (i = o(n), t = 0);
957
+ var l = a.call(i, t, t += s);
958
+ return t & 7 && (t = (t | 7) + 1), l;
799
959
  };
800
960
  }
801
961
  return pool_1;
@@ -804,49 +964,49 @@ var longbits, hasRequiredLongbits;
804
964
  function requireLongbits() {
805
965
  if (hasRequiredLongbits) return longbits;
806
966
  hasRequiredLongbits = 1, longbits = o;
807
- var f = requireMinimal$1();
808
- function o(n, i) {
809
- this.lo = n >>> 0, this.hi = i >>> 0;
967
+ var h = requireMinimal$1();
968
+ function o(r, i) {
969
+ this.lo = r >>> 0, this.hi = i >>> 0;
810
970
  }
811
- var u = o.zero = new o(0, 0);
812
- u.toNumber = function() {
971
+ var a = o.zero = new o(0, 0);
972
+ a.toNumber = function() {
813
973
  return 0;
814
- }, u.zzEncode = u.zzDecode = function() {
974
+ }, a.zzEncode = a.zzDecode = function() {
815
975
  return this;
816
- }, u.length = function() {
976
+ }, a.length = function() {
817
977
  return 1;
818
978
  };
819
- var c = o.zeroHash = "\0\0\0\0\0\0\0\0";
979
+ var u = o.zeroHash = "\0\0\0\0\0\0\0\0";
820
980
  o.fromNumber = function(i) {
821
981
  if (i === 0)
822
- return u;
823
- var e = i < 0;
824
- e && (i = -i);
825
- var t = i >>> 0, s = (i - t) / 4294967296 >>> 0;
826
- return e && (s = ~s >>> 0, t = ~t >>> 0, ++t > 4294967295 && (t = 0, ++s > 4294967295 && (s = 0))), new o(t, s);
982
+ return a;
983
+ var t = i < 0;
984
+ t && (i = -i);
985
+ var e = i >>> 0, s = (i - e) / 4294967296 >>> 0;
986
+ return t && (s = ~s >>> 0, e = ~e >>> 0, ++e > 4294967295 && (e = 0, ++s > 4294967295 && (s = 0))), new o(e, s);
827
987
  }, o.from = function(i) {
828
988
  if (typeof i == "number")
829
989
  return o.fromNumber(i);
830
- if (f.isString(i))
831
- if (f.Long)
832
- i = f.Long.fromString(i);
990
+ if (h.isString(i))
991
+ if (h.Long)
992
+ i = h.Long.fromString(i);
833
993
  else
834
994
  return o.fromNumber(parseInt(i, 10));
835
- return i.low || i.high ? new o(i.low >>> 0, i.high >>> 0) : u;
995
+ return i.low || i.high ? new o(i.low >>> 0, i.high >>> 0) : a;
836
996
  }, o.prototype.toNumber = function(i) {
837
997
  if (!i && this.hi >>> 31) {
838
- var e = ~this.lo + 1 >>> 0, t = ~this.hi >>> 0;
839
- return e || (t = t + 1 >>> 0), -(e + t * 4294967296);
998
+ var t = ~this.lo + 1 >>> 0, e = ~this.hi >>> 0;
999
+ return t || (e = e + 1 >>> 0), -(t + e * 4294967296);
840
1000
  }
841
1001
  return this.lo + this.hi * 4294967296;
842
1002
  }, o.prototype.toLong = function(i) {
843
- return f.Long ? new f.Long(this.lo | 0, this.hi | 0, !!i) : { low: this.lo | 0, high: this.hi | 0, unsigned: !!i };
1003
+ return h.Long ? new h.Long(this.lo | 0, this.hi | 0, !!i) : { low: this.lo | 0, high: this.hi | 0, unsigned: !!i };
844
1004
  };
845
- var r = String.prototype.charCodeAt;
1005
+ var n = String.prototype.charCodeAt;
846
1006
  return o.fromHash = function(i) {
847
- return i === c ? u : new o(
848
- (r.call(i, 0) | r.call(i, 1) << 8 | r.call(i, 2) << 16 | r.call(i, 3) << 24) >>> 0,
849
- (r.call(i, 4) | r.call(i, 5) << 8 | r.call(i, 6) << 16 | r.call(i, 7) << 24) >>> 0
1007
+ return i === u ? a : new o(
1008
+ (n.call(i, 0) | n.call(i, 1) << 8 | n.call(i, 2) << 16 | n.call(i, 3) << 24) >>> 0,
1009
+ (n.call(i, 4) | n.call(i, 5) << 8 | n.call(i, 6) << 16 | n.call(i, 7) << 24) >>> 0
850
1010
  );
851
1011
  }, o.prototype.toHash = function() {
852
1012
  return String.fromCharCode(
@@ -866,14 +1026,14 @@ function requireLongbits() {
866
1026
  var i = -(this.lo & 1);
867
1027
  return this.lo = ((this.lo >>> 1 | this.hi << 31) ^ i) >>> 0, this.hi = (this.hi >>> 1 ^ i) >>> 0, this;
868
1028
  }, o.prototype.length = function() {
869
- var i = this.lo, e = (this.lo >>> 28 | this.hi << 4) >>> 0, t = this.hi >>> 24;
870
- return t === 0 ? e === 0 ? i < 16384 ? i < 128 ? 1 : 2 : i < 2097152 ? 3 : 4 : e < 16384 ? e < 128 ? 5 : 6 : e < 2097152 ? 7 : 8 : t < 128 ? 9 : 10;
1029
+ var i = this.lo, t = (this.lo >>> 28 | this.hi << 4) >>> 0, e = this.hi >>> 24;
1030
+ return e === 0 ? t === 0 ? i < 16384 ? i < 128 ? 1 : 2 : i < 2097152 ? 3 : 4 : t < 16384 ? t < 128 ? 5 : 6 : t < 2097152 ? 7 : 8 : e < 128 ? 9 : 10;
871
1031
  }, longbits;
872
1032
  }
873
1033
  var hasRequiredMinimal$1;
874
1034
  function requireMinimal$1() {
875
- return hasRequiredMinimal$1 || (hasRequiredMinimal$1 = 1, function(f) {
876
- var o = f;
1035
+ return hasRequiredMinimal$1 || (hasRequiredMinimal$1 = 1, function(h) {
1036
+ var o = h;
877
1037
  o.asPromise = requireAspromise(), o.base64 = requireBase64(), o.EventEmitter = requireEventemitter(), o.float = requireFloat(), o.inquire = requireInquire(), o.utf8 = requireUtf8(), o.pool = requirePool(), o.LongBits = requireLongbits(), o.isNode = !!(typeof commonjsGlobal < "u" && commonjsGlobal && commonjsGlobal.process && commonjsGlobal.process.versions && commonjsGlobal.process.versions.node), o.global = o.isNode && commonjsGlobal || typeof window < "u" && window || typeof self < "u" && self || minimal$1, o.emptyArray = Object.freeze ? Object.freeze([]) : (
878
1038
  /* istanbul ignore next */
879
1039
  []
@@ -881,68 +1041,68 @@ function requireMinimal$1() {
881
1041
  /* istanbul ignore next */
882
1042
  {}
883
1043
  ), o.isInteger = Number.isInteger || /* istanbul ignore next */
884
- function(n) {
885
- return typeof n == "number" && isFinite(n) && Math.floor(n) === n;
886
- }, o.isString = function(n) {
887
- return typeof n == "string" || n instanceof String;
888
- }, o.isObject = function(n) {
889
- return n && typeof n == "object";
1044
+ function(r) {
1045
+ return typeof r == "number" && isFinite(r) && Math.floor(r) === r;
1046
+ }, o.isString = function(r) {
1047
+ return typeof r == "string" || r instanceof String;
1048
+ }, o.isObject = function(r) {
1049
+ return r && typeof r == "object";
890
1050
  }, o.isset = /**
891
1051
  * Checks if a property on a message is considered to be present.
892
1052
  * @param {Object} obj Plain object or message instance
893
1053
  * @param {string} prop Property name
894
1054
  * @returns {boolean} `true` if considered to be present, otherwise `false`
895
1055
  */
896
- o.isSet = function(n, i) {
897
- var e = n[i];
898
- return e != null && n.hasOwnProperty(i) ? typeof e != "object" || (Array.isArray(e) ? e.length : Object.keys(e).length) > 0 : !1;
1056
+ o.isSet = function(r, i) {
1057
+ var t = r[i];
1058
+ return t != null && r.hasOwnProperty(i) ? typeof t != "object" || (Array.isArray(t) ? t.length : Object.keys(t).length) > 0 : !1;
899
1059
  }, o.Buffer = function() {
900
1060
  try {
901
- var r = o.inquire("buffer").Buffer;
902
- return r.prototype.utf8Write ? r : (
1061
+ var n = o.inquire("buffer").Buffer;
1062
+ return n.prototype.utf8Write ? n : (
903
1063
  /* istanbul ignore next */
904
1064
  null
905
1065
  );
906
1066
  } catch {
907
1067
  return null;
908
1068
  }
909
- }(), o._Buffer_from = null, o._Buffer_allocUnsafe = null, o.newBuffer = function(n) {
910
- return typeof n == "number" ? o.Buffer ? o._Buffer_allocUnsafe(n) : new o.Array(n) : o.Buffer ? o._Buffer_from(n) : typeof Uint8Array > "u" ? n : new Uint8Array(n);
1069
+ }(), o._Buffer_from = null, o._Buffer_allocUnsafe = null, o.newBuffer = function(r) {
1070
+ return typeof r == "number" ? o.Buffer ? o._Buffer_allocUnsafe(r) : new o.Array(r) : o.Buffer ? o._Buffer_from(r) : typeof Uint8Array > "u" ? r : new Uint8Array(r);
911
1071
  }, o.Array = typeof Uint8Array < "u" ? Uint8Array : Array, o.Long = /* istanbul ignore next */
912
1072
  o.global.dcodeIO && /* istanbul ignore next */
913
1073
  o.global.dcodeIO.Long || /* istanbul ignore next */
914
- o.global.Long || o.inquire("long"), o.key2Re = /^true|false|0|1$/, o.key32Re = /^-?(?:0|[1-9][0-9]*)$/, o.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/, o.longToHash = function(n) {
915
- return n ? o.LongBits.from(n).toHash() : o.LongBits.zeroHash;
916
- }, o.longFromHash = function(n, i) {
917
- var e = o.LongBits.fromHash(n);
918
- return o.Long ? o.Long.fromBits(e.lo, e.hi, i) : e.toNumber(!!i);
1074
+ o.global.Long || o.inquire("long"), o.key2Re = /^true|false|0|1$/, o.key32Re = /^-?(?:0|[1-9][0-9]*)$/, o.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/, o.longToHash = function(r) {
1075
+ return r ? o.LongBits.from(r).toHash() : o.LongBits.zeroHash;
1076
+ }, o.longFromHash = function(r, i) {
1077
+ var t = o.LongBits.fromHash(r);
1078
+ return o.Long ? o.Long.fromBits(t.lo, t.hi, i) : t.toNumber(!!i);
919
1079
  };
920
- function u(r, n, i) {
921
- for (var e = Object.keys(n), t = 0; t < e.length; ++t)
922
- (r[e[t]] === void 0 || !i) && (r[e[t]] = n[e[t]]);
923
- return r;
1080
+ function a(n, r, i) {
1081
+ for (var t = Object.keys(r), e = 0; e < t.length; ++e)
1082
+ (n[t[e]] === void 0 || !i) && (n[t[e]] = r[t[e]]);
1083
+ return n;
924
1084
  }
925
- o.merge = u, o.lcFirst = function(n) {
926
- return n.charAt(0).toLowerCase() + n.substring(1);
1085
+ o.merge = a, o.lcFirst = function(r) {
1086
+ return r.charAt(0).toLowerCase() + r.substring(1);
927
1087
  };
928
- function c(r) {
929
- function n(i, e) {
930
- if (!(this instanceof n))
931
- return new n(i, e);
1088
+ function u(n) {
1089
+ function r(i, t) {
1090
+ if (!(this instanceof r))
1091
+ return new r(i, t);
932
1092
  Object.defineProperty(this, "message", { get: function() {
933
1093
  return i;
934
- } }), Error.captureStackTrace ? Error.captureStackTrace(this, n) : Object.defineProperty(this, "stack", { value: new Error().stack || "" }), e && u(this, e);
1094
+ } }), Error.captureStackTrace ? Error.captureStackTrace(this, r) : Object.defineProperty(this, "stack", { value: new Error().stack || "" }), t && a(this, t);
935
1095
  }
936
- return n.prototype = Object.create(Error.prototype, {
1096
+ return r.prototype = Object.create(Error.prototype, {
937
1097
  constructor: {
938
- value: n,
1098
+ value: r,
939
1099
  writable: !0,
940
1100
  enumerable: !1,
941
1101
  configurable: !0
942
1102
  },
943
1103
  name: {
944
1104
  get: function() {
945
- return r;
1105
+ return n;
946
1106
  },
947
1107
  set: void 0,
948
1108
  enumerable: !1,
@@ -960,20 +1120,20 @@ function requireMinimal$1() {
960
1120
  enumerable: !1,
961
1121
  configurable: !0
962
1122
  }
963
- }), n;
1123
+ }), r;
964
1124
  }
965
- o.newError = c, o.ProtocolError = c("ProtocolError"), o.oneOfGetter = function(n) {
966
- for (var i = {}, e = 0; e < n.length; ++e)
967
- i[n[e]] = 1;
1125
+ o.newError = u, o.ProtocolError = u("ProtocolError"), o.oneOfGetter = function(r) {
1126
+ for (var i = {}, t = 0; t < r.length; ++t)
1127
+ i[r[t]] = 1;
968
1128
  return function() {
969
- for (var t = Object.keys(this), s = t.length - 1; s > -1; --s)
970
- if (i[t[s]] === 1 && this[t[s]] !== void 0 && this[t[s]] !== null)
971
- return t[s];
1129
+ for (var e = Object.keys(this), s = e.length - 1; s > -1; --s)
1130
+ if (i[e[s]] === 1 && this[e[s]] !== void 0 && this[e[s]] !== null)
1131
+ return e[s];
972
1132
  };
973
- }, o.oneOfSetter = function(n) {
1133
+ }, o.oneOfSetter = function(r) {
974
1134
  return function(i) {
975
- for (var e = 0; e < n.length; ++e)
976
- n[e] !== i && delete this[n[e]];
1135
+ for (var t = 0; t < r.length; ++t)
1136
+ r[t] !== i && delete this[r[t]];
977
1137
  };
978
1138
  }, o.toJSONOptions = {
979
1139
  longs: String,
@@ -981,17 +1141,17 @@ function requireMinimal$1() {
981
1141
  bytes: String,
982
1142
  json: !0
983
1143
  }, o._configure = function() {
984
- var r = o.Buffer;
985
- if (!r) {
1144
+ var n = o.Buffer;
1145
+ if (!n) {
986
1146
  o._Buffer_from = o._Buffer_allocUnsafe = null;
987
1147
  return;
988
1148
  }
989
- o._Buffer_from = r.from !== Uint8Array.from && r.from || /* istanbul ignore next */
990
- function(i, e) {
991
- return new r(i, e);
992
- }, o._Buffer_allocUnsafe = r.allocUnsafe || /* istanbul ignore next */
1149
+ o._Buffer_from = n.from !== Uint8Array.from && n.from || /* istanbul ignore next */
1150
+ function(i, t) {
1151
+ return new n(i, t);
1152
+ }, o._Buffer_allocUnsafe = n.allocUnsafe || /* istanbul ignore next */
993
1153
  function(i) {
994
- return new r(i);
1154
+ return new n(i);
995
1155
  };
996
1156
  };
997
1157
  }(minimal$1)), minimal$1;
@@ -999,277 +1159,277 @@ function requireMinimal$1() {
999
1159
  var writer, hasRequiredWriter;
1000
1160
  function requireWriter() {
1001
1161
  if (hasRequiredWriter) return writer;
1002
- hasRequiredWriter = 1, writer = t;
1003
- var f = requireMinimal$1(), o, u = f.LongBits, c = f.base64, r = f.utf8;
1004
- function n(v, m, g) {
1005
- this.fn = v, this.len = m, this.next = void 0, this.val = g;
1162
+ hasRequiredWriter = 1, writer = e;
1163
+ var h = requireMinimal$1(), o, a = h.LongBits, u = h.base64, n = h.utf8;
1164
+ function r(b, g, k) {
1165
+ this.fn = b, this.len = g, this.next = void 0, this.val = k;
1006
1166
  }
1007
1167
  function i() {
1008
1168
  }
1009
- function e(v) {
1010
- this.head = v.head, this.tail = v.tail, this.len = v.len, this.next = v.states;
1169
+ function t(b) {
1170
+ this.head = b.head, this.tail = b.tail, this.len = b.len, this.next = b.states;
1011
1171
  }
1012
- function t() {
1013
- this.len = 0, this.head = new n(i, 0, 0), this.tail = this.head, this.states = null;
1172
+ function e() {
1173
+ this.len = 0, this.head = new r(i, 0, 0), this.tail = this.head, this.states = null;
1014
1174
  }
1015
1175
  var s = function() {
1016
- return f.Buffer ? function() {
1017
- return (t.create = function() {
1176
+ return h.Buffer ? function() {
1177
+ return (e.create = function() {
1018
1178
  return new o();
1019
1179
  })();
1020
1180
  } : function() {
1021
- return new t();
1181
+ return new e();
1022
1182
  };
1023
1183
  };
1024
- t.create = s(), t.alloc = function(m) {
1025
- return new f.Array(m);
1026
- }, f.Array !== Array && (t.alloc = f.pool(t.alloc, f.Array.prototype.subarray)), t.prototype._push = function(m, g, k) {
1027
- return this.tail = this.tail.next = new n(m, g, k), this.len += g, this;
1184
+ e.create = s(), e.alloc = function(g) {
1185
+ return new h.Array(g);
1186
+ }, h.Array !== Array && (e.alloc = h.pool(e.alloc, h.Array.prototype.subarray)), e.prototype._push = function(g, k, _) {
1187
+ return this.tail = this.tail.next = new r(g, k, _), this.len += k, this;
1028
1188
  };
1029
- function l(v, m, g) {
1030
- m[g] = v & 255;
1189
+ function l(b, g, k) {
1190
+ g[k] = b & 255;
1031
1191
  }
1032
- function a(v, m, g) {
1033
- for (; v > 127; )
1034
- m[g++] = v & 127 | 128, v >>>= 7;
1035
- m[g] = v;
1192
+ function c(b, g, k) {
1193
+ for (; b > 127; )
1194
+ g[k++] = b & 127 | 128, b >>>= 7;
1195
+ g[k] = b;
1036
1196
  }
1037
- function d(v, m) {
1038
- this.len = v, this.next = void 0, this.val = m;
1197
+ function d(b, g) {
1198
+ this.len = b, this.next = void 0, this.val = g;
1039
1199
  }
1040
- d.prototype = Object.create(n.prototype), d.prototype.fn = a, t.prototype.uint32 = function(m) {
1200
+ d.prototype = Object.create(r.prototype), d.prototype.fn = c, e.prototype.uint32 = function(g) {
1041
1201
  return this.len += (this.tail = this.tail.next = new d(
1042
- (m = m >>> 0) < 128 ? 1 : m < 16384 ? 2 : m < 2097152 ? 3 : m < 268435456 ? 4 : 5,
1043
- m
1202
+ (g = g >>> 0) < 128 ? 1 : g < 16384 ? 2 : g < 2097152 ? 3 : g < 268435456 ? 4 : 5,
1203
+ g
1044
1204
  )).len, this;
1045
- }, t.prototype.int32 = function(m) {
1046
- return m < 0 ? this._push(y, 10, u.fromNumber(m)) : this.uint32(m);
1047
- }, t.prototype.sint32 = function(m) {
1048
- return this.uint32((m << 1 ^ m >> 31) >>> 0);
1205
+ }, e.prototype.int32 = function(g) {
1206
+ return g < 0 ? this._push(p, 10, a.fromNumber(g)) : this.uint32(g);
1207
+ }, e.prototype.sint32 = function(g) {
1208
+ return this.uint32((g << 1 ^ g >> 31) >>> 0);
1049
1209
  };
1050
- function y(v, m, g) {
1051
- for (; v.hi; )
1052
- m[g++] = v.lo & 127 | 128, v.lo = (v.lo >>> 7 | v.hi << 25) >>> 0, v.hi >>>= 7;
1053
- for (; v.lo > 127; )
1054
- m[g++] = v.lo & 127 | 128, v.lo = v.lo >>> 7;
1055
- m[g++] = v.lo;
1210
+ function p(b, g, k) {
1211
+ for (; b.hi; )
1212
+ g[k++] = b.lo & 127 | 128, b.lo = (b.lo >>> 7 | b.hi << 25) >>> 0, b.hi >>>= 7;
1213
+ for (; b.lo > 127; )
1214
+ g[k++] = b.lo & 127 | 128, b.lo = b.lo >>> 7;
1215
+ g[k++] = b.lo;
1056
1216
  }
1057
- t.prototype.uint64 = function(m) {
1058
- var g = u.from(m);
1059
- return this._push(y, g.length(), g);
1060
- }, t.prototype.int64 = t.prototype.uint64, t.prototype.sint64 = function(m) {
1061
- var g = u.from(m).zzEncode();
1062
- return this._push(y, g.length(), g);
1063
- }, t.prototype.bool = function(m) {
1064
- return this._push(l, 1, m ? 1 : 0);
1217
+ e.prototype.uint64 = function(g) {
1218
+ var k = a.from(g);
1219
+ return this._push(p, k.length(), k);
1220
+ }, e.prototype.int64 = e.prototype.uint64, e.prototype.sint64 = function(g) {
1221
+ var k = a.from(g).zzEncode();
1222
+ return this._push(p, k.length(), k);
1223
+ }, e.prototype.bool = function(g) {
1224
+ return this._push(l, 1, g ? 1 : 0);
1065
1225
  };
1066
- function p(v, m, g) {
1067
- m[g] = v & 255, m[g + 1] = v >>> 8 & 255, m[g + 2] = v >>> 16 & 255, m[g + 3] = v >>> 24;
1226
+ function f(b, g, k) {
1227
+ g[k] = b & 255, g[k + 1] = b >>> 8 & 255, g[k + 2] = b >>> 16 & 255, g[k + 3] = b >>> 24;
1068
1228
  }
1069
- t.prototype.fixed32 = function(m) {
1070
- return this._push(p, 4, m >>> 0);
1071
- }, t.prototype.sfixed32 = t.prototype.fixed32, t.prototype.fixed64 = function(m) {
1072
- var g = u.from(m);
1073
- return this._push(p, 4, g.lo)._push(p, 4, g.hi);
1074
- }, t.prototype.sfixed64 = t.prototype.fixed64, t.prototype.float = function(m) {
1075
- return this._push(f.float.writeFloatLE, 4, m);
1076
- }, t.prototype.double = function(m) {
1077
- return this._push(f.float.writeDoubleLE, 8, m);
1229
+ e.prototype.fixed32 = function(g) {
1230
+ return this._push(f, 4, g >>> 0);
1231
+ }, e.prototype.sfixed32 = e.prototype.fixed32, e.prototype.fixed64 = function(g) {
1232
+ var k = a.from(g);
1233
+ return this._push(f, 4, k.lo)._push(f, 4, k.hi);
1234
+ }, e.prototype.sfixed64 = e.prototype.fixed64, e.prototype.float = function(g) {
1235
+ return this._push(h.float.writeFloatLE, 4, g);
1236
+ }, e.prototype.double = function(g) {
1237
+ return this._push(h.float.writeDoubleLE, 8, g);
1078
1238
  };
1079
- var w = f.Array.prototype.set ? function(m, g, k) {
1080
- g.set(m, k);
1081
- } : function(m, g, k) {
1082
- for (var I = 0; I < m.length; ++I)
1083
- g[k + I] = m[I];
1239
+ var w = h.Array.prototype.set ? function(g, k, _) {
1240
+ k.set(g, _);
1241
+ } : function(g, k, _) {
1242
+ for (var R = 0; R < g.length; ++R)
1243
+ k[_ + R] = g[R];
1084
1244
  };
1085
- return t.prototype.bytes = function(m) {
1086
- var g = m.length >>> 0;
1087
- if (!g)
1245
+ return e.prototype.bytes = function(g) {
1246
+ var k = g.length >>> 0;
1247
+ if (!k)
1088
1248
  return this._push(l, 1, 0);
1089
- if (f.isString(m)) {
1090
- var k = t.alloc(g = c.length(m));
1091
- c.decode(m, k, 0), m = k;
1249
+ if (h.isString(g)) {
1250
+ var _ = e.alloc(k = u.length(g));
1251
+ u.decode(g, _, 0), g = _;
1092
1252
  }
1093
- return this.uint32(g)._push(w, g, m);
1094
- }, t.prototype.string = function(m) {
1095
- var g = r.length(m);
1096
- return g ? this.uint32(g)._push(r.write, g, m) : this._push(l, 1, 0);
1097
- }, t.prototype.fork = function() {
1098
- return this.states = new e(this), this.head = this.tail = new n(i, 0, 0), this.len = 0, this;
1099
- }, t.prototype.reset = function() {
1100
- 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 n(i, 0, 0), this.len = 0), this;
1101
- }, t.prototype.ldelim = function() {
1102
- var m = this.head, g = this.tail, k = this.len;
1103
- return this.reset().uint32(k), k && (this.tail.next = m.next, this.tail = g, this.len += k), this;
1104
- }, t.prototype.finish = function() {
1105
- for (var m = this.head.next, g = this.constructor.alloc(this.len), k = 0; m; )
1106
- m.fn(m.val, g, k), k += m.len, m = m.next;
1107
- return g;
1108
- }, t._configure = function(v) {
1109
- o = v, t.create = s(), o._configure();
1253
+ return this.uint32(k)._push(w, k, g);
1254
+ }, e.prototype.string = function(g) {
1255
+ var k = n.length(g);
1256
+ return k ? this.uint32(k)._push(n.write, k, g) : this._push(l, 1, 0);
1257
+ }, e.prototype.fork = function() {
1258
+ return this.states = new t(this), this.head = this.tail = new r(i, 0, 0), this.len = 0, this;
1259
+ }, e.prototype.reset = function() {
1260
+ 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 r(i, 0, 0), this.len = 0), this;
1261
+ }, e.prototype.ldelim = function() {
1262
+ var g = this.head, k = this.tail, _ = this.len;
1263
+ return this.reset().uint32(_), _ && (this.tail.next = g.next, this.tail = k, this.len += _), this;
1264
+ }, e.prototype.finish = function() {
1265
+ for (var g = this.head.next, k = this.constructor.alloc(this.len), _ = 0; g; )
1266
+ g.fn(g.val, k, _), _ += g.len, g = g.next;
1267
+ return k;
1268
+ }, e._configure = function(b) {
1269
+ o = b, e.create = s(), o._configure();
1110
1270
  }, writer;
1111
1271
  }
1112
1272
  var writer_buffer, hasRequiredWriter_buffer;
1113
1273
  function requireWriter_buffer() {
1114
1274
  if (hasRequiredWriter_buffer) return writer_buffer;
1115
- hasRequiredWriter_buffer = 1, writer_buffer = u;
1116
- var f = requireWriter();
1117
- (u.prototype = Object.create(f.prototype)).constructor = u;
1275
+ hasRequiredWriter_buffer = 1, writer_buffer = a;
1276
+ var h = requireWriter();
1277
+ (a.prototype = Object.create(h.prototype)).constructor = a;
1118
1278
  var o = requireMinimal$1();
1119
- function u() {
1120
- f.call(this);
1279
+ function a() {
1280
+ h.call(this);
1121
1281
  }
1122
- u._configure = function() {
1123
- u.alloc = o._Buffer_allocUnsafe, u.writeBytesBuffer = o.Buffer && o.Buffer.prototype instanceof Uint8Array && o.Buffer.prototype.set.name === "set" ? function(n, i, e) {
1124
- i.set(n, e);
1125
- } : function(n, i, e) {
1126
- if (n.copy)
1127
- n.copy(i, e, 0, n.length);
1128
- else for (var t = 0; t < n.length; )
1129
- i[e++] = n[t++];
1282
+ a._configure = function() {
1283
+ a.alloc = o._Buffer_allocUnsafe, a.writeBytesBuffer = o.Buffer && o.Buffer.prototype instanceof Uint8Array && o.Buffer.prototype.set.name === "set" ? function(r, i, t) {
1284
+ i.set(r, t);
1285
+ } : function(r, i, t) {
1286
+ if (r.copy)
1287
+ r.copy(i, t, 0, r.length);
1288
+ else for (var e = 0; e < r.length; )
1289
+ i[t++] = r[e++];
1130
1290
  };
1131
- }, u.prototype.bytes = function(n) {
1132
- o.isString(n) && (n = o._Buffer_from(n, "base64"));
1133
- var i = n.length >>> 0;
1134
- return this.uint32(i), i && this._push(u.writeBytesBuffer, i, n), this;
1291
+ }, a.prototype.bytes = function(r) {
1292
+ o.isString(r) && (r = o._Buffer_from(r, "base64"));
1293
+ var i = r.length >>> 0;
1294
+ return this.uint32(i), i && this._push(a.writeBytesBuffer, i, r), this;
1135
1295
  };
1136
- function c(r, n, i) {
1137
- r.length < 40 ? o.utf8.write(r, n, i) : n.utf8Write ? n.utf8Write(r, i) : n.write(r, i);
1296
+ function u(n, r, i) {
1297
+ n.length < 40 ? o.utf8.write(n, r, i) : r.utf8Write ? r.utf8Write(n, i) : r.write(n, i);
1138
1298
  }
1139
- return u.prototype.string = function(n) {
1140
- var i = o.Buffer.byteLength(n);
1141
- return this.uint32(i), i && this._push(c, i, n), this;
1142
- }, u._configure(), writer_buffer;
1299
+ return a.prototype.string = function(r) {
1300
+ var i = o.Buffer.byteLength(r);
1301
+ return this.uint32(i), i && this._push(u, i, r), this;
1302
+ }, a._configure(), writer_buffer;
1143
1303
  }
1144
1304
  var reader, hasRequiredReader;
1145
1305
  function requireReader() {
1146
1306
  if (hasRequiredReader) return reader;
1147
- hasRequiredReader = 1, reader = n;
1148
- var f = requireMinimal$1(), o, u = f.LongBits, c = f.utf8;
1149
- function r(a, d) {
1150
- return RangeError("index out of range: " + a.pos + " + " + (d || 1) + " > " + a.len);
1307
+ hasRequiredReader = 1, reader = r;
1308
+ var h = requireMinimal$1(), o, a = h.LongBits, u = h.utf8;
1309
+ function n(c, d) {
1310
+ return RangeError("index out of range: " + c.pos + " + " + (d || 1) + " > " + c.len);
1151
1311
  }
1152
- function n(a) {
1153
- this.buf = a, this.pos = 0, this.len = a.length;
1312
+ function r(c) {
1313
+ this.buf = c, this.pos = 0, this.len = c.length;
1154
1314
  }
1155
1315
  var i = typeof Uint8Array < "u" ? function(d) {
1156
1316
  if (d instanceof Uint8Array || Array.isArray(d))
1157
- return new n(d);
1317
+ return new r(d);
1158
1318
  throw Error("illegal buffer");
1159
1319
  } : function(d) {
1160
1320
  if (Array.isArray(d))
1161
- return new n(d);
1321
+ return new r(d);
1162
1322
  throw Error("illegal buffer");
1163
- }, e = function() {
1164
- return f.Buffer ? function(y) {
1165
- return (n.create = function(w) {
1166
- return f.Buffer.isBuffer(w) ? new o(w) : i(w);
1167
- })(y);
1323
+ }, t = function() {
1324
+ return h.Buffer ? function(p) {
1325
+ return (r.create = function(w) {
1326
+ return h.Buffer.isBuffer(w) ? new o(w) : i(w);
1327
+ })(p);
1168
1328
  } : i;
1169
1329
  };
1170
- n.create = e(), n.prototype._slice = f.Array.prototype.subarray || /* istanbul ignore next */
1171
- f.Array.prototype.slice, n.prototype.uint32 = /* @__PURE__ */ function() {
1330
+ r.create = t(), r.prototype._slice = h.Array.prototype.subarray || /* istanbul ignore next */
1331
+ h.Array.prototype.slice, r.prototype.uint32 = /* @__PURE__ */ function() {
1172
1332
  var d = 4294967295;
1173
1333
  return function() {
1174
1334
  if (d = (this.buf[this.pos] & 127) >>> 0, this.buf[this.pos++] < 128 || (d = (d | (this.buf[this.pos] & 127) << 7) >>> 0, this.buf[this.pos++] < 128) || (d = (d | (this.buf[this.pos] & 127) << 14) >>> 0, this.buf[this.pos++] < 128) || (d = (d | (this.buf[this.pos] & 127) << 21) >>> 0, this.buf[this.pos++] < 128) || (d = (d | (this.buf[this.pos] & 15) << 28) >>> 0, this.buf[this.pos++] < 128)) return d;
1175
1335
  if ((this.pos += 5) > this.len)
1176
- throw this.pos = this.len, r(this, 10);
1336
+ throw this.pos = this.len, n(this, 10);
1177
1337
  return d;
1178
1338
  };
1179
- }(), n.prototype.int32 = function() {
1339
+ }(), r.prototype.int32 = function() {
1180
1340
  return this.uint32() | 0;
1181
- }, n.prototype.sint32 = function() {
1341
+ }, r.prototype.sint32 = function() {
1182
1342
  var d = this.uint32();
1183
1343
  return d >>> 1 ^ -(d & 1) | 0;
1184
1344
  };
1185
- function t() {
1186
- var a = new u(0, 0), d = 0;
1345
+ function e() {
1346
+ var c = new a(0, 0), d = 0;
1187
1347
  if (this.len - this.pos > 4) {
1188
1348
  for (; d < 4; ++d)
1189
- if (a.lo = (a.lo | (this.buf[this.pos] & 127) << d * 7) >>> 0, this.buf[this.pos++] < 128)
1190
- return a;
1191
- if (a.lo = (a.lo | (this.buf[this.pos] & 127) << 28) >>> 0, a.hi = (a.hi | (this.buf[this.pos] & 127) >> 4) >>> 0, this.buf[this.pos++] < 128)
1192
- return a;
1349
+ if (c.lo = (c.lo | (this.buf[this.pos] & 127) << d * 7) >>> 0, this.buf[this.pos++] < 128)
1350
+ return c;
1351
+ if (c.lo = (c.lo | (this.buf[this.pos] & 127) << 28) >>> 0, c.hi = (c.hi | (this.buf[this.pos] & 127) >> 4) >>> 0, this.buf[this.pos++] < 128)
1352
+ return c;
1193
1353
  d = 0;
1194
1354
  } else {
1195
1355
  for (; d < 3; ++d) {
1196
1356
  if (this.pos >= this.len)
1197
- throw r(this);
1198
- if (a.lo = (a.lo | (this.buf[this.pos] & 127) << d * 7) >>> 0, this.buf[this.pos++] < 128)
1199
- return a;
1357
+ throw n(this);
1358
+ if (c.lo = (c.lo | (this.buf[this.pos] & 127) << d * 7) >>> 0, this.buf[this.pos++] < 128)
1359
+ return c;
1200
1360
  }
1201
- return a.lo = (a.lo | (this.buf[this.pos++] & 127) << d * 7) >>> 0, a;
1361
+ return c.lo = (c.lo | (this.buf[this.pos++] & 127) << d * 7) >>> 0, c;
1202
1362
  }
1203
1363
  if (this.len - this.pos > 4) {
1204
1364
  for (; d < 5; ++d)
1205
- if (a.hi = (a.hi | (this.buf[this.pos] & 127) << d * 7 + 3) >>> 0, this.buf[this.pos++] < 128)
1206
- return a;
1365
+ if (c.hi = (c.hi | (this.buf[this.pos] & 127) << d * 7 + 3) >>> 0, this.buf[this.pos++] < 128)
1366
+ return c;
1207
1367
  } else
1208
1368
  for (; d < 5; ++d) {
1209
1369
  if (this.pos >= this.len)
1210
- throw r(this);
1211
- if (a.hi = (a.hi | (this.buf[this.pos] & 127) << d * 7 + 3) >>> 0, this.buf[this.pos++] < 128)
1212
- return a;
1370
+ throw n(this);
1371
+ if (c.hi = (c.hi | (this.buf[this.pos] & 127) << d * 7 + 3) >>> 0, this.buf[this.pos++] < 128)
1372
+ return c;
1213
1373
  }
1214
1374
  throw Error("invalid varint encoding");
1215
1375
  }
1216
- n.prototype.bool = function() {
1376
+ r.prototype.bool = function() {
1217
1377
  return this.uint32() !== 0;
1218
1378
  };
1219
- function s(a, d) {
1220
- return (a[d - 4] | a[d - 3] << 8 | a[d - 2] << 16 | a[d - 1] << 24) >>> 0;
1379
+ function s(c, d) {
1380
+ return (c[d - 4] | c[d - 3] << 8 | c[d - 2] << 16 | c[d - 1] << 24) >>> 0;
1221
1381
  }
1222
- n.prototype.fixed32 = function() {
1382
+ r.prototype.fixed32 = function() {
1223
1383
  if (this.pos + 4 > this.len)
1224
- throw r(this, 4);
1384
+ throw n(this, 4);
1225
1385
  return s(this.buf, this.pos += 4);
1226
- }, n.prototype.sfixed32 = function() {
1386
+ }, r.prototype.sfixed32 = function() {
1227
1387
  if (this.pos + 4 > this.len)
1228
- throw r(this, 4);
1388
+ throw n(this, 4);
1229
1389
  return s(this.buf, this.pos += 4) | 0;
1230
1390
  };
1231
1391
  function l() {
1232
1392
  if (this.pos + 8 > this.len)
1233
- throw r(this, 8);
1234
- return new u(s(this.buf, this.pos += 4), s(this.buf, this.pos += 4));
1393
+ throw n(this, 8);
1394
+ return new a(s(this.buf, this.pos += 4), s(this.buf, this.pos += 4));
1235
1395
  }
1236
- return n.prototype.float = function() {
1396
+ return r.prototype.float = function() {
1237
1397
  if (this.pos + 4 > this.len)
1238
- throw r(this, 4);
1239
- var d = f.float.readFloatLE(this.buf, this.pos);
1398
+ throw n(this, 4);
1399
+ var d = h.float.readFloatLE(this.buf, this.pos);
1240
1400
  return this.pos += 4, d;
1241
- }, n.prototype.double = function() {
1401
+ }, r.prototype.double = function() {
1242
1402
  if (this.pos + 8 > this.len)
1243
- throw r(this, 4);
1244
- var d = f.float.readDoubleLE(this.buf, this.pos);
1403
+ throw n(this, 4);
1404
+ var d = h.float.readDoubleLE(this.buf, this.pos);
1245
1405
  return this.pos += 8, d;
1246
- }, n.prototype.bytes = function() {
1247
- var d = this.uint32(), y = this.pos, p = this.pos + d;
1248
- if (p > this.len)
1249
- throw r(this, d);
1406
+ }, r.prototype.bytes = function() {
1407
+ var d = this.uint32(), p = this.pos, f = this.pos + d;
1408
+ if (f > this.len)
1409
+ throw n(this, d);
1250
1410
  if (this.pos += d, Array.isArray(this.buf))
1251
- return this.buf.slice(y, p);
1252
- if (y === p) {
1253
- var w = f.Buffer;
1411
+ return this.buf.slice(p, f);
1412
+ if (p === f) {
1413
+ var w = h.Buffer;
1254
1414
  return w ? w.alloc(0) : new this.buf.constructor(0);
1255
1415
  }
1256
- return this._slice.call(this.buf, y, p);
1257
- }, n.prototype.string = function() {
1416
+ return this._slice.call(this.buf, p, f);
1417
+ }, r.prototype.string = function() {
1258
1418
  var d = this.bytes();
1259
- return c.read(d, 0, d.length);
1260
- }, n.prototype.skip = function(d) {
1419
+ return u.read(d, 0, d.length);
1420
+ }, r.prototype.skip = function(d) {
1261
1421
  if (typeof d == "number") {
1262
1422
  if (this.pos + d > this.len)
1263
- throw r(this, d);
1423
+ throw n(this, d);
1264
1424
  this.pos += d;
1265
1425
  } else
1266
1426
  do
1267
1427
  if (this.pos >= this.len)
1268
- throw r(this);
1428
+ throw n(this);
1269
1429
  while (this.buf[this.pos++] & 128);
1270
1430
  return this;
1271
- }, n.prototype.skipType = function(a) {
1272
- switch (a) {
1431
+ }, r.prototype.skipType = function(c) {
1432
+ switch (c) {
1273
1433
  case 0:
1274
1434
  this.skip();
1275
1435
  break;
@@ -1280,32 +1440,32 @@ function requireReader() {
1280
1440
  this.skip(this.uint32());
1281
1441
  break;
1282
1442
  case 3:
1283
- for (; (a = this.uint32() & 7) !== 4; )
1284
- this.skipType(a);
1443
+ for (; (c = this.uint32() & 7) !== 4; )
1444
+ this.skipType(c);
1285
1445
  break;
1286
1446
  case 5:
1287
1447
  this.skip(4);
1288
1448
  break;
1289
1449
  /* istanbul ignore next */
1290
1450
  default:
1291
- throw Error("invalid wire type " + a + " at offset " + this.pos);
1451
+ throw Error("invalid wire type " + c + " at offset " + this.pos);
1292
1452
  }
1293
1453
  return this;
1294
- }, n._configure = function(a) {
1295
- o = a, n.create = e(), o._configure();
1296
- var d = f.Long ? "toLong" : (
1454
+ }, r._configure = function(c) {
1455
+ o = c, r.create = t(), o._configure();
1456
+ var d = h.Long ? "toLong" : (
1297
1457
  /* istanbul ignore next */
1298
1458
  "toNumber"
1299
1459
  );
1300
- f.merge(n.prototype, {
1460
+ h.merge(r.prototype, {
1301
1461
  int64: function() {
1302
- return t.call(this)[d](!1);
1462
+ return e.call(this)[d](!1);
1303
1463
  },
1304
1464
  uint64: function() {
1305
- return t.call(this)[d](!0);
1465
+ return e.call(this)[d](!0);
1306
1466
  },
1307
1467
  sint64: function() {
1308
- return t.call(this).zzDecode()[d](!1);
1468
+ return e.call(this).zzDecode()[d](!1);
1309
1469
  },
1310
1470
  fixed64: function() {
1311
1471
  return l.call(this)[d](!0);
@@ -1319,80 +1479,80 @@ function requireReader() {
1319
1479
  var reader_buffer, hasRequiredReader_buffer;
1320
1480
  function requireReader_buffer() {
1321
1481
  if (hasRequiredReader_buffer) return reader_buffer;
1322
- hasRequiredReader_buffer = 1, reader_buffer = u;
1323
- var f = requireReader();
1324
- (u.prototype = Object.create(f.prototype)).constructor = u;
1482
+ hasRequiredReader_buffer = 1, reader_buffer = a;
1483
+ var h = requireReader();
1484
+ (a.prototype = Object.create(h.prototype)).constructor = a;
1325
1485
  var o = requireMinimal$1();
1326
- function u(c) {
1327
- f.call(this, c);
1486
+ function a(u) {
1487
+ h.call(this, u);
1328
1488
  }
1329
- return u._configure = function() {
1330
- o.Buffer && (u.prototype._slice = o.Buffer.prototype.slice);
1331
- }, u.prototype.string = function() {
1332
- var r = this.uint32();
1333
- return this.buf.utf8Slice ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + r, this.len)) : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + r, this.len));
1334
- }, u._configure(), reader_buffer;
1489
+ return a._configure = function() {
1490
+ o.Buffer && (a.prototype._slice = o.Buffer.prototype.slice);
1491
+ }, a.prototype.string = function() {
1492
+ var n = this.uint32();
1493
+ return this.buf.utf8Slice ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + n, this.len)) : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + n, this.len));
1494
+ }, a._configure(), reader_buffer;
1335
1495
  }
1336
1496
  var rpc = {}, service, hasRequiredService;
1337
1497
  function requireService() {
1338
1498
  if (hasRequiredService) return service;
1339
1499
  hasRequiredService = 1, service = o;
1340
- var f = requireMinimal$1();
1341
- (o.prototype = Object.create(f.EventEmitter.prototype)).constructor = o;
1342
- function o(u, c, r) {
1343
- if (typeof u != "function")
1500
+ var h = requireMinimal$1();
1501
+ (o.prototype = Object.create(h.EventEmitter.prototype)).constructor = o;
1502
+ function o(a, u, n) {
1503
+ if (typeof a != "function")
1344
1504
  throw TypeError("rpcImpl must be a function");
1345
- f.EventEmitter.call(this), this.rpcImpl = u, this.requestDelimited = !!c, this.responseDelimited = !!r;
1505
+ h.EventEmitter.call(this), this.rpcImpl = a, this.requestDelimited = !!u, this.responseDelimited = !!n;
1346
1506
  }
1347
- return o.prototype.rpcCall = function u(c, r, n, i, e) {
1507
+ return o.prototype.rpcCall = function a(u, n, r, i, t) {
1348
1508
  if (!i)
1349
1509
  throw TypeError("request must be specified");
1350
- var t = this;
1351
- if (!e)
1352
- return f.asPromise(u, t, c, r, n, i);
1353
- if (!t.rpcImpl) {
1510
+ var e = this;
1511
+ if (!t)
1512
+ return h.asPromise(a, e, u, n, r, i);
1513
+ if (!e.rpcImpl) {
1354
1514
  setTimeout(function() {
1355
- e(Error("already ended"));
1515
+ t(Error("already ended"));
1356
1516
  }, 0);
1357
1517
  return;
1358
1518
  }
1359
1519
  try {
1360
- return t.rpcImpl(
1361
- c,
1362
- r[t.requestDelimited ? "encodeDelimited" : "encode"](i).finish(),
1363
- function(l, a) {
1520
+ return e.rpcImpl(
1521
+ u,
1522
+ n[e.requestDelimited ? "encodeDelimited" : "encode"](i).finish(),
1523
+ function(l, c) {
1364
1524
  if (l)
1365
- return t.emit("error", l, c), e(l);
1366
- if (a === null) {
1367
- t.end(
1525
+ return e.emit("error", l, u), t(l);
1526
+ if (c === null) {
1527
+ e.end(
1368
1528
  /* endedByRPC */
1369
1529
  !0
1370
1530
  );
1371
1531
  return;
1372
1532
  }
1373
- if (!(a instanceof n))
1533
+ if (!(c instanceof r))
1374
1534
  try {
1375
- a = n[t.responseDelimited ? "decodeDelimited" : "decode"](a);
1535
+ c = r[e.responseDelimited ? "decodeDelimited" : "decode"](c);
1376
1536
  } catch (d) {
1377
- return t.emit("error", d, c), e(d);
1537
+ return e.emit("error", d, u), t(d);
1378
1538
  }
1379
- return t.emit("data", a, c), e(null, a);
1539
+ return e.emit("data", c, u), t(null, c);
1380
1540
  }
1381
1541
  );
1382
1542
  } catch (s) {
1383
- t.emit("error", s, c), setTimeout(function() {
1384
- e(s);
1543
+ e.emit("error", s, u), setTimeout(function() {
1544
+ t(s);
1385
1545
  }, 0);
1386
1546
  return;
1387
1547
  }
1388
- }, o.prototype.end = function(c) {
1389
- return this.rpcImpl && (c || this.rpcImpl(null, null, null), this.rpcImpl = null, this.emit("end").off()), this;
1548
+ }, o.prototype.end = function(u) {
1549
+ return this.rpcImpl && (u || this.rpcImpl(null, null, null), this.rpcImpl = null, this.emit("end").off()), this;
1390
1550
  }, service;
1391
1551
  }
1392
1552
  var hasRequiredRpc;
1393
1553
  function requireRpc() {
1394
- return hasRequiredRpc || (hasRequiredRpc = 1, function(f) {
1395
- var o = f;
1554
+ return hasRequiredRpc || (hasRequiredRpc = 1, function(h) {
1555
+ var o = h;
1396
1556
  o.Service = requireService();
1397
1557
  }(rpc)), rpc;
1398
1558
  }
@@ -1402,13 +1562,13 @@ function requireRoots() {
1402
1562
  }
1403
1563
  var hasRequiredIndexMinimal;
1404
1564
  function requireIndexMinimal() {
1405
- return hasRequiredIndexMinimal || (hasRequiredIndexMinimal = 1, function(f) {
1406
- var o = f;
1407
- o.build = "minimal", o.Writer = requireWriter(), o.BufferWriter = requireWriter_buffer(), o.Reader = requireReader(), o.BufferReader = requireReader_buffer(), o.util = requireMinimal$1(), o.rpc = requireRpc(), o.roots = requireRoots(), o.configure = u;
1408
- function u() {
1565
+ return hasRequiredIndexMinimal || (hasRequiredIndexMinimal = 1, function(h) {
1566
+ var o = h;
1567
+ o.build = "minimal", o.Writer = requireWriter(), o.BufferWriter = requireWriter_buffer(), o.Reader = requireReader(), o.BufferReader = requireReader_buffer(), o.util = requireMinimal$1(), o.rpc = requireRpc(), o.roots = requireRoots(), o.configure = a;
1568
+ function a() {
1409
1569
  o.util._configure(), o.Writer._configure(o.BufferWriter), o.Reader._configure(o.BufferReader);
1410
1570
  }
1411
- u();
1571
+ a();
1412
1572
  }(indexMinimal)), indexMinimal;
1413
1573
  }
1414
1574
  var minimal, hasRequiredMinimal;
@@ -1417,42 +1577,42 @@ function requireMinimal() {
1417
1577
  }
1418
1578
  var minimalExports = requireMinimal();
1419
1579
  const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util = minimalExports.util, $root = minimalExports.roots.default || (minimalExports.roots.default = {}), com = $root.com = (() => {
1420
- const f = {};
1421
- return f.quick = function() {
1580
+ const h = {};
1581
+ return h.quick = function() {
1422
1582
  const o = {};
1423
1583
  return o.voice = function() {
1424
- const u = {};
1425
- return u.proto = function() {
1426
- const c = {};
1427
- return c.SeiData = function() {
1428
- function r(n) {
1429
- if (n) for (let i = Object.keys(n), e = 0; e < i.length; ++e) n[i[e]] != null && (this[i[e]] = n[i[e]]);
1584
+ const a = {};
1585
+ return a.proto = function() {
1586
+ const u = {};
1587
+ return u.SeiData = function() {
1588
+ function n(r) {
1589
+ if (r) for (let i = Object.keys(r), t = 0; t < i.length; ++t) r[i[t]] != null && (this[i[t]] = r[i[t]]);
1430
1590
  }
1431
- return r.prototype.event = 0, r.prototype.data = $util.newBuffer([]), r.prototype.compress = !1, r.prototype.version = 0, r.create = function(i) {
1432
- return new r(i);
1433
- }, r.encode = function(i, e) {
1434
- return e || (e = $Writer.create()), i.event != null && Object.hasOwnProperty.call(i, "event") && e.uint32(
1591
+ return n.prototype.event = 0, n.prototype.data = $util.newBuffer([]), n.prototype.compress = !1, n.prototype.version = 0, n.create = function(i) {
1592
+ return new n(i);
1593
+ }, n.encode = function(i, t) {
1594
+ return t || (t = $Writer.create()), i.event != null && Object.hasOwnProperty.call(i, "event") && t.uint32(
1435
1595
  /* id 1, wireType 0 =*/
1436
1596
  8
1437
- ).int32(i.event), i.data != null && Object.hasOwnProperty.call(i, "data") && e.uint32(
1597
+ ).int32(i.event), i.data != null && Object.hasOwnProperty.call(i, "data") && t.uint32(
1438
1598
  /* id 2, wireType 2 =*/
1439
1599
  18
1440
- ).bytes(i.data), i.compress != null && Object.hasOwnProperty.call(i, "compress") && e.uint32(
1600
+ ).bytes(i.data), i.compress != null && Object.hasOwnProperty.call(i, "compress") && t.uint32(
1441
1601
  /* id 3, wireType 0 =*/
1442
1602
  24
1443
- ).bool(i.compress), i.version != null && Object.hasOwnProperty.call(i, "version") && e.uint32(
1603
+ ).bool(i.compress), i.version != null && Object.hasOwnProperty.call(i, "version") && t.uint32(
1444
1604
  /* id 4, wireType 0 =*/
1445
1605
  32
1446
- ).int32(i.version), e;
1447
- }, r.encodeDelimited = function(i, e) {
1448
- return this.encode(i, e).ldelim();
1449
- }, r.decode = function(i, e, t) {
1606
+ ).int32(i.version), t;
1607
+ }, n.encodeDelimited = function(i, t) {
1608
+ return this.encode(i, t).ldelim();
1609
+ }, n.decode = function(i, t, e) {
1450
1610
  i instanceof $Reader || (i = $Reader.create(i));
1451
- let s = e === void 0 ? i.len : i.pos + e, l = new $root.com.quick.voice.proto.SeiData();
1611
+ let s = t === void 0 ? i.len : i.pos + t, l = new $root.com.quick.voice.proto.SeiData();
1452
1612
  for (; i.pos < s; ) {
1453
- let a = i.uint32();
1454
- if (a === t) break;
1455
- switch (a >>> 3) {
1613
+ let c = i.uint32();
1614
+ if (c === e) break;
1615
+ switch (c >>> 3) {
1456
1616
  case 1: {
1457
1617
  l.event = i.int32();
1458
1618
  break;
@@ -1470,14 +1630,14 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1470
1630
  break;
1471
1631
  }
1472
1632
  default:
1473
- i.skipType(a & 7);
1633
+ i.skipType(c & 7);
1474
1634
  break;
1475
1635
  }
1476
1636
  }
1477
1637
  return l;
1478
- }, r.decodeDelimited = function(i) {
1638
+ }, n.decodeDelimited = function(i) {
1479
1639
  return i instanceof $Reader || (i = new $Reader(i)), this.decode(i, i.uint32());
1480
- }, r.verify = function(i) {
1640
+ }, n.verify = function(i) {
1481
1641
  if (typeof i != "object" || i === null) return "object expected";
1482
1642
  if (i.event != null && i.hasOwnProperty("event"))
1483
1643
  switch (i.event) {
@@ -1488,126 +1648,126 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1488
1648
  break;
1489
1649
  }
1490
1650
  return i.data != null && i.hasOwnProperty("data") && !(i.data && typeof i.data.length == "number" || $util.isString(i.data)) ? "data: buffer expected" : i.compress != null && i.hasOwnProperty("compress") && typeof i.compress != "boolean" ? "compress: boolean expected" : i.version != null && i.hasOwnProperty("version") && !$util.isInteger(i.version) ? "version: integer expected" : null;
1491
- }, r.fromObject = function(i) {
1651
+ }, n.fromObject = function(i) {
1492
1652
  if (i instanceof $root.com.quick.voice.proto.SeiData) return i;
1493
- let e = new $root.com.quick.voice.proto.SeiData();
1653
+ let t = new $root.com.quick.voice.proto.SeiData();
1494
1654
  switch (i.event) {
1495
1655
  default:
1496
1656
  if (typeof i.event == "number") {
1497
- e.event = i.event;
1657
+ t.event = i.event;
1498
1658
  break;
1499
1659
  }
1500
1660
  break;
1501
1661
  case "Layout":
1502
1662
  case 0:
1503
- e.event = 0;
1663
+ t.event = 0;
1504
1664
  break;
1505
1665
  case "Custom":
1506
1666
  case 1:
1507
- e.event = 1;
1667
+ t.event = 1;
1508
1668
  break;
1509
1669
  }
1510
- return i.data != null && (typeof i.data == "string" ? $util.base64.decode(i.data, e.data = $util.newBuffer($util.base64.length(i.data)), 0) : i.data.length >= 0 && (e.data = i.data)), i.compress != null && (e.compress = !!i.compress), i.version != null && (e.version = i.version | 0), e;
1511
- }, r.toObject = function(i, e) {
1512
- e || (e = {});
1513
- let t = {};
1514
- return e.defaults && (t.event = e.enums === String ? "Layout" : 0, e.bytes === String ? t.data = "" : (t.data = [], e.bytes !== Array && (t.data = $util.newBuffer(t.data))), t.compress = !1, t.version = 0), i.event != null && i.hasOwnProperty("event") && (t.event = e.enums === String ? $root.com.quick.voice.proto.EventType[i.event] === void 0 ? i.event : $root.com.quick.voice.proto.EventType[i.event] : i.event), i.data != null && i.hasOwnProperty("data") && (t.data = e.bytes === String ? $util.base64.encode(i.data, 0, i.data.length) : e.bytes === Array ? Array.prototype.slice.call(i.data) : i.data), i.compress != null && i.hasOwnProperty("compress") && (t.compress = i.compress), i.version != null && i.hasOwnProperty("version") && (t.version = i.version), t;
1515
- }, r.prototype.toJSON = function() {
1670
+ return i.data != null && (typeof i.data == "string" ? $util.base64.decode(i.data, t.data = $util.newBuffer($util.base64.length(i.data)), 0) : i.data.length >= 0 && (t.data = i.data)), i.compress != null && (t.compress = !!i.compress), i.version != null && (t.version = i.version | 0), t;
1671
+ }, n.toObject = function(i, t) {
1672
+ t || (t = {});
1673
+ let e = {};
1674
+ return t.defaults && (e.event = t.enums === String ? "Layout" : 0, t.bytes === String ? e.data = "" : (e.data = [], t.bytes !== Array && (e.data = $util.newBuffer(e.data))), e.compress = !1, e.version = 0), i.event != null && i.hasOwnProperty("event") && (e.event = t.enums === String ? $root.com.quick.voice.proto.EventType[i.event] === void 0 ? i.event : $root.com.quick.voice.proto.EventType[i.event] : i.event), i.data != null && i.hasOwnProperty("data") && (e.data = t.bytes === String ? $util.base64.encode(i.data, 0, i.data.length) : t.bytes === Array ? Array.prototype.slice.call(i.data) : i.data), i.compress != null && i.hasOwnProperty("compress") && (e.compress = i.compress), i.version != null && i.hasOwnProperty("version") && (e.version = i.version), e;
1675
+ }, n.prototype.toJSON = function() {
1516
1676
  return this.constructor.toObject(this, minimalExports.util.toJSONOptions);
1517
- }, r.getTypeUrl = function(i) {
1677
+ }, n.getTypeUrl = function(i) {
1518
1678
  return i === void 0 && (i = "type.googleapis.com"), i + "/com.quick.voice.proto.SeiData";
1519
- }, r;
1520
- }(), c.EventType = function() {
1521
- const r = {}, n = Object.create(r);
1522
- return n[r[0] = "Layout"] = 0, n[r[1] = "Custom"] = 1, n;
1523
- }(), c.LayoutData = function() {
1524
- function r(i) {
1525
- if (this.userMap = {}, i) for (let e = Object.keys(i), t = 0; t < e.length; ++t) i[e[t]] != null && (this[e[t]] = i[e[t]]);
1679
+ }, n;
1680
+ }(), u.EventType = function() {
1681
+ const n = {}, r = Object.create(n);
1682
+ return r[n[0] = "Layout"] = 0, r[n[1] = "Custom"] = 1, r;
1683
+ }(), u.LayoutData = function() {
1684
+ function n(i) {
1685
+ if (this.userMap = {}, i) for (let t = Object.keys(i), e = 0; e < t.length; ++e) i[t[e]] != null && (this[t[e]] = i[t[e]]);
1526
1686
  }
1527
- r.prototype.roomId = "", r.prototype.type = 0, r.prototype.userMap = $util.emptyObject, r.prototype.globalCustom = null;
1528
- let n;
1529
- return Object.defineProperty(r.prototype, "_globalCustom", {
1530
- get: $util.oneOfGetter(n = ["globalCustom"]),
1531
- set: $util.oneOfSetter(n)
1532
- }), r.create = function(e) {
1533
- return new r(e);
1534
- }, r.encode = function(e, t) {
1535
- if (t || (t = $Writer.create()), e.roomId != null && Object.hasOwnProperty.call(e, "roomId") && t.uint32(
1687
+ n.prototype.roomId = "", n.prototype.type = 0, n.prototype.userMap = $util.emptyObject, n.prototype.globalCustom = null;
1688
+ let r;
1689
+ return Object.defineProperty(n.prototype, "_globalCustom", {
1690
+ get: $util.oneOfGetter(r = ["globalCustom"]),
1691
+ set: $util.oneOfSetter(r)
1692
+ }), n.create = function(t) {
1693
+ return new n(t);
1694
+ }, n.encode = function(t, e) {
1695
+ if (e || (e = $Writer.create()), t.roomId != null && Object.hasOwnProperty.call(t, "roomId") && e.uint32(
1536
1696
  /* id 1, wireType 2 =*/
1537
1697
  10
1538
- ).string(e.roomId), e.type != null && Object.hasOwnProperty.call(e, "type") && t.uint32(
1698
+ ).string(t.roomId), t.type != null && Object.hasOwnProperty.call(t, "type") && e.uint32(
1539
1699
  /* id 2, wireType 0 =*/
1540
1700
  16
1541
- ).int32(e.type), e.userMap != null && Object.hasOwnProperty.call(e, "userMap"))
1542
- for (let s = Object.keys(e.userMap), l = 0; l < s.length; ++l)
1543
- t.uint32(
1701
+ ).int32(t.type), t.userMap != null && Object.hasOwnProperty.call(t, "userMap"))
1702
+ for (let s = Object.keys(t.userMap), l = 0; l < s.length; ++l)
1703
+ e.uint32(
1544
1704
  /* id 3, wireType 2 =*/
1545
1705
  26
1546
1706
  ).fork().uint32(
1547
1707
  /* id 1, wireType 2 =*/
1548
1708
  10
1549
- ).string(s[l]), $root.com.quick.voice.proto.UserInfo.encode(e.userMap[s[l]], t.uint32(
1709
+ ).string(s[l]), $root.com.quick.voice.proto.UserInfo.encode(t.userMap[s[l]], e.uint32(
1550
1710
  /* id 2, wireType 2 =*/
1551
1711
  18
1552
1712
  ).fork()).ldelim().ldelim();
1553
- return e.globalCustom != null && Object.hasOwnProperty.call(e, "globalCustom") && $root.com.quick.voice.proto.CustomInfo.encode(e.globalCustom, t.uint32(
1713
+ return t.globalCustom != null && Object.hasOwnProperty.call(t, "globalCustom") && $root.com.quick.voice.proto.CustomInfo.encode(t.globalCustom, e.uint32(
1554
1714
  /* id 4, wireType 2 =*/
1555
1715
  34
1556
- ).fork()).ldelim(), t;
1557
- }, r.encodeDelimited = function(e, t) {
1558
- return this.encode(e, t).ldelim();
1559
- }, r.decode = function(e, t, s) {
1560
- e instanceof $Reader || (e = $Reader.create(e));
1561
- let l = t === void 0 ? e.len : e.pos + t, a = new $root.com.quick.voice.proto.LayoutData(), d, y;
1562
- for (; e.pos < l; ) {
1563
- let p = e.uint32();
1564
- if (p === s) break;
1565
- switch (p >>> 3) {
1716
+ ).fork()).ldelim(), e;
1717
+ }, n.encodeDelimited = function(t, e) {
1718
+ return this.encode(t, e).ldelim();
1719
+ }, n.decode = function(t, e, s) {
1720
+ t instanceof $Reader || (t = $Reader.create(t));
1721
+ let l = e === void 0 ? t.len : t.pos + e, c = new $root.com.quick.voice.proto.LayoutData(), d, p;
1722
+ for (; t.pos < l; ) {
1723
+ let f = t.uint32();
1724
+ if (f === s) break;
1725
+ switch (f >>> 3) {
1566
1726
  case 1: {
1567
- a.roomId = e.string();
1727
+ c.roomId = t.string();
1568
1728
  break;
1569
1729
  }
1570
1730
  case 2: {
1571
- a.type = e.int32();
1731
+ c.type = t.int32();
1572
1732
  break;
1573
1733
  }
1574
1734
  case 3: {
1575
- a.userMap === $util.emptyObject && (a.userMap = {});
1576
- let w = e.uint32() + e.pos;
1577
- for (d = "", y = null; e.pos < w; ) {
1578
- let v = e.uint32();
1579
- switch (v >>> 3) {
1735
+ c.userMap === $util.emptyObject && (c.userMap = {});
1736
+ let w = t.uint32() + t.pos;
1737
+ for (d = "", p = null; t.pos < w; ) {
1738
+ let b = t.uint32();
1739
+ switch (b >>> 3) {
1580
1740
  case 1:
1581
- d = e.string();
1741
+ d = t.string();
1582
1742
  break;
1583
1743
  case 2:
1584
- y = $root.com.quick.voice.proto.UserInfo.decode(e, e.uint32());
1744
+ p = $root.com.quick.voice.proto.UserInfo.decode(t, t.uint32());
1585
1745
  break;
1586
1746
  default:
1587
- e.skipType(v & 7);
1747
+ t.skipType(b & 7);
1588
1748
  break;
1589
1749
  }
1590
1750
  }
1591
- a.userMap[d] = y;
1751
+ c.userMap[d] = p;
1592
1752
  break;
1593
1753
  }
1594
1754
  case 4: {
1595
- a.globalCustom = $root.com.quick.voice.proto.CustomInfo.decode(e, e.uint32());
1755
+ c.globalCustom = $root.com.quick.voice.proto.CustomInfo.decode(t, t.uint32());
1596
1756
  break;
1597
1757
  }
1598
1758
  default:
1599
- e.skipType(p & 7);
1759
+ t.skipType(f & 7);
1600
1760
  break;
1601
1761
  }
1602
1762
  }
1603
- return a;
1604
- }, r.decodeDelimited = function(e) {
1605
- return e instanceof $Reader || (e = new $Reader(e)), this.decode(e, e.uint32());
1606
- }, r.verify = function(e) {
1607
- if (typeof e != "object" || e === null) return "object expected";
1608
- if (e.roomId != null && e.hasOwnProperty("roomId") && !$util.isString(e.roomId)) return "roomId: string expected";
1609
- if (e.type != null && e.hasOwnProperty("type"))
1610
- switch (e.type) {
1763
+ return c;
1764
+ }, n.decodeDelimited = function(t) {
1765
+ return t instanceof $Reader || (t = new $Reader(t)), this.decode(t, t.uint32());
1766
+ }, n.verify = function(t) {
1767
+ if (typeof t != "object" || t === null) return "object expected";
1768
+ if (t.roomId != null && t.hasOwnProperty("roomId") && !$util.isString(t.roomId)) return "roomId: string expected";
1769
+ if (t.type != null && t.hasOwnProperty("type"))
1770
+ switch (t.type) {
1611
1771
  default:
1612
1772
  return "type: enum value expected";
1613
1773
  case 0:
@@ -1615,440 +1775,440 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
1615
1775
  case 2:
1616
1776
  break;
1617
1777
  }
1618
- if (e.userMap != null && e.hasOwnProperty("userMap")) {
1619
- if (!$util.isObject(e.userMap)) return "userMap: object expected";
1620
- let t = Object.keys(e.userMap);
1621
- for (let s = 0; s < t.length; ++s) {
1622
- let l = $root.com.quick.voice.proto.UserInfo.verify(e.userMap[t[s]]);
1778
+ if (t.userMap != null && t.hasOwnProperty("userMap")) {
1779
+ if (!$util.isObject(t.userMap)) return "userMap: object expected";
1780
+ let e = Object.keys(t.userMap);
1781
+ for (let s = 0; s < e.length; ++s) {
1782
+ let l = $root.com.quick.voice.proto.UserInfo.verify(t.userMap[e[s]]);
1623
1783
  if (l) return "userMap." + l;
1624
1784
  }
1625
1785
  }
1626
- if (e.globalCustom != null && e.hasOwnProperty("globalCustom")) {
1627
- let t = $root.com.quick.voice.proto.CustomInfo.verify(e.globalCustom);
1628
- if (t) return "globalCustom." + t;
1786
+ if (t.globalCustom != null && t.hasOwnProperty("globalCustom")) {
1787
+ let e = $root.com.quick.voice.proto.CustomInfo.verify(t.globalCustom);
1788
+ if (e) return "globalCustom." + e;
1629
1789
  }
1630
1790
  return null;
1631
- }, r.fromObject = function(e) {
1632
- if (e instanceof $root.com.quick.voice.proto.LayoutData) return e;
1633
- let t = new $root.com.quick.voice.proto.LayoutData();
1634
- switch (e.roomId != null && (t.roomId = String(e.roomId)), e.type) {
1791
+ }, n.fromObject = function(t) {
1792
+ if (t instanceof $root.com.quick.voice.proto.LayoutData) return t;
1793
+ let e = new $root.com.quick.voice.proto.LayoutData();
1794
+ switch (t.roomId != null && (e.roomId = String(t.roomId)), t.type) {
1635
1795
  default:
1636
- if (typeof e.type == "number") {
1637
- t.type = e.type;
1796
+ if (typeof t.type == "number") {
1797
+ e.type = t.type;
1638
1798
  break;
1639
1799
  }
1640
1800
  break;
1641
1801
  case "AudioAndVideo":
1642
1802
  case 0:
1643
- t.type = 0;
1803
+ e.type = 0;
1644
1804
  break;
1645
1805
  case "OnlyAudio":
1646
1806
  case 1:
1647
- t.type = 1;
1807
+ e.type = 1;
1648
1808
  break;
1649
1809
  case "OnlyVideo":
1650
1810
  case 2:
1651
- t.type = 2;
1811
+ e.type = 2;
1652
1812
  break;
1653
1813
  }
1654
- if (e.userMap) {
1655
- if (typeof e.userMap != "object") throw TypeError(".com.quick.voice.proto.LayoutData.userMap: object expected");
1656
- t.userMap = {};
1657
- for (let s = Object.keys(e.userMap), l = 0; l < s.length; ++l) {
1658
- if (typeof e.userMap[s[l]] != "object") throw TypeError(".com.quick.voice.proto.LayoutData.userMap: object expected");
1659
- t.userMap[s[l]] = $root.com.quick.voice.proto.UserInfo.fromObject(e.userMap[s[l]]);
1814
+ if (t.userMap) {
1815
+ if (typeof t.userMap != "object") throw TypeError(".com.quick.voice.proto.LayoutData.userMap: object expected");
1816
+ e.userMap = {};
1817
+ for (let s = Object.keys(t.userMap), l = 0; l < s.length; ++l) {
1818
+ if (typeof t.userMap[s[l]] != "object") throw TypeError(".com.quick.voice.proto.LayoutData.userMap: object expected");
1819
+ e.userMap[s[l]] = $root.com.quick.voice.proto.UserInfo.fromObject(t.userMap[s[l]]);
1660
1820
  }
1661
1821
  }
1662
- if (e.globalCustom != null) {
1663
- if (typeof e.globalCustom != "object") throw TypeError(".com.quick.voice.proto.LayoutData.globalCustom: object expected");
1664
- t.globalCustom = $root.com.quick.voice.proto.CustomInfo.fromObject(e.globalCustom);
1822
+ if (t.globalCustom != null) {
1823
+ if (typeof t.globalCustom != "object") throw TypeError(".com.quick.voice.proto.LayoutData.globalCustom: object expected");
1824
+ e.globalCustom = $root.com.quick.voice.proto.CustomInfo.fromObject(t.globalCustom);
1665
1825
  }
1666
- return t;
1667
- }, r.toObject = function(e, t) {
1668
- t || (t = {});
1826
+ return e;
1827
+ }, n.toObject = function(t, e) {
1828
+ e || (e = {});
1669
1829
  let s = {};
1670
- (t.objects || t.defaults) && (s.userMap = {}), t.defaults && (s.roomId = "", s.type = t.enums === String ? "AudioAndVideo" : 0), e.roomId != null && e.hasOwnProperty("roomId") && (s.roomId = e.roomId), e.type != null && e.hasOwnProperty("type") && (s.type = t.enums === String ? $root.com.quick.voice.proto.LayoutType[e.type] === void 0 ? e.type : $root.com.quick.voice.proto.LayoutType[e.type] : e.type);
1830
+ (e.objects || e.defaults) && (s.userMap = {}), e.defaults && (s.roomId = "", s.type = e.enums === String ? "AudioAndVideo" : 0), t.roomId != null && t.hasOwnProperty("roomId") && (s.roomId = t.roomId), t.type != null && t.hasOwnProperty("type") && (s.type = e.enums === String ? $root.com.quick.voice.proto.LayoutType[t.type] === void 0 ? t.type : $root.com.quick.voice.proto.LayoutType[t.type] : t.type);
1671
1831
  let l;
1672
- if (e.userMap && (l = Object.keys(e.userMap)).length) {
1832
+ if (t.userMap && (l = Object.keys(t.userMap)).length) {
1673
1833
  s.userMap = {};
1674
- for (let a = 0; a < l.length; ++a) s.userMap[l[a]] = $root.com.quick.voice.proto.UserInfo.toObject(e.userMap[l[a]], t);
1834
+ for (let c = 0; c < l.length; ++c) s.userMap[l[c]] = $root.com.quick.voice.proto.UserInfo.toObject(t.userMap[l[c]], e);
1675
1835
  }
1676
- return e.globalCustom != null && e.hasOwnProperty("globalCustom") && (s.globalCustom = $root.com.quick.voice.proto.CustomInfo.toObject(e.globalCustom, t), t.oneofs && (s._globalCustom = "globalCustom")), s;
1677
- }, r.prototype.toJSON = function() {
1836
+ return t.globalCustom != null && t.hasOwnProperty("globalCustom") && (s.globalCustom = $root.com.quick.voice.proto.CustomInfo.toObject(t.globalCustom, e), e.oneofs && (s._globalCustom = "globalCustom")), s;
1837
+ }, n.prototype.toJSON = function() {
1678
1838
  return this.constructor.toObject(this, minimalExports.util.toJSONOptions);
1679
- }, r.getTypeUrl = function(e) {
1680
- return e === void 0 && (e = "type.googleapis.com"), e + "/com.quick.voice.proto.LayoutData";
1681
- }, r;
1682
- }(), c.UserInfo = function() {
1683
- function r(i) {
1684
- if (this.audios = [], this.videos = [], i) for (let e = Object.keys(i), t = 0; t < e.length; ++t) i[e[t]] != null && (this[e[t]] = i[e[t]]);
1839
+ }, n.getTypeUrl = function(t) {
1840
+ return t === void 0 && (t = "type.googleapis.com"), t + "/com.quick.voice.proto.LayoutData";
1841
+ }, n;
1842
+ }(), u.UserInfo = function() {
1843
+ function n(i) {
1844
+ if (this.audios = [], this.videos = [], i) for (let t = Object.keys(i), e = 0; e < t.length; ++e) i[t[e]] != null && (this[t[e]] = i[t[e]]);
1685
1845
  }
1686
- r.prototype.id = "", r.prototype.audios = $util.emptyArray, r.prototype.videos = $util.emptyArray, r.prototype.custom = null;
1687
- let n;
1688
- return Object.defineProperty(r.prototype, "_custom", {
1689
- get: $util.oneOfGetter(n = ["custom"]),
1690
- set: $util.oneOfSetter(n)
1691
- }), r.create = function(e) {
1692
- return new r(e);
1693
- }, r.encode = function(e, t) {
1694
- if (t || (t = $Writer.create()), e.id != null && Object.hasOwnProperty.call(e, "id") && t.uint32(
1846
+ n.prototype.id = "", n.prototype.audios = $util.emptyArray, n.prototype.videos = $util.emptyArray, n.prototype.custom = null;
1847
+ let r;
1848
+ return Object.defineProperty(n.prototype, "_custom", {
1849
+ get: $util.oneOfGetter(r = ["custom"]),
1850
+ set: $util.oneOfSetter(r)
1851
+ }), n.create = function(t) {
1852
+ return new n(t);
1853
+ }, n.encode = function(t, e) {
1854
+ if (e || (e = $Writer.create()), t.id != null && Object.hasOwnProperty.call(t, "id") && e.uint32(
1695
1855
  /* id 1, wireType 2 =*/
1696
1856
  10
1697
- ).string(e.id), e.audios != null && e.audios.length) for (let s = 0; s < e.audios.length; ++s) $root.com.quick.voice.proto.AudioInfo.encode(e.audios[s], t.uint32(
1857
+ ).string(t.id), t.audios != null && t.audios.length) for (let s = 0; s < t.audios.length; ++s) $root.com.quick.voice.proto.AudioInfo.encode(t.audios[s], e.uint32(
1698
1858
  /* id 2, wireType 2 =*/
1699
1859
  18
1700
1860
  ).fork()).ldelim();
1701
- if (e.videos != null && e.videos.length) for (let s = 0; s < e.videos.length; ++s) $root.com.quick.voice.proto.VideoInfo.encode(e.videos[s], t.uint32(
1861
+ if (t.videos != null && t.videos.length) for (let s = 0; s < t.videos.length; ++s) $root.com.quick.voice.proto.VideoInfo.encode(t.videos[s], e.uint32(
1702
1862
  /* id 3, wireType 2 =*/
1703
1863
  26
1704
1864
  ).fork()).ldelim();
1705
- return e.custom != null && Object.hasOwnProperty.call(e, "custom") && $root.com.quick.voice.proto.CustomInfo.encode(e.custom, t.uint32(
1865
+ return t.custom != null && Object.hasOwnProperty.call(t, "custom") && $root.com.quick.voice.proto.CustomInfo.encode(t.custom, e.uint32(
1706
1866
  /* id 4, wireType 2 =*/
1707
1867
  34
1708
- ).fork()).ldelim(), t;
1709
- }, r.encodeDelimited = function(e, t) {
1710
- return this.encode(e, t).ldelim();
1711
- }, r.decode = function(e, t, s) {
1712
- e instanceof $Reader || (e = $Reader.create(e));
1713
- let l = t === void 0 ? e.len : e.pos + t, a = new $root.com.quick.voice.proto.UserInfo();
1714
- for (; e.pos < l; ) {
1715
- let d = e.uint32();
1868
+ ).fork()).ldelim(), e;
1869
+ }, n.encodeDelimited = function(t, e) {
1870
+ return this.encode(t, e).ldelim();
1871
+ }, n.decode = function(t, e, s) {
1872
+ t instanceof $Reader || (t = $Reader.create(t));
1873
+ let l = e === void 0 ? t.len : t.pos + e, c = new $root.com.quick.voice.proto.UserInfo();
1874
+ for (; t.pos < l; ) {
1875
+ let d = t.uint32();
1716
1876
  if (d === s) break;
1717
1877
  switch (d >>> 3) {
1718
1878
  case 1: {
1719
- a.id = e.string();
1879
+ c.id = t.string();
1720
1880
  break;
1721
1881
  }
1722
1882
  case 2: {
1723
- a.audios && a.audios.length || (a.audios = []), a.audios.push($root.com.quick.voice.proto.AudioInfo.decode(e, e.uint32()));
1883
+ c.audios && c.audios.length || (c.audios = []), c.audios.push($root.com.quick.voice.proto.AudioInfo.decode(t, t.uint32()));
1724
1884
  break;
1725
1885
  }
1726
1886
  case 3: {
1727
- a.videos && a.videos.length || (a.videos = []), a.videos.push($root.com.quick.voice.proto.VideoInfo.decode(e, e.uint32()));
1887
+ c.videos && c.videos.length || (c.videos = []), c.videos.push($root.com.quick.voice.proto.VideoInfo.decode(t, t.uint32()));
1728
1888
  break;
1729
1889
  }
1730
1890
  case 4: {
1731
- a.custom = $root.com.quick.voice.proto.CustomInfo.decode(e, e.uint32());
1891
+ c.custom = $root.com.quick.voice.proto.CustomInfo.decode(t, t.uint32());
1732
1892
  break;
1733
1893
  }
1734
1894
  default:
1735
- e.skipType(d & 7);
1895
+ t.skipType(d & 7);
1736
1896
  break;
1737
1897
  }
1738
1898
  }
1739
- return a;
1740
- }, r.decodeDelimited = function(e) {
1741
- return e instanceof $Reader || (e = new $Reader(e)), this.decode(e, e.uint32());
1742
- }, r.verify = function(e) {
1743
- if (typeof e != "object" || e === null) return "object expected";
1744
- if (e.id != null && e.hasOwnProperty("id") && !$util.isString(e.id)) return "id: string expected";
1745
- if (e.audios != null && e.hasOwnProperty("audios")) {
1746
- if (!Array.isArray(e.audios)) return "audios: array expected";
1747
- for (let t = 0; t < e.audios.length; ++t) {
1748
- let s = $root.com.quick.voice.proto.AudioInfo.verify(e.audios[t]);
1899
+ return c;
1900
+ }, n.decodeDelimited = function(t) {
1901
+ return t instanceof $Reader || (t = new $Reader(t)), this.decode(t, t.uint32());
1902
+ }, n.verify = function(t) {
1903
+ if (typeof t != "object" || t === null) return "object expected";
1904
+ if (t.id != null && t.hasOwnProperty("id") && !$util.isString(t.id)) return "id: string expected";
1905
+ if (t.audios != null && t.hasOwnProperty("audios")) {
1906
+ if (!Array.isArray(t.audios)) return "audios: array expected";
1907
+ for (let e = 0; e < t.audios.length; ++e) {
1908
+ let s = $root.com.quick.voice.proto.AudioInfo.verify(t.audios[e]);
1749
1909
  if (s) return "audios." + s;
1750
1910
  }
1751
1911
  }
1752
- if (e.videos != null && e.hasOwnProperty("videos")) {
1753
- if (!Array.isArray(e.videos)) return "videos: array expected";
1754
- for (let t = 0; t < e.videos.length; ++t) {
1755
- let s = $root.com.quick.voice.proto.VideoInfo.verify(e.videos[t]);
1912
+ if (t.videos != null && t.hasOwnProperty("videos")) {
1913
+ if (!Array.isArray(t.videos)) return "videos: array expected";
1914
+ for (let e = 0; e < t.videos.length; ++e) {
1915
+ let s = $root.com.quick.voice.proto.VideoInfo.verify(t.videos[e]);
1756
1916
  if (s) return "videos." + s;
1757
1917
  }
1758
1918
  }
1759
- if (e.custom != null && e.hasOwnProperty("custom")) {
1760
- let t = $root.com.quick.voice.proto.CustomInfo.verify(e.custom);
1761
- if (t) return "custom." + t;
1919
+ if (t.custom != null && t.hasOwnProperty("custom")) {
1920
+ let e = $root.com.quick.voice.proto.CustomInfo.verify(t.custom);
1921
+ if (e) return "custom." + e;
1762
1922
  }
1763
1923
  return null;
1764
- }, r.fromObject = function(e) {
1765
- if (e instanceof $root.com.quick.voice.proto.UserInfo) return e;
1766
- let t = new $root.com.quick.voice.proto.UserInfo();
1767
- if (e.id != null && (t.id = String(e.id)), e.audios) {
1768
- if (!Array.isArray(e.audios)) throw TypeError(".com.quick.voice.proto.UserInfo.audios: array expected");
1769
- t.audios = [];
1770
- for (let s = 0; s < e.audios.length; ++s) {
1771
- if (typeof e.audios[s] != "object") throw TypeError(".com.quick.voice.proto.UserInfo.audios: object expected");
1772
- t.audios[s] = $root.com.quick.voice.proto.AudioInfo.fromObject(e.audios[s]);
1924
+ }, n.fromObject = function(t) {
1925
+ if (t instanceof $root.com.quick.voice.proto.UserInfo) return t;
1926
+ let e = new $root.com.quick.voice.proto.UserInfo();
1927
+ if (t.id != null && (e.id = String(t.id)), t.audios) {
1928
+ if (!Array.isArray(t.audios)) throw TypeError(".com.quick.voice.proto.UserInfo.audios: array expected");
1929
+ e.audios = [];
1930
+ for (let s = 0; s < t.audios.length; ++s) {
1931
+ if (typeof t.audios[s] != "object") throw TypeError(".com.quick.voice.proto.UserInfo.audios: object expected");
1932
+ e.audios[s] = $root.com.quick.voice.proto.AudioInfo.fromObject(t.audios[s]);
1773
1933
  }
1774
1934
  }
1775
- if (e.videos) {
1776
- if (!Array.isArray(e.videos)) throw TypeError(".com.quick.voice.proto.UserInfo.videos: array expected");
1777
- t.videos = [];
1778
- for (let s = 0; s < e.videos.length; ++s) {
1779
- if (typeof e.videos[s] != "object") throw TypeError(".com.quick.voice.proto.UserInfo.videos: object expected");
1780
- t.videos[s] = $root.com.quick.voice.proto.VideoInfo.fromObject(e.videos[s]);
1935
+ if (t.videos) {
1936
+ if (!Array.isArray(t.videos)) throw TypeError(".com.quick.voice.proto.UserInfo.videos: array expected");
1937
+ e.videos = [];
1938
+ for (let s = 0; s < t.videos.length; ++s) {
1939
+ if (typeof t.videos[s] != "object") throw TypeError(".com.quick.voice.proto.UserInfo.videos: object expected");
1940
+ e.videos[s] = $root.com.quick.voice.proto.VideoInfo.fromObject(t.videos[s]);
1781
1941
  }
1782
1942
  }
1783
- if (e.custom != null) {
1784
- if (typeof e.custom != "object") throw TypeError(".com.quick.voice.proto.UserInfo.custom: object expected");
1785
- t.custom = $root.com.quick.voice.proto.CustomInfo.fromObject(e.custom);
1943
+ if (t.custom != null) {
1944
+ if (typeof t.custom != "object") throw TypeError(".com.quick.voice.proto.UserInfo.custom: object expected");
1945
+ e.custom = $root.com.quick.voice.proto.CustomInfo.fromObject(t.custom);
1786
1946
  }
1787
- return t;
1788
- }, r.toObject = function(e, t) {
1789
- t || (t = {});
1947
+ return e;
1948
+ }, n.toObject = function(t, e) {
1949
+ e || (e = {});
1790
1950
  let s = {};
1791
- if ((t.arrays || t.defaults) && (s.audios = [], s.videos = []), t.defaults && (s.id = ""), e.id != null && e.hasOwnProperty("id") && (s.id = e.id), e.audios && e.audios.length) {
1951
+ if ((e.arrays || e.defaults) && (s.audios = [], s.videos = []), e.defaults && (s.id = ""), t.id != null && t.hasOwnProperty("id") && (s.id = t.id), t.audios && t.audios.length) {
1792
1952
  s.audios = [];
1793
- for (let l = 0; l < e.audios.length; ++l) s.audios[l] = $root.com.quick.voice.proto.AudioInfo.toObject(e.audios[l], t);
1953
+ for (let l = 0; l < t.audios.length; ++l) s.audios[l] = $root.com.quick.voice.proto.AudioInfo.toObject(t.audios[l], e);
1794
1954
  }
1795
- if (e.videos && e.videos.length) {
1955
+ if (t.videos && t.videos.length) {
1796
1956
  s.videos = [];
1797
- for (let l = 0; l < e.videos.length; ++l) s.videos[l] = $root.com.quick.voice.proto.VideoInfo.toObject(e.videos[l], t);
1957
+ for (let l = 0; l < t.videos.length; ++l) s.videos[l] = $root.com.quick.voice.proto.VideoInfo.toObject(t.videos[l], e);
1798
1958
  }
1799
- return e.custom != null && e.hasOwnProperty("custom") && (s.custom = $root.com.quick.voice.proto.CustomInfo.toObject(e.custom, t), t.oneofs && (s._custom = "custom")), s;
1800
- }, r.prototype.toJSON = function() {
1959
+ return t.custom != null && t.hasOwnProperty("custom") && (s.custom = $root.com.quick.voice.proto.CustomInfo.toObject(t.custom, e), e.oneofs && (s._custom = "custom")), s;
1960
+ }, n.prototype.toJSON = function() {
1801
1961
  return this.constructor.toObject(this, minimalExports.util.toJSONOptions);
1802
- }, r.getTypeUrl = function(e) {
1803
- return e === void 0 && (e = "type.googleapis.com"), e + "/com.quick.voice.proto.UserInfo";
1804
- }, r;
1805
- }(), c.AudioInfo = function() {
1806
- function r(i) {
1807
- if (i) for (let e = Object.keys(i), t = 0; t < e.length; ++t) i[e[t]] != null && (this[e[t]] = i[e[t]]);
1962
+ }, n.getTypeUrl = function(t) {
1963
+ return t === void 0 && (t = "type.googleapis.com"), t + "/com.quick.voice.proto.UserInfo";
1964
+ }, n;
1965
+ }(), u.AudioInfo = function() {
1966
+ function n(i) {
1967
+ if (i) for (let t = Object.keys(i), e = 0; e < t.length; ++e) i[t[e]] != null && (this[t[e]] = i[t[e]]);
1808
1968
  }
1809
- r.prototype.type = 0, r.prototype.isEnable = !1, r.prototype.isMute = !1, r.prototype.volume = 0, r.prototype.updateTime = null;
1810
- let n;
1811
- return Object.defineProperty(r.prototype, "_updateTime", {
1812
- get: $util.oneOfGetter(n = ["updateTime"]),
1813
- set: $util.oneOfSetter(n)
1814
- }), r.create = function(e) {
1815
- return new r(e);
1816
- }, r.encode = function(e, t) {
1817
- return t || (t = $Writer.create()), e.type != null && Object.hasOwnProperty.call(e, "type") && t.uint32(
1969
+ n.prototype.type = 0, n.prototype.isEnable = !1, n.prototype.isMute = !1, n.prototype.volume = 0, n.prototype.updateTime = null;
1970
+ let r;
1971
+ return Object.defineProperty(n.prototype, "_updateTime", {
1972
+ get: $util.oneOfGetter(r = ["updateTime"]),
1973
+ set: $util.oneOfSetter(r)
1974
+ }), n.create = function(t) {
1975
+ return new n(t);
1976
+ }, n.encode = function(t, e) {
1977
+ return e || (e = $Writer.create()), t.type != null && Object.hasOwnProperty.call(t, "type") && e.uint32(
1818
1978
  /* id 1, wireType 0 =*/
1819
1979
  8
1820
- ).int32(e.type), e.isEnable != null && Object.hasOwnProperty.call(e, "isEnable") && t.uint32(
1980
+ ).int32(t.type), t.isEnable != null && Object.hasOwnProperty.call(t, "isEnable") && e.uint32(
1821
1981
  /* id 2, wireType 0 =*/
1822
1982
  16
1823
- ).bool(e.isEnable), e.isMute != null && Object.hasOwnProperty.call(e, "isMute") && t.uint32(
1983
+ ).bool(t.isEnable), t.isMute != null && Object.hasOwnProperty.call(t, "isMute") && e.uint32(
1824
1984
  /* id 3, wireType 0 =*/
1825
1985
  24
1826
- ).bool(e.isMute), e.volume != null && Object.hasOwnProperty.call(e, "volume") && t.uint32(
1986
+ ).bool(t.isMute), t.volume != null && Object.hasOwnProperty.call(t, "volume") && e.uint32(
1827
1987
  /* id 4, wireType 1 =*/
1828
1988
  33
1829
- ).double(e.volume), e.updateTime != null && Object.hasOwnProperty.call(e, "updateTime") && t.uint32(
1989
+ ).double(t.volume), t.updateTime != null && Object.hasOwnProperty.call(t, "updateTime") && e.uint32(
1830
1990
  /* id 5, wireType 0 =*/
1831
1991
  40
1832
- ).int64(e.updateTime), t;
1833
- }, r.encodeDelimited = function(e, t) {
1834
- return this.encode(e, t).ldelim();
1835
- }, r.decode = function(e, t, s) {
1836
- e instanceof $Reader || (e = $Reader.create(e));
1837
- let l = t === void 0 ? e.len : e.pos + t, a = new $root.com.quick.voice.proto.AudioInfo();
1838
- for (; e.pos < l; ) {
1839
- let d = e.uint32();
1992
+ ).int64(t.updateTime), e;
1993
+ }, n.encodeDelimited = function(t, e) {
1994
+ return this.encode(t, e).ldelim();
1995
+ }, n.decode = function(t, e, s) {
1996
+ t instanceof $Reader || (t = $Reader.create(t));
1997
+ let l = e === void 0 ? t.len : t.pos + e, c = new $root.com.quick.voice.proto.AudioInfo();
1998
+ for (; t.pos < l; ) {
1999
+ let d = t.uint32();
1840
2000
  if (d === s) break;
1841
2001
  switch (d >>> 3) {
1842
2002
  case 1: {
1843
- a.type = e.int32();
2003
+ c.type = t.int32();
1844
2004
  break;
1845
2005
  }
1846
2006
  case 2: {
1847
- a.isEnable = e.bool();
2007
+ c.isEnable = t.bool();
1848
2008
  break;
1849
2009
  }
1850
2010
  case 3: {
1851
- a.isMute = e.bool();
2011
+ c.isMute = t.bool();
1852
2012
  break;
1853
2013
  }
1854
2014
  case 4: {
1855
- a.volume = e.double();
2015
+ c.volume = t.double();
1856
2016
  break;
1857
2017
  }
1858
2018
  case 5: {
1859
- a.updateTime = e.int64();
2019
+ c.updateTime = t.int64();
1860
2020
  break;
1861
2021
  }
1862
2022
  default:
1863
- e.skipType(d & 7);
2023
+ t.skipType(d & 7);
1864
2024
  break;
1865
2025
  }
1866
2026
  }
1867
- return a;
1868
- }, r.decodeDelimited = function(e) {
1869
- return e instanceof $Reader || (e = new $Reader(e)), this.decode(e, e.uint32());
1870
- }, r.verify = function(e) {
1871
- if (typeof e != "object" || e === null) return "object expected";
1872
- if (e.type != null && e.hasOwnProperty("type"))
1873
- switch (e.type) {
2027
+ return c;
2028
+ }, n.decodeDelimited = function(t) {
2029
+ return t instanceof $Reader || (t = new $Reader(t)), this.decode(t, t.uint32());
2030
+ }, n.verify = function(t) {
2031
+ if (typeof t != "object" || t === null) return "object expected";
2032
+ if (t.type != null && t.hasOwnProperty("type"))
2033
+ switch (t.type) {
1874
2034
  default:
1875
2035
  return "type: enum value expected";
1876
2036
  case 0:
1877
2037
  case 1:
1878
2038
  break;
1879
2039
  }
1880
- return e.isEnable != null && e.hasOwnProperty("isEnable") && typeof e.isEnable != "boolean" ? "isEnable: boolean expected" : e.isMute != null && e.hasOwnProperty("isMute") && typeof e.isMute != "boolean" ? "isMute: boolean expected" : e.volume != null && e.hasOwnProperty("volume") && typeof e.volume != "number" ? "volume: number expected" : e.updateTime != null && e.hasOwnProperty("updateTime") && !$util.isInteger(e.updateTime) && !(e.updateTime && $util.isInteger(e.updateTime.low) && $util.isInteger(e.updateTime.high)) ? "updateTime: integer|Long expected" : null;
1881
- }, r.fromObject = function(e) {
1882
- if (e instanceof $root.com.quick.voice.proto.AudioInfo) return e;
1883
- let t = new $root.com.quick.voice.proto.AudioInfo();
1884
- switch (e.type) {
2040
+ return t.isEnable != null && t.hasOwnProperty("isEnable") && typeof t.isEnable != "boolean" ? "isEnable: boolean expected" : t.isMute != null && t.hasOwnProperty("isMute") && typeof t.isMute != "boolean" ? "isMute: boolean expected" : t.volume != null && t.hasOwnProperty("volume") && typeof t.volume != "number" ? "volume: number expected" : t.updateTime != null && t.hasOwnProperty("updateTime") && !$util.isInteger(t.updateTime) && !(t.updateTime && $util.isInteger(t.updateTime.low) && $util.isInteger(t.updateTime.high)) ? "updateTime: integer|Long expected" : null;
2041
+ }, n.fromObject = function(t) {
2042
+ if (t instanceof $root.com.quick.voice.proto.AudioInfo) return t;
2043
+ let e = new $root.com.quick.voice.proto.AudioInfo();
2044
+ switch (t.type) {
1885
2045
  default:
1886
- if (typeof e.type == "number") {
1887
- t.type = e.type;
2046
+ if (typeof t.type == "number") {
2047
+ e.type = t.type;
1888
2048
  break;
1889
2049
  }
1890
2050
  break;
1891
2051
  case "Microphone":
1892
2052
  case 0:
1893
- t.type = 0;
2053
+ e.type = 0;
1894
2054
  break;
1895
2055
  case "SystemVoice":
1896
2056
  case 1:
1897
- t.type = 1;
2057
+ e.type = 1;
1898
2058
  break;
1899
2059
  }
1900
- return e.isEnable != null && (t.isEnable = !!e.isEnable), e.isMute != null && (t.isMute = !!e.isMute), e.volume != null && (t.volume = Number(e.volume)), e.updateTime != null && ($util.Long ? (t.updateTime = $util.Long.fromValue(e.updateTime)).unsigned = !1 : typeof e.updateTime == "string" ? t.updateTime = parseInt(e.updateTime, 10) : typeof e.updateTime == "number" ? t.updateTime = e.updateTime : typeof e.updateTime == "object" && (t.updateTime = new $util.LongBits(e.updateTime.low >>> 0, e.updateTime.high >>> 0).toNumber())), t;
1901
- }, r.toObject = function(e, t) {
1902
- t || (t = {});
2060
+ return t.isEnable != null && (e.isEnable = !!t.isEnable), t.isMute != null && (e.isMute = !!t.isMute), t.volume != null && (e.volume = Number(t.volume)), t.updateTime != null && ($util.Long ? (e.updateTime = $util.Long.fromValue(t.updateTime)).unsigned = !1 : typeof t.updateTime == "string" ? e.updateTime = parseInt(t.updateTime, 10) : typeof t.updateTime == "number" ? e.updateTime = t.updateTime : typeof t.updateTime == "object" && (e.updateTime = new $util.LongBits(t.updateTime.low >>> 0, t.updateTime.high >>> 0).toNumber())), e;
2061
+ }, n.toObject = function(t, e) {
2062
+ e || (e = {});
1903
2063
  let s = {};
1904
- return t.defaults && (s.type = t.enums === String ? "Microphone" : 0, s.isEnable = !1, s.isMute = !1, s.volume = 0), e.type != null && e.hasOwnProperty("type") && (s.type = t.enums === String ? $root.com.quick.voice.proto.AudioType[e.type] === void 0 ? e.type : $root.com.quick.voice.proto.AudioType[e.type] : e.type), e.isEnable != null && e.hasOwnProperty("isEnable") && (s.isEnable = e.isEnable), e.isMute != null && e.hasOwnProperty("isMute") && (s.isMute = e.isMute), e.volume != null && e.hasOwnProperty("volume") && (s.volume = t.json && !isFinite(e.volume) ? String(e.volume) : e.volume), e.updateTime != null && e.hasOwnProperty("updateTime") && (typeof e.updateTime == "number" ? s.updateTime = t.longs === String ? String(e.updateTime) : e.updateTime : s.updateTime = t.longs === String ? $util.Long.prototype.toString.call(e.updateTime) : t.longs === Number ? new $util.LongBits(e.updateTime.low >>> 0, e.updateTime.high >>> 0).toNumber() : e.updateTime, t.oneofs && (s._updateTime = "updateTime")), s;
1905
- }, r.prototype.toJSON = function() {
2064
+ return e.defaults && (s.type = e.enums === String ? "Microphone" : 0, s.isEnable = !1, s.isMute = !1, s.volume = 0), t.type != null && t.hasOwnProperty("type") && (s.type = e.enums === String ? $root.com.quick.voice.proto.AudioType[t.type] === void 0 ? t.type : $root.com.quick.voice.proto.AudioType[t.type] : t.type), t.isEnable != null && t.hasOwnProperty("isEnable") && (s.isEnable = t.isEnable), t.isMute != null && t.hasOwnProperty("isMute") && (s.isMute = t.isMute), t.volume != null && t.hasOwnProperty("volume") && (s.volume = e.json && !isFinite(t.volume) ? String(t.volume) : t.volume), t.updateTime != null && t.hasOwnProperty("updateTime") && (typeof t.updateTime == "number" ? s.updateTime = e.longs === String ? String(t.updateTime) : t.updateTime : s.updateTime = e.longs === String ? $util.Long.prototype.toString.call(t.updateTime) : e.longs === Number ? new $util.LongBits(t.updateTime.low >>> 0, t.updateTime.high >>> 0).toNumber() : t.updateTime, e.oneofs && (s._updateTime = "updateTime")), s;
2065
+ }, n.prototype.toJSON = function() {
1906
2066
  return this.constructor.toObject(this, minimalExports.util.toJSONOptions);
1907
- }, r.getTypeUrl = function(e) {
1908
- return e === void 0 && (e = "type.googleapis.com"), e + "/com.quick.voice.proto.AudioInfo";
1909
- }, r;
1910
- }(), c.VideoInfo = function() {
1911
- function r(i) {
1912
- if (i) for (let e = Object.keys(i), t = 0; t < e.length; ++t) i[e[t]] != null && (this[e[t]] = i[e[t]]);
2067
+ }, n.getTypeUrl = function(t) {
2068
+ return t === void 0 && (t = "type.googleapis.com"), t + "/com.quick.voice.proto.AudioInfo";
2069
+ }, n;
2070
+ }(), u.VideoInfo = function() {
2071
+ function n(i) {
2072
+ if (i) for (let t = Object.keys(i), e = 0; e < t.length; ++e) i[t[e]] != null && (this[t[e]] = i[t[e]]);
1913
2073
  }
1914
- r.prototype.type = 0, r.prototype.isEnable = !1, r.prototype.isMute = !1, r.prototype.width = 0, r.prototype.height = 0, r.prototype.x = 0, r.prototype.y = 0, r.prototype.updateTime = null;
1915
- let n;
1916
- return Object.defineProperty(r.prototype, "_updateTime", {
1917
- get: $util.oneOfGetter(n = ["updateTime"]),
1918
- set: $util.oneOfSetter(n)
1919
- }), r.create = function(e) {
1920
- return new r(e);
1921
- }, r.encode = function(e, t) {
1922
- return t || (t = $Writer.create()), e.type != null && Object.hasOwnProperty.call(e, "type") && t.uint32(
2074
+ n.prototype.type = 0, n.prototype.isEnable = !1, n.prototype.isMute = !1, n.prototype.width = 0, n.prototype.height = 0, n.prototype.x = 0, n.prototype.y = 0, n.prototype.updateTime = null;
2075
+ let r;
2076
+ return Object.defineProperty(n.prototype, "_updateTime", {
2077
+ get: $util.oneOfGetter(r = ["updateTime"]),
2078
+ set: $util.oneOfSetter(r)
2079
+ }), n.create = function(t) {
2080
+ return new n(t);
2081
+ }, n.encode = function(t, e) {
2082
+ return e || (e = $Writer.create()), t.type != null && Object.hasOwnProperty.call(t, "type") && e.uint32(
1923
2083
  /* id 1, wireType 0 =*/
1924
2084
  8
1925
- ).int32(e.type), e.isEnable != null && Object.hasOwnProperty.call(e, "isEnable") && t.uint32(
2085
+ ).int32(t.type), t.isEnable != null && Object.hasOwnProperty.call(t, "isEnable") && e.uint32(
1926
2086
  /* id 2, wireType 0 =*/
1927
2087
  16
1928
- ).bool(e.isEnable), e.isMute != null && Object.hasOwnProperty.call(e, "isMute") && t.uint32(
2088
+ ).bool(t.isEnable), t.isMute != null && Object.hasOwnProperty.call(t, "isMute") && e.uint32(
1929
2089
  /* id 3, wireType 0 =*/
1930
2090
  24
1931
- ).bool(e.isMute), e.width != null && Object.hasOwnProperty.call(e, "width") && t.uint32(
2091
+ ).bool(t.isMute), t.width != null && Object.hasOwnProperty.call(t, "width") && e.uint32(
1932
2092
  /* id 4, wireType 0 =*/
1933
2093
  32
1934
- ).int32(e.width), e.height != null && Object.hasOwnProperty.call(e, "height") && t.uint32(
2094
+ ).int32(t.width), t.height != null && Object.hasOwnProperty.call(t, "height") && e.uint32(
1935
2095
  /* id 5, wireType 0 =*/
1936
2096
  40
1937
- ).int32(e.height), e.x != null && Object.hasOwnProperty.call(e, "x") && t.uint32(
2097
+ ).int32(t.height), t.x != null && Object.hasOwnProperty.call(t, "x") && e.uint32(
1938
2098
  /* id 6, wireType 0 =*/
1939
2099
  48
1940
- ).int32(e.x), e.y != null && Object.hasOwnProperty.call(e, "y") && t.uint32(
2100
+ ).int32(t.x), t.y != null && Object.hasOwnProperty.call(t, "y") && e.uint32(
1941
2101
  /* id 7, wireType 0 =*/
1942
2102
  56
1943
- ).int32(e.y), e.updateTime != null && Object.hasOwnProperty.call(e, "updateTime") && t.uint32(
2103
+ ).int32(t.y), t.updateTime != null && Object.hasOwnProperty.call(t, "updateTime") && e.uint32(
1944
2104
  /* id 8, wireType 0 =*/
1945
2105
  64
1946
- ).int64(e.updateTime), t;
1947
- }, r.encodeDelimited = function(e, t) {
1948
- return this.encode(e, t).ldelim();
1949
- }, r.decode = function(e, t, s) {
1950
- e instanceof $Reader || (e = $Reader.create(e));
1951
- let l = t === void 0 ? e.len : e.pos + t, a = new $root.com.quick.voice.proto.VideoInfo();
1952
- for (; e.pos < l; ) {
1953
- let d = e.uint32();
2106
+ ).int64(t.updateTime), e;
2107
+ }, n.encodeDelimited = function(t, e) {
2108
+ return this.encode(t, e).ldelim();
2109
+ }, n.decode = function(t, e, s) {
2110
+ t instanceof $Reader || (t = $Reader.create(t));
2111
+ let l = e === void 0 ? t.len : t.pos + e, c = new $root.com.quick.voice.proto.VideoInfo();
2112
+ for (; t.pos < l; ) {
2113
+ let d = t.uint32();
1954
2114
  if (d === s) break;
1955
2115
  switch (d >>> 3) {
1956
2116
  case 1: {
1957
- a.type = e.int32();
2117
+ c.type = t.int32();
1958
2118
  break;
1959
2119
  }
1960
2120
  case 2: {
1961
- a.isEnable = e.bool();
2121
+ c.isEnable = t.bool();
1962
2122
  break;
1963
2123
  }
1964
2124
  case 3: {
1965
- a.isMute = e.bool();
2125
+ c.isMute = t.bool();
1966
2126
  break;
1967
2127
  }
1968
2128
  case 4: {
1969
- a.width = e.int32();
2129
+ c.width = t.int32();
1970
2130
  break;
1971
2131
  }
1972
2132
  case 5: {
1973
- a.height = e.int32();
2133
+ c.height = t.int32();
1974
2134
  break;
1975
2135
  }
1976
2136
  case 6: {
1977
- a.x = e.int32();
2137
+ c.x = t.int32();
1978
2138
  break;
1979
2139
  }
1980
2140
  case 7: {
1981
- a.y = e.int32();
2141
+ c.y = t.int32();
1982
2142
  break;
1983
2143
  }
1984
2144
  case 8: {
1985
- a.updateTime = e.int64();
2145
+ c.updateTime = t.int64();
1986
2146
  break;
1987
2147
  }
1988
2148
  default:
1989
- e.skipType(d & 7);
2149
+ t.skipType(d & 7);
1990
2150
  break;
1991
2151
  }
1992
2152
  }
1993
- return a;
1994
- }, r.decodeDelimited = function(e) {
1995
- return e instanceof $Reader || (e = new $Reader(e)), this.decode(e, e.uint32());
1996
- }, r.verify = function(e) {
1997
- if (typeof e != "object" || e === null) return "object expected";
1998
- if (e.type != null && e.hasOwnProperty("type"))
1999
- switch (e.type) {
2153
+ return c;
2154
+ }, n.decodeDelimited = function(t) {
2155
+ return t instanceof $Reader || (t = new $Reader(t)), this.decode(t, t.uint32());
2156
+ }, n.verify = function(t) {
2157
+ if (typeof t != "object" || t === null) return "object expected";
2158
+ if (t.type != null && t.hasOwnProperty("type"))
2159
+ switch (t.type) {
2000
2160
  default:
2001
2161
  return "type: enum value expected";
2002
2162
  case 0:
2003
2163
  case 1:
2004
2164
  break;
2005
2165
  }
2006
- return e.isEnable != null && e.hasOwnProperty("isEnable") && typeof e.isEnable != "boolean" ? "isEnable: boolean expected" : e.isMute != null && e.hasOwnProperty("isMute") && typeof e.isMute != "boolean" ? "isMute: boolean expected" : e.width != null && e.hasOwnProperty("width") && !$util.isInteger(e.width) ? "width: integer expected" : e.height != null && e.hasOwnProperty("height") && !$util.isInteger(e.height) ? "height: integer expected" : e.x != null && e.hasOwnProperty("x") && !$util.isInteger(e.x) ? "x: integer expected" : e.y != null && e.hasOwnProperty("y") && !$util.isInteger(e.y) ? "y: integer expected" : e.updateTime != null && e.hasOwnProperty("updateTime") && !$util.isInteger(e.updateTime) && !(e.updateTime && $util.isInteger(e.updateTime.low) && $util.isInteger(e.updateTime.high)) ? "updateTime: integer|Long expected" : null;
2007
- }, r.fromObject = function(e) {
2008
- if (e instanceof $root.com.quick.voice.proto.VideoInfo) return e;
2009
- let t = new $root.com.quick.voice.proto.VideoInfo();
2010
- switch (e.type) {
2166
+ return t.isEnable != null && t.hasOwnProperty("isEnable") && typeof t.isEnable != "boolean" ? "isEnable: boolean expected" : t.isMute != null && t.hasOwnProperty("isMute") && typeof t.isMute != "boolean" ? "isMute: boolean expected" : t.width != null && t.hasOwnProperty("width") && !$util.isInteger(t.width) ? "width: integer expected" : t.height != null && t.hasOwnProperty("height") && !$util.isInteger(t.height) ? "height: integer expected" : t.x != null && t.hasOwnProperty("x") && !$util.isInteger(t.x) ? "x: integer expected" : t.y != null && t.hasOwnProperty("y") && !$util.isInteger(t.y) ? "y: integer expected" : t.updateTime != null && t.hasOwnProperty("updateTime") && !$util.isInteger(t.updateTime) && !(t.updateTime && $util.isInteger(t.updateTime.low) && $util.isInteger(t.updateTime.high)) ? "updateTime: integer|Long expected" : null;
2167
+ }, n.fromObject = function(t) {
2168
+ if (t instanceof $root.com.quick.voice.proto.VideoInfo) return t;
2169
+ let e = new $root.com.quick.voice.proto.VideoInfo();
2170
+ switch (t.type) {
2011
2171
  default:
2012
- if (typeof e.type == "number") {
2013
- t.type = e.type;
2172
+ if (typeof t.type == "number") {
2173
+ e.type = t.type;
2014
2174
  break;
2015
2175
  }
2016
2176
  break;
2017
2177
  case "Camera":
2018
2178
  case 0:
2019
- t.type = 0;
2179
+ e.type = 0;
2020
2180
  break;
2021
2181
  case "Screen":
2022
2182
  case 1:
2023
- t.type = 1;
2183
+ e.type = 1;
2024
2184
  break;
2025
2185
  }
2026
- return e.isEnable != null && (t.isEnable = !!e.isEnable), e.isMute != null && (t.isMute = !!e.isMute), e.width != null && (t.width = e.width | 0), e.height != null && (t.height = e.height | 0), e.x != null && (t.x = e.x | 0), e.y != null && (t.y = e.y | 0), e.updateTime != null && ($util.Long ? (t.updateTime = $util.Long.fromValue(e.updateTime)).unsigned = !1 : typeof e.updateTime == "string" ? t.updateTime = parseInt(e.updateTime, 10) : typeof e.updateTime == "number" ? t.updateTime = e.updateTime : typeof e.updateTime == "object" && (t.updateTime = new $util.LongBits(e.updateTime.low >>> 0, e.updateTime.high >>> 0).toNumber())), t;
2027
- }, r.toObject = function(e, t) {
2028
- t || (t = {});
2186
+ return t.isEnable != null && (e.isEnable = !!t.isEnable), t.isMute != null && (e.isMute = !!t.isMute), t.width != null && (e.width = t.width | 0), t.height != null && (e.height = t.height | 0), t.x != null && (e.x = t.x | 0), t.y != null && (e.y = t.y | 0), t.updateTime != null && ($util.Long ? (e.updateTime = $util.Long.fromValue(t.updateTime)).unsigned = !1 : typeof t.updateTime == "string" ? e.updateTime = parseInt(t.updateTime, 10) : typeof t.updateTime == "number" ? e.updateTime = t.updateTime : typeof t.updateTime == "object" && (e.updateTime = new $util.LongBits(t.updateTime.low >>> 0, t.updateTime.high >>> 0).toNumber())), e;
2187
+ }, n.toObject = function(t, e) {
2188
+ e || (e = {});
2029
2189
  let s = {};
2030
- return t.defaults && (s.type = t.enums === String ? "Camera" : 0, s.isEnable = !1, s.isMute = !1, s.width = 0, s.height = 0, s.x = 0, s.y = 0), e.type != null && e.hasOwnProperty("type") && (s.type = t.enums === String ? $root.com.quick.voice.proto.VideoType[e.type] === void 0 ? e.type : $root.com.quick.voice.proto.VideoType[e.type] : e.type), e.isEnable != null && e.hasOwnProperty("isEnable") && (s.isEnable = e.isEnable), e.isMute != null && e.hasOwnProperty("isMute") && (s.isMute = e.isMute), e.width != null && e.hasOwnProperty("width") && (s.width = e.width), e.height != null && e.hasOwnProperty("height") && (s.height = e.height), e.x != null && e.hasOwnProperty("x") && (s.x = e.x), e.y != null && e.hasOwnProperty("y") && (s.y = e.y), e.updateTime != null && e.hasOwnProperty("updateTime") && (typeof e.updateTime == "number" ? s.updateTime = t.longs === String ? String(e.updateTime) : e.updateTime : s.updateTime = t.longs === String ? $util.Long.prototype.toString.call(e.updateTime) : t.longs === Number ? new $util.LongBits(e.updateTime.low >>> 0, e.updateTime.high >>> 0).toNumber() : e.updateTime, t.oneofs && (s._updateTime = "updateTime")), s;
2031
- }, r.prototype.toJSON = function() {
2190
+ return e.defaults && (s.type = e.enums === String ? "Camera" : 0, s.isEnable = !1, s.isMute = !1, s.width = 0, s.height = 0, s.x = 0, s.y = 0), t.type != null && t.hasOwnProperty("type") && (s.type = e.enums === String ? $root.com.quick.voice.proto.VideoType[t.type] === void 0 ? t.type : $root.com.quick.voice.proto.VideoType[t.type] : t.type), t.isEnable != null && t.hasOwnProperty("isEnable") && (s.isEnable = t.isEnable), t.isMute != null && t.hasOwnProperty("isMute") && (s.isMute = t.isMute), t.width != null && t.hasOwnProperty("width") && (s.width = t.width), t.height != null && t.hasOwnProperty("height") && (s.height = t.height), t.x != null && t.hasOwnProperty("x") && (s.x = t.x), t.y != null && t.hasOwnProperty("y") && (s.y = t.y), t.updateTime != null && t.hasOwnProperty("updateTime") && (typeof t.updateTime == "number" ? s.updateTime = e.longs === String ? String(t.updateTime) : t.updateTime : s.updateTime = e.longs === String ? $util.Long.prototype.toString.call(t.updateTime) : e.longs === Number ? new $util.LongBits(t.updateTime.low >>> 0, t.updateTime.high >>> 0).toNumber() : t.updateTime, e.oneofs && (s._updateTime = "updateTime")), s;
2191
+ }, n.prototype.toJSON = function() {
2032
2192
  return this.constructor.toObject(this, minimalExports.util.toJSONOptions);
2033
- }, r.getTypeUrl = function(e) {
2034
- return e === void 0 && (e = "type.googleapis.com"), e + "/com.quick.voice.proto.VideoInfo";
2035
- }, r;
2036
- }(), c.CustomInfo = function() {
2037
- function r(i) {
2038
- if (this.customKeyMap = {}, i) for (let e = Object.keys(i), t = 0; t < e.length; ++t) i[e[t]] != null && (this[e[t]] = i[e[t]]);
2193
+ }, n.getTypeUrl = function(t) {
2194
+ return t === void 0 && (t = "type.googleapis.com"), t + "/com.quick.voice.proto.VideoInfo";
2195
+ }, n;
2196
+ }(), u.CustomInfo = function() {
2197
+ function n(i) {
2198
+ if (this.customKeyMap = {}, i) for (let t = Object.keys(i), e = 0; e < t.length; ++e) i[t[e]] != null && (this[t[e]] = i[t[e]]);
2039
2199
  }
2040
- r.prototype.roomId = "", r.prototype.customKeyMap = $util.emptyObject, r.prototype.updateTime = null;
2041
- let n;
2042
- return Object.defineProperty(r.prototype, "_updateTime", {
2043
- get: $util.oneOfGetter(n = ["updateTime"]),
2044
- set: $util.oneOfSetter(n)
2045
- }), r.create = function(e) {
2046
- return new r(e);
2047
- }, r.encode = function(e, t) {
2048
- if (t || (t = $Writer.create()), e.roomId != null && Object.hasOwnProperty.call(e, "roomId") && t.uint32(
2200
+ n.prototype.roomId = "", n.prototype.customKeyMap = $util.emptyObject, n.prototype.updateTime = null;
2201
+ let r;
2202
+ return Object.defineProperty(n.prototype, "_updateTime", {
2203
+ get: $util.oneOfGetter(r = ["updateTime"]),
2204
+ set: $util.oneOfSetter(r)
2205
+ }), n.create = function(t) {
2206
+ return new n(t);
2207
+ }, n.encode = function(t, e) {
2208
+ if (e || (e = $Writer.create()), t.roomId != null && Object.hasOwnProperty.call(t, "roomId") && e.uint32(
2049
2209
  /* id 1, wireType 2 =*/
2050
2210
  10
2051
- ).string(e.roomId), e.customKeyMap != null && Object.hasOwnProperty.call(e, "customKeyMap")) for (let s = Object.keys(e.customKeyMap), l = 0; l < s.length; ++l) t.uint32(
2211
+ ).string(t.roomId), t.customKeyMap != null && Object.hasOwnProperty.call(t, "customKeyMap")) for (let s = Object.keys(t.customKeyMap), l = 0; l < s.length; ++l) e.uint32(
2052
2212
  /* id 2, wireType 2 =*/
2053
2213
  18
2054
2214
  ).fork().uint32(
@@ -2057,102 +2217,102 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2057
2217
  ).string(s[l]).uint32(
2058
2218
  /* id 2, wireType 2 =*/
2059
2219
  18
2060
- ).string(e.customKeyMap[s[l]]).ldelim();
2061
- return e.updateTime != null && Object.hasOwnProperty.call(e, "updateTime") && t.uint32(
2220
+ ).string(t.customKeyMap[s[l]]).ldelim();
2221
+ return t.updateTime != null && Object.hasOwnProperty.call(t, "updateTime") && e.uint32(
2062
2222
  /* id 3, wireType 0 =*/
2063
2223
  24
2064
- ).int64(e.updateTime), t;
2065
- }, r.encodeDelimited = function(e, t) {
2066
- return this.encode(e, t).ldelim();
2067
- }, r.decode = function(e, t, s) {
2068
- e instanceof $Reader || (e = $Reader.create(e));
2069
- let l = t === void 0 ? e.len : e.pos + t, a = new $root.com.quick.voice.proto.CustomInfo(), d, y;
2070
- for (; e.pos < l; ) {
2071
- let p = e.uint32();
2072
- if (p === s) break;
2073
- switch (p >>> 3) {
2224
+ ).int64(t.updateTime), e;
2225
+ }, n.encodeDelimited = function(t, e) {
2226
+ return this.encode(t, e).ldelim();
2227
+ }, n.decode = function(t, e, s) {
2228
+ t instanceof $Reader || (t = $Reader.create(t));
2229
+ let l = e === void 0 ? t.len : t.pos + e, c = new $root.com.quick.voice.proto.CustomInfo(), d, p;
2230
+ for (; t.pos < l; ) {
2231
+ let f = t.uint32();
2232
+ if (f === s) break;
2233
+ switch (f >>> 3) {
2074
2234
  case 1: {
2075
- a.roomId = e.string();
2235
+ c.roomId = t.string();
2076
2236
  break;
2077
2237
  }
2078
2238
  case 2: {
2079
- a.customKeyMap === $util.emptyObject && (a.customKeyMap = {});
2080
- let w = e.uint32() + e.pos;
2081
- for (d = "", y = ""; e.pos < w; ) {
2082
- let v = e.uint32();
2083
- switch (v >>> 3) {
2239
+ c.customKeyMap === $util.emptyObject && (c.customKeyMap = {});
2240
+ let w = t.uint32() + t.pos;
2241
+ for (d = "", p = ""; t.pos < w; ) {
2242
+ let b = t.uint32();
2243
+ switch (b >>> 3) {
2084
2244
  case 1:
2085
- d = e.string();
2245
+ d = t.string();
2086
2246
  break;
2087
2247
  case 2:
2088
- y = e.string();
2248
+ p = t.string();
2089
2249
  break;
2090
2250
  default:
2091
- e.skipType(v & 7);
2251
+ t.skipType(b & 7);
2092
2252
  break;
2093
2253
  }
2094
2254
  }
2095
- a.customKeyMap[d] = y;
2255
+ c.customKeyMap[d] = p;
2096
2256
  break;
2097
2257
  }
2098
2258
  case 3: {
2099
- a.updateTime = e.int64();
2259
+ c.updateTime = t.int64();
2100
2260
  break;
2101
2261
  }
2102
2262
  default:
2103
- e.skipType(p & 7);
2263
+ t.skipType(f & 7);
2104
2264
  break;
2105
2265
  }
2106
2266
  }
2107
- return a;
2108
- }, r.decodeDelimited = function(e) {
2109
- return e instanceof $Reader || (e = new $Reader(e)), this.decode(e, e.uint32());
2110
- }, r.verify = function(e) {
2111
- if (typeof e != "object" || e === null) return "object expected";
2112
- if (e.roomId != null && e.hasOwnProperty("roomId") && !$util.isString(e.roomId)) return "roomId: string expected";
2113
- if (e.customKeyMap != null && e.hasOwnProperty("customKeyMap")) {
2114
- if (!$util.isObject(e.customKeyMap)) return "customKeyMap: object expected";
2115
- let t = Object.keys(e.customKeyMap);
2116
- for (let s = 0; s < t.length; ++s) if (!$util.isString(e.customKeyMap[t[s]])) return "customKeyMap: string{k:string} expected";
2267
+ return c;
2268
+ }, n.decodeDelimited = function(t) {
2269
+ return t instanceof $Reader || (t = new $Reader(t)), this.decode(t, t.uint32());
2270
+ }, n.verify = function(t) {
2271
+ if (typeof t != "object" || t === null) return "object expected";
2272
+ if (t.roomId != null && t.hasOwnProperty("roomId") && !$util.isString(t.roomId)) return "roomId: string expected";
2273
+ if (t.customKeyMap != null && t.hasOwnProperty("customKeyMap")) {
2274
+ if (!$util.isObject(t.customKeyMap)) return "customKeyMap: object expected";
2275
+ let e = Object.keys(t.customKeyMap);
2276
+ for (let s = 0; s < e.length; ++s) if (!$util.isString(t.customKeyMap[e[s]])) return "customKeyMap: string{k:string} expected";
2117
2277
  }
2118
- return e.updateTime != null && e.hasOwnProperty("updateTime") && !$util.isInteger(e.updateTime) && !(e.updateTime && $util.isInteger(e.updateTime.low) && $util.isInteger(e.updateTime.high)) ? "updateTime: integer|Long expected" : null;
2119
- }, r.fromObject = function(e) {
2120
- if (e instanceof $root.com.quick.voice.proto.CustomInfo) return e;
2121
- let t = new $root.com.quick.voice.proto.CustomInfo();
2122
- if (e.roomId != null && (t.roomId = String(e.roomId)), e.customKeyMap) {
2123
- if (typeof e.customKeyMap != "object") throw TypeError(".com.quick.voice.proto.CustomInfo.customKeyMap: object expected");
2124
- t.customKeyMap = {};
2125
- for (let s = Object.keys(e.customKeyMap), l = 0; l < s.length; ++l) t.customKeyMap[s[l]] = String(e.customKeyMap[s[l]]);
2278
+ return t.updateTime != null && t.hasOwnProperty("updateTime") && !$util.isInteger(t.updateTime) && !(t.updateTime && $util.isInteger(t.updateTime.low) && $util.isInteger(t.updateTime.high)) ? "updateTime: integer|Long expected" : null;
2279
+ }, n.fromObject = function(t) {
2280
+ if (t instanceof $root.com.quick.voice.proto.CustomInfo) return t;
2281
+ let e = new $root.com.quick.voice.proto.CustomInfo();
2282
+ if (t.roomId != null && (e.roomId = String(t.roomId)), t.customKeyMap) {
2283
+ if (typeof t.customKeyMap != "object") throw TypeError(".com.quick.voice.proto.CustomInfo.customKeyMap: object expected");
2284
+ e.customKeyMap = {};
2285
+ for (let s = Object.keys(t.customKeyMap), l = 0; l < s.length; ++l) e.customKeyMap[s[l]] = String(t.customKeyMap[s[l]]);
2126
2286
  }
2127
- return e.updateTime != null && ($util.Long ? (t.updateTime = $util.Long.fromValue(e.updateTime)).unsigned = !1 : typeof e.updateTime == "string" ? t.updateTime = parseInt(e.updateTime, 10) : typeof e.updateTime == "number" ? t.updateTime = e.updateTime : typeof e.updateTime == "object" && (t.updateTime = new $util.LongBits(e.updateTime.low >>> 0, e.updateTime.high >>> 0).toNumber())), t;
2128
- }, r.toObject = function(e, t) {
2129
- t || (t = {});
2287
+ return t.updateTime != null && ($util.Long ? (e.updateTime = $util.Long.fromValue(t.updateTime)).unsigned = !1 : typeof t.updateTime == "string" ? e.updateTime = parseInt(t.updateTime, 10) : typeof t.updateTime == "number" ? e.updateTime = t.updateTime : typeof t.updateTime == "object" && (e.updateTime = new $util.LongBits(t.updateTime.low >>> 0, t.updateTime.high >>> 0).toNumber())), e;
2288
+ }, n.toObject = function(t, e) {
2289
+ e || (e = {});
2130
2290
  let s = {};
2131
- (t.objects || t.defaults) && (s.customKeyMap = {}), t.defaults && (s.roomId = ""), e.roomId != null && e.hasOwnProperty("roomId") && (s.roomId = e.roomId);
2291
+ (e.objects || e.defaults) && (s.customKeyMap = {}), e.defaults && (s.roomId = ""), t.roomId != null && t.hasOwnProperty("roomId") && (s.roomId = t.roomId);
2132
2292
  let l;
2133
- if (e.customKeyMap && (l = Object.keys(e.customKeyMap)).length) {
2293
+ if (t.customKeyMap && (l = Object.keys(t.customKeyMap)).length) {
2134
2294
  s.customKeyMap = {};
2135
- for (let a = 0; a < l.length; ++a) s.customKeyMap[l[a]] = e.customKeyMap[l[a]];
2295
+ for (let c = 0; c < l.length; ++c) s.customKeyMap[l[c]] = t.customKeyMap[l[c]];
2136
2296
  }
2137
- return e.updateTime != null && e.hasOwnProperty("updateTime") && (typeof e.updateTime == "number" ? s.updateTime = t.longs === String ? String(e.updateTime) : e.updateTime : s.updateTime = t.longs === String ? $util.Long.prototype.toString.call(e.updateTime) : t.longs === Number ? new $util.LongBits(e.updateTime.low >>> 0, e.updateTime.high >>> 0).toNumber() : e.updateTime, t.oneofs && (s._updateTime = "updateTime")), s;
2138
- }, r.prototype.toJSON = function() {
2297
+ return t.updateTime != null && t.hasOwnProperty("updateTime") && (typeof t.updateTime == "number" ? s.updateTime = e.longs === String ? String(t.updateTime) : t.updateTime : s.updateTime = e.longs === String ? $util.Long.prototype.toString.call(t.updateTime) : e.longs === Number ? new $util.LongBits(t.updateTime.low >>> 0, t.updateTime.high >>> 0).toNumber() : t.updateTime, e.oneofs && (s._updateTime = "updateTime")), s;
2298
+ }, n.prototype.toJSON = function() {
2139
2299
  return this.constructor.toObject(this, minimalExports.util.toJSONOptions);
2140
- }, r.getTypeUrl = function(e) {
2141
- return e === void 0 && (e = "type.googleapis.com"), e + "/com.quick.voice.proto.CustomInfo";
2142
- }, r;
2143
- }(), c.LayoutType = function() {
2144
- const r = {}, n = Object.create(r);
2145
- return n[r[0] = "AudioAndVideo"] = 0, n[r[1] = "OnlyAudio"] = 1, n[r[2] = "OnlyVideo"] = 2, n;
2146
- }(), c.AudioType = function() {
2147
- const r = {}, n = Object.create(r);
2148
- return n[r[0] = "Microphone"] = 0, n[r[1] = "SystemVoice"] = 1, n;
2149
- }(), c.VideoType = function() {
2150
- const r = {}, n = Object.create(r);
2151
- return n[r[0] = "Camera"] = 0, n[r[1] = "Screen"] = 1, n;
2152
- }(), c;
2153
- }(), u;
2300
+ }, n.getTypeUrl = function(t) {
2301
+ return t === void 0 && (t = "type.googleapis.com"), t + "/com.quick.voice.proto.CustomInfo";
2302
+ }, n;
2303
+ }(), u.LayoutType = function() {
2304
+ const n = {}, r = Object.create(n);
2305
+ return r[n[0] = "AudioAndVideo"] = 0, r[n[1] = "OnlyAudio"] = 1, r[n[2] = "OnlyVideo"] = 2, r;
2306
+ }(), u.AudioType = function() {
2307
+ const n = {}, r = Object.create(n);
2308
+ return r[n[0] = "Microphone"] = 0, r[n[1] = "SystemVoice"] = 1, r;
2309
+ }(), u.VideoType = function() {
2310
+ const n = {}, r = Object.create(n);
2311
+ return r[n[0] = "Camera"] = 0, r[n[1] = "Screen"] = 1, r;
2312
+ }(), u;
2313
+ }(), a;
2154
2314
  }(), o;
2155
- }(), f;
2315
+ }(), h;
2156
2316
  })(), createAudioInfo = () => ({
2157
2317
  remove: !1,
2158
2318
  isEnable: !1,
@@ -2171,85 +2331,85 @@ const $Reader = minimalExports.Reader, $Writer = minimalExports.Writer, $util =
2171
2331
  });
2172
2332
  class RoomUser {
2173
2333
  constructor() {
2174
- b(this, "userId", "");
2175
- b(this, "mc_audio");
2334
+ m(this, "userId", "");
2335
+ m(this, "mc_audio");
2176
2336
  // 麦克风
2177
- b(this, "mc_video");
2337
+ m(this, "mc_video");
2178
2338
  // 摄像头
2179
- b(this, "ss_audio");
2339
+ m(this, "ss_audio");
2180
2340
  // 屏幕共享视频
2181
- b(this, "ss_video");
2341
+ m(this, "ss_video");
2182
2342
  // 屏幕共享音频
2183
- b(this, "updateTime", 0);
2184
- b(this, "getUpdateTimeKey", () => {
2343
+ m(this, "updateTime", 0);
2344
+ m(this, "getUpdateTimeKey", () => {
2185
2345
  const o = [];
2186
2346
  return this.mc_audio && o.push(this.mc_audio.updateTime), this.mc_video && o.push(this.mc_video.updateTime), this.ss_audio && o.push(this.ss_audio.updateTime), this.ss_video && o.push(this.ss_video.updateTime), o.join("_");
2187
2347
  });
2188
- b(this, "init", (o) => {
2189
- var e, t, s, l;
2190
- const { id: u, audios: c = [], videos: r = [] } = o;
2191
- this.userId = u;
2192
- const n = this.getUpdateTimeKey();
2348
+ m(this, "init", (o) => {
2349
+ var t, e, s, l;
2350
+ const { id: a, audios: u = [], videos: n = [] } = o;
2351
+ this.userId = a;
2352
+ const r = this.getUpdateTimeKey();
2193
2353
  this.mc_audio && (this.mc_audio.remove = !0), this.mc_video && (this.mc_video.remove = !0), this.ss_audio && (this.ss_audio.remove = !0), this.ss_video && (this.ss_video.remove = !0);
2194
- for (const a of c) {
2195
- const { type: d = 0, isEnable: y = !1, isMute: p = !1, updateTime: w, volume: v = 0 } = a;
2354
+ for (const c of u) {
2355
+ const { type: d = 0, isEnable: p = !1, isMute: f = !1, updateTime: w, volume: b = 0 } = c;
2196
2356
  switch (d) {
2197
2357
  case 0:
2198
2358
  {
2199
2359
  if (this.mc_audio || (this.mc_audio = createAudioInfo()), this.mc_audio.remove = !1, this.mc_audio.updateTime === w) break;
2200
- this.mc_audio.isEnable = !!y, this.mc_audio.isMute = !!p, this.mc_audio.updateTime = Number(w), this.mc_audio.volume = Number(v);
2360
+ this.mc_audio.isEnable = !!p, this.mc_audio.isMute = !!f, this.mc_audio.updateTime = Number(w), this.mc_audio.volume = Number(b);
2201
2361
  }
2202
2362
  break;
2203
2363
  case 1:
2204
2364
  {
2205
2365
  if (this.ss_audio || (this.ss_audio = createAudioInfo()), this.ss_audio.remove = !1, this.ss_audio.updateTime === w) break;
2206
- this.ss_audio.isEnable = !!y, this.ss_audio.isMute = !!p, this.ss_audio.updateTime = Number(w), this.ss_audio.volume = Number(v);
2366
+ this.ss_audio.isEnable = !!p, this.ss_audio.isMute = !!f, this.ss_audio.updateTime = Number(w), this.ss_audio.volume = Number(b);
2207
2367
  }
2208
2368
  break;
2209
2369
  }
2210
2370
  }
2211
- for (const a of r) {
2212
- const { type: d = 0, isEnable: y, isMute: p, updateTime: w, width: v, height: m, x: g, y: k } = a;
2371
+ for (const c of n) {
2372
+ const { type: d = 0, isEnable: p, isMute: f, updateTime: w, width: b, height: g, x: k, y: _ } = c;
2213
2373
  switch (d) {
2214
2374
  case 0:
2215
2375
  {
2216
2376
  if (this.mc_video || (this.mc_video = createVideoInfo()), this.mc_video.remove = !1, this.mc_video.updateTime === w) break;
2217
- this.mc_video.isEnable = !!y, this.mc_video.isMute = !!p, this.mc_video.updateTime = Number(w) || 0, this.mc_video.sx = g || 0, this.mc_video.sy = k || 0, this.mc_video.sw = v || 0, this.mc_video.sh = m || 0;
2377
+ this.mc_video.isEnable = !!p, this.mc_video.isMute = !!f, this.mc_video.updateTime = Number(w) || 0, this.mc_video.sx = k || 0, this.mc_video.sy = _ || 0, this.mc_video.sw = b || 0, this.mc_video.sh = g || 0;
2218
2378
  }
2219
2379
  break;
2220
2380
  case 1:
2221
2381
  {
2222
2382
  if (this.ss_video || (this.ss_video = createVideoInfo()), this.ss_video.remove = !1, this.ss_video.updateTime === w) break;
2223
- this.ss_video.isEnable = !!y, this.ss_video.isMute = !!p, this.ss_video.updateTime = Number(w) || 0, this.ss_video.sx = g || 0, this.ss_video.sy = k || 0, this.ss_video.sw = v || 0, this.ss_video.sh = m || 0;
2383
+ this.ss_video.isEnable = !!p, this.ss_video.isMute = !!f, this.ss_video.updateTime = Number(w) || 0, this.ss_video.sx = k || 0, this.ss_video.sy = _ || 0, this.ss_video.sw = b || 0, this.ss_video.sh = g || 0;
2224
2384
  }
2225
2385
  break;
2226
2386
  }
2227
2387
  }
2228
- (e = this.mc_audio) != null && e.remove && (this.mc_audio = void 0), (t = this.mc_video) != null && t.remove && (this.mc_video = void 0), (s = this.ss_audio) != null && s.remove && (this.ss_audio = void 0), (l = this.ss_video) != null && l.remove && (this.ss_video = void 0);
2388
+ (t = this.mc_audio) != null && t.remove && (this.mc_audio = void 0), (e = this.mc_video) != null && e.remove && (this.mc_video = void 0), (s = this.ss_audio) != null && s.remove && (this.ss_audio = void 0), (l = this.ss_video) != null && l.remove && (this.ss_video = void 0);
2229
2389
  const i = this.getUpdateTimeKey();
2230
- n !== i && (this.updateTime = (/* @__PURE__ */ new Date()).getTime());
2390
+ r !== i && (this.updateTime = (/* @__PURE__ */ new Date()).getTime());
2231
2391
  });
2232
- b(this, "destroy", () => {
2233
- var o, u;
2234
- (o = this.mc_video) != null && o.destroy && this.mc_video.destroy(), (u = this.ss_video) != null && u.destroy && this.ss_video.destroy(), this.mc_audio = void 0, this.mc_video = void 0, this.ss_audio = void 0, this.ss_video = void 0;
2392
+ m(this, "destroy", () => {
2393
+ var o, a;
2394
+ (o = this.mc_video) != null && o.destroy && this.mc_video.destroy(), (a = this.ss_video) != null && a.destroy && this.ss_video.destroy(), this.mc_audio = void 0, this.mc_video = void 0, this.ss_audio = void 0, this.ss_video = void 0;
2235
2395
  });
2236
2396
  }
2237
2397
  }
2238
- const parseSEI = (f) => {
2239
- let o = 0, u = 0;
2398
+ const parseSEI = (h) => {
2399
+ let o = 0, a = 0;
2240
2400
  for (; ; ) {
2241
- const r = f[o];
2242
- if (u = u + r, o = o + 1, r !== 255) break;
2401
+ const n = h[o];
2402
+ if (a = a + n, o = o + 1, n !== 255) break;
2243
2403
  }
2244
- let c = 0;
2404
+ let u = 0;
2245
2405
  for (; ; ) {
2246
- const r = f[o];
2247
- if (c = c + r, o = o + 1, r !== 255) break;
2406
+ const n = h[o];
2407
+ if (u = u + n, o = o + 1, n !== 255) break;
2248
2408
  }
2249
- if (u === 5) {
2250
- const r = f.slice(o, o + 16), i = Array.from(r, (p) => p.toString(16).padStart(2, "0")).join("");
2409
+ if (a === 5) {
2410
+ const n = h.slice(o, o + 16), i = Array.from(n, (f) => f.toString(16).padStart(2, "0")).join("");
2251
2411
  o = o + 16;
2252
- const e = c - 16, t = f.slice(o, o + e), s = com.quick.voice.proto.SeiData.decode(t), { event: l = 0 } = s, a = s.data;
2412
+ const t = u - 16, e = h.slice(o, o + t), s = com.quick.voice.proto.SeiData.decode(e), { event: l = 0 } = s, c = s.data;
2253
2413
  let d;
2254
2414
  switch (l) {
2255
2415
  case 0:
@@ -2259,65 +2419,68 @@ const parseSEI = (f) => {
2259
2419
  d = com.quick.voice.proto.CustomInfo.decode(s.data);
2260
2420
  break;
2261
2421
  }
2262
- return { uuid: i, ...s, event: l, data_remote: a, data: d };
2422
+ return { uuid: i, ...s, event: l, data_remote: c, data: d };
2263
2423
  }
2264
2424
  };
2265
2425
  class QuickVoPlayer {
2266
- constructor() {
2267
- b(this, "displayMode", "original");
2268
- b(this, "prPlayer", new be());
2269
- b(this, "dom");
2270
- b(this, "room", {
2426
+ constructor(o = {}) {
2427
+ m(this, "option", {
2428
+ debug: !1
2429
+ });
2430
+ m(this, "displayMode", "original");
2431
+ m(this, "prPlayer");
2432
+ m(this, "dom");
2433
+ m(this, "room", {
2271
2434
  roomId: "",
2272
2435
  updateTime: "",
2273
2436
  author: "",
2274
2437
  version: ""
2275
2438
  });
2276
- b(this, "usersMap", /* @__PURE__ */ new Map());
2277
- b(this, "on", {
2439
+ m(this, "usersMap", /* @__PURE__ */ new Map());
2440
+ m(this, "on", {
2278
2441
  users: (o) => {
2279
2442
  }
2280
2443
  });
2281
- b(this, "init", () => {
2444
+ m(this, "init", () => {
2282
2445
  this.prPlayer.init();
2283
2446
  });
2284
- b(this, "start", async (o) => (this.stop(), this.prPlayer.start(o)));
2285
- b(this, "stop", () => {
2447
+ m(this, "start", async (o) => (this.stop(), this.prPlayer.start(o)));
2448
+ m(this, "stop", () => {
2286
2449
  this.prPlayer.stop(), this.usersMap = /* @__PURE__ */ new Map(), this.room.roomId = "", this.room.author = "", this.room.updateTime = "", this.room.version = "";
2287
2450
  });
2288
- b(this, "setMute", (o) => {
2451
+ m(this, "setMute", (o) => {
2289
2452
  this.prPlayer.setMute(o);
2290
2453
  });
2291
- b(this, "getStream", () => this.prPlayer.getStream());
2292
- b(this, "getAllUseUpdateKey", () => {
2454
+ m(this, "getStream", () => this.prPlayer.getStream());
2455
+ m(this, "getAllUseUpdateKey", () => {
2293
2456
  const o = [...this.usersMap.values()];
2294
- return Array.from(o, (c) => c.updateTime).join("_");
2457
+ return Array.from(o, (u) => u.updateTime).join("_");
2295
2458
  });
2296
- b(this, "checkAndCreateUser", (o, u) => {
2297
- var c, r;
2459
+ m(this, "checkAndCreateUser", (o, a) => {
2460
+ var u, n;
2298
2461
  if (this.usersMap.has(o)) {
2299
- const n = this.usersMap.get(o);
2300
- if (n == null || n.init(u), n != null && n.mc_video) {
2301
- const { sx: i, sy: e, sw: t, sh: s } = n.mc_video;
2302
- (c = n == null ? void 0 : n.mc_video.worker) == null || c.setCut({ sx: i, sy: e, sw: t, sh: s });
2462
+ const r = this.usersMap.get(o);
2463
+ if (r == null || r.init(a), r != null && r.mc_video) {
2464
+ const { sx: i, sy: t, sw: e, sh: s } = r.mc_video;
2465
+ (u = r == null ? void 0 : r.mc_video.worker) == null || u.setCut({ sx: i, sy: t, sw: e, sh: s });
2303
2466
  }
2304
- if (n != null && n.ss_video) {
2305
- const { sx: i, sy: e, sw: t, sh: s } = n.ss_video;
2306
- (r = n == null ? void 0 : n.ss_video.worker) == null || r.setCut({ sx: i, sy: e, sw: t, sh: s });
2467
+ if (r != null && r.ss_video) {
2468
+ const { sx: i, sy: t, sw: e, sh: s } = r.ss_video;
2469
+ (n = r == null ? void 0 : r.ss_video.worker) == null || n.setCut({ sx: i, sy: t, sw: e, sh: s });
2307
2470
  }
2308
2471
  } else {
2309
- const n = new RoomUser();
2310
- if (this.usersMap.set(o, n), n.init(u), n) {
2311
- if (n.mc_video) {
2312
- const { sx: i, sy: e, sw: t, sh: s } = n.mc_video, l = `${n.userId}_mc_video`, { worker: a, stream: d, destroy: y } = this.prPlayer.cut.create(l, { sx: i, sy: e, sw: t, sh: s });
2313
- n.mc_video.worker = a, this.displayMode === "original" && a.setPause(!0), n.mc_video.stream = d, n.mc_video.destroy = () => {
2314
- y(), this.prPlayer.cut.remove(l), this.usersMap.delete(n.userId);
2472
+ const r = new RoomUser();
2473
+ if (this.usersMap.set(o, r), r.init(a), r) {
2474
+ if (r.mc_video) {
2475
+ const { sx: i, sy: t, sw: e, sh: s } = r.mc_video, l = `${r.userId}_mc_video`, { worker: c, stream: d, destroy: p } = this.prPlayer.cut.create(l, { sx: i, sy: t, sw: e, sh: s });
2476
+ r.mc_video.worker = c, this.displayMode === "original" && c.setPause(!0), r.mc_video.stream = d, r.mc_video.destroy = () => {
2477
+ p(), this.prPlayer.cut.remove(l), this.usersMap.delete(r.userId);
2315
2478
  };
2316
2479
  }
2317
- if (n.ss_video) {
2318
- const { sx: i, sy: e, sw: t, sh: s } = n.ss_video, l = `${n.userId}_ss_video`, { worker: a, stream: d, destroy: y } = this.prPlayer.cut.create(l, { sx: i, sy: e, sw: t, sh: s });
2319
- n.ss_video.worker = a, this.displayMode === "original" && a.setPause(!0), n.ss_video.stream = d, n.ss_video.destroy = () => {
2320
- y(), this.prPlayer.cut.remove(l), this.usersMap.delete(n.userId);
2480
+ if (r.ss_video) {
2481
+ const { sx: i, sy: t, sw: e, sh: s } = r.ss_video, l = `${r.userId}_ss_video`, { worker: c, stream: d, destroy: p } = this.prPlayer.cut.create(l, { sx: i, sy: t, sw: e, sh: s });
2482
+ r.ss_video.worker = c, this.displayMode === "original" && c.setPause(!0), r.ss_video.stream = d, r.ss_video.destroy = () => {
2483
+ p(), this.prPlayer.cut.remove(l), this.usersMap.delete(r.userId);
2321
2484
  };
2322
2485
  }
2323
2486
  }
@@ -2326,66 +2489,68 @@ class QuickVoPlayer {
2326
2489
  /**
2327
2490
  * 监听SEI信息
2328
2491
  */
2329
- b(this, "onSEI", (o) => {
2492
+ m(this, "onSEI", (o) => {
2330
2493
  try {
2331
- const u = parseSEI(o);
2332
- if (!u) return;
2333
- const { event: c, data: r } = u;
2334
- switch (c) {
2494
+ const a = parseSEI(o);
2495
+ if (!a) return;
2496
+ const { event: u, data: n } = a;
2497
+ switch (u) {
2335
2498
  case 0:
2336
2499
  {
2337
- const { roomId: n, userMap: i } = r;
2338
- if (n !== this.room.roomId) return;
2339
- const e = this.getAllUseUpdateKey(), t = Object.keys(i);
2500
+ const { roomId: r, userMap: i } = n;
2501
+ if (r !== this.room.roomId) return;
2502
+ const t = this.getAllUseUpdateKey(), e = Object.keys(i);
2340
2503
  {
2341
2504
  const l = [...this.usersMap.values()];
2342
- for (const a of l)
2343
- t.includes(a.userId) || a == null || a.destroy();
2505
+ for (const c of l)
2506
+ e.includes(c.userId) || c == null || c.destroy();
2344
2507
  }
2345
- for (const l of t) {
2346
- const a = i[l];
2347
- this.checkAndCreateUser(l, a);
2508
+ for (const l of e) {
2509
+ const c = i[l];
2510
+ this.checkAndCreateUser(l, c);
2348
2511
  }
2349
2512
  const s = this.getAllUseUpdateKey();
2350
- if (e !== s && this.on.users) {
2351
- const l = [...this.usersMap.values()], a = Array.from(l, ({ userId: d, mc_audio: y, mc_video: p, ss_audio: w, ss_video: v, updateTime: m }) => ({ userId: d, mc_audio: y, mc_video: p, ss_audio: w, ss_video: v, updateTime: m }));
2352
- this.on.users(a);
2513
+ if (t !== s && this.on.users) {
2514
+ const l = [...this.usersMap.values()], c = Array.from(l, ({ userId: d, mc_audio: p, mc_video: f, ss_audio: w, ss_video: b, updateTime: g }) => ({ userId: d, mc_audio: p, mc_video: f, ss_audio: w, ss_video: b, updateTime: g }));
2515
+ this.on.users(c);
2353
2516
  }
2354
2517
  }
2355
2518
  break;
2356
2519
  case 1:
2357
2520
  {
2358
- const { roomId: n, updateTime: i } = r, { author: e, version: t } = r.customKeyMap;
2359
- this.room.roomId = n, this.room.updateTime = i, this.room.author = e, this.room.version = t;
2521
+ const { roomId: r, updateTime: i } = n, { author: t, version: e } = n.customKeyMap;
2522
+ this.room.roomId = r, this.room.updateTime = i, this.room.author = t, this.room.version = e;
2360
2523
  }
2361
2524
  break;
2362
2525
  }
2363
- } catch (u) {
2364
- console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->onSEI: error", u);
2526
+ } catch (a) {
2527
+ console.log("\x1B[38;2;0;151;255m%c%s\x1B[0m", "color:#0097ff;", "------->onSEI: error", a);
2365
2528
  }
2366
2529
  });
2367
- b(this, "setDisplayMode", (o) => {
2368
- var u, c, r, n, i, e, t, s;
2530
+ m(this, "setDisplayMode", (o) => {
2531
+ var a, u, n, r, i, t, e, s;
2369
2532
  switch (this.displayMode = o, o) {
2370
2533
  case "original":
2371
2534
  {
2372
2535
  this.prPlayer.setPause(!1);
2373
2536
  const l = [...this.usersMap.values()];
2374
- for (const a of l)
2375
- (c = (u = a.mc_video) == null ? void 0 : u.worker) == null || c.setPause(!0), (n = (r = a.ss_video) == null ? void 0 : r.worker) == null || n.setPause(!0);
2537
+ for (const c of l)
2538
+ (u = (a = c.mc_video) == null ? void 0 : a.worker) == null || u.setPause(!0), (r = (n = c.ss_video) == null ? void 0 : n.worker) == null || r.setPause(!0);
2376
2539
  }
2377
2540
  break;
2378
2541
  case "cut":
2379
2542
  {
2380
2543
  this.prPlayer.setPause(!0);
2381
2544
  const l = [...this.usersMap.values()];
2382
- for (const a of l)
2383
- (e = (i = a.mc_video) == null ? void 0 : i.worker) == null || e.setPause(!1), (s = (t = a.ss_video) == null ? void 0 : t.worker) == null || s.setPause(!1);
2545
+ for (const c of l)
2546
+ (t = (i = c.mc_video) == null ? void 0 : i.worker) == null || t.setPause(!1), (s = (e = c.ss_video) == null ? void 0 : e.worker) == null || s.setPause(!1);
2384
2547
  }
2385
2548
  break;
2386
2549
  }
2387
2550
  });
2388
- this.prPlayer.on.demuxer.sei = this.onSEI;
2551
+ const { debug: a = !1 } = o;
2552
+ this.option.debug = a, this.prPlayer = new et({ debug: a }), this.prPlayer.on.demuxer.sei = this.onSEI, this.prPlayer.on.demuxer.chunk = (u) => {
2553
+ };
2389
2554
  }
2390
2555
  }
2391
2556
  export {