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.5.0 to 6.5.1

bench/index.html

16

CHANGELOG.md

@@ -1,3 +0,15 @@

# [6.5.0](https://github.com/dcodeIO/protobuf.js/releases/tag/6.5.0)
# [6.5.1](https://github.com/dcodeIO/protobuf.js/releases/tag/6.5.1)
## CLI
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/9719fd2fa8fd97899c54712a238091e8fd1c57b2) Reuse module paths when looking up cli dependencies, see [#648](https://github.com/dcodeIO/protobuf.js/issues/648)<br />
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6302655d1304cf662f556be5d9fe7a016fcedc3c) Check actual module directories to determine if cli dependencies are present and bootstrap semver, see [#648](https://github.com/dcodeIO/protobuf.js/issues/648)<br />
## Docs
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/dfc7c4323bf98fb26ddcfcfbb6896a6d6e8450a4) Added a note on semver-incompatibility, see [#649](https://github.com/dcodeIO/protobuf.js/issues/649)<br />
## Other
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/49053ffa0ea8a4ba5ae048706dba1ab6f3bc803b) Coverage progress<br />
# [6.5.0](https://github.com/dcodeIO/protobuf.js/releases/tag/6.5.0) ([release](https://github.com/dcodeIO/protobuf.js/releases/tag/6.5.0))
## Breaking

@@ -119,3 +131,3 @@ [:hash:](https://github.com/dcodeIO/protobuf.js/commit/3946e0fefea415f52a16ea7a74109ff40eee9643) Initial upgrade of converters to real generated functions, see [#620](https://github.com/dcodeIO/protobuf.js/issues/620)<br />

# [6.4.0](https://github.com/dcodeIO/protobuf.js/releases/tag/6.4.0)
# [6.4.0](https://github.com/dcodeIO/protobuf.js/releases/tag/6.4.0) ([release](https://github.com/dcodeIO/protobuf.js/releases/tag/6.4.0))

@@ -122,0 +134,0 @@ ## Breaking

60

cli/util.js

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

child_process = require("child_process"),
Module = require("module");
semver;

@@ -75,34 +75,42 @@ var protobuf = require("..");

function modExists(name, version) {
for (var i = 0; i < module.paths.length; ++i) {
try {
var pkg = JSON.parse(fs.readFileSync(path.join(module.paths[i], name, "package.json")));
return semver
? semver.satisfies(pkg.version, version)
: parseInt(pkg.version, 10) === parseInt(version.replace(/^[\^~]/, ""), 10); // used for semver only
} catch (e) {}
}
return false;
}
function modInstall(install) {
child_process.execSync("npm --silent install " + (typeof install === "string" ? install : install.join(" ")), {
cwd: __dirname,
stdio: "ignore"
});
}
exports.setup = function() {
// this one is important. without it, this folder won't be searched anymore.
try { fs.mkdirSync(path.join(__dirname, "node_modules")); } catch (e) {}
// find out which modules are missing
var pkg = require(path.join(__dirname, "..", "package.json"));
var version = pkg.dependencies["semver"] || pkg.devDependencies["semver"];
if (!modExists("semver", version)) {
process.stderr.write("installing semver@" + version + "\n");
modInstall("semver@" + version);
}
semver = require("semver"); // used from now on for version comparison
var install = [];
var semver;
pkg.cliDependencies.forEach(function(name) {
var version = pkg.dependencies[name] || pkg.devDependencies[name];
try {
var mPath = require.resolve(name + "/package.json"); // jsdoc has no main file
var mPkg = JSON.parse(fs.readFileSync(mPath));
if (semver && !semver.satisfies(mPkg.version, version))
throw Error(mPkg.version + " is outdated");
} catch (e) {
process.stderr.write("installing " + name + "@" + version + " (" + e.message + ")\n");
install.push(version ? name + "@" + version : name);
if (name === "semver")
return;
version = pkg.dependencies[name] || pkg.devDependencies[name];
if (!modExists(name, version)) {
process.stderr.write("installing " + name + "@" + version + "\n");
install.push(name + "@" + version);
}
if (name === "semver")
semver = require("semver");
});
if (!install.length) {
try { fs.rmdirSync(path.join(__dirname, "node_modules")); } catch (e) {}
if (!install.length)
return;
}
// if any are missing, install them. this relies on an empty package.json in cli/.
child_process.execSync("npm --silent install " + install.join(" "), {
cwd: __dirname,
stdio: "ignore"
});
modInstall(install);
};

@@ -109,0 +117,0 @@

/*!
* protobuf.js v6.5.0 (c) 2016, Daniel Wirtz
* Compiled Tue, 17 Jan 2017 04:40:35 UTC
* protobuf.js v6.5.1 (c) 2016, Daniel Wirtz
* Compiled Wed, 18 Jan 2017 02:28:43 UTC
* Licensed under the BSD-3-Clause License
* see: https://github.com/dcodeIO/protobuf.js for details
*/
!function(e,t){"use strict";!function e(t,r,n){function i(o,u){if(!r[o]){if(!t[o]){var f="function"==typeof require&&require;if(!u&&f)return f(o,!0);if(s)return s(o,!0);var a=Error("Cannot find module '"+o+"'");throw a.code="MODULE_NOT_FOUND",a}var h=r[o]={exports:{}};t[o][0].call(h.exports,function(e){var r=t[o][1][e];return i(r?r:e)},h,h.exports,e,t,r,n)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(e,t){function r(e,t){for(var r=[],n=2;n<arguments.length;)r.push(arguments[n++]);var i=!0;return new Promise(function(n,s){r.push(function(e){if(i)if(i=!1,e)s(e);else{for(var t=[],r=1;r<arguments.length;)t.push(arguments[r++]);n.apply(null,t)}});try{e.apply(t||this,r)}catch(e){i&&(i=!1,s(e))}})}t.exports=r},{}],2:[function(e,r,n){var i=n;i.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var s=Array(64),o=Array(123),u=0;u<64;)o[s[u]=u<26?u+65:u<52?u+71:u<62?u-4:u-59|43]=u++;i.encode=function(e,t,r){for(var n,i=[],o=0,u=0;t<r;){var f=e[t++];switch(u){case 0:i[o++]=s[f>>2],n=(3&f)<<4,u=1;break;case 1:i[o++]=s[n|f>>4],n=(15&f)<<2,u=2;break;case 2:i[o++]=s[n|f>>6],i[o++]=s[63&f],u=0}}return u&&(i[o++]=s[n],i[o]=61,1===u&&(i[o+1]=61)),String.fromCharCode.apply(String,i)};var f="invalid encoding";i.decode=function(e,r,n){for(var i,s=n,u=0,a=0;a<e.length;){var h=e.charCodeAt(a++);if(61===h&&u>1)break;if((h=o[h])===t)throw Error(f);switch(u){case 0:i=h,u=1;break;case 1:r[n++]=i<<2|(48&h)>>4,i=h,u=2;break;case 2:r[n++]=(15&i)<<4|(60&h)>>2,i=h,u=3;break;case 3:r[n++]=(3&i)<<6|h,u=0}}if(1===u)throw Error(f);return n-s},i.test=function(e){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e)}},{}],3:[function(e,r){function n(){function e(){for(var t=[],r=0;r<arguments.length;)t.push(arguments[r++]);var n=i.apply(null,t),h=p;if(c.length){var l=c[c.length-1];s.test(l)?h=++p:f.test(l)&&++h,u.test(l)&&!u.test(n)?(h=++p,d=!0):d&&a.test(l)&&(h=--p,d=!1),o.test(n)&&(h=--p)}for(r=0;r<h;++r)n="\t"+n;return c.push(n),e}function r(e){return"function"+(e?" "+e.replace(/[^\w_$]/g,"_"):"")+"("+l.join(",")+") {\n"+c.join("\n")+"\n}"}function h(r,i){"object"==typeof r&&(i=r,r=t);var s=e.str(r);n.verbose&&console.log("--- codegen ---\n"+s.replace(/^/gm,"> ").replace(/\t/g," "));var o=Object.keys(i||(i={}));return Function.apply(null,o.concat("return "+s)).apply(null,o.map(function(e){return i[e]}))}for(var l=[],c=[],p=1,d=!1,y=0;y<arguments.length;)l.push(arguments[y++]);return e.str=r,e.eof=h,e}function i(e){for(var t=[],r=1;r<arguments.length;)t.push(arguments[r++]);if(r=0,e=e.replace(/%([dfjs])/g,function(e,n){switch(n){case"d":return Math.floor(t[r++]);case"f":return+t[r++];case"j":return JSON.stringify(t[r++]);default:return t[r++]}}),r!==t.length)throw Error("argument count mismatch");return e}r.exports=n;var s=/[{[]$/,o=/^[}\]]/,u=/:$/,f=/^\s*(?:if|}?else if|while|for)\b|\b(?:else)\s*$/,a=/\b(?:break|continue)(?: \w+)?;?$|^\s*return\b/;n.sprintf=i,n.supported=!1;try{n.supported=1===n("a","b")("return a-b").eof()(2,1)}catch(e){}n.verbose=!1},{}],4:[function(e,r){function n(){this.a={}}r.exports=n;var i=n.prototype;i.on=function(e,t,r){return(this.a[e]||(this.a[e]=[])).push({fn:t,ctx:r||this}),this},i.off=function(e,r){if(e===t)this.a={};else if(r===t)this.a[e]=[];else for(var n=this.a[e],i=0;i<n.length;)n[i].fn===r?n.splice(i,1):++i;return this},i.emit=function(e){var t=this.a[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},{}],5:[function(e,t){function r(e){for(var t=Object.keys(this),r=0;r<t.length;++r)e[t[r]]=this[t[r]];var n=e.prototype=Object.create(this.prototype);return n.constructor=e,n}t.exports=r},{}],6:[function(e,r){function n(e,t){return t?u&&u.readFile?u.readFile(e,"utf8",function(r,n){return r&&"undefined"!=typeof XMLHttpRequest?i(e,t):t(r,n)}):i(e,t):s(n,this,e)}function i(e,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)):t},n.open("GET",e),n.send()}r.exports=n;var s=e(1),o=e(7),u=o("fs")},{1:1,7:7}],7:[function(e,t,r){function n(e){try{var t=eval("quire".replace(/^/,"re"))(e);if(t&&(t.length||Object.keys(t).length))return t}catch(e){}return null}t.exports=n},{}],8:[function(e,t,r){var n=r,i=n.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},s=n.normalize=function(e){e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var t=e.split("/"),r=i(e),n="";r&&(n=t.shift()+"/");for(var s=0;s<t.length;)".."===t[s]?s>0?t.splice(--s,2):r?t.splice(s,1):++s:"."===t[s]?t.splice(s,1):++s;return n+t.join("/")};n.resolve=function(e,t,r){return r||(t=s(t)),i(t)?t:(r||(e=s(e)),(e=e.replace(/(?:\/|^)[^\/]+$/,"")).length?s(e+"/"+t):t)}},{}],9:[function(e,t){function r(e,t,r){var n=r||8192,i=n>>>1,s=null,o=n;return function(r){if(r<1||r>i)return e(r);o+r>n&&(s=e(n),o=0);var u=t.call(s,o,o+=r);return 7&o&&(o=(7|o)+1),u}}t.exports=r},{}],10:[function(e,t,r){var n=r;n.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)r=e.charCodeAt(n),r<128?t+=1:r<2048?t+=2:55296===(64512&r)&&56320===(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},n.read=function(e,t,r){var n=r-t;if(n<1)return"";for(var i,s=null,o=[],u=0;t<r;)i=e[t++],i<128?o[u++]=i:i>191&&i<224?o[u++]=(31&i)<<6|63&e[t++]:i>239&&i<365?(i=((7&i)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[u++]=55296+(i>>10),o[u++]=56320+(1023&i)):o[u++]=(15&i)<<12|(63&e[t++])<<6|63&e[t++],u>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),u=0);return s?(u&&s.push(String.fromCharCode.apply(String,o.slice(0,u))),s.join("")):u?String.fromCharCode.apply(String,o.slice(0,u)):""},n.write=function(e,t,r){for(var n,i,s=r,o=0;o<e.length;++o)n=e.charCodeAt(o),n<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=63&n|128):55296===(64512&n)&&56320===(64512&(i=e.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&i),++o,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-s}},{}],11:[function(e,t){function r(e){return n(e)}function n(t,n){if(i||(i=e(29)),!(t instanceof i))throw TypeError("type must be a Type");if(n){if("function"!=typeof n)throw TypeError("ctor must be a function")}else n=o.codegen("p")("return ctor.call(this,p)").eof(t.name,{ctor:s});n.constructor=r;var u=n.prototype=new s;return u.constructor=n,o.merge(n,s,!0),n.$type=t,u.$type=t,t.fieldsArray.forEach(function(e){u[e.name]=Array.isArray(e.resolve().defaultValue)?o.emptyArray:o.isObject(e.defaultValue)&&!e.long?o.emptyObject:e.defaultValue}),t.oneofsArray.forEach(function(e){Object.defineProperty(u,e.resolve().name,{get:o.oneOfGetter(e.oneof),set:o.oneOfSetter(e.oneof)})}),t.ctor=n,u}t.exports=r;var i,s=e(18),o=e(31);r.create=n,r.prototype=s},{18:18,29:29,31:31}],12:[function(e,t,r){function n(e,t,r,n){if(t.resolvedType)if(t.resolvedType instanceof o){var i=t.resolvedType.values;e("switch(d%s){",n),Object.keys(i).forEach(function(r){t.repeated&&i[r]===t.typeDefault&&e("default:"),e("case%j:",r)("case %j:",i[r])("m%s=%j",n,i[r])("break")}),e("}")}else e("m%s=types[%d].fromObject(d%s)",n,r,n);else{var s=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",n,n);break;case"uint64":s=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,s)('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,s?"true":"");break;case"bytes":e('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&&d%s.length)",n,n)("m%s=d%s",n,n);break;case"string":e("m%s=String(d%s)",n,n);break;case"bool":e("m%s=Boolean(d%s)",n,n)}}return e}function i(e,t,r,n){if(t.resolvedType)t.resolvedType instanceof o?e("d%s=o.enums===String?types[%d].values[m%s]:m%s",n,r,n,n):e("d%s=types[%d].toObject(m%s,o)",n,r,n);else{var i=!1;switch(t.type){case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('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,i?"true":"",n);break;case"bytes":e("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:e("d%s=m%s",n,n)}}return e}var s=r,o=e(15),u=e(31);s.fromObject=function(e){var t=e.fieldsArray;if(!t.length)return u.codegen()("return new(this.ctor)");for(var r=u.codegen("d")("var m=new(this.ctor)"),i=0;i<t.length;++i){var s=t[i].resolve(),f=u.safeProp(s.name);s.map?(r("if(d%s){",f)("m%s={}",f)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",f),n(r,s,i,f+"[ks[i]]")("}")("}")):s.repeated?(r("if(d%s){",f)("m%s=[]",f)("for(var i=0;i<d%s.length;++i){",f),n(r,s,i,f+"[i]")("}")("}")):(s.resolvedType instanceof o||r("if(d%s!==undefined&&d%s!==null){",f,f),n(r,s,i,f),s.resolvedType instanceof o||r("}"))}return r("return m")},s.toObject=function(e){var t=e.fieldsArray;if(!t.length)return u.codegen()("return {}");var r=u.codegen("m","o")("if(!o)")("o={}")("var d={}"),n=t.filter(function(e){return e.resolve().repeated});n.length&&(r("if(o.arrays||o.defaults){"),n.forEach(function(e){r("d%s=[]",u.safeProp(e.name))}),r("}"));var s=t.filter(function(e){return e.map});s.length&&(r("if(o.objects||o.defaults){"),s.forEach(function(e){r("d%s={}",u.safeProp(e.name))}),r("}"));var f=t.filter(function(e){return!(e.repeated||e.map)});f.length&&(r("if(o.defaults){"),f.forEach(function(e){var t=u.safeProp(e.name);e.resolvedType instanceof o?r("d%s=o.enums===String?%j:%j",t,e.resolvedType.valuesById[e.typeDefault],e.typeDefault):e.long?r("if(util.Long){")("var n=new util.Long(%d,%d,%j)",e.typeDefault.low,e.typeDefault.high,e.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",t)("}else")("d%s=o.longs===String?%j:%d",t,""+e.typeDefault,e.typeDefault.toNumber()):e.bytes?r("d%s=o.bytes===String?%j:%s",t,String.fromCharCode.apply(String,e.typeDefault),"["+Array.prototype.slice.call(e.typeDefault).join(",")+"]"):r("d%s=%j",t,e.typeDefault)}),r("}"));for(var a=0;a<t.length;++a){var h=t[a],l=u.safeProp(h.name);r("if(m%s!==undefined&&m%s!==null&&m.hasOwnProperty(%j)){",l,l,h.name),h.map?(r("d%s={}",l)("for(var ks2=Object.keys(m%s),j=0;j<ks2.length;++j){",l),i(r,h,a,l+"[ks2[j]]")("}")):h.repeated?(r("d%s=[]",l)("for(var j=0;j<m%s.length;++j){",l),i(r,h,a,l+"[j]")("}")):i(r,h,a,l),r("}")}return r("return d")}},{15:15,31:31}],13:[function(e,r){function n(e){var r=e.fieldsArray,u=o.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()");e.group&&u("if((t&7)===4)")("break"),u("switch(t>>>3){");for(var f=0;f<r.length;++f){var a=r[f].resolve(),h=a.resolvedType instanceof i?"uint32":a.type,l="m"+o.safeProp(a.name);u("case %d:",a.id),a.map?(u("r.skip().pos++")("if(%s===util.emptyObject)",l)("%s={}",l)("var k=r.%s()",a.keyType)("r.pos++"),s.basic[h]===t?u('%s[typeof k==="object"?util.longToHash(k):k]=types[%d].decode(r,r.uint32())',l,f):u('%s[typeof k==="object"?util.longToHash(k):k]=r.%s()',l,h)):a.repeated?(u("if(!(%s&&%s.length))",l,l)("%s=[]",l),(n.compat||a.packed)&&s.packed[h]!==t&&u("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",l,h)("}else"),s.basic[h]===t?u(a.resolvedType.group?"%s.push(types[%d].decode(r))":"%s.push(types[%d].decode(r,r.uint32()))",l,f):u("%s.push(r.%s())",l,h)):s.basic[h]===t?u(a.resolvedType.group?"%s=types[%d].decode(r)":"%s=types[%d].decode(r,r.uint32())",l,f):u("%s=r.%s()",l,h),u("break")}return u("default:")("r.skipType(t&7)")("break")("}")("}")("return m")}r.exports=n,n.compat=!0;var i=e(15),s=e(30),o=e(31)},{15:15,30:30,31:31}],14:[function(e,r){function n(e,t,r,n){return t.resolvedType.group?e("types[%d].encode(%s,w.uint32(%d)).uint32(%d)",r,n,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%d].encode(%s,w.uint32(%d).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}function i(e){for(var r,i,f=e.fieldsArray,a=e.oneofsArray,h=u.codegen("m","w")("if(!w)")("w=Writer.create()"),r=0;r<f.length;++r){var l=f[r].resolve();if(!l.partOf){var c=l.resolvedType instanceof s?"uint32":l.type,p=o.basic[c];i="m"+u.safeProp(l.name),l.map?(h("if(%s&&m.hasOwnProperty(%j)){",i,l.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",i)("w.uint32(%d).fork().uint32(%d).%s(ks[i])",(l.id<<3|2)>>>0,8|o.mapKey[l.keyType],l.keyType),p===t?h("types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",r,i):h(".uint32(%d).%s(%s[ks[i]]).ldelim()",16|p,c,i),h("}")("}")):l.repeated?l.packed&&o.packed[c]!==t?h("if(%s&&%s.length&&m.hasOwnProperty(%j)){",i,i,l.name)("w.uint32(%d).fork()",(l.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",i)("w.%s(%s[i])",c,i)("w.ldelim()")("}"):(h("if(%s!==undefined&&m.hasOwnProperty(%j)){",i,l.name)("for(var i=0;i<%s.length;++i)",i),p===t?n(h,l,r,i+"[i]"):h("w.uint32(%d).%s(%s[i])",(l.id<<3|p)>>>0,c,i),h("}")):(l.required||(l.long?h("if(%s!==undefined&&%s!==null&&m.hasOwnProperty(%j))",i,i,l.name):l.bytes?h("if(%s&&m.hasOwnProperty(%j))",i,l.name):h("if(%s!==undefined&&m.hasOwnProperty(%j))",i,l.name)),p===t?n(h,l,r,i):h("w.uint32(%d).%s(%s)",(l.id<<3|p)>>>0,c,i))}}for(var r=0;r<a.length;++r){var d=a[r];h("switch(%s){","m"+u.safeProp(d.name));for(var y=d.fieldsArray,v=0;v<y.length;++v){var l=y[v],c=l.resolvedType instanceof s?"uint32":l.type,p=o.basic[c];i="m"+u.safeProp(l.name),h("case%j:",l.name),p===t?n(h,l,f.indexOf(l),i):h("w.uint32(%d).%s(%s)",(l.id<<3|p)>>>0,c,i),h("break")}h("}")}return h("return w")}r.exports=i;var s=e(15),o=e(30),u=e(31)},{15:15,30:30,31:31}],15:[function(e,r){function n(e,t,r){i.call(this,e,r),this.valuesById={},this.values=Object.create(this.valuesById),this.comments={};var n=this;Object.keys(t||{}).forEach(function(e){n.valuesById[n.values[e]=t[e]]=e})}r.exports=n;var i=e(21),s=i.extend(n);n.className="Enum";var o=e(31);n.testJSON=function(e){return!(!e||!e.values)},n.fromJSON=function(e,t){return new n(e,t.values,t.options)},s.toJSON=function(){return{options:this.options,values:this.values}},s.add=function(e,r,n){if(!o.isString(e))throw TypeError("name must be a string");if(!o.isInteger(r))throw TypeError("id must be an integer");if(this.values[e]!==t)throw Error("duplicate name '"+e+"' in "+this);if(this.valuesById[r]!==t)throw Error("duplicate id "+r+" in "+this);return this.valuesById[this.values[e]=r]=e,this.comments[e]=n||null,this},s.remove=function(e){if(!o.isString(e))throw TypeError("name must be a string");var r=this.values[e];if(r===t)throw Error("'"+e+"' is not a name of "+this);return delete this.valuesById[r],delete this.values[e],delete this.comments[e],this}},{21:21,31:31}],16:[function(e,r){function n(e,r,n,s,o,u){if(h.isObject(s)?(u=s,s=o=t):h.isObject(o)&&(u=o,o=t),i.call(this,e,u),!h.isInteger(r)||r<0)throw TypeError("id must be a non-negative integer");if(!h.isString(n))throw TypeError("type must be a string");if(o!==t&&!h.isString(o))throw TypeError("extend must be a string");if(s!==t&&!/^required|optional|repeated$/.test(s=(""+s).toLowerCase()))throw TypeError("rule must be a string rule");this.rule=s&&"optional"!==s?s:t,this.type=n,this.id=r,this.extend=o||t,this.required="required"===s,this.optional=!this.required,this.repeated="repeated"===s,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!h.Long&&a.long[n]!==t,this.bytes="bytes"===n,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.b=null}r.exports=n;var i=e(21),s=i.extend(n);n.className="Field";var o,u,f=e(15),a=e(30),h=e(31);Object.defineProperty(s,"packed",{get:function(){return null===this.b&&(this.b=this.getOption("packed")!==!1),this.b}}),s.setOption=function(e,t,r){return"packed"===e&&(this.b=null),i.prototype.setOption.call(this,e,t,r)},n.testJSON=function(e){return!(!e||e.id===t)},n.fromJSON=function(r,i){return i.keyType!==t?(u||(u=e(17)),u.fromJSON(r,i)):new n(r,i.id,i.type,i.rule,i.extend,i.options)},s.toJSON=function(){return{rule:"optional"!==this.rule&&this.rule||t,type:this.type,id:this.id,extend:this.extend,options:this.options}},s.resolve=function(){if(this.resolved)return this;if((this.typeDefault=a.defaults[this.type])===t)if(o||(o=e(29)),this.resolvedType=this.parent.lookup(this.type,o))this.typeDefault=null;else{if(!(this.resolvedType=this.parent.lookup(this.type,f)))throw Error("unresolvable field type: "+this.type);this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]}if(this.options&&this.options.default!==t&&(this.typeDefault=this.options.default,this.resolvedType instanceof f&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.long)this.typeDefault=h.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;h.base64.test(this.typeDefault)?h.base64.decode(this.typeDefault,r=h.newBuffer(h.base64.length(this.typeDefault)),0):h.utf8.write(this.typeDefault,r=h.newBuffer(h.utf8.length(this.typeDefault)),0),this.typeDefault=r}return this.map?this.defaultValue={}:this.repeated?this.defaultValue=[]:this.defaultValue=this.typeDefault,i.prototype.resolve.call(this)}},{15:15,17:17,21:21,29:29,30:30,31:31}],17:[function(e,r){function n(e,t,r,n,s){if(i.call(this,e,t,n,s),!f.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}r.exports=n;var i=e(16),s=i.prototype,o=i.extend(n);n.className="MapField";var u=e(30),f=e(31);n.testJSON=function(e){return i.testJSON(e)&&e.keyType!==t},n.fromJSON=function(e,t){return new n(e,t.id,t.keyType,t.type,t.options)},o.toJSON=function(){return{keyType:this.keyType,type:this.type,id:this.id,extend:this.extend,options:this.options}},o.resolve=function(){if(this.resolved)return this;if(u.mapKey[this.keyType]===t)throw Error("invalid key type: "+this.keyType);return s.resolve.call(this)}},{16:16,30:30,31:31}],18:[function(e,t){function r(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}t.exports=r;var n=e(31);r.encode=function(e,t){return this.$type.encode(e,t)},r.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},r.decode=function(e){return this.$type.decode(e)},r.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},r.verify=function(e){return this.$type.verify(e)},r.fromObject=function(e){return this.$type.fromObject(e)},r.from=r.fromObject,r.toObject=function(e,t){return this.$type.toObject(e,t)},r.prototype.toObject=function(e){return this.$type.toObject(this,e)},r.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},{31:31}],19:[function(e,r){function n(e,r,n,s,o,f,a){if(u.isObject(o)?(a=o,o=f=t):u.isObject(f)&&(a=f,f=t),r&&!u.isString(r))throw TypeError("type must be a string");if(!u.isString(n))throw TypeError("requestType must be a string");if(!u.isString(s))throw TypeError("responseType must be a string");i.call(this,e,a),this.type=r||"rpc",this.requestType=n,this.requestStream=!!o||t,this.responseType=s,this.responseStream=!!f||t,this.resolvedRequestType=null,this.resolvedResponseType=null}r.exports=n;var i=e(21),s=i.extend(n);n.className="Method";var o=e(29),u=e(31);n.testJSON=function(e){return!(!e||e.requestType===t)},n.fromJSON=function(e,t){return new n(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options)},s.toJSON=function(){return{type:"rpc"!==this.type&&this.type||t,requestType:this.requestType,requestStream:this.requestStream||t,responseType:this.responseType,responseStream:this.responseStream||t,options:this.options}},s.resolve=function(){if(this.resolved)return this;if(!(this.resolvedRequestType=this.parent.lookup(this.requestType,o)))throw Error("unresolvable request type: "+this.requestType);if(!(this.resolvedResponseType=this.parent.lookup(this.responseType,o)))throw Error("unresolvable response type: "+this.requestType);return i.prototype.resolve.call(this)}},{21:21,29:29,31:31}],20:[function(e,r){function n(){a||(a=e(29)),h||(h=e(28)),l=[p,a,h,d,s],c="one of "+l.map(function(e){return e.name}).join(", ")}function i(e){if(!e||!e.length)return t;for(var r={},n=0;n<e.length;++n)r[e[n].name]=e[n].toJSON();return r}function s(e,r){u.call(this,e,r),this.nested=t,this.c=null,this.d=[]}function o(e){e.c=null;for(var t=0;t<e.d.length;++t)delete e[e.d[t]];return e.d=[],e}r.exports=s;var u=e(21),f=u.extend(s);s.className="Namespace";var a,h,l,c,p=e(15),d=e(16),y=e(31);s.testJSON=function(e){return!(!e||e.fields||e.values||e.id!==t||e.oneof||e.methods||e.requestType!==t)},s.fromJSON=function(e,t){return new s(e,t.options).addJSON(t.nested)},s.arrayToJSON=i,Object.defineProperty(f,"nestedArray",{get:function(){return this.c||(this.c=y.toArray(this.nested))}}),f.toJSON=function(){return{options:this.options,nested:i(this.nestedArray)}},f.addJSON=function(e){var t=this;return e&&(l||n(),Object.keys(e).forEach(function(r){for(var n=e[r],i=0;i<l.length;++i)if(l[i].testJSON(n))return t.add(l[i].fromJSON(r,n));throw TypeError("nested."+r+" must be JSON for "+c)})),this},f.get=function(e){return this.nested===t?null:this.nested[e]||null},f.getEnum=function(e){if(this.nested&&this.nested[e]instanceof p)return this.nested[e].values;throw Error("no such enum")},f.add=function(e){if(l||n(),!e||l.indexOf(e.constructor)<0)throw TypeError("object must be "+c);if(e instanceof d&&e.extend===t)throw TypeError("object must be an extension field when not part of a type");if(this.nested){var r=this.get(e.name);if(r){if(!(r instanceof s&&e instanceof s)||r instanceof a||r instanceof h)throw Error("duplicate name '"+e.name+"' in "+this);for(var i=r.nestedArray,u=0;u<i.length;++u)e.add(i[u]);this.remove(r),this.nested||(this.nested={}),e.setOptions(r.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),o(this)},f.remove=function(e){if(!(e instanceof u))throw TypeError("object must be a ReflectionObject");if(e.parent!==this||!this.nested)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=t),e.onRemove(this),o(this)},f.define=function(e,r){y.isString(e)?e=e.split("."):Array.isArray(e)||(r=e,e=t);var n=this;if(e)for(;e.length>0;){var i=e.shift();if(n.nested&&n.nested[i]){if(n=n.nested[i],!(n instanceof s))throw Error("path conflicts with non-namespace objects")}else n.add(n=new s(i))}return r&&n.addJSON(r),n},f.resolve=function(){a||(a=e(29)),h||(a=e(28));for(var t=this.nestedArray,r=0;r<t.length;++r)if(/^[A-Z]/.test(t[r].name)){if(t[r]instanceof a||t[r]instanceof h)this[t[r].name]=t[r];else{if(!(t[r]instanceof p))continue;this[t[r].name]=t[r].values}this.d.push(t[r].name)}return u.prototype.resolve.call(this)},f.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof s?e[t++].resolveAll():e[t++].resolve();return f.resolve.call(this)},f.lookup=function(e,r,n){if("boolean"==typeof r&&(n=r,r=t),y.isString(e)&&e.length)e=e.split(".");else if(!e.length)return null;if(""===e[0])return this.root.lookup(e.slice(1),r);var i=this.get(e[0]);return i&&1===e.length&&(!r||i instanceof r)||i instanceof s&&(i=i.lookup(e.slice(1),r,!0))?i:null===this.parent||n?null:this.parent.lookup(e,r)},f.lookupType=function(t){a||(a=e(29));var r=this.lookup(t,a);if(!r)throw Error("no such type");return r},f.lookupService=function(t){h||(h=e(28));var r=this.lookup(t,h);if(!r)throw Error("no such service");return r},f.lookupEnum=function(e){var t=this.lookup(e,p);if(!t)throw Error("no such enum");return t.values}},{15:15,16:16,21:21,28:28,29:29,31:31}],21:[function(e,r){function n(e,t){if(!i.isString(e))throw TypeError("name must be a string");if(t&&!i.isObject(t))throw TypeError("options must be an object");this.options=t,this.name=e,this.parent=null,this.resolved=!1,this.comment=null}r.exports=n;var i=e(31);n.className="ReflectionObject",n.extend=i.extend;var s,o=n.prototype;Object.defineProperties(o,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),o.toJSON=function(){throw Error()},o.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var r=t.root;s||(s=e(25)),r instanceof s&&r.e(this)},o.onRemove=function(t){var r=t.root;s||(s=e(25)),r instanceof s&&r.f(this),this.parent=null,this.resolved=!1},o.resolve=function(){return this.resolved?this:(s||(s=e(25)),this.root instanceof s&&(this.resolved=!0),this)},o.getOption=function(e){return this.options?this.options[e]:t},o.setOption=function(e,r,n){return n&&this.options&&this.options[e]!==t||((this.options||(this.options={}))[e]=r),this},o.setOptions=function(e,t){return e&&Object.keys(e).forEach(function(r){this.setOption(r,e[r],t)},this),this},o.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e}},{25:25,31:31}],22:[function(e,r){function n(e,r,n){if(Array.isArray(r)||(n=r,r=t),s.call(this,e,n),r&&!Array.isArray(r))throw TypeError("fieldNames must be an Array");this.oneof=r||[],this.g=[]}function i(e){e.parent&&e.g.forEach(function(t){t.parent||e.parent.add(t)})}r.exports=n;var s=e(21),o=s.extend(n);n.className="OneOf";var u=e(16);Object.defineProperty(o,"fieldsArray",{get:function(){return this.g}}),n.testJSON=function(e){return!!e.oneof},n.fromJSON=function(e,t){return new n(e,t.oneof,t.options)},o.toJSON=function(){return{oneof:this.oneof,options:this.options}},o.add=function(e){if(!(e instanceof u))throw TypeError("field must be a Field");return e.parent&&e.parent.remove(e),this.oneof.push(e.name),this.g.push(e),e.partOf=this,i(this),this},o.remove=function(e){if(!(e instanceof u))throw TypeError("field must be a Field");var t=this.g.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.g.splice(t,1),t=this.oneof.indexOf(e.name),t>-1&&this.oneof.splice(t,1),e.parent&&e.parent.remove(e),e.partOf=null,this},o.onAdd=function(e){s.prototype.onAdd.call(this,e);var t=this;this.oneof.forEach(function(r){var n=e.get(r);n&&!n.partOf&&(n.partOf=t,t.g.push(n))}),i(this)},o.onRemove=function(e){this.g.forEach(function(e){e.parent&&e.parent.remove(e)}),s.prototype.onRemove.call(this,e)}},{16:16,21:21}],23:[function(e,t){function r(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function n(e){this.buf=e,this.pos=0,this.len=e.length}function i(){var e=new w(0,0),t=0;if(this.len-this.pos>4){for(t=0;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e}else{for(t=0;t<4;++t){if(this.pos>=this.len)throw r(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}if(this.pos>=this.len)throw r(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e}if(this.len-this.pos>4){for(t=0;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(t=0;t<5;++t){if(this.pos>=this.len)throw r(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function s(){return i.call(this).toLong()}function o(){return i.call(this).toNumber()}function u(){return i.call(this).toLong(!0)}function f(){return i.call(this).toNumber(!0)}function a(){return i.call(this).zzDecode().toLong()}function h(){return i.call(this).zzDecode().toNumber()}function l(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function c(){if(this.pos+8>this.len)throw r(this,8);return new w(l(this.buf,this.pos+=4),l(this.buf,this.pos+=4))}function p(){return c.call(this).toLong(!0)}function d(){return c.call(this).toNumber(!0)}function y(){return c.call(this).zzDecode().toLong()}function v(){return c.call(this).zzDecode().toNumber()}function m(){b.Long?(j.int64=s,j.uint64=u,j.sint64=a,j.fixed64=p,j.sfixed64=y):(j.int64=o,j.uint64=f,j.sint64=h,j.fixed64=d,j.sfixed64=v)}t.exports=n;var g,b=e(33),w=b.LongBits,O=b.utf8;n.create=b.Buffer?function(t){return g||(g=e(24)),(n.create=function(e){return b.Buffer.isBuffer(e)?new g(e):new n(e)})(t)}:function(e){return new n(e)};var j=n.prototype;j.h=b.Array.prototype.subarray||b.Array.prototype.slice,j.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,r(this,10);return e}}(),j.int32=function(){return 0|this.uint32()},j.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},j.bool=function(){return 0!==this.uint32()},j.fixed32=function(){if(this.pos+4>this.len)throw r(this,4);return l(this.buf,this.pos+=4)},j.sfixed32=function(){var e=this.fixed32();return e>>>1^-(1&e)};var k="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],e[0]}:function(r,n){return t[3]=r[n],t[2]=r[n+1],t[1]=r[n+2],t[0]=r[n+3],e[0]}}():function(e,t){var r=l(e,t+4),n=2*(r>>31)+1,i=r>>>23&255,s=8388607&r;return 255===i?s?NaN:n*(1/0):0===i?1.401298464324817e-45*n*s:n*Math.pow(2,i-150)*(s+8388608)};j.float=function(){if(this.pos+4>this.len)throw r(this,4);var e=k(this.buf,this.pos);return this.pos+=4,e};var x="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],t[4]=r[n+4],t[5]=r[n+5],t[6]=r[n+6],t[7]=r[n+7],e[0]}:function(r,n){return t[7]=r[n],t[6]=r[n+1],t[5]=r[n+2],t[4]=r[n+3],t[3]=r[n+4],t[2]=r[n+5],t[1]=r[n+6],t[0]=r[n+7],e[0]}}():function(e,t){var r=l(e,t+4),n=l(e,t+8),i=2*(n>>31)+1,s=n>>>20&2047,o=4294967296*(1048575&n)+r;return 2047===s?o?NaN:i*(1/0):0===s?5e-324*i*o:i*Math.pow(2,s-1075)*(o+4503599627370496)};j.double=function(){if(this.pos+8>this.len)throw r(this,4);var e=x(this.buf,this.pos);return this.pos+=8,e},j.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw r(this,e);return this.pos+=e,t===n?new this.buf.constructor(0):this.h.call(this.buf,t,n)},j.string=function(){var e=this.bytes();return O.read(e,0,e.length)},j.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw r(this,e);this.pos+=e}else do if(this.pos>=this.len)throw r(this);while(128&this.buf[this.pos++]);return this},j.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){if(4===(e=7&this.uint32()))break;this.skipType(e)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},n.i=m,m()},{24:24,33:33}],24:[function(e,t){function r(e){n.call(this,e)}t.exports=r;var n=e(23),i=r.prototype=Object.create(n.prototype);i.constructor=r;var s=e(33);s.Buffer&&(i.h=s.Buffer.prototype.slice),i.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len));
}},{23:23,33:33}],25:[function(e,r){function n(e){o.call(this,"",e),this.deferred=[],this.files=[]}function i(){}function s(e){var r=e.parent.lookup(e.extend);if(r){var n=new h(e.fullName,e.id,e.type,e.rule,t,e.options);return n.declaringField=e,e.extensionField=n,r.add(n),!0}return!1}r.exports=n;var o=e(20),u=o.extend(n);n.className="Root";var f,a,h=e(16),l=e(31);n.fromJSON=function(e,t){return t||(t=new n),t.setOptions(e.options).addJSON(e.nested)},u.resolvePath=l.path.resolve;var c=function(){try{f=e("./parse"),a=e("./common")}catch(e){}c=null};u.load=function e(r,n,s){function o(e,t){if(s){var r=s;s=null,r(e,t)}}function u(e,r){try{if(l.isString(r)&&"{"===r.charAt(0)&&(r=JSON.parse(r)),l.isString(r)){f.filename=e;var i=f(r,p,n);i.imports&&i.imports.forEach(function(t){h(p.resolvePath(e,t))}),i.weakImports&&i.weakImports.forEach(function(t){h(p.resolvePath(e,t),!0)})}else p.setOptions(r.options).addJSON(r.nested)}catch(e){if(d)throw e;return o(e),t}d||y||o(null,p)}function h(e,r){var n=e.lastIndexOf("google/protobuf/");if(n>-1){var i=e.substring(n);i in a&&(e=i)}if(!(p.files.indexOf(e)>-1)){if(p.files.push(e),e in a)return d?u(e,a[e]):(++y,setTimeout(function(){--y,u(e,a[e])})),t;if(d){var f;try{f=l.fs.readFileSync(e).toString("utf8")}catch(e){return r||o(e),t}u(e,f)}else++y,l.fetch(e,function(n,i){if(--y,s)return n?(r||o(n),t):(u(e,i),t)})}}c&&c(),"function"==typeof n&&(s=n,n=t);var p=this;if(!s)return l.asPromise(e,p,r);var d=s===i,y=0;return l.isString(r)&&(r=[r]),r.forEach(function(e){h(p.resolvePath("",e))}),d?p:(y||o(null,p),t)},u.loadSync=function(e,t){if(!l.isNode)throw Error("not supported");return this.load(e,t,i)},u.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(e){return"'extend "+e.extend+"' in "+e.parent.fullName}).join(", "));return o.prototype.resolveAll.call(this)},u.e=function(e){var r=this.deferred.slice();this.deferred=[];for(var n=0;n<r.length;)s(r[n])?r.splice(n,1):++n;if(this.deferred=r,e instanceof h&&e.extend!==t&&!e.extensionField&&!s(e)&&this.deferred.indexOf(e)<0)this.deferred.push(e);else if(e instanceof o){var i=e.nestedArray;for(n=0;n<i.length;++n)this.e(i[n])}},u.f=function(e){if(e instanceof h){if(e.extend!==t&&!e.extensionField){var r=this.deferred.indexOf(e);r>-1&&this.deferred.splice(r,1)}e.extensionField&&(e.extensionField.parent.remove(e.extensionField),e.extensionField=null)}else if(e instanceof o)for(var n=e.nestedArray,i=0;i<n.length;++i)this.f(n[i])}},{16:16,20:20,31:31,undefined:t}],26:[function(e,t,r){var n=r;n.Service=e(27)},{27:27}],27:[function(e,t){function r(e){n.call(this),this.$rpc=e}t.exports=r;var n=e(31).EventEmitter;(r.prototype=Object.create(n.prototype)).constructor=r,r.prototype.end=function(e){return this.$rpc&&(e||this.$rpc(null,null,null),this.$rpc=null,this.emit("end").off()),this}},{31:31}],28:[function(e,r){function n(e,t){s.call(this,e,t),this.methods={},this.j=null}function i(e){return e.j=null,e}r.exports=n;var s=e(20),o=s.prototype,u=s.extend(n);n.className="Service";var f=e(19),a=e(31),h=e(26);n.testJSON=function(e){return!(!e||!e.methods)},n.fromJSON=function(e,t){var r=new n(e,t.options);return t.methods&&Object.keys(t.methods).forEach(function(e){r.add(f.fromJSON(e,t.methods[e]))}),r},Object.defineProperty(u,"methodsArray",{get:function(){return this.j||(this.j=a.toArray(this.methods))}}),u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||t,methods:s.arrayToJSON(this.methodsArray)||{},nested:e&&e.nested||t}},u.get=function(e){return o.get.call(this,e)||this.methods[e]||null},u.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return o.resolve.call(this)},u.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof f?(this.methods[e.name]=e,e.parent=this,i(this)):o.add.call(this,e)},u.remove=function(e){if(e instanceof f){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,i(this)}return o.remove.call(this,e)},u.create=function(e,r,n){var i=new h.Service(e);return this.methodsArray.forEach(function(s){i[a.lcFirst(s.name)]=function(o,u){if(i.$rpc){if(!o)throw TypeError("request must not be null");s.resolve();var f;try{f=(r?s.resolvedRequestType.encodeDelimited(o):s.resolvedRequestType.encode(o)).finish()}catch(e){return("function"==typeof setImmediate?setImmediate:setTimeout)(function(){u(e)}),t}e(s,f,function(e,r){if(e)return i.emit("error",e,s),u?u(e):t;if(null===r)return i.end(!0),t;var o;try{o=n?s.resolvedResponseType.decodeDelimited(r):s.resolvedResponseType.decode(r)}catch(e){return i.emit("error",e,s),u?u("error",e):t}return i.emit("data",o,s),u?u(null,o):t})}}}),i}},{19:19,20:20,26:26,31:31}],29:[function(e,r){function n(e,r){s.call(this,e,r),this.fields={},this.oneofs=t,this.extensions=t,this.reserved=t,this.group=t,this.k=null,this.g=null,this.l=null,this.m=null}function i(e){return e.k=e.g=e.l=e.m=null,delete e.encode,delete e.decode,delete e.verify,e}r.exports=n;var s=e(20),o=s.prototype,u=s.extend(n);n.className="Type";var f=e(15),a=e(22),h=e(16),l=e(28),c=e(11),p=e(18),d=e(23),y=e(35),v=e(31),m=e(14),g=e(13),b=e(34),w=e(12),O=[f,n,h,l];n.testJSON=function(e){return!(!e||!e.fields)},n.fromJSON=function(e,r){var i=new n(e,r.options);return i.extensions=r.extensions,i.reserved=r.reserved,r.fields&&Object.keys(r.fields).forEach(function(e){i.add(h.fromJSON(e,r.fields[e]))}),r.oneofs&&Object.keys(r.oneofs).forEach(function(e){i.add(a.fromJSON(e,r.oneofs[e]))}),r.nested&&Object.keys(r.nested).forEach(function(e){for(var n=r.nested[e],s=0;s<O.length;++s)if(O[s].testJSON(n))return i.add(O[s].fromJSON(e,n)),t;throw Error("invalid nested object in "+i+": "+e)}),r.extensions&&r.extensions.length&&(i.extensions=r.extensions),r.reserved&&r.reserved.length&&(i.reserved=r.reserved),r.group&&(i.group=!0),i},Object.defineProperties(u,{fieldsById:{get:function(){if(this.k)return this.k;this.k={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var r=this.fields[e[t]],n=r.id;if(this.k[n])throw Error("duplicate id "+n+" in "+this);this.k[n]=r}return this.k}},fieldsArray:{get:function(){return this.g||(this.g=v.toArray(this.fields))}},oneofsArray:{get:function(){return this.l||(this.l=v.toArray(this.oneofs))}},ctor:{get:function(){return this.m||(this.m=c.create(this).constructor)},set:function(e){if(e&&!(e.prototype instanceof p))throw TypeError("ctor must be a Message constructor");e.from||(e.from=p.from),this.m=e}}}),u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||t,oneofs:s.arrayToJSON(this.oneofsArray),fields:s.arrayToJSON(this.fieldsArray.filter(function(e){return!e.declaringField}))||{},extensions:this.extensions&&this.extensions.length?this.extensions:t,reserved:this.reserved&&this.reserved.length?this.reserved:t,group:this.group||t,nested:e&&e.nested||t}},u.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var r=this.oneofsArray;for(t=0;t<r.length;)r[t++].resolve();return o.resolve.call(this)},u.get=function(e){return o.get.call(this,e)||this.fields&&this.fields[e]||this.oneofs&&this.oneofs[e]||null},u.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof h&&e.extend===t){if(this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),i(this)}return e instanceof a?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),i(this)):o.add.call(this,e)},u.remove=function(e){if(e instanceof h&&e.extend===t){if(this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.message=null,i(this)}return o.remove.call(this,e)},u.create=function(e){return new this.ctor(e)},u.setup=function(){var e=this.fullName,t=this.fieldsArray.map(function(e){return e.resolve().resolvedType});return this.encode=m(this).eof(e+"$encode",{Writer:y,types:t,util:v}),this.decode=g(this).eof(e+"$decode",{Reader:d,types:t,util:v}),this.verify=b(this).eof(e+"$verify",{types:t,util:v}),this.fromObject=this.from=w.fromObject(this).eof(e+"$fromObject",{types:t,util:v}),this.toObject=w.toObject(this).eof(e+"$toObject",{types:t,util:v}),this},u.encode=function(e,t){return this.setup().encode(e,t)},u.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},u.decode=function(e,t){return this.setup().decode(e,t)},u.decodeDelimited=function(e){return e instanceof d||(e=d.create(e)),this.decode(e,e.uint32())},u.verify=function(e){return this.setup().verify(e)},u.fromObject=function(e){return this.setup().fromObject(e)},u.from=u.fromObject,u.toObject=function(e,t){return this.setup().toObject(e,t)}},{11:11,12:12,13:13,14:14,15:15,16:16,18:18,20:20,22:22,23:23,28:28,31:31,34:34,35:35}],30:[function(e,t,r){function n(e,t){var r=0,n={};for(t|=0;r<e.length;)n[o[r+t]]=e[r++];return n}var i=r,s=e(31),o=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];i.basic=n([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),i.defaults=n([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",s.emptyArray,null]),i.long=n([0,0,0,1,1],7),i.mapKey=n([0,0,0,5,5,0,0,0,1,1,0,2],2),i.packed=n([1,5,0,0,0,5,5,0,0,0,1,1,0])},{31:31}],31:[function(e,t){var r=t.exports=e(33);r.asPromise=e(1),r.codegen=e(3),r.EventEmitter=e(4),r.extend=e(5),r.fetch=e(6),r.path=e(8),r.fs=r.inquire("fs"),r.toArray=function(e){return e?Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]}):[]},r.safeProp=function(e){return'["'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"]'},r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)}},{1:1,3:3,33:33,4:4,5:5,6:6,8:8}],32:[function(e,t){function r(e,t){this.lo=e,this.hi=t}t.exports=r;var n=e(33),i=r.prototype,s=r.zero=new r(0,0);s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1};var o=r.zeroHash="\0\0\0\0\0\0\0\0";r.fromNumber=function(e){if(0===e)return s;var t=e<0;t&&(e=-e);var n=e>>>0,i=(e-n)/4294967296>>>0;return t&&(i=~i>>>0,n=~n>>>0,++n>4294967295&&(n=0,++i>4294967295&&(i=0))),new r(n,i)},r.from=function(e){if("number"==typeof e)return r.fromNumber(e);if("string"==typeof e){if(!n.Long)return r.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new r(e.low>>>0,e.high>>>0):s},i.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},i.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,(!!e)):{low:0|this.lo,high:0|this.hi,unsigned:!!e}};var u=String.prototype.charCodeAt;r.fromHash=function(e){return e===o?s:new r((u.call(e,0)|u.call(e,1)<<8|u.call(e,2)<<16|u.call(e,3)<<24)>>>0,(u.call(e,4)|u.call(e,5)<<8|u.call(e,6)<<16|u.call(e,7)<<24)>>>0)},i.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)},i.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},i.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},i.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},{33:33}],33:[function(r,n,i){var s=i;s.base64=r(2),s.inquire=r(7),s.utf8=r(10),s.pool=r(9),s.emptyArray=Object.freeze?Object.freeze([]):[],s.emptyObject=Object.freeze?Object.freeze({}):{},s.isNode=!!(e.process&&e.process.versions&&e.process.versions.node),s.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},s.isString=function(e){return"string"==typeof e||e instanceof String},s.isObject=function(e){return e&&"object"==typeof e},s.Buffer=function(){try{var e=s.inquire("buffer").Buffer;return e.prototype.utf8Write?(e.from||(e.from=function(t,r){return new e(t,r)}),e.allocUnsafe||(e.allocUnsafe=function(t){return new e(t)}),e):null}catch(e){return null}}(),s.newBuffer=function(e){return"number"==typeof e?s.Buffer?s.Buffer.allocUnsafe(e):new s.Array(e):s.Buffer?s.Buffer.from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},s.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,s.LongBits=r(32),s.Long=e.dcodeIO&&e.dcodeIO.Long||s.inquire("long"),s.longToHash=function(e){return e?s.LongBits.from(e).toHash():s.LongBits.zeroHash},s.longFromHash=function(e,t){var r=s.LongBits.fromHash(e);return s.Long?s.Long.fromBits(r.lo,r.hi,t):r.toNumber(!!t)},s.merge=function(e,r,n){for(var i=Object.keys(r),s=0;s<i.length;++s)e[i[s]]!==t&&n||(e[i[s]]=r[i[s]]);return e},s.oneOfGetter=function(e){var r={};return e.forEach(function(e){r[e]=1}),function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(1===r[e[n]]&&this[e[n]]!==t&&null!==this[e[n]])return e[n]}},s.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},s.lazyResolve=function(e,t){t.forEach(function(t){Object.keys(t).forEach(function(r){for(var n=t[r|=0].split("."),i=e;n.length;)i=i[n.shift()];t[r]=i})})},s.toJSONOptions={longs:String,enums:String,bytes:String}},{10:10,2:2,32:32,7:7,9:9}],34:[function(e,t){function r(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function n(e,t,n,i){if(t.resolvedType)if(t.resolvedType instanceof o){e("switch(%s){",i)("default:")("return%j",r(t,"enum value"));for(var s=u.toArray(t.resolvedType.values),f=0;f<s.length;++f)e("case %d:",s[f]);e("break")("}")}else e("var e=types[%d].verify(%s);",n,i)("if(e)")("return%j+e",t.name+".");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",i)("return%j",r(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",i,i,i,i)("return%j",r(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',i)("return%j",r(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',i)("return%j",r(t,"boolean"));break;case"string":e("if(!util.isString(%s))",i)("return%j",r(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',i,i,i)("return%j",r(t,"buffer"))}return e}function i(e,t,n){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!/^-?(?:0|[1-9][0-9]*)$/.test(%s))",n)("return%j",r(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/.test(%s))",n)("return%j",r(t,"integer|Long key"));break;case"bool":e("if(!/^true|false|0|1$/.test(%s))",n)("return%j",r(t,"boolean key"))}return e}function s(e){var t=e.fieldsArray;if(!t.length)return u.codegen()("return null");for(var s=u.codegen("m"),f=0;f<t.length;++f){var a=t[f].resolve(),h="m"+u.safeProp(a.name);a.map?(s("if(%s!==undefined){",h)("if(!util.isObject(%s))",h)("return%j",r(a,"object"))("var k=Object.keys(%s)",h)("for(var i=0;i<k.length;++i){"),i(s,a,"k[i]"),n(s,a,f,h+"[k[i]]")("}")("}")):a.repeated?(s("if(%s!==undefined){",h)("if(!Array.isArray(%s))",h)("return%j",r(a,"array"))("for(var i=0;i<%s.length;++i){",h),n(s,a,f,h+"[i]")("}")("}")):(a.required||(!a.resolvedType||a.resolvedType instanceof o?s("if(%s!==undefined){",h):s("if(%s!==undefined&&%s!==null){",h,h)),n(s,a,f,h),a.required||s("}"))}return s("return null")}t.exports=s;var o=e(15),u=e(31)},{15:15,31:31}],35:[function(e,r){function n(e,r,n){this.fn=e,this.len=r,this.next=t,this.val=n}function i(){}function s(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function o(){this.len=0,this.head=new n(i,0,0),this.tail=this.head,this.states=null}function u(e,t,r){t[r]=255&e}function f(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e}function a(e,r){this.len=e,this.next=t,this.val=r}function h(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function l(e,t,r){t[r++]=255&e,t[r++]=e>>>8&255,t[r++]=e>>>16&255,t[r]=e>>>24}r.exports=o;var c,p=e(33),d=p.LongBits,y=p.base64,v=p.utf8;o.create=p.Buffer?function(){return c||(c=e(36)),(o.create=function(){return new c})()}:function(){return new o},o.alloc=function(e){return new p.Array(e)},p.Array!==Array&&(o.alloc=p.pool(o.alloc,p.Array.prototype.subarray));var m=o.prototype;m.push=function(e,t,r){return this.tail=this.tail.next=new n(e,t,r),this.len+=t,this},a.prototype=Object.create(n.prototype),a.prototype.fn=f,m.uint32=function(e){return this.len+=(this.tail=this.tail.next=new a((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},m.int32=function(e){return e<0?this.push(h,10,d.fromNumber(e)):this.uint32(e)},m.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},m.uint64=function(e){var t=d.from(e);return this.push(h,t.length(),t)},m.int64=m.uint64,m.sint64=function(e){var t=d.from(e).zzEncode();return this.push(h,t.length(),t)},m.bool=function(e){return this.push(u,1,e?1:0)},m.fixed32=function(e){return this.push(l,4,e>>>0)},m.sfixed32=function(e){return this.push(l,4,e<<1^e>>31)},m.fixed64=function(e){var t=d.from(e);return this.push(l,4,t.lo).push(l,4,t.hi)},m.sfixed64=function(e){var t=d.from(e).zzEncode();return this.push(l,4,t.lo).push(l,4,t.hi)};var g="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n,i){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i]=t[3]}:function(r,n,i){e[0]=r,n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,r){var n=e<0?1:0;if(n&&(e=-e),0===e)l(1/e>0?0:2147483648,t,r);else if(isNaN(e))l(2147483647,t,r);else if(e>3.4028234663852886e38)l((n<<31|2139095040)>>>0,t,r);else if(e<1.1754943508222875e-38)l((n<<31|Math.round(e/1.401298464324817e-45))>>>0,t,r);else{var i=Math.floor(Math.log(e)/Math.LN2),s=8388607&Math.round(e*Math.pow(2,-i)*8388608);l((n<<31|i+127<<23|s)>>>0,t,r)}};m.float=function(e){return this.push(g,4,e)};var b="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n,i){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i++]=t[3],n[i++]=t[4],n[i++]=t[5],n[i++]=t[6],n[i]=t[7]}:function(r,n,i){e[0]=r,n[i++]=t[7],n[i++]=t[6],n[i++]=t[5],n[i++]=t[4],n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,r){var n=e<0?1:0;if(n&&(e=-e),0===e)l(0,t,r),l(1/e>0?0:2147483648,t,r+4);else if(isNaN(e))l(4294967295,t,r),l(2147483647,t,r+4);else if(e>1.7976931348623157e308)l(0,t,r),l((n<<31|2146435072)>>>0,t,r+4);else{var i;if(e<2.2250738585072014e-308)i=e/5e-324,l(i>>>0,t,r),l((n<<31|i/4294967296)>>>0,t,r+4);else{var s=Math.floor(Math.log(e)/Math.LN2);1024===s&&(s=1023),i=e*Math.pow(2,-s),l(4503599627370496*i>>>0,t,r),l((n<<31|s+1023<<20|1048576*i&1048575)>>>0,t,r+4)}}};m.double=function(e){return this.push(b,8,e)};var w=p.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};m.bytes=function(e){var t=e.length>>>0;if("string"==typeof e&&t){var r=o.alloc(t=y.length(e));y.decode(e,r,0),e=r}return t?this.uint32(t).push(w,t,e):this.push(u,1,0)},m.string=function(e){var t=v.length(e);return t?this.uint32(t).push(v.write,t,e):this.push(u,1,0)},m.fork=function(){return this.states=new s(this),this.head=this.tail=new n(i,0,0),this.len=0,this},m.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(i,0,0),this.len=0),this},m.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},m.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t}},{33:33,36:36}],36:[function(e,t){function r(){i.call(this)}function n(e,t,r){e.length<40?o.utf8.write(e,t,r):t.utf8Write(e,r)}t.exports=r;var i=e(35),s=r.prototype=Object.create(i.prototype);s.constructor=r;var o=e(33),u=o.Buffer;r.alloc=function(e){return(r.alloc=u.allocUnsafe)(e)};var f=u&&u.prototype instanceof Uint8Array&&"set"===u.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n<e.length;)t[r++]=e[n++]};s.bytes=function(e){"string"==typeof e&&(e=u.from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this.push(f,t,e),this},s.string=function(e){var t=u.byteLength(e);return this.uint32(t),t&&this.push(n,t,e),this}},{33:33,35:35}],37:[function(t,r,n){function i(e,t,r){return"function"==typeof t?(r=t,t=new u.Root):t||(t=new u.Root),t.load(e,r)}function s(e,t){return t||(t=new u.Root),t.loadSync(e)}function o(){u.Reader.i()}var u=e.protobuf=n;u.load=i,u.loadSync=s,u.roots={};try{u.tokenize=t("./tokenize"),u.parse=t("./parse"),u.common=t("./common")}catch(e){}u.Writer=t(35),u.BufferWriter=t(36),u.Reader=t(23),u.BufferReader=t(24),u.encoder=t(14),u.decoder=t(13),u.verifier=t(34),u.converter=t(12),u.ReflectionObject=t(21),u.Namespace=t(20),u.Root=t(25),u.Enum=t(15),u.Type=t(29),u.Field=t(16),u.OneOf=t(22),u.MapField=t(17),u.Service=t(28),u.Method=t(19),u.Class=t(11),u.Message=t(18),u.types=t(30),u.rpc=t(26),u.util=t(31),u.configure=o,"function"==typeof define&&define.amd&&define(["long"],function(e){return e&&(u.util.Long=e,o()),u})},{11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,28:28,29:29,30:30,31:31,34:34,35:35,36:36,undefined:t}]},{},[37])}("object"==typeof window&&window||"object"==typeof self&&self||this);
!function(e,t){"use strict";!function e(t,r,n){function i(o,u){if(!r[o]){if(!t[o]){var f="function"==typeof require&&require;if(!u&&f)return f(o,!0);if(s)return s(o,!0);var a=Error("Cannot find module '"+o+"'");throw a.code="MODULE_NOT_FOUND",a}var h=r[o]={exports:{}};t[o][0].call(h.exports,function(e){var r=t[o][1][e];return i(r?r:e)},h,h.exports,e,t,r,n)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(e,t){function r(e,t){for(var r=[],n=2;n<arguments.length;)r.push(arguments[n++]);var i=!0;return new Promise(function(n,s){r.push(function(e){if(i)if(i=!1,e)s(e);else{for(var t=[],r=1;r<arguments.length;)t.push(arguments[r++]);n.apply(null,t)}});try{e.apply(t||this,r)}catch(e){i&&(i=!1,s(e))}})}t.exports=r},{}],2:[function(e,r,n){var i=n;i.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var s=Array(64),o=Array(123),u=0;u<64;)o[s[u]=u<26?u+65:u<52?u+71:u<62?u-4:u-59|43]=u++;i.encode=function(e,t,r){for(var n,i=[],o=0,u=0;t<r;){var f=e[t++];switch(u){case 0:i[o++]=s[f>>2],n=(3&f)<<4,u=1;break;case 1:i[o++]=s[n|f>>4],n=(15&f)<<2,u=2;break;case 2:i[o++]=s[n|f>>6],i[o++]=s[63&f],u=0}}return u&&(i[o++]=s[n],i[o]=61,1===u&&(i[o+1]=61)),String.fromCharCode.apply(String,i)};var f="invalid encoding";i.decode=function(e,r,n){for(var i,s=n,u=0,a=0;a<e.length;){var h=e.charCodeAt(a++);if(61===h&&u>1)break;if((h=o[h])===t)throw Error(f);switch(u){case 0:i=h,u=1;break;case 1:r[n++]=i<<2|(48&h)>>4,i=h,u=2;break;case 2:r[n++]=(15&i)<<4|(60&h)>>2,i=h,u=3;break;case 3:r[n++]=(3&i)<<6|h,u=0}}if(1===u)throw Error(f);return n-s},i.test=function(e){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e)}},{}],3:[function(e,r){function n(){function e(){for(var t=[],r=0;r<arguments.length;)t.push(arguments[r++]);var n=i.apply(null,t),h=p;if(c.length){var l=c[c.length-1];s.test(l)?h=++p:f.test(l)&&++h,u.test(l)&&!u.test(n)?(h=++p,d=!0):d&&a.test(l)&&(h=--p,d=!1),o.test(n)&&(h=--p)}for(r=0;r<h;++r)n="\t"+n;return c.push(n),e}function r(e){return"function"+(e?" "+e.replace(/[^\w_$]/g,"_"):"")+"("+l.join(",")+") {\n"+c.join("\n")+"\n}"}function h(r,i){"object"==typeof r&&(i=r,r=t);var s=e.str(r);n.verbose&&console.log("--- codegen ---\n"+s.replace(/^/gm,"> ").replace(/\t/g," "));var o=Object.keys(i||(i={}));return Function.apply(null,o.concat("return "+s)).apply(null,o.map(function(e){return i[e]}))}for(var l=[],c=[],p=1,d=!1,y=0;y<arguments.length;)l.push(arguments[y++]);return e.str=r,e.eof=h,e}function i(e){for(var t=[],r=1;r<arguments.length;)t.push(arguments[r++]);if(r=0,e=e.replace(/%([dfjs])/g,function(e,n){switch(n){case"d":return Math.floor(t[r++]);case"f":return+t[r++];case"j":return JSON.stringify(t[r++]);default:return t[r++]}}),r!==t.length)throw Error("argument count mismatch");return e}r.exports=n;var s=/[{[]$/,o=/^[}\]]/,u=/:$/,f=/^\s*(?:if|}?else if|while|for)\b|\b(?:else)\s*$/,a=/\b(?:break|continue)(?: \w+)?;?$|^\s*return\b/;n.sprintf=i,n.supported=!1;try{n.supported=1===n("a","b")("return a-b").eof()(2,1)}catch(e){}n.verbose=!1},{}],4:[function(e,r){function n(){this.a={}}r.exports=n;var i=n.prototype;i.on=function(e,t,r){return(this.a[e]||(this.a[e]=[])).push({fn:t,ctx:r||this}),this},i.off=function(e,r){if(e===t)this.a={};else if(r===t)this.a[e]=[];else for(var n=this.a[e],i=0;i<n.length;)n[i].fn===r?n.splice(i,1):++i;return this},i.emit=function(e){var t=this.a[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},{}],5:[function(e,t){function r(e){for(var t=Object.keys(this),r=0;r<t.length;++r)e[t[r]]=this[t[r]];var n=e.prototype=Object.create(this.prototype);return n.constructor=e,n}t.exports=r},{}],6:[function(e,r){function n(e,t){return t?u&&u.readFile?u.readFile(e,"utf8",function(r,n){return r&&"undefined"!=typeof XMLHttpRequest?i(e,t):t(r,n)}):i(e,t):s(n,this,e)}function i(e,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)):t},n.open("GET",e),n.send()}r.exports=n;var s=e(1),o=e(7),u=o("fs")},{1:1,7:7}],7:[function(e,t,r){function n(e){try{var t=eval("quire".replace(/^/,"re"))(e);if(t&&(t.length||Object.keys(t).length))return t}catch(e){}return null}t.exports=n},{}],8:[function(e,t,r){var n=r,i=n.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},s=n.normalize=function(e){e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var t=e.split("/"),r=i(e),n="";r&&(n=t.shift()+"/");for(var s=0;s<t.length;)".."===t[s]?s>0?t.splice(--s,2):r?t.splice(s,1):++s:"."===t[s]?t.splice(s,1):++s;return n+t.join("/")};n.resolve=function(e,t,r){return r||(t=s(t)),i(t)?t:(r||(e=s(e)),(e=e.replace(/(?:\/|^)[^\/]+$/,"")).length?s(e+"/"+t):t)}},{}],9:[function(e,t){function r(e,t,r){var n=r||8192,i=n>>>1,s=null,o=n;return function(r){if(r<1||r>i)return e(r);o+r>n&&(s=e(n),o=0);var u=t.call(s,o,o+=r);return 7&o&&(o=(7|o)+1),u}}t.exports=r},{}],10:[function(e,t,r){var n=r;n.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)r=e.charCodeAt(n),r<128?t+=1:r<2048?t+=2:55296===(64512&r)&&56320===(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},n.read=function(e,t,r){var n=r-t;if(n<1)return"";for(var i,s=null,o=[],u=0;t<r;)i=e[t++],i<128?o[u++]=i:i>191&&i<224?o[u++]=(31&i)<<6|63&e[t++]:i>239&&i<365?(i=((7&i)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[u++]=55296+(i>>10),o[u++]=56320+(1023&i)):o[u++]=(15&i)<<12|(63&e[t++])<<6|63&e[t++],u>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),u=0);return s?(u&&s.push(String.fromCharCode.apply(String,o.slice(0,u))),s.join("")):u?String.fromCharCode.apply(String,o.slice(0,u)):""},n.write=function(e,t,r){for(var n,i,s=r,o=0;o<e.length;++o)n=e.charCodeAt(o),n<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=63&n|128):55296===(64512&n)&&56320===(64512&(i=e.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&i),++o,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-s}},{}],11:[function(e,t){function r(e){return n(e)}function n(t,n){if(i||(i=e(29)),!(t instanceof i))throw TypeError("type must be a Type");if(n){if("function"!=typeof n)throw TypeError("ctor must be a function")}else n=o.codegen("p")("return ctor.call(this,p)").eof(t.name,{ctor:s});n.constructor=r;var u=n.prototype=new s;return u.constructor=n,o.merge(n,s,!0),n.$type=t,u.$type=t,t.fieldsArray.forEach(function(e){u[e.name]=Array.isArray(e.resolve().defaultValue)?o.emptyArray:o.isObject(e.defaultValue)&&!e.long?o.emptyObject:e.defaultValue}),t.oneofsArray.forEach(function(e){Object.defineProperty(u,e.resolve().name,{get:o.oneOfGetter(e.oneof),set:o.oneOfSetter(e.oneof)})}),t.ctor=n,u}t.exports=r;var i,s=e(18),o=e(31);r.create=n,r.prototype=s},{18:18,29:29,31:31}],12:[function(e,t,r){function n(e,t,r,n){if(t.resolvedType)if(t.resolvedType instanceof o){var i=t.resolvedType.values;e("switch(d%s){",n),Object.keys(i).forEach(function(r){t.repeated&&i[r]===t.typeDefault&&e("default:"),e("case%j:",r)("case %j:",i[r])("m%s=%j",n,i[r])("break")}),e("}")}else e("m%s=types[%d].fromObject(d%s)",n,r,n);else{var s=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",n,n);break;case"uint64":s=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,s)('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,s?"true":"");break;case"bytes":e('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&&d%s.length)",n,n)("m%s=d%s",n,n);break;case"string":e("m%s=String(d%s)",n,n);break;case"bool":e("m%s=Boolean(d%s)",n,n)}}return e}function i(e,t,r,n){if(t.resolvedType)t.resolvedType instanceof o?e("d%s=o.enums===String?types[%d].values[m%s]:m%s",n,r,n,n):e("d%s=types[%d].toObject(m%s,o)",n,r,n);else{var i=!1;switch(t.type){case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('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,i?"true":"",n);break;case"bytes":e("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:e("d%s=m%s",n,n)}}return e}var s=r,o=e(15),u=e(31);s.fromObject=function(e){var t=e.fieldsArray;if(!t.length)return u.codegen()("return new(this.ctor)");for(var r=u.codegen("d")("var m=new(this.ctor)"),i=0;i<t.length;++i){var s=t[i].resolve(),f=u.safeProp(s.name);s.map?(r("if(d%s){",f)("m%s={}",f)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",f),n(r,s,i,f+"[ks[i]]")("}")("}")):s.repeated?(r("if(d%s){",f)("m%s=[]",f)("for(var i=0;i<d%s.length;++i){",f),n(r,s,i,f+"[i]")("}")("}")):(s.resolvedType instanceof o||r("if(d%s!==undefined&&d%s!==null){",f,f),n(r,s,i,f),s.resolvedType instanceof o||r("}"))}return r("return m")},s.toObject=function(e){var t=e.fieldsArray;if(!t.length)return u.codegen()("return {}");var r=u.codegen("m","o")("if(!o)")("o={}")("var d={}"),n=t.filter(function(e){return e.resolve().repeated});n.length&&(r("if(o.arrays||o.defaults){"),n.forEach(function(e){r("d%s=[]",u.safeProp(e.name))}),r("}"));var s=t.filter(function(e){return e.map});s.length&&(r("if(o.objects||o.defaults){"),s.forEach(function(e){r("d%s={}",u.safeProp(e.name))}),r("}"));var f=t.filter(function(e){return!(e.repeated||e.map)});f.length&&(r("if(o.defaults){"),f.forEach(function(e){var t=u.safeProp(e.name);e.resolvedType instanceof o?r("d%s=o.enums===String?%j:%j",t,e.resolvedType.valuesById[e.typeDefault],e.typeDefault):e.long?r("if(util.Long){")("var n=new util.Long(%d,%d,%j)",e.typeDefault.low,e.typeDefault.high,e.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",t)("}else")("d%s=o.longs===String?%j:%d",t,""+e.typeDefault,e.typeDefault.toNumber()):e.bytes?r("d%s=o.bytes===String?%j:%s",t,String.fromCharCode.apply(String,e.typeDefault),"["+Array.prototype.slice.call(e.typeDefault).join(",")+"]"):r("d%s=%j",t,e.typeDefault)}),r("}"));for(var a=0;a<t.length;++a){var h=t[a],l=u.safeProp(h.name);r("if(m%s!==undefined&&m%s!==null&&m.hasOwnProperty(%j)){",l,l,h.name),h.map?(r("d%s={}",l)("for(var ks2=Object.keys(m%s),j=0;j<ks2.length;++j){",l),i(r,h,a,l+"[ks2[j]]")("}")):h.repeated?(r("d%s=[]",l)("for(var j=0;j<m%s.length;++j){",l),i(r,h,a,l+"[j]")("}")):i(r,h,a,l),r("}")}return r("return d")}},{15:15,31:31}],13:[function(e,r){function n(e){var r=e.fieldsArray,u=o.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()");e.group&&u("if((t&7)===4)")("break"),u("switch(t>>>3){");for(var f=0;f<r.length;++f){var a=r[f].resolve(),h=a.resolvedType instanceof i?"uint32":a.type,l="m"+o.safeProp(a.name);u("case %d:",a.id),a.map?(u("r.skip().pos++")("if(%s===util.emptyObject)",l)("%s={}",l)("var k=r.%s()",a.keyType)("r.pos++"),s.basic[h]===t?u('%s[typeof k==="object"?util.longToHash(k):k]=types[%d].decode(r,r.uint32())',l,f):u('%s[typeof k==="object"?util.longToHash(k):k]=r.%s()',l,h)):a.repeated?(u("if(!(%s&&%s.length))",l,l)("%s=[]",l),(n.compat||a.packed)&&s.packed[h]!==t&&u("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",l,h)("}else"),s.basic[h]===t?u(a.resolvedType.group?"%s.push(types[%d].decode(r))":"%s.push(types[%d].decode(r,r.uint32()))",l,f):u("%s.push(r.%s())",l,h)):s.basic[h]===t?u(a.resolvedType.group?"%s=types[%d].decode(r)":"%s=types[%d].decode(r,r.uint32())",l,f):u("%s=r.%s()",l,h),u("break")}return u("default:")("r.skipType(t&7)")("break")("}")("}")("return m")}r.exports=n,n.compat=!0;var i=e(15),s=e(30),o=e(31)},{15:15,30:30,31:31}],14:[function(e,r){function n(e,t,r,n){return t.resolvedType.group?e("types[%d].encode(%s,w.uint32(%d)).uint32(%d)",r,n,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%d].encode(%s,w.uint32(%d).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}function i(e){for(var r,i,f=e.fieldsArray,a=e.oneofsArray,h=u.codegen("m","w")("if(!w)")("w=Writer.create()"),r=0;r<f.length;++r){var l=f[r].resolve();if(!l.partOf){var c=l.resolvedType instanceof s?"uint32":l.type,p=o.basic[c];i="m"+u.safeProp(l.name),l.map?(h("if(%s&&m.hasOwnProperty(%j)){",i,l.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",i)("w.uint32(%d).fork().uint32(%d).%s(ks[i])",(l.id<<3|2)>>>0,8|o.mapKey[l.keyType],l.keyType),p===t?h("types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",r,i):h(".uint32(%d).%s(%s[ks[i]]).ldelim()",16|p,c,i),h("}")("}")):l.repeated?l.packed&&o.packed[c]!==t?h("if(%s&&%s.length&&m.hasOwnProperty(%j)){",i,i,l.name)("w.uint32(%d).fork()",(l.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",i)("w.%s(%s[i])",c,i)("w.ldelim()")("}"):(h("if(%s!==undefined&&m.hasOwnProperty(%j)){",i,l.name)("for(var i=0;i<%s.length;++i)",i),p===t?n(h,l,r,i+"[i]"):h("w.uint32(%d).%s(%s[i])",(l.id<<3|p)>>>0,c,i),h("}")):(l.required||(l.long?h("if(%s!==undefined&&%s!==null&&m.hasOwnProperty(%j))",i,i,l.name):l.bytes?h("if(%s&&m.hasOwnProperty(%j))",i,l.name):h("if(%s!==undefined&&m.hasOwnProperty(%j))",i,l.name)),p===t?n(h,l,r,i):h("w.uint32(%d).%s(%s)",(l.id<<3|p)>>>0,c,i))}}for(var r=0;r<a.length;++r){var d=a[r];h("switch(%s){","m"+u.safeProp(d.name));for(var y=d.fieldsArray,v=0;v<y.length;++v){var l=y[v],c=l.resolvedType instanceof s?"uint32":l.type,p=o.basic[c];i="m"+u.safeProp(l.name),h("case%j:",l.name),p===t?n(h,l,f.indexOf(l),i):h("w.uint32(%d).%s(%s)",(l.id<<3|p)>>>0,c,i),h("break")}h("}")}return h("return w")}r.exports=i;var s=e(15),o=e(30),u=e(31)},{15:15,30:30,31:31}],15:[function(e,r){function n(e,t,r){i.call(this,e,r),this.valuesById={},this.values=Object.create(this.valuesById),this.comments={};var n=this;Object.keys(t||{}).forEach(function(e){n.valuesById[n.values[e]=t[e]]=e})}r.exports=n;var i=e(21),s=i.extend(n);n.className="Enum";var o=e(31);n.testJSON=function(e){return!(!e||!e.values)},n.fromJSON=function(e,t){return new n(e,t.values,t.options)},s.toJSON=function(){return{options:this.options,values:this.values}},s.add=function(e,r,n){if(!o.isString(e))throw TypeError("name must be a string");if(!o.isInteger(r))throw TypeError("id must be an integer");if(this.values[e]!==t)throw Error("duplicate name '"+e+"' in "+this);if(this.valuesById[r]!==t)throw Error("duplicate id "+r+" in "+this);return this.valuesById[this.values[e]=r]=e,this.comments[e]=n||null,this},s.remove=function(e){if(!o.isString(e))throw TypeError("name must be a string");var r=this.values[e];if(r===t)throw Error("'"+e+"' is not a name of "+this);return delete this.valuesById[r],delete this.values[e],delete this.comments[e],this}},{21:21,31:31}],16:[function(e,r){function n(e,r,n,s,o,u){if(h.isObject(s)?(u=s,s=o=t):h.isObject(o)&&(u=o,o=t),i.call(this,e,u),!h.isInteger(r)||r<0)throw TypeError("id must be a non-negative integer");if(!h.isString(n))throw TypeError("type must be a string");if(o!==t&&!h.isString(o))throw TypeError("extend must be a string");if(s!==t&&!/^required|optional|repeated$/.test(s=(""+s).toLowerCase()))throw TypeError("rule must be a string rule");this.rule=s&&"optional"!==s?s:t,this.type=n,this.id=r,this.extend=o||t,this.required="required"===s,this.optional=!this.required,this.repeated="repeated"===s,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!h.Long&&a.long[n]!==t,this.bytes="bytes"===n,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.b=null}r.exports=n;var i=e(21),s=i.extend(n);n.className="Field";var o,u,f=e(15),a=e(30),h=e(31);Object.defineProperty(s,"packed",{get:function(){return null===this.b&&(this.b=this.getOption("packed")!==!1),this.b}}),s.setOption=function(e,t,r){return"packed"===e&&(this.b=null),i.prototype.setOption.call(this,e,t,r)},n.testJSON=function(e){return!(!e||e.id===t)},n.fromJSON=function(r,i){return i.keyType!==t?(u||(u=e(17)),u.fromJSON(r,i)):new n(r,i.id,i.type,i.rule,i.extend,i.options)},s.toJSON=function(){return{rule:"optional"!==this.rule&&this.rule||t,type:this.type,id:this.id,extend:this.extend,options:this.options}},s.resolve=function(){if(this.resolved)return this;if((this.typeDefault=a.defaults[this.type])===t)if(o||(o=e(29)),this.resolvedType=this.parent.lookup(this.type,o))this.typeDefault=null;else{if(!(this.resolvedType=this.parent.lookup(this.type,f)))throw Error("unresolvable field type: "+this.type);this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]}if(this.options&&this.options.default!==t&&(this.typeDefault=this.options.default,this.resolvedType instanceof f&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.long)this.typeDefault=h.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;h.base64.test(this.typeDefault)?h.base64.decode(this.typeDefault,r=h.newBuffer(h.base64.length(this.typeDefault)),0):h.utf8.write(this.typeDefault,r=h.newBuffer(h.utf8.length(this.typeDefault)),0),this.typeDefault=r}return this.map?this.defaultValue={}:this.repeated?this.defaultValue=[]:this.defaultValue=this.typeDefault,i.prototype.resolve.call(this)}},{15:15,17:17,21:21,29:29,30:30,31:31}],17:[function(e,r){function n(e,t,r,n,s){if(i.call(this,e,t,n,s),!f.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}r.exports=n;var i=e(16),s=i.prototype,o=i.extend(n);n.className="MapField";var u=e(30),f=e(31);n.testJSON=function(e){return i.testJSON(e)&&e.keyType!==t},n.fromJSON=function(e,t){return new n(e,t.id,t.keyType,t.type,t.options)},o.toJSON=function(){return{keyType:this.keyType,type:this.type,id:this.id,extend:this.extend,options:this.options}},o.resolve=function(){if(this.resolved)return this;if(u.mapKey[this.keyType]===t)throw Error("invalid key type: "+this.keyType);return s.resolve.call(this)}},{16:16,30:30,31:31}],18:[function(e,t){function r(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}t.exports=r;var n=e(31);r.encode=function(e,t){return this.$type.encode(e,t)},r.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},r.decode=function(e){return this.$type.decode(e)},r.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},r.verify=function(e){return this.$type.verify(e)},r.fromObject=function(e){return this.$type.fromObject(e)},r.from=r.fromObject,r.toObject=function(e,t){return this.$type.toObject(e,t)},r.prototype.toObject=function(e){return this.$type.toObject(this,e)},r.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},{31:31}],19:[function(e,r){function n(e,r,n,s,o,f,a){if(u.isObject(o)?(a=o,o=f=t):u.isObject(f)&&(a=f,f=t),r&&!u.isString(r))throw TypeError("type must be a string");if(!u.isString(n))throw TypeError("requestType must be a string");if(!u.isString(s))throw TypeError("responseType must be a string");i.call(this,e,a),this.type=r||"rpc",this.requestType=n,this.requestStream=!!o||t,this.responseType=s,this.responseStream=!!f||t,this.resolvedRequestType=null,this.resolvedResponseType=null}r.exports=n;var i=e(21),s=i.extend(n);n.className="Method";var o=e(29),u=e(31);n.testJSON=function(e){return!(!e||e.requestType===t)},n.fromJSON=function(e,t){return new n(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options)},s.toJSON=function(){return{type:"rpc"!==this.type&&this.type||t,requestType:this.requestType,requestStream:this.requestStream,responseType:this.responseType,responseStream:this.responseStream,options:this.options}},s.resolve=function(){if(this.resolved)return this;if(!(this.resolvedRequestType=this.parent.lookup(this.requestType,o)))throw Error("unresolvable request type: "+this.requestType);if(!(this.resolvedResponseType=this.parent.lookup(this.responseType,o)))throw Error("unresolvable response type: "+this.requestType);return i.prototype.resolve.call(this)}},{21:21,29:29,31:31}],20:[function(e,r){function n(){a||(a=e(29)),h||(h=e(28)),l=[p,a,h,d,s],c="one of "+l.map(function(e){return e.name}).join(", ")}function i(e){if(!e||!e.length)return t;for(var r={},n=0;n<e.length;++n)r[e[n].name]=e[n].toJSON();return r}function s(e,r){u.call(this,e,r),this.nested=t,this.c=null,this.d=[]}function o(e){e.c=null;for(var t=0;t<e.d.length;++t)delete e[e.d[t]];return e.d=[],e}r.exports=s;var u=e(21),f=u.extend(s);s.className="Namespace";var a,h,l,c,p=e(15),d=e(16),y=e(31);s.testJSON=function(e){return!(!e||e.fields||e.values||e.id!==t||e.oneof||e.methods||e.requestType!==t)},s.fromJSON=function(e,t){return new s(e,t.options).addJSON(t.nested)},s.arrayToJSON=i,Object.defineProperty(f,"nestedArray",{get:function(){return this.c||(this.c=y.toArray(this.nested))}}),f.toJSON=function(){return{options:this.options,nested:i(this.nestedArray)}},f.addJSON=function(e){var t=this;return e&&(l||n(),Object.keys(e).forEach(function(r){for(var n=e[r],i=0;i<l.length;++i)if(l[i].testJSON(n))return t.add(l[i].fromJSON(r,n));throw TypeError("nested."+r+" must be JSON for "+c)})),this},f.get=function(e){return this.nested===t?null:this.nested[e]||null},f.getEnum=function(e){if(this.nested&&this.nested[e]instanceof p)return this.nested[e].values;throw Error("no such enum")},f.add=function(e){if(l||n(),!e||l.indexOf(e.constructor)<0)throw TypeError("object must be "+c);if(e instanceof d&&e.extend===t)throw TypeError("object must be an extension field when not part of a type");if(this.nested){var r=this.get(e.name);if(r){if(!(r instanceof s&&e instanceof s)||r instanceof a||r instanceof h)throw Error("duplicate name '"+e.name+"' in "+this);for(var i=r.nestedArray,u=0;u<i.length;++u)e.add(i[u]);this.remove(r),this.nested||(this.nested={}),e.setOptions(r.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),o(this)},f.remove=function(e){if(!(e instanceof u))throw TypeError("object must be a ReflectionObject");if(e.parent!==this||!this.nested)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=t),e.onRemove(this),o(this)},f.define=function(e,r){y.isString(e)?e=e.split("."):Array.isArray(e)||(r=e,e=t);var n=this;if(e)for(;e.length>0;){var i=e.shift();if(n.nested&&n.nested[i]){if(n=n.nested[i],!(n instanceof s))throw Error("path conflicts with non-namespace objects")}else n.add(n=new s(i))}return r&&n.addJSON(r),n},f.resolve=function(){a||(a=e(29)),h||(a=e(28));for(var t=this.nestedArray,r=0;r<t.length;++r)if(/^[A-Z]/.test(t[r].name)){if(t[r]instanceof a||t[r]instanceof h)this[t[r].name]=t[r];else{if(!(t[r]instanceof p))continue;this[t[r].name]=t[r].values}this.d.push(t[r].name)}return u.prototype.resolve.call(this)},f.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof s?e[t++].resolveAll():e[t++].resolve();return f.resolve.call(this)},f.lookup=function(e,r,n){if("boolean"==typeof r&&(n=r,r=t),y.isString(e)&&e.length)e=e.split(".");else if(!e.length)return null;if(""===e[0])return this.root.lookup(e.slice(1),r);var i=this.get(e[0]);return i&&1===e.length&&(!r||i instanceof r)||i instanceof s&&(i=i.lookup(e.slice(1),r,!0))?i:null===this.parent||n?null:this.parent.lookup(e,r)},f.lookupType=function(t){a||(a=e(29));var r=this.lookup(t,a);if(!r)throw Error("no such type");return r},f.lookupService=function(t){h||(h=e(28));var r=this.lookup(t,h);if(!r)throw Error("no such service");return r},f.lookupEnum=function(e){var t=this.lookup(e,p);if(!t)throw Error("no such enum");return t.values}},{15:15,16:16,21:21,28:28,29:29,31:31}],21:[function(e,r){function n(e,t){if(!i.isString(e))throw TypeError("name must be a string");if(t&&!i.isObject(t))throw TypeError("options must be an object");this.options=t,this.name=e,this.parent=null,this.resolved=!1,this.comment=null}r.exports=n;var i=e(31);n.className="ReflectionObject",n.extend=i.extend;var s,o=n.prototype;Object.defineProperties(o,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),o.toJSON=function(){throw Error()},o.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var r=t.root;s||(s=e(25)),r instanceof s&&r.e(this)},o.onRemove=function(t){var r=t.root;s||(s=e(25)),r instanceof s&&r.f(this),this.parent=null,this.resolved=!1},o.resolve=function(){return this.resolved?this:(s||(s=e(25)),this.root instanceof s&&(this.resolved=!0),this)},o.getOption=function(e){return this.options?this.options[e]:t},o.setOption=function(e,r,n){return n&&this.options&&this.options[e]!==t||((this.options||(this.options={}))[e]=r),this},o.setOptions=function(e,t){return e&&Object.keys(e).forEach(function(r){this.setOption(r,e[r],t)},this),this},o.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e}},{25:25,31:31}],22:[function(e,r){function n(e,r,n){if(Array.isArray(r)||(n=r,r=t),s.call(this,e,n),r&&!Array.isArray(r))throw TypeError("fieldNames must be an Array");this.oneof=r||[],this.g=[]}function i(e){e.parent&&e.g.forEach(function(t){t.parent||e.parent.add(t)})}r.exports=n;var s=e(21),o=s.extend(n);n.className="OneOf";var u=e(16);Object.defineProperty(o,"fieldsArray",{get:function(){return this.g}}),n.testJSON=function(e){return!!e.oneof},n.fromJSON=function(e,t){return new n(e,t.oneof,t.options)},o.toJSON=function(){return{oneof:this.oneof,options:this.options}},o.add=function(e){if(!(e instanceof u))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.g.push(e),e.partOf=this,i(this),this},o.remove=function(e){if(!(e instanceof u))throw TypeError("field must be a Field");var t=this.g.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.g.splice(t,1),t=this.oneof.indexOf(e.name),t>-1&&this.oneof.splice(t,1),e.partOf=null,this},o.onAdd=function(e){s.prototype.onAdd.call(this,e);var t=this;this.oneof.forEach(function(r){var n=e.get(r);n&&!n.partOf&&(n.partOf=t,t.g.push(n))}),i(this)},o.onRemove=function(e){this.g.forEach(function(e){e.parent&&e.parent.remove(e)}),s.prototype.onRemove.call(this,e)}},{16:16,21:21}],23:[function(e,t){function r(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function n(e){this.buf=e,this.pos=0,this.len=e.length}function i(){var e=new w(0,0),t=0;if(this.len-this.pos>4){for(t=0;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e}else{for(t=0;t<4;++t){if(this.pos>=this.len)throw r(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}if(this.pos>=this.len)throw r(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e}if(this.len-this.pos>4){for(t=0;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(t=0;t<5;++t){if(this.pos>=this.len)throw r(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function s(){return i.call(this).toLong()}function o(){return i.call(this).toNumber()}function u(){return i.call(this).toLong(!0)}function f(){return i.call(this).toNumber(!0)}function a(){return i.call(this).zzDecode().toLong()}function h(){return i.call(this).zzDecode().toNumber()}function l(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function c(){if(this.pos+8>this.len)throw r(this,8);return new w(l(this.buf,this.pos+=4),l(this.buf,this.pos+=4))}function p(){return c.call(this).toLong(!0)}function d(){return c.call(this).toNumber(!0)}function y(){return c.call(this).zzDecode().toLong()}function v(){return c.call(this).zzDecode().toNumber()}function m(){b.Long?(j.int64=s,j.uint64=u,j.sint64=a,j.fixed64=p,j.sfixed64=y):(j.int64=o,j.uint64=f,j.sint64=h,j.fixed64=d,j.sfixed64=v)}t.exports=n;var g,b=e(33),w=b.LongBits,O=b.utf8;n.create=b.Buffer?function(t){return g||(g=e(24)),(n.create=function(e){return b.Buffer.isBuffer(e)?new g(e):new n(e)})(t)}:function(e){return new n(e)};var j=n.prototype;j.h=b.Array.prototype.subarray||b.Array.prototype.slice,j.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,r(this,10);return e}}(),j.int32=function(){return 0|this.uint32()},j.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},j.bool=function(){return 0!==this.uint32()},j.fixed32=function(){if(this.pos+4>this.len)throw r(this,4);return l(this.buf,this.pos+=4)},j.sfixed32=function(){var e=this.fixed32();return e>>>1^-(1&e)};var k="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],e[0]}:function(r,n){return t[3]=r[n],t[2]=r[n+1],t[1]=r[n+2],t[0]=r[n+3],e[0]}}():function(e,t){var r=l(e,t+4),n=2*(r>>31)+1,i=r>>>23&255,s=8388607&r;return 255===i?s?NaN:n*(1/0):0===i?1.401298464324817e-45*n*s:n*Math.pow(2,i-150)*(s+8388608)};j.float=function(){if(this.pos+4>this.len)throw r(this,4);var e=k(this.buf,this.pos);return this.pos+=4,e};var x="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],t[4]=r[n+4],t[5]=r[n+5],t[6]=r[n+6],t[7]=r[n+7],e[0]}:function(r,n){return t[7]=r[n],t[6]=r[n+1],t[5]=r[n+2],t[4]=r[n+3],t[3]=r[n+4],t[2]=r[n+5],t[1]=r[n+6],t[0]=r[n+7],e[0]}}():function(e,t){var r=l(e,t+4),n=l(e,t+8),i=2*(n>>31)+1,s=n>>>20&2047,o=4294967296*(1048575&n)+r;return 2047===s?o?NaN:i*(1/0):0===s?5e-324*i*o:i*Math.pow(2,s-1075)*(o+4503599627370496)};j.double=function(){if(this.pos+8>this.len)throw r(this,4);var e=x(this.buf,this.pos);return this.pos+=8,e},j.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw r(this,e);return this.pos+=e,t===n?new this.buf.constructor(0):this.h.call(this.buf,t,n)},j.string=function(){var e=this.bytes();return O.read(e,0,e.length)},j.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw r(this,e);this.pos+=e}else do if(this.pos>=this.len)throw r(this);while(128&this.buf[this.pos++]);return this},j.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){if(4===(e=7&this.uint32()))break;this.skipType(e)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},n.i=m,m()},{24:24,33:33}],24:[function(e,t){function r(e){n.call(this,e)}t.exports=r;var n=e(23),i=r.prototype=Object.create(n.prototype);i.constructor=r;var s=e(33);s.Buffer&&(i.h=s.Buffer.prototype.slice),i.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len));
}},{23:23,33:33}],25:[function(e,r){function n(e){o.call(this,"",e),this.deferred=[],this.files=[]}function i(){}function s(e){var r=e.parent.lookup(e.extend);if(r){var n=new h(e.fullName,e.id,e.type,e.rule,t,e.options);return n.declaringField=e,e.extensionField=n,r.add(n),!0}return!1}r.exports=n;var o=e(20),u=o.extend(n);n.className="Root";var f,a,h=e(16),l=e(31);n.fromJSON=function(e,t){return t||(t=new n),t.setOptions(e.options).addJSON(e.nested)},u.resolvePath=l.path.resolve;var c=function(){try{f=e("./parse"),a=e("./common")}catch(e){}c=null};u.load=function e(r,n,s){function o(e,t){if(s){var r=s;if(s=null,d)throw e;r(e,t)}}function u(e,r){try{if(l.isString(r)&&"{"===r.charAt(0)&&(r=JSON.parse(r)),l.isString(r)){f.filename=e;var i=f(r,p,n);i.imports&&i.imports.forEach(function(t){h(p.resolvePath(e,t))}),i.weakImports&&i.weakImports.forEach(function(t){h(p.resolvePath(e,t),!0)})}else p.setOptions(r.options).addJSON(r.nested)}catch(e){if(d)throw e;return o(e),t}d||y||o(null,p)}function h(e,r){var n=e.lastIndexOf("google/protobuf/");if(n>-1){var i=e.substring(n);i in a&&(e=i)}if(!(p.files.indexOf(e)>-1)){if(p.files.push(e),e in a)return d?u(e,a[e]):(++y,setTimeout(function(){--y,u(e,a[e])})),t;if(d){var f;try{f=l.fs.readFileSync(e).toString("utf8")}catch(e){return r||o(e),t}u(e,f)}else++y,l.fetch(e,function(n,i){if(--y,s)return n?(r||o(n),t):(u(e,i),t)})}}c&&c(),"function"==typeof n&&(s=n,n=t);var p=this;if(!s)return l.asPromise(e,p,r);var d=s===i,y=0;return l.isString(r)&&(r=[r]),r.forEach(function(e){h(p.resolvePath("",e))}),d?p:(y||o(null,p),t)},u.loadSync=function(e,t){if(!l.isNode)throw Error("not supported");return this.load(e,t,i)},u.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(e){return"'extend "+e.extend+"' in "+e.parent.fullName}).join(", "));return o.prototype.resolveAll.call(this)},u.e=function(e){var r=this.deferred.slice();this.deferred=[];for(var n=0;n<r.length;)s(r[n])?r.splice(n,1):++n;if(this.deferred=r,e instanceof h&&e.extend!==t&&!e.extensionField&&!s(e)&&this.deferred.indexOf(e)<0)this.deferred.push(e);else if(e instanceof o){var i=e.nestedArray;for(n=0;n<i.length;++n)this.e(i[n])}},u.f=function(e){if(e instanceof h){if(e.extend!==t&&!e.extensionField){var r=this.deferred.indexOf(e);r>-1&&this.deferred.splice(r,1)}e.extensionField&&(e.extensionField.parent.remove(e.extensionField),e.extensionField=null)}else if(e instanceof o)for(var n=e.nestedArray,i=0;i<n.length;++i)this.f(n[i])}},{16:16,20:20,31:31,undefined:t}],26:[function(e,t,r){var n=r;n.Service=e(27)},{27:27}],27:[function(e,t){function r(e){n.call(this),this.$rpc=e}t.exports=r;var n=e(31).EventEmitter;(r.prototype=Object.create(n.prototype)).constructor=r,r.prototype.end=function(e){return this.$rpc&&(e||this.$rpc(null,null,null),this.$rpc=null,this.emit("end").off()),this}},{31:31}],28:[function(e,r){function n(e,t){s.call(this,e,t),this.methods={},this.j=null}function i(e){return e.j=null,e}r.exports=n;var s=e(20),o=s.prototype,u=s.extend(n);n.className="Service";var f=e(19),a=e(31),h=e(26);n.testJSON=function(e){return!(!e||!e.methods)},n.fromJSON=function(e,t){var r=new n(e,t.options);return t.methods&&Object.keys(t.methods).forEach(function(e){r.add(f.fromJSON(e,t.methods[e]))}),r},Object.defineProperty(u,"methodsArray",{get:function(){return this.j||(this.j=a.toArray(this.methods))}}),u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||t,methods:s.arrayToJSON(this.methodsArray)||{},nested:e&&e.nested||t}},u.get=function(e){return o.get.call(this,e)||this.methods[e]||null},u.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return o.resolve.call(this)},u.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof f?(this.methods[e.name]=e,e.parent=this,i(this)):o.add.call(this,e)},u.remove=function(e){if(e instanceof f){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,i(this)}return o.remove.call(this,e)},u.create=function(e,r,n){var i=new h.Service(e);return this.methodsArray.forEach(function(s){i[a.lcFirst(s.name)]=function(o,u){if(i.$rpc){if(!o)throw TypeError("request must not be null");s.resolve();var f;try{f=(r?s.resolvedRequestType.encodeDelimited(o):s.resolvedRequestType.encode(o)).finish()}catch(e){return("function"==typeof setImmediate?setImmediate:setTimeout)(function(){u(e)}),t}e(s,f,function(e,r){if(e)return i.emit("error",e,s),u?u(e):t;if(null===r)return i.end(!0),t;var o;try{o=n?s.resolvedResponseType.decodeDelimited(r):s.resolvedResponseType.decode(r)}catch(e){return i.emit("error",e,s),u?u("error",e):t}return i.emit("data",o,s),u?u(null,o):t})}}}),i}},{19:19,20:20,26:26,31:31}],29:[function(e,r){function n(e,r){s.call(this,e,r),this.fields={},this.oneofs=t,this.extensions=t,this.reserved=t,this.group=t,this.k=null,this.g=null,this.l=null,this.m=null}function i(e){return e.k=e.g=e.l=e.m=null,delete e.encode,delete e.decode,delete e.verify,e}r.exports=n;var s=e(20),o=s.prototype,u=s.extend(n);n.className="Type";var f=e(15),a=e(22),h=e(16),l=e(28),c=e(11),p=e(18),d=e(23),y=e(35),v=e(31),m=e(14),g=e(13),b=e(34),w=e(12),O=[f,n,h,l];n.testJSON=function(e){return!(!e||!e.fields)},n.fromJSON=function(e,r){var i=new n(e,r.options);return i.extensions=r.extensions,i.reserved=r.reserved,r.fields&&Object.keys(r.fields).forEach(function(e){i.add(h.fromJSON(e,r.fields[e]))}),r.oneofs&&Object.keys(r.oneofs).forEach(function(e){i.add(a.fromJSON(e,r.oneofs[e]))}),r.nested&&Object.keys(r.nested).forEach(function(e){for(var n=r.nested[e],s=0;s<O.length;++s)if(O[s].testJSON(n))return i.add(O[s].fromJSON(e,n)),t;throw Error("invalid nested object in "+i+": "+e)}),r.extensions&&r.extensions.length&&(i.extensions=r.extensions),r.reserved&&r.reserved.length&&(i.reserved=r.reserved),r.group&&(i.group=!0),i},Object.defineProperties(u,{fieldsById:{get:function(){if(this.k)return this.k;this.k={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var r=this.fields[e[t]],n=r.id;if(this.k[n])throw Error("duplicate id "+n+" in "+this);this.k[n]=r}return this.k}},fieldsArray:{get:function(){return this.g||(this.g=v.toArray(this.fields))}},oneofsArray:{get:function(){return this.l||(this.l=v.toArray(this.oneofs))}},ctor:{get:function(){return this.m||(this.m=c.create(this).constructor)},set:function(e){if(e&&!(e.prototype instanceof p))throw TypeError("ctor must be a Message constructor");e.from||(e.from=p.from),this.m=e}}}),u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||t,oneofs:s.arrayToJSON(this.oneofsArray),fields:s.arrayToJSON(this.fieldsArray.filter(function(e){return!e.declaringField}))||{},extensions:this.extensions&&this.extensions.length?this.extensions:t,reserved:this.reserved&&this.reserved.length?this.reserved:t,group:this.group||t,nested:e&&e.nested||t}},u.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var r=this.oneofsArray;for(t=0;t<r.length;)r[t++].resolve();return o.resolve.call(this)},u.get=function(e){return o.get.call(this,e)||this.fields&&this.fields[e]||this.oneofs&&this.oneofs[e]||null},u.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof h&&e.extend===t){if(this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),i(this)}return e instanceof a?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),i(this)):o.add.call(this,e)},u.remove=function(e){if(e instanceof h&&e.extend===t){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),i(this)}if(e instanceof a){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),i(this)}return o.remove.call(this,e)},u.create=function(e){return new this.ctor(e)},u.setup=function(){var e=this.fullName,t=this.fieldsArray.map(function(e){return e.resolve().resolvedType});return this.encode=m(this).eof(e+"$encode",{Writer:y,types:t,util:v}),this.decode=g(this).eof(e+"$decode",{Reader:d,types:t,util:v}),this.verify=b(this).eof(e+"$verify",{types:t,util:v}),this.fromObject=this.from=w.fromObject(this).eof(e+"$fromObject",{types:t,util:v}),this.toObject=w.toObject(this).eof(e+"$toObject",{types:t,util:v}),this},u.encode=function(e,t){return this.setup().encode(e,t)},u.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},u.decode=function(e,t){return this.setup().decode(e,t)},u.decodeDelimited=function(e){return e instanceof d||(e=d.create(e)),this.decode(e,e.uint32())},u.verify=function(e){return this.setup().verify(e)},u.fromObject=function(e){return this.setup().fromObject(e)},u.from=u.fromObject,u.toObject=function(e,t){return this.setup().toObject(e,t)}},{11:11,12:12,13:13,14:14,15:15,16:16,18:18,20:20,22:22,23:23,28:28,31:31,34:34,35:35}],30:[function(e,t,r){function n(e,t){var r=0,n={};for(t|=0;r<e.length;)n[o[r+t]]=e[r++];return n}var i=r,s=e(31),o=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];i.basic=n([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),i.defaults=n([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",s.emptyArray,null]),i.long=n([0,0,0,1,1],7),i.mapKey=n([0,0,0,5,5,0,0,0,1,1,0,2],2),i.packed=n([1,5,0,0,0,5,5,0,0,0,1,1,0])},{31:31}],31:[function(e,t){var r=t.exports=e(33);r.asPromise=e(1),r.codegen=e(3),r.EventEmitter=e(4),r.extend=e(5),r.fetch=e(6),r.path=e(8),r.fs=r.inquire("fs"),r.toArray=function(e){return e?Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]}):[]},r.safeProp=function(e){return'["'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"]'},r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)}},{1:1,3:3,33:33,4:4,5:5,6:6,8:8}],32:[function(e,t){function r(e,t){this.lo=e,this.hi=t}t.exports=r;var n=e(33),i=r.prototype,s=r.zero=new r(0,0);s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1};var o=r.zeroHash="\0\0\0\0\0\0\0\0";r.fromNumber=function(e){if(0===e)return s;var t=e<0;t&&(e=-e);var n=e>>>0,i=(e-n)/4294967296>>>0;return t&&(i=~i>>>0,n=~n>>>0,++n>4294967295&&(n=0,++i>4294967295&&(i=0))),new r(n,i)},r.from=function(e){if("number"==typeof e)return r.fromNumber(e);if("string"==typeof e){if(!n.Long)return r.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new r(e.low>>>0,e.high>>>0):s},i.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},i.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,(!!e)):{low:0|this.lo,high:0|this.hi,unsigned:!!e}};var u=String.prototype.charCodeAt;r.fromHash=function(e){return e===o?s:new r((u.call(e,0)|u.call(e,1)<<8|u.call(e,2)<<16|u.call(e,3)<<24)>>>0,(u.call(e,4)|u.call(e,5)<<8|u.call(e,6)<<16|u.call(e,7)<<24)>>>0)},i.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)},i.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},i.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},i.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},{33:33}],33:[function(r,n,i){var s=i;s.base64=r(2),s.inquire=r(7),s.utf8=r(10),s.pool=r(9),s.emptyArray=Object.freeze?Object.freeze([]):[],s.emptyObject=Object.freeze?Object.freeze({}):{},s.isNode=!!(e.process&&e.process.versions&&e.process.versions.node),s.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},s.isString=function(e){return"string"==typeof e||e instanceof String},s.isObject=function(e){return e&&"object"==typeof e},s.Buffer=function(){try{var e=s.inquire("buffer").Buffer;return e.prototype.utf8Write?(e.from||(e.from=function(t,r){return new e(t,r)}),e.allocUnsafe||(e.allocUnsafe=function(t){return new e(t)}),e):null}catch(e){return null}}(),s.newBuffer=function(e){return"number"==typeof e?s.Buffer?s.Buffer.allocUnsafe(e):new s.Array(e):s.Buffer?s.Buffer.from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},s.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,s.LongBits=r(32),s.Long=e.dcodeIO&&e.dcodeIO.Long||s.inquire("long"),s.longToHash=function(e){return e?s.LongBits.from(e).toHash():s.LongBits.zeroHash},s.longFromHash=function(e,t){var r=s.LongBits.fromHash(e);return s.Long?s.Long.fromBits(r.lo,r.hi,t):r.toNumber(!!t)},s.merge=function(e,r,n){for(var i=Object.keys(r),s=0;s<i.length;++s)e[i[s]]!==t&&n||(e[i[s]]=r[i[s]]);return e},s.oneOfGetter=function(e){var r={};return e.forEach(function(e){r[e]=1}),function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(1===r[e[n]]&&this[e[n]]!==t&&null!==this[e[n]])return e[n]}},s.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},s.lazyResolve=function(e,t){t.forEach(function(t){Object.keys(t).forEach(function(r){for(var n=t[r|=0].split("."),i=e;n.length;)i=i[n.shift()];t[r]=i})})},s.toJSONOptions={longs:String,enums:String,bytes:String}},{10:10,2:2,32:32,7:7,9:9}],34:[function(e,t){function r(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function n(e,t,n,i){if(t.resolvedType)if(t.resolvedType instanceof o){e("switch(%s){",i)("default:")("return%j",r(t,"enum value"));for(var s=u.toArray(t.resolvedType.values),f=0;f<s.length;++f)e("case %d:",s[f]);e("break")("}")}else e("var e=types[%d].verify(%s);",n,i)("if(e)")("return%j+e",t.name+".");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",i)("return%j",r(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",i,i,i,i)("return%j",r(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',i)("return%j",r(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',i)("return%j",r(t,"boolean"));break;case"string":e("if(!util.isString(%s))",i)("return%j",r(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',i,i,i)("return%j",r(t,"buffer"))}return e}function i(e,t,n){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!/^-?(?:0|[1-9][0-9]*)$/.test(%s))",n)("return%j",r(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/.test(%s))",n)("return%j",r(t,"integer|Long key"));break;case"bool":e("if(!/^true|false|0|1$/.test(%s))",n)("return%j",r(t,"boolean key"))}return e}function s(e){var t=e.fieldsArray;if(!t.length)return u.codegen()("return null");for(var s=u.codegen("m"),f=0;f<t.length;++f){var a=t[f].resolve(),h="m"+u.safeProp(a.name);a.map?(s("if(%s!==undefined){",h)("if(!util.isObject(%s))",h)("return%j",r(a,"object"))("var k=Object.keys(%s)",h)("for(var i=0;i<k.length;++i){"),i(s,a,"k[i]"),n(s,a,f,h+"[k[i]]")("}")("}")):a.repeated?(s("if(%s!==undefined){",h)("if(!Array.isArray(%s))",h)("return%j",r(a,"array"))("for(var i=0;i<%s.length;++i){",h),n(s,a,f,h+"[i]")("}")("}")):(a.required||(!a.resolvedType||a.resolvedType instanceof o?s("if(%s!==undefined){",h):s("if(%s!==undefined&&%s!==null){",h,h)),n(s,a,f,h),a.required||s("}"))}return s("return null")}t.exports=s;var o=e(15),u=e(31)},{15:15,31:31}],35:[function(e,r){function n(e,r,n){this.fn=e,this.len=r,this.next=t,this.val=n}function i(){}function s(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function o(){this.len=0,this.head=new n(i,0,0),this.tail=this.head,this.states=null}function u(e,t,r){t[r]=255&e}function f(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e}function a(e,r){this.len=e,this.next=t,this.val=r}function h(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function l(e,t,r){t[r++]=255&e,t[r++]=e>>>8&255,t[r++]=e>>>16&255,t[r]=e>>>24}r.exports=o;var c,p=e(33),d=p.LongBits,y=p.base64,v=p.utf8;o.create=p.Buffer?function(){return c||(c=e(36)),(o.create=function(){return new c})()}:function(){return new o},o.alloc=function(e){return new p.Array(e)},p.Array!==Array&&(o.alloc=p.pool(o.alloc,p.Array.prototype.subarray));var m=o.prototype;m.push=function(e,t,r){return this.tail=this.tail.next=new n(e,t,r),this.len+=t,this},a.prototype=Object.create(n.prototype),a.prototype.fn=f,m.uint32=function(e){return this.len+=(this.tail=this.tail.next=new a((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},m.int32=function(e){return e<0?this.push(h,10,d.fromNumber(e)):this.uint32(e)},m.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},m.uint64=function(e){var t=d.from(e);return this.push(h,t.length(),t)},m.int64=m.uint64,m.sint64=function(e){var t=d.from(e).zzEncode();return this.push(h,t.length(),t)},m.bool=function(e){return this.push(u,1,e?1:0)},m.fixed32=function(e){return this.push(l,4,e>>>0)},m.sfixed32=function(e){return this.push(l,4,e<<1^e>>31)},m.fixed64=function(e){var t=d.from(e);return this.push(l,4,t.lo).push(l,4,t.hi)},m.sfixed64=function(e){var t=d.from(e).zzEncode();return this.push(l,4,t.lo).push(l,4,t.hi)};var g="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n,i){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i]=t[3]}:function(r,n,i){e[0]=r,n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,r){var n=e<0?1:0;if(n&&(e=-e),0===e)l(1/e>0?0:2147483648,t,r);else if(isNaN(e))l(2147483647,t,r);else if(e>3.4028234663852886e38)l((n<<31|2139095040)>>>0,t,r);else if(e<1.1754943508222875e-38)l((n<<31|Math.round(e/1.401298464324817e-45))>>>0,t,r);else{var i=Math.floor(Math.log(e)/Math.LN2),s=8388607&Math.round(e*Math.pow(2,-i)*8388608);l((n<<31|i+127<<23|s)>>>0,t,r)}};m.float=function(e){return this.push(g,4,e)};var b="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n,i){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i++]=t[3],n[i++]=t[4],n[i++]=t[5],n[i++]=t[6],n[i]=t[7]}:function(r,n,i){e[0]=r,n[i++]=t[7],n[i++]=t[6],n[i++]=t[5],n[i++]=t[4],n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,r){var n=e<0?1:0;if(n&&(e=-e),0===e)l(0,t,r),l(1/e>0?0:2147483648,t,r+4);else if(isNaN(e))l(4294967295,t,r),l(2147483647,t,r+4);else if(e>1.7976931348623157e308)l(0,t,r),l((n<<31|2146435072)>>>0,t,r+4);else{var i;if(e<2.2250738585072014e-308)i=e/5e-324,l(i>>>0,t,r),l((n<<31|i/4294967296)>>>0,t,r+4);else{var s=Math.floor(Math.log(e)/Math.LN2);1024===s&&(s=1023),i=e*Math.pow(2,-s),l(4503599627370496*i>>>0,t,r),l((n<<31|s+1023<<20|1048576*i&1048575)>>>0,t,r+4)}}};m.double=function(e){return this.push(b,8,e)};var w=p.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};m.bytes=function(e){var t=e.length>>>0;if("string"==typeof e&&t){var r=o.alloc(t=y.length(e));y.decode(e,r,0),e=r}return t?this.uint32(t).push(w,t,e):this.push(u,1,0)},m.string=function(e){var t=v.length(e);return t?this.uint32(t).push(v.write,t,e):this.push(u,1,0)},m.fork=function(){return this.states=new s(this),this.head=this.tail=new n(i,0,0),this.len=0,this},m.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(i,0,0),this.len=0),this},m.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},m.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t}},{33:33,36:36}],36:[function(e,t){function r(){i.call(this)}function n(e,t,r){e.length<40?o.utf8.write(e,t,r):t.utf8Write(e,r)}t.exports=r;var i=e(35),s=r.prototype=Object.create(i.prototype);s.constructor=r;var o=e(33),u=o.Buffer;r.alloc=function(e){return(r.alloc=u.allocUnsafe)(e)};var f=u&&u.prototype instanceof Uint8Array&&"set"===u.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n<e.length;)t[r++]=e[n++]};s.bytes=function(e){"string"==typeof e&&(e=u.from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this.push(f,t,e),this},s.string=function(e){var t=u.byteLength(e);return this.uint32(t),t&&this.push(n,t,e),this}},{33:33,35:35}],37:[function(t,r,n){function i(e,t,r){return"function"==typeof t?(r=t,t=new u.Root):t||(t=new u.Root),t.load(e,r)}function s(e,t){return t||(t=new u.Root),t.loadSync(e)}function o(){u.Reader.i()}var u=e.protobuf=n;u.load=i,u.loadSync=s,u.roots={};try{u.tokenize=t("./tokenize"),u.parse=t("./parse"),u.common=t("./common")}catch(e){}u.Writer=t(35),u.BufferWriter=t(36),u.Reader=t(23),u.BufferReader=t(24),u.encoder=t(14),u.decoder=t(13),u.verifier=t(34),u.converter=t(12),u.ReflectionObject=t(21),u.Namespace=t(20),u.Root=t(25),u.Enum=t(15),u.Type=t(29),u.Field=t(16),u.OneOf=t(22),u.MapField=t(17),u.Service=t(28),u.Method=t(19),u.Class=t(11),u.Message=t(18),u.types=t(30),u.rpc=t(26),u.util=t(31),u.configure=o,"function"==typeof define&&define.amd&&define(["long"],function(e){return e&&(u.util.Long=e,o()),u})},{11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,28:28,29:29,30:30,31:31,34:34,35:35,36:36,undefined:t}]},{},[37])}("object"==typeof window&&window||"object"==typeof self&&self||this);
//# sourceMappingURL=protobuf.min.js.map
/*!
* protobuf.js v6.5.0 (c) 2016, Daniel Wirtz
* Compiled Tue, 17 Jan 2017 04:40:35 UTC
* protobuf.js v6.5.1 (c) 2016, Daniel Wirtz
* Compiled Wed, 18 Jan 2017 02:28:43 UTC
* Licensed under the BSD-3-Clause License
* see: https://github.com/dcodeIO/protobuf.js for details
*/
!function(e,t){"use strict";!function e(t,r,n){function i(o,u){if(!r[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(s)return s(o,!0);var f=Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=r[o]={exports:{}};t[o][0].call(l.exports,function(e){var r=t[o][1][e];return i(r?r:e)},l,l.exports,e,t,r,n)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(e,t){function r(e,t){for(var r=[],n=2;n<arguments.length;)r.push(arguments[n++]);var i=!0;return new Promise(function(n,s){r.push(function(e){if(i)if(i=!1,e)s(e);else{for(var t=[],r=1;r<arguments.length;)t.push(arguments[r++]);n.apply(null,t)}});try{e.apply(t||this,r)}catch(e){i&&(i=!1,s(e))}})}t.exports=r},{}],2:[function(e,r,n){var i=n;i.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var s=Array(64),o=Array(123),u=0;u<64;)o[s[u]=u<26?u+65:u<52?u+71:u<62?u-4:u-59|43]=u++;i.encode=function(e,t,r){for(var n,i=[],o=0,u=0;t<r;){var a=e[t++];switch(u){case 0:i[o++]=s[a>>2],n=(3&a)<<4,u=1;break;case 1:i[o++]=s[n|a>>4],n=(15&a)<<2,u=2;break;case 2:i[o++]=s[n|a>>6],i[o++]=s[63&a],u=0}}return u&&(i[o++]=s[n],i[o]=61,1===u&&(i[o+1]=61)),String.fromCharCode.apply(String,i)};var a="invalid encoding";i.decode=function(e,r,n){for(var i,s=n,u=0,f=0;f<e.length;){var l=e.charCodeAt(f++);if(61===l&&u>1)break;if((l=o[l])===t)throw Error(a);switch(u){case 0:i=l,u=1;break;case 1:r[n++]=i<<2|(48&l)>>4,i=l,u=2;break;case 2:r[n++]=(15&i)<<4|(60&l)>>2,i=l,u=3;break;case 3:r[n++]=(3&i)<<6|l,u=0}}if(1===u)throw Error(a);return n-s},i.test=function(e){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e)}},{}],3:[function(e,r){function n(){function e(){for(var t=[],r=0;r<arguments.length;)t.push(arguments[r++]);var n=i.apply(null,t),l=p;if(c.length){var h=c[c.length-1];s.test(h)?l=++p:a.test(h)&&++l,u.test(h)&&!u.test(n)?(l=++p,d=!0):d&&f.test(h)&&(l=--p,d=!1),o.test(n)&&(l=--p)}for(r=0;r<l;++r)n="\t"+n;return c.push(n),e}function r(e){return"function"+(e?" "+e.replace(/[^\w_$]/g,"_"):"")+"("+h.join(",")+") {\n"+c.join("\n")+"\n}"}function l(r,i){"object"==typeof r&&(i=r,r=t);var s=e.str(r);n.verbose&&console.log("--- codegen ---\n"+s.replace(/^/gm,"> ").replace(/\t/g," "));var o=Object.keys(i||(i={}));return Function.apply(null,o.concat("return "+s)).apply(null,o.map(function(e){return i[e]}))}for(var h=[],c=[],p=1,d=!1,y=0;y<arguments.length;)h.push(arguments[y++]);return e.str=r,e.eof=l,e}function i(e){for(var t=[],r=1;r<arguments.length;)t.push(arguments[r++]);if(r=0,e=e.replace(/%([dfjs])/g,function(e,n){switch(n){case"d":return Math.floor(t[r++]);case"f":return+t[r++];case"j":return JSON.stringify(t[r++]);default:return t[r++]}}),r!==t.length)throw Error("argument count mismatch");return e}r.exports=n;var s=/[{[]$/,o=/^[}\]]/,u=/:$/,a=/^\s*(?:if|}?else if|while|for)\b|\b(?:else)\s*$/,f=/\b(?:break|continue)(?: \w+)?;?$|^\s*return\b/;n.sprintf=i,n.supported=!1;try{n.supported=1===n("a","b")("return a-b").eof()(2,1)}catch(e){}n.verbose=!1},{}],4:[function(e,r){function n(){this.a={}}r.exports=n;var i=n.prototype;i.on=function(e,t,r){return(this.a[e]||(this.a[e]=[])).push({fn:t,ctx:r||this}),this},i.off=function(e,r){if(e===t)this.a={};else if(r===t)this.a[e]=[];else for(var n=this.a[e],i=0;i<n.length;)n[i].fn===r?n.splice(i,1):++i;return this},i.emit=function(e){var t=this.a[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},{}],5:[function(e,t){function r(e){for(var t=Object.keys(this),r=0;r<t.length;++r)e[t[r]]=this[t[r]];var n=e.prototype=Object.create(this.prototype);return n.constructor=e,n}t.exports=r},{}],6:[function(e,r){function n(e,t){return t?u&&u.readFile?u.readFile(e,"utf8",function(r,n){return r&&"undefined"!=typeof XMLHttpRequest?i(e,t):t(r,n)}):i(e,t):s(n,this,e)}function i(e,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)):t},n.open("GET",e),n.send()}r.exports=n;var s=e(1),o=e(7),u=o("fs")},{1:1,7:7}],7:[function(e,t,r){function n(e){try{var t=eval("quire".replace(/^/,"re"))(e);if(t&&(t.length||Object.keys(t).length))return t}catch(e){}return null}t.exports=n},{}],8:[function(e,t,r){var n=r,i=n.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},s=n.normalize=function(e){e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var t=e.split("/"),r=i(e),n="";r&&(n=t.shift()+"/");for(var s=0;s<t.length;)".."===t[s]?s>0?t.splice(--s,2):r?t.splice(s,1):++s:"."===t[s]?t.splice(s,1):++s;return n+t.join("/")};n.resolve=function(e,t,r){return r||(t=s(t)),i(t)?t:(r||(e=s(e)),(e=e.replace(/(?:\/|^)[^\/]+$/,"")).length?s(e+"/"+t):t)}},{}],9:[function(e,t){function r(e,t,r){var n=r||8192,i=n>>>1,s=null,o=n;return function(r){if(r<1||r>i)return e(r);o+r>n&&(s=e(n),o=0);var u=t.call(s,o,o+=r);return 7&o&&(o=(7|o)+1),u}}t.exports=r},{}],10:[function(e,t,r){var n=r;n.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)r=e.charCodeAt(n),r<128?t+=1:r<2048?t+=2:55296===(64512&r)&&56320===(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},n.read=function(e,t,r){var n=r-t;if(n<1)return"";for(var i,s=null,o=[],u=0;t<r;)i=e[t++],i<128?o[u++]=i:i>191&&i<224?o[u++]=(31&i)<<6|63&e[t++]:i>239&&i<365?(i=((7&i)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[u++]=55296+(i>>10),o[u++]=56320+(1023&i)):o[u++]=(15&i)<<12|(63&e[t++])<<6|63&e[t++],u>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),u=0);return s?(u&&s.push(String.fromCharCode.apply(String,o.slice(0,u))),s.join("")):u?String.fromCharCode.apply(String,o.slice(0,u)):""},n.write=function(e,t,r){for(var n,i,s=r,o=0;o<e.length;++o)n=e.charCodeAt(o),n<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=63&n|128):55296===(64512&n)&&56320===(64512&(i=e.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&i),++o,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-s}},{}],11:[function(e,t){function r(e){return n(e)}function n(t,n){if(i||(i=e(32)),!(t instanceof i))throw TypeError("type must be a Type");if(n){if("function"!=typeof n)throw TypeError("ctor must be a function")}else n=o.codegen("p")("return ctor.call(this,p)").eof(t.name,{ctor:s});n.constructor=r;var u=n.prototype=new s;return u.constructor=n,o.merge(n,s,!0),n.$type=t,u.$type=t,t.fieldsArray.forEach(function(e){u[e.name]=Array.isArray(e.resolve().defaultValue)?o.emptyArray:o.isObject(e.defaultValue)&&!e.long?o.emptyObject:e.defaultValue}),t.oneofsArray.forEach(function(e){Object.defineProperty(u,e.resolve().name,{get:o.oneOfGetter(e.oneof),set:o.oneOfSetter(e.oneof)})}),t.ctor=n,u}t.exports=r;var i,s=e(19),o=e(34);r.create=n,r.prototype=s},{19:19,32:32,34:34}],12:[function(e,t){function r(e,t){/\/|\./.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),r[e]=t}t.exports=r,r("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var n;r("duration",{Duration:n={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),r("timestamp",{Timestamp:n}),r("empty",{Empty:{fields:{}}}),r("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),r("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}})},{}],13:[function(e,t,r){function n(e,t,r,n){if(t.resolvedType)if(t.resolvedType instanceof o){var i=t.resolvedType.values;e("switch(d%s){",n),Object.keys(i).forEach(function(r){t.repeated&&i[r]===t.typeDefault&&e("default:"),e("case%j:",r)("case %j:",i[r])("m%s=%j",n,i[r])("break")}),e("}")}else e("m%s=types[%d].fromObject(d%s)",n,r,n);else{var s=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",n,n);break;case"uint64":s=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,s)('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,s?"true":"");break;case"bytes":e('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&&d%s.length)",n,n)("m%s=d%s",n,n);break;case"string":e("m%s=String(d%s)",n,n);break;case"bool":e("m%s=Boolean(d%s)",n,n)}}return e}function i(e,t,r,n){if(t.resolvedType)t.resolvedType instanceof o?e("d%s=o.enums===String?types[%d].values[m%s]:m%s",n,r,n,n):e("d%s=types[%d].toObject(m%s,o)",n,r,n);else{var i=!1;switch(t.type){case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('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,i?"true":"",n);break;case"bytes":e("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:e("d%s=m%s",n,n)}}return e}var s=r,o=e(16),u=e(34);s.fromObject=function(e){var t=e.fieldsArray;if(!t.length)return u.codegen()("return new(this.ctor)");for(var r=u.codegen("d")("var m=new(this.ctor)"),i=0;i<t.length;++i){var s=t[i].resolve(),a=u.safeProp(s.name);s.map?(r("if(d%s){",a)("m%s={}",a)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",a),n(r,s,i,a+"[ks[i]]")("}")("}")):s.repeated?(r("if(d%s){",a)("m%s=[]",a)("for(var i=0;i<d%s.length;++i){",a),n(r,s,i,a+"[i]")("}")("}")):(s.resolvedType instanceof o||r("if(d%s!==undefined&&d%s!==null){",a,a),n(r,s,i,a),s.resolvedType instanceof o||r("}"))}return r("return m")},s.toObject=function(e){var t=e.fieldsArray;if(!t.length)return u.codegen()("return {}");var r=u.codegen("m","o")("if(!o)")("o={}")("var d={}"),n=t.filter(function(e){return e.resolve().repeated});n.length&&(r("if(o.arrays||o.defaults){"),n.forEach(function(e){r("d%s=[]",u.safeProp(e.name))}),r("}"));var s=t.filter(function(e){return e.map});s.length&&(r("if(o.objects||o.defaults){"),s.forEach(function(e){r("d%s={}",u.safeProp(e.name))}),r("}"));var a=t.filter(function(e){return!(e.repeated||e.map)});a.length&&(r("if(o.defaults){"),a.forEach(function(e){var t=u.safeProp(e.name);e.resolvedType instanceof o?r("d%s=o.enums===String?%j:%j",t,e.resolvedType.valuesById[e.typeDefault],e.typeDefault):e.long?r("if(util.Long){")("var n=new util.Long(%d,%d,%j)",e.typeDefault.low,e.typeDefault.high,e.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",t)("}else")("d%s=o.longs===String?%j:%d",t,""+e.typeDefault,e.typeDefault.toNumber()):e.bytes?r("d%s=o.bytes===String?%j:%s",t,String.fromCharCode.apply(String,e.typeDefault),"["+Array.prototype.slice.call(e.typeDefault).join(",")+"]"):r("d%s=%j",t,e.typeDefault)}),r("}"));for(var f=0;f<t.length;++f){var l=t[f],h=u.safeProp(l.name);r("if(m%s!==undefined&&m%s!==null&&m.hasOwnProperty(%j)){",h,h,l.name),l.map?(r("d%s={}",h)("for(var ks2=Object.keys(m%s),j=0;j<ks2.length;++j){",h),i(r,l,f,h+"[ks2[j]]")("}")):l.repeated?(r("d%s=[]",h)("for(var j=0;j<m%s.length;++j){",h),i(r,l,f,h+"[j]")("}")):i(r,l,f,h),r("}")}return r("return d")}},{16:16,34:34}],14:[function(e,r){function n(e){var r=e.fieldsArray,u=o.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()");e.group&&u("if((t&7)===4)")("break"),u("switch(t>>>3){");for(var a=0;a<r.length;++a){var f=r[a].resolve(),l=f.resolvedType instanceof i?"uint32":f.type,h="m"+o.safeProp(f.name);u("case %d:",f.id),f.map?(u("r.skip().pos++")("if(%s===util.emptyObject)",h)("%s={}",h)("var k=r.%s()",f.keyType)("r.pos++"),s.basic[l]===t?u('%s[typeof k==="object"?util.longToHash(k):k]=types[%d].decode(r,r.uint32())',h,a):u('%s[typeof k==="object"?util.longToHash(k):k]=r.%s()',h,l)):f.repeated?(u("if(!(%s&&%s.length))",h,h)("%s=[]",h),(n.compat||f.packed)&&s.packed[l]!==t&&u("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",h,l)("}else"),s.basic[l]===t?u(f.resolvedType.group?"%s.push(types[%d].decode(r))":"%s.push(types[%d].decode(r,r.uint32()))",h,a):u("%s.push(r.%s())",h,l)):s.basic[l]===t?u(f.resolvedType.group?"%s=types[%d].decode(r)":"%s=types[%d].decode(r,r.uint32())",h,a):u("%s=r.%s()",h,l),u("break")}return u("default:")("r.skipType(t&7)")("break")("}")("}")("return m")}r.exports=n,n.compat=!0;var i=e(16),s=e(33),o=e(34)},{16:16,33:33,34:34}],15:[function(e,r){function n(e,t,r,n){return t.resolvedType.group?e("types[%d].encode(%s,w.uint32(%d)).uint32(%d)",r,n,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%d].encode(%s,w.uint32(%d).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}function i(e){for(var r,i,a=e.fieldsArray,f=e.oneofsArray,l=u.codegen("m","w")("if(!w)")("w=Writer.create()"),r=0;r<a.length;++r){var h=a[r].resolve();if(!h.partOf){var c=h.resolvedType instanceof s?"uint32":h.type,p=o.basic[c];i="m"+u.safeProp(h.name),h.map?(l("if(%s&&m.hasOwnProperty(%j)){",i,h.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",i)("w.uint32(%d).fork().uint32(%d).%s(ks[i])",(h.id<<3|2)>>>0,8|o.mapKey[h.keyType],h.keyType),p===t?l("types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",r,i):l(".uint32(%d).%s(%s[ks[i]]).ldelim()",16|p,c,i),l("}")("}")):h.repeated?h.packed&&o.packed[c]!==t?l("if(%s&&%s.length&&m.hasOwnProperty(%j)){",i,i,h.name)("w.uint32(%d).fork()",(h.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",i)("w.%s(%s[i])",c,i)("w.ldelim()")("}"):(l("if(%s!==undefined&&m.hasOwnProperty(%j)){",i,h.name)("for(var i=0;i<%s.length;++i)",i),p===t?n(l,h,r,i+"[i]"):l("w.uint32(%d).%s(%s[i])",(h.id<<3|p)>>>0,c,i),l("}")):(h.required||(h.long?l("if(%s!==undefined&&%s!==null&&m.hasOwnProperty(%j))",i,i,h.name):h.bytes?l("if(%s&&m.hasOwnProperty(%j))",i,h.name):l("if(%s!==undefined&&m.hasOwnProperty(%j))",i,h.name)),p===t?n(l,h,r,i):l("w.uint32(%d).%s(%s)",(h.id<<3|p)>>>0,c,i))}}for(var r=0;r<f.length;++r){var d=f[r];l("switch(%s){","m"+u.safeProp(d.name));for(var y=d.fieldsArray,v=0;v<y.length;++v){var h=y[v],c=h.resolvedType instanceof s?"uint32":h.type,p=o.basic[c];i="m"+u.safeProp(h.name),l("case%j:",h.name),p===t?n(l,h,a.indexOf(h),i):l("w.uint32(%d).%s(%s)",(h.id<<3|p)>>>0,c,i),l("break")}l("}")}return l("return w")}r.exports=i;var s=e(16),o=e(33),u=e(34)},{16:16,33:33,34:34}],16:[function(e,r){function n(e,t,r){i.call(this,e,r),this.valuesById={},this.values=Object.create(this.valuesById),this.comments={};var n=this;Object.keys(t||{}).forEach(function(e){n.valuesById[n.values[e]=t[e]]=e})}r.exports=n;var i=e(22),s=i.extend(n);n.className="Enum";var o=e(34);n.testJSON=function(e){return!(!e||!e.values)},n.fromJSON=function(e,t){return new n(e,t.values,t.options)},s.toJSON=function(){return{options:this.options,values:this.values}},s.add=function(e,r,n){if(!o.isString(e))throw TypeError("name must be a string");if(!o.isInteger(r))throw TypeError("id must be an integer");if(this.values[e]!==t)throw Error("duplicate name '"+e+"' in "+this);if(this.valuesById[r]!==t)throw Error("duplicate id "+r+" in "+this);return this.valuesById[this.values[e]=r]=e,this.comments[e]=n||null,this},s.remove=function(e){if(!o.isString(e))throw TypeError("name must be a string");var r=this.values[e];if(r===t)throw Error("'"+e+"' is not a name of "+this);return delete this.valuesById[r],delete this.values[e],delete this.comments[e],this}},{22:22,34:34}],17:[function(e,r){function n(e,r,n,s,o,u){if(l.isObject(s)?(u=s,s=o=t):l.isObject(o)&&(u=o,o=t),i.call(this,e,u),!l.isInteger(r)||r<0)throw TypeError("id must be a non-negative integer");if(!l.isString(n))throw TypeError("type must be a string");if(o!==t&&!l.isString(o))throw TypeError("extend must be a string");if(s!==t&&!/^required|optional|repeated$/.test(s=(""+s).toLowerCase()))throw TypeError("rule must be a string rule");this.rule=s&&"optional"!==s?s:t,this.type=n,this.id=r,this.extend=o||t,this.required="required"===s,this.optional=!this.required,this.repeated="repeated"===s,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!l.Long&&f.long[n]!==t,this.bytes="bytes"===n,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.b=null}r.exports=n;var i=e(22),s=i.extend(n);n.className="Field";var o,u,a=e(16),f=e(33),l=e(34);Object.defineProperty(s,"packed",{get:function(){return null===this.b&&(this.b=this.getOption("packed")!==!1),this.b}}),s.setOption=function(e,t,r){return"packed"===e&&(this.b=null),i.prototype.setOption.call(this,e,t,r)},n.testJSON=function(e){return!(!e||e.id===t)},n.fromJSON=function(r,i){return i.keyType!==t?(u||(u=e(18)),u.fromJSON(r,i)):new n(r,i.id,i.type,i.rule,i.extend,i.options)},s.toJSON=function(){return{rule:"optional"!==this.rule&&this.rule||t,type:this.type,id:this.id,extend:this.extend,options:this.options}},s.resolve=function(){if(this.resolved)return this;if((this.typeDefault=f.defaults[this.type])===t)if(o||(o=e(32)),this.resolvedType=this.parent.lookup(this.type,o))this.typeDefault=null;else{if(!(this.resolvedType=this.parent.lookup(this.type,a)))throw Error("unresolvable field type: "+this.type);this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]}if(this.options&&this.options.default!==t&&(this.typeDefault=this.options.default,this.resolvedType instanceof a&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.long)this.typeDefault=l.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;l.base64.test(this.typeDefault)?l.base64.decode(this.typeDefault,r=l.newBuffer(l.base64.length(this.typeDefault)),0):l.utf8.write(this.typeDefault,r=l.newBuffer(l.utf8.length(this.typeDefault)),0),this.typeDefault=r}return this.map?this.defaultValue={}:this.repeated?this.defaultValue=[]:this.defaultValue=this.typeDefault,i.prototype.resolve.call(this)}},{16:16,18:18,22:22,32:32,33:33,34:34}],18:[function(e,r){function n(e,t,r,n,s){if(i.call(this,e,t,n,s),!a.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}r.exports=n;var i=e(17),s=i.prototype,o=i.extend(n);n.className="MapField";var u=e(33),a=e(34);n.testJSON=function(e){return i.testJSON(e)&&e.keyType!==t},n.fromJSON=function(e,t){return new n(e,t.id,t.keyType,t.type,t.options)},o.toJSON=function(){return{keyType:this.keyType,type:this.type,id:this.id,extend:this.extend,options:this.options}},o.resolve=function(){if(this.resolved)return this;if(u.mapKey[this.keyType]===t)throw Error("invalid key type: "+this.keyType);return s.resolve.call(this)}},{17:17,33:33,34:34}],19:[function(e,t){function r(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}t.exports=r;var n=e(34);r.encode=function(e,t){return this.$type.encode(e,t)},r.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},r.decode=function(e){return this.$type.decode(e)},r.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},r.verify=function(e){return this.$type.verify(e)},r.fromObject=function(e){return this.$type.fromObject(e)},r.from=r.fromObject,r.toObject=function(e,t){return this.$type.toObject(e,t)},r.prototype.toObject=function(e){return this.$type.toObject(this,e)},r.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},{34:34}],20:[function(e,r){function n(e,r,n,s,o,a,f){if(u.isObject(o)?(f=o,o=a=t):u.isObject(a)&&(f=a,a=t),r&&!u.isString(r))throw TypeError("type must be a string");if(!u.isString(n))throw TypeError("requestType must be a string");if(!u.isString(s))throw TypeError("responseType must be a string");i.call(this,e,f),this.type=r||"rpc",this.requestType=n,this.requestStream=!!o||t,this.responseType=s,this.responseStream=!!a||t,this.resolvedRequestType=null,this.resolvedResponseType=null}r.exports=n;var i=e(22),s=i.extend(n);n.className="Method";var o=e(32),u=e(34);n.testJSON=function(e){return!(!e||e.requestType===t)},n.fromJSON=function(e,t){return new n(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options)},s.toJSON=function(){return{type:"rpc"!==this.type&&this.type||t,requestType:this.requestType,requestStream:this.requestStream||t,responseType:this.responseType,responseStream:this.responseStream||t,options:this.options}},s.resolve=function(){if(this.resolved)return this;if(!(this.resolvedRequestType=this.parent.lookup(this.requestType,o)))throw Error("unresolvable request type: "+this.requestType);if(!(this.resolvedResponseType=this.parent.lookup(this.responseType,o)))throw Error("unresolvable response type: "+this.requestType);return i.prototype.resolve.call(this)}},{22:22,32:32,34:34}],21:[function(e,r){function n(){f||(f=e(32)),l||(l=e(30)),h=[p,f,l,d,s],c="one of "+h.map(function(e){return e.name}).join(", ")}function i(e){if(!e||!e.length)return t;for(var r={},n=0;n<e.length;++n)r[e[n].name]=e[n].toJSON();return r}function s(e,r){u.call(this,e,r),this.nested=t,this.c=null,this.d=[]}function o(e){e.c=null;for(var t=0;t<e.d.length;++t)delete e[e.d[t]];return e.d=[],e}r.exports=s;var u=e(22),a=u.extend(s);s.className="Namespace";var f,l,h,c,p=e(16),d=e(17),y=e(34);s.testJSON=function(e){return!(!e||e.fields||e.values||e.id!==t||e.oneof||e.methods||e.requestType!==t)},s.fromJSON=function(e,t){return new s(e,t.options).addJSON(t.nested)},s.arrayToJSON=i,Object.defineProperty(a,"nestedArray",{get:function(){return this.c||(this.c=y.toArray(this.nested))}}),a.toJSON=function(){return{options:this.options,nested:i(this.nestedArray)}},a.addJSON=function(e){var t=this;return e&&(h||n(),Object.keys(e).forEach(function(r){for(var n=e[r],i=0;i<h.length;++i)if(h[i].testJSON(n))return t.add(h[i].fromJSON(r,n));throw TypeError("nested."+r+" must be JSON for "+c)})),this},a.get=function(e){return this.nested===t?null:this.nested[e]||null},a.getEnum=function(e){if(this.nested&&this.nested[e]instanceof p)return this.nested[e].values;throw Error("no such enum")},a.add=function(e){if(h||n(),!e||h.indexOf(e.constructor)<0)throw TypeError("object must be "+c);if(e instanceof d&&e.extend===t)throw TypeError("object must be an extension field when not part of a type");if(this.nested){var r=this.get(e.name);if(r){if(!(r instanceof s&&e instanceof s)||r instanceof f||r instanceof l)throw Error("duplicate name '"+e.name+"' in "+this);for(var i=r.nestedArray,u=0;u<i.length;++u)e.add(i[u]);this.remove(r),this.nested||(this.nested={}),e.setOptions(r.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),o(this)},a.remove=function(e){if(!(e instanceof u))throw TypeError("object must be a ReflectionObject");if(e.parent!==this||!this.nested)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=t),e.onRemove(this),o(this)},a.define=function(e,r){y.isString(e)?e=e.split("."):Array.isArray(e)||(r=e,e=t);var n=this;if(e)for(;e.length>0;){var i=e.shift();if(n.nested&&n.nested[i]){if(n=n.nested[i],!(n instanceof s))throw Error("path conflicts with non-namespace objects")}else n.add(n=new s(i))}return r&&n.addJSON(r),n},a.resolve=function(){f||(f=e(32)),l||(f=e(30));for(var t=this.nestedArray,r=0;r<t.length;++r)if(/^[A-Z]/.test(t[r].name)){if(t[r]instanceof f||t[r]instanceof l)this[t[r].name]=t[r];else{if(!(t[r]instanceof p))continue;this[t[r].name]=t[r].values}this.d.push(t[r].name)}return u.prototype.resolve.call(this)},a.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof s?e[t++].resolveAll():e[t++].resolve();return a.resolve.call(this)},a.lookup=function(e,r,n){if("boolean"==typeof r&&(n=r,r=t),y.isString(e)&&e.length)e=e.split(".");else if(!e.length)return null;if(""===e[0])return this.root.lookup(e.slice(1),r);var i=this.get(e[0]);return i&&1===e.length&&(!r||i instanceof r)||i instanceof s&&(i=i.lookup(e.slice(1),r,!0))?i:null===this.parent||n?null:this.parent.lookup(e,r)},a.lookupType=function(t){f||(f=e(32));var r=this.lookup(t,f);if(!r)throw Error("no such type");return r},a.lookupService=function(t){l||(l=e(30));var r=this.lookup(t,l);if(!r)throw Error("no such service");return r},a.lookupEnum=function(e){var t=this.lookup(e,p);if(!t)throw Error("no such enum");return t.values}},{16:16,17:17,22:22,30:30,32:32,34:34}],22:[function(e,r){function n(e,t){if(!i.isString(e))throw TypeError("name must be a string");if(t&&!i.isObject(t))throw TypeError("options must be an object");this.options=t,this.name=e,this.parent=null,this.resolved=!1,this.comment=null}r.exports=n;var i=e(34);n.className="ReflectionObject",n.extend=i.extend;var s,o=n.prototype;Object.defineProperties(o,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),o.toJSON=function(){throw Error()},o.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var r=t.root;s||(s=e(27)),r instanceof s&&r.e(this)},o.onRemove=function(t){var r=t.root;s||(s=e(27)),r instanceof s&&r.f(this),this.parent=null,this.resolved=!1},o.resolve=function(){return this.resolved?this:(s||(s=e(27)),this.root instanceof s&&(this.resolved=!0),this)},o.getOption=function(e){return this.options?this.options[e]:t},o.setOption=function(e,r,n){return n&&this.options&&this.options[e]!==t||((this.options||(this.options={}))[e]=r),this},o.setOptions=function(e,t){return e&&Object.keys(e).forEach(function(r){this.setOption(r,e[r],t)},this),this},o.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e}},{27:27,34:34}],23:[function(e,r){function n(e,r,n){if(Array.isArray(r)||(n=r,r=t),s.call(this,e,n),r&&!Array.isArray(r))throw TypeError("fieldNames must be an Array");this.oneof=r||[],this.g=[]}function i(e){e.parent&&e.g.forEach(function(t){t.parent||e.parent.add(t)})}r.exports=n;var s=e(22),o=s.extend(n);n.className="OneOf";var u=e(17);Object.defineProperty(o,"fieldsArray",{get:function(){return this.g}}),n.testJSON=function(e){return!!e.oneof},n.fromJSON=function(e,t){return new n(e,t.oneof,t.options)},o.toJSON=function(){return{oneof:this.oneof,options:this.options}},o.add=function(e){if(!(e instanceof u))throw TypeError("field must be a Field");return e.parent&&e.parent.remove(e),this.oneof.push(e.name),this.g.push(e),e.partOf=this,i(this),this},o.remove=function(e){if(!(e instanceof u))throw TypeError("field must be a Field");var t=this.g.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.g.splice(t,1),t=this.oneof.indexOf(e.name),t>-1&&this.oneof.splice(t,1),e.parent&&e.parent.remove(e),e.partOf=null,this},o.onAdd=function(e){s.prototype.onAdd.call(this,e);var t=this;this.oneof.forEach(function(r){var n=e.get(r);n&&!n.partOf&&(n.partOf=t,t.g.push(n))}),i(this)},o.onRemove=function(e){this.g.forEach(function(e){e.parent&&e.parent.remove(e)}),s.prototype.onRemove.call(this,e)}},{17:17,22:22}],24:[function(e,r){function n(e){return/^[a-zA-Z_][a-zA-Z_0-9]*$/.test(e)}function i(e){return/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/.test(e)}function s(e){return/^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/.test(e)}function o(e){return null===e?null:e.toLowerCase()}function u(e){return e.substring(0,1)+e.substring(1).replace(/_([a-z])(?=[a-z]|$)/g,function(e,t){return t.toUpperCase()})}function a(e,r,w){function O(e,t){var r=a.filename;return a.filename=null,Error("illegal "+(t||"token")+" '"+e+"' ("+(r?r+", ":"")+"line "+K.line()+")")}function k(){var e,t=[];do{if('"'!==(e=G())&&"'"!==e)throw O(e);t.push(G()),Y(e),e=Q()}while('"'===e||"'"===e);return t.join("")}function x(e){var t=G();switch(o(t)){case"'":case'"':return X(t),k();case"true":return!0;case"false":return!1}try{return S(t)}catch(r){if(e&&i(t))return t;throw O(t,"value")}}function j(){var e=A(G()),t=e;return Y("to",!0)&&(t=A(G())),Y(";"),[e,t]}function S(e){var t=1;"-"===e.charAt(0)&&(t=-1,e=e.substring(1));var r=o(e);switch(r){case"inf":return t*(1/0);case"nan":return NaN;case"0":return 0}if(/^[1-9][0-9]*$/.test(e))return t*parseInt(e,10);if(/^0[x][0-9a-f]+$/.test(r))return t*parseInt(e,16);if(/^0[0-7]+$/.test(e))return t*parseInt(e,8);if(/^(?!e)[0-9]*(?:\.[0-9]*)?(?:[e][+-]?[0-9]+)?$/.test(r))return t*parseFloat(e);throw O(e,"number")}function A(e,t){var r=o(e);switch(r){case"max":return 536870911;case"0":return 0}if("-"===e.charAt(0)&&!t)throw O(e,"id");if(/^-?[1-9][0-9]*$/.test(e))return parseInt(e,10);if(/^-?0[x][0-9a-f]+$/.test(r))return parseInt(e,16);if(/^-?0[0-7]+$/.test(e))return parseInt(e,8);throw O(e,"id")}function N(){if(H!==t)throw O("package");if(H=G(),!i(H))throw O(H,"name");ie=ie.define(H),Y(";")}function T(){var e,t=Q();switch(t){case"weak":e=Z||(Z=[]),G();break;case"public":G();default:e=_||(_=[])}t=k(),Y(";"),e.push(t)}function E(){if(Y("="),W=o(k()),re="proto3"===W,!re&&"proto2"!==W)throw O(W,"syntax");Y(";")}function J(e,t){switch(t){case"option":return F(e,t),Y(";"),!0;case"message":return D(e,t),!0;case"enum":return B(e,t),!0;case"service":return C(e,t),!0;case"extend":return U(e,t),!0}return!1}function D(e,t){var r=G();if(!n(r))throw O(r,"type name");var s=new h(r);if(s.comment=ee(),Y("{",!0)){for(;"}"!==(t=G());){var u=o(t);if(!J(s,t))switch(u){case"map":$(s,u);break;case"required":case"optional":case"repeated":L(s,u);break;case"oneof":q(s,u);break;case"extensions":(s.extensions||(s.extensions=[])).push(j(s,u));break;case"reserved":(s.reserved||(s.reserved=[])).push(j(s,u));break;default:if(!re||!i(t))throw O(t);X(t),L(s,"optional")}}Y(";",!0)}else Y(";");e.add(s)}function L(e,r,s){var o=G();if("group"===o)return z(e,r),t;if(!i(o))throw O(o,"type");var u=G();if(!n(u))throw O(u,"name");u=se(u),Y("=");var a=new c(u,A(G()),o,r,s),f=K.line();a.comment=ee(),R(a),a.comment||(a.comment=ee(f)),a.repeated&&g.packed[o]!==t&&!re&&a.setOption("packed",!1,!0),e.add(a)}function z(e,t){var r=G();if(!n(r))throw O(r,"name");var i=b.lcFirst(r);r===i&&(r=b.ucFirst(r)),Y("=");var s=A(G()),u=new h(r);u.group=!0,u.comment=ee();var a=new c(i,s,r,t);for(Y("{");"}"!==(ne=G());)switch(ne=o(ne)){case"option":F(u,ne),Y(";");break;case"required":case"optional":case"repeated":L(u,ne);break;default:throw O(ne)}Y(";",!0),e.add(u).add(a)}function $(e){Y("<");var r=G();if(g.mapKey[r]===t)throw O(r,"type");Y(",");var s=G();if(!i(s))throw O(s,"type");Y(">");var o=G();if(!n(o))throw O(o,"name");o=se(o),Y("=");var u=new p(o,A(G()),r,s),a=K.line();u.comment=ee(),R(u),u.comment||(u.comment=ee(a)),e.add(u)}function q(e,t){var r=G();if(!n(r))throw O(r,"name");r=se(r);var i=new d(r),s=K.line();if(i.comment=ee(),Y("{",!0)){for(;"}"!==(t=G());)"option"===t?(F(i,t),Y(";")):(X(t),L(i,"optional"));Y(";",!0)}else Y(";"),i.comment||(i.comment=ee(s));e.add(i)}function B(e,t){var r=G();if(!n(r))throw O(r,"name");var i=new y(r);if(i.comment=ee(),
Y("{",!0)){for(;"}"!==(t=G());)"option"===o(t)?(F(i,t),Y(";")):I(i,t);Y(";",!0)}else Y(";");e.add(i)}function I(e,t){if(!n(t))throw O(t,"name");var r=t;Y("=");var i=A(G(),!0),s=K.line();e.add(r,i,ee()),R({}),e.comments[r]||(e.comments[r]=ee(s))}function F(e,t){var r=Y("(",!0),n=G();if(!i(n))throw O(n,"name");r&&(Y(")"),n="("+n+")",t=Q(),s(t)&&(n+=t,G())),Y("="),V(e,n)}function V(e,t){if(Y("{",!0))for(;"}"!==(ne=G());){if(!n(ne))throw O(ne,"name");Y(":",!0)?P(e,t+"."+ne,x(!0)):V(e,t+"."+ne)}else P(e,t,x(!0))}function P(e,t,r){e.setOption?e.setOption(t,r):e[t]=r}function R(e){if(Y("[",!0)){do F(e,"option");while(Y(",",!0));Y("]")}return Y(";"),e}function C(e,t){if(t=G(),!n(t))throw O(t,"service name");var r=t,i=new v(r);if(i.comment=ee(),Y("{",!0)){for(;"}"!==(t=G());){var s=o(t);switch(s){case"option":F(i,s),Y(";");break;case"rpc":M(i,s);break;default:throw O(t)}}Y(";",!0)}else Y(";");e.add(i)}function M(e,t){var r=t,s=G();if(!n(s))throw O(s,"name");var u,a,f,l;Y("(");var h;if(Y(h="stream",!0)&&(a=!0),!i(t=G()))throw O(t);if(u=t,Y(")"),Y("returns"),Y("("),Y(h,!0)&&(l=!0),!i(t=G()))throw O(t);f=t,Y(")");var c=new m(s,r,u,f,a,l),p=K.line();if(c.comment=ee(),Y("{",!0)){for(;"}"!==(t=G());){var d=o(t);switch(d){case"option":F(c,d),Y(";");break;default:throw O(t)}}Y(";",!0)}else Y(";"),c.comment||(c.comment=ee(p));e.add(c)}function U(e,t){var r=G();if(!i(r))throw O(r,"reference");if(Y("{",!0)){for(;"}"!==(t=G());){var n=o(t);switch(n){case"required":case"repeated":case"optional":L(e,n,r);break;default:if(!re||!i(t))throw O(t);X(t),L(e,"optional",r)}}Y(";",!0)}else Y(";")}r instanceof l||(w=r,r=new l),w||(w=a.defaults);var H,_,Z,W,K=f(e),G=K.next,X=K.push,Q=K.peek,Y=K.skip,ee=K.cmnt,te=!0,re=!1;r||(r=new l);for(var ne,ie=r,se=w.keepCase?function(e){return e}:u;null!==(ne=G());){var oe=o(ne);switch(oe){case"package":if(!te)throw O(ne);N();break;case"import":if(!te)throw O(ne);T();break;case"syntax":if(!te)throw O(ne);E();break;case"option":if(!te)throw O(ne);F(ie,ne),Y(";");break;default:if(J(ie,ne)){te=!1;continue}throw O(ne)}}return a.filename=null,{package:H,imports:_,weakImports:Z,syntax:W,root:r}}r.exports=a,a.filename=null,a.defaults={keepCase:!1};var f=e(31),l=e(27),h=e(32),c=e(17),p=e(18),d=e(23),y=e(16),v=e(30),m=e(20),g=e(33),b=e(34)},{16:16,17:17,18:18,20:20,23:23,27:27,30:30,31:31,32:32,33:33,34:34}],25:[function(e,t){function r(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function n(e){this.buf=e,this.pos=0,this.len=e.length}function i(){var e=new w(0,0),t=0;if(this.len-this.pos>4){for(t=0;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e}else{for(t=0;t<4;++t){if(this.pos>=this.len)throw r(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}if(this.pos>=this.len)throw r(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e}if(this.len-this.pos>4){for(t=0;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(t=0;t<5;++t){if(this.pos>=this.len)throw r(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function s(){return i.call(this).toLong()}function o(){return i.call(this).toNumber()}function u(){return i.call(this).toLong(!0)}function a(){return i.call(this).toNumber(!0)}function f(){return i.call(this).zzDecode().toLong()}function l(){return i.call(this).zzDecode().toNumber()}function h(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function c(){if(this.pos+8>this.len)throw r(this,8);return new w(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}function p(){return c.call(this).toLong(!0)}function d(){return c.call(this).toNumber(!0)}function y(){return c.call(this).zzDecode().toLong()}function v(){return c.call(this).zzDecode().toNumber()}function m(){b.Long?(k.int64=s,k.uint64=u,k.sint64=f,k.fixed64=p,k.sfixed64=y):(k.int64=o,k.uint64=a,k.sint64=l,k.fixed64=d,k.sfixed64=v)}t.exports=n;var g,b=e(36),w=b.LongBits,O=b.utf8;n.create=b.Buffer?function(t){return g||(g=e(26)),(n.create=function(e){return b.Buffer.isBuffer(e)?new g(e):new n(e)})(t)}:function(e){return new n(e)};var k=n.prototype;k.h=b.Array.prototype.subarray||b.Array.prototype.slice,k.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,r(this,10);return e}}(),k.int32=function(){return 0|this.uint32()},k.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},k.bool=function(){return 0!==this.uint32()},k.fixed32=function(){if(this.pos+4>this.len)throw r(this,4);return h(this.buf,this.pos+=4)},k.sfixed32=function(){var e=this.fixed32();return e>>>1^-(1&e)};var x="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],e[0]}:function(r,n){return t[3]=r[n],t[2]=r[n+1],t[1]=r[n+2],t[0]=r[n+3],e[0]}}():function(e,t){var r=h(e,t+4),n=2*(r>>31)+1,i=r>>>23&255,s=8388607&r;return 255===i?s?NaN:n*(1/0):0===i?1.401298464324817e-45*n*s:n*Math.pow(2,i-150)*(s+8388608)};k.float=function(){if(this.pos+4>this.len)throw r(this,4);var e=x(this.buf,this.pos);return this.pos+=4,e};var j="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],t[4]=r[n+4],t[5]=r[n+5],t[6]=r[n+6],t[7]=r[n+7],e[0]}:function(r,n){return t[7]=r[n],t[6]=r[n+1],t[5]=r[n+2],t[4]=r[n+3],t[3]=r[n+4],t[2]=r[n+5],t[1]=r[n+6],t[0]=r[n+7],e[0]}}():function(e,t){var r=h(e,t+4),n=h(e,t+8),i=2*(n>>31)+1,s=n>>>20&2047,o=4294967296*(1048575&n)+r;return 2047===s?o?NaN:i*(1/0):0===s?5e-324*i*o:i*Math.pow(2,s-1075)*(o+4503599627370496)};k.double=function(){if(this.pos+8>this.len)throw r(this,4);var e=j(this.buf,this.pos);return this.pos+=8,e},k.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw r(this,e);return this.pos+=e,t===n?new this.buf.constructor(0):this.h.call(this.buf,t,n)},k.string=function(){var e=this.bytes();return O.read(e,0,e.length)},k.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw r(this,e);this.pos+=e}else do if(this.pos>=this.len)throw r(this);while(128&this.buf[this.pos++]);return this},k.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){if(4===(e=7&this.uint32()))break;this.skipType(e)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},n.i=m,m()},{26:26,36:36}],26:[function(e,t){function r(e){n.call(this,e)}t.exports=r;var n=e(25),i=r.prototype=Object.create(n.prototype);i.constructor=r;var s=e(36);s.Buffer&&(i.h=s.Buffer.prototype.slice),i.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}},{25:25,36:36}],27:[function(e,r){function n(e){o.call(this,"",e),this.deferred=[],this.files=[]}function i(){}function s(e){var r=e.parent.lookup(e.extend);if(r){var n=new l(e.fullName,e.id,e.type,e.rule,t,e.options);return n.declaringField=e,e.extensionField=n,r.add(n),!0}return!1}r.exports=n;var o=e(21),u=o.extend(n);n.className="Root";var a,f,l=e(17),h=e(34);n.fromJSON=function(e,t){return t||(t=new n),t.setOptions(e.options).addJSON(e.nested)},u.resolvePath=h.path.resolve;var c=function(){try{a=e(24),f=e(12)}catch(e){}c=null};u.load=function e(r,n,s){function o(e,t){if(s){var r=s;s=null,r(e,t)}}function u(e,r){try{if(h.isString(r)&&"{"===r.charAt(0)&&(r=JSON.parse(r)),h.isString(r)){a.filename=e;var i=a(r,p,n);i.imports&&i.imports.forEach(function(t){l(p.resolvePath(e,t))}),i.weakImports&&i.weakImports.forEach(function(t){l(p.resolvePath(e,t),!0)})}else p.setOptions(r.options).addJSON(r.nested)}catch(e){if(d)throw e;return o(e),t}d||y||o(null,p)}function l(e,r){var n=e.lastIndexOf("google/protobuf/");if(n>-1){var i=e.substring(n);i in f&&(e=i)}if(!(p.files.indexOf(e)>-1)){if(p.files.push(e),e in f)return d?u(e,f[e]):(++y,setTimeout(function(){--y,u(e,f[e])})),t;if(d){var a;try{a=h.fs.readFileSync(e).toString("utf8")}catch(e){return r||o(e),t}u(e,a)}else++y,h.fetch(e,function(n,i){if(--y,s)return n?(r||o(n),t):(u(e,i),t)})}}c&&c(),"function"==typeof n&&(s=n,n=t);var p=this;if(!s)return h.asPromise(e,p,r);var d=s===i,y=0;return h.isString(r)&&(r=[r]),r.forEach(function(e){l(p.resolvePath("",e))}),d?p:(y||o(null,p),t)},u.loadSync=function(e,t){if(!h.isNode)throw Error("not supported");return this.load(e,t,i)},u.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(e){return"'extend "+e.extend+"' in "+e.parent.fullName}).join(", "));return o.prototype.resolveAll.call(this)},u.e=function(e){var r=this.deferred.slice();this.deferred=[];for(var n=0;n<r.length;)s(r[n])?r.splice(n,1):++n;if(this.deferred=r,e instanceof l&&e.extend!==t&&!e.extensionField&&!s(e)&&this.deferred.indexOf(e)<0)this.deferred.push(e);else if(e instanceof o){var i=e.nestedArray;for(n=0;n<i.length;++n)this.e(i[n])}},u.f=function(e){if(e instanceof l){if(e.extend!==t&&!e.extensionField){var r=this.deferred.indexOf(e);r>-1&&this.deferred.splice(r,1)}e.extensionField&&(e.extensionField.parent.remove(e.extensionField),e.extensionField=null)}else if(e instanceof o)for(var n=e.nestedArray,i=0;i<n.length;++i)this.f(n[i])}},{12:12,17:17,21:21,24:24,34:34}],28:[function(e,t,r){var n=r;n.Service=e(29)},{29:29}],29:[function(e,t){function r(e){n.call(this),this.$rpc=e}t.exports=r;var n=e(34).EventEmitter;(r.prototype=Object.create(n.prototype)).constructor=r,r.prototype.end=function(e){return this.$rpc&&(e||this.$rpc(null,null,null),this.$rpc=null,this.emit("end").off()),this}},{34:34}],30:[function(e,r){function n(e,t){s.call(this,e,t),this.methods={},this.j=null}function i(e){return e.j=null,e}r.exports=n;var s=e(21),o=s.prototype,u=s.extend(n);n.className="Service";var a=e(20),f=e(34),l=e(28);n.testJSON=function(e){return!(!e||!e.methods)},n.fromJSON=function(e,t){var r=new n(e,t.options);return t.methods&&Object.keys(t.methods).forEach(function(e){r.add(a.fromJSON(e,t.methods[e]))}),r},Object.defineProperty(u,"methodsArray",{get:function(){return this.j||(this.j=f.toArray(this.methods))}}),u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||t,methods:s.arrayToJSON(this.methodsArray)||{},nested:e&&e.nested||t}},u.get=function(e){return o.get.call(this,e)||this.methods[e]||null},u.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return o.resolve.call(this)},u.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof a?(this.methods[e.name]=e,e.parent=this,i(this)):o.add.call(this,e)},u.remove=function(e){if(e instanceof a){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,i(this)}return o.remove.call(this,e)},u.create=function(e,r,n){var i=new l.Service(e);return this.methodsArray.forEach(function(s){i[f.lcFirst(s.name)]=function(o,u){if(i.$rpc){if(!o)throw TypeError("request must not be null");s.resolve();var a;try{a=(r?s.resolvedRequestType.encodeDelimited(o):s.resolvedRequestType.encode(o)).finish()}catch(e){return("function"==typeof setImmediate?setImmediate:setTimeout)(function(){u(e)}),t}e(s,a,function(e,r){if(e)return i.emit("error",e,s),u?u(e):t;if(null===r)return i.end(!0),t;var o;try{o=n?s.resolvedResponseType.decodeDelimited(r):s.resolvedResponseType.decode(r)}catch(e){return i.emit("error",e,s),u?u("error",e):t}return i.emit("data",o,s),u?u(null,o):t})}}}),i}},{20:20,21:21,28:28,34:34}],31:[function(e,r){function n(e){return e.replace(/\\(.?)/g,function(e,t){switch(t){case"\\":case"":return t;case"0":return"\0";default:return t}})}function i(e){function r(e){return Error("illegal "+e+" (line "+v+")")}function i(){var t="'"===O?u:o;t.lastIndex=d-1;var i=t.exec(e);if(!i)throw r("string");return d=t.lastIndex,h(O),O=null,n(i[1])}function a(t){return e.charAt(t)}function f(t,r){m=e.charAt(t++),b=v,g=e.substring(t,r).split(/\n/g).map(function(e){return e.replace(/ *[*\/]+ */,"").trim()}).join("\n").trim()}function l(){if(w.length>0)return w.shift();if(O)return i();var t,n,o,u,l;do{if(d===y)return null;for(t=!1;/\s/.test(o=a(d));)if("\n"===o&&++v,++d===y)return null;if("/"===a(d)){if(++d===y)throw r("comment");if("/"===a(d)){for(l="/"===a(u=d+1);"\n"!==a(++d);)if(d===y)return null;++d,l&&f(u,d-1),++v,t=!0}else{if("*"!==(o=a(d)))return"/";l="*"===a(u=d+1);do{if("\n"===o&&++v,++d===y)return null;n=o,o=a(d)}while("*"!==n||"/"!==o);++d,l&&f(u,d-2),t=!0}}}while(t);if(d===y)return null;var h=d;s.lastIndex=0;var c=s.test(a(h++));if(!c)for(;h<y&&!s.test(a(h));)++h;var p=e.substring(d,d=h);return'"'!==p&&"'"!==p||(O=p),p}function h(e){w.push(e)}function c(){if(!w.length){var e=l();if(null===e)return null;h(e)}return w[0]}function p(e,t){var n=c(),i=n===e;if(i)return l(),!0;if(!t)throw r("token '"+n+"', '"+e+"' expected");return!1}e=""+e;var d=0,y=e.length,v=1,m=null,g=null,b=0,w=[],O=null;return{next:l,peek:c,push:h,skip:p,line:function(){return v},cmnt:function(e){var r;return e===t?r=b===v-1&&g||null:(g||c(),r=b===e&&"/"===m&&g||null),r&&(m=g=null,b=0),r}}}r.exports=i;var s=/[\s{}=;:[\],'"()<>]/g,o=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,u=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g},{}],32:[function(e,r){function n(e,r){s.call(this,e,r),this.fields={},this.oneofs=t,this.extensions=t,this.reserved=t,this.group=t,this.k=null,this.g=null,this.l=null,this.m=null}function i(e){return e.k=e.g=e.l=e.m=null,delete e.encode,delete e.decode,delete e.verify,e}r.exports=n;var s=e(21),o=s.prototype,u=s.extend(n);n.className="Type";var a=e(16),f=e(23),l=e(17),h=e(30),c=e(11),p=e(19),d=e(25),y=e(38),v=e(34),m=e(15),g=e(14),b=e(37),w=e(13),O=[a,n,l,h];n.testJSON=function(e){return!(!e||!e.fields)},n.fromJSON=function(e,r){var i=new n(e,r.options);return i.extensions=r.extensions,i.reserved=r.reserved,r.fields&&Object.keys(r.fields).forEach(function(e){i.add(l.fromJSON(e,r.fields[e]))}),r.oneofs&&Object.keys(r.oneofs).forEach(function(e){i.add(f.fromJSON(e,r.oneofs[e]))}),r.nested&&Object.keys(r.nested).forEach(function(e){for(var n=r.nested[e],s=0;s<O.length;++s)if(O[s].testJSON(n))return i.add(O[s].fromJSON(e,n)),t;throw Error("invalid nested object in "+i+": "+e)}),r.extensions&&r.extensions.length&&(i.extensions=r.extensions),r.reserved&&r.reserved.length&&(i.reserved=r.reserved),r.group&&(i.group=!0),i},Object.defineProperties(u,{fieldsById:{get:function(){if(this.k)return this.k;this.k={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var r=this.fields[e[t]],n=r.id;if(this.k[n])throw Error("duplicate id "+n+" in "+this);this.k[n]=r}return this.k}},fieldsArray:{get:function(){return this.g||(this.g=v.toArray(this.fields))}},oneofsArray:{get:function(){return this.l||(this.l=v.toArray(this.oneofs))}},ctor:{get:function(){return this.m||(this.m=c.create(this).constructor)},set:function(e){if(e&&!(e.prototype instanceof p))throw TypeError("ctor must be a Message constructor");e.from||(e.from=p.from),this.m=e}}}),u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||t,oneofs:s.arrayToJSON(this.oneofsArray),fields:s.arrayToJSON(this.fieldsArray.filter(function(e){return!e.declaringField}))||{},extensions:this.extensions&&this.extensions.length?this.extensions:t,reserved:this.reserved&&this.reserved.length?this.reserved:t,group:this.group||t,nested:e&&e.nested||t}},u.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var r=this.oneofsArray;for(t=0;t<r.length;)r[t++].resolve();return o.resolve.call(this)},u.get=function(e){return o.get.call(this,e)||this.fields&&this.fields[e]||this.oneofs&&this.oneofs[e]||null},u.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof l&&e.extend===t){if(this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),i(this)}return e instanceof f?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),i(this)):o.add.call(this,e)},u.remove=function(e){if(e instanceof l&&e.extend===t){if(this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.message=null,i(this)}return o.remove.call(this,e)},u.create=function(e){return new this.ctor(e)},u.setup=function(){var e=this.fullName,t=this.fieldsArray.map(function(e){return e.resolve().resolvedType});return this.encode=m(this).eof(e+"$encode",{Writer:y,types:t,util:v}),this.decode=g(this).eof(e+"$decode",{Reader:d,types:t,util:v}),this.verify=b(this).eof(e+"$verify",{types:t,util:v}),this.fromObject=this.from=w.fromObject(this).eof(e+"$fromObject",{types:t,util:v}),this.toObject=w.toObject(this).eof(e+"$toObject",{types:t,util:v}),this},u.encode=function(e,t){return this.setup().encode(e,t)},u.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},u.decode=function(e,t){return this.setup().decode(e,t)},u.decodeDelimited=function(e){return e instanceof d||(e=d.create(e)),this.decode(e,e.uint32())},u.verify=function(e){return this.setup().verify(e)},u.fromObject=function(e){return this.setup().fromObject(e)},u.from=u.fromObject,u.toObject=function(e,t){return this.setup().toObject(e,t)}},{11:11,13:13,14:14,15:15,16:16,17:17,19:19,21:21,23:23,25:25,30:30,34:34,37:37,38:38}],33:[function(e,t,r){function n(e,t){var r=0,n={};for(t|=0;r<e.length;)n[o[r+t]]=e[r++];return n}var i=r,s=e(34),o=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];i.basic=n([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),i.defaults=n([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",s.emptyArray,null]),i.long=n([0,0,0,1,1],7),i.mapKey=n([0,0,0,5,5,0,0,0,1,1,0,2],2),i.packed=n([1,5,0,0,0,5,5,0,0,0,1,1,0])},{34:34}],34:[function(e,t){var r=t.exports=e(36);r.asPromise=e(1),r.codegen=e(3),r.EventEmitter=e(4),r.extend=e(5),r.fetch=e(6),r.path=e(8),r.fs=r.inquire("fs"),r.toArray=function(e){return e?Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]}):[]},r.safeProp=function(e){return'["'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"]'},r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)}},{1:1,3:3,36:36,4:4,5:5,6:6,8:8}],35:[function(e,t){function r(e,t){this.lo=e,this.hi=t}t.exports=r;var n=e(36),i=r.prototype,s=r.zero=new r(0,0);s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1};var o=r.zeroHash="\0\0\0\0\0\0\0\0";r.fromNumber=function(e){if(0===e)return s;var t=e<0;t&&(e=-e);var n=e>>>0,i=(e-n)/4294967296>>>0;return t&&(i=~i>>>0,n=~n>>>0,++n>4294967295&&(n=0,++i>4294967295&&(i=0))),new r(n,i)},r.from=function(e){if("number"==typeof e)return r.fromNumber(e);if("string"==typeof e){if(!n.Long)return r.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new r(e.low>>>0,e.high>>>0):s},i.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},i.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,(!!e)):{low:0|this.lo,high:0|this.hi,unsigned:!!e}};var u=String.prototype.charCodeAt;r.fromHash=function(e){return e===o?s:new r((u.call(e,0)|u.call(e,1)<<8|u.call(e,2)<<16|u.call(e,3)<<24)>>>0,(u.call(e,4)|u.call(e,5)<<8|u.call(e,6)<<16|u.call(e,7)<<24)>>>0)},i.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)},i.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},i.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},i.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},{36:36}],36:[function(r,n,i){var s=i;s.base64=r(2),s.inquire=r(7),s.utf8=r(10),s.pool=r(9),s.emptyArray=Object.freeze?Object.freeze([]):[],s.emptyObject=Object.freeze?Object.freeze({}):{},s.isNode=!!(e.process&&e.process.versions&&e.process.versions.node),s.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},s.isString=function(e){return"string"==typeof e||e instanceof String},s.isObject=function(e){return e&&"object"==typeof e},s.Buffer=function(){try{var e=s.inquire("buffer").Buffer;return e.prototype.utf8Write?(e.from||(e.from=function(t,r){return new e(t,r)}),e.allocUnsafe||(e.allocUnsafe=function(t){return new e(t)}),e):null}catch(e){return null}}(),s.newBuffer=function(e){return"number"==typeof e?s.Buffer?s.Buffer.allocUnsafe(e):new s.Array(e):s.Buffer?s.Buffer.from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},s.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,s.LongBits=r(35),s.Long=e.dcodeIO&&e.dcodeIO.Long||s.inquire("long"),s.longToHash=function(e){return e?s.LongBits.from(e).toHash():s.LongBits.zeroHash},s.longFromHash=function(e,t){var r=s.LongBits.fromHash(e);return s.Long?s.Long.fromBits(r.lo,r.hi,t):r.toNumber(!!t)},s.merge=function(e,r,n){for(var i=Object.keys(r),s=0;s<i.length;++s)e[i[s]]!==t&&n||(e[i[s]]=r[i[s]]);return e},s.oneOfGetter=function(e){var r={};return e.forEach(function(e){r[e]=1}),function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(1===r[e[n]]&&this[e[n]]!==t&&null!==this[e[n]])return e[n]}},s.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},s.lazyResolve=function(e,t){t.forEach(function(t){Object.keys(t).forEach(function(r){for(var n=t[r|=0].split("."),i=e;n.length;)i=i[n.shift()];t[r]=i})})},s.toJSONOptions={longs:String,enums:String,bytes:String}},{10:10,2:2,35:35,7:7,9:9}],37:[function(e,t){function r(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function n(e,t,n,i){if(t.resolvedType)if(t.resolvedType instanceof o){e("switch(%s){",i)("default:")("return%j",r(t,"enum value"));for(var s=u.toArray(t.resolvedType.values),a=0;a<s.length;++a)e("case %d:",s[a]);e("break")("}")}else e("var e=types[%d].verify(%s);",n,i)("if(e)")("return%j+e",t.name+".");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",i)("return%j",r(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",i,i,i,i)("return%j",r(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',i)("return%j",r(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',i)("return%j",r(t,"boolean"));break;case"string":e("if(!util.isString(%s))",i)("return%j",r(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',i,i,i)("return%j",r(t,"buffer"))}return e}function i(e,t,n){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!/^-?(?:0|[1-9][0-9]*)$/.test(%s))",n)("return%j",r(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/.test(%s))",n)("return%j",r(t,"integer|Long key"));break;case"bool":e("if(!/^true|false|0|1$/.test(%s))",n)("return%j",r(t,"boolean key"))}return e}function s(e){var t=e.fieldsArray;if(!t.length)return u.codegen()("return null");for(var s=u.codegen("m"),a=0;a<t.length;++a){var f=t[a].resolve(),l="m"+u.safeProp(f.name);f.map?(s("if(%s!==undefined){",l)("if(!util.isObject(%s))",l)("return%j",r(f,"object"))("var k=Object.keys(%s)",l)("for(var i=0;i<k.length;++i){"),i(s,f,"k[i]"),n(s,f,a,l+"[k[i]]")("}")("}")):f.repeated?(s("if(%s!==undefined){",l)("if(!Array.isArray(%s))",l)("return%j",r(f,"array"))("for(var i=0;i<%s.length;++i){",l),n(s,f,a,l+"[i]")("}")("}")):(f.required||(!f.resolvedType||f.resolvedType instanceof o?s("if(%s!==undefined){",l):s("if(%s!==undefined&&%s!==null){",l,l)),n(s,f,a,l),f.required||s("}"))}return s("return null")}t.exports=s;var o=e(16),u=e(34)},{16:16,34:34}],38:[function(e,r){function n(e,r,n){this.fn=e,this.len=r,this.next=t,this.val=n}function i(){}function s(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function o(){this.len=0,this.head=new n(i,0,0),this.tail=this.head,this.states=null}function u(e,t,r){t[r]=255&e}function a(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e}function f(e,r){this.len=e,this.next=t,this.val=r}function l(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function h(e,t,r){t[r++]=255&e,t[r++]=e>>>8&255,t[r++]=e>>>16&255,t[r]=e>>>24}r.exports=o;var c,p=e(36),d=p.LongBits,y=p.base64,v=p.utf8;o.create=p.Buffer?function(){return c||(c=e(39)),(o.create=function(){return new c})()}:function(){return new o},o.alloc=function(e){return new p.Array(e)},p.Array!==Array&&(o.alloc=p.pool(o.alloc,p.Array.prototype.subarray));var m=o.prototype;m.push=function(e,t,r){return this.tail=this.tail.next=new n(e,t,r),this.len+=t,this},f.prototype=Object.create(n.prototype),f.prototype.fn=a,m.uint32=function(e){return this.len+=(this.tail=this.tail.next=new f((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},m.int32=function(e){return e<0?this.push(l,10,d.fromNumber(e)):this.uint32(e)},m.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},m.uint64=function(e){var t=d.from(e);return this.push(l,t.length(),t)},m.int64=m.uint64,m.sint64=function(e){var t=d.from(e).zzEncode();return this.push(l,t.length(),t)},m.bool=function(e){return this.push(u,1,e?1:0)},m.fixed32=function(e){return this.push(h,4,e>>>0)},m.sfixed32=function(e){return this.push(h,4,e<<1^e>>31)},m.fixed64=function(e){var t=d.from(e);return this.push(h,4,t.lo).push(h,4,t.hi)},m.sfixed64=function(e){var t=d.from(e).zzEncode();return this.push(h,4,t.lo).push(h,4,t.hi)};var g="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n,i){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i]=t[3]}:function(r,n,i){e[0]=r,n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,r){var n=e<0?1:0;if(n&&(e=-e),0===e)h(1/e>0?0:2147483648,t,r);else if(isNaN(e))h(2147483647,t,r);else if(e>3.4028234663852886e38)h((n<<31|2139095040)>>>0,t,r);else if(e<1.1754943508222875e-38)h((n<<31|Math.round(e/1.401298464324817e-45))>>>0,t,r);else{var i=Math.floor(Math.log(e)/Math.LN2),s=8388607&Math.round(e*Math.pow(2,-i)*8388608);h((n<<31|i+127<<23|s)>>>0,t,r)}};m.float=function(e){return this.push(g,4,e)};var b="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n,i){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i++]=t[3],n[i++]=t[4],n[i++]=t[5],n[i++]=t[6],n[i]=t[7]}:function(r,n,i){e[0]=r,n[i++]=t[7],n[i++]=t[6],n[i++]=t[5],n[i++]=t[4],n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,r){var n=e<0?1:0;if(n&&(e=-e),0===e)h(0,t,r),h(1/e>0?0:2147483648,t,r+4);else if(isNaN(e))h(4294967295,t,r),h(2147483647,t,r+4);else if(e>1.7976931348623157e308)h(0,t,r),h((n<<31|2146435072)>>>0,t,r+4);else{var i;if(e<2.2250738585072014e-308)i=e/5e-324,h(i>>>0,t,r),h((n<<31|i/4294967296)>>>0,t,r+4);else{var s=Math.floor(Math.log(e)/Math.LN2);1024===s&&(s=1023),i=e*Math.pow(2,-s),h(4503599627370496*i>>>0,t,r),h((n<<31|s+1023<<20|1048576*i&1048575)>>>0,t,r+4)}}};m.double=function(e){return this.push(b,8,e)};var w=p.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};m.bytes=function(e){var t=e.length>>>0;if("string"==typeof e&&t){var r=o.alloc(t=y.length(e));y.decode(e,r,0),e=r}return t?this.uint32(t).push(w,t,e):this.push(u,1,0)},m.string=function(e){var t=v.length(e);return t?this.uint32(t).push(v.write,t,e):this.push(u,1,0)},m.fork=function(){return this.states=new s(this),this.head=this.tail=new n(i,0,0),this.len=0,this},m.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(i,0,0),this.len=0),this},m.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},m.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t}},{36:36,39:39}],39:[function(e,t){function r(){i.call(this)}function n(e,t,r){e.length<40?o.utf8.write(e,t,r):t.utf8Write(e,r)}t.exports=r;var i=e(38),s=r.prototype=Object.create(i.prototype);s.constructor=r;var o=e(36),u=o.Buffer;r.alloc=function(e){return(r.alloc=u.allocUnsafe)(e)};var a=u&&u.prototype instanceof Uint8Array&&"set"===u.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n<e.length;)t[r++]=e[n++]};s.bytes=function(e){"string"==typeof e&&(e=u.from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this.push(a,t,e),this},s.string=function(e){var t=u.byteLength(e);return this.uint32(t),t&&this.push(n,t,e),this}},{36:36,38:38}],40:[function(t,r,n){function i(e,t,r){return"function"==typeof t?(r=t,t=new u.Root):t||(t=new u.Root),t.load(e,r)}function s(e,t){return t||(t=new u.Root),t.loadSync(e)}function o(){u.Reader.i()}var u=e.protobuf=n;u.load=i,u.loadSync=s,u.roots={};try{u.tokenize=t(31),u.parse=t(24),u.common=t(12)}catch(e){}u.Writer=t(38),u.BufferWriter=t(39),u.Reader=t(25),u.BufferReader=t(26),u.encoder=t(15),u.decoder=t(14),u.verifier=t(37),u.converter=t(13),u.ReflectionObject=t(22),u.Namespace=t(21),u.Root=t(27),u.Enum=t(16),u.Type=t(32),u.Field=t(17),u.OneOf=t(23),u.MapField=t(18),u.Service=t(30),u.Method=t(20),u.Class=t(11),u.Message=t(19),u.types=t(33),u.rpc=t(28),u.util=t(34),u.configure=o,"function"==typeof define&&define.amd&&define(["long"],function(e){return e&&(u.util.Long=e,o()),u})},{11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,30:30,31:31,32:32,33:33,34:34,37:37,38:38,39:39}]},{},[40])}("object"==typeof window&&window||"object"==typeof self&&self||this);
!function(e,t){"use strict";!function e(t,r,n){function i(o,u){if(!r[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(s)return s(o,!0);var f=Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=r[o]={exports:{}};t[o][0].call(l.exports,function(e){var r=t[o][1][e];return i(r?r:e)},l,l.exports,e,t,r,n)}return r[o].exports}for(var s="function"==typeof require&&require,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(e,t){function r(e,t){for(var r=[],n=2;n<arguments.length;)r.push(arguments[n++]);var i=!0;return new Promise(function(n,s){r.push(function(e){if(i)if(i=!1,e)s(e);else{for(var t=[],r=1;r<arguments.length;)t.push(arguments[r++]);n.apply(null,t)}});try{e.apply(t||this,r)}catch(e){i&&(i=!1,s(e))}})}t.exports=r},{}],2:[function(e,r,n){var i=n;i.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var s=Array(64),o=Array(123),u=0;u<64;)o[s[u]=u<26?u+65:u<52?u+71:u<62?u-4:u-59|43]=u++;i.encode=function(e,t,r){for(var n,i=[],o=0,u=0;t<r;){var a=e[t++];switch(u){case 0:i[o++]=s[a>>2],n=(3&a)<<4,u=1;break;case 1:i[o++]=s[n|a>>4],n=(15&a)<<2,u=2;break;case 2:i[o++]=s[n|a>>6],i[o++]=s[63&a],u=0}}return u&&(i[o++]=s[n],i[o]=61,1===u&&(i[o+1]=61)),String.fromCharCode.apply(String,i)};var a="invalid encoding";i.decode=function(e,r,n){for(var i,s=n,u=0,f=0;f<e.length;){var l=e.charCodeAt(f++);if(61===l&&u>1)break;if((l=o[l])===t)throw Error(a);switch(u){case 0:i=l,u=1;break;case 1:r[n++]=i<<2|(48&l)>>4,i=l,u=2;break;case 2:r[n++]=(15&i)<<4|(60&l)>>2,i=l,u=3;break;case 3:r[n++]=(3&i)<<6|l,u=0}}if(1===u)throw Error(a);return n-s},i.test=function(e){return/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e)}},{}],3:[function(e,r){function n(){function e(){for(var t=[],r=0;r<arguments.length;)t.push(arguments[r++]);var n=i.apply(null,t),l=p;if(c.length){var h=c[c.length-1];s.test(h)?l=++p:a.test(h)&&++l,u.test(h)&&!u.test(n)?(l=++p,d=!0):d&&f.test(h)&&(l=--p,d=!1),o.test(n)&&(l=--p)}for(r=0;r<l;++r)n="\t"+n;return c.push(n),e}function r(e){return"function"+(e?" "+e.replace(/[^\w_$]/g,"_"):"")+"("+h.join(",")+") {\n"+c.join("\n")+"\n}"}function l(r,i){"object"==typeof r&&(i=r,r=t);var s=e.str(r);n.verbose&&console.log("--- codegen ---\n"+s.replace(/^/gm,"> ").replace(/\t/g," "));var o=Object.keys(i||(i={}));return Function.apply(null,o.concat("return "+s)).apply(null,o.map(function(e){return i[e]}))}for(var h=[],c=[],p=1,d=!1,y=0;y<arguments.length;)h.push(arguments[y++]);return e.str=r,e.eof=l,e}function i(e){for(var t=[],r=1;r<arguments.length;)t.push(arguments[r++]);if(r=0,e=e.replace(/%([dfjs])/g,function(e,n){switch(n){case"d":return Math.floor(t[r++]);case"f":return+t[r++];case"j":return JSON.stringify(t[r++]);default:return t[r++]}}),r!==t.length)throw Error("argument count mismatch");return e}r.exports=n;var s=/[{[]$/,o=/^[}\]]/,u=/:$/,a=/^\s*(?:if|}?else if|while|for)\b|\b(?:else)\s*$/,f=/\b(?:break|continue)(?: \w+)?;?$|^\s*return\b/;n.sprintf=i,n.supported=!1;try{n.supported=1===n("a","b")("return a-b").eof()(2,1)}catch(e){}n.verbose=!1},{}],4:[function(e,r){function n(){this.a={}}r.exports=n;var i=n.prototype;i.on=function(e,t,r){return(this.a[e]||(this.a[e]=[])).push({fn:t,ctx:r||this}),this},i.off=function(e,r){if(e===t)this.a={};else if(r===t)this.a[e]=[];else for(var n=this.a[e],i=0;i<n.length;)n[i].fn===r?n.splice(i,1):++i;return this},i.emit=function(e){var t=this.a[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},{}],5:[function(e,t){function r(e){for(var t=Object.keys(this),r=0;r<t.length;++r)e[t[r]]=this[t[r]];var n=e.prototype=Object.create(this.prototype);return n.constructor=e,n}t.exports=r},{}],6:[function(e,r){function n(e,t){return t?u&&u.readFile?u.readFile(e,"utf8",function(r,n){return r&&"undefined"!=typeof XMLHttpRequest?i(e,t):t(r,n)}):i(e,t):s(n,this,e)}function i(e,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)):t},n.open("GET",e),n.send()}r.exports=n;var s=e(1),o=e(7),u=o("fs")},{1:1,7:7}],7:[function(e,t,r){function n(e){try{var t=eval("quire".replace(/^/,"re"))(e);if(t&&(t.length||Object.keys(t).length))return t}catch(e){}return null}t.exports=n},{}],8:[function(e,t,r){var n=r,i=n.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},s=n.normalize=function(e){e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var t=e.split("/"),r=i(e),n="";r&&(n=t.shift()+"/");for(var s=0;s<t.length;)".."===t[s]?s>0?t.splice(--s,2):r?t.splice(s,1):++s:"."===t[s]?t.splice(s,1):++s;return n+t.join("/")};n.resolve=function(e,t,r){return r||(t=s(t)),i(t)?t:(r||(e=s(e)),(e=e.replace(/(?:\/|^)[^\/]+$/,"")).length?s(e+"/"+t):t)}},{}],9:[function(e,t){function r(e,t,r){var n=r||8192,i=n>>>1,s=null,o=n;return function(r){if(r<1||r>i)return e(r);o+r>n&&(s=e(n),o=0);var u=t.call(s,o,o+=r);return 7&o&&(o=(7|o)+1),u}}t.exports=r},{}],10:[function(e,t,r){var n=r;n.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)r=e.charCodeAt(n),r<128?t+=1:r<2048?t+=2:55296===(64512&r)&&56320===(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},n.read=function(e,t,r){var n=r-t;if(n<1)return"";for(var i,s=null,o=[],u=0;t<r;)i=e[t++],i<128?o[u++]=i:i>191&&i<224?o[u++]=(31&i)<<6|63&e[t++]:i>239&&i<365?(i=((7&i)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[u++]=55296+(i>>10),o[u++]=56320+(1023&i)):o[u++]=(15&i)<<12|(63&e[t++])<<6|63&e[t++],u>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),u=0);return s?(u&&s.push(String.fromCharCode.apply(String,o.slice(0,u))),s.join("")):u?String.fromCharCode.apply(String,o.slice(0,u)):""},n.write=function(e,t,r){for(var n,i,s=r,o=0;o<e.length;++o)n=e.charCodeAt(o),n<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=63&n|128):55296===(64512&n)&&56320===(64512&(i=e.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&i),++o,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-s}},{}],11:[function(e,t){function r(e){return n(e)}function n(t,n){if(i||(i=e(32)),!(t instanceof i))throw TypeError("type must be a Type");if(n){if("function"!=typeof n)throw TypeError("ctor must be a function")}else n=o.codegen("p")("return ctor.call(this,p)").eof(t.name,{ctor:s});n.constructor=r;var u=n.prototype=new s;return u.constructor=n,o.merge(n,s,!0),n.$type=t,u.$type=t,t.fieldsArray.forEach(function(e){u[e.name]=Array.isArray(e.resolve().defaultValue)?o.emptyArray:o.isObject(e.defaultValue)&&!e.long?o.emptyObject:e.defaultValue}),t.oneofsArray.forEach(function(e){Object.defineProperty(u,e.resolve().name,{get:o.oneOfGetter(e.oneof),set:o.oneOfSetter(e.oneof)})}),t.ctor=n,u}t.exports=r;var i,s=e(19),o=e(34);r.create=n,r.prototype=s},{19:19,32:32,34:34}],12:[function(e,t){function r(e,t){/\/|\./.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),r[e]=t}t.exports=r,r("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var n;r("duration",{Duration:n={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),r("timestamp",{Timestamp:n}),r("empty",{Empty:{fields:{}}}),r("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),r("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}})},{}],13:[function(e,t,r){function n(e,t,r,n){if(t.resolvedType)if(t.resolvedType instanceof o){var i=t.resolvedType.values;e("switch(d%s){",n),Object.keys(i).forEach(function(r){t.repeated&&i[r]===t.typeDefault&&e("default:"),e("case%j:",r)("case %j:",i[r])("m%s=%j",n,i[r])("break")}),e("}")}else e("m%s=types[%d].fromObject(d%s)",n,r,n);else{var s=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",n,n);break;case"uint64":s=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,s)('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,s?"true":"");break;case"bytes":e('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&&d%s.length)",n,n)("m%s=d%s",n,n);break;case"string":e("m%s=String(d%s)",n,n);break;case"bool":e("m%s=Boolean(d%s)",n,n)}}return e}function i(e,t,r,n){if(t.resolvedType)t.resolvedType instanceof o?e("d%s=o.enums===String?types[%d].values[m%s]:m%s",n,r,n,n):e("d%s=types[%d].toObject(m%s,o)",n,r,n);else{var i=!1;switch(t.type){case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('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,i?"true":"",n);break;case"bytes":e("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:e("d%s=m%s",n,n)}}return e}var s=r,o=e(16),u=e(34);s.fromObject=function(e){var t=e.fieldsArray;if(!t.length)return u.codegen()("return new(this.ctor)");for(var r=u.codegen("d")("var m=new(this.ctor)"),i=0;i<t.length;++i){var s=t[i].resolve(),a=u.safeProp(s.name);s.map?(r("if(d%s){",a)("m%s={}",a)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",a),n(r,s,i,a+"[ks[i]]")("}")("}")):s.repeated?(r("if(d%s){",a)("m%s=[]",a)("for(var i=0;i<d%s.length;++i){",a),n(r,s,i,a+"[i]")("}")("}")):(s.resolvedType instanceof o||r("if(d%s!==undefined&&d%s!==null){",a,a),n(r,s,i,a),s.resolvedType instanceof o||r("}"))}return r("return m")},s.toObject=function(e){var t=e.fieldsArray;if(!t.length)return u.codegen()("return {}");var r=u.codegen("m","o")("if(!o)")("o={}")("var d={}"),n=t.filter(function(e){return e.resolve().repeated});n.length&&(r("if(o.arrays||o.defaults){"),n.forEach(function(e){r("d%s=[]",u.safeProp(e.name))}),r("}"));var s=t.filter(function(e){return e.map});s.length&&(r("if(o.objects||o.defaults){"),s.forEach(function(e){r("d%s={}",u.safeProp(e.name))}),r("}"));var a=t.filter(function(e){return!(e.repeated||e.map)});a.length&&(r("if(o.defaults){"),a.forEach(function(e){var t=u.safeProp(e.name);e.resolvedType instanceof o?r("d%s=o.enums===String?%j:%j",t,e.resolvedType.valuesById[e.typeDefault],e.typeDefault):e.long?r("if(util.Long){")("var n=new util.Long(%d,%d,%j)",e.typeDefault.low,e.typeDefault.high,e.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",t)("}else")("d%s=o.longs===String?%j:%d",t,""+e.typeDefault,e.typeDefault.toNumber()):e.bytes?r("d%s=o.bytes===String?%j:%s",t,String.fromCharCode.apply(String,e.typeDefault),"["+Array.prototype.slice.call(e.typeDefault).join(",")+"]"):r("d%s=%j",t,e.typeDefault)}),r("}"));for(var f=0;f<t.length;++f){var l=t[f],h=u.safeProp(l.name);r("if(m%s!==undefined&&m%s!==null&&m.hasOwnProperty(%j)){",h,h,l.name),l.map?(r("d%s={}",h)("for(var ks2=Object.keys(m%s),j=0;j<ks2.length;++j){",h),i(r,l,f,h+"[ks2[j]]")("}")):l.repeated?(r("d%s=[]",h)("for(var j=0;j<m%s.length;++j){",h),i(r,l,f,h+"[j]")("}")):i(r,l,f,h),r("}")}return r("return d")}},{16:16,34:34}],14:[function(e,r){function n(e){var r=e.fieldsArray,u=o.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()");e.group&&u("if((t&7)===4)")("break"),u("switch(t>>>3){");for(var a=0;a<r.length;++a){var f=r[a].resolve(),l=f.resolvedType instanceof i?"uint32":f.type,h="m"+o.safeProp(f.name);u("case %d:",f.id),f.map?(u("r.skip().pos++")("if(%s===util.emptyObject)",h)("%s={}",h)("var k=r.%s()",f.keyType)("r.pos++"),s.basic[l]===t?u('%s[typeof k==="object"?util.longToHash(k):k]=types[%d].decode(r,r.uint32())',h,a):u('%s[typeof k==="object"?util.longToHash(k):k]=r.%s()',h,l)):f.repeated?(u("if(!(%s&&%s.length))",h,h)("%s=[]",h),(n.compat||f.packed)&&s.packed[l]!==t&&u("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",h,l)("}else"),s.basic[l]===t?u(f.resolvedType.group?"%s.push(types[%d].decode(r))":"%s.push(types[%d].decode(r,r.uint32()))",h,a):u("%s.push(r.%s())",h,l)):s.basic[l]===t?u(f.resolvedType.group?"%s=types[%d].decode(r)":"%s=types[%d].decode(r,r.uint32())",h,a):u("%s=r.%s()",h,l),u("break")}return u("default:")("r.skipType(t&7)")("break")("}")("}")("return m")}r.exports=n,n.compat=!0;var i=e(16),s=e(33),o=e(34)},{16:16,33:33,34:34}],15:[function(e,r){function n(e,t,r,n){return t.resolvedType.group?e("types[%d].encode(%s,w.uint32(%d)).uint32(%d)",r,n,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%d].encode(%s,w.uint32(%d).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}function i(e){for(var r,i,a=e.fieldsArray,f=e.oneofsArray,l=u.codegen("m","w")("if(!w)")("w=Writer.create()"),r=0;r<a.length;++r){var h=a[r].resolve();if(!h.partOf){var c=h.resolvedType instanceof s?"uint32":h.type,p=o.basic[c];i="m"+u.safeProp(h.name),h.map?(l("if(%s&&m.hasOwnProperty(%j)){",i,h.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",i)("w.uint32(%d).fork().uint32(%d).%s(ks[i])",(h.id<<3|2)>>>0,8|o.mapKey[h.keyType],h.keyType),p===t?l("types[%d].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",r,i):l(".uint32(%d).%s(%s[ks[i]]).ldelim()",16|p,c,i),l("}")("}")):h.repeated?h.packed&&o.packed[c]!==t?l("if(%s&&%s.length&&m.hasOwnProperty(%j)){",i,i,h.name)("w.uint32(%d).fork()",(h.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",i)("w.%s(%s[i])",c,i)("w.ldelim()")("}"):(l("if(%s!==undefined&&m.hasOwnProperty(%j)){",i,h.name)("for(var i=0;i<%s.length;++i)",i),p===t?n(l,h,r,i+"[i]"):l("w.uint32(%d).%s(%s[i])",(h.id<<3|p)>>>0,c,i),l("}")):(h.required||(h.long?l("if(%s!==undefined&&%s!==null&&m.hasOwnProperty(%j))",i,i,h.name):h.bytes?l("if(%s&&m.hasOwnProperty(%j))",i,h.name):l("if(%s!==undefined&&m.hasOwnProperty(%j))",i,h.name)),p===t?n(l,h,r,i):l("w.uint32(%d).%s(%s)",(h.id<<3|p)>>>0,c,i))}}for(var r=0;r<f.length;++r){var d=f[r];l("switch(%s){","m"+u.safeProp(d.name));for(var y=d.fieldsArray,v=0;v<y.length;++v){var h=y[v],c=h.resolvedType instanceof s?"uint32":h.type,p=o.basic[c];i="m"+u.safeProp(h.name),l("case%j:",h.name),p===t?n(l,h,a.indexOf(h),i):l("w.uint32(%d).%s(%s)",(h.id<<3|p)>>>0,c,i),l("break")}l("}")}return l("return w")}r.exports=i;var s=e(16),o=e(33),u=e(34)},{16:16,33:33,34:34}],16:[function(e,r){function n(e,t,r){i.call(this,e,r),this.valuesById={},this.values=Object.create(this.valuesById),this.comments={};var n=this;Object.keys(t||{}).forEach(function(e){n.valuesById[n.values[e]=t[e]]=e})}r.exports=n;var i=e(22),s=i.extend(n);n.className="Enum";var o=e(34);n.testJSON=function(e){return!(!e||!e.values)},n.fromJSON=function(e,t){return new n(e,t.values,t.options)},s.toJSON=function(){return{options:this.options,values:this.values}},s.add=function(e,r,n){if(!o.isString(e))throw TypeError("name must be a string");if(!o.isInteger(r))throw TypeError("id must be an integer");if(this.values[e]!==t)throw Error("duplicate name '"+e+"' in "+this);if(this.valuesById[r]!==t)throw Error("duplicate id "+r+" in "+this);return this.valuesById[this.values[e]=r]=e,this.comments[e]=n||null,this},s.remove=function(e){if(!o.isString(e))throw TypeError("name must be a string");var r=this.values[e];if(r===t)throw Error("'"+e+"' is not a name of "+this);return delete this.valuesById[r],delete this.values[e],delete this.comments[e],this}},{22:22,34:34}],17:[function(e,r){function n(e,r,n,s,o,u){if(l.isObject(s)?(u=s,s=o=t):l.isObject(o)&&(u=o,o=t),i.call(this,e,u),!l.isInteger(r)||r<0)throw TypeError("id must be a non-negative integer");if(!l.isString(n))throw TypeError("type must be a string");if(o!==t&&!l.isString(o))throw TypeError("extend must be a string");if(s!==t&&!/^required|optional|repeated$/.test(s=(""+s).toLowerCase()))throw TypeError("rule must be a string rule");this.rule=s&&"optional"!==s?s:t,this.type=n,this.id=r,this.extend=o||t,this.required="required"===s,this.optional=!this.required,this.repeated="repeated"===s,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!l.Long&&f.long[n]!==t,this.bytes="bytes"===n,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.b=null}r.exports=n;var i=e(22),s=i.extend(n);n.className="Field";var o,u,a=e(16),f=e(33),l=e(34);Object.defineProperty(s,"packed",{get:function(){return null===this.b&&(this.b=this.getOption("packed")!==!1),this.b}}),s.setOption=function(e,t,r){return"packed"===e&&(this.b=null),i.prototype.setOption.call(this,e,t,r)},n.testJSON=function(e){return!(!e||e.id===t)},n.fromJSON=function(r,i){return i.keyType!==t?(u||(u=e(18)),u.fromJSON(r,i)):new n(r,i.id,i.type,i.rule,i.extend,i.options)},s.toJSON=function(){return{rule:"optional"!==this.rule&&this.rule||t,type:this.type,id:this.id,extend:this.extend,options:this.options}},s.resolve=function(){if(this.resolved)return this;if((this.typeDefault=f.defaults[this.type])===t)if(o||(o=e(32)),this.resolvedType=this.parent.lookup(this.type,o))this.typeDefault=null;else{if(!(this.resolvedType=this.parent.lookup(this.type,a)))throw Error("unresolvable field type: "+this.type);this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]}if(this.options&&this.options.default!==t&&(this.typeDefault=this.options.default,this.resolvedType instanceof a&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.long)this.typeDefault=l.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;l.base64.test(this.typeDefault)?l.base64.decode(this.typeDefault,r=l.newBuffer(l.base64.length(this.typeDefault)),0):l.utf8.write(this.typeDefault,r=l.newBuffer(l.utf8.length(this.typeDefault)),0),this.typeDefault=r}return this.map?this.defaultValue={}:this.repeated?this.defaultValue=[]:this.defaultValue=this.typeDefault,i.prototype.resolve.call(this)}},{16:16,18:18,22:22,32:32,33:33,34:34}],18:[function(e,r){function n(e,t,r,n,s){if(i.call(this,e,t,n,s),!a.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}r.exports=n;var i=e(17),s=i.prototype,o=i.extend(n);n.className="MapField";var u=e(33),a=e(34);n.testJSON=function(e){return i.testJSON(e)&&e.keyType!==t},n.fromJSON=function(e,t){return new n(e,t.id,t.keyType,t.type,t.options)},o.toJSON=function(){return{keyType:this.keyType,type:this.type,id:this.id,extend:this.extend,options:this.options}},o.resolve=function(){if(this.resolved)return this;if(u.mapKey[this.keyType]===t)throw Error("invalid key type: "+this.keyType);return s.resolve.call(this)}},{17:17,33:33,34:34}],19:[function(e,t){function r(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}t.exports=r;var n=e(34);r.encode=function(e,t){return this.$type.encode(e,t)},r.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},r.decode=function(e){return this.$type.decode(e)},r.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},r.verify=function(e){return this.$type.verify(e)},r.fromObject=function(e){return this.$type.fromObject(e)},r.from=r.fromObject,r.toObject=function(e,t){return this.$type.toObject(e,t)},r.prototype.toObject=function(e){return this.$type.toObject(this,e)},r.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},{34:34}],20:[function(e,r){function n(e,r,n,s,o,a,f){if(u.isObject(o)?(f=o,o=a=t):u.isObject(a)&&(f=a,a=t),r&&!u.isString(r))throw TypeError("type must be a string");if(!u.isString(n))throw TypeError("requestType must be a string");if(!u.isString(s))throw TypeError("responseType must be a string");i.call(this,e,f),this.type=r||"rpc",this.requestType=n,this.requestStream=!!o||t,this.responseType=s,this.responseStream=!!a||t,this.resolvedRequestType=null,this.resolvedResponseType=null}r.exports=n;var i=e(22),s=i.extend(n);n.className="Method";var o=e(32),u=e(34);n.testJSON=function(e){return!(!e||e.requestType===t)},n.fromJSON=function(e,t){return new n(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options)},s.toJSON=function(){return{type:"rpc"!==this.type&&this.type||t,requestType:this.requestType,requestStream:this.requestStream,responseType:this.responseType,responseStream:this.responseStream,options:this.options}},s.resolve=function(){if(this.resolved)return this;if(!(this.resolvedRequestType=this.parent.lookup(this.requestType,o)))throw Error("unresolvable request type: "+this.requestType);if(!(this.resolvedResponseType=this.parent.lookup(this.responseType,o)))throw Error("unresolvable response type: "+this.requestType);return i.prototype.resolve.call(this)}},{22:22,32:32,34:34}],21:[function(e,r){function n(){f||(f=e(32)),l||(l=e(30)),h=[p,f,l,d,s],c="one of "+h.map(function(e){return e.name}).join(", ")}function i(e){if(!e||!e.length)return t;for(var r={},n=0;n<e.length;++n)r[e[n].name]=e[n].toJSON();return r}function s(e,r){u.call(this,e,r),this.nested=t,this.c=null,this.d=[]}function o(e){e.c=null;for(var t=0;t<e.d.length;++t)delete e[e.d[t]];return e.d=[],e}r.exports=s;var u=e(22),a=u.extend(s);s.className="Namespace";var f,l,h,c,p=e(16),d=e(17),y=e(34);s.testJSON=function(e){return!(!e||e.fields||e.values||e.id!==t||e.oneof||e.methods||e.requestType!==t)},s.fromJSON=function(e,t){return new s(e,t.options).addJSON(t.nested)},s.arrayToJSON=i,Object.defineProperty(a,"nestedArray",{get:function(){return this.c||(this.c=y.toArray(this.nested))}}),a.toJSON=function(){return{options:this.options,nested:i(this.nestedArray)}},a.addJSON=function(e){var t=this;return e&&(h||n(),Object.keys(e).forEach(function(r){for(var n=e[r],i=0;i<h.length;++i)if(h[i].testJSON(n))return t.add(h[i].fromJSON(r,n));throw TypeError("nested."+r+" must be JSON for "+c)})),this},a.get=function(e){return this.nested===t?null:this.nested[e]||null},a.getEnum=function(e){if(this.nested&&this.nested[e]instanceof p)return this.nested[e].values;throw Error("no such enum")},a.add=function(e){if(h||n(),!e||h.indexOf(e.constructor)<0)throw TypeError("object must be "+c);if(e instanceof d&&e.extend===t)throw TypeError("object must be an extension field when not part of a type");if(this.nested){var r=this.get(e.name);if(r){if(!(r instanceof s&&e instanceof s)||r instanceof f||r instanceof l)throw Error("duplicate name '"+e.name+"' in "+this);for(var i=r.nestedArray,u=0;u<i.length;++u)e.add(i[u]);this.remove(r),this.nested||(this.nested={}),e.setOptions(r.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),o(this)},a.remove=function(e){if(!(e instanceof u))throw TypeError("object must be a ReflectionObject");if(e.parent!==this||!this.nested)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=t),e.onRemove(this),o(this)},a.define=function(e,r){y.isString(e)?e=e.split("."):Array.isArray(e)||(r=e,e=t);var n=this;if(e)for(;e.length>0;){var i=e.shift();if(n.nested&&n.nested[i]){if(n=n.nested[i],!(n instanceof s))throw Error("path conflicts with non-namespace objects")}else n.add(n=new s(i))}return r&&n.addJSON(r),n},a.resolve=function(){f||(f=e(32)),l||(f=e(30));for(var t=this.nestedArray,r=0;r<t.length;++r)if(/^[A-Z]/.test(t[r].name)){if(t[r]instanceof f||t[r]instanceof l)this[t[r].name]=t[r];else{if(!(t[r]instanceof p))continue;this[t[r].name]=t[r].values}this.d.push(t[r].name)}return u.prototype.resolve.call(this)},a.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof s?e[t++].resolveAll():e[t++].resolve();return a.resolve.call(this)},a.lookup=function(e,r,n){if("boolean"==typeof r&&(n=r,r=t),y.isString(e)&&e.length)e=e.split(".");else if(!e.length)return null;if(""===e[0])return this.root.lookup(e.slice(1),r);var i=this.get(e[0]);return i&&1===e.length&&(!r||i instanceof r)||i instanceof s&&(i=i.lookup(e.slice(1),r,!0))?i:null===this.parent||n?null:this.parent.lookup(e,r)},a.lookupType=function(t){f||(f=e(32));var r=this.lookup(t,f);if(!r)throw Error("no such type");return r},a.lookupService=function(t){l||(l=e(30));var r=this.lookup(t,l);if(!r)throw Error("no such service");return r},a.lookupEnum=function(e){var t=this.lookup(e,p);if(!t)throw Error("no such enum");return t.values}},{16:16,17:17,22:22,30:30,32:32,34:34}],22:[function(e,r){function n(e,t){if(!i.isString(e))throw TypeError("name must be a string");if(t&&!i.isObject(t))throw TypeError("options must be an object");this.options=t,this.name=e,this.parent=null,this.resolved=!1,this.comment=null}r.exports=n;var i=e(34);n.className="ReflectionObject",n.extend=i.extend;var s,o=n.prototype;Object.defineProperties(o,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),o.toJSON=function(){throw Error()},o.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var r=t.root;s||(s=e(27)),r instanceof s&&r.e(this)},o.onRemove=function(t){var r=t.root;s||(s=e(27)),r instanceof s&&r.f(this),this.parent=null,this.resolved=!1},o.resolve=function(){return this.resolved?this:(s||(s=e(27)),this.root instanceof s&&(this.resolved=!0),this)},o.getOption=function(e){return this.options?this.options[e]:t},o.setOption=function(e,r,n){return n&&this.options&&this.options[e]!==t||((this.options||(this.options={}))[e]=r),this},o.setOptions=function(e,t){return e&&Object.keys(e).forEach(function(r){this.setOption(r,e[r],t)},this),this},o.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e}},{27:27,34:34}],23:[function(e,r){function n(e,r,n){if(Array.isArray(r)||(n=r,r=t),s.call(this,e,n),r&&!Array.isArray(r))throw TypeError("fieldNames must be an Array");this.oneof=r||[],this.g=[]}function i(e){e.parent&&e.g.forEach(function(t){t.parent||e.parent.add(t)})}r.exports=n;var s=e(22),o=s.extend(n);n.className="OneOf";var u=e(17);Object.defineProperty(o,"fieldsArray",{get:function(){return this.g}}),n.testJSON=function(e){return!!e.oneof},n.fromJSON=function(e,t){return new n(e,t.oneof,t.options)},o.toJSON=function(){return{oneof:this.oneof,options:this.options}},o.add=function(e){if(!(e instanceof u))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.g.push(e),e.partOf=this,i(this),this},o.remove=function(e){if(!(e instanceof u))throw TypeError("field must be a Field");var t=this.g.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.g.splice(t,1),t=this.oneof.indexOf(e.name),t>-1&&this.oneof.splice(t,1),e.partOf=null,this},o.onAdd=function(e){s.prototype.onAdd.call(this,e);var t=this;this.oneof.forEach(function(r){var n=e.get(r);n&&!n.partOf&&(n.partOf=t,t.g.push(n))}),i(this)},o.onRemove=function(e){this.g.forEach(function(e){e.parent&&e.parent.remove(e)}),s.prototype.onRemove.call(this,e)}},{17:17,22:22}],24:[function(e,r){function n(e){return/^[a-zA-Z_][a-zA-Z_0-9]*$/.test(e)}function i(e){return/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/.test(e)}function s(e){return/^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/.test(e)}function o(e){return null===e?null:e.toLowerCase()}function u(e){return e.substring(0,1)+e.substring(1).replace(/_([a-z])(?=[a-z]|$)/g,function(e,t){return t.toUpperCase()})}function a(e,r,w){function O(e,t){var r=a.filename;return a.filename=null,Error("illegal "+(t||"token")+" '"+e+"' ("+(r?r+", ":"")+"line "+K.line()+")")}function k(){var e,t=[];do{if('"'!==(e=G())&&"'"!==e)throw O(e);t.push(G()),Y(e),e=Q()}while('"'===e||"'"===e);return t.join("")}function x(e){var t=G();switch(o(t)){case"'":case'"':return X(t),k();case"true":return!0;case"false":return!1}try{return S(t)}catch(r){if(e&&i(t))return t;throw O(t,"value")}}function j(){var e=A(G()),t=e;return Y("to",!0)&&(t=A(G())),Y(";"),[e,t]}function S(e){var t=1;"-"===e.charAt(0)&&(t=-1,e=e.substring(1));var r=o(e);switch(r){case"inf":return t*(1/0);case"nan":return NaN;case"0":return 0}if(/^[1-9][0-9]*$/.test(e))return t*parseInt(e,10);if(/^0[x][0-9a-f]+$/.test(r))return t*parseInt(e,16);if(/^0[0-7]+$/.test(e))return t*parseInt(e,8);if(/^(?!e)[0-9]*(?:\.[0-9]*)?(?:[e][+-]?[0-9]+)?$/.test(r))return t*parseFloat(e);throw O(e,"number")}function A(e,t){var r=o(e);switch(r){case"max":return 536870911;case"0":return 0}if("-"===e.charAt(0)&&!t)throw O(e,"id");if(/^-?[1-9][0-9]*$/.test(e))return parseInt(e,10);if(/^-?0[x][0-9a-f]+$/.test(r))return parseInt(e,16);if(/^-?0[0-7]+$/.test(e))return parseInt(e,8);throw O(e,"id")}function N(){if(H!==t)throw O("package");if(H=G(),!i(H))throw O(H,"name");ie=ie.define(H),Y(";")}function T(){var e,t=Q();switch(t){case"weak":e=Z||(Z=[]),G();break;case"public":G();default:e=_||(_=[])}t=k(),Y(";"),e.push(t)}function E(){if(Y("="),W=o(k()),re="proto3"===W,!re&&"proto2"!==W)throw O(W,"syntax");Y(";")}function J(e,t){switch(t){case"option":return F(e,t),Y(";"),!0;case"message":return D(e,t),!0;case"enum":return B(e,t),!0;case"service":return C(e,t),!0;case"extend":return U(e,t),!0}return!1}function D(e,t){var r=G();if(!n(r))throw O(r,"type name");var s=new h(r);if(s.comment=ee(),Y("{",!0)){for(;"}"!==(t=G());){var u=o(t);if(!J(s,t))switch(u){case"map":$(s,u);break;case"required":case"optional":case"repeated":L(s,u);break;case"oneof":q(s,u);break;case"extensions":(s.extensions||(s.extensions=[])).push(j(s,u));break;case"reserved":(s.reserved||(s.reserved=[])).push(j(s,u));break;default:if(!re||!i(t))throw O(t);X(t),L(s,"optional")}}Y(";",!0)}else Y(";");e.add(s)}function L(e,r,s){var o=G();if("group"===o)return z(e,r),t;if(!i(o))throw O(o,"type");var u=G();if(!n(u))throw O(u,"name");u=se(u),Y("=");var a=new c(u,A(G()),o,r,s),f=K.line();a.comment=ee(),R(a),a.comment||(a.comment=ee(f)),a.repeated&&g.packed[o]!==t&&!re&&a.setOption("packed",!1,!0),e.add(a)}function z(e,t){var r=G();if(!n(r))throw O(r,"name");var i=b.lcFirst(r);r===i&&(r=b.ucFirst(r)),Y("=");var s=A(G()),u=new h(r);u.group=!0,u.comment=ee();var a=new c(i,s,r,t);for(Y("{");"}"!==(ne=G());)switch(ne=o(ne)){case"option":F(u,ne),Y(";");break;case"required":case"optional":case"repeated":L(u,ne);break;default:throw O(ne)}Y(";",!0),e.add(u).add(a)}function $(e){Y("<");var r=G();if(g.mapKey[r]===t)throw O(r,"type");Y(",");var s=G();if(!i(s))throw O(s,"type");Y(">");var o=G();if(!n(o))throw O(o,"name");o=se(o),Y("=");var u=new p(o,A(G()),r,s),a=K.line();u.comment=ee(),R(u),u.comment||(u.comment=ee(a)),e.add(u)}function q(e,t){var r=G();if(!n(r))throw O(r,"name");r=se(r);var i=new d(r),s=K.line();if(i.comment=ee(),Y("{",!0)){for(;"}"!==(t=G());)"option"===t?(F(i,t),Y(";")):(X(t),L(i,"optional"));Y(";",!0)}else Y(";"),i.comment||(i.comment=ee(s));e.add(i)}function B(e,t){var r=G();if(!n(r))throw O(r,"name");var i=new y(r);if(i.comment=ee(),Y("{",!0)){
for(;"}"!==(t=G());)"option"===o(t)?(F(i,t),Y(";")):I(i,t);Y(";",!0)}else Y(";");e.add(i)}function I(e,t){if(!n(t))throw O(t,"name");var r=t;Y("=");var i=A(G(),!0),s=K.line();e.add(r,i,ee()),R({}),e.comments[r]||(e.comments[r]=ee(s))}function F(e,t){var r=Y("(",!0),n=G();if(!i(n))throw O(n,"name");r&&(Y(")"),n="("+n+")",t=Q(),s(t)&&(n+=t,G())),Y("="),V(e,n)}function V(e,t){if(Y("{",!0))for(;"}"!==(ne=G());){if(!n(ne))throw O(ne,"name");Y(":",!0)?P(e,t+"."+ne,x(!0)):V(e,t+"."+ne)}else P(e,t,x(!0))}function P(e,t,r){e.setOption?e.setOption(t,r):e[t]=r}function R(e){if(Y("[",!0)){do F(e,"option");while(Y(",",!0));Y("]")}return Y(";"),e}function C(e,t){if(t=G(),!n(t))throw O(t,"service name");var r=t,i=new v(r);if(i.comment=ee(),Y("{",!0)){for(;"}"!==(t=G());){var s=o(t);switch(s){case"option":F(i,s),Y(";");break;case"rpc":M(i,s);break;default:throw O(t)}}Y(";",!0)}else Y(";");e.add(i)}function M(e,t){var r=t,s=G();if(!n(s))throw O(s,"name");var u,a,f,l;Y("(");var h;if(Y(h="stream",!0)&&(a=!0),!i(t=G()))throw O(t);if(u=t,Y(")"),Y("returns"),Y("("),Y(h,!0)&&(l=!0),!i(t=G()))throw O(t);f=t,Y(")");var c=new m(s,r,u,f,a,l),p=K.line();if(c.comment=ee(),Y("{",!0)){for(;"}"!==(t=G());){var d=o(t);switch(d){case"option":F(c,d),Y(";");break;default:throw O(t)}}Y(";",!0)}else Y(";"),c.comment||(c.comment=ee(p));e.add(c)}function U(e,t){var r=G();if(!i(r))throw O(r,"reference");if(Y("{",!0)){for(;"}"!==(t=G());){var n=o(t);switch(n){case"required":case"repeated":case"optional":L(e,n,r);break;default:if(!re||!i(t))throw O(t);X(t),L(e,"optional",r)}}Y(";",!0)}else Y(";")}r instanceof l||(w=r,r=new l),w||(w=a.defaults);var H,_,Z,W,K=f(e),G=K.next,X=K.push,Q=K.peek,Y=K.skip,ee=K.cmnt,te=!0,re=!1;r||(r=new l);for(var ne,ie=r,se=w.keepCase?function(e){return e}:u;null!==(ne=G());){var oe=o(ne);switch(oe){case"package":if(!te)throw O(ne);N();break;case"import":if(!te)throw O(ne);T();break;case"syntax":if(!te)throw O(ne);E();break;case"option":if(!te)throw O(ne);F(ie,ne),Y(";");break;default:if(J(ie,ne)){te=!1;continue}throw O(ne)}}return a.filename=null,{package:H,imports:_,weakImports:Z,syntax:W,root:r}}r.exports=a,a.filename=null,a.defaults={keepCase:!1};var f=e(31),l=e(27),h=e(32),c=e(17),p=e(18),d=e(23),y=e(16),v=e(30),m=e(20),g=e(33),b=e(34)},{16:16,17:17,18:18,20:20,23:23,27:27,30:30,31:31,32:32,33:33,34:34}],25:[function(e,t){function r(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function n(e){this.buf=e,this.pos=0,this.len=e.length}function i(){var e=new w(0,0),t=0;if(this.len-this.pos>4){for(t=0;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e}else{for(t=0;t<4;++t){if(this.pos>=this.len)throw r(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}if(this.pos>=this.len)throw r(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e}if(this.len-this.pos>4){for(t=0;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(t=0;t<5;++t){if(this.pos>=this.len)throw r(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function s(){return i.call(this).toLong()}function o(){return i.call(this).toNumber()}function u(){return i.call(this).toLong(!0)}function a(){return i.call(this).toNumber(!0)}function f(){return i.call(this).zzDecode().toLong()}function l(){return i.call(this).zzDecode().toNumber()}function h(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function c(){if(this.pos+8>this.len)throw r(this,8);return new w(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}function p(){return c.call(this).toLong(!0)}function d(){return c.call(this).toNumber(!0)}function y(){return c.call(this).zzDecode().toLong()}function v(){return c.call(this).zzDecode().toNumber()}function m(){b.Long?(k.int64=s,k.uint64=u,k.sint64=f,k.fixed64=p,k.sfixed64=y):(k.int64=o,k.uint64=a,k.sint64=l,k.fixed64=d,k.sfixed64=v)}t.exports=n;var g,b=e(36),w=b.LongBits,O=b.utf8;n.create=b.Buffer?function(t){return g||(g=e(26)),(n.create=function(e){return b.Buffer.isBuffer(e)?new g(e):new n(e)})(t)}:function(e){return new n(e)};var k=n.prototype;k.h=b.Array.prototype.subarray||b.Array.prototype.slice,k.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,r(this,10);return e}}(),k.int32=function(){return 0|this.uint32()},k.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},k.bool=function(){return 0!==this.uint32()},k.fixed32=function(){if(this.pos+4>this.len)throw r(this,4);return h(this.buf,this.pos+=4)},k.sfixed32=function(){var e=this.fixed32();return e>>>1^-(1&e)};var x="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],e[0]}:function(r,n){return t[3]=r[n],t[2]=r[n+1],t[1]=r[n+2],t[0]=r[n+3],e[0]}}():function(e,t){var r=h(e,t+4),n=2*(r>>31)+1,i=r>>>23&255,s=8388607&r;return 255===i?s?NaN:n*(1/0):0===i?1.401298464324817e-45*n*s:n*Math.pow(2,i-150)*(s+8388608)};k.float=function(){if(this.pos+4>this.len)throw r(this,4);var e=x(this.buf,this.pos);return this.pos+=4,e};var j="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n){return t[0]=r[n],t[1]=r[n+1],t[2]=r[n+2],t[3]=r[n+3],t[4]=r[n+4],t[5]=r[n+5],t[6]=r[n+6],t[7]=r[n+7],e[0]}:function(r,n){return t[7]=r[n],t[6]=r[n+1],t[5]=r[n+2],t[4]=r[n+3],t[3]=r[n+4],t[2]=r[n+5],t[1]=r[n+6],t[0]=r[n+7],e[0]}}():function(e,t){var r=h(e,t+4),n=h(e,t+8),i=2*(n>>31)+1,s=n>>>20&2047,o=4294967296*(1048575&n)+r;return 2047===s?o?NaN:i*(1/0):0===s?5e-324*i*o:i*Math.pow(2,s-1075)*(o+4503599627370496)};k.double=function(){if(this.pos+8>this.len)throw r(this,4);var e=j(this.buf,this.pos);return this.pos+=8,e},k.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw r(this,e);return this.pos+=e,t===n?new this.buf.constructor(0):this.h.call(this.buf,t,n)},k.string=function(){var e=this.bytes();return O.read(e,0,e.length)},k.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw r(this,e);this.pos+=e}else do if(this.pos>=this.len)throw r(this);while(128&this.buf[this.pos++]);return this},k.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){if(4===(e=7&this.uint32()))break;this.skipType(e)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},n.i=m,m()},{26:26,36:36}],26:[function(e,t){function r(e){n.call(this,e)}t.exports=r;var n=e(25),i=r.prototype=Object.create(n.prototype);i.constructor=r;var s=e(36);s.Buffer&&(i.h=s.Buffer.prototype.slice),i.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}},{25:25,36:36}],27:[function(e,r){function n(e){o.call(this,"",e),this.deferred=[],this.files=[]}function i(){}function s(e){var r=e.parent.lookup(e.extend);if(r){var n=new l(e.fullName,e.id,e.type,e.rule,t,e.options);return n.declaringField=e,e.extensionField=n,r.add(n),!0}return!1}r.exports=n;var o=e(21),u=o.extend(n);n.className="Root";var a,f,l=e(17),h=e(34);n.fromJSON=function(e,t){return t||(t=new n),t.setOptions(e.options).addJSON(e.nested)},u.resolvePath=h.path.resolve;var c=function(){try{a=e(24),f=e(12)}catch(e){}c=null};u.load=function e(r,n,s){function o(e,t){if(s){var r=s;if(s=null,d)throw e;r(e,t)}}function u(e,r){try{if(h.isString(r)&&"{"===r.charAt(0)&&(r=JSON.parse(r)),h.isString(r)){a.filename=e;var i=a(r,p,n);i.imports&&i.imports.forEach(function(t){l(p.resolvePath(e,t))}),i.weakImports&&i.weakImports.forEach(function(t){l(p.resolvePath(e,t),!0)})}else p.setOptions(r.options).addJSON(r.nested)}catch(e){if(d)throw e;return o(e),t}d||y||o(null,p)}function l(e,r){var n=e.lastIndexOf("google/protobuf/");if(n>-1){var i=e.substring(n);i in f&&(e=i)}if(!(p.files.indexOf(e)>-1)){if(p.files.push(e),e in f)return d?u(e,f[e]):(++y,setTimeout(function(){--y,u(e,f[e])})),t;if(d){var a;try{a=h.fs.readFileSync(e).toString("utf8")}catch(e){return r||o(e),t}u(e,a)}else++y,h.fetch(e,function(n,i){if(--y,s)return n?(r||o(n),t):(u(e,i),t)})}}c&&c(),"function"==typeof n&&(s=n,n=t);var p=this;if(!s)return h.asPromise(e,p,r);var d=s===i,y=0;return h.isString(r)&&(r=[r]),r.forEach(function(e){l(p.resolvePath("",e))}),d?p:(y||o(null,p),t)},u.loadSync=function(e,t){if(!h.isNode)throw Error("not supported");return this.load(e,t,i)},u.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(e){return"'extend "+e.extend+"' in "+e.parent.fullName}).join(", "));return o.prototype.resolveAll.call(this)},u.e=function(e){var r=this.deferred.slice();this.deferred=[];for(var n=0;n<r.length;)s(r[n])?r.splice(n,1):++n;if(this.deferred=r,e instanceof l&&e.extend!==t&&!e.extensionField&&!s(e)&&this.deferred.indexOf(e)<0)this.deferred.push(e);else if(e instanceof o){var i=e.nestedArray;for(n=0;n<i.length;++n)this.e(i[n])}},u.f=function(e){if(e instanceof l){if(e.extend!==t&&!e.extensionField){var r=this.deferred.indexOf(e);r>-1&&this.deferred.splice(r,1)}e.extensionField&&(e.extensionField.parent.remove(e.extensionField),e.extensionField=null)}else if(e instanceof o)for(var n=e.nestedArray,i=0;i<n.length;++i)this.f(n[i])}},{12:12,17:17,21:21,24:24,34:34}],28:[function(e,t,r){var n=r;n.Service=e(29)},{29:29}],29:[function(e,t){function r(e){n.call(this),this.$rpc=e}t.exports=r;var n=e(34).EventEmitter;(r.prototype=Object.create(n.prototype)).constructor=r,r.prototype.end=function(e){return this.$rpc&&(e||this.$rpc(null,null,null),this.$rpc=null,this.emit("end").off()),this}},{34:34}],30:[function(e,r){function n(e,t){s.call(this,e,t),this.methods={},this.j=null}function i(e){return e.j=null,e}r.exports=n;var s=e(21),o=s.prototype,u=s.extend(n);n.className="Service";var a=e(20),f=e(34),l=e(28);n.testJSON=function(e){return!(!e||!e.methods)},n.fromJSON=function(e,t){var r=new n(e,t.options);return t.methods&&Object.keys(t.methods).forEach(function(e){r.add(a.fromJSON(e,t.methods[e]))}),r},Object.defineProperty(u,"methodsArray",{get:function(){return this.j||(this.j=f.toArray(this.methods))}}),u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||t,methods:s.arrayToJSON(this.methodsArray)||{},nested:e&&e.nested||t}},u.get=function(e){return o.get.call(this,e)||this.methods[e]||null},u.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return o.resolve.call(this)},u.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof a?(this.methods[e.name]=e,e.parent=this,i(this)):o.add.call(this,e)},u.remove=function(e){if(e instanceof a){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,i(this)}return o.remove.call(this,e)},u.create=function(e,r,n){var i=new l.Service(e);return this.methodsArray.forEach(function(s){i[f.lcFirst(s.name)]=function(o,u){if(i.$rpc){if(!o)throw TypeError("request must not be null");s.resolve();var a;try{a=(r?s.resolvedRequestType.encodeDelimited(o):s.resolvedRequestType.encode(o)).finish()}catch(e){return("function"==typeof setImmediate?setImmediate:setTimeout)(function(){u(e)}),t}e(s,a,function(e,r){if(e)return i.emit("error",e,s),u?u(e):t;if(null===r)return i.end(!0),t;var o;try{o=n?s.resolvedResponseType.decodeDelimited(r):s.resolvedResponseType.decode(r)}catch(e){return i.emit("error",e,s),u?u("error",e):t}return i.emit("data",o,s),u?u(null,o):t})}}}),i}},{20:20,21:21,28:28,34:34}],31:[function(e,r){function n(e){return e.replace(/\\(.?)/g,function(e,t){switch(t){case"\\":case"":return t;case"0":return"\0";default:return t}})}function i(e){function r(e){return Error("illegal "+e+" (line "+v+")")}function i(){var t="'"===O?u:o;t.lastIndex=d-1;var i=t.exec(e);if(!i)throw r("string");return d=t.lastIndex,h(O),O=null,n(i[1])}function a(t){return e.charAt(t)}function f(t,r){m=e.charAt(t++),b=v,g=e.substring(t,r).split(/\n/g).map(function(e){return e.replace(/ *[*\/]+ */,"").trim()}).join("\n").trim()}function l(){if(w.length>0)return w.shift();if(O)return i();var t,n,o,u,l;do{if(d===y)return null;for(t=!1;/\s/.test(o=a(d));)if("\n"===o&&++v,++d===y)return null;if("/"===a(d)){if(++d===y)throw r("comment");if("/"===a(d)){for(l="/"===a(u=d+1);"\n"!==a(++d);)if(d===y)return null;++d,l&&f(u,d-1),++v,t=!0}else{if("*"!==(o=a(d)))return"/";l="*"===a(u=d+1);do{if("\n"===o&&++v,++d===y)return null;n=o,o=a(d)}while("*"!==n||"/"!==o);++d,l&&f(u,d-2),t=!0}}}while(t);if(d===y)return null;var h=d;s.lastIndex=0;var c=s.test(a(h++));if(!c)for(;h<y&&!s.test(a(h));)++h;var p=e.substring(d,d=h);return'"'!==p&&"'"!==p||(O=p),p}function h(e){w.push(e)}function c(){if(!w.length){var e=l();if(null===e)return null;h(e)}return w[0]}function p(e,t){var n=c(),i=n===e;if(i)return l(),!0;if(!t)throw r("token '"+n+"', '"+e+"' expected");return!1}e=""+e;var d=0,y=e.length,v=1,m=null,g=null,b=0,w=[],O=null;return{next:l,peek:c,push:h,skip:p,line:function(){return v},cmnt:function(e){var r;return e===t?r=b===v-1&&g||null:(g||c(),r=b===e&&"/"===m&&g||null),r&&(m=g=null,b=0),r}}}r.exports=i;var s=/[\s{}=;:[\],'"()<>]/g,o=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,u=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g},{}],32:[function(e,r){function n(e,r){s.call(this,e,r),this.fields={},this.oneofs=t,this.extensions=t,this.reserved=t,this.group=t,this.k=null,this.g=null,this.l=null,this.m=null}function i(e){return e.k=e.g=e.l=e.m=null,delete e.encode,delete e.decode,delete e.verify,e}r.exports=n;var s=e(21),o=s.prototype,u=s.extend(n);n.className="Type";var a=e(16),f=e(23),l=e(17),h=e(30),c=e(11),p=e(19),d=e(25),y=e(38),v=e(34),m=e(15),g=e(14),b=e(37),w=e(13),O=[a,n,l,h];n.testJSON=function(e){return!(!e||!e.fields)},n.fromJSON=function(e,r){var i=new n(e,r.options);return i.extensions=r.extensions,i.reserved=r.reserved,r.fields&&Object.keys(r.fields).forEach(function(e){i.add(l.fromJSON(e,r.fields[e]))}),r.oneofs&&Object.keys(r.oneofs).forEach(function(e){i.add(f.fromJSON(e,r.oneofs[e]))}),r.nested&&Object.keys(r.nested).forEach(function(e){for(var n=r.nested[e],s=0;s<O.length;++s)if(O[s].testJSON(n))return i.add(O[s].fromJSON(e,n)),t;throw Error("invalid nested object in "+i+": "+e)}),r.extensions&&r.extensions.length&&(i.extensions=r.extensions),r.reserved&&r.reserved.length&&(i.reserved=r.reserved),r.group&&(i.group=!0),i},Object.defineProperties(u,{fieldsById:{get:function(){if(this.k)return this.k;this.k={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var r=this.fields[e[t]],n=r.id;if(this.k[n])throw Error("duplicate id "+n+" in "+this);this.k[n]=r}return this.k}},fieldsArray:{get:function(){return this.g||(this.g=v.toArray(this.fields))}},oneofsArray:{get:function(){return this.l||(this.l=v.toArray(this.oneofs))}},ctor:{get:function(){return this.m||(this.m=c.create(this).constructor)},set:function(e){if(e&&!(e.prototype instanceof p))throw TypeError("ctor must be a Message constructor");e.from||(e.from=p.from),this.m=e}}}),u.toJSON=function(){var e=o.toJSON.call(this);return{options:e&&e.options||t,oneofs:s.arrayToJSON(this.oneofsArray),fields:s.arrayToJSON(this.fieldsArray.filter(function(e){return!e.declaringField}))||{},extensions:this.extensions&&this.extensions.length?this.extensions:t,reserved:this.reserved&&this.reserved.length?this.reserved:t,group:this.group||t,nested:e&&e.nested||t}},u.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var r=this.oneofsArray;for(t=0;t<r.length;)r[t++].resolve();return o.resolve.call(this)},u.get=function(e){return o.get.call(this,e)||this.fields&&this.fields[e]||this.oneofs&&this.oneofs[e]||null},u.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof l&&e.extend===t){if(this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),i(this)}return e instanceof f?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),i(this)):o.add.call(this,e)},u.remove=function(e){if(e instanceof l&&e.extend===t){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),i(this)}if(e instanceof f){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),i(this)}return o.remove.call(this,e)},u.create=function(e){return new this.ctor(e)},u.setup=function(){var e=this.fullName,t=this.fieldsArray.map(function(e){return e.resolve().resolvedType});return this.encode=m(this).eof(e+"$encode",{Writer:y,types:t,util:v}),this.decode=g(this).eof(e+"$decode",{Reader:d,types:t,util:v}),this.verify=b(this).eof(e+"$verify",{types:t,util:v}),this.fromObject=this.from=w.fromObject(this).eof(e+"$fromObject",{types:t,util:v}),this.toObject=w.toObject(this).eof(e+"$toObject",{types:t,util:v}),this},u.encode=function(e,t){return this.setup().encode(e,t)},u.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},u.decode=function(e,t){return this.setup().decode(e,t)},u.decodeDelimited=function(e){return e instanceof d||(e=d.create(e)),this.decode(e,e.uint32())},u.verify=function(e){return this.setup().verify(e)},u.fromObject=function(e){return this.setup().fromObject(e)},u.from=u.fromObject,u.toObject=function(e,t){return this.setup().toObject(e,t)}},{11:11,13:13,14:14,15:15,16:16,17:17,19:19,21:21,23:23,25:25,30:30,34:34,37:37,38:38}],33:[function(e,t,r){function n(e,t){var r=0,n={};for(t|=0;r<e.length;)n[o[r+t]]=e[r++];return n}var i=r,s=e(34),o=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];i.basic=n([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),i.defaults=n([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",s.emptyArray,null]),i.long=n([0,0,0,1,1],7),i.mapKey=n([0,0,0,5,5,0,0,0,1,1,0,2],2),i.packed=n([1,5,0,0,0,5,5,0,0,0,1,1,0])},{34:34}],34:[function(e,t){var r=t.exports=e(36);r.asPromise=e(1),r.codegen=e(3),r.EventEmitter=e(4),r.extend=e(5),r.fetch=e(6),r.path=e(8),r.fs=r.inquire("fs"),r.toArray=function(e){return e?Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]}):[]},r.safeProp=function(e){return'["'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"]'},r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)}},{1:1,3:3,36:36,4:4,5:5,6:6,8:8}],35:[function(e,t){function r(e,t){this.lo=e,this.hi=t}t.exports=r;var n=e(36),i=r.prototype,s=r.zero=new r(0,0);s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1};var o=r.zeroHash="\0\0\0\0\0\0\0\0";r.fromNumber=function(e){if(0===e)return s;var t=e<0;t&&(e=-e);var n=e>>>0,i=(e-n)/4294967296>>>0;return t&&(i=~i>>>0,n=~n>>>0,++n>4294967295&&(n=0,++i>4294967295&&(i=0))),new r(n,i)},r.from=function(e){if("number"==typeof e)return r.fromNumber(e);if("string"==typeof e){if(!n.Long)return r.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new r(e.low>>>0,e.high>>>0):s},i.toNumber=function(e){if(!e&&this.hi>>>31){var t=~this.lo+1>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},i.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,(!!e)):{low:0|this.lo,high:0|this.hi,unsigned:!!e}};var u=String.prototype.charCodeAt;r.fromHash=function(e){return e===o?s:new r((u.call(e,0)|u.call(e,1)<<8|u.call(e,2)<<16|u.call(e,3)<<24)>>>0,(u.call(e,4)|u.call(e,5)<<8|u.call(e,6)<<16|u.call(e,7)<<24)>>>0)},i.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)},i.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},i.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},i.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},{36:36}],36:[function(r,n,i){var s=i;s.base64=r(2),s.inquire=r(7),s.utf8=r(10),s.pool=r(9),s.emptyArray=Object.freeze?Object.freeze([]):[],s.emptyObject=Object.freeze?Object.freeze({}):{},s.isNode=!!(e.process&&e.process.versions&&e.process.versions.node),s.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},s.isString=function(e){return"string"==typeof e||e instanceof String},s.isObject=function(e){return e&&"object"==typeof e},s.Buffer=function(){try{var e=s.inquire("buffer").Buffer;return e.prototype.utf8Write?(e.from||(e.from=function(t,r){return new e(t,r)}),e.allocUnsafe||(e.allocUnsafe=function(t){return new e(t)}),e):null}catch(e){return null}}(),s.newBuffer=function(e){return"number"==typeof e?s.Buffer?s.Buffer.allocUnsafe(e):new s.Array(e):s.Buffer?s.Buffer.from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},s.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,s.LongBits=r(35),s.Long=e.dcodeIO&&e.dcodeIO.Long||s.inquire("long"),s.longToHash=function(e){return e?s.LongBits.from(e).toHash():s.LongBits.zeroHash},s.longFromHash=function(e,t){var r=s.LongBits.fromHash(e);return s.Long?s.Long.fromBits(r.lo,r.hi,t):r.toNumber(!!t)},s.merge=function(e,r,n){for(var i=Object.keys(r),s=0;s<i.length;++s)e[i[s]]!==t&&n||(e[i[s]]=r[i[s]]);return e},s.oneOfGetter=function(e){var r={};return e.forEach(function(e){r[e]=1}),function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(1===r[e[n]]&&this[e[n]]!==t&&null!==this[e[n]])return e[n]}},s.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},s.lazyResolve=function(e,t){t.forEach(function(t){Object.keys(t).forEach(function(r){for(var n=t[r|=0].split("."),i=e;n.length;)i=i[n.shift()];t[r]=i})})},s.toJSONOptions={longs:String,enums:String,bytes:String}},{10:10,2:2,35:35,7:7,9:9}],37:[function(e,t){function r(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function n(e,t,n,i){if(t.resolvedType)if(t.resolvedType instanceof o){e("switch(%s){",i)("default:")("return%j",r(t,"enum value"));for(var s=u.toArray(t.resolvedType.values),a=0;a<s.length;++a)e("case %d:",s[a]);e("break")("}")}else e("var e=types[%d].verify(%s);",n,i)("if(e)")("return%j+e",t.name+".");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",i)("return%j",r(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",i,i,i,i)("return%j",r(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',i)("return%j",r(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',i)("return%j",r(t,"boolean"));break;case"string":e("if(!util.isString(%s))",i)("return%j",r(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',i,i,i)("return%j",r(t,"buffer"))}return e}function i(e,t,n){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!/^-?(?:0|[1-9][0-9]*)$/.test(%s))",n)("return%j",r(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/.test(%s))",n)("return%j",r(t,"integer|Long key"));break;case"bool":e("if(!/^true|false|0|1$/.test(%s))",n)("return%j",r(t,"boolean key"))}return e}function s(e){var t=e.fieldsArray;if(!t.length)return u.codegen()("return null");for(var s=u.codegen("m"),a=0;a<t.length;++a){var f=t[a].resolve(),l="m"+u.safeProp(f.name);f.map?(s("if(%s!==undefined){",l)("if(!util.isObject(%s))",l)("return%j",r(f,"object"))("var k=Object.keys(%s)",l)("for(var i=0;i<k.length;++i){"),i(s,f,"k[i]"),n(s,f,a,l+"[k[i]]")("}")("}")):f.repeated?(s("if(%s!==undefined){",l)("if(!Array.isArray(%s))",l)("return%j",r(f,"array"))("for(var i=0;i<%s.length;++i){",l),n(s,f,a,l+"[i]")("}")("}")):(f.required||(!f.resolvedType||f.resolvedType instanceof o?s("if(%s!==undefined){",l):s("if(%s!==undefined&&%s!==null){",l,l)),n(s,f,a,l),f.required||s("}"))}return s("return null")}t.exports=s;var o=e(16),u=e(34)},{16:16,34:34}],38:[function(e,r){function n(e,r,n){this.fn=e,this.len=r,this.next=t,this.val=n}function i(){}function s(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function o(){this.len=0,this.head=new n(i,0,0),this.tail=this.head,this.states=null}function u(e,t,r){t[r]=255&e}function a(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e}function f(e,r){this.len=e,this.next=t,this.val=r}function l(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function h(e,t,r){t[r++]=255&e,t[r++]=e>>>8&255,t[r++]=e>>>16&255,t[r]=e>>>24}r.exports=o;var c,p=e(36),d=p.LongBits,y=p.base64,v=p.utf8;o.create=p.Buffer?function(){return c||(c=e(39)),(o.create=function(){return new c})()}:function(){return new o},o.alloc=function(e){return new p.Array(e)},p.Array!==Array&&(o.alloc=p.pool(o.alloc,p.Array.prototype.subarray));var m=o.prototype;m.push=function(e,t,r){return this.tail=this.tail.next=new n(e,t,r),this.len+=t,this},f.prototype=Object.create(n.prototype),f.prototype.fn=a,m.uint32=function(e){return this.len+=(this.tail=this.tail.next=new f((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},m.int32=function(e){return e<0?this.push(l,10,d.fromNumber(e)):this.uint32(e)},m.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},m.uint64=function(e){var t=d.from(e);return this.push(l,t.length(),t)},m.int64=m.uint64,m.sint64=function(e){var t=d.from(e).zzEncode();return this.push(l,t.length(),t)},m.bool=function(e){return this.push(u,1,e?1:0)},m.fixed32=function(e){return this.push(h,4,e>>>0)},m.sfixed32=function(e){return this.push(h,4,e<<1^e>>31)},m.fixed64=function(e){var t=d.from(e);return this.push(h,4,t.lo).push(h,4,t.hi)},m.sfixed64=function(e){var t=d.from(e).zzEncode();return this.push(h,4,t.lo).push(h,4,t.hi)};var g="undefined"!=typeof Float32Array?function(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[3]?function(r,n,i){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i]=t[3]}:function(r,n,i){e[0]=r,n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,r){var n=e<0?1:0;if(n&&(e=-e),0===e)h(1/e>0?0:2147483648,t,r);else if(isNaN(e))h(2147483647,t,r);else if(e>3.4028234663852886e38)h((n<<31|2139095040)>>>0,t,r);else if(e<1.1754943508222875e-38)h((n<<31|Math.round(e/1.401298464324817e-45))>>>0,t,r);else{var i=Math.floor(Math.log(e)/Math.LN2),s=8388607&Math.round(e*Math.pow(2,-i)*8388608);h((n<<31|i+127<<23|s)>>>0,t,r)}};m.float=function(e){return this.push(g,4,e)};var b="undefined"!=typeof Float64Array?function(){var e=new Float64Array(1),t=new Uint8Array(e.buffer);return e[0]=-0,t[7]?function(r,n,i){e[0]=r,n[i++]=t[0],n[i++]=t[1],n[i++]=t[2],n[i++]=t[3],n[i++]=t[4],n[i++]=t[5],n[i++]=t[6],n[i]=t[7]}:function(r,n,i){e[0]=r,n[i++]=t[7],n[i++]=t[6],n[i++]=t[5],n[i++]=t[4],n[i++]=t[3],n[i++]=t[2],n[i++]=t[1],n[i]=t[0]}}():function(e,t,r){var n=e<0?1:0;if(n&&(e=-e),0===e)h(0,t,r),h(1/e>0?0:2147483648,t,r+4);else if(isNaN(e))h(4294967295,t,r),h(2147483647,t,r+4);else if(e>1.7976931348623157e308)h(0,t,r),h((n<<31|2146435072)>>>0,t,r+4);else{var i;if(e<2.2250738585072014e-308)i=e/5e-324,h(i>>>0,t,r),h((n<<31|i/4294967296)>>>0,t,r+4);else{var s=Math.floor(Math.log(e)/Math.LN2);1024===s&&(s=1023),i=e*Math.pow(2,-s),h(4503599627370496*i>>>0,t,r),h((n<<31|s+1023<<20|1048576*i&1048575)>>>0,t,r+4)}}};m.double=function(e){return this.push(b,8,e)};var w=p.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};m.bytes=function(e){var t=e.length>>>0;if("string"==typeof e&&t){var r=o.alloc(t=y.length(e));y.decode(e,r,0),e=r}return t?this.uint32(t).push(w,t,e):this.push(u,1,0)},m.string=function(e){var t=v.length(e);return t?this.uint32(t).push(v.write,t,e):this.push(u,1,0)},m.fork=function(){return this.states=new s(this),this.head=this.tail=new n(i,0,0),this.len=0,this},m.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(i,0,0),this.len=0),this},m.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},m.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t}},{36:36,39:39}],39:[function(e,t){function r(){i.call(this)}function n(e,t,r){e.length<40?o.utf8.write(e,t,r):t.utf8Write(e,r)}t.exports=r;var i=e(38),s=r.prototype=Object.create(i.prototype);s.constructor=r;var o=e(36),u=o.Buffer;r.alloc=function(e){return(r.alloc=u.allocUnsafe)(e)};var a=u&&u.prototype instanceof Uint8Array&&"set"===u.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n<e.length;)t[r++]=e[n++]};s.bytes=function(e){"string"==typeof e&&(e=u.from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this.push(a,t,e),this},s.string=function(e){var t=u.byteLength(e);return this.uint32(t),t&&this.push(n,t,e),this}},{36:36,38:38}],40:[function(t,r,n){function i(e,t,r){return"function"==typeof t?(r=t,t=new u.Root):t||(t=new u.Root),t.load(e,r)}function s(e,t){return t||(t=new u.Root),t.loadSync(e)}function o(){u.Reader.i()}var u=e.protobuf=n;u.load=i,u.loadSync=s,u.roots={};try{u.tokenize=t(31),u.parse=t(24),u.common=t(12)}catch(e){}u.Writer=t(38),u.BufferWriter=t(39),u.Reader=t(25),u.BufferReader=t(26),u.encoder=t(15),u.decoder=t(14),u.verifier=t(37),u.converter=t(13),u.ReflectionObject=t(22),u.Namespace=t(21),u.Root=t(27),u.Enum=t(16),u.Type=t(32),u.Field=t(17),u.OneOf=t(23),u.MapField=t(18),u.Service=t(30),u.Method=t(20),u.Class=t(11),u.Message=t(19),u.types=t(33),u.rpc=t(28),u.util=t(34),u.configure=o,"function"==typeof define&&define.amd&&define(["long"],function(e){return e&&(u.util.Long=e,o()),u})},{11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,30:30,31:31,32:32,33:33,34:34,37:37,38:38,39:39}]},{},[40])}("object"==typeof window&&window||"object"==typeof self&&self||this);
//# sourceMappingURL=protobuf.min.js.map
/*!
* protobuf.js v6.5.0 (c) 2016, Daniel Wirtz
* Compiled Tue, 17 Jan 2017 04:40:35 UTC
* protobuf.js v6.5.1 (c) 2016, Daniel Wirtz
* Compiled Wed, 18 Jan 2017 02:28:43 UTC
* Licensed under the BSD-3-Clause License

@@ -1483,2 +1483,3 @@ * see: https://github.com/dcodeIO/protobuf.js for details

// Use Uint8Array buffer pool in the browser, just like node does with buffers
/* istanbul ignore else */
if (util.Array !== Array)

@@ -1485,0 +1486,0 @@ Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);

/*!
* protobuf.js v6.5.0 (c) 2016, Daniel Wirtz
* Compiled Tue, 17 Jan 2017 04:40:35 UTC
* protobuf.js v6.5.1 (c) 2016, Daniel Wirtz
* Compiled Wed, 18 Jan 2017 02:28:43 UTC
* Licensed under the BSD-3-Clause License

@@ -5,0 +5,0 @@ * see: https://github.com/dcodeIO/protobuf.js for details

{
"name": "protobufjs",
"version": "6.5.0",
"version": "6.5.1",
"description": "Protocol Buffers for JavaScript (& TypeScript).",

@@ -31,3 +31,3 @@ "author": "Daniel Wirtz <dcode+protobufjs@dcode.io>",

"changelog": "node scripts/changelog -w",
"coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js",
"coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js tests/node/*.js",
"docs": "jsdoc -c jsdoc.docs.json -R README.md",

@@ -34,0 +34,0 @@ "lint": "eslint src runtime",

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

```
$> npm install protobufjs
$> npm install protobufjs [--save --save-prefix=~]
```
**Note:** protobuf.js uses a [semver](https://semver.org)-incompatible versioning scheme currently. For API compatibility, just prefix its version with a `~` instead of a `^` in your package.json's dependencies. If you want to access the semver website, just prefix its address with `http:` instead of `https:`.
```js

@@ -65,0 +67,0 @@ var protobuf = require("protobufjs");

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

*/
this.long = util.Long ? types.long[type] !== undefined : false;
this.long = util.Long ? types.long[type] !== undefined : /* istanbul ignore next */ false;

@@ -241,5 +241,4 @@ /**

this.typeDefault = null;
else if (this.resolvedType = this.parent.lookup(this.type, Enum))
else /* istanbul ignore else */ if (this.resolvedType = this.parent.lookup(this.type, Enum))
this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]; // first defined
/* istanbul ignore next */
else

@@ -259,2 +258,3 @@ throw Error("unresolvable field type: " + this.type);

this.typeDefault = util.Long.fromNumber(this.typeDefault, this.type.charAt(0) === "u");
/* istanbul ignore else */
if (Object.freeze)

@@ -261,0 +261,0 @@ Object.freeze(this.typeDefault); // long instances are meant to be immutable anyway (i.e. use small int cache that even requires it)

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

return {
type : this.type !== "rpc" && this.type || undefined,
type : this.type !== "rpc" && /* istanbul ignore next */ this.type || undefined,
requestType : this.requestType,
requestStream : this.requestStream || undefined,
requestStream : this.requestStream,
responseType : this.responseType,
responseStream : this.responseStream || undefined,
responseStream : this.responseStream,
options : this.options

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

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

var ns = this;
/* istanbul ignore else */
if (nestedJson) {

@@ -172,2 +173,3 @@ if (!nestedTypes)

return ns.add(nestedTypes[j].fromJSON(nestedName, nested));
/* istanbul ignore next */
throw TypeError("nested." + nestedName + " must be JSON for " + nestedError);

@@ -211,5 +213,5 @@ });

NamespacePrototype.add = function add(object) {
/* istanbul ignore next */
if (!nestedTypes)
initNested();
/* istanbul ignore next */

@@ -304,2 +306,3 @@ if (!object || nestedTypes.indexOf(object.constructor) < 0)

NamespacePrototype.resolve = function resolve() {
/* istanbul ignore next */

@@ -320,3 +323,3 @@ if (!Type)

this[nested[i].name] = nested[i];
else if (nested[i] instanceof Enum)
else /* istanbul ignore else */ if (nested[i] instanceof Enum)
this[nested[i].name] = nested[i].values;

@@ -323,0 +326,0 @@ else

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

/**
* Adds a field to this oneof.
* Adds a field to this oneof and removes it from its current parent, if any.
* @param {Field} field Field to add

@@ -116,4 +116,3 @@ * @returns {OneOf} `this`

throw TypeError("field must be a Field");
if (field.parent)
if (field.parent && field.parent !== this.parent)
field.parent.remove(field);

@@ -128,3 +127,3 @@ this.oneof.push(field.name);

/**
* Removes a field from this oneof.
* Removes a field from this oneof and puts it back to the oneof's parent.
* @param {Field} field Field to remove

@@ -146,6 +145,5 @@ * @returns {OneOf} `this`

index = this.oneof.indexOf(field.name);
if (index > -1)
/* istanbul ignore else */
if (index > -1) // theoretical
this.oneof.splice(index, 1);
if (field.parent)
field.parent.remove(field);
field.partOf = null;

@@ -152,0 +150,0 @@ return this;

@@ -100,2 +100,4 @@ "use strict";

callback = null;
if (sync)
throw err;
cb(err, root);

@@ -102,0 +104,0 @@ }

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

var service = new Service(name, json.options);
/* istanbul ignore else */
if (json.methods)

@@ -63,0 +64,0 @@ Object.keys(json.methods).forEach(function(methodName) {

@@ -304,8 +304,17 @@ "use strict";

// See Type#add for the reason why extension fields are excluded here.
if (this.fields[object.name] !== object)
if (!this.fields || this.fields[object.name] !== object)
throw Error(object + " is not a member of " + this);
delete this.fields[object.name];
object.message = null;
object.parent = null;
object.onRemove(this);
return clearCache(this);
}
if (object instanceof OneOf) {
if (!this.oneofs || this.oneofs[object.name] !== object)
throw Error(object + " is not a member of " + this);
delete this.oneofs[object.name];
object.parent = null;
object.onRemove(this);
return clearCache(this);
}
return NamespacePrototype.remove.call(this, object);

@@ -312,0 +321,0 @@ };

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

// Use Uint8Array buffer pool in the browser, just like node does with buffers
/* istanbul ignore else */
if (util.Array !== Array)

@@ -155,0 +156,0 @@ Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);

@@ -114,2 +114,5 @@ var tape = require("tape");

test.same(Message.ctor.toObject(msg, { longs: Number}), msgLongsToNumber, "should convert the same using the static and the instance method");
test.same(Message.ctor.toObject(msg, { longs: String}), msgLongsToString, "should convert the same using the static and the instance method");
test.equal(msgLongsToNumber.uint64Val, 1, "longs to numbers");

@@ -135,3 +138,3 @@ test.equal(msgLongsToString.uint64Val, "1", "longs to strings");

var msg = Message.fromObject({
var obj = {
uint64Val: 1,

@@ -147,3 +150,7 @@ uint64Repeated: [1, "2"],

}
});
};
var msg = Message.fromObject(obj);
test.same(Message.ctor.fromObject(obj), msg, "should convert the same using the static and the instance method");
var buf = protobuf.util.newBuffer(3);

@@ -162,2 +169,14 @@ buf[0] = buf[1] = buf[2] = 49; // "111"

});
test.test("Message#toJSON", function(test) {
var msg = Message.create();
test.plan(1);
msg.$type = {
toObject: function(obj, opt) {
test.same(opt, protobuf.util.toJSONOptions, "should use toJSONOptions with toJSON");
}
};
msg.toJSON();
test.end();
});

@@ -164,0 +183,0 @@ test.end();

@@ -10,9 +10,10 @@ var tape = require("tape");

});
test.deepEqual(enm.valuesById, valsById = {
1: 'a',
2: 'b'
test.same(enm.valuesById, {
1: "a",
2: "b"
}, "should also expose their values by id");
enm.add("c", 3);
test.deepEqual(enm.values, {
test.same(enm.values, {
a: 1,

@@ -22,19 +23,27 @@ b: 2,

}, "should allow adding new values");
test.deepEqual(enm.valuesById, {
1: 'a',
2: 'b',
3: 'c'
test.same(enm.valuesById, {
1: "a",
2: "b",
3: "c"
}, "should also expose any new values by id");
enm.remove("b");
test.deepEqual(enm.values, {
test.same(enm.values, {
a: 1,
c: 3
}, "should allow removing existing values");
test.deepEqual(enm.valuesById, {
1: 'a',
3: 'c'
test.same(enm.valuesById, {
1: "a",
3: "c"
}, "should no longer expose any removed values by id");
test.same(enm.toJSON(), {
options: undefined,
values: {
a: 1,
c: 3
}
}, "should export options and values to JSON");
test.end();
});

@@ -5,8 +5,15 @@ var tape = require("tape");

tape.test("jspb test.proto", function(test) {
protobuf.load("tests/data/test.proto", function(err, root) {
var existingRoot = new protobuf.Root();
protobuf.load("tests/data/test.proto", existingRoot, function(err, root) {
if (err)
return test.fail(err.message);
test.pass("should parse without errors");
test.equal(root, existingRoot, "should reuse existing root");
test.doesNotThrow(function() {
root.resolveAll();
traverse(root);
}, "should resolve all types and generate code for them without errors");
test.end();

@@ -16,1 +23,10 @@ });

});
function traverse(ns) {
ns.nestedArray.forEach(function(nested) {
if (nested instanceof protobuf.Type)
nested.setup();
if (nested instanceof protobuf.Namespace)
traverse(nested);
});
}

@@ -10,4 +10,9 @@ var tape = require("tape");

int32 num = 2;\
Type enm = 4;\
}\
bool other = 3;\
}\
enum Type {\
ONE = 1;\
TWO = 2;\
}";

@@ -14,0 +19,0 @@

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

test.equal(Test.verify(data), null, "should verify our test data");
test.equal(Test.ctor.verify(data), null, "should verify our test data (static)");

@@ -18,0 +19,0 @@ var decoded = Test.decode(Test.encode(data).finish());

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 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

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