🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

protobufjs

Package Overview
Dependencies
Maintainers
3
Versions
217
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

protobufjs - npm Package Compare versions

Comparing version
8.6.2
to
8.6.3
+3
-3
dist/minimal/protobuf.min.js
/*!
* protobuf.js v8.6.2 (c) 2016, daniel wirtz
* compiled tue, 09 jun 2026 21:07:14 utc
* protobuf.js v8.6.3 (c) 2016, daniel wirtz
* compiled thu, 11 jun 2026 00:02:30 utc
* licensed under the bsd-3-clause license
* see: https://github.com/dcodeio/protobuf.js for details
*/
!function(p){"use strict";var r,u,n;r={1:[function(t,n,i){var r=i;function u(){r.util.t(),r.Writer.t(r.BufferWriter),r.Reader.t(r.BufferReader)}r.build="minimal",r.Writer=t(15),r.BufferWriter=t(16),r.Reader=t(2),r.BufferReader=t(3),r.util=t(12),r.rpc=t(5),r.roots=t(4),r.configure=u,u()},{12:12,15:15,16:16,2:2,3:3,4:4,5:5}],2:[function(t,n,i){n.exports=h;var r,u=t(12),e=u.LongBits,s=u.utf8;function o(t,n){return RangeError("index out of range: "+t.pos+" + "+(n||1)+" > "+t.len)}function h(t){this.buf=t,this.pos=0,this.len=t.length,this.discardUnknown=h.discardUnknown}function f(){return u.Buffer?function(t){return(h.create=function(t){return u.Buffer.isBuffer(t)?new r(t):c(t)})(t)}:c}var c="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new h(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new h(t);throw Error("illegal buffer")};function a(){var t=new e(0,0),n=0;if(!(4<this.len-this.pos)){for(;n<3;++n){if(this.pos>=this.len)throw o(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*n)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*n)>>>0,t}for(;n<4;++n)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*n)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(n=0,4<this.len-this.pos){for(;n<5;++n)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*n+3)>>>0,this.buf[this.pos++]<128)return t}else for(;n<5;++n){if(this.pos>=this.len)throw o(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*n+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function l(t,n){return(t[n-4]|t[n-3]<<8|t[n-2]<<16|t[n-1]<<24)>>>0}function v(){if(this.pos+8>this.len)throw o(this,8);return new e(l(this.buf,this.pos+=4),l(this.buf,this.pos+=4))}h.create=f(),h.prototype.n=u.Array.prototype.subarray||u.Array.prototype.slice,h.prototype.raw=function(t,n){return Array.isArray(this.buf)?this.buf.slice(t,n):t===n?new this.buf.constructor(0):this.n.call(this.buf,t,n)},h.prototype.uint32=function(){var t=this.buf,n=this.pos,i=(127&t[n])>>>0;if(t[n++]<128)return this.pos=n,i;if(i=(i|(127&t[n])<<7)>>>0,t[n++]<128)return this.pos=n,i;if(i=(i|(127&t[n])<<14)>>>0,t[n++]<128)return this.pos=n,i;if(i=(i|(127&t[n])<<21)>>>0,t[n++]<128)return this.pos=n,i;if(i=(i|(15&t[n])<<28)>>>0,t[n++]<128)return this.pos=n,i;for(var r=0;r<5;++r){if(n>=this.len)throw this.pos=n,o(this);if(t[n++]<128)return this.pos=n,i}throw this.pos=n,Error("invalid varint encoding")},h.prototype.tag=function(){var t=this.buf,n=this.pos,i=(127&t[n])>>>0;if(t[n++]<128)return this.pos=n,i;if(i=(i|(127&t[n])<<7)>>>0,t[n++]<128)return this.pos=n,i;if(i=(i|(127&t[n])<<14)>>>0,t[n++]<128)return this.pos=n,i;if(i=(i|(127&t[n])<<21)>>>0,t[n++]<128)return this.pos=n,i;if(i=(i|(15&t[n])<<28)>>>0,t[n]<128&&0==(112&t[n]))return this.pos=n+1,i;throw this.pos=n+1,Error("invalid tag encoding")},h.prototype.int32=function(){return 0|this.uint32()},h.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},h.prototype.bool=function(){for(var t,n=!1,i=0;i<10;++i){if(this.pos>=this.len)throw o(this);if(127&(t=this.buf[this.pos++])&&(n=!0),t<128)return n}throw Error("invalid varint encoding")},h.prototype.fixed32=function(){if(this.pos+4>this.len)throw o(this,4);return l(this.buf,this.pos+=4)},h.prototype.sfixed32=function(){if(this.pos+4>this.len)throw o(this,4);return 0|l(this.buf,this.pos+=4)},h.prototype.float=function(){if(this.pos+4>this.len)throw o(this,4);var t=u.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},h.prototype.double=function(){if(this.pos+8>this.len)throw o(this,4);var t=u.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},h.prototype.bytes=function(){var t=this.uint32(),n=this.pos,i=this.pos+t;if(i>this.len)throw o(this,t);return this.pos=i,this.raw(n,i)},h.prototype.string=function(){var t=this.uint32(),n=this.pos,i=this.pos+t;if(i>this.len)throw o(this,t);return this.pos=i,s.read(this.buf,n,i)},h.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw o(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw o(this)}while(128&this.buf[this.pos++]);return this},h.recursionLimit=u.recursionLimit,h.discardUnknown=!0,h.prototype.skipType=function(t,n,i){if(h.recursionLimit<(n=n===p?0:n))throw Error("max depth exceeded");if(0===i)throw Error("illegal tag: field number 0");switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){var r=this.tag(),u=r>>>3;if(!u)throw Error("illegal tag: field number 0");if(4===(t=7&r)){if(i!==p&&u!==i)throw Error("invalid end group tag");break}this.skipType(t,n+1,u)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},h.t=function(t){r=t,h.create=f(),r.t();var n=u.Long?"toLong":"toNumber";u.merge(h.prototype,{int64:function(){return a.call(this)[n](!1)},uint64:function(){return a.call(this)[n](!0)},sint64:function(){return a.call(this).zzDecode()[n](!1)},fixed64:function(){return v.call(this)[n](!0)},sfixed64:function(){return v.call(this)[n](!1)}})}},{12:12}],3:[function(t,n,i){n.exports=e;var r=t(2),u=((e.prototype=Object.create(r.prototype)).constructor=e,t(12));function e(t){r.call(this,t)}e.t=function(){u.Buffer&&(e.prototype.n=u.Buffer.prototype.slice)},e.prototype.raw=function(t,n){return t===n?u.Buffer.alloc(0):this.n.call(this.buf,t,n)},e.prototype.string=function(){var t=this.uint32(),n=this.pos,i=this.pos+t;if(i>this.len)throw RangeError("index out of range: "+this.pos+" + "+t+" > "+this.len);return this.pos=i,this.buf.utf8Slice?this.buf.utf8Slice(n,i):this.buf.toString("utf-8",n,i)},e.t()},{12:12,2:2}],4:[function(t,n,i){n.exports=Object.create(null)},{}],5:[function(t,n,i){i.Service=t(6)},{6:6}],6:[function(t,n,i){n.exports=r;var o=t(12);function r(t,n,i){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");o.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!n,this.responseDelimited=!!i}((r.prototype=Object.create(o.EventEmitter.prototype)).constructor=r).prototype.rpcCall=function t(i,n,r,u,e){if(!u)throw TypeError("request must be specified");var s=this;if(!e)return o.asPromise(t,s,i,n,r,u);if(!s.rpcImpl)return setTimeout(function(){e(Error("already ended"))},0),p;try{return s.rpcImpl(i,n[s.requestDelimited?"encodeDelimited":"encode"](u).finish(),function(t,n){if(t)return s.emit("error",t,i),e(t);if(null===n)return s.end(!0),p;if(!(n instanceof r))try{n=r[s.responseDelimited?"decodeDelimited":"decode"](n)}catch(t){return s.emit("error",t,i),e(t)}return s.emit("data",n,i),e(null,n)})}catch(t){return s.emit("error",t,i),setTimeout(function(){e(t)},0),p}},r.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{12:12}],7:[function(t,n,i){n.exports=function(t,n){var i=Array(arguments.length-1),e=0,r=2,s=!0;for(;r<arguments.length;)i[e++]=arguments[r++];return new Promise(function(r,u){i[e]=function(t){if(s)if(s=!1,t)u(t);else{for(var n=Array(arguments.length-1),i=0;i<n.length;)n[i++]=arguments[i];r.apply(null,n)}};try{t.apply(n||null,i)}catch(t){s&&(s=!1,u(t))}})}},{}],8:[function(t,n,i){i.length=function(t){var n=t.length;if(!n)return 0;for(;0<n&&"="==(t[0|n-1]||"");)--n;return Math.floor(3*n/4)};for(var f=Array(64),h=Array(123),r=0;r<64;)h[f[r]=r<26?r+65:r<52?r+71:r<62?r-4:r-59|43]=r++;h[45]=62,h[95]=63,i.encode=function(t,n,i){for(var r,u=null,e=[],s=0,o=0;n<i;){var h=t[n++];switch(o){case 0:e[s++]=f[h>>2],r=(3&h)<<4,o=1;break;case 1:e[s++]=f[r|h>>4],r=(15&h)<<2,o=2;break;case 2:e[s++]=f[r|h>>6],e[s++]=f[63&h],o=0}8191<s&&((u=u||[]).push(String.fromCharCode.apply(String,e)),s=0)}return o&&(e[s++]=f[r],e[s++]=61,1===o&&(e[s++]=61)),u?(s&&u.push(String.fromCharCode.apply(String,e.slice(0,s))),u.join("")):String.fromCharCode.apply(String,e.slice(0,s))};var c="invalid encoding",u=(i.decode=function(t,n,i){for(var r,u=i,e=0,s=0;s<t.length;){var o=t.charCodeAt(s++);if(61==o&&1<e)break;if((o=h[o])===p)throw Error(c);switch(e){case 0:r=o,e=1;break;case 1:n[i++]=r<<2|(48&o)>>4,r=o,e=2;break;case 2:n[i++]=(15&r)<<4|(60&o)>>2,r=o,e=3;break;case 3:n[i++]=(3&r)<<6|o,e=0}}if(1===e)throw Error(c);return i-u},/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/),e=/[-_]/,s=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2}(?:==)?|[A-Za-z0-9_-]{3}=?)?$/;i.test=function(t){return u.test(t)||e.test(t)&&s.test(t)}},{}],9:[function(t,n,i){function r(){this.i=Object.create(null)}(n.exports=r).prototype.on=function(t,n,i){return(this.i[t]||(this.i[t]=[])).push({fn:n,ctx:i||this}),this},r.prototype.off=function(t,n){if(t===p)this.i=Object.create(null);else if(n===p)this.i[t]=[];else{var i=this.i[t];if(!i)return this;for(var r=0;r<i.length;)i[r].fn===n?i.splice(r,1):++r}return this},r.prototype.emit=function(t){var n=this.i[t];if(n){for(var i=[],r=1;r<arguments.length;)i.push(arguments[r++]);for(r=0;r<n.length;)n[r].fn.apply(n[r++].ctx,i)}return this}},{}],10:[function(t,n,i){function r(t){function n(t,n,i,r){var u=n<0?1:0;t(0===(n=u?-n:n)?0<1/n?0:2147483648:isNaN(n)?2143289344:34028234663852886e22<n?(u<<31|2139095040)>>>0:n<11754943508222875e-54?(u<<31|Math.round(n/1401298464324817e-60))>>>0:(u<<31|127+(t=Math.floor(Math.log(n)/Math.LN2))<<23|8388607&Math.round(n*Math.pow(2,-t)*8388608))>>>0,i,r)}function i(t,n,i){t=t(n,i),n=2*(t>>31)+1,i=t>>>23&255,t&=8388607;return 255==i?t?NaN:1/0*n:0==i?1401298464324817e-60*n*t:n*Math.pow(2,i-150)*(8388608+t)}function r(t,n,i){o[0]=t,n[i]=h[0],n[i+1]=h[1],n[i+2]=h[2],n[i+3]=h[3]}function u(t,n,i){o[0]=t,n[i]=h[3],n[i+1]=h[2],n[i+2]=h[1],n[i+3]=h[0]}function e(t,n){return h[0]=t[n],h[1]=t[n+1],h[2]=t[n+2],h[3]=t[n+3],o[0]}function s(t,n){return h[3]=t[n],h[2]=t[n+1],h[1]=t[n+2],h[0]=t[n+3],o[0]}var o,h,f,c,a;function l(t,n,i,r,u,e){var s,o=r<0?1:0;0===(r=o?-r:r)?(t(0,u,e+n),t(0<1/r?0:2147483648,u,e+i)):isNaN(r)?(t(0,u,e+n),t(2146959360,u,e+i)):17976931348623157e292<r?(t(0,u,e+n),t((o<<31|2146435072)>>>0,u,e+i)):r<22250738585072014e-324?(t((s=r/5e-324)>>>0,u,e+n),t((o<<31|s/4294967296)>>>0,u,e+i)):(t(4503599627370496*(s=r*Math.pow(2,-(r=1024===(r=Math.floor(Math.log(r)/Math.LN2))?1023:r)))>>>0,u,e+n),t((o<<31|r+1023<<20|1048576*s&1048575)>>>0,u,e+i))}function v(t,n,i,r,u){n=t(r,u+n),t=t(r,u+i),r=2*(t>>31)+1,u=t>>>20&2047,i=4294967296*(1048575&t)+n;return 2047==u?i?NaN:1/0*r:0==u?5e-324*r*i:r*Math.pow(2,u-1075)*(i+4503599627370496)}function w(t,n,i){f[0]=t,n[i]=c[0],n[i+1]=c[1],n[i+2]=c[2],n[i+3]=c[3],n[i+4]=c[4],n[i+5]=c[5],n[i+6]=c[6],n[i+7]=c[7]}function b(t,n,i){f[0]=t,n[i]=c[7],n[i+1]=c[6],n[i+2]=c[5],n[i+3]=c[4],n[i+4]=c[3],n[i+5]=c[2],n[i+6]=c[1],n[i+7]=c[0]}function g(t,n){return c[0]=t[n],c[1]=t[n+1],c[2]=t[n+2],c[3]=t[n+3],c[4]=t[n+4],c[5]=t[n+5],c[6]=t[n+6],c[7]=t[n+7],f[0]}function d(t,n){return c[7]=t[n],c[6]=t[n+1],c[5]=t[n+2],c[4]=t[n+3],c[3]=t[n+4],c[2]=t[n+5],c[1]=t[n+6],c[0]=t[n+7],f[0]}return"undefined"!=typeof Float32Array?(o=new Float32Array([-0]),h=new Uint8Array(o.buffer),a=128===h[3],t.writeFloatLE=a?r:u,t.writeFloatBE=a?u:r,t.readFloatLE=a?e:s,t.readFloatBE=a?s:e):(t.writeFloatLE=n.bind(null,y),t.writeFloatBE=n.bind(null,p),t.readFloatLE=i.bind(null,A),t.readFloatBE=i.bind(null,m)),"undefined"!=typeof Float64Array?(f=new Float64Array([-0]),c=new Uint8Array(f.buffer),a=128===c[7],t.writeDoubleLE=a?w:b,t.writeDoubleBE=a?b:w,t.readDoubleLE=a?g:d,t.readDoubleBE=a?d:g):(t.writeDoubleLE=l.bind(null,y,0,4),t.writeDoubleBE=l.bind(null,p,4,0),t.readDoubleLE=v.bind(null,A,0,4),t.readDoubleBE=v.bind(null,m,4,0)),t}function y(t,n,i){n[i]=255&t,n[i+1]=t>>>8&255,n[i+2]=t>>>16&255,n[i+3]=t>>>24}function p(t,n,i){n[i]=t>>>24,n[i+1]=t>>>16&255,n[i+2]=t>>>8&255,n[i+3]=255&t}function A(t,n){return(t[n]|t[n+1]<<8|t[n+2]<<16|t[n+3]<<24)>>>0}function m(t,n){return(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3])>>>0}n.exports=r(r)},{}],11:[function(t,n,i){n.exports=u;var r=t(12);function u(t,n){this.lo=t>>>0,this.hi=n>>>0}var e=u.zero=new u(0,0),s=(e.toNumber=function(){return 0},e.zzEncode=e.zzDecode=function(){return this},e.length=function(){return 1},u.zeroHash="\0\0\0\0\0\0\0\0",u.fromNumber=function(t){var n,i;return 0===t?e:(i=(t=(n=t<0)?-t:t)>>>0,t=(t-i)/4294967296>>>0,n&&(t=~t>>>0,i=~i>>>0,4294967295<++i&&(i=0,4294967295<++t&&(t=0))),new u(i,t))},u.from=function(t){if("number"==typeof t)return u.fromNumber(t);if(r.isString(t)){if(!r.Long)return u.fromNumber(parseInt(t,10));t=r.Long.fromString(t)}return t.low||t.high?new u(t.low>>>0,t.high>>>0):e},u.prototype.toNumber=function(t){var n;return!t&&this.hi>>>31?(t=1+~this.lo>>>0,n=~this.hi>>>0,-(t+4294967296*(n=t?n:n+1>>>0))):this.lo+4294967296*this.hi},u.prototype.toLong=function(t){return r.Long?new r.Long(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}},String.prototype.charCodeAt);u.fromHash=function(t){return"\0\0\0\0\0\0\0\0"===t?e:new u((s.call(t,0)|s.call(t,1)<<8|s.call(t,2)<<16|s.call(t,3)<<24)>>>0,(s.call(t,4)|s.call(t,5)<<8|s.call(t,6)<<16|s.call(t,7)<<24)>>>0)},u.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},u.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},u.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},u.prototype.length=function(){var t=this.lo,n=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0==i?0==n?t<16384?t<128?1:2:t<2097152?3:4:n<16384?n<128?5:6:n<2097152?7:8:i<128?9:10}},{12:12}],12:[function(n,t,i){var r=i;function o(t){return"__proto__"===t||"prototype"===t||"constructor"===t}function u(t){for(var n=(i="boolean"==typeof arguments[arguments.length-1])?arguments.length-1:arguments.length,i=i&&arguments[arguments.length-1],r=1;r<n;++r){var u=arguments[r];if(u)for(var e=Object.keys(u),s=0;s<e.length;++s)o(e[s])||t[e[s]]!==p&&i||(t[e[s]]=u[e[s]])}return t}function e(t){function i(t,n){if(!(this instanceof i))return new i(t,n);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,i):Object.defineProperty(this,"stack",{value:Error().stack||""}),n&&u(this,n)}return i.prototype=Object.create(Error.prototype,{constructor:{value:i,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return t},set:p,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),i}r.asPromise=n(7),r.base64=n(8),r.EventEmitter=n(9),r.float=n(10),r.utf8=n(14),r.pool=n(13),r.LongBits=n(11),r.isUnsafeProperty=o,r.isNode=!!("undefined"!=typeof global&&global&&global.process&&global.process.versions&&global.process.versions.node),r.global=r.isNode&&global||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},r.isString=function(t){return"string"==typeof t||t instanceof String},r.isObject=function(t){return t&&"object"==typeof t},r.isset=r.isSet=function(t,n){var i=t[n];return!(null==i||!Object.hasOwnProperty.call(t,n))&&("object"!=typeof i||0<(Array.isArray(i)?i:Object.keys(i)).length)},r.Buffer=function(){try{var t=r.global.Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),r.r=null,r.u=null,r.newBuffer=function(t){return"number"==typeof t?r.Buffer?r.u(t):new r.Array(t):r.Buffer?r.r(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||function(){try{var t=n("long");return t&&t.isLong?t:null}catch(t){return null}}(),r.key2Re=/^(?:true|false|0|1)$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\x00-\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(t){return t?r.LongBits.from(t).toHash():r.LongBits.zeroHash},r.longFromHash=function(t,n){t=r.LongBits.fromHash(t);return r.Long?r.Long.fromBits(t.lo,t.hi,n):t.toNumber(!!n)},r.longFromKey=function(t,n){return r.key64Re.test(t)&&!r.key32Re.test(t)?r.longFromHash(t,n):t},r.boolFromKey=function(t){return"true"===t||"1"===t},r.merge=u,r.nestingLimit=32,r.recursionLimit=100,r.makeProp=function(t,n,i){Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:i===p||i,configurable:!0,writable:!0})},r.lcFirst=function(t){return(t[0]||"").toLowerCase()+t.substring(1)},r.newError=e,r.ProtocolError=e("ProtocolError"),r.oneOfGetter=function(t){for(var i={},n=0;n<t.length;++n)i[t[n]]=1;return function(){for(var t=Object.keys(this),n=t.length-1;-1<n;--n)if(1===i[t[n]]&&this[t[n]]!==p&&null!==this[t[n]])return t[n]}},r.oneOfSetter=function(i){return function(t){for(var n=0;n<i.length;++n)i[n]!==t&&delete this[i[n]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r.t=function(){var i=r.Buffer;i?(r.r=i.from!==Uint8Array.from&&i.from||function(t,n){return new i(t,n)},r.u=i.allocUnsafe||function(t){return new i(t)}):r.r=r.u=null}},{10:10,11:11,13:13,14:14,7:7,8:8,9:9,long:"long"}],13:[function(t,n,i){n.exports=function(n,i,t){var r=t||8192,u=r>>>1,e=null,s=r;return function(t){if(t<1||u<t)return n(t);r<s+t&&(e=n(r),s=0);t=i.call(e,s,s+=t);return 7&s&&(s=1+(7|s)),t}}},{}],14:[function(t,n,i){function v(t,n,i,r){for(var u=n;u<i;){var e,s=t[u++];s<=127?r+=String.fromCharCode(s):192<=s&&s<224?r+=128<=(e=(31&s)<<6|63&t[u++])?String.fromCharCode(e):"�":224<=s&&s<240?r+=2048<=(e=(15&s)<<12|(63&t[u++])<<6|63&t[u++])?String.fromCharCode(e):"�":240<=s&&((s=(7&s)<<18|(63&t[u++])<<12|(63&t[u++])<<6|63&t[u++])<65536||1114111<s?r+="�":r=r+String.fromCharCode(55296+((s-=65536)>>10))+String.fromCharCode(56320+(1023&s)))}return r}i.length=function(t){for(var n,i=0,r=0;r<t.length;++r)(n=t.charCodeAt(r))<128?i+=1:n<2048?i+=2:55296==(64512&n)&&56320==(64512&t.charCodeAt(r+1))?(++r,i+=4):i+=3;return i},i.read=function(t,n,i){if(i-n<1)return"";for(var r,u,e,s,o,h,f,c,a="",l=n;l+7<i;l+=8){if(128&((r=t[l])|(u=t[l+1])|(e=t[l+2])|(s=t[l+3])|(o=t[l+4])|(h=t[l+5])|(f=t[l+6])|(c=t[l+7])))return v(t,l,i,a);a+=String.fromCharCode(r,u,e,s,o,h,f,c)}for(;l<i;++l){if(128&(r=t[l]))return v(t,l,i,a);a+=String.fromCharCode(r)}return a},i.write=function(t,n,i){for(var r,u,e=i,s=0;s<t.length;++s)(r=t.charCodeAt(s))<128?n[i++]=r:(r<2048?n[i++]=r>>6|192:(55296==(64512&r)&&56320==(64512&(u=t.charCodeAt(s+1)))?(++s,n[i++]=(r=65536+((1023&r)<<10)+(1023&u))>>18|240,n[i++]=r>>12&63|128):n[i++]=r>>12|224,n[i++]=r>>6&63|128),n[i++]=63&r|128);return i-e}},{}],15:[function(t,n,i){n.exports=a;var r,u=t(12),e=u.LongBits,s=u.base64,o=u.utf8;function h(t,n,i){this.fn=t,this.len=n,this.next=p,this.val=i}function f(){}function c(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function a(){this.len=0,this.head=new h(f,0,0),this.tail=this.head,this.states=null}function l(){return u.Buffer?function(){return(a.create=function(){return new r})()}:function(){return new a}}function v(t,n,i){n[i]=255&t}function w(t,n,i){for(var r=0;r<t.length;)n[i++]=t.charCodeAt(r++)}function b(t,n){this.len=t,this.next=p,this.val=n}function g(t,n,i){for(var r=t.lo,u=t.hi;u;)n[i++]=127&r|128,r=(r>>>7|u<<25)>>>0,u>>>=7;for(;127<r;)n[i++]=127&r|128,r>>>=7;n[i++]=r}function d(t,n,i){n[i]=255&t,n[i+1]=t>>>8&255,n[i+2]=t>>>16&255,n[i+3]=t>>>24}a.create=l(),a.alloc=function(t){return new u.Array(t)},u.Array!==Array&&(a.alloc=u.pool(a.alloc,u.Array.prototype.subarray)),a.prototype.e=function(t,n,i){return this.tail=this.tail.next=new h(t,n,i),this.len+=n,this},(b.prototype=Object.create(h.prototype)).fn=function(t,n,i){for(;127<t;)n[i++]=127&t|128,t>>>=7;n[i]=t},a.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new b((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},a.prototype.int32=function(t){return(t|=0)<0?this.e(g,10,e.fromNumber(t)):this.uint32(t)},a.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},a.prototype.int64=a.prototype.uint64=function(t){t=e.from(t);return this.e(g,t.length(),t)},a.prototype.sint64=function(t){t=e.from(t).zzEncode();return this.e(g,t.length(),t)},a.prototype.bool=function(t){return this.e(v,1,t?1:0)},a.prototype.sfixed32=a.prototype.fixed32=function(t){return this.e(d,4,t>>>0)},a.prototype.sfixed64=a.prototype.fixed64=function(t){t=e.from(t);return this.e(d,4,t.lo).e(d,4,t.hi)},a.prototype.float=function(t){return this.e(u.float.writeFloatLE,4,t)},a.prototype.double=function(t){return this.e(u.float.writeDoubleLE,8,t)};var y=u.Array.prototype.set?function(t,n,i){n.set(t,i)}:function(t,n,i){for(var r=0;r<t.length;++r)n[i+r]=t[r]};a.prototype.bytes=function(t){var n,i=t.length>>>0;return i?(u.isString(t)&&(n=a.alloc(i=s.length(t)),s.decode(t,n,0),t=n),this.uint32(i).e(y,i,t)):this.e(v,1,0)},a.prototype.raw=function(t){var n=t.length>>>0;return n?this.e(y,n,t):this},a.prototype.string=function(t){var n=o.length(t);return n?this.uint32(n).e(n===t.length?w:o.write,n,t):this.e(v,1,0)},a.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new h(f,0,0),this.len=0,this},a.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new h(f,0,0),this.len=0),this},a.prototype.ldelim=function(){var t=this.head,n=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=t.next,this.tail=n,this.len+=i),this},a.prototype.finish=function(){return this.finishInto(this.constructor.alloc(this.len),0)},a.prototype.finishInto=function(t,n){for(var i=this.head.next,r=n=n===p?0:n;i;)i.fn(i.val,t,r),r+=i.len,i=i.next;return t},a.t=function(t){r=t,a.create=l(),r.t()}},{12:12}],16:[function(t,n,i){n.exports=e;var r=t(15),u=((e.prototype=Object.create(r.prototype)).constructor=e,t(12));function e(){r.call(this)}function s(t,n,i){for(var r=0;r<t.length;)n[i++]=t.charCodeAt(r++)}function o(t,n,i){t.length<40?u.utf8.write(t,n,i):n.utf8Write?n.utf8Write(t,i):n.write(t,i)}e.t=function(){e.alloc=u.u,e.writeBytesBuffer=u.Buffer&&u.Buffer.prototype instanceof Uint8Array&&"set"===u.Buffer.prototype.set.name?function(t,n,i){n.set(t,i)}:function(t,n,i){if(t.copy)t.copy(n,i,0,t.length);else for(var r=0;r<t.length;)n[i++]=t[r++]}},e.prototype.bytes=function(t){var n=(t=u.isString(t)?u.r(t,"base64"):t).length>>>0;return this.uint32(n),n&&this.e(e.writeBytesBuffer,n,t),this},e.prototype.raw=function(t){var n=t.length>>>0;return n?this.e(e.writeBytesBuffer,n,t):this},e.prototype.string=function(t){var n=u.Buffer.byteLength(t);return this.uint32(n),n&&this.e(n===t.length&&n<40?s:o,n,t),this},e.t()},{12:12,15:15}]},u={},(n=function t(n){var i=u[n];return i||r[n][0].call(i=u[n]={exports:{}},t,i,i.exports),i.exports}([1][0])).util.global.protobuf=n,"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&t.isLong&&(n.util.Long=t,n.configure()),n}),"object"==typeof module&&module&&module.exports&&(module.exports=n)}();
!function(p){"use strict";var r,u,n;r={1:[function(t,n,i){function r(){i.util.t(),i.Writer.t(i.BufferWriter),i.Reader.t(i.BufferReader)}i.build="minimal",i.Writer=t(15),i.BufferWriter=t(16),i.Reader=t(2),i.BufferReader=t(3),i.util=t(12),i.rpc=t(5),i.roots=t(4),i.configure=r,r()},{12:12,15:15,16:16,2:2,3:3,4:4,5:5}],2:[function(t,n,i){n.exports=h;var r,u=t(12),e=u.LongBits,o=u.utf8;function s(t,n){return RangeError("index out of range: "+t.pos+" + "+(n||1)+" > "+t.len)}function h(t){this.buf=t,this.pos=0,this.len=t.length,this.discardUnknown=h.discardUnknown}function f(){return u.Buffer?function(t){return(h.create=function(t){return u.Buffer.isBuffer(t)?new r(t):c(t)})(t)}:c}var c="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new h(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new h(t);throw Error("illegal buffer")};function a(){var t=new e(0,0),n=0;if(!(4<this.len-this.pos)){for(;n<4;++n){if(this.pos>=this.len)throw s(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*n)>>>0,this.buf[this.pos++]<128)return t}throw s(this)}for(;n<4;++n)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*n)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(n=0,4<this.len-this.pos){for(;n<5;++n)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*n+3)>>>0,this.buf[this.pos++]<128)return t}else for(;n<5;++n){if(this.pos>=this.len)throw s(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*n+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function l(t,n){return(t[n-4]|t[n-3]<<8|t[n-2]<<16|t[n-1]<<24)>>>0}function v(){if(this.pos+8>this.len)throw s(this,8);return new e(l(this.buf,this.pos+=4),l(this.buf,this.pos+=4))}h.create=f(),h.prototype.n=u.Array.prototype.subarray||u.Array.prototype.slice,h.prototype.raw=function(t,n){return Array.isArray(this.buf)?this.buf.slice(t,n):t===n?new this.buf.constructor(0):this.n.call(this.buf,t,n)},h.prototype.uint32=function(){var t=this.buf,n=this.pos,i=(127&t[n])>>>0;if(t[n++]<128)return this.pos=n,i;if(i=(i|(127&t[n])<<7)>>>0,t[n++]<128)return this.pos=n,i;if(i=(i|(127&t[n])<<14)>>>0,t[n++]<128)return this.pos=n,i;if(i=(i|(127&t[n])<<21)>>>0,t[n++]<128)return this.pos=n,i;if(i=(i|(15&t[n])<<28)>>>0,t[n++]<128)return this.pos=n,i;for(var r=0;r<5;++r){if(n>=this.len)throw this.pos=n,s(this);if(t[n++]<128)return this.pos=n,i}throw this.pos=n,Error("invalid varint encoding")},h.prototype.tag=function(){var t=this.buf,n=this.pos,i=(127&t[n])>>>0;if(t[n++]<128)return this.pos=n,i;if(i=(i|(127&t[n])<<7)>>>0,t[n++]<128)return this.pos=n,i;if(i=(i|(127&t[n])<<14)>>>0,t[n++]<128)return this.pos=n,i;if(i=(i|(127&t[n])<<21)>>>0,t[n++]<128)return this.pos=n,i;if(i=(i|(15&t[n])<<28)>>>0,t[n]<128&&0==(112&t[n]))return this.pos=n+1,i;throw this.pos=n+1,Error("invalid tag encoding")},h.prototype.int32=function(){return 0|this.uint32()},h.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},h.prototype.bool=function(){for(var t,n=!1,i=0;i<10;++i){if(this.pos>=this.len)throw s(this);if(127&(t=this.buf[this.pos++])&&(n=!0),t<128)return n}throw Error("invalid varint encoding")},h.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return l(this.buf,this.pos+=4)},h.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|l(this.buf,this.pos+=4)},h.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var t=u.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},h.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var t=u.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},h.prototype.bytes=function(){var t=this.uint32(),n=this.pos,i=this.pos+t;if(i>this.len)throw s(this,t);return this.pos=i,this.raw(n,i)},h.prototype.string=function(){var t=this.uint32(),n=this.pos,i=this.pos+t;if(i>this.len)throw s(this,t);return this.pos=i,o.read(this.buf,n,i)},h.prototype.stringVerify=function(){var t=this.uint32(),n=this.pos,i=this.pos+t;if(i>this.len)throw s(this,t);return this.pos=i,o.readStrict(this.buf,n,i)},h.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw s(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},h.recursionLimit=u.recursionLimit,h.discardUnknown=!0,h.prototype.skipType=function(t,n,i){if(h.recursionLimit<(n=n===p?0:n))throw Error("max depth exceeded");if(0===i)throw Error("illegal tag: field number 0");switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){var r=this.tag(),u=r>>>3;if(!u)throw Error("illegal tag: field number 0");if(4===(t=7&r)){if(i!==p&&u!==i)throw Error("invalid end group tag");break}this.skipType(t,n+1,u)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},h.t=function(t){r=t,h.create=f(),r.t();var n=u.Long?"toLong":"toNumber";u.merge(h.prototype,{int64:function(){return a.call(this)[n](!1)},uint64:function(){return a.call(this)[n](!0)},sint64:function(){return a.call(this).zzDecode()[n](!1)},fixed64:function(){return v.call(this)[n](!0)},sfixed64:function(){return v.call(this)[n](!1)}})}},{12:12}],3:[function(t,n,i){n.exports=e;var r=t(2),u=((e.prototype=Object.create(r.prototype)).constructor=e,t(12));function e(t){r.call(this,t)}e.t=function(){u.Buffer&&(e.prototype.n=u.Buffer.prototype.slice)},e.prototype.raw=function(t,n){return t===n?u.Buffer.alloc(0):this.n.call(this.buf,t,n)},e.prototype.string=function(){var t=this.uint32(),n=this.pos,i=this.pos+t;if(i>this.len)throw RangeError("index out of range: "+this.pos+" + "+t+" > "+this.len);return this.pos=i,this.buf.utf8Slice?this.buf.utf8Slice(n,i):this.buf.toString("utf-8",n,i)},e.t()},{12:12,2:2}],4:[function(t,n,i){n.exports=Object.create(null)},{}],5:[function(t,n,i){i.Service=t(6)},{6:6}],6:[function(t,n,i){n.exports=r;var s=t(12);function r(t,n,i){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");s.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!n,this.responseDelimited=!!i}((r.prototype=Object.create(s.EventEmitter.prototype)).constructor=r).prototype.rpcCall=function t(i,n,r,u,e){if(!u)throw TypeError("request must be specified");var o=this;if(!e)return s.asPromise(t,o,i,n,r,u);if(!o.rpcImpl)return setTimeout(function(){e(Error("already ended"))},0),p;try{return o.rpcImpl(i,n[o.requestDelimited?"encodeDelimited":"encode"](u).finish(),function(t,n){if(t)return o.emit("error",t,i),e(t);if(null===n)return o.end(!0),p;if(!(n instanceof r))try{n=r[o.responseDelimited?"decodeDelimited":"decode"](n)}catch(t){return o.emit("error",t,i),e(t)}return o.emit("data",n,i),e(null,n)})}catch(t){return o.emit("error",t,i),setTimeout(function(){e(t)},0),p}},r.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{12:12}],7:[function(t,n,i){n.exports=function(t,n){var i=Array(arguments.length-1),e=0,r=2,o=!0;for(;r<arguments.length;)i[e++]=arguments[r++];return new Promise(function(r,u){i[e]=function(t){if(o)if(o=!1,t)u(t);else{for(var n=Array(arguments.length-1),i=0;i<n.length;)n[i++]=arguments[i];r.apply(null,n)}};try{t.apply(n||null,i)}catch(t){o&&(o=!1,u(t))}})}},{}],8:[function(t,n,i){i.length=function(t){var n=t.length;if(!n)return 0;for(;0<n&&"="==(t[0|n-1]||"");)--n;return Math.floor(3*n/4)};for(var f=Array(64),h=Array(123),r=0;r<64;)h[f[r]=r<26?r+65:r<52?r+71:r<62?r-4:r-59|43]=r++;h[45]=62,h[95]=63,i.encode=function(t,n,i){for(var r,u=null,e=[],o=0,s=0;n<i;){var h=t[n++];switch(s){case 0:e[o++]=f[h>>2],r=(3&h)<<4,s=1;break;case 1:e[o++]=f[r|h>>4],r=(15&h)<<2,s=2;break;case 2:e[o++]=f[r|h>>6],e[o++]=f[63&h],s=0}8191<o&&((u=u||[]).push(String.fromCharCode.apply(String,e)),o=0)}return s&&(e[o++]=f[r],e[o++]=61,1===s&&(e[o++]=61)),u?(o&&u.push(String.fromCharCode.apply(String,e.slice(0,o))),u.join("")):String.fromCharCode.apply(String,e.slice(0,o))};var c="invalid encoding",u=(i.decode=function(t,n,i){for(var r,u=i,e=0,o=0;o<t.length;){var s=t.charCodeAt(o++);if(61==s&&1<e)break;if((s=h[s])===p)throw Error(c);switch(e){case 0:r=s,e=1;break;case 1:n[i++]=r<<2|(48&s)>>4,r=s,e=2;break;case 2:n[i++]=(15&r)<<4|(60&s)>>2,r=s,e=3;break;case 3:n[i++]=(3&r)<<6|s,e=0}}if(1===e)throw Error(c);return i-u},/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/),e=/[-_]/,o=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2}(?:==)?|[A-Za-z0-9_-]{3}=?)?$/;i.test=function(t){return u.test(t)||e.test(t)&&o.test(t)}},{}],9:[function(t,n,i){function r(){this.i=Object.create(null)}(n.exports=r).prototype.on=function(t,n,i){return(this.i[t]||(this.i[t]=[])).push({fn:n,ctx:i||this}),this},r.prototype.off=function(t,n){if(t===p)this.i=Object.create(null);else if(n===p)this.i[t]=[];else{var i=this.i[t];if(!i)return this;for(var r=0;r<i.length;)i[r].fn===n?i.splice(r,1):++r}return this},r.prototype.emit=function(t){var n=this.i[t];if(n){for(var i=[],r=1;r<arguments.length;)i.push(arguments[r++]);for(r=0;r<n.length;)n[r].fn.apply(n[r++].ctx,i)}return this}},{}],10:[function(t,n,i){function r(t){function n(t,n,i,r){var u=n<0?1:0;t(0===(n=u?-n:n)?0<1/n?0:2147483648:isNaN(n)?2143289344:34028234663852886e22<n?(u<<31|2139095040)>>>0:n<11754943508222875e-54?(u<<31|Math.round(n/1401298464324817e-60))>>>0:(u<<31|127+(t=Math.floor(Math.log(n)/Math.LN2))<<23|8388607&Math.round(n*Math.pow(2,-t)*8388608))>>>0,i,r)}function i(t,n,i){t=t(n,i),n=2*(t>>31)+1,i=t>>>23&255,t&=8388607;return 255==i?t?NaN:1/0*n:0==i?1401298464324817e-60*n*t:n*Math.pow(2,i-150)*(8388608+t)}function r(t,n,i){s[0]=t,n[i]=h[0],n[i+1]=h[1],n[i+2]=h[2],n[i+3]=h[3]}function u(t,n,i){s[0]=t,n[i]=h[3],n[i+1]=h[2],n[i+2]=h[1],n[i+3]=h[0]}function e(t,n){return h[0]=t[n],h[1]=t[n+1],h[2]=t[n+2],h[3]=t[n+3],s[0]}function o(t,n){return h[3]=t[n],h[2]=t[n+1],h[1]=t[n+2],h[0]=t[n+3],s[0]}var s,h,f,c,a;function l(t,n,i,r,u,e){var o,s=r<0?1:0;0===(r=s?-r:r)?(t(0,u,e+n),t(0<1/r?0:2147483648,u,e+i)):isNaN(r)?(t(0,u,e+n),t(2146959360,u,e+i)):17976931348623157e292<r?(t(0,u,e+n),t((s<<31|2146435072)>>>0,u,e+i)):r<22250738585072014e-324?(t((o=r/5e-324)>>>0,u,e+n),t((s<<31|o/4294967296)>>>0,u,e+i)):(t(4503599627370496*(o=r*Math.pow(2,-(r=1024===(r=Math.floor(Math.log(r)/Math.LN2))?1023:r)))>>>0,u,e+n),t((s<<31|r+1023<<20|1048576*o&1048575)>>>0,u,e+i))}function v(t,n,i,r,u){n=t(r,u+n),t=t(r,u+i),r=2*(t>>31)+1,u=t>>>20&2047,i=4294967296*(1048575&t)+n;return 2047==u?i?NaN:1/0*r:0==u?5e-324*r*i:r*Math.pow(2,u-1075)*(i+4503599627370496)}function w(t,n,i){f[0]=t,n[i]=c[0],n[i+1]=c[1],n[i+2]=c[2],n[i+3]=c[3],n[i+4]=c[4],n[i+5]=c[5],n[i+6]=c[6],n[i+7]=c[7]}function b(t,n,i){f[0]=t,n[i]=c[7],n[i+1]=c[6],n[i+2]=c[5],n[i+3]=c[4],n[i+4]=c[3],n[i+5]=c[2],n[i+6]=c[1],n[i+7]=c[0]}function g(t,n){return c[0]=t[n],c[1]=t[n+1],c[2]=t[n+2],c[3]=t[n+3],c[4]=t[n+4],c[5]=t[n+5],c[6]=t[n+6],c[7]=t[n+7],f[0]}function d(t,n){return c[7]=t[n],c[6]=t[n+1],c[5]=t[n+2],c[4]=t[n+3],c[3]=t[n+4],c[2]=t[n+5],c[1]=t[n+6],c[0]=t[n+7],f[0]}return"undefined"!=typeof Float32Array?(s=new Float32Array([-0]),h=new Uint8Array(s.buffer),a=128===h[3],t.writeFloatLE=a?r:u,t.writeFloatBE=a?u:r,t.readFloatLE=a?e:o,t.readFloatBE=a?o:e):(t.writeFloatLE=n.bind(null,y),t.writeFloatBE=n.bind(null,p),t.readFloatLE=i.bind(null,A),t.readFloatBE=i.bind(null,m)),"undefined"!=typeof Float64Array?(f=new Float64Array([-0]),c=new Uint8Array(f.buffer),a=128===c[7],t.writeDoubleLE=a?w:b,t.writeDoubleBE=a?b:w,t.readDoubleLE=a?g:d,t.readDoubleBE=a?d:g):(t.writeDoubleLE=l.bind(null,y,0,4),t.writeDoubleBE=l.bind(null,p,4,0),t.readDoubleLE=v.bind(null,A,0,4),t.readDoubleBE=v.bind(null,m,4,0)),t}function y(t,n,i){n[i]=255&t,n[i+1]=t>>>8&255,n[i+2]=t>>>16&255,n[i+3]=t>>>24}function p(t,n,i){n[i]=t>>>24,n[i+1]=t>>>16&255,n[i+2]=t>>>8&255,n[i+3]=255&t}function A(t,n){return(t[n]|t[n+1]<<8|t[n+2]<<16|t[n+3]<<24)>>>0}function m(t,n){return(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3])>>>0}n.exports=r(r)},{}],11:[function(t,n,i){n.exports=u;var r=t(12);function u(t,n){this.lo=t>>>0,this.hi=n>>>0}var e=u.zero=new u(0,0),o=(e.toNumber=function(){return 0},e.zzEncode=e.zzDecode=function(){return this},e.length=function(){return 1},u.zeroHash="\0\0\0\0\0\0\0\0",u.fromNumber=function(t){var n,i;return 0===t?e:(i=(t=(n=t<0)?-t:t)>>>0,t=(t-i)/4294967296>>>0,n&&(t=~t>>>0,i=~i>>>0,4294967295<++i&&(i=0,4294967295<++t&&(t=0))),new u(i,t))},u.from=function(t){if("number"==typeof t)return u.fromNumber(t);if(r.isString(t)){if(!r.Long)return u.fromNumber(parseInt(t,10));t=r.Long.fromString(t)}return t.low||t.high?new u(t.low>>>0,t.high>>>0):e},u.prototype.toNumber=function(t){var n;return!t&&this.hi>>>31?(t=1+~this.lo>>>0,n=~this.hi>>>0,-(t+4294967296*(n=t?n:n+1>>>0))):this.lo+4294967296*this.hi},u.prototype.toLong=function(t){return r.Long?new r.Long(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}},String.prototype.charCodeAt);u.fromHash=function(t){return"\0\0\0\0\0\0\0\0"===t?e:new u((o.call(t,0)|o.call(t,1)<<8|o.call(t,2)<<16|o.call(t,3)<<24)>>>0,(o.call(t,4)|o.call(t,5)<<8|o.call(t,6)<<16|o.call(t,7)<<24)>>>0)},u.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},u.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},u.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},u.prototype.length=function(){var t=this.lo,n=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0==i?0==n?t<16384?t<128?1:2:t<2097152?3:4:n<16384?n<128?5:6:n<2097152?7:8:i<128?9:10}},{12:12}],12:[function(n,t,i){var r=i;function s(t){return"__proto__"===t||"prototype"===t||"constructor"===t}function u(t){for(var n=(i="boolean"==typeof arguments[arguments.length-1])?arguments.length-1:arguments.length,i=i&&arguments[arguments.length-1],r=1;r<n;++r){var u=arguments[r];if(u)for(var e=Object.keys(u),o=0;o<e.length;++o)s(e[o])||t[e[o]]!==p&&i||(t[e[o]]=u[e[o]])}return t}function e(t){function i(t,n){if(!(this instanceof i))return new i(t,n);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,i):Object.defineProperty(this,"stack",{value:Error().stack||""}),n&&u(this,n)}return i.prototype=Object.create(Error.prototype,{constructor:{value:i,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return t},set:p,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),i}r.asPromise=n(7),r.base64=n(8),r.EventEmitter=n(9),r.float=n(10),r.utf8=n(14),r.pool=n(13),r.LongBits=n(11),r.isUnsafeProperty=s,r.isNode=!!("undefined"!=typeof global&&global&&global.process&&global.process.versions&&global.process.versions.node),r.global=r.isNode&&global||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},r.isString=function(t){return"string"==typeof t||t instanceof String},r.isObject=function(t){return t&&"object"==typeof t},r.isset=r.isSet=function(t,n){var i=t[n];return!(null==i||!Object.hasOwnProperty.call(t,n))&&("object"!=typeof i||0<(Array.isArray(i)?i:Object.keys(i)).length)},r.Buffer=function(){try{var t=r.global.Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),r.r=null,r.u=null,r.newBuffer=function(t){return"number"==typeof t?r.Buffer?r.u(t):new r.Array(t):r.Buffer?r.r(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||function(){try{var t=n("long");return t&&t.isLong?t:null}catch(t){return null}}(),r.key2Re=/^(?:true|false|0|1)$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\x00-\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(t){return t?r.LongBits.from(t).toHash():r.LongBits.zeroHash},r.longFromHash=function(t,n){t=r.LongBits.fromHash(t);return r.Long?r.Long.fromBits(t.lo,t.hi,n):t.toNumber(!!n)},r.longFromKey=function(t,n){return r.key64Re.test(t)&&!r.key32Re.test(t)?r.longFromHash(t,n):t},r.boolFromKey=function(t){return"true"===t||"1"===t},r.merge=u,r.nestingLimit=32,r.recursionLimit=100,r.makeProp=function(t,n,i){Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:i===p||i,configurable:!0,writable:!0})},r.lcFirst=function(t){return(t[0]||"").toLowerCase()+t.substring(1)},r.newError=e,r.ProtocolError=e("ProtocolError"),r.oneOfGetter=function(t){for(var i={},n=0;n<t.length;++n)i[t[n]]=1;return function(){for(var t=Object.keys(this),n=t.length-1;-1<n;--n)if(1===i[t[n]]&&this[t[n]]!==p&&null!==this[t[n]])return t[n]}},r.oneOfSetter=function(i){return function(t){for(var n=0;n<i.length;++n)i[n]!==t&&delete this[i[n]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r.t=function(){var i=r.Buffer;i?(r.r=i.from!==Uint8Array.from&&i.from||function(t,n){return new i(t,n)},r.u=i.allocUnsafe||function(t){return new i(t)}):r.r=r.u=null}},{10:10,11:11,13:13,14:14,7:7,8:8,9:9,long:"long"}],13:[function(t,n,i){n.exports=function(n,i,t){var r=t||8192,u=r>>>1,e=null,o=r;return function(t){if(t<1||u<t)return n(t);r<o+t&&(e=n(r),o=0);t=i.call(e,o,o+=t);return 7&o&&(o=1+(7|o)),t}}},{}],14:[function(t,n,i){var r=new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});function v(t,n,i,r){for(var u=n;u<i;){var e,o=t[u++];o<=127?r+=String.fromCharCode(o):192<=o&&o<224?r+=128<=(e=(31&o)<<6|63&t[u++])?String.fromCharCode(e):"�":224<=o&&o<240?r+=2048<=(e=(15&o)<<12|(63&t[u++])<<6|63&t[u++])?String.fromCharCode(e):"�":240<=o&&((o=(7&o)<<18|(63&t[u++])<<12|(63&t[u++])<<6|63&t[u++])<65536||1114111<o?r+="�":r=r+String.fromCharCode(55296+((o-=65536)>>10))+String.fromCharCode(56320+(1023&o)))}return r}function w(t,n,i){t=0===n&&i===t.length?t:t.subarray?t.subarray(n,i):t.slice(n,i);return Array.isArray(t)&&(t=Uint8Array.from(t)),r.decode(t)}i.length=function(t){for(var n,i=0,r=0;r<t.length;++r)(n=t.charCodeAt(r))<128?i+=1:n<2048?i+=2:55296==(64512&n)&&56320==(64512&t.charCodeAt(r+1))?(++r,i+=4):i+=3;return i},i.read=function(t,n,i){if(i-n<1)return"";for(var r,u,e,o,s,h,f,c,a="",l=n;l+7<i;l+=8){if(128&((r=t[l])|(u=t[l+1])|(e=t[l+2])|(o=t[l+3])|(s=t[l+4])|(h=t[l+5])|(f=t[l+6])|(c=t[l+7])))return v(t,l,i,a);a+=String.fromCharCode(r,u,e,o,s,h,f,c)}for(;l<i;++l){if(128&(r=t[l]))return v(t,l,i,a);a+=String.fromCharCode(r)}return a},i.readStrict=function(t,n,i){if(i-n<1)return"";for(var r,u,e,o,s,h,f,c,a="",l=n;l+7<i;l+=8){if(128&((r=t[l])|(u=t[l+1])|(e=t[l+2])|(o=t[l+3])|(s=t[l+4])|(h=t[l+5])|(f=t[l+6])|(c=t[l+7])))return a+w(t,l,i);a+=String.fromCharCode(r,u,e,o,s,h,f,c)}for(;l<i;++l){if(128&(r=t[l]))return a+w(t,l,i);a+=String.fromCharCode(r)}return a},i.write=function(t,n,i){for(var r,u,e=i,o=0;o<t.length;++o)(r=t.charCodeAt(o))<128?n[i++]=r:(r<2048?n[i++]=r>>6|192:(55296==(64512&r)&&56320==(64512&(u=t.charCodeAt(o+1)))?(++o,n[i++]=(r=65536+((1023&r)<<10)+(1023&u))>>18|240,n[i++]=r>>12&63|128):n[i++]=r>>12|224,n[i++]=r>>6&63|128),n[i++]=63&r|128);return i-e}},{}],15:[function(t,n,i){n.exports=a;var r,u=t(12),e=u.LongBits,o=u.base64,s=u.utf8;function h(t,n,i){this.fn=t,this.len=n,this.next=p,this.val=i}function f(){}function c(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function a(){this.len=0,this.head=new h(f,0,0),this.tail=this.head,this.states=null}function l(){return u.Buffer?function(){return(a.create=function(){return new r})()}:function(){return new a}}function v(t,n,i){n[i]=255&t}function w(t,n,i){for(var r=0;r<t.length;)n[i++]=t.charCodeAt(r++)}function b(t,n){this.len=t,this.next=p,this.val=n}function g(t,n,i){for(var r=t.lo,u=t.hi;u;)n[i++]=127&r|128,r=(r>>>7|u<<25)>>>0,u>>>=7;for(;127<r;)n[i++]=127&r|128,r>>>=7;n[i++]=r}function d(t,n,i){n[i]=255&t,n[i+1]=t>>>8&255,n[i+2]=t>>>16&255,n[i+3]=t>>>24}a.create=l(),a.alloc=function(t){return new u.Array(t)},u.Array!==Array&&(a.alloc=u.pool(a.alloc,u.Array.prototype.subarray)),a.prototype.e=function(t,n,i){return this.tail=this.tail.next=new h(t,n,i),this.len+=n,this},(b.prototype=Object.create(h.prototype)).fn=function(t,n,i){for(;127<t;)n[i++]=127&t|128,t>>>=7;n[i]=t},a.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new b((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},a.prototype.int32=function(t){return(t|=0)<0?this.e(g,10,e.fromNumber(t)):this.uint32(t)},a.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},a.prototype.int64=a.prototype.uint64=function(t){t=e.from(t);return this.e(g,t.length(),t)},a.prototype.sint64=function(t){t=e.from(t).zzEncode();return this.e(g,t.length(),t)},a.prototype.bool=function(t){return this.e(v,1,t?1:0)},a.prototype.sfixed32=a.prototype.fixed32=function(t){return this.e(d,4,t>>>0)},a.prototype.sfixed64=a.prototype.fixed64=function(t){t=e.from(t);return this.e(d,4,t.lo).e(d,4,t.hi)},a.prototype.float=function(t){return this.e(u.float.writeFloatLE,4,t)},a.prototype.double=function(t){return this.e(u.float.writeDoubleLE,8,t)};var y=u.Array.prototype.set?function(t,n,i){n.set(t,i)}:function(t,n,i){for(var r=0;r<t.length;++r)n[i+r]=t[r]};a.prototype.bytes=function(t){var n,i=t.length>>>0;return i?(u.isString(t)&&(n=a.alloc(i=o.length(t)),o.decode(t,n,0),t=n),this.uint32(i).e(y,i,t)):this.e(v,1,0)},a.prototype.raw=function(t){var n=t.length>>>0;return n?this.e(y,n,t):this},a.prototype.string=function(t){var n=s.length(t);return n?this.uint32(n).e(n===t.length?w:s.write,n,t):this.e(v,1,0)},a.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new h(f,0,0),this.len=0,this},a.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new h(f,0,0),this.len=0),this},a.prototype.ldelim=function(){var t=this.head,n=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=t.next,this.tail=n,this.len+=i),this},a.prototype.finish=function(){return this.finishInto(this.constructor.alloc(this.len),0)},a.prototype.finishInto=function(t,n){for(var i=this.head.next,r=n=n===p?0:n;i;)i.fn(i.val,t,r),r+=i.len,i=i.next;return t},a.t=function(t){r=t,a.create=l(),r.t()}},{12:12}],16:[function(t,n,i){n.exports=e;var r=t(15),u=((e.prototype=Object.create(r.prototype)).constructor=e,t(12));function e(){r.call(this)}function o(t,n,i){for(var r=0;r<t.length;)n[i++]=t.charCodeAt(r++)}function s(t,n,i){t.length<40?u.utf8.write(t,n,i):n.utf8Write?n.utf8Write(t,i):n.write(t,i)}e.t=function(){e.alloc=u.u,e.writeBytesBuffer=u.Buffer&&u.Buffer.prototype instanceof Uint8Array&&"set"===u.Buffer.prototype.set.name?function(t,n,i){n.set(t,i)}:function(t,n,i){if(t.copy)t.copy(n,i,0,t.length);else for(var r=0;r<t.length;)n[i++]=t[r++]}},e.prototype.bytes=function(t){var n=(t=u.isString(t)?u.r(t,"base64"):t).length>>>0;return this.uint32(n),n&&this.e(e.writeBytesBuffer,n,t),this},e.prototype.raw=function(t){var n=t.length>>>0;return n?this.e(e.writeBytesBuffer,n,t):this},e.prototype.string=function(t){var n=u.Buffer.byteLength(t);return this.uint32(n),n&&this.e(n===t.length&&n<40?o:s,n,t),this},e.t()},{12:12,15:15}]},u={},(n=function t(n){var i=u[n];return i||r[n][0].call(i=u[n]={exports:{}},t,i,i.exports),i.exports}([1][0])).util.global.protobuf=n,"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&t.isLong&&(n.util.Long=t,n.configure()),n}),"object"==typeof module&&module&&module.exports&&(module.exports=n)}();
//# sourceMappingURL=protobuf.min.js.map
{
"name": "protobufjs",
"version": "8.6.2",
"version": "8.6.3",
"description": "Protocol Buffers for JavaScript & TypeScript.",

@@ -5,0 +5,0 @@ "author": "Daniel Wirtz <dcode+protobufjs@dcode.io>",

@@ -295,3 +295,3 @@ <h1><p align="center"><img alt="protobuf.js" src="https://github.com/protobufjs/protobuf.js/raw/master/pbjs.svg" height="100" /><br/>protobuf.js</p></h1>

protobuf.js will populate the constructor with the usual static runtime methods and use it for decoded messages. In TypeScript, custom members are visible when using the custom class type in consuming code.
protobuf.js will populate the constructor with the usual static runtime methods and use it for decoded messages. When assigning constructors manually, add the type to its parent namespace/root first if fields reference other reflected types. In TypeScript, custom members are visible when using the custom class type in consuming code.

@@ -298,0 +298,0 @@ ### Services

@@ -366,5 +366,5 @@ "use strict";

* Properties of a google.protobuf.FieldMask message.
* @interface IDoubleValue
* @interface IFieldMask
* @type {Object}
* @property {number} [value]
* @property {string[]} [paths]
* @memberof common

@@ -371,0 +371,0 @@ */

@@ -12,2 +12,6 @@ "use strict";

function stringMethod(field) {
return field._features.utf8_validation === "VERIFY" ? "stringVerify" : "string";
}
/**

@@ -82,3 +86,3 @@ * Generates a decoder specific to the specified message type.

("break")
("k=r.%s()", field.keyType)
("k=r.%s()", field.keyType === "string" ? stringMethod(field) : field.keyType)
("continue")

@@ -92,3 +96,3 @@ ("case 2:")

else gen
("v=r.%s()", type);
("v=r.%s()", type === "string" ? stringMethod(field) : type);

@@ -140,3 +144,3 @@ gen

} else gen
("%s.push(r.%s())", ref, type);
("%s.push(r.%s())", ref, type === "string" ? stringMethod(field) : type);

@@ -159,3 +163,3 @@ // Non-repeated

("break")
("%s=r.%s()", ref, type);
("%s=r.%s()", ref, type === "string" ? stringMethod(field) : type);
} else {

@@ -170,3 +174,5 @@ gen

("if((v=r.%s())!==%j)", type, field.typeDefault);
else if (type === "string" || type === "bytes") gen
else if (type === "string") gen
("if((v=r.%s()).length)", stringMethod(field));
else if (type === "bytes") gen
("if((v=r.%s()).length)", type);

@@ -173,0 +179,0 @@ else if (types.long[type] !== undefined) gen

"use strict";
var protobuf = module.exports = require("./index-minimal");
exports = module.exports = require("./index-minimal");
protobuf.build = "light";
exports.build = "light";

@@ -26,5 +26,5 @@ /**

callback = root;
root = new protobuf.Root();
root = new exports.Root();
} else if (!root)
root = new protobuf.Root();
root = new exports.Root();
return root.load(filename, callback);

@@ -57,3 +57,3 @@ }

protobuf.load = load;
exports.load = load;

@@ -70,38 +70,38 @@ /**

if (!root)
root = new protobuf.Root();
root = new exports.Root();
return root.loadSync(filename);
}
protobuf.loadSync = loadSync;
exports.loadSync = loadSync;
// Serialization
protobuf.encoder = require("./encoder");
protobuf.decoder = require("./decoder");
protobuf.verifier = require("./verifier");
protobuf.converter = require("./converter");
exports.encoder = require("./encoder");
exports.decoder = require("./decoder");
exports.verifier = require("./verifier");
exports.converter = require("./converter");
// Reflection
protobuf.ReflectionObject = require("./object");
protobuf.Namespace = require("./namespace");
protobuf.Root = require("./root");
protobuf.Enum = require("./enum");
protobuf.Type = require("./type");
protobuf.Field = require("./field");
protobuf.OneOf = require("./oneof");
protobuf.MapField = require("./mapfield");
protobuf.Service = require("./service");
protobuf.Method = require("./method");
exports.ReflectionObject = require("./object");
exports.Namespace = require("./namespace");
exports.Root = require("./root");
exports.Enum = require("./enum");
exports.Type = require("./type");
exports.Field = require("./field");
exports.OneOf = require("./oneof");
exports.MapField = require("./mapfield");
exports.Service = require("./service");
exports.Method = require("./method");
// Runtime
protobuf.Message = require("./message");
protobuf.wrappers = require("./wrappers");
exports.Message = require("./message");
exports.wrappers = require("./wrappers");
// Utility
protobuf.types = require("./types");
protobuf.util = require("./util");
exports.types = require("./types");
exports.util = require("./util");
// Set up possibly cyclic reflection dependencies
protobuf.ReflectionObject._configure(protobuf.Root);
protobuf.Namespace._configure(protobuf.Type, protobuf.Service, protobuf.Enum);
protobuf.Root._configure(protobuf.Type, undefined, {});
protobuf.Field._configure(protobuf.Type);
exports.ReflectionObject._configure(exports.Root);
exports.Namespace._configure(exports.Type, exports.Service, exports.Enum);
exports.Root._configure(exports.Type, undefined, {});
exports.Field._configure(exports.Type);
"use strict";
var protobuf = exports;

@@ -10,15 +9,15 @@ /**

*/
protobuf.build = "minimal";
exports.build = "minimal";
// Serialization
protobuf.Writer = require("./writer");
protobuf.BufferWriter = require("./writer_buffer");
protobuf.Reader = require("./reader");
protobuf.BufferReader = require("./reader_buffer");
exports.Writer = require("./writer");
exports.BufferWriter = require("./writer_buffer");
exports.Reader = require("./reader");
exports.BufferReader = require("./reader_buffer");
// Utility
protobuf.util = require("./util/minimal");
protobuf.rpc = require("./rpc");
protobuf.roots = require("./roots");
protobuf.configure = configure;
exports.util = require("./util/minimal");
exports.rpc = require("./rpc");
exports.roots = require("./roots");
exports.configure = configure;

@@ -31,5 +30,5 @@ /* istanbul ignore next */

function configure() {
protobuf.util._configure();
protobuf.Writer._configure(protobuf.BufferWriter);
protobuf.Reader._configure(protobuf.BufferReader);
exports.util._configure();
exports.Writer._configure(exports.BufferWriter);
exports.Reader._configure(exports.BufferReader);
}

@@ -36,0 +35,0 @@

"use strict";
var protobuf = module.exports = require("./index-light");
exports = module.exports = require("./index-light");
protobuf.build = "full";
exports.build = "full";
// Parser
protobuf.tokenize = require("./tokenize");
protobuf.parse = require("./parse");
protobuf.common = require("./common");
exports.tokenize = require("./tokenize");
exports.parse = require("./parse");
exports.common = require("./common");
// Configure parser
protobuf.Root._configure(protobuf.Type, protobuf.parse, protobuf.common);
exports.Root._configure(exports.Type, exports.parse, exports.common);

@@ -324,3 +324,4 @@ "use strict";

delete this.nested[object.name];
if (!util.remove(this.nested, object, object.name))
throw Error(object + " is not a member of " + this);
if (!Object.keys(this.nested).length)

@@ -327,0 +328,0 @@ this.nested = undefined;

@@ -227,7 +227,7 @@ "use strict";

} else {
for (; i < 3; ++i) {
for (; i < 4; ++i) {
/* istanbul ignore if */
if (this.pos >= this.len)
throw indexOutOfRange(this);
// 1st..3th
// 1st..4th
bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;

@@ -237,5 +237,3 @@ if (this.buf[this.pos++] < 128)

}
// 4th
bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;
return bits;
throw indexOutOfRange(this);
}

@@ -435,2 +433,19 @@ if (this.len - this.pos > 4) { // fast route (hi)

/**
* Reads a string preceeded by its byte length as a varint, rejecting invalid UTF8.
* @returns {string} Value read
*/
Reader.prototype.stringVerify = function read_string_verify() {
var length = this.uint32(),
start = this.pos,
end = this.pos + length;
/* istanbul ignore if */
if (end > this.len)
throw indexOutOfRange(this, length);
this.pos = end;
return utf8.readStrict(this.buf, start, end);
};
/**
* Skips the specified number of bytes if specified, otherwise skips a varint.

@@ -437,0 +452,0 @@ * @param {number} [length] Length if known, otherwise a varint is assumed

@@ -158,2 +158,3 @@ "use strict";

* Assigning a function replaces the internal constructor. If the function does not extend {@link Message} yet, its prototype will be setup accordingly and static methods will be populated. If it already extends {@link Message}, it will just replace the internal constructor.
* When assigning manually, add the type to its parent namespace/root first if fields reference other reflected types, because constructor setup resolves field defaults.
* @name Type#ctor

@@ -428,6 +429,5 @@ * @type {Constructor<{}>}

/* istanbul ignore if */
if (!this.fields || this.fields[object.name] !== object)
if (!util.remove(this.fields, object, object.name))
throw Error(object + " is not a member of " + this);
delete this.fields[object.name];
object.parent = null;

@@ -440,6 +440,5 @@ object.onRemove(this);

/* istanbul ignore if */
if (!this.oneofs || this.oneofs[object.name] !== object)
if (!util.remove(this.oneofs, object, object.name))
throw Error(object + " is not a member of " + this);
delete this.oneofs[object.name];
object.parent = null;

@@ -446,0 +445,0 @@ object.onRemove(this);

@@ -62,2 +62,24 @@ "use strict";

/**
* Removes the first matching value from an object.
* @param {Object.<string,*>|undefined} object Object to remove from
* @param {*} value Value to remove
* @param {string} [key] Optional key for fast path removal
* @returns {boolean} `true` if removed, otherwise `false`
*/
util.remove = function remove(object, value, key) {
if (!object)
return false;
if (key !== undefined && Object.prototype.hasOwnProperty.call(object, key) && object[key] === value) {
delete object[key];
return true;
}
for (var names = Object.keys(object), i = 0; i < names.length; ++i)
if (object[names[i]] === value) {
delete object[names[i]];
return true;
}
return false;
};
/**
* Tests whether the specified name is a reserved word in JS.

@@ -64,0 +86,0 @@ * @param {string} name Name to test

@@ -10,2 +10,24 @@ "use strict";

var urlRe = /^[a-zA-Z][a-zA-Z0-9+.-]+:\/\//;
function normalizeUrl(path) {
if (typeof URL === "undefined" || !urlRe.test(path))
return null;
try {
return new URL(path).href;
} catch (e) {
return null;
}
}
function resolveUrl(originPath, includePath) {
if (typeof URL === "undefined" || !urlRe.test(originPath) || urlRe.test(includePath))
return null;
try {
return new URL(includePath, originPath).href;
} catch (e) {
return null;
}
}
var isAbsolute =

@@ -28,2 +50,5 @@ /**

path.normalize = function normalize(path) {
var normalizedUrl = normalizeUrl(path);
if (normalizedUrl)
return normalizedUrl;
var firstTwoCharacters = path.substring(0,2);

@@ -67,4 +92,7 @@ var uncPrefix = "";

path.resolve = function resolve(originPath, includePath, alreadyNormalized) {
var resolvedUrl = resolveUrl(originPath, includePath);
if (resolvedUrl)
return resolvedUrl;
if (!alreadyNormalized)
includePath = normalize(includePath);
includePath = normalize(includePath); // path or absolute url
if (isAbsolute(includePath))

@@ -71,0 +99,0 @@ return includePath;

@@ -9,3 +9,4 @@ "use strict";

var utf8 = exports,
replacementChar = "\ufffd";
replacementChar = "\ufffd",
strictDecoder = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true });

@@ -99,3 +100,53 @@ /**

function utf8_read_strict(buffer, start, end) {
var source = start === 0 && end === buffer.length
? buffer
: buffer.subarray
? buffer.subarray(start, end)
: buffer.slice(start, end);
if (Array.isArray(source))
source = Uint8Array.from(source);
return strictDecoder.decode(source);
}
/**
* Reads UTF8 bytes as a string, rejecting invalid UTF8.
* @param {Uint8Array} buffer Source buffer
* @param {number} start Source start
* @param {number} end Source end
* @returns {string} String read
*/
utf8.readStrict = function utf8_read_strict_ascii(buffer, start, end) {
if (end - start < 1)
return "";
var str = "",
i = start,
c1, c2, c3, c4, c5, c6, c7, c8;
for (; i + 7 < end; i += 8) {
c1 = buffer[i];
c2 = buffer[i + 1];
c3 = buffer[i + 2];
c4 = buffer[i + 3];
c5 = buffer[i + 4];
c6 = buffer[i + 5];
c7 = buffer[i + 6];
c8 = buffer[i + 7];
if ((c1 | c2 | c3 | c4 | c5 | c6 | c7 | c8) & 0x80)
return str + utf8_read_strict(buffer, i, end);
str += String.fromCharCode(c1, c2, c3, c4, c5, c6, c7, c8);
}
for (; i < end; ++i) {
c1 = buffer[i];
if (c1 & 0x80)
return str + utf8_read_strict(buffer, i, end);
str += String.fromCharCode(c1);
}
return str;
};
/**
* Writes a string as UTF8 bytes.

@@ -102,0 +153,0 @@ * @param {string} string Source string

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display