@chenfuqiang/protobufjs
Advanced tools
Comparing version 1.0.0 to 1.0.1
/*! | ||
* protobuf.js v1.0.0 (c) 2016, daniel wirtz | ||
* compiled tue, 04 jul 2023 15:29:37 utc | ||
* protobuf.js v1.0.1 (c) 2016, daniel wirtz | ||
* compiled wed, 05 jul 2023 17:28:08 utc | ||
* licensed under the bsd-3-clause license | ||
* see: https://github.com/dcodeio/protobuf.js for details | ||
*/ | ||
!function(g){"use strict";!function(r,s,t){t=function t(i){var n=s[i];return n||r[i][0].call(n=s[i]={exports:{}},t,n,n.exports),n.exports}(t[0]);t.util.global.protobuf=t,"object"==typeof module&&module&&module.exports&&(module.exports=t)}({1:[function(t,i,n){i.exports=function(t,i){var n=Array(arguments.length-1),h=0,r=2,u=!0;for(;r<arguments.length;)n[h++]=arguments[r++];return new Promise(function(r,s){n[h]=function(t){if(u)if(u=!1,t)s(t);else{for(var i=Array(arguments.length-1),n=0;n<i.length;)i[n++]=arguments[n];r.apply(null,i)}};try{t.apply(i||null,n)}catch(t){u&&(u=!1,s(t))}})}},{}],2:[function(t,i,n){n.length=function(t){var i=t.length;if(!i)return 0;for(var n=0;1<--i%4&&"="==(t[0|i]||"");)++n;return Math.ceil(3*t.length)/4-n};for(var o=Array(64),f=Array(123),r=0;r<64;)f[o[r]=r<26?r+65:r<52?r+71:r<62?r-4:r-59|43]=r++;n.encode=function(t,i,n){for(var r,s=null,h=[],u=0,e=0;i<n;){var f=t[i++];switch(e){case 0:h[u++]=o[f>>2],r=(3&f)<<4,e=1;break;case 1:h[u++]=o[r|f>>4],r=(15&f)<<2,e=2;break;case 2:h[u++]=o[r|f>>6],h[u++]=o[63&f],e=0}8191<u&&((s=s||[]).push(String.fromCharCode.apply(String,h)),u=0)}return e&&(h[u++]=o[r],h[u++]=61,1===e&&(h[u++]=61)),s?(u&&s.push(String.fromCharCode.apply(String,h.slice(0,u))),s.join("")):String.fromCharCode.apply(String,h.slice(0,u))};var c="invalid encoding";n.decode=function(t,i,n){for(var r,s=n,h=0,u=0;u<t.length;){var e=t.charCodeAt(u++);if(61==e&&1<h)break;if((e=f[e])===g)throw Error(c);switch(h){case 0:r=e,h=1;break;case 1:i[n++]=r<<2|(48&e)>>4,r=e,h=2;break;case 2:i[n++]=(15&r)<<4|(60&e)>>2,r=e,h=3;break;case 3:i[n++]=(3&r)<<6|e,h=0}}if(1===h)throw Error(c);return n-s},n.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},{}],3:[function(t,i,n){function r(){this.t={}}(i.exports=r).prototype.on=function(t,i,n){return(this.t[t]||(this.t[t]=[])).push({fn:i,ctx:n||this}),this},r.prototype.off=function(t,i){if(t===g)this.t={};else if(i===g)this.t[t]=[];else for(var n=this.t[t],r=0;r<n.length;)n[r].fn===i?n.splice(r,1):++r;return this},r.prototype.emit=function(t){var i=this.t[t];if(i){for(var n=[],r=1;r<arguments.length;)n.push(arguments[r++]);for(r=0;r<i.length;)i[r].fn.apply(i[r++].ctx,n)}return this}},{}],4:[function(t,i,n){function r(t){function i(t,i,n,r){var s=i<0?1:0;t(0===(i=s?-i:i)?0<1/i?0:2147483648:isNaN(i)?2143289344:34028234663852886e22<i?(s<<31|2139095040)>>>0:i<11754943508222875e-54?(s<<31|Math.round(i/1401298464324817e-60))>>>0:(s<<31|127+(t=Math.floor(Math.log(i)/Math.LN2))<<23|8388607&Math.round(i*Math.pow(2,-t)*8388608))>>>0,n,r)}function n(t,i,n){t=t(i,n),i=2*(t>>31)+1,n=t>>>23&255,t&=8388607;return 255==n?t?NaN:1/0*i:0==n?1401298464324817e-60*i*t:i*Math.pow(2,n-150)*(8388608+t)}function r(t,i,n){e[0]=t,i[n]=f[0],i[n+1]=f[1],i[n+2]=f[2],i[n+3]=f[3]}function s(t,i,n){e[0]=t,i[n]=f[3],i[n+1]=f[2],i[n+2]=f[1],i[n+3]=f[0]}function h(t,i){return f[0]=t[i],f[1]=t[i+1],f[2]=t[i+2],f[3]=t[i+3],e[0]}function u(t,i){return f[3]=t[i],f[2]=t[i+1],f[1]=t[i+2],f[0]=t[i+3],e[0]}var e,f,o,c,a;function l(t,i,n,r,s,h){var u,e=r<0?1:0;0===(r=e?-r:r)?(t(0,s,h+i),t(0<1/r?0:2147483648,s,h+n)):isNaN(r)?(t(0,s,h+i),t(2146959360,s,h+n)):17976931348623157e292<r?(t(0,s,h+i),t((e<<31|2146435072)>>>0,s,h+n)):r<22250738585072014e-324?(t((u=r/5e-324)>>>0,s,h+i),t((e<<31|u/4294967296)>>>0,s,h+n)):(t(4503599627370496*(u=r*Math.pow(2,-(r=1024===(r=Math.floor(Math.log(r)/Math.LN2))?1023:r)))>>>0,s,h+i),t((e<<31|r+1023<<20|1048576*u&1048575)>>>0,s,h+n))}function v(t,i,n,r,s){i=t(r,s+i),t=t(r,s+n),r=2*(t>>31)+1,s=t>>>20&2047,n=4294967296*(1048575&t)+i;return 2047==s?n?NaN:1/0*r:0==s?5e-324*r*n:r*Math.pow(2,s-1075)*(n+4503599627370496)}function w(t,i,n){o[0]=t,i[n]=c[0],i[n+1]=c[1],i[n+2]=c[2],i[n+3]=c[3],i[n+4]=c[4],i[n+5]=c[5],i[n+6]=c[6],i[n+7]=c[7]}function y(t,i,n){o[0]=t,i[n]=c[7],i[n+1]=c[6],i[n+2]=c[5],i[n+3]=c[4],i[n+4]=c[3],i[n+5]=c[2],i[n+6]=c[1],i[n+7]=c[0]}function b(t,i){return c[0]=t[i],c[1]=t[i+1],c[2]=t[i+2],c[3]=t[i+3],c[4]=t[i+4],c[5]=t[i+5],c[6]=t[i+6],c[7]=t[i+7],o[0]}function d(t,i){return c[7]=t[i],c[6]=t[i+1],c[5]=t[i+2],c[4]=t[i+3],c[3]=t[i+4],c[2]=t[i+5],c[1]=t[i+6],c[0]=t[i+7],o[0]}return"undefined"!=typeof Float32Array?(e=new Float32Array([-0]),f=new Uint8Array(e.buffer),a=128===f[3],t.writeFloatLE=a?r:s,t.writeFloatBE=a?s:r,t.readFloatLE=a?h:u,t.readFloatBE=a?u:h):(t.writeFloatLE=i.bind(null,g),t.writeFloatBE=i.bind(null,p),t.readFloatLE=n.bind(null,A),t.readFloatBE=n.bind(null,m)),"undefined"!=typeof Float64Array?(o=new Float64Array([-0]),c=new Uint8Array(o.buffer),a=128===c[7],t.writeDoubleLE=a?w:y,t.writeDoubleBE=a?y:w,t.readDoubleLE=a?b:d,t.readDoubleBE=a?d:b):(t.writeDoubleLE=l.bind(null,g,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 g(t,i,n){i[n]=255&t,i[n+1]=t>>>8&255,i[n+2]=t>>>16&255,i[n+3]=t>>>24}function p(t,i,n){i[n]=t>>>24,i[n+1]=t>>>16&255,i[n+2]=t>>>8&255,i[n+3]=255&t}function A(t,i){return(t[i]|t[i+1]<<8|t[i+2]<<16|t[i+3]<<24)>>>0}function m(t,i){return(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3])>>>0}i.exports=r(r)},{}],5:[function(t,i,n){function r(t){try{var i=eval("require")(t);if(i&&(i.length||Object.keys(i).length))return i}catch(t){}return null}i.exports=r},{}],6:[function(t,i,n){i.exports=function(i,n,t){var r=t||8192,s=r>>>1,h=null,u=r;return function(t){if(t<1||s<t)return i(t);r<u+t&&(h=i(r),u=0);t=n.call(h,u,u+=t);return 7&u&&(u=1+(7|u)),t}}},{}],7:[function(t,i,n){n.length=function(t){for(var i,n=0,r=0;r<t.length;++r)(i=t.charCodeAt(r))<128?n+=1:i<2048?n+=2:55296==(64512&i)&&56320==(64512&t.charCodeAt(r+1))?(++r,n+=4):n+=3;return n},n.read=function(t,i,n){if(n-i<1)return"";for(var r,s=null,h=[],u=0;i<n;)(r=t[i++])<128?h[u++]=r:191<r&&r<224?h[u++]=(31&r)<<6|63&t[i++]:239<r&&r<365?(r=((7&r)<<18|(63&t[i++])<<12|(63&t[i++])<<6|63&t[i++])-65536,h[u++]=55296+(r>>10),h[u++]=56320+(1023&r)):h[u++]=(15&r)<<12|(63&t[i++])<<6|63&t[i++],8191<u&&((s=s||[]).push(String.fromCharCode.apply(String,h)),u=0);return s?(u&&s.push(String.fromCharCode.apply(String,h.slice(0,u))),s.join("")):String.fromCharCode.apply(String,h.slice(0,u))},n.write=function(t,i,n){for(var r,s,h=n,u=0;u<t.length;++u)(r=t.charCodeAt(u))<128?i[n++]=r:(r<2048?i[n++]=r>>6|192:(55296==(64512&r)&&56320==(64512&(s=t.charCodeAt(u+1)))?(++u,i[n++]=(r=65536+((1023&r)<<10)+(1023&s))>>18|240,i[n++]=r>>12&63|128):i[n++]=r>>12|224,i[n++]=r>>6&63|128),i[n++]=63&r|128);return n-h}},{}],8:[function(t,i,n){var r=function(t){Object.defineProperty(t,"i",{value:!0}),t.default=void 0;var l=null;try{l=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(t){}function r(t,i,n){this.low=0|t,this.high=0|i,this.unsigned=!!n}function v(t){return!0===(t&&t.n)}function i(t){var i=Math.clz32(t&-t);return t?31-i:i}Object.defineProperty(r.prototype,"n",{value:!0}),r.isLong=v;var h={},u={};function n(t,i){var n,r,s;return i?(s=0<=(t>>>=0)&&t<256)&&(r=u[t])?r:(n=y(t,0,!0),s&&(u[t]=n),n):(s=-128<=(t|=0)&&t<128)&&(r=h[t])?r:(n=y(t,t<0?-1:0,!1),s&&(h[t]=n),n)}function w(t,i){if(isNaN(t))return i?p:g;if(i){if(t<0)return p;if(e<=t)return j}else{if(t<=-f)return E;if(f<=t+1)return M}return t<0?w(-t,i).neg():y(t%s|0,t/s|0,i)}function y(t,i,n){return new r(t,i,n)}r.fromInt=n,r.fromNumber=w,r.fromBits=y;var o=Math.pow;function c(t,i,n){if(0===t.length)throw Error("empty string");if(i="number"==typeof i?(n=i,!1):!!i,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return i?p:g;if((n=n||10)<2||36<n)throw RangeError("radix");var r;if(0<(r=t.indexOf("-")))throw Error("interior hyphen");if(0==r)return c(t.substring(1),i,n).neg();for(var s=w(o(n,8)),h=g,u=0;u<t.length;u+=8){var e=Math.min(8,t.length-u),f=parseInt(t.substring(u,u+e),n);h=(e<8?(e=w(o(n,e)),h.mul(e)):h=h.mul(s)).add(w(f))}return h.unsigned=i,h}function b(t,i){return"number"==typeof t?w(t,i):"string"==typeof t?c(t,i):y(t.low,t.high,"boolean"==typeof i?i:t.unsigned)}r.fromString=c,r.fromValue=b;var s=4294967296,e=s*s,f=e/2,d=n(1<<24),g=n(0),p=(r.ZERO=g,n(0,!0)),a=(r.UZERO=p,n(1)),A=(r.ONE=a,n(1,!0)),m=(r.UONE=A,n(-1)),M=(r.NEG_ONE=m,y(-1,2147483647,!1)),j=(r.MAX_VALUE=M,y(-1,-1,!0)),E=(r.MAX_UNSIGNED_VALUE=j,y(0,-2147483648,!1)),S=(r.MIN_VALUE=E,r.prototype);return S.toInt=function(){return this.unsigned?this.low>>>0:this.low},S.toNumber=function(){return this.unsigned?(this.high>>>0)*s+(this.low>>>0):this.high*s+(this.low>>>0)},S.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";var i,n;if(this.isNegative())return this.eq(E)?(n=w(t),n=(i=this.div(n)).mul(n).sub(this),i.toString(t)+n.toInt().toString(t)):"-"+this.neg().toString(t);for(var r=w(o(t,6),this.unsigned),s=this,h="";;){var u=s.div(r),e=(s.sub(u.mul(r)).toInt()>>>0).toString(t);if((s=u).isZero())return e+h;for(;e.length<6;)e="0"+e;h=""+e+h}},S.getHighBits=function(){return this.high},S.getHighBitsUnsigned=function(){return this.high>>>0},S.getLowBits=function(){return this.low},S.getLowBitsUnsigned=function(){return this.low>>>0},S.getNumBitsAbs=function(){if(this.isNegative())return this.eq(E)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,i=31;0<i&&0==(t&1<<i);i--);return 0!=this.high?i+33:i+1},S.isZero=function(){return 0===this.high&&0===this.low},S.eqz=S.isZero,S.isNegative=function(){return!this.unsigned&&this.high<0},S.isPositive=function(){return this.unsigned||0<=this.high},S.isOdd=function(){return 1==(1&this.low)},S.isEven=function(){return 0==(1&this.low)},S.equals=function(t){return v(t)||(t=b(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},S.eq=S.equals,S.notEquals=function(t){return!this.eq(t)},S.neq=S.notEquals,S.ne=S.notEquals,S.lessThan=function(t){return this.comp(t)<0},S.lt=S.lessThan,S.lessThanOrEqual=function(t){return this.comp(t)<=0},S.lte=S.lessThanOrEqual,S.le=S.lessThanOrEqual,S.greaterThan=function(t){return 0<this.comp(t)},S.gt=S.greaterThan,S.greaterThanOrEqual=function(t){return 0<=this.comp(t)},S.gte=S.greaterThanOrEqual,S.ge=S.greaterThanOrEqual,S.compare=function(t){var i,n;return v(t)||(t=b(t)),this.eq(t)?0:(i=this.isNegative(),n=t.isNegative(),i&&!n?-1:!i&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1)},S.comp=S.compare,S.negate=function(){return!this.unsigned&&this.eq(E)?E:this.not().add(a)},S.neg=S.negate,S.add=function(t){v(t)||(t=b(t));var i=this.high>>>16,n=65535&this.high,r=this.low>>>16,s=65535&this.low,h=t.high>>>16,u=65535&t.high,e=t.low>>>16,f=0,o=0,c=0,a=0;return o+=(c=c+((a+=s+(65535&t.low))>>>16)+(r+e))>>>16,y((c&=65535)<<16|(a&=65535),((f+=(o+=n+u)>>>16)+(i+h)&65535)<<16|(o&=65535),this.unsigned)},S.subtract=function(t){return v(t)||(t=b(t)),this.add(t.neg())},S.sub=S.subtract,S.multiply=function(t){var i,n,r,s,h,u,e,f,o,c,a;return this.isZero()?this:(v(t)||(t=b(t)),l?y(l.mul(this.low,this.high,t.low,t.high),l.get_high(),this.unsigned):t.isZero()?this.unsigned?p:g:this.eq(E)?t.isOdd()?E:g:t.eq(E)?this.isOdd()?E:g:this.isNegative()?t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg():t.isNegative()?this.mul(t.neg()).neg():this.lt(d)&&t.lt(d)?w(this.toNumber()*t.toNumber(),this.unsigned):(i=this.high>>>16,n=65535&this.high,r=this.low>>>16,s=65535&this.low,h=t.high>>>16,u=65535&t.high,e=t.low>>>16,a=(a=c=o=f=0)+((o=o+((c+=s*(t=65535&t.low))>>>16)+r*t)>>>16)+((o=(o&65535)+s*e)>>>16),y((o&=65535)<<16|(c&=65535),(f=(f=(f+=(a+=n*t)>>>16)+((a=(a&65535)+r*e)>>>16)+((a=(a&65535)+s*u)>>>16))+(i*t+n*e+r*u+s*h)&65535)<<16|(a&=65535),this.unsigned)))},S.mul=S.multiply,S.divide=function(t){if((t=v(t)?t:b(t)).isZero())throw Error("division by zero");var i,n,r;if(l)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?y((this.unsigned?l.div_u:l.div_s)(this.low,this.high,t.low,t.high),l.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?p:g;if(this.unsigned){if((t=t.unsigned?t:t.toUnsigned()).gt(this))return p;if(t.gt(this.shru(1)))return A;n=p}else{if(this.eq(E))return t.eq(a)||t.eq(m)?E:t.eq(E)?a:(r=this.shr(1).div(t).shl(1)).eq(g)?t.isNegative()?a:m:(i=this.sub(t.mul(r)),r.add(i.div(t)));if(t.eq(E))return this.unsigned?p:g;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();n=g}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(r)/Math.LN2),h=s<=48?1:o(2,s-48),u=w(r),e=u.mul(t);e.isNegative()||e.gt(i);)e=(u=w(r-=h,this.unsigned)).mul(t);u.isZero()&&(u=a),n=n.add(u),i=i.sub(e)}return n},S.div=S.divide,S.modulo=function(t){return v(t)||(t=b(t)),l?y((this.unsigned?l.rem_u:l.rem_s)(this.low,this.high,t.low,t.high),l.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},S.mod=S.modulo,S.rem=S.modulo,S.not=function(){return y(~this.low,~this.high,this.unsigned)},S.countLeadingZeros=function(){return this.high?Math.clz32(this.high):32+Math.clz32(this.low)},S.clz=S.countLeadingZeros,S.countTrailingZeros=function(){return this.low?i(this.low):i(this.high)+32},S.ctz=S.countTrailingZeros,S.and=function(t){return v(t)||(t=b(t)),y(this.low&t.low,this.high&t.high,this.unsigned)},S.or=function(t){return v(t)||(t=b(t)),y(this.low|t.low,this.high|t.high,this.unsigned)},S.xor=function(t){return v(t)||(t=b(t)),y(this.low^t.low,this.high^t.high,this.unsigned)},S.shiftLeft=function(t){return v(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?y(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):y(0,this.low<<t-32,this.unsigned)},S.shl=S.shiftLeft,S.shiftRight=function(t){return v(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?y(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):y(this.high>>t-32,0<=this.high?0:-1,this.unsigned)},S.shr=S.shiftRight,S.shiftRightUnsigned=function(t){return v(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?y(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):y(32===t?this.high:this.high>>>t-32,0,this.unsigned)},S.shru=S.shiftRightUnsigned,S.shr_u=S.shiftRightUnsigned,S.rotateLeft=function(t){var i;return v(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?y(this.high,this.low,this.unsigned):t<32?y(this.low<<t|this.high>>>(i=32-t),this.high<<t|this.low>>>i,this.unsigned):y(this.high<<(t-=32)|this.low>>>(i=32-t),this.low<<t|this.high>>>i,this.unsigned)},S.rotl=S.rotateLeft,S.rotateRight=function(t){var i;return v(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?y(this.high,this.low,this.unsigned):t<32?y(this.high<<(i=32-t)|this.low>>>t,this.low<<i|this.high>>>t,this.unsigned):y(this.low<<(i=32-(t-=32))|this.high>>>t,this.high<<i|this.low>>>t,this.unsigned)},S.rotr=S.rotateRight,S.toSigned=function(){return this.unsigned?y(this.low,this.high,!1):this},S.toUnsigned=function(){return this.unsigned?this:y(this.low,this.high,!0)},S.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},S.toBytesLE=function(){var t=this.high,i=this.low;return[255&i,i>>>8&255,i>>>16&255,i>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},S.toBytesBE=function(){var t=this.high,i=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,i>>>24,i>>>16&255,i>>>8&255,255&i]},r.fromBytes=function(t,i,n){return n?r.fromBytesLE(t,i):r.fromBytesBE(t,i)},r.fromBytesLE=function(t,i){return new r(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,i)},r.fromBytesBE=function(t,i){return new r(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],i)},t.default=r,"default"in t?t.default:t}({});"function"==typeof define&&define.amd?define([],function(){return r}):"object"==typeof i&&"object"==typeof n&&(i.exports=r)},{}],9:[function(t,i,n){var r=n;function s(){r.util.r(),r.Writer.r(r.BufferWriter),r.Reader.r(r.BufferReader)}r.build="minimal",r.Writer=t(17),r.BufferWriter=t(18),r.Reader=t(10),r.BufferReader=t(11),r.util=t(16),r.rpc=t(13),r.roots=t(12),r.configure=s,s()},{10:10,11:11,12:12,13:13,16:16,17:17,18:18}],10:[function(t,i,n){i.exports=f;var r,s=t(16),h=s.LongBits,u=s.utf8;function e(t,i){return RangeError("index out of range: "+t.pos+" + "+(i||1)+" > "+t.len)}function f(t){this.buf=t,this.pos=0,this.len=t.length}function o(){return s.Buffer?function(t){return(f.create=function(t){return s.Buffer.isBuffer(t)?new r(t):a(t)})(t)}:a}var c,a="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new f(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new f(t);throw Error("illegal buffer")};function l(){var t=new h(0,0),i=0;if(!(4<this.len-this.pos)){for(;i<3;++i){if(this.pos>=this.len)throw e(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*i)>>>0,t}for(;i<4;++i)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>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(i=0,4<this.len-this.pos){for(;i<5;++i)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}else for(;i<5;++i){if(this.pos>=this.len)throw e(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function v(t,i){return(t[i-4]|t[i-3]<<8|t[i-2]<<16|t[i-1]<<24)>>>0}function w(){if(this.pos+8>this.len)throw e(this,8);return new h(v(this.buf,this.pos+=4),v(this.buf,this.pos+=4))}f.create=o(),f.prototype.s=s.Array.prototype.subarray||s.Array.prototype.slice,f.prototype.uint32=(c=4294967295,function(){if(c=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(c=(c|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128||(c=(c|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128||(c=(c|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128||(c=(c|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128||!((this.pos+=5)>this.len))))))return c;throw this.pos=this.len,e(this,10)}),f.prototype.int32=function(){return 0|this.uint32()},f.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},f.prototype.bool=function(){return 0!==this.uint32()},f.prototype.fixed32=function(){if(this.pos+4>this.len)throw e(this,4);return v(this.buf,this.pos+=4)},f.prototype.sfixed32=function(){if(this.pos+4>this.len)throw e(this,4);return 0|v(this.buf,this.pos+=4)},f.prototype.float=function(){if(this.pos+4>this.len)throw e(this,4);var t=s.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},f.prototype.double=function(){if(this.pos+8>this.len)throw e(this,4);var t=s.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},f.prototype.bytes=function(){var t=this.uint32(),i=this.pos,n=this.pos+t;if(n>this.len)throw e(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(i,n):i===n?new this.buf.constructor(0):this.s.call(this.buf,i,n)},f.prototype.string=function(){var t=this.bytes();return u.read(t,0,t.length)},f.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw e(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw e(this)}while(128&this.buf[this.pos++]);return this},f.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},f.r=function(t){r=t,f.create=o(),r.r(),s.merge(f.prototype,{int64:function(){return l.call(this).toString(!1)},uint64:function(){return l.call(this).toString(!0)},sint64:function(){return l.call(this).zzDecode().toString(!1)},fixed64:function(){return w.call(this).toString(!0)},sfixed64:function(){return w.call(this).toString(!1)}})}},{16:16}],11:[function(t,i,n){i.exports=h;var r=t(10),s=((h.prototype=Object.create(r.prototype)).constructor=h,t(16));function h(t){r.call(this,t)}h.r=function(){s.Buffer&&(h.prototype.s=s.Buffer.prototype.slice)},h.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},h.r()},{10:10,16:16}],12:[function(t,i,n){i.exports={}},{}],13:[function(t,i,n){n.Service=t(14)},{14:14}],14:[function(t,i,n){i.exports=r;var e=t(16);function r(t,i,n){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");e.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!i,this.responseDelimited=!!n}((r.prototype=Object.create(e.EventEmitter.prototype)).constructor=r).prototype.rpcCall=function t(n,i,r,s,h){if(!s)throw TypeError("request must be specified");var u=this;if(!h)return e.asPromise(t,u,n,i,r,s);if(!u.rpcImpl)return setTimeout(function(){h(Error("already ended"))},0),g;try{return u.rpcImpl(n,i[u.requestDelimited?"encodeDelimited":"encode"](s).finish(),function(t,i){if(t)return u.emit("error",t,n),h(t);if(null===i)return u.end(!0),g;if(!(i instanceof r))try{i=r[u.responseDelimited?"decodeDelimited":"decode"](i)}catch(t){return u.emit("error",t,n),h(t)}return u.emit("data",i,n),h(null,i)})}catch(t){return u.emit("error",t,n),setTimeout(function(){h(t)},0),g}},r.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{16:16}],15:[function(t,i,n){i.exports=s;var r=t(16);function s(t,i){this.lo=t>>>0,this.hi=i>>>0}var h=s.zero=new s(0,0),u=(h.toNumber=function(){return 0},h.zzEncode=h.zzDecode=function(){return this},h.length=function(){return 1},s.zeroHash="\0\0\0\0\0\0\0\0",s.fromNumber=function(t){var i,n;return 0===t?h:(n=(t=(i=t<0)?-t:t)>>>0,t=(t-n)/4294967296>>>0,i&&(t=~t>>>0,n=~n>>>0,4294967295<++n&&(n=0,4294967295<++t&&(t=0))),new s(n,t))},s.from=function(t){if("number"==typeof t)return s.fromNumber(t);if(r.isString(t)){if(!r.Long)return s.fromNumber(parseInt(t,10));t=r.Long.fromString(t)}return t.low||t.high?new s(t.low>>>0,t.high>>>0):h},s.prototype.toNumber=function(t){var i;return!t&&this.hi>>>31?(t=1+~this.lo>>>0,i=~this.hi>>>0,-(t+4294967296*(i=t?i:i+1>>>0))):this.lo+4294967296*this.hi},s.prototype.toLong=function(t){return new r.Long(0|this.lo,0|this.hi,!!t)},s.prototype.toString=function(t){return new r.Long(0|this.lo,0|this.hi,!!t).toString()},String.prototype.charCodeAt);s.fromHash=function(t){return"\0\0\0\0\0\0\0\0"===t?h:new s((u.call(t,0)|u.call(t,1)<<8|u.call(t,2)<<16|u.call(t,3)<<24)>>>0,(u.call(t,4)|u.call(t,5)<<8|u.call(t,6)<<16|u.call(t,7)<<24)>>>0)},s.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)},s.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},s.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},s.prototype.length=function(){var t=this.lo,i=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0==n?0==i?t<16384?t<128?1:2:t<2097152?3:4:i<16384?i<128?5:6:i<2097152?7:8:n<128?9:10}},{16:16}],16:[function(t,i,n){var r=n;function s(t,i,n){for(var r=Object.keys(i),s=0;s<r.length;++s)t[r[s]]!==g&&n||(t[r[s]]=i[r[s]]);return t}function h(t){function n(t,i){if(!(this instanceof n))return new n(t,i);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,n):Object.defineProperty(this,"stack",{value:Error().stack||""}),i&&s(this,i)}return n.prototype=Object.create(Error.prototype,{constructor:{value:n,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return t},set:g,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),n}r.asPromise=t(1),r.base64=t(2),r.EventEmitter=t(3),r.float=t(4),r.inquire=t(5),r.utf8=t(7),r.pool=t(6),r.LongBits=t(15),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,i){var n=t[i];return null!=n&&t.hasOwnProperty(i)&&("object"!=typeof n||0<(Array.isArray(n)?n:Object.keys(n)).length)},r.Buffer=function(){try{var t=r.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),r.h=null,r.u=null,r.newBuffer=function(t){return"number"==typeof t?r.Buffer?r.u(t):new r.Array(t):r.Buffer?r.h(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=t(8),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,i){t=r.LongBits.fromHash(t);return r.Long?r.Long.fromBits(t.lo,t.hi,i):t.toNumber(!!i)},r.merge=s,r.lcFirst=function(t){return(t[0]||"").toLowerCase()+t.substring(1)},r.newError=h,r.ProtocolError=h("ProtocolError"),r.oneOfGetter=function(t){for(var n={},i=0;i<t.length;++i)n[t[i]]=1;return function(){for(var t=Object.keys(this),i=t.length-1;-1<i;--i)if(1===n[t[i]]&&this[t[i]]!==g&&null!==this[t[i]])return t[i]}},r.oneOfSetter=function(n){return function(t){for(var i=0;i<n.length;++i)n[i]!==t&&delete this[n[i]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r.r=function(){var n=r.Buffer;n?(r.h=n.from!==Uint8Array.from&&n.from||function(t,i){return new n(t,i)},r.u=n.allocUnsafe||function(t){return new n(t)}):r.h=r.u=null}},{1:1,15:15,2:2,3:3,4:4,5:5,6:6,7:7,8:8}],17:[function(t,i,n){i.exports=a;var r,s=t(16),h=s.LongBits,u=s.base64,e=s.utf8;function f(t,i,n){this.fn=t,this.len=i,this.next=g,this.val=n}function o(){}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 f(o,0,0),this.tail=this.head,this.states=null}function l(){return s.Buffer?function(){return(a.create=function(){return new r})()}:function(){return new a}}function v(t,i,n){i[n]=255&t}function w(t,i){this.len=t,this.next=g,this.val=i}function y(t,i,n){for(;t.hi;)i[n++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;127<t.lo;)i[n++]=127&t.lo|128,t.lo=t.lo>>>7;i[n++]=t.lo}function b(t,i,n){i[n]=255&t,i[n+1]=t>>>8&255,i[n+2]=t>>>16&255,i[n+3]=t>>>24}a.create=l(),a.alloc=function(t){return new s.Array(t)},s.Array!==Array&&(a.alloc=s.pool(a.alloc,s.Array.prototype.subarray)),a.prototype.e=function(t,i,n){return this.tail=this.tail.next=new f(t,i,n),this.len+=i,this},(w.prototype=Object.create(f.prototype)).fn=function(t,i,n){for(;127<t;)i[n++]=127&t|128,t>>>=7;i[n]=t},a.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new w((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?this.e(y,10,h.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=h.from(t);return this.e(y,t.length(),t)},a.prototype.sint64=function(t){t=h.from(t).zzEncode();return this.e(y,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(b,4,t>>>0)},a.prototype.sfixed64=a.prototype.fixed64=function(t){t=h.from(t);return this.e(b,4,t.lo).e(b,4,t.hi)},a.prototype.float=function(t){return this.e(s.float.writeFloatLE,4,t)},a.prototype.double=function(t){return this.e(s.float.writeDoubleLE,8,t)};var d=s.Array.prototype.set?function(t,i,n){i.set(t,n)}:function(t,i,n){for(var r=0;r<t.length;++r)i[n+r]=t[r]};a.prototype.bytes=function(t){var i,n=t.length>>>0;return n?(s.isString(t)&&(i=a.alloc(n=u.length(t)),u.decode(t,i,0),t=i),this.uint32(n).e(d,n,t)):this.e(v,1,0)},a.prototype.string=function(t){var i=e.length(t);return i?this.uint32(i).e(e.write,i,t):this.e(v,1,0)},a.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new f(o,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 f(o,0,0),this.len=0),this},a.prototype.ldelim=function(){var t=this.head,i=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=i,this.len+=n),this},a.prototype.finish=function(){for(var t=this.head.next,i=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,i,n),n+=t.len,t=t.next;return i},a.r=function(t){r=t,a.create=l(),r.r()}},{16:16}],18:[function(t,i,n){i.exports=h;var r=t(17),s=((h.prototype=Object.create(r.prototype)).constructor=h,t(16));function h(){r.call(this)}function u(t,i,n){t.length<40?s.utf8.write(t,i,n):i.utf8Write?i.utf8Write(t,n):i.write(t,n)}h.r=function(){h.alloc=s.u,h.writeBytesBuffer=s.Buffer&&s.Buffer.prototype instanceof Uint8Array&&"set"===s.Buffer.prototype.set.name?function(t,i,n){i.set(t,n)}:function(t,i,n){if(t.copy)t.copy(i,n,0,t.length);else for(var r=0;r<t.length;)i[n++]=t[r++]}},h.prototype.bytes=function(t){var i=(t=s.isString(t)?s.h(t,"base64"):t).length>>>0;return this.uint32(i),i&&this.e(h.writeBytesBuffer,i,t),this},h.prototype.string=function(t){var i=s.Buffer.byteLength(t);return this.uint32(i),i&&this.e(u,i,t),this},h.r()},{16:16,17:17}]},{},[9])}(); | ||
!function(d){"use strict";!function(r,u,t){var n=function t(n){var i=u[n];return i||r[n][0].call(i=u[n]={exports:{}},t,i,i.exports),i.exports}(t[0]);n.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)}({1:[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))}})}},{}],2:[function(t,n,i){i.length=function(t){var n=t.length;if(!n)return 0;for(var i=0;1<--n%4&&"="==(t[0|n]||"");)++i;return Math.ceil(3*t.length)/4-i};for(var f=Array(64),o=Array(123),r=0;r<64;)o[f[r]=r<26?r+65:r<52?r+71:r<62?r-4:r-59|43]=r++;i.encode=function(t,n,i){for(var r,u=null,e=[],s=0,h=0;n<i;){var o=t[n++];switch(h){case 0:e[s++]=f[o>>2],r=(3&o)<<4,h=1;break;case 1:e[s++]=f[r|o>>4],r=(15&o)<<2,h=2;break;case 2:e[s++]=f[r|o>>6],e[s++]=f[63&o],h=0}8191<s&&((u=u||[]).push(String.fromCharCode.apply(String,e)),s=0)}return h&&(e[s++]=f[r],e[s++]=61,1===h&&(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";i.decode=function(t,n,i){for(var r,u=i,e=0,s=0;s<t.length;){var h=t.charCodeAt(s++);if(61==h&&1<e)break;if((h=o[h])===d)throw Error(c);switch(e){case 0:r=h,e=1;break;case 1:n[i++]=r<<2|(48&h)>>4,r=h,e=2;break;case 2:n[i++]=(15&r)<<4|(60&h)>>2,r=h,e=3;break;case 3:n[i++]=(3&r)<<6|h,e=0}}if(1===e)throw Error(c);return i-u},i.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},{}],3:[function(t,n,i){function r(){this.t={}}(n.exports=r).prototype.on=function(t,n,i){return(this.t[t]||(this.t[t]=[])).push({fn:n,ctx:i||this}),this},r.prototype.off=function(t,n){if(t===d)this.t={};else if(n===d)this.t[t]=[];else for(var i=this.t[t],r=0;r<i.length;)i[r].fn===n?i.splice(r,1):++r;return this},r.prototype.emit=function(t){var n=this.t[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}},{}],4:[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){h[0]=t,n[i]=o[0],n[i+1]=o[1],n[i+2]=o[2],n[i+3]=o[3]}function u(t,n,i){h[0]=t,n[i]=o[3],n[i+1]=o[2],n[i+2]=o[1],n[i+3]=o[0]}function e(t,n){return o[0]=t[n],o[1]=t[n+1],o[2]=t[n+2],o[3]=t[n+3],h[0]}function s(t,n){return o[3]=t[n],o[2]=t[n+1],o[1]=t[n+2],o[0]=t[n+3],h[0]}var h,o,f,c,a;function l(t,n,i,r,u,e){var s,h=r<0?1:0;0===(r=h?-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((h<<31|2146435072)>>>0,u,e+i)):r<22250738585072014e-324?(t((s=r/5e-324)>>>0,u,e+n),t((h<<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((h<<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 y(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 g(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?(h=new Float32Array([-0]),o=new Uint8Array(h.buffer),a=128===o[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,d),t.writeFloatBE=n.bind(null,A),t.readFloatLE=i.bind(null,p),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?y:g,t.readDoubleBE=a?g:y):(t.writeDoubleLE=l.bind(null,d,0,4),t.writeDoubleBE=l.bind(null,A,4,0),t.readDoubleLE=v.bind(null,p,0,4),t.readDoubleBE=v.bind(null,m,4,0)),t}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}function A(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 p(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)},{}],5:[function(t,n,i){function r(t){try{var n=eval("require")(t);if(n&&(n.length||Object.keys(n).length))return n}catch(t){}return null}n.exports=r},{}],6:[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}}},{}],7:[function(t,n,i){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=null,e=[],s=0;n<i;)(r=t[n++])<128?e[s++]=r:191<r&&r<224?e[s++]=(31&r)<<6|63&t[n++]:239<r&&r<365?(r=((7&r)<<18|(63&t[n++])<<12|(63&t[n++])<<6|63&t[n++])-65536,e[s++]=55296+(r>>10),e[s++]=56320+(1023&r)):e[s++]=(15&r)<<12|(63&t[n++])<<6|63&t[n++],8191<s&&((u=u||[]).push(String.fromCharCode.apply(String,e)),s=0);return u?(s&&u.push(String.fromCharCode.apply(String,e.slice(0,s))),u.join("")):String.fromCharCode.apply(String,e.slice(0,s))},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}},{}],8:[function(t,n,i){var r=i;function u(){r.util.n(),r.Writer.n(r.BufferWriter),r.Reader.n(r.BufferReader)}r.build="minimal",r.Writer=t(16),r.BufferWriter=t(17),r.Reader=t(9),r.BufferReader=t(10),r.util=t(15),r.rpc=t(12),r.roots=t(11),r.configure=u,u()},{10:10,11:11,12:12,15:15,16:16,17:17,9:9}],9:[function(t,n,i){n.exports=o;var r,u=t(15),e=u.LongBits,s=u.utf8;function h(t,n){return RangeError("index out of range: "+t.pos+" + "+(n||1)+" > "+t.len)}function o(t){this.buf=t,this.pos=0,this.len=t.length}function f(){return u.Buffer?function(t){return(o.create=function(t){return u.Buffer.isBuffer(t)?new r(t):a(t)})(t)}:a}var c,a="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new o(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new o(t);throw Error("illegal buffer")};function l(){var t=new e(0,0),n=0;if(!(4<this.len-this.pos)){for(;n<3;++n){if(this.pos>=this.len)throw h(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 h(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 v(t,n){return(t[n-4]|t[n-3]<<8|t[n-2]<<16|t[n-1]<<24)>>>0}function w(){if(this.pos+8>this.len)throw h(this,8);return new e(v(this.buf,this.pos+=4),v(this.buf,this.pos+=4))}o.create=f(),o.prototype.i=u.Array.prototype.subarray||u.Array.prototype.slice,o.prototype.uint32=(c=4294967295,function(){if(c=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(c=(c|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128||(c=(c|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128||(c=(c|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128||(c=(c|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128||!((this.pos+=5)>this.len))))))return c;throw this.pos=this.len,h(this,10)}),o.prototype.int32=function(){return 0|this.uint32()},o.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},o.prototype.bool=function(){return 0!==this.uint32()},o.prototype.fixed32=function(){if(this.pos+4>this.len)throw h(this,4);return v(this.buf,this.pos+=4)},o.prototype.sfixed32=function(){if(this.pos+4>this.len)throw h(this,4);return 0|v(this.buf,this.pos+=4)},o.prototype.float=function(){if(this.pos+4>this.len)throw h(this,4);var t=u.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},o.prototype.double=function(){if(this.pos+8>this.len)throw h(this,4);var t=u.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},o.prototype.bytes=function(){var t=this.uint32(),n=this.pos,i=this.pos+t;if(i>this.len)throw h(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(n,i):n===i?new this.buf.constructor(0):this.i.call(this.buf,n,i)},o.prototype.string=function(){var t=this.bytes();return s.read(t,0,t.length)},o.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw h(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw h(this)}while(128&this.buf[this.pos++]);return this},o.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},o.n=function(t){r=t,o.create=f(),r.n();var n=u.Long?"toLong":"toNumber";u.merge(o.prototype,{int64:function(){return l.call(this)[n](!1)},uint64:function(){return l.call(this)[n](!0)},sint64:function(){return l.call(this).zzDecode()[n](!1)},fixed64:function(){return w.call(this)[n](!0)},sfixed64:function(){return w.call(this)[n](!1)}})}},{15:15}],10:[function(t,n,i){n.exports=e;var r=t(9),u=((e.prototype=Object.create(r.prototype)).constructor=e,t(15));function e(t){r.call(this,t)}e.n=function(){u.Buffer&&(e.prototype.i=u.Buffer.prototype.slice)},e.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},e.n()},{15:15,9:9}],11:[function(t,n,i){n.exports={}},{}],12:[function(t,n,i){i.Service=t(13)},{13:13}],13:[function(t,n,i){n.exports=r;var h=t(15);function r(t,n,i){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");h.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!n,this.responseDelimited=!!i}((r.prototype=Object.create(h.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 h.asPromise(t,s,i,n,r,u);if(!s.rpcImpl)return setTimeout(function(){e(Error("already ended"))},0),d;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),d;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),d}},r.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{15:15}],14:[function(t,n,i){n.exports=u;var r=t(15);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}},{15:15}],15:[function(t,n,i){var r=i;function u(t,n,i){for(var r=Object.keys(n),u=0;u<r.length;++u)t[r[u]]!==d&&i||(t[r[u]]=n[r[u]]);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:d,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),i}r.asPromise=t(1),r.base64=t(2),r.EventEmitter=t(3),r.float=t(4),r.inquire=t(5),r.utf8=t(7),r.pool=t(6),r.LongBits=t(14),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&&t.hasOwnProperty(n)&&("object"!=typeof i||0<(Array.isArray(i)?i:Object.keys(i)).length)},r.Buffer=function(){try{var t=r.inquire("buffer").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||t("long"),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.merge=u,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]]!==d&&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.n=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}},{1:1,14:14,2:2,3:3,4:4,5:5,6:6,7:7,long:"long"}],16:[function(t,n,i){n.exports=a;var r,u=t(15),e=u.LongBits,s=u.base64,h=u.utf8;function o(t,n,i){this.fn=t,this.len=n,this.next=d,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 o(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){this.len=t,this.next=d,this.val=n}function b(t,n,i){for(;t.hi;)n[i++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;127<t.lo;)n[i++]=127&t.lo|128,t.lo=t.lo>>>7;n[i++]=t.lo}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}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 o(t,n,i),this.len+=n,this},(w.prototype=Object.create(o.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 w((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?this.e(b,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(b,t.length(),t)},a.prototype.sint64=function(t){t=e.from(t).zzEncode();return this.e(b,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(y,4,t>>>0)},a.prototype.sfixed64=a.prototype.fixed64=function(t){t=e.from(t);return this.e(y,4,t.lo).e(y,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 g=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(g,i,t)):this.e(v,1,0)},a.prototype.string=function(t){var n=h.length(t);return n?this.uint32(n).e(h.write,n,t):this.e(v,1,0)},a.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new o(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 o(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(){for(var t=this.head.next,n=this.constructor.alloc(this.len),i=0;t;)t.fn(t.val,n,i),i+=t.len,t=t.next;return n},a.n=function(t){r=t,a.create=l(),r.n()}},{15:15}],17:[function(t,n,i){n.exports=e;var r=t(16),u=((e.prototype=Object.create(r.prototype)).constructor=e,t(15));function e(){r.call(this)}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.n=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.string=function(t){var n=u.Buffer.byteLength(t);return this.uint32(n),n&&this.e(s,n,t),this},e.n()},{15:15,16:16}]},{},[8])}(); | ||
//# sourceMappingURL=protobuf.min.js.map |
{ | ||
"name": "@chenfuqiang/protobufjs", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"versionScheme": "~", | ||
"description": "Protocol Buffers for JavaScript (& TypeScript).", | ||
"author": "chenfuqiang <chenfuqiang@foxmail.com>", | ||
"author": "chenfuqiang <heychenfq@foxmail.com>", | ||
"license": "BSD-3-Clause", | ||
"repository": "heychenfq/protobuf.js", | ||
"bugs": "https://github.com/heychenfq/protobuf.js/issues", | ||
"homepage": "https://github.com/heychenfq/protobuf.js/", | ||
"homepage": "https://protobufjs.github.io/protobuf.js/", | ||
"engines": { | ||
@@ -12,0 +12,0 @@ "node": ">=12.0.0" |
@@ -75,3 +75,4 @@ "use strict"; | ||
if (types.long[field.keyType] !== undefined) gen | ||
("%s[typeof k===\"object\"?util.longToHash(k):k]=value", ref); | ||
// ("%s[typeof k===\"object\"?util.longToHash(k):k]=value", ref); | ||
("%s[typeof k===\"object\"?k.toString():k]=value", ref); | ||
else gen | ||
@@ -78,0 +79,0 @@ ("%s[k]=value", ref); |
@@ -387,22 +387,23 @@ "use strict"; | ||
var fn = util.Long ? "toLong" : /* istanbul ignore next */ "toNumber"; | ||
util.merge(Reader.prototype, { | ||
int64: function read_int64() { | ||
return readLongVarint.call(this).toString(false); | ||
return readLongVarint.call(this)[fn](false); | ||
}, | ||
uint64: function read_uint64() { | ||
return readLongVarint.call(this).toString(true); | ||
return readLongVarint.call(this)[fn](true); | ||
}, | ||
sint64: function read_sint64() { | ||
return readLongVarint.call(this).zzDecode().toString(false); | ||
return readLongVarint.call(this).zzDecode()[fn](false); | ||
}, | ||
fixed64: function read_fixed64() { | ||
return readFixed64.call(this).toString(true); | ||
return readFixed64.call(this)[fn](true); | ||
}, | ||
sfixed64: function read_sfixed64() { | ||
return readFixed64.call(this).toString(false); | ||
return readFixed64.call(this)[fn](false); | ||
} | ||
@@ -409,0 +410,0 @@ |
@@ -115,14 +115,8 @@ "use strict"; | ||
LongBits.prototype.toLong = function toLong(unsigned) { | ||
return new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)); | ||
return util.Long | ||
? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) | ||
/* istanbul ignore next */ | ||
: { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) }; | ||
}; | ||
/** | ||
* Converts this long bits to a string. | ||
* @param {boolean} [unsigned=false] Whether unsigned or not | ||
* @returns {string} String | ||
*/ | ||
LongBits.prototype.toString = function toLong(unsigned) { | ||
return new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)).toString(); | ||
}; | ||
var charCodeAt = String.prototype.charCodeAt; | ||
@@ -129,0 +123,0 @@ |
@@ -180,3 +180,6 @@ "use strict"; | ||
*/ | ||
util.Long = require("long"); | ||
util.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long | ||
|| /* istanbul ignore next */ util.global.Long | ||
// || util.inquire("long"); | ||
|| require("long"); | ||
@@ -183,0 +186,0 @@ /** |
@@ -54,6 +54,5 @@ "use strict"; | ||
case "fixed64": | ||
case "sfixed64": | ||
case "string": gen | ||
("if(!util.isString(%s))", ref) | ||
("return%j", invalid(field, "string")); | ||
case "sfixed64": gen | ||
("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))", ref, ref, ref, ref) | ||
("return%j", invalid(field, "integer|Long")); | ||
break; | ||
@@ -69,2 +68,6 @@ case "float": | ||
break; | ||
case "string": gen | ||
("if(!util.isString(%s))", ref) | ||
("return%j", invalid(field, "string")); | ||
break; | ||
case "bytes": gen | ||
@@ -176,2 +179,2 @@ ("if(!(%s&&typeof %s.length===\"number\"||util.isString(%s)))", ref, ref, ref) | ||
/* eslint-enable no-unexpected-multiline */ | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2767249
77
29254