New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

protobufjs

Package Overview
Dependencies
Maintainers
1
Versions
168
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 6.6.1 to 6.6.2

lib/aspromise/index.d.ts

39

cli/targets/static.js

@@ -139,20 +139,19 @@ "use strict";

var shortVars = {
"r": "reader",
"w": "writer",
"m": "message",
"t": "tag",
"l": "length",
"c": "end", "c2": "end2",
"k": "key",
"ks": "keys", "ks2": "keys2",
"e": "error",
"f": "impl",
"o": "options",
"d": "object",
"n": "long"
};
function beautifyCode(code) {
// Rename short vars
code = code
.replace(/\b(?!\\)r\b/g, "reader")
.replace(/\b(?!\\)w\b/g, "writer")
.replace(/\b(?!\\)m\b/g, "message")
.replace(/\b(?!\\)t\b/g, "tag")
.replace(/\b(?!\\)l\b/g, "length")
.replace(/\b(?!\\)c\b/g, "end")
.replace(/\b(?!\\)c2\b/g, "end2")
.replace(/\b(?!\\)k\b/g, "key")
.replace(/\b(?!\\)ks\b/g, "keys")
.replace(/\b(?!\\)ks2\b/g, "keys2")
.replace(/\b(?!\\)e\b/g, "error")
.replace(/\b(?!\\)f\b/g, "impl")
.replace(/\b(?!\\)o\b/g, "options")
.replace(/\b(?!\\)d\b/g, "object")
.replace(/\b(?!\\)n\b/g, "long");
// Add semicolons

@@ -171,2 +170,8 @@ code = UglifyJS.minify(code, {

enter: function(node, parent) {
// rename short vars
if (node.type === "Identifier" && parent.property !== node && shortVars[node.name])
return {
"type": "Identifier",
"name": shortVars[node.name]
};
// remove braces around block statements with a single child

@@ -173,0 +178,0 @@ if (node.type === "BlockStatement" && reduceableBlockStatements[parent.type] && node.body.length === 1)

/*!
* protobuf.js v6.6.1 (c) 2016, Daniel Wirtz
* Compiled Tue, 24 Jan 2017 13:05:54 UTC
* protobuf.js v6.6.2 (c) 2016, Daniel Wirtz
* Compiled Fri, 27 Jan 2017 16:11:25 UTC
* Licensed under the BSD-3-Clause License
* see: https://github.com/dcodeIO/protobuf.js for details
*/
!function(t,e){"use strict";!function t(e,r,n){function o(s,f){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!f&&u)return u(s,!0);if(i)return i(s,!0);var a=Error("Cannot find module '"+s+"'");throw a.code="MODULE_NOT_FOUND",a}var h=r[s]={exports:{}};e[s][0].call(h.exports,function(t){var r=e[s][1][t];return o(r?r:t)},h,h.exports,t,e,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(t,e){function r(t,e){for(var r=[],n=2;n<arguments.length;)r.push(arguments[n++]);var o=!0;return new Promise(function(n,i){r.push(function(t){if(o)if(o=!1,t)i(t);else{for(var e=[],r=1;r<arguments.length;)e.push(arguments[r++]);n.apply(null,e)}});try{t.apply(e||this,r)}catch(t){o&&(o=!1,i(t))}})}e.exports=r},{}],2:[function(t,r,n){var o=n;o.length=function(t){var e=t.length;if(!e)return 0;for(var r=0;--e%4>1&&"="===t.charAt(e);)++r;return Math.ceil(3*t.length)/4-r};for(var i=Array(64),s=Array(123),f=0;f<64;)s[i[f]=f<26?f+65:f<52?f+71:f<62?f-4:f-59|43]=f++;o.encode=function(t,e,r){for(var n,o=[],s=0,f=0;e<r;){var u=t[e++];switch(f){case 0:o[s++]=i[u>>2],n=(3&u)<<4,f=1;break;case 1:o[s++]=i[n|u>>4],n=(15&u)<<2,f=2;break;case 2:o[s++]=i[n|u>>6],o[s++]=i[63&u],f=0}}return f&&(o[s++]=i[n],o[s]=61,1===f&&(o[s+1]=61)),String.fromCharCode.apply(String,o)};var u="invalid encoding";o.decode=function(t,r,n){for(var o,i=n,f=0,a=0;a<t.length;){var h=t.charCodeAt(a++);if(61===h&&f>1)break;if((h=s[h])===e)throw Error(u);switch(f){case 0:o=h,f=1;break;case 1:r[n++]=o<<2|(48&h)>>4,o=h,f=2;break;case 2:r[n++]=(15&o)<<4|(60&h)>>2,o=h,f=3;break;case 3:r[n++]=(3&o)<<6|h,f=0}}if(1===f)throw Error(u);return n-i},o.test=function(t){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(t)}},{}],3:[function(t,r){function n(){function t(){for(var e=[],r=0;r<arguments.length;)e.push(arguments[r++]);var n=o.apply(null,e),h=c;if(l.length){var p=l[l.length-1];i.test(p)?h=++c:u.test(p)&&++h,f.test(p)&&!f.test(n)?(h=++c,d=!0):d&&a.test(p)&&(h=--c,d=!1),s.test(n)&&(h=--c)}for(r=0;r<h;++r)n="\t"+n;return l.push(n),t}function r(t){return"function"+(t?" "+t.replace(/[^\w_$]/g,"_"):"")+"("+p.join(",")+") {\n"+l.join("\n")+"\n}"}function h(r,o){"object"==typeof r&&(o=r,r=e);var i=t.str(r);n.verbose&&console.log("--- codegen ---\n"+i.replace(/^/gm,"> ").replace(/\t/g," "));var s=Object.keys(o||(o={}));return Function.apply(null,s.concat("return "+i)).apply(null,s.map(function(t){return o[t]}))}for(var p=[],l=[],c=1,d=!1,y=0;y<arguments.length;)p.push(arguments[y++]);return t.str=r,t.eof=h,t}function o(t){for(var e=[],r=1;r<arguments.length;)e.push(arguments[r++]);if(r=0,t=t.replace(/%([dfjs])/g,function(t,n){switch(n){case"d":return Math.floor(e[r++]);case"f":return+e[r++];case"j":return JSON.stringify(e[r++]);default:return e[r++]}}),r!==e.length)throw Error("argument count mismatch");return t}r.exports=n;var i=/[{[]$/,s=/^[}\]]/,f=/:$/,u=/^\s*(?:if|}?else if|while|for)\b|\b(?:else)\s*$/,a=/\b(?:break|continue)(?: \w+)?;?$|^\s*return\b/;n.sprintf=o,n.supported=!1;try{n.supported=1===n("a","b")("return a-b").eof()(2,1)}catch(t){}n.verbose=!1},{}],4:[function(t,r){function n(){this.a={}}r.exports=n;var o=n.prototype;o.on=function(t,e,r){return(this.a[t]||(this.a[t]=[])).push({fn:e,ctx:r||this}),this},o.off=function(t,r){if(t===e)this.a={};else if(r===e)this.a[t]=[];else for(var n=this.a[t],o=0;o<n.length;)n[o].fn===r?n.splice(o,1):++o;return this},o.emit=function(t){var e=this.a[t];if(e){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<e.length;)e[n].fn.apply(e[n++].ctx,r)}return this}},{}],5:[function(t,r){function n(t,e){return e?f&&f.readFile?f.readFile(t,"utf8",function(r,n){return r&&"undefined"!=typeof XMLHttpRequest?o(t,e):e(r,n)}):o(t,e):i(n,this,t)}function o(t,r){var n=new XMLHttpRequest;n.onreadystatechange=function(){return 4===n.readyState?0===n.status||200===n.status?r(null,n.responseText):r(Error("status "+n.status)):e},n.open("GET",t),n.send()}r.exports=n;var i=t(1),s=t(6),f=s("fs")},{1:1,6:6}],6:[function(t,e,r){function n(t){try{var e=eval("quire".replace(/^/,"re"))(t);if(e&&(e.length||Object.keys(e).length))return e}catch(t){}return null}e.exports=n},{}],7:[function(t,e,r){var n=r,o=n.isAbsolute=function(t){return/^(?:\/|\w+:)/.test(t)},i=n.normalize=function(t){t=t.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var e=t.split("/"),r=o(t),n="";r&&(n=e.shift()+"/");for(var i=0;i<e.length;)".."===e[i]?i>0?e.splice(--i,2):r?e.splice(i,1):++i:"."===e[i]?e.splice(i,1):++i;return n+e.join("/")};n.resolve=function(t,e,r){return r||(e=i(e)),o(e)?e:(r||(t=i(t)),(t=t.replace(/(?:\/|^)[^\/]+$/,"")).length?i(t+"/"+e):e)}},{}],8:[function(t,e){function r(t,e,r){var n=r||8192,o=n>>>1,i=null,s=n;return function(r){if(r<1||r>o)return t(r);s+r>n&&(i=t(n),s=0);var f=e.call(i,s,s+=r);return 7&s&&(s=(7|s)+1),f}}e.exports=r},{}],9:[function(t,e,r){var n=r;n.length=function(t){for(var e=0,r=0,n=0;n<t.length;++n)r=t.charCodeAt(n),r<128?e+=1:r<2048?e+=2:55296===(64512&r)&&56320===(64512&t.charCodeAt(n+1))?(++n,e+=4):e+=3;return e},n.read=function(t,e,r){var n=r-e;if(n<1)return"";for(var o,i=null,s=[],f=0;e<r;)o=t[e++],o<128?s[f++]=o:o>191&&o<224?s[f++]=(31&o)<<6|63&t[e++]:o>239&&o<365?(o=((7&o)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,s[f++]=55296+(o>>10),s[f++]=56320+(1023&o)):s[f++]=(15&o)<<12|(63&t[e++])<<6|63&t[e++],f>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,s)),f=0);return i?(f&&i.push(String.fromCharCode.apply(String,s.slice(0,f))),i.join("")):f?String.fromCharCode.apply(String,s.slice(0,f)):""},n.write=function(t,e,r){for(var n,o,i=r,s=0;s<t.length;++s)n=t.charCodeAt(s),n<128?e[r++]=n:n<2048?(e[r++]=n>>6|192,e[r++]=63&n|128):55296===(64512&n)&&56320===(64512&(o=t.charCodeAt(s+1)))?(n=65536+((1023&n)<<10)+(1023&o),++s,e[r++]=n>>18|240,e[r++]=n>>12&63|128,e[r++]=n>>6&63|128,e[r++]=63&n|128):(e[r++]=n>>12|224,e[r++]=n>>6&63|128,e[r++]=63&n|128);return r-i}},{}],10:[function(t,e){function r(e,s){if(n||(n=t(30)),!(e instanceof n))throw TypeError("type must be a Type");if(s){if("function"!=typeof s)throw TypeError("ctor must be a function")}else s=i.codegen("p")("return c.call(this,p)").eof(e.name,{c:o});s.constructor=r,(s.prototype=new o).constructor=s,i.merge(s,o,!0),s.$type=e,s.prototype.$type=e;for(var f=0;f<e.fieldsArray.length;++f)s.prototype[e.b[f].name]=Array.isArray(e.b[f].resolve().defaultValue)?i.emptyArray:i.isObject(e.b[f].defaultValue)&&!e.b[f].long?i.emptyObject:e.b[f].defaultValue;var u={};for(f=0;f<e.oneofsArray.length;++f)u[e.d[f].resolve().name]={get:i.oneOfGetter(e.d[f].oneof),set:i.oneOfSetter(e.d[f].oneof)};return f&&Object.defineProperties(s.prototype,u),e.ctor=s,s.prototype}e.exports=r;var n,o=t(19),i=t(32);r.create=r,r.prototype=o},{19:19,30:30,32:32}],11:[function(t,e,r){function n(t,e,r,n){if(e.resolvedType)if(e.resolvedType instanceof s){t("switch(d%s){",n);for(var o=e.resolvedType.values,i=Object.keys(o),f=0;f<i.length;++f)e.repeated&&o[i[f]]===e.typeDefault&&t("default:"),t("case%j:",i[f])("case %j:",o[i[f]])("m%s=%j",n,o[i[f]])("break");t("}")}else t('if(typeof d%s!=="object")',n)("throw TypeError(%j)",e.fullName+": object expected")("m%s=types[%d].fromObject(d%s)",n,r,n);else{var u=!1;switch(e.type){case"double":case"float":t("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":t("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":t("m%s=d%s|0",n,n);break;case"uint64":u=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,u)('else if(typeof d%s==="string")',n)("m%s=parseInt(d%s,10)",n,n)('else if(typeof d%s==="number")',n)("m%s=d%s",n,n)('else if(typeof d%s==="object")',n)("m%s=new util.LongBits(d%s.low,d%s.high).toNumber(%s)",n,n,n,u?"true":"");break;case"bytes":t('if(typeof d%s==="string")',n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",n,n,n)("else if(d%s.length)",n)("m%s=d%s",n,n);break;case"string":t("m%s=String(d%s)",n,n);break;case"bool":t("m%s=Boolean(d%s)",n,n)}}return t}function o(t,e,r,n){if(e.resolvedType)e.resolvedType instanceof s?t("d%s=o.enums===String?types[%d].values[m%s]:m%s",n,r,n,n):t("d%s=types[%d].toObject(m%s,o)",n,r,n);else{var o=!1;switch(e.type){case"uint64":o=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t('if(typeof m%s==="number")',n)("d%s=o.longs===String?String(m%s):m%s",n,n,n)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low,m%s.high).toNumber(%s):m%s",n,n,n,n,o?"true":"",n);break;case"bytes":t("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",n,n,n,n,n);break;default:t("d%s=m%s",n,n)}}return t}var i=r,s=t(14),f=t(32);i.fromObject=function(t){var e=t.fieldsArray,r=f.codegen("d")("if(d instanceof this.ctor)")("return d");if(!e.length)return r("return new this.ctor");r("var m=new this.ctor");for(var o=0;o<e.length;++o){var i=e[o].resolve(),u=f.safeProp(i.name);i.map?(r("if(d%s){",u)('if(typeof d%s!=="object")',u)("throw TypeError(%j)",i.fullName+": object expected")("m%s={}",u)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",u),n(r,i,o,u+"[ks[i]]")("}")("}")):i.repeated?(r("if(d%s){",u)("if(!Array.isArray(d%s))",u)("throw TypeError(%j)",i.fullName+": array expected")("m%s=[]",u)("for(var i=0;i<d%s.length;++i){",u),n(r,i,o,u+"[i]")("}")("}")):(i.resolvedType instanceof s||r("if(d%s!==undefined&&d%s!==null){",u,u),n(r,i,o,u),i.resolvedType instanceof s||r("}"))}return r("return m")},i.toObject=function(t){var e=t.fieldsArray;if(!e.length)return f.codegen()("return {}");for(var r=f.codegen("m","o")("if(!o)")("o={}")("var d={}"),n=[],i=[],u=[],a=0;a<e.length;++a)e[a].resolve().repeated?n.push(e[a]):e[a].map?i.push(e[a]):u.push(e[a]);if(n.length){for(r("if(o.arrays||o.defaults){"),a=0;a<n.length;++a)r("d%s=[]",f.safeProp(n[a].name));r("}")}if(i.length){for(r("if(o.objects||o.defaults){"),a=0;a<i.length;++a)r("d%s={}",f.safeProp(i[a].name));r("}")}if(u.length){for(r("if(o.defaults){"),a=0,h;a<u.length;++a){var h=u[a],p=f.safeProp(h.name);h.resolvedType instanceof s?r("d%s=o.enums===String?%j:%j",p,h.resolvedType.valuesById[h.typeDefault],h.typeDefault):h.long?r("if(util.Long){")("var n=new util.Long(%d,%d,%j)",h.typeDefault.low,h.typeDefault.high,h.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",p)("}else")("d%s=o.longs===String?%j:%d",p,""+h.typeDefault,h.typeDefault.toNumber()):h.bytes?r("d%s=o.bytes===String?%j:%s",p,String.fromCharCode.apply(String,h.typeDefault),"["+Array.prototype.slice.call(h.typeDefault).join(",")+"]"):r("d%s=%j",p,h.typeDefault)}r("}")}for(a=0,h;a<e.length;++a){var h=e[a],p=f.safeProp(h.name);r("if(m%s!==undefined&&m%s!==null&&m.hasOwnProperty(%j)){",p,p,h.name),h.map?(r("d%s={}",p)("for(var ks2=Object.keys(m%s),j=0;j<ks2.length;++j){",p),o(r,h,a,p+"[ks2[j]]")("}")):h.repeated?(r("d%s=[]",p)("for(var j=0;j<m%s.length;++j){",p),o(r,h,a,p+"[j]")("}")):o(r,h,a,p),r("}")}return r("return d")}},{14:14,32:32}],12:[function(t,r){function n(t){var r=s.codegen("r","l")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor")("while(r.pos<c){")("var t=r.uint32()");t.group&&r("if((t&7)===4)")("break"),r("switch(t>>>3){");for(var f=0;f<t.fieldsArray.length;++f){var u=t.b[f].resolve(),a=u.resolvedType instanceof o?"uint32":u.type,h="m"+s.safeProp(u.name);r("case %d:",u.id),u.map?(r("r.skip().pos++")("if(%s===util.emptyObject)",h)("%s={}",h)("var k=r.%s()",u.keyType)("r.pos++"),i.basic[a]===e?r('%s[typeof k==="object"?util.longToHash(k):k]=types[%d].decode(r,r.uint32())',h,f):r('%s[typeof k==="object"?util.longToHash(k):k]=r.%s()',h,a)):u.repeated?(r("if(!(%s&&%s.length))",h,h)("%s=[]",h),(n.compat||u.packed)&&i.packed[a]!==e&&r("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",h,a)("}else"),i.basic[a]===e?r(u.resolvedType.group?"%s.push(types[%d].decode(r))":"%s.push(types[%d].decode(r,r.uint32()))",h,f):r("%s.push(r.%s())",h,a)):i.basic[a]===e?r(u.resolvedType.group?"%s=types[%d].decode(r)":"%s=types[%d].decode(r,r.uint32())",h,f):r("%s=r.%s()",h,a),r("break")}return r("default:")("r.skipType(t&7)")("break")("}")("}")("return m")}r.exports=n,n.compat=!0;var o=t(14),i=t(31),s=t(32)},{14:14,31:31,32:32}],13:[function(t,r){function n(t,e,r,n){return e.resolvedType.group?t("types[%d].encode(%s,w.uint32(%d)).uint32(%d)",r,n,(e.id<<3|3)>>>0,(e.id<<3|4)>>>0):t("types[%d].encode(%s,w.uint32(%d).fork()).ldelim()",r,n,(e.id<<3|2)>>>0)}function o(t){for(var r,o,u=f.codegen("m","w")("if(!w)")("w=Writer.create()"),r=0;r<t.fieldsArray.length;++r){var a=t.b[r].resolve();if(!a.partOf){var h=a.resolvedType instanceof i?"uint32":a.type,p=s.basic[h];o="m"+f.safeProp(a.name),a.map?(u("if(%s&&m.hasOwnProperty(%j)){",o,a.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",o)("w.uint32(%d).fork().uint32(%d).%s(ks[i])",(a.id<<3|2)>>>0,8|s.mapKey[a.keyType],a.keyType),p===e?u("types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",r,o):u(".uint32(%d).%s(%s[ks[i]]).ldelim()",16|p,h,o),u("}")("}")):a.repeated?a.packed&&s.packed[h]!==e?u("if(%s&&%s.length&&m.hasOwnProperty(%j)){",o,o,a.name)("w.uint32(%d).fork()",(a.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",o)("w.%s(%s[i])",h,o)("w.ldelim()")("}"):(u("if(%s!==undefined&&m.hasOwnProperty(%j)){",o,a.name)("for(var i=0;i<%s.length;++i)",o),p===e?n(u,a,r,o+"[i]"):u("w.uint32(%d).%s(%s[i])",(a.id<<3|p)>>>0,h,o),u("}")):(a.required||(a.long?u("if(%s!==undefined&&%s!==null&&m.hasOwnProperty(%j))",o,o,a.name):a.bytes?u("if(%s&&m.hasOwnProperty(%j))",o,a.name):u("if(%s!==undefined&&m.hasOwnProperty(%j))",o,a.name)),p===e?n(u,a,r,o):u("w.uint32(%d).%s(%s)",(a.id<<3|p)>>>0,h,o))}}for(var r=0;r<t.oneofsArray.length;++r){var l=t.d[r];u("switch(%s){","m"+f.safeProp(l.name));for(var c=0;c<l.fieldsArray.length;++c){var a=l.fieldsArray[c],h=a.resolvedType instanceof i?"uint32":a.type,p=s.basic[h];o="m"+f.safeProp(a.name),u("case%j:",a.name),p===e?n(u,a,t.b.indexOf(a),o):u("w.uint32(%d).%s(%s)",(a.id<<3|p)>>>0,h,o),u("break")}u("}")}return u("return w")}r.exports=o;var i=t(14),s=t(31),f=t(32)},{14:14,31:31,32:32}],14:[function(t,r){function n(t,e,r){if(o.call(this,t,r),e&&"object"!=typeof e)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comments={},e)for(var n=Object.keys(e),i=0;i<n.length;++i)this.valuesById[this.values[n[i]]=e[n[i]]]=n[i]}r.exports=n;var o=t(22);((n.prototype=Object.create(o.prototype)).constructor=n).className="Enum";var i=t(32);n.fromJSON=function(t,e){return new n(t,e.values,e.options)},n.prototype.toJSON=function(){return{options:this.options,values:this.values}},n.prototype.add=function(t,r,n){if(!i.isString(t))throw TypeError("name must be a string");if(!i.isInteger(r))throw TypeError("id must be an integer");if(this.values[t]!==e)throw Error("duplicate name");if(this.valuesById[r]!==e)throw Error("duplicate id");return this.valuesById[this.values[t]=r]=t,this.comments[t]=n||null,this},n.prototype.remove=function(t){if(!i.isString(t))throw TypeError("name must be a string");var r=this.values[t];if(r===e)throw Error("name does not exist");return delete this.valuesById[r],delete this.values[t],delete this.comments[t],this}},{22:22,32:32}],15:[function(t,r){function n(t,r,n,i,s,a){if(u.isObject(i)?(a=i,i=s=e):u.isObject(s)&&(a=s,s=e),o.call(this,t,a),!u.isInteger(r)||r<0)throw TypeError("id must be a non-negative integer");if(!u.isString(n))throw TypeError("type must be a string");if(i!==e&&!/^required|optional|repeated$/.test(i=(""+i).toLowerCase()))throw TypeError("rule must be a string rule");if(s!==e&&!u.isString(s))throw TypeError("extend must be a string");this.rule=i&&"optional"!==i?i:e,this.type=n,this.id=r,this.extend=s||e,this.required="required"===i,this.optional=!this.required,this.repeated="repeated"===i,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!u.Long&&f.long[n]!==e,this.bytes="bytes"===n,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.e=null}r.exports=n;var o=t(22);((n.prototype=Object.create(o.prototype)).constructor=n).className="Field";var i,s=t(14),f=t(31),u=t(32);Object.defineProperty(n.prototype,"packed",{get:function(){return null===this.e&&(this.e=this.getOption("packed")!==!1),this.e}}),n.prototype.setOption=function(t,e,r){return"packed"===t&&(this.e=null),o.prototype.setOption.call(this,t,e,r)},n.fromJSON=function(t,e){return new n(t,e.id,e.type,e.rule,e.extend,e.options)},n.prototype.toJSON=function(){return{rule:"optional"!==this.rule&&this.rule||e,type:this.type,id:this.id,extend:this.extend,options:this.options}},n.prototype.resolve=function(){if(this.resolved)return this;if((this.typeDefault=f.defaults[this.type])===e)if(i||(i=t(30)),this.resolvedType=this.parent.lookup(this.type,i))this.typeDefault=null;else{if(!(this.resolvedType=this.parent.lookup(this.type,s)))throw Error("unresolvable field type: "+this.type);this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]}if(this.options&&this.options.default!==e&&(this.typeDefault=this.options.default,this.resolvedType instanceof s&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.long)this.typeDefault=u.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var r;u.base64.test(this.typeDefault)?u.base64.decode(this.typeDefault,r=u.newBuffer(u.base64.length(this.typeDefault)),0):u.utf8.write(this.typeDefault,r=u.newBuffer(u.utf8.length(this.typeDefault)),0),this.typeDefault=r}return this.map?this.defaultValue=u.emptyObject:this.repeated?this.defaultValue=u.emptyArray:this.defaultValue=this.typeDefault,o.prototype.resolve.call(this)}},{14:14,22:22,30:30,31:31,32:32}],16:[function(t,e){function r(t,e,r){return"function"==typeof e?(r=e,e=new o.Root):e||(e=new o.Root),e.load(t,r)}function n(t,e){return e||(e=new o.Root),e.loadSync(t)}var o=e.exports=t(17);o.build="light",o.load=r,o.loadSync=n,o.encoder=t(13),o.decoder=t(12),o.verifier=t(35),o.converter=t(11),o.ReflectionObject=t(22),o.Namespace=t(21),o.Root=t(26),o.Enum=t(14),o.Type=t(30),o.Field=t(15),o.OneOf=t(23),o.MapField=t(18),o.Service=t(29),o.Method=t(20),o.Class=t(10),o.Message=t(19),o.types=t(31),o.util=t(32),o.ReflectionObject.f(o.Root),o.Namespace.f(o.Type,o.Service),o.Root.f(o.Type)},{10:10,11:11,12:12,13:13,14:14,15:15,17:17,18:18,19:19,20:20,21:21,22:22,23:23,26:26,29:29,30:30,31:31,32:32,35:35}],17:[function(e,r,n){function o(){i.Reader.f(i.BufferReader)}var i=t.protobuf=n;i.build="minimal",i.roots={},i.Writer=e(36),i.BufferWriter=e(37),i.Reader=e(24),i.BufferReader=e(25),i.util=e(34),i.rpc=e(27),i.configure=o,"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&(i.util.Long=t,o()),i}),i.Writer.f(i.BufferWriter),o()},{24:24,25:25,27:27,34:34,36:36,37:37}],18:[function(t,r){function n(t,e,r,n,i){if(o.call(this,t,e,n,i),!s.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}r.exports=n;var o=t(15);((n.prototype=Object.create(o.prototype)).constructor=n).className="MapField";var i=t(31),s=t(32);n.fromJSON=function(t,e){return new n(t,e.id,e.keyType,e.type,e.options)},n.prototype.toJSON=function(){return{keyType:this.keyType,type:this.type,id:this.id,extend:this.extend,options:this.options}},n.prototype.resolve=function(){if(this.resolved)return this;if(i.mapKey[this.keyType]===e)throw Error("invalid key type: "+this.keyType);return o.prototype.resolve.call(this)}},{15:15,31:31,32:32}],19:[function(t,e){function r(t){if(t)for(var e=Object.keys(t),r=0;r<e.length;++r)this[e[r]]=t[e[r]]}e.exports=r;var n=t(32);r.encode=function(t,e){return this.$type.encode(t,e)},r.encodeDelimited=function(t,e){return this.$type.encodeDelimited(t,e)},r.decode=function(t){return this.$type.decode(t)},r.decodeDelimited=function(t){return this.$type.decodeDelimited(t)},r.verify=function(t){return this.$type.verify(t)},r.fromObject=function(t){return this.$type.fromObject(t)},r.from=r.fromObject,r.toObject=function(t,e){return this.$type.toObject(t,e)},r.prototype.toObject=function(t){return this.$type.toObject(this,t)},r.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},{32:32}],20:[function(t,r){function n(t,r,n,s,f,u,a){if(i.isObject(f)?(a=f,f=u=e):i.isObject(u)&&(a=u,u=e),r!==e&&!i.isString(r))throw TypeError("type must be a string");if(!i.isString(n))throw TypeError("requestType must be a string");if(!i.isString(s))throw TypeError("responseType must be a string");o.call(this,t,a),this.type=r||"rpc",this.requestType=n,this.requestStream=!!f||e,this.responseType=s,this.responseStream=!!u||e,this.resolvedRequestType=null,this.resolvedResponseType=null}r.exports=n;var o=t(22);((n.prototype=Object.create(o.prototype)).constructor=n).className="Method";var i=t(32);n.fromJSON=function(t,e){return new n(t,e.type,e.requestType,e.responseType,e.requestStream,e.responseStream,e.options)},n.prototype.toJSON=function(){return{type:"rpc"!==this.type&&this.type||e,requestType:this.requestType,requestStream:this.requestStream,responseType:this.responseType,responseStream:this.responseStream,options:this.options}},n.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),o.prototype.resolve.call(this))}},{22:22,32:32}],21:[function(t,r){function n(t){if(!t||!t.length)return e;for(var r={},n=0;n<t.length;++n)r[t[n].name]=t[n].toJSON();return r}function o(t,r){s.call(this,t,r),this.nested=e,this.g=null}function i(t){return t.g=null,t}r.exports=o;var s=t(22);((o.prototype=Object.create(s.prototype)).constructor=o).className="Namespace";var f,u,a=t(14),h=t(15),p=t(32);o.fromJSON=function(t,e){return new o(t,e.options).addJSON(e.nested)},o.arrayToJSON=n,Object.defineProperty(o.prototype,"nestedArray",{get:function(){return this.g||(this.g=p.toArray(this.nested))}}),o.prototype.toJSON=function(){return{options:this.options,nested:n(this.nestedArray)}},o.prototype.addJSON=function(t){var r=this;if(t)for(var n,i=Object.keys(t),s=0;s<i.length;++s)n=t[i[s]],r.add((n.fields!==e?f.fromJSON:n.values!==e?a.fromJSON:n.methods!==e?u.fromJSON:n.id!==e?h.fromJSON:o.fromJSON)(i[s],n));return this},o.prototype.get=function(t){return this.nested&&this.nested[t]||null},o.prototype.getEnum=function(t){if(this.nested&&this.nested[t]instanceof a)return this.nested[t].values;throw Error("no such enum")},o.prototype.add=function(t){if(!(t instanceof h&&t.extend!==e||t instanceof f||t instanceof a||t instanceof u||t instanceof o))throw TypeError("object must be a valid nested object");if(this.nested){var r=this.get(t.name);if(r){if(!(r instanceof o&&t instanceof o)||r instanceof f||r instanceof u)throw Error("duplicate name '"+t.name+"' in "+this);for(var n=r.nestedArray,s=0;s<n.length;++s)t.add(n[s]);this.remove(r),this.nested||(this.nested={}),t.setOptions(r.options,!0)}}else this.nested={};return this.nested[t.name]=t,t.onAdd(this),i(this)},o.prototype.remove=function(t){if(!(t instanceof s))throw TypeError("object must be a ReflectionObject");if(t.parent!==this)throw Error(t+" is not a member of "+this);return delete this.nested[t.name],Object.keys(this.nested).length||(this.nested=e),t.onRemove(this),i(this)},o.prototype.define=function(t,e){if(p.isString(t))t=t.split(".");else if(!Array.isArray(t))throw TypeError("illegal path");if(t&&t.length&&""===t[0])throw Error("path must be relative");for(var r=this;t.length>0;){var n=t.shift();if(r.nested&&r.nested[n]){if(r=r.nested[n],!(r instanceof o))throw Error("path conflicts with non-namespace objects")}else r.add(r=new o(n))}return e&&r.addJSON(e),r},o.prototype.resolveAll=function(){for(var t=this.nestedArray,e=0;e<t.length;)t[e]instanceof o?t[e++].resolveAll():t[e++].resolve();return this.resolve()},o.prototype.lookup=function(t,r,n){if("boolean"==typeof r&&(n=r,r=e),p.isString(t)&&t.length){if("."===t)return this.root;t=t.split(".")}else if(!t.length)return this;if(""===t[0])return this.root.lookup(t.slice(1),r);var i=this.get(t[0]);if(i)if(1===t.length){if(!r||i instanceof r)return i}else if(i instanceof o&&(i=i.lookup(t.slice(1),r,!0)))return i;return null===this.parent||n?null:this.parent.lookup(t,r)},o.prototype.lookupType=function(t){var e=this.lookup(t,f);if(!e)throw Error("no such type");return e},o.prototype.lookupService=function(t){var e=this.lookup(t,u);if(!e)throw Error("no such service");return e},o.prototype.lookupEnum=function(t){var e=this.lookup(t,a);if(!e)throw Error("no such enum");return e.values},o.f=function(t,e){f=t,u=e}},{14:14,15:15,22:22,32:32}],22:[function(t,r){function n(t,e){if(!i.isString(t))throw TypeError("name must be a string");if(e&&!i.isObject(e))throw TypeError("options must be an object");this.options=e,this.name=t,this.parent=null,this.resolved=!1,this.comment=null}r.exports=n,n.className="ReflectionObject";var o,i=t(32);Object.defineProperties(n.prototype,{root:{get:function(){for(var t=this;null!==t.parent;)t=t.parent;return t}},fullName:{get:function(){for(var t=[this.name],e=this.parent;e;)t.unshift(e.name),e=e.parent;return t.join(".")}}}),n.prototype.toJSON=function(){throw Error()},n.prototype.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var e=t.root;e instanceof o&&e.h(this)},n.prototype.onRemove=function(t){var e=t.root;e instanceof o&&e.i(this),this.parent=null,this.resolved=!1},n.prototype.resolve=function(){return this.resolved?this:(this.root instanceof o&&(this.resolved=!0),this)},n.prototype.getOption=function(t){return this.options?this.options[t]:e},n.prototype.setOption=function(t,r,n){return n&&this.options&&this.options[t]!==e||((this.options||(this.options={}))[t]=r),this},n.prototype.setOptions=function(t,e){if(t)for(var r=Object.keys(t),n=0;n<r.length;++n)this.setOption(r[n],t[r[n]],e);return this},n.prototype.toString=function(){var t=this.constructor.className,e=this.fullName;return e.length?t+" "+e:t},n.f=function(t){o=t}},{32:32}],23:[function(t,r){function n(t,r,n){if(Array.isArray(r)||(n=r,r=e),i.call(this,t,n),r!==e&&!Array.isArray(r))throw TypeError("fieldNames must be an Array");this.oneof=r||[],this.fieldsArray=[]}function o(t){if(t.parent)for(var e=0;e<t.fieldsArray.length;++e)t.fieldsArray[e].parent||t.parent.add(t.fieldsArray[e])}r.exports=n;var i=t(22);((n.prototype=Object.create(i.prototype)).constructor=n).className="OneOf";var s=t(15);n.fromJSON=function(t,e){return new n(t,e.oneof,e.options)},n.prototype.toJSON=function(){return{oneof:this.oneof,options:this.options}},n.prototype.add=function(t){if(!(t instanceof s))throw TypeError("field must be a Field");return t.parent&&t.parent!==this.parent&&t.parent.remove(t),this.oneof.push(t.name),this.fieldsArray.push(t),t.partOf=this,o(this),this},n.prototype.remove=function(t){if(!(t instanceof s))throw TypeError("field must be a Field");var e=this.fieldsArray.indexOf(t);if(e<0)throw Error(t+" is not a member of "+this);return this.fieldsArray.splice(e,1),e=this.oneof.indexOf(t.name),e>-1&&this.oneof.splice(e,1),t.partOf=null,this},n.prototype.onAdd=function(t){i.prototype.onAdd.call(this,t);for(var e=this,r=0;r<this.oneof.length;++r){var n=t.get(this.oneof[r]);n&&!n.partOf&&(n.partOf=e,e.fieldsArray.push(n))}o(this)},n.prototype.onRemove=function(t){for(var e,r=0;r<this.fieldsArray.length;++r)(e=this.fieldsArray[r]).parent&&e.parent.remove(e);i.prototype.onRemove.call(this,t)}},{15:15,22:22}],24:[function(t,e){function r(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function n(t){this.buf=t,this.pos=0,this.len=t.length}function o(){var t=new b(0,0),e=0;if(!(this.len-this.pos>4)){for(;e<3;++e){if(this.pos>=this.len)throw r(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*e)>>>0,t}for(;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>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(e=0,this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw r(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function i(){return o.call(this).toLong()}function s(){return o.call(this).toNumber()}function f(){return o.call(this).toLong(!0)}function u(){return o.call(this).toNumber(!0)}function a(){return o.call(this).zzDecode().toLong()}function h(){return o.call(this).zzDecode().toNumber()}function p(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function l(){if(this.pos+8>this.len)throw r(this,8);return new b(p(this.buf,this.pos+=4),p(this.buf,this.pos+=4))}function c(){return l.call(this).toLong(!0)}function d(){return l.call(this).toNumber(!0)}function y(){return l.call(this).zzDecode().toLong()}function m(){return l.call(this).zzDecode().toNumber()}e.exports=n;var v,g=t(34),b=g.LongBits,w=g.utf8;n.create=g.Buffer?function(t){return(n.create=function(t){return g.Buffer.isBuffer(t)?new v(t):new n(t)})(t)}:function(t){return new n(t)},n.prototype.j=g.Array.prototype.subarray||g.Array.prototype.slice,n.prototype.uint32=function(){var t=4294967295;return function(){if(t=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return t;if((this.pos+=5)>this.len)throw this.pos=this.len,r(this,10);return t}}(),n.prototype.int32=function(){return 0|this.uint32()},n.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},n.prototype.bool=function(){return 0!==this.uint32()},n.prototype.fixed32=function(){if(this.pos+4>this.len)throw r(this,4);return p(this.buf,this.pos+=4)},n.prototype.sfixed32=function(){var t=this.fixed32();return t>>>1^-(1&t)};var O="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[3]?function(r,n){return e[0]=r[n],e[1]=r[n+1],e[2]=r[n+2],e[3]=r[n+3],t[0]}:function(r,n){return e[3]=r[n],e[2]=r[n+1],e[1]=r[n+2],e[0]=r[n+3],t[0]}}():function(t,e){var r=p(t,e+4),n=2*(r>>31)+1,o=r>>>23&255,i=8388607&r;return 255===o?i?NaN:n*(1/0):0===o?1.401298464324817e-45*n*i:n*Math.pow(2,o-150)*(i+8388608)};n.prototype.float=function(){if(this.pos+4>this.len)throw r(this,4);var t=O(this.buf,this.pos);return this.pos+=4,t};var j="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[7]?function(r,n){return e[0]=r[n],e[1]=r[n+1],e[2]=r[n+2],e[3]=r[n+3],e[4]=r[n+4],e[5]=r[n+5],e[6]=r[n+6],e[7]=r[n+7],t[0]}:function(r,n){return e[7]=r[n],e[6]=r[n+1],e[5]=r[n+2],e[4]=r[n+3],e[3]=r[n+4],e[2]=r[n+5],e[1]=r[n+6],e[0]=r[n+7],t[0]}}():function(t,e){var r=p(t,e+4),n=p(t,e+8),o=2*(n>>31)+1,i=n>>>20&2047,s=4294967296*(1048575&n)+r;return 2047===i?s?NaN:o*(1/0):0===i?5e-324*o*s:o*Math.pow(2,i-1075)*(s+4503599627370496)};n.prototype.double=function(){if(this.pos+8>this.len)throw r(this,4);var t=j(this.buf,this.pos);return this.pos+=8,t},n.prototype.bytes=function(){var t=this.uint32(),e=this.pos,n=this.pos+t;if(n>this.len)throw r(this,t);return this.pos+=t,e===n?new this.buf.constructor(0):this.j.call(this.buf,e,n)},n.prototype.string=function(){var t=this.bytes();return w.read(t,0,t.length);
},n.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw r(this,t);this.pos+=t}else do if(this.pos>=this.len)throw r(this);while(128&this.buf[this.pos++]);return this},n.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(;;){if(4===(t=7&this.uint32()))break;this.skipType(t)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},n.f=function(t){v=t,g.Long?(n.prototype.int64=i,n.prototype.uint64=f,n.prototype.sint64=a,n.prototype.fixed64=c,n.prototype.sfixed64=y):(n.prototype.int64=s,n.prototype.uint64=u,n.prototype.sint64=h,n.prototype.fixed64=d,n.prototype.sfixed64=m)}},{34:34}],25:[function(t,e){function r(t){n.call(this,t)}e.exports=r;var n=t(24);(r.prototype=Object.create(n.prototype)).constructor=r;var o=t(34);o.Buffer&&(r.prototype.j=o.Buffer.prototype.slice),r.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len))}},{24:24,34:34}],26:[function(t,r){function n(t){s.call(this,"",t),this.deferred=[],this.files=[]}function o(){}function i(t,r){var n=r.parent.lookup(r.extend);if(n){var o=new h(r.fullName,r.id,r.type,r.rule,e,r.options);return o.declaringField=r,r.extensionField=o,n.add(o),!0}return!1}r.exports=n;var s=t(21);((n.prototype=Object.create(s.prototype)).constructor=n).className="Root";var f,u,a,h=t(15),p=t(14),l=t(32);n.fromJSON=function(t,e){return e||(e=new n),t.options&&e.setOptions(t.options),e.addJSON(t.nested)},n.prototype.resolvePath=l.path.resolve,n.prototype.load=function t(r,n,i){function s(t,e){if(i){var r=i;if(i=null,c)throw t;r(t,e)}}function f(t,e){try{if(l.isString(e)&&"{"===e.charAt(0)&&(e=JSON.parse(e)),l.isString(e)){u.filename=t;var r=u(e,p,n),o=0;if(r.imports)for(;o<r.imports.length;++o)h(p.resolvePath(t,r.imports[o]));if(r.weakImports)for(o=0;o<r.weakImports.length;++o)h(p.resolvePath(t,r.weakImports[o]),!0)}else p.setOptions(e.options).addJSON(e.nested)}catch(t){s(t)}c||d||s(null,p)}function h(t,r){var n=t.lastIndexOf("google/protobuf/");if(n>-1){var o=t.substring(n);o in a&&(t=o)}if(!(p.files.indexOf(t)>-1)){if(p.files.push(t),t in a)return c?f(t,a[t]):(++d,setTimeout(function(){--d,f(t,a[t])})),e;if(c){var u;try{u=l.fs.readFileSync(t).toString("utf8")}catch(t){return r||s(t),e}f(t,u)}else++d,l.fetch(t,function(n,o){if(--d,i)return n?(r?d||s(null,p):s(n),e):(f(t,o),e)})}}"function"==typeof n&&(i=n,n=e);var p=this;if(!i)return l.asPromise(t,p,r);var c=i===o,d=0;l.isString(r)&&(r=[r]);for(var y=0;y<r.length;++y)h(p.resolvePath("",r[y]));return c?p:(d||s(null,p),e)},n.prototype.loadSync=function(t,e){if(!l.isNode)throw Error("not supported");return this.load(t,e,o)},n.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(t){return"'extend "+t.extend+"' in "+t.parent.fullName}).join(", "));return s.prototype.resolveAll.call(this)};var c=/^[A-Z]/;n.prototype.h=function(t){if(t instanceof h)t.extend===e||t.extensionField||i(this,t)||this.deferred.push(t);else if(t instanceof p)c.test(t.name)&&(t.parent[t.name]=t.values);else{if(t instanceof f)for(var r=0;r<this.deferred.length;)i(this,this.deferred[r])?this.deferred.splice(r,1):++r;for(var n=0;n<t.nestedArray.length;++n)this.h(t.g[n]);c.test(t.name)&&(t.parent[t.name]=t)}},n.prototype.i=function(t){if(t instanceof h){if(t.extend!==e)if(t.extensionField)t.extensionField.parent.remove(t.extensionField),t.extensionField=null;else{var r=this.deferred.indexOf(t);r>-1&&this.deferred.splice(r,1)}}else if(t instanceof p)c.test(t.name)&&delete t.parent[t.name];else if(t instanceof s){for(var n=0;n<t.nestedArray.length;++n)this.i(t.g[n]);c.test(t.name)&&delete t.parent[t.name]}},n.f=function(t,e,r){f=t,u=e,a=r}},{14:14,15:15,21:21,32:32}],27:[function(t,e,r){var n=r;n.Service=t(28)},{28:28}],28:[function(t,r){function n(t,e,r){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");o.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!e,this.responseDelimited=!!r}r.exports=n;var o=t(34);(n.prototype=Object.create(o.EventEmitter.prototype)).constructor=n,n.prototype.rpcCall=function t(r,n,i,s,f){if(!s)throw TypeError("request must be specified");var u=this;if(!f)return o.asPromise(t,u,r,n,i,s);if(!u.rpcImpl)return setTimeout(function(){f(Error("already ended"))},0),e;try{return u.rpcImpl(r,n[u.requestDelimited?"encodeDelimited":"encode"](s).finish(),function(t,n){if(t)return u.emit("error",t,r),f(t);if(null===n)return u.end(!0),e;if(!(n instanceof i))try{n=i[u.responseDelimited?"decodeDelimited":"decode"](n)}catch(t){return u.emit("error",t,r),f("error",t)}return u.emit("data",n,r),f(null,n)})}catch(t){return u.emit("error",t,r),setTimeout(function(){f(t)},0),e}},n.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{34:34}],29:[function(t,r){function n(t,e){i.call(this,t,e),this.methods={},this.k=null}function o(t){return t.k=null,t}r.exports=n;var i=t(21);((n.prototype=Object.create(i.prototype)).constructor=n).className="Service";var s=t(20),f=t(32),u=t(27);n.fromJSON=function(t,e){var r=new n(t,e.options);if(e.methods)for(var o=Object.keys(e.methods),i=0;i<o.length;++i)r.add(s.fromJSON(o[i],e.methods[o[i]]));return r},Object.defineProperty(n.prototype,"methodsArray",{get:function(){return this.k||(this.k=f.toArray(this.methods))}}),n.prototype.toJSON=function(){var t=i.prototype.toJSON.call(this);return{options:t&&t.options||e,methods:i.arrayToJSON(this.methodsArray)||{},nested:t&&t.nested||e}},n.prototype.get=function(t){return this.methods[t]||i.prototype.get.call(this,t)},n.prototype.resolveAll=function(){for(var t=this.methodsArray,e=0;e<t.length;++e)t[e].resolve();return i.prototype.resolve.call(this)},n.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);return t instanceof s?(this.methods[t.name]=t,t.parent=this,o(this)):i.prototype.add.call(this,t)},n.prototype.remove=function(t){if(t instanceof s){if(this.methods[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.methods[t.name],t.parent=null,o(this)}return i.prototype.remove.call(this,t)},n.prototype.create=function(t,e,r){for(var n=new u.Service(t,e,r),o=0;o<this.methodsArray.length;++o)n[f.lcFirst(this.k[o].resolve().name)]=f.codegen("r","c")("return this.rpcCall(m,q,s,r,c)").eof(f.lcFirst(this.k[o].name),{m:this.k[o],q:this.k[o].resolvedRequestType.ctor,s:this.k[o].resolvedResponseType.ctor});return n}},{20:20,21:21,27:27,32:32}],30:[function(t,r){function n(t,r){i.call(this,t,r),this.fields={},this.oneofs=e,this.extensions=e,this.reserved=e,this.group=e,this.l=null,this.b=null,this.d=null,this.n=null}function o(t){return t.l=t.b=t.d=t.n=null,delete t.encode,delete t.decode,delete t.verify,t}r.exports=n;var i=t(21);((n.prototype=Object.create(i.prototype)).constructor=n).className="Type";var s=t(14),f=t(23),u=t(15),a=t(18),h=t(29),p=t(10),l=t(19),c=t(24),d=t(36),y=t(32),m=t(13),v=t(12),g=t(35),b=t(11);n.fromJSON=function(t,r){var o=new n(t,r.options);o.extensions=r.extensions,o.reserved=r.reserved;for(var p=Object.keys(r.fields),l=0;l<p.length;++l)o.add((e!==r.fields[p[l]].keyType?a.fromJSON:u.fromJSON)(p[l],r.fields[p[l]]));if(r.oneofs)for(p=Object.keys(r.oneofs),l=0;l<p.length;++l)o.add(f.fromJSON(p[l],r.oneofs[p[l]]));if(r.nested)for(p=Object.keys(r.nested),l=0;l<p.length;++l){var c=r.nested[p[l]];o.add((c.id!==e?u.fromJSON:c.fields!==e?n.fromJSON:c.values!==e?s.fromJSON:c.methods!==e?h.fromJSON:i.fromJSON)(p[l],c))}return r.extensions&&r.extensions.length&&(o.extensions=r.extensions),r.reserved&&r.reserved.length&&(o.reserved=r.reserved),r.group&&(o.group=!0),o},Object.defineProperties(n.prototype,{fieldsById:{get:function(){if(this.l)return this.l;this.l={};for(var t=Object.keys(this.fields),e=0;e<t.length;++e){var r=this.fields[t[e]],n=r.id;if(this.l[n])throw Error("duplicate id "+n+" in "+this);this.l[n]=r}return this.l}},fieldsArray:{get:function(){return this.b||(this.b=y.toArray(this.fields))}},oneofsArray:{get:function(){return this.d||(this.d=y.toArray(this.oneofs))}},ctor:{get:function(){return this.n||(this.n=p(this).constructor)},set:function(t){if(t&&!(t.prototype instanceof l))throw TypeError("ctor must be a Message constructor");t.from||(t.from=l.from),this.n=t}}}),n.prototype.toJSON=function(){var t=i.prototype.toJSON.call(this);return{options:t&&t.options||e,oneofs:i.arrayToJSON(this.oneofsArray),fields:i.arrayToJSON(this.fieldsArray.filter(function(t){return!t.declaringField}))||{},extensions:this.extensions&&this.extensions.length?this.extensions:e,reserved:this.reserved&&this.reserved.length?this.reserved:e,group:this.group||e,nested:t&&t.nested||e}},n.prototype.resolveAll=function(){for(var t=this.fieldsArray,e=0;e<t.length;)t[e++].resolve();var r=this.oneofsArray;for(e=0;e<r.length;)r[e++].resolve();return i.prototype.resolve.call(this)},n.prototype.get=function(t){return this.fields[t]||this.oneofs&&this.oneofs[t]||this.nested&&this.nested[t]||null},n.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);if(t instanceof u&&t.extend===e){if(this.fieldsById[t.id])throw Error("duplicate id "+t.id+" in "+this);return t.parent&&t.parent.remove(t),this.fields[t.name]=t,t.message=this,t.onAdd(this),o(this)}return t instanceof f?(this.oneofs||(this.oneofs={}),this.oneofs[t.name]=t,t.onAdd(this),o(this)):i.prototype.add.call(this,t)},n.prototype.remove=function(t){if(t instanceof u&&t.extend===e){if(!this.fields||this.fields[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.fields[t.name],t.parent=null,t.onRemove(this),o(this)}if(t instanceof f){if(!this.oneofs||this.oneofs[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.oneofs[t.name],t.parent=null,t.onRemove(this),o(this)}return i.prototype.remove.call(this,t)},n.prototype.create=function(t){return new this.ctor(t)},n.prototype.setup=function(){for(var t=this.fullName,e=[],r=0;r<this.fieldsArray.length;++r)e.push(this.b[r].resolve().resolvedType);return this.encode=m(this).eof(t+"$encode",{Writer:d,types:e,util:y}),this.decode=v(this).eof(t+"$decode",{Reader:c,types:e,util:y}),this.verify=g(this).eof(t+"$verify",{types:e,util:y}),this.fromObject=this.from=b.fromObject(this).eof(t+"$fromObject",{types:e,util:y}),this.toObject=b.toObject(this).eof(t+"$toObject",{types:e,util:y}),this},n.prototype.encode=function(t,e){return this.setup().encode(t,e)},n.prototype.encodeDelimited=function(t,e){return this.encode(t,e&&e.len?e.fork():e).ldelim()},n.prototype.decode=function(t,e){return this.setup().decode(t,e)},n.prototype.decodeDelimited=function(t){return t instanceof c||(t=c.create(t)),this.decode(t,t.uint32())},n.prototype.verify=function(t){return this.setup().verify(t)},n.prototype.fromObject=function(t){return this.setup().fromObject(t)},n.prototype.from=n.prototype.fromObject,n.prototype.toObject=function(t,e){return this.setup().toObject(t,e)}},{10:10,11:11,12:12,13:13,14:14,15:15,18:18,19:19,21:21,23:23,24:24,29:29,32:32,35:35,36:36}],31:[function(t,e,r){function n(t,e){var r=0,n={};for(e|=0;r<t.length;)n[s[r+e]]=t[r++];return n}var o=r,i=t(32),s=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];o.basic=n([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),o.defaults=n([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",i.emptyArray,null]),o.long=n([0,0,0,1,1],7),o.mapKey=n([0,0,0,5,5,0,0,0,1,1,0,2],2),o.packed=n([1,5,0,0,0,5,5,0,0,0,1,1,0])},{32:32}],32:[function(t,e){var r=e.exports=t(34);r.codegen=t(3),r.fetch=t(5),r.path=t(7),r.fs=r.inquire("fs"),r.toArray=function(t){var e=[];if(t)for(var r=Object.keys(t),n=0;n<r.length;++n)e.push(t[r[n]]);return e},r.safeProp=function(t){return'["'+t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"]'},r.ucFirst=function(t){return t.charAt(0).toUpperCase()+t.substring(1)}},{3:3,34:34,5:5,7:7}],33:[function(t,e){function r(t,e){this.lo=t,this.hi=e}e.exports=r;var n=t(34),o=r.zero=new r(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var i=r.zeroHash="\0\0\0\0\0\0\0\0";r.fromNumber=function(t){if(0===t)return o;var e=t<0;e&&(t=-t);var n=t>>>0,i=(t-n)/4294967296>>>0;return e&&(i=~i>>>0,n=~n>>>0,++n>4294967295&&(n=0,++i>4294967295&&(i=0))),new r(n,i)},r.from=function(t){if("number"==typeof t)return r.fromNumber(t);if(n.isString(t)){if(!n.Long)return r.fromNumber(parseInt(t,10));t=n.Long.fromString(t)}return t.low||t.high?new r(t.low>>>0,t.high>>>0):o},r.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=~this.lo+1>>>0,r=~this.hi>>>0;return e||(r=r+1>>>0),-(e+4294967296*r)}return this.lo+4294967296*this.hi},r.prototype.toLong=function(t){return n.Long?new n.Long(0|this.lo,0|this.hi,(!!t)):{low:0|this.lo,high:0|this.hi,unsigned:!!t}};var s=String.prototype.charCodeAt;r.fromHash=function(t){return t===i?o:new r((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)},r.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)},r.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},r.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},r.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:r<128?9:10}},{34:34}],34:[function(r,n,o){var i=o;i.asPromise=r(1),i.base64=r(2),i.EventEmitter=r(4),i.inquire=r(6),i.utf8=r(9),i.pool=r(8),i.LongBits=r(33),i.emptyArray=Object.freeze?Object.freeze([]):[],i.emptyObject=Object.freeze?Object.freeze({}):{},i.isNode=!!(t.process&&t.process.versions&&t.process.versions.node),i.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},i.isString=function(t){return"string"==typeof t||t instanceof String},i.isObject=function(t){return t&&"object"==typeof t},i.Buffer=function(){try{var t=i.inquire("buffer").Buffer;return t.prototype.utf8Write?(t.from||(t.from=function(e,r){return new t(e,r)}),t.allocUnsafe||(t.allocUnsafe=function(e){return new t(e)}),t):null}catch(t){return null}}(),i.newBuffer=function(t){return"number"==typeof t?i.Buffer?i.Buffer.allocUnsafe(t):new i.Array(t):i.Buffer?i.Buffer.from(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},i.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,i.Long=t.dcodeIO&&t.dcodeIO.Long||i.inquire("long"),i.longToHash=function(t){return t?i.LongBits.from(t).toHash():i.LongBits.zeroHash},i.longFromHash=function(t,e){var r=i.LongBits.fromHash(t);return i.Long?i.Long.fromBits(r.lo,r.hi,e):r.toNumber(!!e)},i.merge=function(t,r,n){for(var o=Object.keys(r),i=0;i<o.length;++i)t[o[i]]!==e&&n||(t[o[i]]=r[o[i]]);return t},i.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},i.oneOfGetter=function(t){for(var r={},n=0;n<t.length;++n)r[t[n]]=1;return function(){for(var t=Object.keys(this),n=t.length-1;n>-1;--n)if(1===r[t[n]]&&this[t[n]]!==e&&null!==this[t[n]])return t[n]}},i.oneOfSetter=function(t){return function(e){for(var r=0;r<t.length;++r)t[r]!==e&&delete this[t[r]]}},i.lazyResolve=function(t,e){for(var r=0;r<e.length;++r)for(var n=Object.keys(e[r]),o=0;o<n.length;++o){for(var i=e[r][n[o]].split("."),s=t;i.length;)s=s[i.shift()];e[r][n[o]]=s}},i.toJSONOptions={longs:String,enums:String,bytes:String}},{1:1,2:2,33:33,4:4,6:6,8:8,9:9}],35:[function(t,e){function r(t,e){return t.name+": "+e+(t.repeated&&"array"!==e?"[]":t.map&&"object"!==e?"{k:"+t.keyType+"}":"")+" expected"}function n(t,e,n,o){if(e.resolvedType)if(e.resolvedType instanceof s){t("switch(%s){",o)("default:")("return%j",r(e,"enum value"));for(var i=Object.keys(e.resolvedType.values),f=0;f<i.length;++f)t("case %d:",e.resolvedType.values[i[f]]);t("break")("}")}else t("var e=types[%d].verify(%s);",n,o)("if(e)")("return%j+e",e.name+".");else switch(e.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.isInteger(%s))",o)("return%j",r(e,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",o,o,o,o)("return%j",r(e,"integer|Long"));break;case"float":case"double":t('if(typeof %s!=="number")',o)("return%j",r(e,"number"));break;case"bool":t('if(typeof %s!=="boolean")',o)("return%j",r(e,"boolean"));break;case"string":t("if(!util.isString(%s))",o)("return%j",r(e,"string"));break;case"bytes":t('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',o,o,o)("return%j",r(e,"buffer"))}return t}function o(t,e,n){switch(e.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!/^-?(?:0|[1-9][0-9]*)$/.test(%s))",n)("return%j",r(e,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/.test(%s))",n)("return%j",r(e,"integer|Long key"));break;case"bool":t("if(!/^true|false|0|1$/.test(%s))",n)("return%j",r(e,"boolean key"))}return t}function i(t){if(!t.fieldsArray.length)return f.codegen()("return null");for(var e=f.codegen("m"),i=0;i<t.b.length;++i){var u=t.b[i].resolve(),a="m"+f.safeProp(u.name);u.map?(e("if(%s!==undefined){",a)("if(!util.isObject(%s))",a)("return%j",r(u,"object"))("var k=Object.keys(%s)",a)("for(var i=0;i<k.length;++i){"),o(e,u,"k[i]"),n(e,u,i,a+"[k[i]]")("}")("}")):u.repeated?(e("if(%s!==undefined){",a)("if(!Array.isArray(%s))",a)("return%j",r(u,"array"))("for(var i=0;i<%s.length;++i){",a),n(e,u,i,a+"[i]")("}")("}")):(u.required||(!u.resolvedType||u.resolvedType instanceof s?e("if(%s!==undefined){",a):e("if(%s!==undefined&&%s!==null){",a,a)),n(e,u,i,a),u.required||e("}"))}return e("return null")}e.exports=i;var s=t(14),f=t(32)},{14:14,32:32}],36:[function(t,r){function n(t,r,n){this.fn=t,this.len=r,this.next=e,this.val=n}function o(){}function i(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function s(){this.len=0,this.head=new n(o,0,0),this.tail=this.head,this.states=null}function f(t,e,r){e[r]=255&t}function u(t,e,r){for(;t>127;)e[r++]=127&t|128,t>>>=7;e[r]=t}function a(t,r){this.len=t,this.next=e,this.val=r}function h(t,e,r){for(;t.hi;)e[r++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[r++]=127&t.lo|128,t.lo=t.lo>>>7;e[r++]=t.lo}function p(t,e,r){e[r++]=255&t,e[r++]=t>>>8&255,e[r++]=t>>>16&255,e[r]=t>>>24}r.exports=s;var l,c=t(34),d=c.LongBits,y=c.base64,m=c.utf8;s.create=c.Buffer?function(){return(s.create=function(){return new l})()}:function(){return new s},s.alloc=function(t){return new c.Array(t)},c.Array!==Array&&(s.alloc=c.pool(s.alloc,c.Array.prototype.subarray)),s.prototype.push=function(t,e,r){return this.tail=this.tail.next=new n(t,e,r),this.len+=e,this},a.prototype=Object.create(n.prototype),a.prototype.fn=u,s.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new a((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},s.prototype.int32=function(t){return t<0?this.push(h,10,d.fromNumber(t)):this.uint32(t)},s.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},s.prototype.uint64=function(t){var e=d.from(t);return this.push(h,e.length(),e)},s.prototype.int64=s.prototype.uint64,s.prototype.sint64=function(t){var e=d.from(t).zzEncode();return this.push(h,e.length(),e)},s.prototype.bool=function(t){return this.push(f,1,t?1:0)},s.prototype.fixed32=function(t){return this.push(p,4,t>>>0)},s.prototype.sfixed32=function(t){return this.push(p,4,t<<1^t>>31)},s.prototype.fixed64=function(t){var e=d.from(t);return this.push(p,4,e.lo).push(p,4,e.hi)},s.prototype.sfixed64=function(t){var e=d.from(t).zzEncode();return this.push(p,4,e.lo).push(p,4,e.hi)};var v="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[3]?function(r,n,o){t[0]=r,n[o++]=e[0],n[o++]=e[1],n[o++]=e[2],n[o]=e[3]}:function(r,n,o){t[0]=r,n[o++]=e[3],n[o++]=e[2],n[o++]=e[1],n[o]=e[0]}}():function(t,e,r){var n=t<0?1:0;if(n&&(t=-t),0===t)p(1/t>0?0:2147483648,e,r);else if(isNaN(t))p(2147483647,e,r);else if(t>3.4028234663852886e38)p((n<<31|2139095040)>>>0,e,r);else if(t<1.1754943508222875e-38)p((n<<31|Math.round(t/1.401298464324817e-45))>>>0,e,r);else{var o=Math.floor(Math.log(t)/Math.LN2),i=8388607&Math.round(t*Math.pow(2,-o)*8388608);p((n<<31|o+127<<23|i)>>>0,e,r)}};s.prototype.float=function(t){return this.push(v,4,t)};var g="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[7]?function(r,n,o){t[0]=r,n[o++]=e[0],n[o++]=e[1],n[o++]=e[2],n[o++]=e[3],n[o++]=e[4],n[o++]=e[5],n[o++]=e[6],n[o]=e[7]}:function(r,n,o){t[0]=r,n[o++]=e[7],n[o++]=e[6],n[o++]=e[5],n[o++]=e[4],n[o++]=e[3],n[o++]=e[2],n[o++]=e[1],n[o]=e[0]}}():function(t,e,r){var n=t<0?1:0;if(n&&(t=-t),0===t)p(0,e,r),p(1/t>0?0:2147483648,e,r+4);else if(isNaN(t))p(4294967295,e,r),p(2147483647,e,r+4);else if(t>1.7976931348623157e308)p(0,e,r),p((n<<31|2146435072)>>>0,e,r+4);else{var o;if(t<2.2250738585072014e-308)o=t/5e-324,p(o>>>0,e,r),p((n<<31|o/4294967296)>>>0,e,r+4);else{var i=Math.floor(Math.log(t)/Math.LN2);1024===i&&(i=1023),o=t*Math.pow(2,-i),p(4503599627370496*o>>>0,e,r),p((n<<31|i+1023<<20|1048576*o&1048575)>>>0,e,r+4)}}};s.prototype.double=function(t){return this.push(g,8,t)};var b=c.Array.prototype.set?function(t,e,r){e.set(t,r)}:function(t,e,r){for(var n=0;n<t.length;++n)e[r+n]=t[n]};s.prototype.bytes=function(t){var e=t.length>>>0;if(!e)return this.push(f,1,0);if(c.isString(t)){var r=s.alloc(e=y.length(t));y.decode(t,r,0),t=r}return this.uint32(e).push(b,e,t)},s.prototype.string=function(t){var e=m.length(t);return e?this.uint32(e).push(m.write,e,t):this.push(f,1,0)},s.prototype.fork=function(){return this.states=new i(this),this.head=this.tail=new n(o,0,0),this.len=0,this},s.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 n(o,0,0),this.len=0),this},s.prototype.ldelim=function(){var t=this.head,e=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=t.next,this.tail=e,this.len+=r),this},s.prototype.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),r=0;t;)t.fn(t.val,e,r),r+=t.len,t=t.next;return e},s.f=function(t){l=t}},{34:34}],37:[function(t,e){function r(){o.call(this)}function n(t,e,r){t.length<40?i.utf8.write(t,e,r):e.utf8Write(t,r)}e.exports=r;var o=t(36);(r.prototype=Object.create(o.prototype)).constructor=r;var i=t(34),s=i.Buffer;r.alloc=function(t){return(r.alloc=s.allocUnsafe)(t)};var f=s&&s.prototype instanceof Uint8Array&&"set"===s.prototype.set.name?function(t,e,r){e.set(t,r)}:function(t,e,r){if(t.copy)t.copy(e,r,0,t.length);else for(var n=0;n<t.length;)e[r++]=t[n++]};r.prototype.bytes=function(t){i.isString(t)&&(t=s.from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this.push(f,e,t),this},r.prototype.string=function(t){var e=s.byteLength(t);return this.uint32(e),e&&this.push(n,e,t),this}},{34:34,36:36}]},{},[16])}("object"==typeof window&&window||"object"==typeof self&&self||this);
!function(t,e){"use strict";!function(e,r,n){function o(t){var n=r[t];return n||e[t][0].call(n=r[t]={exports:{}},o,n,n.exports),n.exports}var i=t.protobuf=o(n[0]);"function"==typeof define&&define.amd&&define(["long"],function(t){return i.util.Long=t,i.configure(),i}),"object"==typeof module&&module&&module.exports&&(module.exports=i)}({1:[function(t,e){function r(t,e){for(var r=[],n=2;n<arguments.length;)r.push(arguments[n++]);var o=!0;return new Promise(function(n,i){r.push(function(t){if(o)if(o=!1,t)i(t);else{for(var e=[],r=1;r<arguments.length;)e.push(arguments[r++]);n.apply(null,e)}});try{t.apply(e||this,r)}catch(t){o&&(o=!1,i(t))}})}e.exports=r},{}],2:[function(t,r,n){var o=n;o.length=function(t){var e=t.length;if(!e)return 0;for(var r=0;--e%4>1&&"="===t.charAt(e);)++r;return Math.ceil(3*t.length)/4-r};for(var i=Array(64),s=Array(123),f=0;f<64;)s[i[f]=f<26?f+65:f<52?f+71:f<62?f-4:f-59|43]=f++;o.encode=function(t,e,r){for(var n,o=[],s=0,f=0;e<r;){var u=t[e++];switch(f){case 0:o[s++]=i[u>>2],n=(3&u)<<4,f=1;break;case 1:o[s++]=i[n|u>>4],n=(15&u)<<2,f=2;break;case 2:o[s++]=i[n|u>>6],o[s++]=i[63&u],f=0}}return f&&(o[s++]=i[n],o[s]=61,1===f&&(o[s+1]=61)),String.fromCharCode.apply(String,o)};var u="invalid encoding";o.decode=function(t,r,n){for(var o,i=n,f=0,a=0;a<t.length;){var p=t.charCodeAt(a++);if(61===p&&f>1)break;if((p=s[p])===e)throw Error(u);switch(f){case 0:o=p,f=1;break;case 1:r[n++]=o<<2|(48&p)>>4,o=p,f=2;break;case 2:r[n++]=(15&o)<<4|(60&p)>>2,o=p,f=3;break;case 3:r[n++]=(3&o)<<6|p,f=0}}if(1===f)throw Error(u);return n-i},o.test=function(t){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(t)}},{}],3:[function(t,r){function n(){function t(){for(var e=[],r=0;r<arguments.length;)e.push(arguments[r++]);var n=o.apply(null,e),p=c;if(l.length){var h=l[l.length-1];i.test(h)?p=++c:u.test(h)&&++p,f.test(h)&&!f.test(n)?(p=++c,d=!0):d&&a.test(h)&&(p=--c,d=!1),s.test(n)&&(p=--c)}for(r=0;r<p;++r)n="\t"+n;return l.push(n),t}function r(t){return"function"+(t?" "+t.replace(/[^\w_$]/g,"_"):"")+"("+h.join(",")+") {\n"+l.join("\n")+"\n}"}function p(r,o){"object"==typeof r&&(o=r,r=e);var i=t.str(r);n.verbose&&console.log("--- codegen ---\n"+i.replace(/^/gm,"> ").replace(/\t/g," "));var s=Object.keys(o||(o={}));return Function.apply(null,s.concat("return "+i)).apply(null,s.map(function(t){return o[t]}))}for(var h=[],l=[],c=1,d=!1,y=0;y<arguments.length;)h.push(arguments[y++]);return t.str=r,t.eof=p,t}function o(t){for(var e=[],r=1;r<arguments.length;)e.push(arguments[r++]);if(r=0,t=t.replace(/%([dfjs])/g,function(t,n){switch(n){case"d":return Math.floor(e[r++]);case"f":return+e[r++];case"j":return JSON.stringify(e[r++]);default:return e[r++]}}),r!==e.length)throw Error("argument count mismatch");return t}r.exports=n;var i=/[{[]$/,s=/^[}\]]/,f=/:$/,u=/^\s*(?:if|}?else if|while|for)\b|\b(?:else)\s*$/,a=/\b(?:break|continue)(?: \w+)?;?$|^\s*return\b/;n.sprintf=o,n.supported=!1;try{n.supported=1===n("a","b")("return a-b").eof()(2,1)}catch(t){}n.verbose=!1},{}],4:[function(t,r){function n(){this.a={}}r.exports=n,n.prototype.on=function(t,e,r){return(this.a[t]||(this.a[t]=[])).push({fn:e,ctx:r||this}),this},n.prototype.off=function(t,r){if(t===e)this.a={};else if(r===e)this.a[t]=[];else for(var n=this.a[t],o=0;o<n.length;)n[o].fn===r?n.splice(o,1):++o;return this},n.prototype.emit=function(t){var e=this.a[t];if(e){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<e.length;)e[n].fn.apply(e[n++].ctx,r)}return this}},{}],5:[function(t,r){function n(t,e,r){return"function"==typeof e?(r=e,e={}):e||(e={}),r?!e.xhr&&s&&s.readFile?s.readFile(t,function(o,i){return o&&"undefined"!=typeof XMLHttpRequest?n.xhr(t,e,r):o?r(o):r(null,e.binary?i:i.toString("utf8"))}):n.xhr(t,e,r):o(n,this,t,e)}r.exports=n;var o=t(1),i=t(6),s=i("fs");n.xhr=function(t,r,n){var o=new XMLHttpRequest;o.onreadystatechange=function(){if(4!==o.readyState)return e;if(0!==o.status&&200!==o.status)return n(Error("status "+o.status));if(r.binary){var t=o.response;if(!t){t=[];for(var i=0;i<o.responseText.length;++i)t.push(255&o.responseText.charCodeAt(i))}return n(null,"undefined"!=typeof Uint8Array?new Uint8Array(t):t)}return n(null,o.responseText)},r.binary&&("overrideMimeType"in o&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.responseType="arraybuffer"),o.open("GET",t),o.send()}},{1:1,6:6}],6:[function(t,e,r){function n(t){try{var e=eval("quire".replace(/^/,"re"))(t);if(e&&(e.length||Object.keys(e).length))return e}catch(t){}return null}e.exports=n},{}],7:[function(t,e,r){var n=r,o=n.isAbsolute=function(t){return/^(?:\/|\w+:)/.test(t)},i=n.normalize=function(t){t=t.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var e=t.split("/"),r=o(t),n="";r&&(n=e.shift()+"/");for(var i=0;i<e.length;)".."===e[i]?i>0?e.splice(--i,2):r?e.splice(i,1):++i:"."===e[i]?e.splice(i,1):++i;return n+e.join("/")};n.resolve=function(t,e,r){return r||(e=i(e)),o(e)?e:(r||(t=i(t)),(t=t.replace(/(?:\/|^)[^\/]+$/,"")).length?i(t+"/"+e):e)}},{}],8:[function(t,e){function r(t,e,r){var n=r||8192,o=n>>>1,i=null,s=n;return function(r){if(r<1||r>o)return t(r);s+r>n&&(i=t(n),s=0);var f=e.call(i,s,s+=r);return 7&s&&(s=(7|s)+1),f}}e.exports=r},{}],9:[function(t,e,r){var n=r;n.length=function(t){for(var e=0,r=0,n=0;n<t.length;++n)r=t.charCodeAt(n),r<128?e+=1:r<2048?e+=2:55296===(64512&r)&&56320===(64512&t.charCodeAt(n+1))?(++n,e+=4):e+=3;return e},n.read=function(t,e,r){var n=r-e;if(n<1)return"";for(var o,i=null,s=[],f=0;e<r;)o=t[e++],o<128?s[f++]=o:o>191&&o<224?s[f++]=(31&o)<<6|63&t[e++]:o>239&&o<365?(o=((7&o)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,s[f++]=55296+(o>>10),s[f++]=56320+(1023&o)):s[f++]=(15&o)<<12|(63&t[e++])<<6|63&t[e++],f>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,s)),f=0);return i?(f&&i.push(String.fromCharCode.apply(String,s.slice(0,f))),i.join("")):String.fromCharCode.apply(String,s.slice(0,f))},n.write=function(t,e,r){for(var n,o,i=r,s=0;s<t.length;++s)n=t.charCodeAt(s),n<128?e[r++]=n:n<2048?(e[r++]=n>>6|192,e[r++]=63&n|128):55296===(64512&n)&&56320===(64512&(o=t.charCodeAt(s+1)))?(n=65536+((1023&n)<<10)+(1023&o),++s,e[r++]=n>>18|240,e[r++]=n>>12&63|128,e[r++]=n>>6&63|128,e[r++]=63&n|128):(e[r++]=n>>12|224,e[r++]=n>>6&63|128,e[r++]=63&n|128);return r-i}},{}],10:[function(t,e){function r(e,s){if(n||(n=t(30)),!(e instanceof n))throw TypeError("type must be a Type");if(s){if("function"!=typeof s)throw TypeError("ctor must be a function")}else s=i.codegen("p")("return c.call(this,p)").eof(e.name,{c:o});s.constructor=r,(s.prototype=new o).constructor=s,i.merge(s,o,!0),s.$type=e,s.prototype.$type=e;for(var f=0;f<e.fieldsArray.length;++f)s.prototype[e.b[f].name]=Array.isArray(e.b[f].resolve().defaultValue)?i.emptyArray:i.isObject(e.b[f].defaultValue)&&!e.b[f].long?i.emptyObject:e.b[f].defaultValue;var u={};for(f=0;f<e.oneofsArray.length;++f)u[e.d[f].resolve().name]={get:i.oneOfGetter(e.d[f].oneof),set:i.oneOfSetter(e.d[f].oneof)};return f&&Object.defineProperties(s.prototype,u),e.ctor=s,s.prototype}e.exports=r;var n,o=t(19),i=t(32);r.create=r,r.prototype=o},{19:19,30:30,32:32}],11:[function(t,e,r){function n(t,e,r,n){if(e.resolvedType)if(e.resolvedType instanceof s){t("switch(d%s){",n);for(var o=e.resolvedType.values,i=Object.keys(o),f=0;f<i.length;++f)e.repeated&&o[i[f]]===e.typeDefault&&t("default:"),t("case%j:",i[f])("case %j:",o[i[f]])("m%s=%j",n,o[i[f]])("break");t("}")}else t('if(typeof d%s!=="object")',n)("throw TypeError(%j)",e.fullName+": object expected")("m%s=types[%d].fromObject(d%s)",n,r,n);else{var u=!1;switch(e.type){case"double":case"float":t("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":t("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":t("m%s=d%s|0",n,n);break;case"uint64":u=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,u)('else if(typeof d%s==="string")',n)("m%s=parseInt(d%s,10)",n,n)('else if(typeof d%s==="number")',n)("m%s=d%s",n,n)('else if(typeof d%s==="object")',n)("m%s=new util.LongBits(d%s.low,d%s.high).toNumber(%s)",n,n,n,u?"true":"");break;case"bytes":t('if(typeof d%s==="string")',n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",n,n,n)("else if(d%s.length)",n)("m%s=d%s",n,n);break;case"string":t("m%s=String(d%s)",n,n);break;case"bool":t("m%s=Boolean(d%s)",n,n)}}return t}function o(t,e,r,n){if(e.resolvedType)e.resolvedType instanceof s?t("d%s=o.enums===String?types[%d].values[m%s]:m%s",n,r,n,n):t("d%s=types[%d].toObject(m%s,o)",n,r,n);else{var o=!1;switch(e.type){case"uint64":o=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t('if(typeof m%s==="number")',n)("d%s=o.longs===String?String(m%s):m%s",n,n,n)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low,m%s.high).toNumber(%s):m%s",n,n,n,n,o?"true":"",n);break;case"bytes":t("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",n,n,n,n,n);break;default:t("d%s=m%s",n,n)}}return t}var i=r,s=t(14),f=t(32);i.fromObject=function(t){var e=t.fieldsArray,r=f.codegen("d")("if(d instanceof this.ctor)")("return d");if(!e.length)return r("return new this.ctor");r("var m=new this.ctor");for(var o=0;o<e.length;++o){var i=e[o].resolve(),u=f.safeProp(i.name);i.map?(r("if(d%s){",u)('if(typeof d%s!=="object")',u)("throw TypeError(%j)",i.fullName+": object expected")("m%s={}",u)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",u),n(r,i,o,u+"[ks[i]]")("}")("}")):i.repeated?(r("if(d%s){",u)("if(!Array.isArray(d%s))",u)("throw TypeError(%j)",i.fullName+": array expected")("m%s=[]",u)("for(var i=0;i<d%s.length;++i){",u),n(r,i,o,u+"[i]")("}")("}")):(i.resolvedType instanceof s||r("if(d%s!==undefined&&d%s!==null){",u,u),n(r,i,o,u),i.resolvedType instanceof s||r("}"))}return r("return m")},i.toObject=function(t){var e=t.fieldsArray;if(!e.length)return f.codegen()("return {}");for(var r=f.codegen("m","o")("if(!o)")("o={}")("var d={}"),n=[],i=[],u=[],a=0;a<e.length;++a)e[a].resolve().repeated?n.push(e[a]):e[a].map?i.push(e[a]):u.push(e[a]);if(n.length){for(r("if(o.arrays||o.defaults){"),a=0;a<n.length;++a)r("d%s=[]",f.safeProp(n[a].name));r("}")}if(i.length){for(r("if(o.objects||o.defaults){"),a=0;a<i.length;++a)r("d%s={}",f.safeProp(i[a].name));r("}")}if(u.length){for(r("if(o.defaults){"),a=0,p;a<u.length;++a){var p=u[a],h=f.safeProp(p.name);p.resolvedType instanceof s?r("d%s=o.enums===String?%j:%j",h,p.resolvedType.valuesById[p.typeDefault],p.typeDefault):p.long?r("if(util.Long){")("var n=new util.Long(%d,%d,%j)",p.typeDefault.low,p.typeDefault.high,p.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",h)("}else")("d%s=o.longs===String?%j:%d",h,""+p.typeDefault,p.typeDefault.toNumber()):p.bytes?r("d%s=o.bytes===String?%j:%s",h,String.fromCharCode.apply(String,p.typeDefault),"["+Array.prototype.slice.call(p.typeDefault).join(",")+"]"):r("d%s=%j",h,p.typeDefault)}r("}")}for(a=0,p;a<e.length;++a){var p=e[a],h=f.safeProp(p.name);r("if(m%s!==undefined&&m%s!==null&&m.hasOwnProperty(%j)){",h,h,p.name),p.map?(r("d%s={}",h)("for(var ks2=Object.keys(m%s),j=0;j<ks2.length;++j){",h),o(r,p,a,h+"[ks2[j]]")("}")):p.repeated?(r("d%s=[]",h)("for(var j=0;j<m%s.length;++j){",h),o(r,p,a,h+"[j]")("}")):o(r,p,a,h),r("}")}return r("return d")}},{14:14,32:32}],12:[function(t,r){function n(t){var r=s.codegen("r","l")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor")("while(r.pos<c){")("var t=r.uint32()");t.group&&r("if((t&7)===4)")("break"),r("switch(t>>>3){");for(var f=0;f<t.fieldsArray.length;++f){var u=t.b[f].resolve(),a=u.resolvedType instanceof o?"uint32":u.type,p="m"+s.safeProp(u.name);r("case %d:",u.id),u.map?(r("r.skip().pos++")("if(%s===util.emptyObject)",p)("%s={}",p)("var k=r.%s()",u.keyType)("r.pos++"),i.basic[a]===e?r('%s[typeof k==="object"?util.longToHash(k):k]=types[%d].decode(r,r.uint32())',p,f):r('%s[typeof k==="object"?util.longToHash(k):k]=r.%s()',p,a)):u.repeated?(r("if(!(%s&&%s.length))",p,p)("%s=[]",p),(n.compat||u.packed)&&i.packed[a]!==e&&r("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",p,a)("}else"),i.basic[a]===e?r(u.resolvedType.group?"%s.push(types[%d].decode(r))":"%s.push(types[%d].decode(r,r.uint32()))",p,f):r("%s.push(r.%s())",p,a)):i.basic[a]===e?r(u.resolvedType.group?"%s=types[%d].decode(r)":"%s=types[%d].decode(r,r.uint32())",p,f):r("%s=r.%s()",p,a),r("break")}return r("default:")("r.skipType(t&7)")("break")("}")("}")("return m")}r.exports=n,n.compat=!0;var o=t(14),i=t(31),s=t(32)},{14:14,31:31,32:32}],13:[function(t,r){function n(t,e,r,n){return e.resolvedType.group?t("types[%d].encode(%s,w.uint32(%d)).uint32(%d)",r,n,(e.id<<3|3)>>>0,(e.id<<3|4)>>>0):t("types[%d].encode(%s,w.uint32(%d).fork()).ldelim()",r,n,(e.id<<3|2)>>>0)}function o(t){for(var r,o,u=f.codegen("m","w")("if(!w)")("w=Writer.create()"),r=0;r<t.fieldsArray.length;++r){var a=t.b[r].resolve();if(!a.partOf){var p=a.resolvedType instanceof i?"uint32":a.type,h=s.basic[p];o="m"+f.safeProp(a.name),a.map?(u("if(%s&&m.hasOwnProperty(%j)){",o,a.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",o)("w.uint32(%d).fork().uint32(%d).%s(ks[i])",(a.id<<3|2)>>>0,8|s.mapKey[a.keyType],a.keyType),h===e?u("types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",r,o):u(".uint32(%d).%s(%s[ks[i]]).ldelim()",16|h,p,o),u("}")("}")):a.repeated?a.packed&&s.packed[p]!==e?u("if(%s&&%s.length&&m.hasOwnProperty(%j)){",o,o,a.name)("w.uint32(%d).fork()",(a.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",o)("w.%s(%s[i])",p,o)("w.ldelim()")("}"):(u("if(%s!==undefined&&m.hasOwnProperty(%j)){",o,a.name)("for(var i=0;i<%s.length;++i)",o),h===e?n(u,a,r,o+"[i]"):u("w.uint32(%d).%s(%s[i])",(a.id<<3|h)>>>0,p,o),u("}")):(a.required||(a.long?u("if(%s!==undefined&&%s!==null&&m.hasOwnProperty(%j))",o,o,a.name):a.bytes||a.resolvedType&&!(a.resolvedType instanceof i)?u("if(%s&&m.hasOwnProperty(%j))",o,a.name):u("if(%s!==undefined&&m.hasOwnProperty(%j))",o,a.name)),h===e?n(u,a,r,o):u("w.uint32(%d).%s(%s)",(a.id<<3|h)>>>0,p,o))}}for(var r=0;r<t.oneofsArray.length;++r){var l=t.d[r];u("switch(%s){","m"+f.safeProp(l.name));for(var c=0;c<l.fieldsArray.length;++c){var a=l.fieldsArray[c],p=a.resolvedType instanceof i?"uint32":a.type,h=s.basic[p];o="m"+f.safeProp(a.name),u("case%j:",a.name),h===e?n(u,a,t.b.indexOf(a),o):u("w.uint32(%d).%s(%s)",(a.id<<3|h)>>>0,p,o),u("break")}u("}")}return u("return w")}r.exports=o;var i=t(14),s=t(31),f=t(32)},{14:14,31:31,32:32}],14:[function(t,r){function n(t,e,r){if(o.call(this,t,r),e&&"object"!=typeof e)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comments={},e)for(var n=Object.keys(e),i=0;i<n.length;++i)this.valuesById[this.values[n[i]]=e[n[i]]]=n[i]}r.exports=n;var o=t(22);((n.prototype=Object.create(o.prototype)).constructor=n).className="Enum";var i=t(32);n.fromJSON=function(t,e){return new n(t,e.values,e.options)},n.prototype.toJSON=function(){return{options:this.options,values:this.values}},n.prototype.add=function(t,r,n){if(!i.isString(t))throw TypeError("name must be a string");if(!i.isInteger(r))throw TypeError("id must be an integer");if(this.values[t]!==e)throw Error("duplicate name");if(this.valuesById[r]!==e)throw Error("duplicate id");return this.valuesById[this.values[t]=r]=t,this.comments[t]=n||null,this},n.prototype.remove=function(t){if(!i.isString(t))throw TypeError("name must be a string");var r=this.values[t];if(r===e)throw Error("name does not exist");return delete this.valuesById[r],delete this.values[t],delete this.comments[t],this}},{22:22,32:32}],15:[function(t,r){function n(t,r,n,i,s,a){if(u.isObject(i)?(a=i,i=s=e):u.isObject(s)&&(a=s,s=e),o.call(this,t,a),!u.isInteger(r)||r<0)throw TypeError("id must be a non-negative integer");if(!u.isString(n))throw TypeError("type must be a string");if(i!==e&&!/^required|optional|repeated$/.test(i=(""+i).toLowerCase()))throw TypeError("rule must be a string rule");if(s!==e&&!u.isString(s))throw TypeError("extend must be a string");this.rule=i&&"optional"!==i?i:e,this.type=n,this.id=r,this.extend=s||e,this.required="required"===i,this.optional=!this.required,this.repeated="repeated"===i,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!u.Long&&f.long[n]!==e,this.bytes="bytes"===n,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.e=null}r.exports=n;var o=t(22);((n.prototype=Object.create(o.prototype)).constructor=n).className="Field";var i,s=t(14),f=t(31),u=t(32);Object.defineProperty(n.prototype,"packed",{get:function(){return null===this.e&&(this.e=this.getOption("packed")!==!1),this.e}}),n.prototype.setOption=function(t,e,r){return"packed"===t&&(this.e=null),o.prototype.setOption.call(this,t,e,r)},n.fromJSON=function(t,e){return new n(t,e.id,e.type,e.rule,e.extend,e.options)},n.prototype.toJSON=function(){return{rule:"optional"!==this.rule&&this.rule||e,type:this.type,id:this.id,extend:this.extend,options:this.options}},n.prototype.resolve=function(){if(this.resolved)return this;if((this.typeDefault=f.defaults[this.type])===e)if(i||(i=t(30)),this.resolvedType=this.parent.lookup(this.type,i))this.typeDefault=null;else{if(!(this.resolvedType=this.parent.lookup(this.type,s)))throw Error("unresolvable field type: "+this.type);this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]}if(this.options&&this.options.default!==e&&(this.typeDefault=this.options.default,this.resolvedType instanceof s&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.long)this.typeDefault=u.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var r;u.base64.test(this.typeDefault)?u.base64.decode(this.typeDefault,r=u.newBuffer(u.base64.length(this.typeDefault)),0):u.utf8.write(this.typeDefault,r=u.newBuffer(u.utf8.length(this.typeDefault)),0),this.typeDefault=r}return this.map?this.defaultValue=u.emptyObject:this.repeated?this.defaultValue=u.emptyArray:this.defaultValue=this.typeDefault,o.prototype.resolve.call(this)}},{14:14,22:22,30:30,31:31,32:32}],16:[function(t,e){function r(t,e,r){return"function"==typeof e?(r=e,e=new o.Root):e||(e=new o.Root),e.load(t,r)}function n(t,e){return e||(e=new o.Root),e.loadSync(t)}var o=e.exports=t(17);o.build="light",o.load=r,o.loadSync=n,o.encoder=t(13),o.decoder=t(12),o.verifier=t(35),o.converter=t(11),o.ReflectionObject=t(22),o.Namespace=t(21),o.Root=t(26),o.Enum=t(14),o.Type=t(30),o.Field=t(15),o.OneOf=t(23),o.MapField=t(18),o.Service=t(29),o.Method=t(20),o.Class=t(10),o.Message=t(19),o.types=t(31),o.util=t(32),o.ReflectionObject.f(o.Root),o.Namespace.f(o.Type,o.Service),o.Root.f(o.Type)},{10:10,11:11,12:12,13:13,14:14,15:15,17:17,18:18,19:19,20:20,21:21,22:22,23:23,26:26,29:29,30:30,31:31,32:32,35:35}],17:[function(t,e,r){function n(){o.Reader.f(o.BufferReader)}var o=r;o.build="minimal",o.roots={},o.Writer=t(36),o.BufferWriter=t(37),o.Reader=t(24),o.BufferReader=t(25),o.util=t(34),o.rpc=t(27),o.configure=n,o.Writer.f(o.BufferWriter),n()},{24:24,25:25,27:27,34:34,36:36,37:37}],18:[function(t,r){function n(t,e,r,n,i){if(o.call(this,t,e,n,i),!s.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}r.exports=n;var o=t(15);((n.prototype=Object.create(o.prototype)).constructor=n).className="MapField";var i=t(31),s=t(32);n.fromJSON=function(t,e){return new n(t,e.id,e.keyType,e.type,e.options)},n.prototype.toJSON=function(){return{keyType:this.keyType,type:this.type,id:this.id,extend:this.extend,options:this.options}},n.prototype.resolve=function(){if(this.resolved)return this;if(i.mapKey[this.keyType]===e)throw Error("invalid key type: "+this.keyType);return o.prototype.resolve.call(this)}},{15:15,31:31,32:32}],19:[function(t,e){function r(t){if(t)for(var e=Object.keys(t),r=0;r<e.length;++r)this[e[r]]=t[e[r]]}e.exports=r;var n=t(32);r.encode=function(t,e){return this.$type.encode(t,e)},r.encodeDelimited=function(t,e){return this.$type.encodeDelimited(t,e)},r.decode=function(t){return this.$type.decode(t)},r.decodeDelimited=function(t){return this.$type.decodeDelimited(t)},r.verify=function(t){return this.$type.verify(t)},r.fromObject=function(t){return this.$type.fromObject(t)},r.from=r.fromObject,r.toObject=function(t,e){return this.$type.toObject(t,e)},r.prototype.toObject=function(t){return this.$type.toObject(this,t)},r.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},{32:32}],20:[function(t,r){function n(t,r,n,s,f,u,a){if(i.isObject(f)?(a=f,f=u=e):i.isObject(u)&&(a=u,u=e),r!==e&&!i.isString(r))throw TypeError("type must be a string");if(!i.isString(n))throw TypeError("requestType must be a string");if(!i.isString(s))throw TypeError("responseType must be a string");o.call(this,t,a),this.type=r||"rpc",this.requestType=n,this.requestStream=!!f||e,this.responseType=s,this.responseStream=!!u||e,this.resolvedRequestType=null,this.resolvedResponseType=null}r.exports=n;var o=t(22);((n.prototype=Object.create(o.prototype)).constructor=n).className="Method";var i=t(32);n.fromJSON=function(t,e){return new n(t,e.type,e.requestType,e.responseType,e.requestStream,e.responseStream,e.options)},n.prototype.toJSON=function(){return{type:"rpc"!==this.type&&this.type||e,requestType:this.requestType,requestStream:this.requestStream,responseType:this.responseType,responseStream:this.responseStream,options:this.options}},n.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),o.prototype.resolve.call(this))}},{22:22,32:32}],21:[function(t,r){function n(t){if(!t||!t.length)return e;for(var r={},n=0;n<t.length;++n)r[t[n].name]=t[n].toJSON();return r}function o(t,r){s.call(this,t,r),this.nested=e,this.g=null}function i(t){return t.g=null,t}r.exports=o;var s=t(22);((o.prototype=Object.create(s.prototype)).constructor=o).className="Namespace";var f,u,a=t(14),p=t(15),h=t(32);o.fromJSON=function(t,e){return new o(t,e.options).addJSON(e.nested)},o.arrayToJSON=n,Object.defineProperty(o.prototype,"nestedArray",{get:function(){return this.g||(this.g=h.toArray(this.nested))}}),o.prototype.toJSON=function(){return{options:this.options,nested:n(this.nestedArray)}},o.prototype.addJSON=function(t){var r=this;if(t)for(var n,i=Object.keys(t),s=0;s<i.length;++s)n=t[i[s]],r.add((n.fields!==e?f.fromJSON:n.values!==e?a.fromJSON:n.methods!==e?u.fromJSON:n.id!==e?p.fromJSON:o.fromJSON)(i[s],n));return this},o.prototype.get=function(t){return this.nested&&this.nested[t]||null},o.prototype.getEnum=function(t){if(this.nested&&this.nested[t]instanceof a)return this.nested[t].values;throw Error("no such enum")},o.prototype.add=function(t){if(!(t instanceof p&&t.extend!==e||t instanceof f||t instanceof a||t instanceof u||t instanceof o))throw TypeError("object must be a valid nested object");if(this.nested){var r=this.get(t.name);if(r){if(!(r instanceof o&&t instanceof o)||r instanceof f||r instanceof u)throw Error("duplicate name '"+t.name+"' in "+this);for(var n=r.nestedArray,s=0;s<n.length;++s)t.add(n[s]);this.remove(r),this.nested||(this.nested={}),t.setOptions(r.options,!0)}}else this.nested={};return this.nested[t.name]=t,t.onAdd(this),i(this)},o.prototype.remove=function(t){if(!(t instanceof s))throw TypeError("object must be a ReflectionObject");if(t.parent!==this)throw Error(t+" is not a member of "+this);return delete this.nested[t.name],Object.keys(this.nested).length||(this.nested=e),t.onRemove(this),i(this)},o.prototype.define=function(t,e){if(h.isString(t))t=t.split(".");else if(!Array.isArray(t))throw TypeError("illegal path");if(t&&t.length&&""===t[0])throw Error("path must be relative");for(var r=this;t.length>0;){var n=t.shift();if(r.nested&&r.nested[n]){if(r=r.nested[n],!(r instanceof o))throw Error("path conflicts with non-namespace objects")}else r.add(r=new o(n))}return e&&r.addJSON(e),r},o.prototype.resolveAll=function(){for(var t=this.nestedArray,e=0;e<t.length;)t[e]instanceof o?t[e++].resolveAll():t[e++].resolve();return this.resolve()},o.prototype.lookup=function(t,r,n){if("boolean"==typeof r&&(n=r,r=e),h.isString(t)&&t.length){if("."===t)return this.root;t=t.split(".")}else if(!t.length)return this;if(""===t[0])return this.root.lookup(t.slice(1),r);var i=this.get(t[0]);if(i)if(1===t.length){if(!r||i instanceof r)return i}else if(i instanceof o&&(i=i.lookup(t.slice(1),r,!0)))return i;return null===this.parent||n?null:this.parent.lookup(t,r)},o.prototype.lookupType=function(t){var e=this.lookup(t,f);if(!e)throw Error("no such type");return e},o.prototype.lookupService=function(t){var e=this.lookup(t,u);if(!e)throw Error("no such service");return e},o.prototype.lookupEnum=function(t){var e=this.lookup(t,a);if(!e)throw Error("no such enum");return e.values},o.f=function(t,e){f=t,u=e}},{14:14,15:15,22:22,32:32}],22:[function(t,r){function n(t,e){if(!i.isString(t))throw TypeError("name must be a string");if(e&&!i.isObject(e))throw TypeError("options must be an object");this.options=e,this.name=t,this.parent=null,this.resolved=!1,this.comment=null}r.exports=n,n.className="ReflectionObject";var o,i=t(32);Object.defineProperties(n.prototype,{root:{get:function(){for(var t=this;null!==t.parent;)t=t.parent;return t}},fullName:{get:function(){for(var t=[this.name],e=this.parent;e;)t.unshift(e.name),e=e.parent;return t.join(".")}}}),n.prototype.toJSON=function(){throw Error()},n.prototype.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var e=t.root;e instanceof o&&e.h(this)},n.prototype.onRemove=function(t){var e=t.root;e instanceof o&&e.i(this),this.parent=null,this.resolved=!1},n.prototype.resolve=function(){return this.resolved?this:(this.root instanceof o&&(this.resolved=!0),this)},n.prototype.getOption=function(t){return this.options?this.options[t]:e},n.prototype.setOption=function(t,r,n){return n&&this.options&&this.options[t]!==e||((this.options||(this.options={}))[t]=r),this},n.prototype.setOptions=function(t,e){if(t)for(var r=Object.keys(t),n=0;n<r.length;++n)this.setOption(r[n],t[r[n]],e);return this},n.prototype.toString=function(){var t=this.constructor.className,e=this.fullName;return e.length?t+" "+e:t},n.f=function(t){o=t}},{32:32}],23:[function(t,r){function n(t,r,n){if(Array.isArray(r)||(n=r,r=e),i.call(this,t,n),r!==e&&!Array.isArray(r))throw TypeError("fieldNames must be an Array");this.oneof=r||[],this.fieldsArray=[]}function o(t){if(t.parent)for(var e=0;e<t.fieldsArray.length;++e)t.fieldsArray[e].parent||t.parent.add(t.fieldsArray[e])}r.exports=n;var i=t(22);((n.prototype=Object.create(i.prototype)).constructor=n).className="OneOf";var s=t(15);n.fromJSON=function(t,e){return new n(t,e.oneof,e.options)},n.prototype.toJSON=function(){return{oneof:this.oneof,options:this.options}},n.prototype.add=function(t){if(!(t instanceof s))throw TypeError("field must be a Field");return t.parent&&t.parent!==this.parent&&t.parent.remove(t),this.oneof.push(t.name),this.fieldsArray.push(t),t.partOf=this,o(this),this},n.prototype.remove=function(t){if(!(t instanceof s))throw TypeError("field must be a Field");var e=this.fieldsArray.indexOf(t);if(e<0)throw Error(t+" is not a member of "+this);return this.fieldsArray.splice(e,1),e=this.oneof.indexOf(t.name),e>-1&&this.oneof.splice(e,1),t.partOf=null,this},n.prototype.onAdd=function(t){i.prototype.onAdd.call(this,t);for(var e=this,r=0;r<this.oneof.length;++r){var n=t.get(this.oneof[r]);n&&!n.partOf&&(n.partOf=e,e.fieldsArray.push(n))}o(this)},n.prototype.onRemove=function(t){for(var e,r=0;r<this.fieldsArray.length;++r)(e=this.fieldsArray[r]).parent&&e.parent.remove(e);i.prototype.onRemove.call(this,t)}},{15:15,22:22}],24:[function(t,e){function r(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function n(t){this.buf=t,this.pos=0,this.len=t.length}function o(){var t=new b(0,0),e=0;if(!(this.len-this.pos>4)){for(;e<3;++e){if(this.pos>=this.len)throw r(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*e)>>>0,t}for(;e<4;++e)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*e)>>>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(e=0,this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw r(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*e+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function i(){return o.call(this).toLong()}function s(){return o.call(this).toNumber()}function f(){return o.call(this).toLong(!0)}function u(){return o.call(this).toNumber(!0)}function a(){return o.call(this).zzDecode().toLong()}function p(){return o.call(this).zzDecode().toNumber()}function h(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}function l(){if(this.pos+8>this.len)throw r(this,8);return new b(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}function c(){return l.call(this).toLong(!0)}function d(){return l.call(this).toNumber(!0)}function y(){return l.call(this).zzDecode().toLong()}function m(){return l.call(this).zzDecode().toNumber()}e.exports=n;var v,g=t(34),b=g.LongBits,w=g.utf8;n.create=g.Buffer?function(t){return(n.create=function(t){return g.Buffer.isBuffer(t)?new v(t):new n(t)})(t)}:function(t){return new n(t)},n.prototype.j=g.Array.prototype.subarray||g.Array.prototype.slice,n.prototype.uint32=function(){var t=4294967295;return function(){if(t=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return t;if((this.pos+=5)>this.len)throw this.pos=this.len,r(this,10);return t}}(),n.prototype.int32=function(){return 0|this.uint32()},n.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},n.prototype.bool=function(){return 0!==this.uint32()},n.prototype.fixed32=function(){if(this.pos+4>this.len)throw r(this,4);return h(this.buf,this.pos+=4)},n.prototype.sfixed32=function(){var t=this.fixed32();return t>>>1^-(1&t)};var O="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[3]?function(r,n){return e[0]=r[n],e[1]=r[n+1],e[2]=r[n+2],e[3]=r[n+3],t[0]}:function(r,n){return e[3]=r[n],e[2]=r[n+1],e[1]=r[n+2],e[0]=r[n+3],t[0]}}():function(t,e){var r=h(t,e+4),n=2*(r>>31)+1,o=r>>>23&255,i=8388607&r;return 255===o?i?NaN:n*(1/0):0===o?1.401298464324817e-45*n*i:n*Math.pow(2,o-150)*(i+8388608)};n.prototype.float=function(){if(this.pos+4>this.len)throw r(this,4);var t=O(this.buf,this.pos);return this.pos+=4,t};var j="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[7]?function(r,n){return e[0]=r[n],e[1]=r[n+1],e[2]=r[n+2],e[3]=r[n+3],e[4]=r[n+4],e[5]=r[n+5],e[6]=r[n+6],e[7]=r[n+7],t[0]}:function(r,n){return e[7]=r[n],e[6]=r[n+1],e[5]=r[n+2],e[4]=r[n+3],e[3]=r[n+4],e[2]=r[n+5],e[1]=r[n+6],e[0]=r[n+7],t[0]}}():function(t,e){var r=h(t,e+4),n=h(t,e+8),o=2*(n>>31)+1,i=n>>>20&2047,s=4294967296*(1048575&n)+r;return 2047===i?s?NaN:o*(1/0):0===i?5e-324*o*s:o*Math.pow(2,i-1075)*(s+4503599627370496)};n.prototype.double=function(){if(this.pos+8>this.len)throw r(this,4);var t=j(this.buf,this.pos);return this.pos+=8,t},n.prototype.bytes=function(){
var t=this.uint32(),e=this.pos,n=this.pos+t;if(n>this.len)throw r(this,t);return this.pos+=t,e===n?new this.buf.constructor(0):this.j.call(this.buf,e,n)},n.prototype.string=function(){var t=this.bytes();return w.read(t,0,t.length)},n.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw r(this,t);this.pos+=t}else do if(this.pos>=this.len)throw r(this);while(128&this.buf[this.pos++]);return this},n.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(;;){if(4===(t=7&this.uint32()))break;this.skipType(t)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},n.f=function(t){v=t,g.Long?(n.prototype.int64=i,n.prototype.uint64=f,n.prototype.sint64=a,n.prototype.fixed64=c,n.prototype.sfixed64=y):(n.prototype.int64=s,n.prototype.uint64=u,n.prototype.sint64=p,n.prototype.fixed64=d,n.prototype.sfixed64=m)}},{34:34}],25:[function(t,e){function r(t){n.call(this,t)}e.exports=r;var n=t(24);(r.prototype=Object.create(n.prototype)).constructor=r;var o=t(34);o.Buffer&&(r.prototype.j=o.Buffer.prototype.slice),r.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len))}},{24:24,34:34}],26:[function(t,r){function n(t){s.call(this,"",t),this.deferred=[],this.files=[]}function o(){}function i(t,r){var n=r.parent.lookup(r.extend);if(n){var o=new p(r.fullName,r.id,r.type,r.rule,e,r.options);return o.declaringField=r,r.extensionField=o,n.add(o),!0}return!1}r.exports=n;var s=t(21);((n.prototype=Object.create(s.prototype)).constructor=n).className="Root";var f,u,a,p=t(15),h=t(14),l=t(32);n.fromJSON=function(t,e){return e||(e=new n),t.options&&e.setOptions(t.options),e.addJSON(t.nested)},n.prototype.resolvePath=l.path.resolve,n.prototype.load=function t(r,n,i){function s(t,e){if(i){var r=i;if(i=null,c)throw t;r(t,e)}}function f(t,e){try{if(l.isString(e)&&"{"===e.charAt(0)&&(e=JSON.parse(e)),l.isString(e)){u.filename=t;var r,o=u(e,h,n),i=0;if(o.imports)for(;i<o.imports.length;++i)(r=h.resolvePath(t,o.imports[i]))&&p(r);if(o.weakImports)for(i=0;i<o.weakImports.length;++i)(r=h.resolvePath(t,o.weakImports[i]))&&p(r,!0)}else h.setOptions(e.options).addJSON(e.nested)}catch(t){s(t)}c||d||s(null,h)}function p(t,r){var n=t.lastIndexOf("google/protobuf/");if(n>-1){var o=t.substring(n);o in a&&(t=o)}if(!(h.files.indexOf(t)>-1)){if(h.files.push(t),t in a)return c?f(t,a[t]):(++d,setTimeout(function(){--d,f(t,a[t])})),e;if(c){var u;try{u=l.fs.readFileSync(t).toString("utf8")}catch(t){return r||s(t),e}f(t,u)}else++d,l.fetch(t,function(n,o){if(--d,i)return n?(r?d||s(null,h):s(n),e):(f(t,o),e)})}}"function"==typeof n&&(i=n,n=e);var h=this;if(!i)return l.asPromise(t,h,r);var c=i===o,d=0;l.isString(r)&&(r=[r]);for(var y,m=0;m<r.length;++m)(y=h.resolvePath("",r[m]))&&p(y);return c?h:(d||s(null,h),e)},n.prototype.loadSync=function(t,e){if(!l.isNode)throw Error("not supported");return this.load(t,e,o)},n.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(t){return"'extend "+t.extend+"' in "+t.parent.fullName}).join(", "));return s.prototype.resolveAll.call(this)};var c=/^[A-Z]/;n.prototype.h=function(t){if(t instanceof p)t.extend===e||t.extensionField||i(this,t)||this.deferred.push(t);else if(t instanceof h)c.test(t.name)&&(t.parent[t.name]=t.values);else{if(t instanceof f)for(var r=0;r<this.deferred.length;)i(this,this.deferred[r])?this.deferred.splice(r,1):++r;for(var n=0;n<t.nestedArray.length;++n)this.h(t.g[n]);c.test(t.name)&&(t.parent[t.name]=t)}},n.prototype.i=function(t){if(t instanceof p){if(t.extend!==e)if(t.extensionField)t.extensionField.parent.remove(t.extensionField),t.extensionField=null;else{var r=this.deferred.indexOf(t);r>-1&&this.deferred.splice(r,1)}}else if(t instanceof h)c.test(t.name)&&delete t.parent[t.name];else if(t instanceof s){for(var n=0;n<t.nestedArray.length;++n)this.i(t.g[n]);c.test(t.name)&&delete t.parent[t.name]}},n.f=function(t,e,r){f=t,u=e,a=r}},{14:14,15:15,21:21,32:32}],27:[function(t,e,r){var n=r;n.Service=t(28)},{28:28}],28:[function(t,r){function n(t,e,r){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");o.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!e,this.responseDelimited=!!r}r.exports=n;var o=t(34);(n.prototype=Object.create(o.EventEmitter.prototype)).constructor=n,n.prototype.rpcCall=function t(r,n,i,s,f){if(!s)throw TypeError("request must be specified");var u=this;if(!f)return o.asPromise(t,u,r,n,i,s);if(!u.rpcImpl)return setTimeout(function(){f(Error("already ended"))},0),e;try{return u.rpcImpl(r,n[u.requestDelimited?"encodeDelimited":"encode"](s).finish(),function(t,n){if(t)return u.emit("error",t,r),f(t);if(null===n)return u.end(!0),e;if(!(n instanceof i))try{n=i[u.responseDelimited?"decodeDelimited":"decode"](n)}catch(t){return u.emit("error",t,r),f(t)}return u.emit("data",n,r),f(null,n)})}catch(t){return u.emit("error",t,r),setTimeout(function(){f(t)},0),e}},n.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{34:34}],29:[function(t,r){function n(t,e){i.call(this,t,e),this.methods={},this.k=null}function o(t){return t.k=null,t}r.exports=n;var i=t(21);((n.prototype=Object.create(i.prototype)).constructor=n).className="Service";var s=t(20),f=t(32),u=t(27);n.fromJSON=function(t,e){var r=new n(t,e.options);if(e.methods)for(var o=Object.keys(e.methods),i=0;i<o.length;++i)r.add(s.fromJSON(o[i],e.methods[o[i]]));return r},Object.defineProperty(n.prototype,"methodsArray",{get:function(){return this.k||(this.k=f.toArray(this.methods))}}),n.prototype.toJSON=function(){var t=i.prototype.toJSON.call(this);return{options:t&&t.options||e,methods:i.arrayToJSON(this.methodsArray)||{},nested:t&&t.nested||e}},n.prototype.get=function(t){return this.methods[t]||i.prototype.get.call(this,t)},n.prototype.resolveAll=function(){for(var t=this.methodsArray,e=0;e<t.length;++e)t[e].resolve();return i.prototype.resolve.call(this)},n.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);return t instanceof s?(this.methods[t.name]=t,t.parent=this,o(this)):i.prototype.add.call(this,t)},n.prototype.remove=function(t){if(t instanceof s){if(this.methods[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.methods[t.name],t.parent=null,o(this)}return i.prototype.remove.call(this,t)},n.prototype.create=function(t,e,r){for(var n=new u.Service(t,e,r),o=0;o<this.methodsArray.length;++o)n[f.lcFirst(this.k[o].resolve().name)]=f.codegen("r","c")("return this.rpcCall(m,q,s,r,c)").eof(f.lcFirst(this.k[o].name),{m:this.k[o],q:this.k[o].resolvedRequestType.ctor,s:this.k[o].resolvedResponseType.ctor});return n}},{20:20,21:21,27:27,32:32}],30:[function(t,r){function n(t,r){i.call(this,t,r),this.fields={},this.oneofs=e,this.extensions=e,this.reserved=e,this.group=e,this.l=null,this.b=null,this.d=null,this.n=null}function o(t){return t.l=t.b=t.d=t.n=null,delete t.encode,delete t.decode,delete t.verify,t}r.exports=n;var i=t(21);((n.prototype=Object.create(i.prototype)).constructor=n).className="Type";var s=t(14),f=t(23),u=t(15),a=t(18),p=t(29),h=t(10),l=t(19),c=t(24),d=t(36),y=t(32),m=t(13),v=t(12),g=t(35),b=t(11);n.fromJSON=function(t,r){var o=new n(t,r.options);o.extensions=r.extensions,o.reserved=r.reserved;for(var h=Object.keys(r.fields),l=0;l<h.length;++l)o.add((e!==r.fields[h[l]].keyType?a.fromJSON:u.fromJSON)(h[l],r.fields[h[l]]));if(r.oneofs)for(h=Object.keys(r.oneofs),l=0;l<h.length;++l)o.add(f.fromJSON(h[l],r.oneofs[h[l]]));if(r.nested)for(h=Object.keys(r.nested),l=0;l<h.length;++l){var c=r.nested[h[l]];o.add((c.id!==e?u.fromJSON:c.fields!==e?n.fromJSON:c.values!==e?s.fromJSON:c.methods!==e?p.fromJSON:i.fromJSON)(h[l],c))}return r.extensions&&r.extensions.length&&(o.extensions=r.extensions),r.reserved&&r.reserved.length&&(o.reserved=r.reserved),r.group&&(o.group=!0),o},Object.defineProperties(n.prototype,{fieldsById:{get:function(){if(this.l)return this.l;this.l={};for(var t=Object.keys(this.fields),e=0;e<t.length;++e){var r=this.fields[t[e]],n=r.id;if(this.l[n])throw Error("duplicate id "+n+" in "+this);this.l[n]=r}return this.l}},fieldsArray:{get:function(){return this.b||(this.b=y.toArray(this.fields))}},oneofsArray:{get:function(){return this.d||(this.d=y.toArray(this.oneofs))}},ctor:{get:function(){return this.n||(this.n=h(this).constructor)},set:function(t){if(t&&!(t.prototype instanceof l))throw TypeError("ctor must be a Message constructor");t.from||(t.from=l.from),this.n=t}}}),n.prototype.toJSON=function(){var t=i.prototype.toJSON.call(this);return{options:t&&t.options||e,oneofs:i.arrayToJSON(this.oneofsArray),fields:i.arrayToJSON(this.fieldsArray.filter(function(t){return!t.declaringField}))||{},extensions:this.extensions&&this.extensions.length?this.extensions:e,reserved:this.reserved&&this.reserved.length?this.reserved:e,group:this.group||e,nested:t&&t.nested||e}},n.prototype.resolveAll=function(){for(var t=this.fieldsArray,e=0;e<t.length;)t[e++].resolve();var r=this.oneofsArray;for(e=0;e<r.length;)r[e++].resolve();return i.prototype.resolve.call(this)},n.prototype.get=function(t){return this.fields[t]||this.oneofs&&this.oneofs[t]||this.nested&&this.nested[t]||null},n.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);if(t instanceof u&&t.extend===e){if(this.fieldsById[t.id])throw Error("duplicate id "+t.id+" in "+this);return t.parent&&t.parent.remove(t),this.fields[t.name]=t,t.message=this,t.onAdd(this),o(this)}return t instanceof f?(this.oneofs||(this.oneofs={}),this.oneofs[t.name]=t,t.onAdd(this),o(this)):i.prototype.add.call(this,t)},n.prototype.remove=function(t){if(t instanceof u&&t.extend===e){if(!this.fields||this.fields[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.fields[t.name],t.parent=null,t.onRemove(this),o(this)}if(t instanceof f){if(!this.oneofs||this.oneofs[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.oneofs[t.name],t.parent=null,t.onRemove(this),o(this)}return i.prototype.remove.call(this,t)},n.prototype.create=function(t){return new this.ctor(t)},n.prototype.setup=function(){for(var t=this.fullName,e=[],r=0;r<this.fieldsArray.length;++r)e.push(this.b[r].resolve().resolvedType);return this.encode=m(this).eof(t+"$encode",{Writer:d,types:e,util:y}),this.decode=v(this).eof(t+"$decode",{Reader:c,types:e,util:y}),this.verify=g(this).eof(t+"$verify",{types:e,util:y}),this.fromObject=this.from=b.fromObject(this).eof(t+"$fromObject",{types:e,util:y}),this.toObject=b.toObject(this).eof(t+"$toObject",{types:e,util:y}),this},n.prototype.encode=function(t,e){return this.setup().encode(t,e)},n.prototype.encodeDelimited=function(t,e){return this.encode(t,e&&e.len?e.fork():e).ldelim()},n.prototype.decode=function(t,e){return this.setup().decode(t,e)},n.prototype.decodeDelimited=function(t){return t instanceof c||(t=c.create(t)),this.decode(t,t.uint32())},n.prototype.verify=function(t){return this.setup().verify(t)},n.prototype.fromObject=function(t){return this.setup().fromObject(t)},n.prototype.from=n.prototype.fromObject,n.prototype.toObject=function(t,e){return this.setup().toObject(t,e)}},{10:10,11:11,12:12,13:13,14:14,15:15,18:18,19:19,21:21,23:23,24:24,29:29,32:32,35:35,36:36}],31:[function(t,e,r){function n(t,e){var r=0,n={};for(e|=0;r<t.length;)n[s[r+e]]=t[r++];return n}var o=r,i=t(32),s=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];o.basic=n([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),o.defaults=n([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",i.emptyArray,null]),o.long=n([0,0,0,1,1],7),o.mapKey=n([0,0,0,5,5,0,0,0,1,1,0,2],2),o.packed=n([1,5,0,0,0,5,5,0,0,0,1,1,0])},{32:32}],32:[function(t,e){var r=e.exports=t(34);r.codegen=t(3),r.fetch=t(5),r.path=t(7),r.fs=r.inquire("fs"),r.toArray=function(t){var e=[];if(t)for(var r=Object.keys(t),n=0;n<r.length;++n)e.push(t[r[n]]);return e},r.safeProp=function(t){return'["'+t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"]'},r.ucFirst=function(t){return t.charAt(0).toUpperCase()+t.substring(1)}},{3:3,34:34,5:5,7:7}],33:[function(t,e){function r(t,e){this.lo=t,this.hi=e}e.exports=r;var n=t(34),o=r.zero=new r(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var i=r.zeroHash="\0\0\0\0\0\0\0\0";r.fromNumber=function(t){if(0===t)return o;var e=t<0;e&&(t=-t);var n=t>>>0,i=(t-n)/4294967296>>>0;return e&&(i=~i>>>0,n=~n>>>0,++n>4294967295&&(n=0,++i>4294967295&&(i=0))),new r(n,i)},r.from=function(t){if("number"==typeof t)return r.fromNumber(t);if(n.isString(t)){if(!n.Long)return r.fromNumber(parseInt(t,10));t=n.Long.fromString(t)}return t.low||t.high?new r(t.low>>>0,t.high>>>0):o},r.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=~this.lo+1>>>0,r=~this.hi>>>0;return e||(r=r+1>>>0),-(e+4294967296*r)}return this.lo+4294967296*this.hi},r.prototype.toLong=function(t){return n.Long?new n.Long(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}};var s=String.prototype.charCodeAt;r.fromHash=function(t){return t===i?o:new r((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)},r.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)},r.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},r.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},r.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===e?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:r<128?9:10}},{34:34}],34:[function(r,n,o){var i=o;i.asPromise=r(1),i.base64=r(2),i.EventEmitter=r(4),i.inquire=r(6),i.utf8=r(9),i.pool=r(8),i.LongBits=r(33),i.emptyArray=Object.freeze?Object.freeze([]):[],i.emptyObject=Object.freeze?Object.freeze({}):{},i.isNode=!!(t.process&&t.process.versions&&t.process.versions.node),i.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},i.isString=function(t){return"string"==typeof t||t instanceof String},i.isObject=function(t){return t&&"object"==typeof t},i.Buffer=function(){try{var t=i.inquire("buffer").Buffer;return t.prototype.utf8Write?(t.from||(t.from=function(e,r){return new t(e,r)}),t.allocUnsafe||(t.allocUnsafe=function(e){return new t(e)}),t):null}catch(t){return null}}(),i.newBuffer=function(t){return"number"==typeof t?i.Buffer?i.Buffer.allocUnsafe(t):new i.Array(t):i.Buffer?i.Buffer.from(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},i.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,i.Long=t.dcodeIO&&t.dcodeIO.Long||i.inquire("long"),i.longToHash=function(t){return t?i.LongBits.from(t).toHash():i.LongBits.zeroHash},i.longFromHash=function(t,e){var r=i.LongBits.fromHash(t);return i.Long?i.Long.fromBits(r.lo,r.hi,e):r.toNumber(!!e)},i.merge=function(t,r,n){for(var o=Object.keys(r),i=0;i<o.length;++i)t[o[i]]!==e&&n||(t[o[i]]=r[o[i]]);return t},i.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},i.oneOfGetter=function(t){for(var r={},n=0;n<t.length;++n)r[t[n]]=1;return function(){for(var t=Object.keys(this),n=t.length-1;n>-1;--n)if(1===r[t[n]]&&this[t[n]]!==e&&null!==this[t[n]])return t[n]}},i.oneOfSetter=function(t){return function(e){for(var r=0;r<t.length;++r)t[r]!==e&&delete this[t[r]]}},i.lazyResolve=function(t,e){for(var r=0;r<e.length;++r)for(var n=Object.keys(e[r]),o=0;o<n.length;++o){for(var i=e[r][n[o]].split("."),s=t;i.length;)s=s[i.shift()];e[r][n[o]]=s}},i.toJSONOptions={longs:String,enums:String,bytes:String}},{1:1,2:2,33:33,4:4,6:6,8:8,9:9}],35:[function(t,e){function r(t,e){return t.name+": "+e+(t.repeated&&"array"!==e?"[]":t.map&&"object"!==e?"{k:"+t.keyType+"}":"")+" expected"}function n(t,e,n,o){if(e.resolvedType)if(e.resolvedType instanceof s){t("switch(%s){",o)("default:")("return%j",r(e,"enum value"));for(var i=Object.keys(e.resolvedType.values),f=0;f<i.length;++f)t("case %d:",e.resolvedType.values[i[f]]);t("break")("}")}else t("var e=types[%d].verify(%s);",n,o)("if(e)")("return%j+e",e.name+".");else switch(e.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.isInteger(%s))",o)("return%j",r(e,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",o,o,o,o)("return%j",r(e,"integer|Long"));break;case"float":case"double":t('if(typeof %s!=="number")',o)("return%j",r(e,"number"));break;case"bool":t('if(typeof %s!=="boolean")',o)("return%j",r(e,"boolean"));break;case"string":t("if(!util.isString(%s))",o)("return%j",r(e,"string"));break;case"bytes":t('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',o,o,o)("return%j",r(e,"buffer"))}return t}function o(t,e,n){switch(e.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!/^-?(?:0|[1-9][0-9]*)$/.test(%s))",n)("return%j",r(e,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/.test(%s))",n)("return%j",r(e,"integer|Long key"));break;case"bool":t("if(!/^true|false|0|1$/.test(%s))",n)("return%j",r(e,"boolean key"))}return t}function i(t){if(!t.fieldsArray.length)return f.codegen()("return null");for(var e=f.codegen("m"),i=0;i<t.b.length;++i){var u=t.b[i].resolve(),a="m"+f.safeProp(u.name);u.map?(e("if(%s!==undefined){",a)("if(!util.isObject(%s))",a)("return%j",r(u,"object"))("var k=Object.keys(%s)",a)("for(var i=0;i<k.length;++i){"),o(e,u,"k[i]"),n(e,u,i,a+"[k[i]]")("}")("}")):u.repeated?(e("if(%s!==undefined){",a)("if(!Array.isArray(%s))",a)("return%j",r(u,"array"))("for(var i=0;i<%s.length;++i){",a),n(e,u,i,a+"[i]")("}")("}")):(u.required||(!u.resolvedType||u.resolvedType instanceof s?e("if(%s!==undefined){",a):e("if(%s!==undefined&&%s!==null){",a,a)),n(e,u,i,a),u.required||e("}"))}return e("return null")}e.exports=i;var s=t(14),f=t(32)},{14:14,32:32}],36:[function(t,r){function n(t,r,n){this.fn=t,this.len=r,this.next=e,this.val=n}function o(){}function i(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function s(){this.len=0,this.head=new n(o,0,0),this.tail=this.head,this.states=null}function f(t,e,r){e[r]=255&t}function u(t,e,r){for(;t>127;)e[r++]=127&t|128,t>>>=7;e[r]=t}function a(t,r){this.len=t,this.next=e,this.val=r}function p(t,e,r){for(;t.hi;)e[r++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[r++]=127&t.lo|128,t.lo=t.lo>>>7;e[r++]=t.lo}function h(t,e,r){e[r++]=255&t,e[r++]=t>>>8&255,e[r++]=t>>>16&255,e[r]=t>>>24}r.exports=s;var l,c=t(34),d=c.LongBits,y=c.base64,m=c.utf8;s.create=c.Buffer?function(){return(s.create=function(){return new l})()}:function(){return new s},s.alloc=function(t){return new c.Array(t)},c.Array!==Array&&(s.alloc=c.pool(s.alloc,c.Array.prototype.subarray)),s.prototype.push=function(t,e,r){return this.tail=this.tail.next=new n(t,e,r),this.len+=e,this},a.prototype=Object.create(n.prototype),a.prototype.fn=u,s.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new a((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},s.prototype.int32=function(t){return t<0?this.push(p,10,d.fromNumber(t)):this.uint32(t)},s.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},s.prototype.uint64=function(t){var e=d.from(t);return this.push(p,e.length(),e)},s.prototype.int64=s.prototype.uint64,s.prototype.sint64=function(t){var e=d.from(t).zzEncode();return this.push(p,e.length(),e)},s.prototype.bool=function(t){return this.push(f,1,t?1:0)},s.prototype.fixed32=function(t){return this.push(h,4,t>>>0)},s.prototype.sfixed32=function(t){return this.push(h,4,t<<1^t>>31)},s.prototype.fixed64=function(t){var e=d.from(t);return this.push(h,4,e.lo).push(h,4,e.hi)},s.prototype.sfixed64=function(t){var e=d.from(t).zzEncode();return this.push(h,4,e.lo).push(h,4,e.hi)};var v="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[3]?function(r,n,o){t[0]=r,n[o++]=e[0],n[o++]=e[1],n[o++]=e[2],n[o]=e[3]}:function(r,n,o){t[0]=r,n[o++]=e[3],n[o++]=e[2],n[o++]=e[1],n[o]=e[0]}}():function(t,e,r){var n=t<0?1:0;if(n&&(t=-t),0===t)h(1/t>0?0:2147483648,e,r);else if(isNaN(t))h(2147483647,e,r);else if(t>3.4028234663852886e38)h((n<<31|2139095040)>>>0,e,r);else if(t<1.1754943508222875e-38)h((n<<31|Math.round(t/1.401298464324817e-45))>>>0,e,r);else{var o=Math.floor(Math.log(t)/Math.LN2),i=8388607&Math.round(t*Math.pow(2,-o)*8388608);h((n<<31|o+127<<23|i)>>>0,e,r)}};s.prototype.float=function(t){return this.push(v,4,t)};var g="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),e=new Uint8Array(t.buffer);return t[0]=-0,e[7]?function(r,n,o){t[0]=r,n[o++]=e[0],n[o++]=e[1],n[o++]=e[2],n[o++]=e[3],n[o++]=e[4],n[o++]=e[5],n[o++]=e[6],n[o]=e[7]}:function(r,n,o){t[0]=r,n[o++]=e[7],n[o++]=e[6],n[o++]=e[5],n[o++]=e[4],n[o++]=e[3],n[o++]=e[2],n[o++]=e[1],n[o]=e[0]}}():function(t,e,r){var n=t<0?1:0;if(n&&(t=-t),0===t)h(0,e,r),h(1/t>0?0:2147483648,e,r+4);else if(isNaN(t))h(4294967295,e,r),h(2147483647,e,r+4);else if(t>1.7976931348623157e308)h(0,e,r),h((n<<31|2146435072)>>>0,e,r+4);else{var o;if(t<2.2250738585072014e-308)o=t/5e-324,h(o>>>0,e,r),h((n<<31|o/4294967296)>>>0,e,r+4);else{var i=Math.floor(Math.log(t)/Math.LN2);1024===i&&(i=1023),o=t*Math.pow(2,-i),h(4503599627370496*o>>>0,e,r),h((n<<31|i+1023<<20|1048576*o&1048575)>>>0,e,r+4)}}};s.prototype.double=function(t){return this.push(g,8,t)};var b=c.Array.prototype.set?function(t,e,r){e.set(t,r)}:function(t,e,r){for(var n=0;n<t.length;++n)e[r+n]=t[n]};s.prototype.bytes=function(t){var e=t.length>>>0;if(!e)return this.push(f,1,0);if(c.isString(t)){var r=s.alloc(e=y.length(t));y.decode(t,r,0),t=r}return this.uint32(e).push(b,e,t)},s.prototype.string=function(t){var e=m.length(t);return e?this.uint32(e).push(m.write,e,t):this.push(f,1,0)},s.prototype.fork=function(){return this.states=new i(this),this.head=this.tail=new n(o,0,0),this.len=0,this},s.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 n(o,0,0),this.len=0),this},s.prototype.ldelim=function(){var t=this.head,e=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=t.next,this.tail=e,this.len+=r),this},s.prototype.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),r=0;t;)t.fn(t.val,e,r),r+=t.len,t=t.next;return e},s.f=function(t){l=t}},{34:34}],37:[function(t,e){function r(){o.call(this)}function n(t,e,r){t.length<40?i.utf8.write(t,e,r):e.utf8Write(t,r)}e.exports=r;var o=t(36);(r.prototype=Object.create(o.prototype)).constructor=r;var i=t(34),s=i.Buffer;r.alloc=function(t){return(r.alloc=s.allocUnsafe)(t)};var f=s&&s.prototype instanceof Uint8Array&&"set"===s.prototype.set.name?function(t,e,r){e.set(t,r)}:function(t,e,r){if(t.copy)t.copy(e,r,0,t.length);else for(var n=0;n<t.length;)e[r++]=t[n++]};r.prototype.bytes=function(t){i.isString(t)&&(t=s.from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this.push(f,e,t),this},r.prototype.string=function(t){var e=s.byteLength(t);return this.uint32(e),e&&this.push(n,e,t),this}},{34:34,36:36}]},{},[16])}("object"==typeof window&&window||"object"==typeof self&&self||this);
//# sourceMappingURL=protobuf.min.js.map
/*!
* protobuf.js v6.6.1 (c) 2016, Daniel Wirtz
* Compiled Tue, 24 Jan 2017 13:05:54 UTC
* protobuf.js v6.6.2 (c) 2016, Daniel Wirtz
* Compiled Fri, 27 Jan 2017 16:11:25 UTC
* Licensed under the BSD-3-Clause License
* see: https://github.com/dcodeIO/protobuf.js for details
*/
!function(t,r){"use strict";!function t(r,n,e){function i(s,u){if(!n[s]){if(!r[s]){var f="function"==typeof require&&require;if(!u&&f)return f(s,!0);if(o)return o(s,!0);var h=Error("Cannot find module '"+s+"'");throw h.code="MODULE_NOT_FOUND",h}var a=n[s]={exports:{}};r[s][0].call(a.exports,function(t){var n=r[s][1][t];return i(n?n:t)},a,a.exports,t,r,n,e)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s<e.length;s++)i(e[s]);return i}({1:[function(t,r){function n(t,r){for(var n=[],e=2;e<arguments.length;)n.push(arguments[e++]);var i=!0;return new Promise(function(e,o){n.push(function(t){if(i)if(i=!1,t)o(t);else{for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);e.apply(null,r)}});try{t.apply(r||this,n)}catch(t){i&&(i=!1,o(t))}})}r.exports=n},{}],2:[function(t,n,e){var i=e;i.length=function(t){var r=t.length;if(!r)return 0;for(var n=0;--r%4>1&&"="===t.charAt(r);)++n;return Math.ceil(3*t.length)/4-n};for(var o=Array(64),s=Array(123),u=0;u<64;)s[o[u]=u<26?u+65:u<52?u+71:u<62?u-4:u-59|43]=u++;i.encode=function(t,r,n){for(var e,i=[],s=0,u=0;r<n;){var f=t[r++];switch(u){case 0:i[s++]=o[f>>2],e=(3&f)<<4,u=1;break;case 1:i[s++]=o[e|f>>4],e=(15&f)<<2,u=2;break;case 2:i[s++]=o[e|f>>6],i[s++]=o[63&f],u=0}}return u&&(i[s++]=o[e],i[s]=61,1===u&&(i[s+1]=61)),String.fromCharCode.apply(String,i)};var f="invalid encoding";i.decode=function(t,n,e){for(var i,o=e,u=0,h=0;h<t.length;){var a=t.charCodeAt(h++);if(61===a&&u>1)break;if((a=s[a])===r)throw Error(f);switch(u){case 0:i=a,u=1;break;case 1:n[e++]=i<<2|(48&a)>>4,i=a,u=2;break;case 2:n[e++]=(15&i)<<4|(60&a)>>2,i=a,u=3;break;case 3:n[e++]=(3&i)<<6|a,u=0}}if(1===u)throw Error(f);return e-o},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){function e(){this.a={}}n.exports=e;var i=e.prototype;i.on=function(t,r,n){return(this.a[t]||(this.a[t]=[])).push({fn:r,ctx:n||this}),this},i.off=function(t,n){if(t===r)this.a={};else if(n===r)this.a[t]=[];else for(var e=this.a[t],i=0;i<e.length;)e[i].fn===n?e.splice(i,1):++i;return this},i.emit=function(t){var r=this.a[t];if(r){for(var n=[],e=1;e<arguments.length;)n.push(arguments[e++]);for(e=0;e<r.length;)r[e].fn.apply(r[e++].ctx,n)}return this}},{}],4:[function(t,r,n){function e(t){try{var r=eval("quire".replace(/^/,"re"))(t);if(r&&(r.length||Object.keys(r).length))return r}catch(t){}return null}r.exports=e},{}],5:[function(t,r){function n(t,r,n){var e=n||8192,i=e>>>1,o=null,s=e;return function(n){if(n<1||n>i)return t(n);s+n>e&&(o=t(e),s=0);var u=r.call(o,s,s+=n);return 7&s&&(s=(7|s)+1),u}}r.exports=n},{}],6:[function(t,r,n){var e=n;e.length=function(t){for(var r=0,n=0,e=0;e<t.length;++e)n=t.charCodeAt(e),n<128?r+=1:n<2048?r+=2:55296===(64512&n)&&56320===(64512&t.charCodeAt(e+1))?(++e,r+=4):r+=3;return r},e.read=function(t,r,n){var e=n-r;if(e<1)return"";for(var i,o=null,s=[],u=0;r<n;)i=t[r++],i<128?s[u++]=i:i>191&&i<224?s[u++]=(31&i)<<6|63&t[r++]:i>239&&i<365?(i=((7&i)<<18|(63&t[r++])<<12|(63&t[r++])<<6|63&t[r++])-65536,s[u++]=55296+(i>>10),s[u++]=56320+(1023&i)):s[u++]=(15&i)<<12|(63&t[r++])<<6|63&t[r++],u>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),u=0);return o?(u&&o.push(String.fromCharCode.apply(String,s.slice(0,u))),o.join("")):u?String.fromCharCode.apply(String,s.slice(0,u)):""},e.write=function(t,r,n){for(var e,i,o=n,s=0;s<t.length;++s)e=t.charCodeAt(s),e<128?r[n++]=e:e<2048?(r[n++]=e>>6|192,r[n++]=63&e|128):55296===(64512&e)&&56320===(64512&(i=t.charCodeAt(s+1)))?(e=65536+((1023&e)<<10)+(1023&i),++s,r[n++]=e>>18|240,r[n++]=e>>12&63|128,r[n++]=e>>6&63|128,r[n++]=63&e|128):(r[n++]=e>>12|224,r[n++]=e>>6&63|128,r[n++]=63&e|128);return n-o}},{}],7:[function(r,n,e){function i(){o.Reader.b(o.BufferReader)}var o=t.protobuf=e;o.build="minimal",o.roots={},o.Writer=r(14),o.BufferWriter=r(15),o.Reader=r(8),o.BufferReader=r(9),o.util=r(13),o.rpc=r(10),o.configure=i,"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&(o.util.Long=t,i()),o}),o.Writer.b(o.BufferWriter),i()},{10:10,13:13,14:14,15:15,8:8,9:9}],8:[function(t,r){function n(t,r){return RangeError("index out of range: "+t.pos+" + "+(r||1)+" > "+t.len)}function e(t){this.buf=t,this.pos=0,this.len=t.length}function i(){var t=new m(0,0),r=0;if(!(this.len-this.pos>4)){for(;r<3;++r){if(this.pos>=this.len)throw n(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*r)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*r)>>>0,t}for(;r<4;++r)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*r)>>>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(r=0,this.len-this.pos>4){for(;r<5;++r)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*r+3)>>>0,this.buf[this.pos++]<128)return t}else for(;r<5;++r){if(this.pos>=this.len)throw n(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*r+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function o(){return i.call(this).toLong()}function s(){return i.call(this).toNumber()}function u(){return i.call(this).toLong(!0)}function f(){return i.call(this).toNumber(!0)}function h(){return i.call(this).zzDecode().toLong()}function a(){return i.call(this).zzDecode().toNumber()}function c(t,r){return(t[r-4]|t[r-3]<<8|t[r-2]<<16|t[r-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw n(this,8);return new m(c(this.buf,this.pos+=4),c(this.buf,this.pos+=4))}function l(){return p.call(this).toLong(!0)}function y(){return p.call(this).toNumber(!0)}function d(){return p.call(this).zzDecode().toLong()}function v(){return p.call(this).zzDecode().toNumber()}r.exports=e;var b,g=t(13),m=g.LongBits,w=g.utf8;e.create=g.Buffer?function(t){return(e.create=function(t){return g.Buffer.isBuffer(t)?new b(t):new e(t)})(t)}:function(t){return new e(t)},e.prototype.c=g.Array.prototype.subarray||g.Array.prototype.slice,e.prototype.uint32=function(){var t=4294967295;return function(){if(t=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return t;if((this.pos+=5)>this.len)throw this.pos=this.len,n(this,10);return t}}(),e.prototype.int32=function(){return 0|this.uint32()},e.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},e.prototype.bool=function(){return 0!==this.uint32()},e.prototype.fixed32=function(){if(this.pos+4>this.len)throw n(this,4);return c(this.buf,this.pos+=4)},e.prototype.sfixed32=function(){var t=this.fixed32();return t>>>1^-(1&t)};var A="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),r=new Uint8Array(t.buffer);return t[0]=-0,r[3]?function(n,e){return r[0]=n[e],r[1]=n[e+1],r[2]=n[e+2],r[3]=n[e+3],t[0]}:function(n,e){return r[3]=n[e],r[2]=n[e+1],r[1]=n[e+2],r[0]=n[e+3],t[0]}}():function(t,r){var n=c(t,r+4),e=2*(n>>31)+1,i=n>>>23&255,o=8388607&n;return 255===i?o?NaN:e*(1/0):0===i?1.401298464324817e-45*e*o:e*Math.pow(2,i-150)*(o+8388608)};e.prototype.float=function(){if(this.pos+4>this.len)throw n(this,4);var t=A(this.buf,this.pos);return this.pos+=4,t};var x="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),r=new Uint8Array(t.buffer);return t[0]=-0,r[7]?function(n,e){return r[0]=n[e],r[1]=n[e+1],r[2]=n[e+2],r[3]=n[e+3],r[4]=n[e+4],r[5]=n[e+5],r[6]=n[e+6],r[7]=n[e+7],t[0]}:function(n,e){return r[7]=n[e],r[6]=n[e+1],r[5]=n[e+2],r[4]=n[e+3],r[3]=n[e+4],r[2]=n[e+5],r[1]=n[e+6],r[0]=n[e+7],t[0]}}():function(t,r){var n=c(t,r+4),e=c(t,r+8),i=2*(e>>31)+1,o=e>>>20&2047,s=4294967296*(1048575&e)+n;return 2047===o?s?NaN:i*(1/0):0===o?5e-324*i*s:i*Math.pow(2,o-1075)*(s+4503599627370496)};e.prototype.double=function(){if(this.pos+8>this.len)throw n(this,4);var t=x(this.buf,this.pos);return this.pos+=8,t},e.prototype.bytes=function(){var t=this.uint32(),r=this.pos,e=this.pos+t;if(e>this.len)throw n(this,t);return this.pos+=t,r===e?new this.buf.constructor(0):this.c.call(this.buf,r,e)},e.prototype.string=function(){var t=this.bytes();return w.read(t,0,t.length)},e.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw n(this,t);this.pos+=t}else do if(this.pos>=this.len)throw n(this);while(128&this.buf[this.pos++]);return this},e.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(;;){if(4===(t=7&this.uint32()))break;this.skipType(t)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},e.b=function(t){b=t,g.Long?(e.prototype.int64=o,e.prototype.uint64=u,e.prototype.sint64=h,e.prototype.fixed64=l,e.prototype.sfixed64=d):(e.prototype.int64=s,e.prototype.uint64=f,e.prototype.sint64=a,e.prototype.fixed64=y,e.prototype.sfixed64=v)}},{13:13}],9:[function(t,r){function n(t){e.call(this,t)}r.exports=n;var e=t(8);(n.prototype=Object.create(e.prototype)).constructor=n;var i=t(13);i.Buffer&&(n.prototype.c=i.Buffer.prototype.slice),n.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len))}},{13:13,8:8}],10:[function(t,r,n){var e=n;e.Service=t(11)},{11:11}],11:[function(t,n){function e(t,r,n){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");i.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!r,this.responseDelimited=!!n}n.exports=e;var i=t(13);(e.prototype=Object.create(i.EventEmitter.prototype)).constructor=e,e.prototype.rpcCall=function t(n,e,o,s,u){if(!s)throw TypeError("request must be specified");var f=this;if(!u)return i.asPromise(t,f,n,e,o,s);if(!f.rpcImpl)return setTimeout(function(){u(Error("already ended"))},0),r;try{return f.rpcImpl(n,e[f.requestDelimited?"encodeDelimited":"encode"](s).finish(),function(t,e){if(t)return f.emit("error",t,n),u(t);if(null===e)return f.end(!0),r;if(!(e instanceof o))try{e=o[f.responseDelimited?"decodeDelimited":"decode"](e)}catch(t){return f.emit("error",t,n),u("error",t)}return f.emit("data",e,n),u(null,e)})}catch(t){return f.emit("error",t,n),setTimeout(function(){u(t)},0),r}},e.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{13:13}],12:[function(t,r){function n(t,r){this.lo=t,this.hi=r}r.exports=n;var e=t(13),i=n.zero=new n(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var o=n.zeroHash="\0\0\0\0\0\0\0\0";n.fromNumber=function(t){if(0===t)return i;var r=t<0;r&&(t=-t);var e=t>>>0,o=(t-e)/4294967296>>>0;return r&&(o=~o>>>0,e=~e>>>0,++e>4294967295&&(e=0,++o>4294967295&&(o=0))),new n(e,o)},n.from=function(t){if("number"==typeof t)return n.fromNumber(t);if(e.isString(t)){if(!e.Long)return n.fromNumber(parseInt(t,10));t=e.Long.fromString(t)}return t.low||t.high?new n(t.low>>>0,t.high>>>0):i},n.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var r=~this.lo+1>>>0,n=~this.hi>>>0;return r||(n=n+1>>>0),-(r+4294967296*n)}return this.lo+4294967296*this.hi},n.prototype.toLong=function(t){return e.Long?new e.Long(0|this.lo,0|this.hi,(!!t)):{low:0|this.lo,high:0|this.hi,unsigned:!!t}};var s=String.prototype.charCodeAt;n.fromHash=function(t){return t===o?i:new n((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)},n.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)},n.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},n.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},n.prototype.length=function(){var t=this.lo,r=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===r?t<16384?t<128?1:2:t<2097152?3:4:r<16384?r<128?5:6:r<2097152?7:8:n<128?9:10}},{13:13}],13:[function(n,e,i){var o=i;o.asPromise=n(1),o.base64=n(2),o.EventEmitter=n(3),o.inquire=n(4),o.utf8=n(6),o.pool=n(5),o.LongBits=n(12),o.emptyArray=Object.freeze?Object.freeze([]):[],o.emptyObject=Object.freeze?Object.freeze({}):{},o.isNode=!!(t.process&&t.process.versions&&t.process.versions.node),o.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},o.isString=function(t){return"string"==typeof t||t instanceof String},o.isObject=function(t){return t&&"object"==typeof t},o.Buffer=function(){try{var t=o.inquire("buffer").Buffer;return t.prototype.utf8Write?(t.from||(t.from=function(r,n){return new t(r,n)}),t.allocUnsafe||(t.allocUnsafe=function(r){return new t(r)}),t):null}catch(t){return null}}(),o.newBuffer=function(t){return"number"==typeof t?o.Buffer?o.Buffer.allocUnsafe(t):new o.Array(t):o.Buffer?o.Buffer.from(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},o.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,o.Long=t.dcodeIO&&t.dcodeIO.Long||o.inquire("long"),o.longToHash=function(t){return t?o.LongBits.from(t).toHash():o.LongBits.zeroHash},o.longFromHash=function(t,r){var n=o.LongBits.fromHash(t);return o.Long?o.Long.fromBits(n.lo,n.hi,r):n.toNumber(!!r)},o.merge=function(t,n,e){for(var i=Object.keys(n),o=0;o<i.length;++o)t[i[o]]!==r&&e||(t[i[o]]=n[i[o]]);return t},o.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},o.oneOfGetter=function(t){for(var n={},e=0;e<t.length;++e)n[t[e]]=1;return function(){for(var t=Object.keys(this),e=t.length-1;e>-1;--e)if(1===n[t[e]]&&this[t[e]]!==r&&null!==this[t[e]])return t[e]}},o.oneOfSetter=function(t){return function(r){for(var n=0;n<t.length;++n)t[n]!==r&&delete this[t[n]]}},o.lazyResolve=function(t,r){for(var n=0;n<r.length;++n)for(var e=Object.keys(r[n]),i=0;i<e.length;++i){for(var o=r[n][e[i]].split("."),s=t;o.length;)s=s[o.shift()];r[n][e[i]]=s}},o.toJSONOptions={longs:String,enums:String,bytes:String}},{1:1,12:12,2:2,3:3,4:4,5:5,6:6}],14:[function(t,n){function e(t,n,e){this.fn=t,this.len=n,this.next=r,this.val=e}function i(){}function o(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function s(){this.len=0,this.head=new e(i,0,0),this.tail=this.head,this.states=null}function u(t,r,n){r[n]=255&t}function f(t,r,n){for(;t>127;)r[n++]=127&t|128,t>>>=7;r[n]=t}function h(t,n){this.len=t,this.next=r,this.val=n}function a(t,r,n){for(;t.hi;)r[n++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)r[n++]=127&t.lo|128,t.lo=t.lo>>>7;r[n++]=t.lo}function c(t,r,n){r[n++]=255&t,r[n++]=t>>>8&255,r[n++]=t>>>16&255,r[n]=t>>>24}n.exports=s;var p,l=t(13),y=l.LongBits,d=l.base64,v=l.utf8;s.create=l.Buffer?function(){return(s.create=function(){return new p})()}:function(){return new s},s.alloc=function(t){return new l.Array(t)},l.Array!==Array&&(s.alloc=l.pool(s.alloc,l.Array.prototype.subarray)),s.prototype.push=function(t,r,n){return this.tail=this.tail.next=new e(t,r,n),this.len+=r,this},h.prototype=Object.create(e.prototype),h.prototype.fn=f,s.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new h((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},s.prototype.int32=function(t){return t<0?this.push(a,10,y.fromNumber(t)):this.uint32(t)},s.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},s.prototype.uint64=function(t){var r=y.from(t);return this.push(a,r.length(),r)},s.prototype.int64=s.prototype.uint64,s.prototype.sint64=function(t){var r=y.from(t).zzEncode();return this.push(a,r.length(),r)},s.prototype.bool=function(t){return this.push(u,1,t?1:0)},s.prototype.fixed32=function(t){return this.push(c,4,t>>>0)},s.prototype.sfixed32=function(t){return this.push(c,4,t<<1^t>>31)},s.prototype.fixed64=function(t){var r=y.from(t);return this.push(c,4,r.lo).push(c,4,r.hi)},s.prototype.sfixed64=function(t){var r=y.from(t).zzEncode();return this.push(c,4,r.lo).push(c,4,r.hi)};var b="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),r=new Uint8Array(t.buffer);return t[0]=-0,r[3]?function(n,e,i){t[0]=n,e[i++]=r[0],e[i++]=r[1],e[i++]=r[2],e[i]=r[3]}:function(n,e,i){t[0]=n,e[i++]=r[3],e[i++]=r[2],e[i++]=r[1],e[i]=r[0]}}():function(t,r,n){var e=t<0?1:0;if(e&&(t=-t),0===t)c(1/t>0?0:2147483648,r,n);else if(isNaN(t))c(2147483647,r,n);else if(t>3.4028234663852886e38)c((e<<31|2139095040)>>>0,r,n);else if(t<1.1754943508222875e-38)c((e<<31|Math.round(t/1.401298464324817e-45))>>>0,r,n);else{var i=Math.floor(Math.log(t)/Math.LN2),o=8388607&Math.round(t*Math.pow(2,-i)*8388608);c((e<<31|i+127<<23|o)>>>0,r,n)}};s.prototype.float=function(t){return this.push(b,4,t)};var g="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),r=new Uint8Array(t.buffer);return t[0]=-0,r[7]?function(n,e,i){t[0]=n,e[i++]=r[0],e[i++]=r[1],e[i++]=r[2],e[i++]=r[3],e[i++]=r[4],e[i++]=r[5],e[i++]=r[6],e[i]=r[7]}:function(n,e,i){t[0]=n,e[i++]=r[7],e[i++]=r[6],e[i++]=r[5],e[i++]=r[4],e[i++]=r[3],e[i++]=r[2],e[i++]=r[1],e[i]=r[0]}}():function(t,r,n){var e=t<0?1:0;if(e&&(t=-t),0===t)c(0,r,n),c(1/t>0?0:2147483648,r,n+4);else if(isNaN(t))c(4294967295,r,n),c(2147483647,r,n+4);else if(t>1.7976931348623157e308)c(0,r,n),c((e<<31|2146435072)>>>0,r,n+4);else{var i;if(t<2.2250738585072014e-308)i=t/5e-324,c(i>>>0,r,n),c((e<<31|i/4294967296)>>>0,r,n+4);else{var o=Math.floor(Math.log(t)/Math.LN2);1024===o&&(o=1023),i=t*Math.pow(2,-o),c(4503599627370496*i>>>0,r,n),c((e<<31|o+1023<<20|1048576*i&1048575)>>>0,r,n+4)}}};s.prototype.double=function(t){return this.push(g,8,t)};var m=l.Array.prototype.set?function(t,r,n){r.set(t,n)}:function(t,r,n){for(var e=0;e<t.length;++e)r[n+e]=t[e]};s.prototype.bytes=function(t){var r=t.length>>>0;if(!r)return this.push(u,1,0);if(l.isString(t)){var n=s.alloc(r=d.length(t));d.decode(t,n,0),t=n}return this.uint32(r).push(m,r,t)},s.prototype.string=function(t){var r=v.length(t);return r?this.uint32(r).push(v.write,r,t):this.push(u,1,0)},s.prototype.fork=function(){return this.states=new o(this),this.head=this.tail=new e(i,0,0),this.len=0,this},s.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new e(i,0,0),this.len=0),this},s.prototype.ldelim=function(){var t=this.head,r=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=r,this.len+=n),this},s.prototype.finish=function(){for(var t=this.head.next,r=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,r,n),n+=t.len,t=t.next;return r},s.b=function(t){p=t}},{13:13}],15:[function(t,r){function n(){i.call(this)}function e(t,r,n){t.length<40?o.utf8.write(t,r,n):r.utf8Write(t,n)}r.exports=n;var i=t(14);(n.prototype=Object.create(i.prototype)).constructor=n;var o=t(13),s=o.Buffer;n.alloc=function(t){return(n.alloc=s.allocUnsafe)(t)};var u=s&&s.prototype instanceof Uint8Array&&"set"===s.prototype.set.name?function(t,r,n){r.set(t,n)}:function(t,r,n){if(t.copy)t.copy(r,n,0,t.length);else for(var e=0;e<t.length;)r[n++]=t[e++]};n.prototype.bytes=function(t){o.isString(t)&&(t=s.from(t,"base64"));var r=t.length>>>0;return this.uint32(r),r&&this.push(u,r,t),this},n.prototype.string=function(t){var r=s.byteLength(t);return this.uint32(r),r&&this.push(e,r,t),this}},{13:13,14:14}]},{},[7])}("object"==typeof window&&window||"object"==typeof self&&self||this);
!function(t,r){"use strict";!function(r,n,e){function i(t){var e=n[t];return e||r[t][0].call(e=n[t]={exports:{}},i,e,e.exports),e.exports}var o=t.protobuf=i(e[0]);"function"==typeof define&&define.amd&&define(["long"],function(t){return o.util.Long=t,o.configure(),o}),"object"==typeof module&&module&&module.exports&&(module.exports=o)}({1:[function(t,r){function n(t,r){for(var n=[],e=2;e<arguments.length;)n.push(arguments[e++]);var i=!0;return new Promise(function(e,o){n.push(function(t){if(i)if(i=!1,t)o(t);else{for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);e.apply(null,r)}});try{t.apply(r||this,n)}catch(t){i&&(i=!1,o(t))}})}r.exports=n},{}],2:[function(t,n,e){var i=e;i.length=function(t){var r=t.length;if(!r)return 0;for(var n=0;--r%4>1&&"="===t.charAt(r);)++n;return Math.ceil(3*t.length)/4-n};for(var o=Array(64),s=Array(123),u=0;u<64;)s[o[u]=u<26?u+65:u<52?u+71:u<62?u-4:u-59|43]=u++;i.encode=function(t,r,n){for(var e,i=[],s=0,u=0;r<n;){var h=t[r++];switch(u){case 0:i[s++]=o[h>>2],e=(3&h)<<4,u=1;break;case 1:i[s++]=o[e|h>>4],e=(15&h)<<2,u=2;break;case 2:i[s++]=o[e|h>>6],i[s++]=o[63&h],u=0}}return u&&(i[s++]=o[e],i[s]=61,1===u&&(i[s+1]=61)),String.fromCharCode.apply(String,i)};var h="invalid encoding";i.decode=function(t,n,e){for(var i,o=e,u=0,f=0;f<t.length;){var a=t.charCodeAt(f++);if(61===a&&u>1)break;if((a=s[a])===r)throw Error(h);switch(u){case 0:i=a,u=1;break;case 1:n[e++]=i<<2|(48&a)>>4,i=a,u=2;break;case 2:n[e++]=(15&i)<<4|(60&a)>>2,i=a,u=3;break;case 3:n[e++]=(3&i)<<6|a,u=0}}if(1===u)throw Error(h);return e-o},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){function e(){this.a={}}n.exports=e,e.prototype.on=function(t,r,n){return(this.a[t]||(this.a[t]=[])).push({fn:r,ctx:n||this}),this},e.prototype.off=function(t,n){if(t===r)this.a={};else if(n===r)this.a[t]=[];else for(var e=this.a[t],i=0;i<e.length;)e[i].fn===n?e.splice(i,1):++i;return this},e.prototype.emit=function(t){var r=this.a[t];if(r){for(var n=[],e=1;e<arguments.length;)n.push(arguments[e++]);for(e=0;e<r.length;)r[e].fn.apply(r[e++].ctx,n)}return this}},{}],4:[function(t,r,n){function e(t){try{var r=eval("quire".replace(/^/,"re"))(t);if(r&&(r.length||Object.keys(r).length))return r}catch(t){}return null}r.exports=e},{}],5:[function(t,r){function n(t,r,n){var e=n||8192,i=e>>>1,o=null,s=e;return function(n){if(n<1||n>i)return t(n);s+n>e&&(o=t(e),s=0);var u=r.call(o,s,s+=n);return 7&s&&(s=(7|s)+1),u}}r.exports=n},{}],6:[function(t,r,n){var e=n;e.length=function(t){for(var r=0,n=0,e=0;e<t.length;++e)n=t.charCodeAt(e),n<128?r+=1:n<2048?r+=2:55296===(64512&n)&&56320===(64512&t.charCodeAt(e+1))?(++e,r+=4):r+=3;return r},e.read=function(t,r,n){var e=n-r;if(e<1)return"";for(var i,o=null,s=[],u=0;r<n;)i=t[r++],i<128?s[u++]=i:i>191&&i<224?s[u++]=(31&i)<<6|63&t[r++]:i>239&&i<365?(i=((7&i)<<18|(63&t[r++])<<12|(63&t[r++])<<6|63&t[r++])-65536,s[u++]=55296+(i>>10),s[u++]=56320+(1023&i)):s[u++]=(15&i)<<12|(63&t[r++])<<6|63&t[r++],u>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),u=0);return o?(u&&o.push(String.fromCharCode.apply(String,s.slice(0,u))),o.join("")):String.fromCharCode.apply(String,s.slice(0,u))},e.write=function(t,r,n){for(var e,i,o=n,s=0;s<t.length;++s)e=t.charCodeAt(s),e<128?r[n++]=e:e<2048?(r[n++]=e>>6|192,r[n++]=63&e|128):55296===(64512&e)&&56320===(64512&(i=t.charCodeAt(s+1)))?(e=65536+((1023&e)<<10)+(1023&i),++s,r[n++]=e>>18|240,r[n++]=e>>12&63|128,r[n++]=e>>6&63|128,r[n++]=63&e|128):(r[n++]=e>>12|224,r[n++]=e>>6&63|128,r[n++]=63&e|128);return n-o}},{}],7:[function(t,r,n){function e(){i.Reader.b(i.BufferReader)}var i=n;i.build="minimal",i.roots={},i.Writer=t(14),i.BufferWriter=t(15),i.Reader=t(8),i.BufferReader=t(9),i.util=t(13),i.rpc=t(10),i.configure=e,i.Writer.b(i.BufferWriter),e()},{10:10,13:13,14:14,15:15,8:8,9:9}],8:[function(t,r){function n(t,r){return RangeError("index out of range: "+t.pos+" + "+(r||1)+" > "+t.len)}function e(t){this.buf=t,this.pos=0,this.len=t.length}function i(){var t=new m(0,0),r=0;if(!(this.len-this.pos>4)){for(;r<3;++r){if(this.pos>=this.len)throw n(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*r)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*r)>>>0,t}for(;r<4;++r)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*r)>>>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(r=0,this.len-this.pos>4){for(;r<5;++r)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*r+3)>>>0,this.buf[this.pos++]<128)return t}else for(;r<5;++r){if(this.pos>=this.len)throw n(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*r+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function o(){return i.call(this).toLong()}function s(){return i.call(this).toNumber()}function u(){return i.call(this).toLong(!0)}function h(){return i.call(this).toNumber(!0)}function f(){return i.call(this).zzDecode().toLong()}function a(){return i.call(this).zzDecode().toNumber()}function c(t,r){return(t[r-4]|t[r-3]<<8|t[r-2]<<16|t[r-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw n(this,8);return new m(c(this.buf,this.pos+=4),c(this.buf,this.pos+=4))}function l(){return p.call(this).toLong(!0)}function y(){return p.call(this).toNumber(!0)}function d(){return p.call(this).zzDecode().toLong()}function b(){return p.call(this).zzDecode().toNumber()}r.exports=e;var v,g=t(13),m=g.LongBits,w=g.utf8;e.create=g.Buffer?function(t){return(e.create=function(t){return g.Buffer.isBuffer(t)?new v(t):new e(t)})(t)}:function(t){return new e(t)},e.prototype.c=g.Array.prototype.subarray||g.Array.prototype.slice,e.prototype.uint32=function(){var t=4294967295;return function(){if(t=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return t;if(t=(t|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return t;if((this.pos+=5)>this.len)throw this.pos=this.len,n(this,10);return t}}(),e.prototype.int32=function(){return 0|this.uint32()},e.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},e.prototype.bool=function(){return 0!==this.uint32()},e.prototype.fixed32=function(){if(this.pos+4>this.len)throw n(this,4);return c(this.buf,this.pos+=4)},e.prototype.sfixed32=function(){var t=this.fixed32();return t>>>1^-(1&t)};var A="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),r=new Uint8Array(t.buffer);return t[0]=-0,r[3]?function(n,e){return r[0]=n[e],r[1]=n[e+1],r[2]=n[e+2],r[3]=n[e+3],t[0]}:function(n,e){return r[3]=n[e],r[2]=n[e+1],r[1]=n[e+2],r[0]=n[e+3],t[0]}}():function(t,r){var n=c(t,r+4),e=2*(n>>31)+1,i=n>>>23&255,o=8388607&n;return 255===i?o?NaN:e*(1/0):0===i?1.401298464324817e-45*e*o:e*Math.pow(2,i-150)*(o+8388608)};e.prototype.float=function(){if(this.pos+4>this.len)throw n(this,4);var t=A(this.buf,this.pos);return this.pos+=4,t};var x="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),r=new Uint8Array(t.buffer);return t[0]=-0,r[7]?function(n,e){return r[0]=n[e],r[1]=n[e+1],r[2]=n[e+2],r[3]=n[e+3],r[4]=n[e+4],r[5]=n[e+5],r[6]=n[e+6],r[7]=n[e+7],t[0]}:function(n,e){return r[7]=n[e],r[6]=n[e+1],r[5]=n[e+2],r[4]=n[e+3],r[3]=n[e+4],r[2]=n[e+5],r[1]=n[e+6],r[0]=n[e+7],t[0]}}():function(t,r){var n=c(t,r+4),e=c(t,r+8),i=2*(e>>31)+1,o=e>>>20&2047,s=4294967296*(1048575&e)+n;return 2047===o?s?NaN:i*(1/0):0===o?5e-324*i*s:i*Math.pow(2,o-1075)*(s+4503599627370496)};e.prototype.double=function(){if(this.pos+8>this.len)throw n(this,4);var t=x(this.buf,this.pos);return this.pos+=8,t},e.prototype.bytes=function(){var t=this.uint32(),r=this.pos,e=this.pos+t;if(e>this.len)throw n(this,t);return this.pos+=t,r===e?new this.buf.constructor(0):this.c.call(this.buf,r,e)},e.prototype.string=function(){var t=this.bytes();return w.read(t,0,t.length)},e.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw n(this,t);this.pos+=t}else do if(this.pos>=this.len)throw n(this);while(128&this.buf[this.pos++]);return this},e.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(;;){if(4===(t=7&this.uint32()))break;this.skipType(t)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},e.b=function(t){v=t,g.Long?(e.prototype.int64=o,e.prototype.uint64=u,e.prototype.sint64=f,e.prototype.fixed64=l,e.prototype.sfixed64=d):(e.prototype.int64=s,e.prototype.uint64=h,e.prototype.sint64=a,e.prototype.fixed64=y,e.prototype.sfixed64=b)}},{13:13}],9:[function(t,r){function n(t){e.call(this,t)}r.exports=n;var e=t(8);(n.prototype=Object.create(e.prototype)).constructor=n;var i=t(13);i.Buffer&&(n.prototype.c=i.Buffer.prototype.slice),n.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len))}},{13:13,8:8}],10:[function(t,r,n){var e=n;e.Service=t(11)},{11:11}],11:[function(t,n){function e(t,r,n){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");i.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!r,this.responseDelimited=!!n}n.exports=e;var i=t(13);(e.prototype=Object.create(i.EventEmitter.prototype)).constructor=e,e.prototype.rpcCall=function t(n,e,o,s,u){if(!s)throw TypeError("request must be specified");var h=this;if(!u)return i.asPromise(t,h,n,e,o,s);if(!h.rpcImpl)return setTimeout(function(){u(Error("already ended"))},0),r;try{return h.rpcImpl(n,e[h.requestDelimited?"encodeDelimited":"encode"](s).finish(),function(t,e){if(t)return h.emit("error",t,n),u(t);if(null===e)return h.end(!0),r;if(!(e instanceof o))try{e=o[h.responseDelimited?"decodeDelimited":"decode"](e)}catch(t){return h.emit("error",t,n),u(t)}return h.emit("data",e,n),u(null,e)})}catch(t){return h.emit("error",t,n),setTimeout(function(){u(t)},0),r}},e.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{13:13}],12:[function(t,r){function n(t,r){this.lo=t,this.hi=r}r.exports=n;var e=t(13),i=n.zero=new n(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var o=n.zeroHash="\0\0\0\0\0\0\0\0";n.fromNumber=function(t){if(0===t)return i;var r=t<0;r&&(t=-t);var e=t>>>0,o=(t-e)/4294967296>>>0;return r&&(o=~o>>>0,e=~e>>>0,++e>4294967295&&(e=0,++o>4294967295&&(o=0))),new n(e,o)},n.from=function(t){if("number"==typeof t)return n.fromNumber(t);if(e.isString(t)){if(!e.Long)return n.fromNumber(parseInt(t,10));t=e.Long.fromString(t)}return t.low||t.high?new n(t.low>>>0,t.high>>>0):i},n.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var r=~this.lo+1>>>0,n=~this.hi>>>0;return r||(n=n+1>>>0),-(r+4294967296*n)}return this.lo+4294967296*this.hi},n.prototype.toLong=function(t){return e.Long?new e.Long(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}};var s=String.prototype.charCodeAt;n.fromHash=function(t){return t===o?i:new n((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)},n.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)},n.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},n.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},n.prototype.length=function(){var t=this.lo,r=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===r?t<16384?t<128?1:2:t<2097152?3:4:r<16384?r<128?5:6:r<2097152?7:8:n<128?9:10}},{13:13}],13:[function(n,e,i){var o=i;o.asPromise=n(1),o.base64=n(2),o.EventEmitter=n(3),o.inquire=n(4),o.utf8=n(6),o.pool=n(5),o.LongBits=n(12),o.emptyArray=Object.freeze?Object.freeze([]):[],o.emptyObject=Object.freeze?Object.freeze({}):{},o.isNode=!!(t.process&&t.process.versions&&t.process.versions.node),o.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},o.isString=function(t){return"string"==typeof t||t instanceof String},o.isObject=function(t){return t&&"object"==typeof t},o.Buffer=function(){try{var t=o.inquire("buffer").Buffer;return t.prototype.utf8Write?(t.from||(t.from=function(r,n){return new t(r,n)}),t.allocUnsafe||(t.allocUnsafe=function(r){return new t(r)}),t):null}catch(t){return null}}(),o.newBuffer=function(t){return"number"==typeof t?o.Buffer?o.Buffer.allocUnsafe(t):new o.Array(t):o.Buffer?o.Buffer.from(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},o.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,o.Long=t.dcodeIO&&t.dcodeIO.Long||o.inquire("long"),o.longToHash=function(t){return t?o.LongBits.from(t).toHash():o.LongBits.zeroHash},o.longFromHash=function(t,r){var n=o.LongBits.fromHash(t);return o.Long?o.Long.fromBits(n.lo,n.hi,r):n.toNumber(!!r)},o.merge=function(t,n,e){for(var i=Object.keys(n),o=0;o<i.length;++o)t[i[o]]!==r&&e||(t[i[o]]=n[i[o]]);return t},o.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},o.oneOfGetter=function(t){for(var n={},e=0;e<t.length;++e)n[t[e]]=1;return function(){for(var t=Object.keys(this),e=t.length-1;e>-1;--e)if(1===n[t[e]]&&this[t[e]]!==r&&null!==this[t[e]])return t[e]}},o.oneOfSetter=function(t){return function(r){for(var n=0;n<t.length;++n)t[n]!==r&&delete this[t[n]]}},o.lazyResolve=function(t,r){for(var n=0;n<r.length;++n)for(var e=Object.keys(r[n]),i=0;i<e.length;++i){for(var o=r[n][e[i]].split("."),s=t;o.length;)s=s[o.shift()];r[n][e[i]]=s}},o.toJSONOptions={longs:String,enums:String,bytes:String}},{1:1,12:12,2:2,3:3,4:4,5:5,6:6}],14:[function(t,n){function e(t,n,e){this.fn=t,this.len=n,this.next=r,this.val=e}function i(){}function o(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function s(){this.len=0,this.head=new e(i,0,0),this.tail=this.head,this.states=null}function u(t,r,n){r[n]=255&t}function h(t,r,n){for(;t>127;)r[n++]=127&t|128,t>>>=7;r[n]=t}function f(t,n){this.len=t,this.next=r,this.val=n}function a(t,r,n){for(;t.hi;)r[n++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)r[n++]=127&t.lo|128,t.lo=t.lo>>>7;r[n++]=t.lo}function c(t,r,n){r[n++]=255&t,r[n++]=t>>>8&255,r[n++]=t>>>16&255,r[n]=t>>>24}n.exports=s;var p,l=t(13),y=l.LongBits,d=l.base64,b=l.utf8;s.create=l.Buffer?function(){return(s.create=function(){return new p})()}:function(){return new s},s.alloc=function(t){return new l.Array(t)},l.Array!==Array&&(s.alloc=l.pool(s.alloc,l.Array.prototype.subarray)),s.prototype.push=function(t,r,n){return this.tail=this.tail.next=new e(t,r,n),this.len+=r,this},f.prototype=Object.create(e.prototype),f.prototype.fn=h,s.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new f((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},s.prototype.int32=function(t){return t<0?this.push(a,10,y.fromNumber(t)):this.uint32(t)},s.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},s.prototype.uint64=function(t){var r=y.from(t);return this.push(a,r.length(),r)},s.prototype.int64=s.prototype.uint64,s.prototype.sint64=function(t){var r=y.from(t).zzEncode();return this.push(a,r.length(),r)},s.prototype.bool=function(t){return this.push(u,1,t?1:0)},s.prototype.fixed32=function(t){return this.push(c,4,t>>>0)},s.prototype.sfixed32=function(t){return this.push(c,4,t<<1^t>>31)},s.prototype.fixed64=function(t){var r=y.from(t);return this.push(c,4,r.lo).push(c,4,r.hi)},s.prototype.sfixed64=function(t){var r=y.from(t).zzEncode();return this.push(c,4,r.lo).push(c,4,r.hi)};var v="undefined"!=typeof Float32Array?function(){var t=new Float32Array(1),r=new Uint8Array(t.buffer);return t[0]=-0,r[3]?function(n,e,i){t[0]=n,e[i++]=r[0],e[i++]=r[1],e[i++]=r[2],e[i]=r[3]}:function(n,e,i){t[0]=n,e[i++]=r[3],e[i++]=r[2],e[i++]=r[1],e[i]=r[0]}}():function(t,r,n){var e=t<0?1:0;if(e&&(t=-t),0===t)c(1/t>0?0:2147483648,r,n);else if(isNaN(t))c(2147483647,r,n);else if(t>3.4028234663852886e38)c((e<<31|2139095040)>>>0,r,n);else if(t<1.1754943508222875e-38)c((e<<31|Math.round(t/1.401298464324817e-45))>>>0,r,n);else{var i=Math.floor(Math.log(t)/Math.LN2),o=8388607&Math.round(t*Math.pow(2,-i)*8388608);c((e<<31|i+127<<23|o)>>>0,r,n)}};s.prototype.float=function(t){return this.push(v,4,t)};var g="undefined"!=typeof Float64Array?function(){var t=new Float64Array(1),r=new Uint8Array(t.buffer);return t[0]=-0,r[7]?function(n,e,i){t[0]=n,e[i++]=r[0],e[i++]=r[1],e[i++]=r[2],e[i++]=r[3],e[i++]=r[4],e[i++]=r[5],e[i++]=r[6],e[i]=r[7]}:function(n,e,i){t[0]=n,e[i++]=r[7],e[i++]=r[6],e[i++]=r[5],e[i++]=r[4],e[i++]=r[3],e[i++]=r[2],e[i++]=r[1],e[i]=r[0]}}():function(t,r,n){var e=t<0?1:0;if(e&&(t=-t),0===t)c(0,r,n),c(1/t>0?0:2147483648,r,n+4);else if(isNaN(t))c(4294967295,r,n),c(2147483647,r,n+4);else if(t>1.7976931348623157e308)c(0,r,n),c((e<<31|2146435072)>>>0,r,n+4);else{var i;if(t<2.2250738585072014e-308)i=t/5e-324,c(i>>>0,r,n),c((e<<31|i/4294967296)>>>0,r,n+4);else{var o=Math.floor(Math.log(t)/Math.LN2);1024===o&&(o=1023),i=t*Math.pow(2,-o),c(4503599627370496*i>>>0,r,n),c((e<<31|o+1023<<20|1048576*i&1048575)>>>0,r,n+4)}}};s.prototype.double=function(t){return this.push(g,8,t)};var m=l.Array.prototype.set?function(t,r,n){r.set(t,n)}:function(t,r,n){for(var e=0;e<t.length;++e)r[n+e]=t[e]};s.prototype.bytes=function(t){var r=t.length>>>0;if(!r)return this.push(u,1,0);if(l.isString(t)){var n=s.alloc(r=d.length(t));d.decode(t,n,0),t=n}return this.uint32(r).push(m,r,t)},s.prototype.string=function(t){var r=b.length(t);return r?this.uint32(r).push(b.write,r,t):this.push(u,1,0)},s.prototype.fork=function(){return this.states=new o(this),this.head=this.tail=new e(i,0,0),this.len=0,this},s.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new e(i,0,0),this.len=0),this},s.prototype.ldelim=function(){var t=this.head,r=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=r,this.len+=n),this},s.prototype.finish=function(){for(var t=this.head.next,r=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,r,n),n+=t.len,t=t.next;return r},s.b=function(t){p=t}},{13:13}],15:[function(t,r){function n(){i.call(this)}function e(t,r,n){t.length<40?o.utf8.write(t,r,n):r.utf8Write(t,n)}r.exports=n;var i=t(14);(n.prototype=Object.create(i.prototype)).constructor=n;var o=t(13),s=o.Buffer;n.alloc=function(t){return(n.alloc=s.allocUnsafe)(t)};var u=s&&s.prototype instanceof Uint8Array&&"set"===s.prototype.set.name?function(t,r,n){r.set(t,n)}:function(t,r,n){if(t.copy)t.copy(r,n,0,t.length);else for(var e=0;e<t.length;)r[n++]=t[e++]};n.prototype.bytes=function(t){o.isString(t)&&(t=s.from(t,"base64"));var r=t.length>>>0;return this.uint32(r),r&&this.push(u,r,t),this},n.prototype.string=function(t){var r=s.byteLength(t);return this.uint32(r),r&&this.push(e,r,t),this}},{13:13,14:14}]},{},[7])}("object"==typeof window&&window||"object"==typeof self&&self||this);
//# sourceMappingURL=protobuf.min.js.map

@@ -7,3 +7,12 @@ {

"include": [
"./src/"
"./src/",
"./lib/aspromise/index.js",
"./lib/base64/index.js",
"./lib/codegen/index.js",
"./lib/eventemitter/index.js",
"./lib/fetch/index.js",
"./lib/inquire/index.js",
"./lib/path/index.js",
"./lib/pool/index.js",
"./lib/utf8/index.js"
],

@@ -10,0 +19,0 @@ "exclude": [],

{
"name": "protobufjs",
"version": "6.6.1",
"version": "6.6.2",
"versionScheme": "~",

@@ -41,3 +41,3 @@ "description": "Protocol Buffers for JavaScript (& TypeScript).",

"test": "tape -r ./lib/tape-adapter tests/*.js tests/node/*.js | tap-spec",
"types": "node bin/pbts --main --global protobuf --out index.d.ts src && tsc tests/comp_typescript.ts --lib es2015 --noEmit --strictNullChecks && tsc tests/data/test.ts --lib es2015 --noEmit --strictNullChecks && tsc tests/data/rpc.ts --lib es2015 --noEmit --strictNullChecks",
"types": "node bin/pbts --main --global protobuf --out index.d.ts src/ lib/aspromise/index.js lib/base64/index.js lib/codegen/index.js lib/eventemitter/index.js lib/fetch/index.js lib/inquire/index.js lib/path/index.js lib/pool/index.js lib/utf8/index.js && tsc tests/comp_typescript.ts --lib es2015 --noEmit --strictNullChecks && tsc tests/data/test.ts --lib es2015 --noEmit --strictNullChecks && tsc tests/data/rpc.ts --lib es2015 --noEmit --strictNullChecks",
"zuul": "zuul --ui tape --no-coverage --concurrency 4 -- tests/*.js",

@@ -49,11 +49,11 @@ "zuul-local": "zuul --ui tape --concurrency 1 --local 8080 --disable-tunnel -- tests/*.js",

"dependencies": {
"@protobufjs/aspromise": "^1.0.5",
"@protobufjs/base64": "^1.0.5",
"@protobufjs/aspromise": "^1.1.1",
"@protobufjs/base64": "^1.1.1",
"@protobufjs/codegen": "^1.0.8",
"@protobufjs/eventemitter": "^1.0.5",
"@protobufjs/fetch": "^1.0.4",
"@protobufjs/inquire": "^1.0.2",
"@protobufjs/path": "^1.0.2",
"@protobufjs/pool": "^1.0.5",
"@protobufjs/utf8": "^1.0.7"
"@protobufjs/eventemitter": "^1.1.0",
"@protobufjs/fetch": "^1.1.0",
"@protobufjs/inquire": "^1.1.0",
"@protobufjs/path": "^1.1.1",
"@protobufjs/pool": "^1.1.0",
"@protobufjs/utf8": "^1.1.0"
},

@@ -65,5 +65,5 @@ "optionalDependencies": {

"devDependencies": {
"@types/node": "7.0.0",
"@types/node": "7.0.4",
"benchmark": "^2.1.3",
"browserify": "^13.3.0",
"browserify": "^14.0.0",
"browserify-wrap": "^1.0.2",

@@ -74,3 +74,3 @@ "bundle-collapser": "^1.2.1",

"escodegen": "^1.8.1",
"eslint": "^3.14.0",
"eslint": "^3.14.1",
"esprima": "^3.1.3",

@@ -86,3 +86,4 @@ "estraverse": "^4.2.0",

"gulp-sourcemaps": "^2.4.0",
"gulp-uglify": "^2.0.0",
"gulp-uglify": "^2.0.1",
"istanbul": "^0.4.5",
"jaguarjs-jsdoc": "dcodeIO/jaguarjs-jsdoc",

@@ -89,0 +90,0 @@ "jsdoc": "^3.4.2",

@@ -349,6 +349,6 @@ <h1><p align="center"><img alt="protobuf.js" src="https://github.com/dcodeIO/protobuf.js/raw/master/pbjs.png" width="120" height="104" /></p></h1>

For example, the following generates a `bundle.json` and a `bundle.d.ts`, but no static code:
For example, the following generates a JSON module `bundle.js` and a `bundle.d.ts`, but no static code:
```
$> pbjs -t json-module -w commonjs -o bundle.json file1.proto file2.proto
$> pbjs -t json-module -w commonjs -o bundle.js file1.proto file2.proto
$> pbjs -t static-module file1.proto file2.proto | pbts -o bundle.d.ts -

@@ -359,5 +359,5 @@ ```

While using .proto files requires the [full library][dist-full] (about 18.5kb gzipped) or JSON at least the [light library][dist-light] (about 15.5kb gzipped), pretty much all code but the relatively short descriptors is shared and all features including reflection and the parser are available.
While using .proto files directly requires the [full library][dist-full] (about 18.5kb gzipped) respectively pure reflection/JSON the [light library][dist-light] (about 15.5kb gzipped), pretty much all code but the relatively short descriptors is shared.
Static code, on the other hand, requires just the [minimal library][dist-minimal] (about 5.5kb gzipped), but generates additional, albeit editable, source code without any reflection features.
Static code, on the other hand, requires just the [minimal library][dist-minimal] (about 6kb gzipped), but generates additional, albeit editable, source code without any reflection features.

@@ -364,0 +364,0 @@ There is no significant difference performance-wise as the code generated statically is pretty much the same as generated at runtime and both are largely interchangeable as seen in the previous section.

module.exports = bundle;
var fs = require("fs");

@@ -15,3 +16,6 @@ var browserify = require("browserify");

var zopfli = require("node-zopfli");
var pkg = require(__dirname + "/../package.json");
var license = [

@@ -26,2 +30,4 @@ "/*!",

var prelude = fs.readFileSync(require.resolve("../lib/prelude.js")).toString("utf8");
/**

@@ -42,3 +48,5 @@ * Bundles the library.

detectGlobals: false,
debug: true
debug: true,
prelude: prelude,
preludePath: "./lib/prelude.js"
})

@@ -52,4 +60,4 @@ .external("long");

// + undefined var and global strict-mode for uglify
prefix: "!function(global,undefined){\"use strict\";",
suffix: "}(typeof window===\"object\"&&window||typeof self===\"object\"&&self||this);"
prefix: "(function(global,undefined){\"use strict\";",
suffix: "})(typeof window===\"object\"&&window||typeof self===\"object\"&&self||this);"
})

@@ -87,5 +95,2 @@ .plugin(require("bundle-collapser/plugin"))

var fs = require("fs");
var zopfli = require("node-zopfli");
/**

@@ -92,0 +97,0 @@ * Compresses a file using zopfli gzip.

@@ -90,3 +90,3 @@ "use strict";

("if(%s!==undefined&&%s!==null&&m.hasOwnProperty(%j))", ref, ref, field.name);
else if (field.bytes) gen
else if (field.bytes || field.resolvedType && !(field.resolvedType instanceof Enum)) gen
("if(%s&&m.hasOwnProperty(%j))", ref, field.name);

@@ -93,0 +93,0 @@ else gen

"use strict";
var protobuf = global.protobuf = exports;
var protobuf = exports;

@@ -48,16 +48,4 @@ /**

// assumes that loading "long" / define itself is asynchronous so that other builds can safely
// continue populating `protobuf`. will see a BOOM eventually if this assumption is wrong:
/* istanbul ignore next */
if (typeof define === "function" && define.amd)
define(["long"], function(Long) {
if (Long) {
protobuf.util.Long = Long;
configure();
}
return protobuf;
});
// Configure serialization
protobuf.Writer._configure(protobuf.BufferWriter);
configure();

@@ -59,3 +59,3 @@ "use strict";

* @param {string} target The file name being imported
* @returns {string} Resolved path to `target`
* @returns {?string} Resolved path to `target` or `null` to skip the file
*/

@@ -108,9 +108,12 @@ Root.prototype.resolvePath = util.path.resolve;

var parsed = parse(source, self, options),
resolved,
i = 0;
if (parsed.imports)
for (; i < parsed.imports.length; ++i)
fetch(self.resolvePath(filename, parsed.imports[i]));
if (resolved = self.resolvePath(filename, parsed.imports[i]))
fetch(resolved);
if (parsed.weakImports)
for (i = 0; i < parsed.weakImports.length; ++i)
fetch(self.resolvePath(filename, parsed.weakImports[i]), true);
if (resolved = self.resolvePath(filename, parsed.weakImports[i]))
fetch(resolved, true);
}

@@ -189,4 +192,5 @@ } catch (err) {

filename = [ filename ];
for (var i = 0; i < filename.length; ++i)
fetch(self.resolvePath("", filename[i]));
for (var i = 0, resolved; i < filename.length; ++i)
if (resolved = self.resolvePath("", filename[i]))
fetch(resolved);

@@ -193,0 +197,0 @@ if (sync)

@@ -21,3 +21,3 @@ "use strict";

/**
* A service method part of an {@link rpc.ServiceMethodMixin|ServiceMethodMixin} and thus {@link rpc.Service} as created by {@link Service.create}.
* A service method part of a {@link rpc.ServiceMethodMixin|ServiceMethodMixin} and thus {@link rpc.Service} as created by {@link Service.create}.
* @typedef rpc.ServiceMethod

@@ -122,3 +122,3 @@ * @type {function}

self.emit("error", err, method);
return callback("error", err);
return callback(err);
}

@@ -125,0 +125,0 @@ }

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

util.pool = require("@protobufjs/pool");
util.LongBits = require("./longbits");

@@ -12,0 +13,0 @@

@@ -23,3 +23,3 @@ var tape = require("tape");

var count = 0, total = 4;
var count = 0, total = 6;

@@ -54,2 +54,26 @@ root = new Root();

});
var root3 = new Root();
root3.resolvePath = function() {
return null;
};
root3.load("tests/data/NOTFOUND2", function(err, root) {
test.notOk(err, "should skip files without error when resolvePath returns null");
test.equal(root, root3, "should still return itself");
if (++count === total)
test.end();
});
var root4 = new Root();
root4.resolvePath = function(origin, target) {
if (/weak\.proto$/.test(target))
return protobuf.util.path.resolve(origin, target);
return null;
};
root4.load("tests/data/weak.proto", function(err, root) {
test.notOk(err, "should skip files without error when resolvePath returns null");
test.equal(root, root4, "should still return itself");
if (++count === total)
test.end();
});
});

@@ -295,3 +295,3 @@ /*eslint-disable block-scoped-var, no-redeclare, no-control-regex, no-prototype-builtins*/

if (!$util.isInteger(message.int64Map[key[i]]) && !(message.int64Map[key[i]] && $util.isInteger(message.int64Map[key[i]].low) && $util.isInteger(message.int64Map[key[i]].high)))
return "int64Map: integer|Long{key:string} expected";
return "int64Map: integer|Long{k:string} expected";
}

@@ -298,0 +298,0 @@ return null;

@@ -174,3 +174,3 @@ /*eslint-disable block-scoped-var, no-redeclare, no-control-regex, no-prototype-builtins*/

writer.uint32(/* id 5, wireType 2 =*/42).string(message.license);
if (message.repository !== undefined && message.hasOwnProperty("repository"))
if (message.repository && message.hasOwnProperty("repository"))
$types[6].encode(message.repository, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();

@@ -385,3 +385,3 @@ if (message.bugs !== undefined && message.hasOwnProperty("bugs"))

if (!$util.isString(message.bin[key[i]]))
return "bin: string{key:string} expected";
return "bin: string{k:string} expected";
}

@@ -394,3 +394,3 @@ if (message.scripts !== undefined) {

if (!$util.isString(message.scripts[key[i]]))
return "scripts: string{key:string} expected";
return "scripts: string{k:string} expected";
}

@@ -403,3 +403,3 @@ if (message.dependencies !== undefined) {

if (!$util.isString(message.dependencies[key[i]]))
return "dependencies: string{key:string} expected";
return "dependencies: string{k:string} expected";
}

@@ -412,3 +412,3 @@ if (message.optionalDependencies !== undefined) {

if (!$util.isString(message.optionalDependencies[key[i]]))
return "optionalDependencies: string{key:string} expected";
return "optionalDependencies: string{k:string} expected";
}

@@ -421,3 +421,3 @@ if (message.devDependencies !== undefined) {

if (!$util.isString(message.devDependencies[key[i]]))
return "devDependencies: string{key:string} expected";
return "devDependencies: string{k:string} expected";
}

@@ -424,0 +424,0 @@ if (message.types !== undefined)

@@ -1,40 +0,1 @@

var tape = require("tape");
var protobuf = require("..");
tape.test("base64 micromodule", function(test) {
var strings = {
"": "",
"a": "YQ==",
"ab": "YWI=",
"abcdefg": "YWJjZGVmZw==",
"abcdefgh": "YWJjZGVmZ2g=",
"abcdefghi": "YWJjZGVmZ2hp"
};
Object.keys(strings).forEach(function(str) {
var enc = strings[str];
var len = protobuf.util.base64.length(enc);
test.equal(len, str.length, "should calculate '" + enc + "' as " + str.length + " bytes");
var buf = protobuf.util.newBuffer(len);
var len2 = protobuf.util.base64.decode(enc, buf, 0);
test.equal(len2, len, "should decode '" + enc + "' to " + len + " bytes");
if (protobuf.util.isNode && protobuf.util.Buffer)
test.equal(buf.toString("utf8"), str, "should decode '" + enc + "' to '" + str + "'");
var enc2 = protobuf.util.base64.encode(buf, 0, buf.length);
test.equal(enc2, enc, "should encode '" + str + "' to '" + enc + "'");
var writer = protobuf.Writer.create();
var buf2 = writer.bytes(enc).finish();
for (var i = 0; i < buf.length; ++i)
test.equal(buf2[i + buf2.length - buf.length], buf[i], "should write byte " + buf[i] + " at " + (i + buf2.length - buf.length));
});
test.end();
});
require("../lib/base64/tests");

@@ -1,50 +0,1 @@

var tape = require("tape");
var protobuf = require("..");
var utf8 = protobuf.util.utf8;
var size = 1000000;
tape.test("utf8 micromodule", function(test) {
if (protobuf.util.isNode) {
var data = require("fs").readFileSync("tests/data/utf8.txt").toString("utf8");
var len, buf;
while (data.length < size)
data += data;
data = data.substring(0, size);
test.test(test.name + " - write", function(test) {
len = utf8.length(data);
buf = protobuf.util.newBuffer(len);
test.equal(utf8.write(data, buf, 0), len, "should encode " + len + " bytes");
var comp = new Buffer(data, "utf8");
test.equal(buf.length, comp.length, "should produce a buffer length equal to node");
for (var i = 0; i < buf.length; ++i) {
if (buf[i] !== comp[i]) {
test.fail("should produce the same encoding as node (offset " + i + ")");
return;
}
}
test.pass("should produce the same encoding as node");
test.end();
});
test.test(test.name + " - read", function(test) {
var comp = utf8.read(buf, 0, buf.length);
test.equal(comp, data, "should read back the original data");
test.end();
});
}
test.end();
});
require("../lib/utf8/tests");

@@ -73,3 +73,4 @@ var fs = require("fs"),

define: fakeDefine,
window: {}
window: {},
require: undefined
});

@@ -76,0 +77,0 @@

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 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 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 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 too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc