protobufjs 6.8.5 → 6.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/LICENSE +39 -39
  3. package/README.md +879 -879
  4. package/cli/LICENSE +33 -33
  5. package/cli/README.md +11 -11
  6. package/cli/index.d.ts +3 -3
  7. package/cli/index.js +3 -3
  8. package/cli/lib/tsd-jsdoc/LICENSE +20 -20
  9. package/cli/lib/tsd-jsdoc/README.md +23 -23
  10. package/cli/lib/tsd-jsdoc/plugin.js +21 -21
  11. package/cli/lib/tsd-jsdoc/publish.js +693 -693
  12. package/cli/lib/tsd-jsdoc.json +18 -18
  13. package/cli/package.standalone.json +31 -31
  14. package/cli/pbjs.d.ts +9 -9
  15. package/cli/pbjs.js +329 -319
  16. package/cli/pbts.d.ts +9 -9
  17. package/cli/pbts.js +197 -168
  18. package/cli/targets/json-module.js +38 -38
  19. package/cli/targets/json.js +8 -8
  20. package/cli/targets/proto.js +326 -326
  21. package/cli/targets/proto2.js +10 -10
  22. package/cli/targets/proto3.js +10 -10
  23. package/cli/targets/static-module.js +29 -29
  24. package/cli/targets/static.js +702 -705
  25. package/cli/util.js +183 -183
  26. package/cli/wrappers/amd.js +7 -7
  27. package/cli/wrappers/closure.js +7 -7
  28. package/cli/wrappers/commonjs.js +7 -7
  29. package/cli/wrappers/default.js +15 -15
  30. package/cli/wrappers/es6.js +5 -5
  31. package/dist/README.md +31 -31
  32. package/dist/light/README.md +31 -31
  33. package/dist/light/protobuf.js +6031 -6011
  34. package/dist/light/protobuf.js.map +1 -1
  35. package/dist/light/protobuf.min.js +3 -3
  36. package/dist/light/protobuf.min.js.map +1 -1
  37. package/dist/minimal/README.md +31 -31
  38. package/dist/minimal/protobuf.js +1877 -1868
  39. package/dist/minimal/protobuf.js.map +1 -1
  40. package/dist/minimal/protobuf.min.js +3 -3
  41. package/dist/minimal/protobuf.min.js.map +1 -1
  42. package/dist/protobuf.js +7594 -7573
  43. package/dist/protobuf.js.map +1 -1
  44. package/dist/protobuf.min.js +3 -3
  45. package/dist/protobuf.min.js.map +1 -1
  46. package/ext/debug/README.md +4 -4
  47. package/ext/debug/index.js +71 -71
  48. package/ext/descriptor/README.md +72 -72
  49. package/ext/descriptor/index.d.ts +0 -1
  50. package/ext/descriptor/index.js +1052 -1049
  51. package/ext/descriptor/test.js +54 -54
  52. package/google/LICENSE +27 -27
  53. package/google/README.md +1 -1
  54. package/google/api/annotations.proto +10 -10
  55. package/google/protobuf/descriptor.proto +286 -286
  56. package/google/protobuf/source_context.proto +7 -7
  57. package/index.d.ts +3 -1
  58. package/index.js +4 -4
  59. package/light.d.ts +2 -2
  60. package/light.js +3 -3
  61. package/minimal.d.ts +2 -2
  62. package/minimal.js +4 -4
  63. package/package-lock.json +5810 -3344
  64. package/package.json +24 -30
  65. package/scripts/changelog.js +150 -150
  66. package/scripts/postinstall.js +35 -35
  67. package/src/common.js +399 -399
  68. package/src/converter.js +293 -287
  69. package/src/decoder.js +106 -106
  70. package/src/encoder.js +99 -99
  71. package/src/enum.js +181 -181
  72. package/src/field.js +371 -370
  73. package/src/index-light.js +104 -104
  74. package/src/index-minimal.js +36 -36
  75. package/src/index.js +12 -12
  76. package/src/mapfield.js +126 -126
  77. package/src/message.js +138 -138
  78. package/src/method.js +151 -151
  79. package/src/namespace.js +433 -431
  80. package/src/object.js +200 -199
  81. package/src/oneof.js +203 -203
  82. package/src/parse.js +758 -757
  83. package/src/reader.js +405 -407
  84. package/src/reader_buffer.js +44 -44
  85. package/src/root.js +351 -350
  86. package/src/roots.js +18 -18
  87. package/src/rpc/service.js +142 -142
  88. package/src/rpc.js +36 -36
  89. package/src/service.js +167 -167
  90. package/src/tokenize.js +397 -397
  91. package/src/type.js +589 -589
  92. package/src/types.js +196 -196
  93. package/src/typescript.jsdoc +15 -15
  94. package/src/util/longbits.js +200 -200
  95. package/src/util/minimal.js +414 -405
  96. package/src/util.js +178 -178
  97. package/src/verifier.js +176 -176
  98. package/src/wrappers.js +83 -83
  99. package/src/writer.js +459 -459
  100. package/src/writer_buffer.js +81 -81
  101. package/tsconfig.json +6 -6
  102. package/google/protobuf/field_mask.json +0 -21
  103. package/google/protobuf/field_mask.proto +0 -7
@@ -1,8 +1,8 @@
1
1
  /*!
2
- * protobuf.js v6.8.5 (c) 2016, daniel wirtz
3
- * compiled mon, 19 feb 2018 11:50:09 utc
2
+ * protobuf.js v6.8.8 (c) 2016, daniel wirtz
3
+ * compiled tue, 10 mar 2020 18:44:50 utc
4
4
  * licensed under the bsd-3-clause license
5
5
  * see: https://github.com/dcodeio/protobuf.js for details
6
6
  */
7
- !function(e,t){"use strict";!function(t,r,n){function i(e){var n=r[e];return n||t[e][0].call(n=r[e]={exports:{}},i,n,n.exports),n.exports}var o=e.protobuf=i(n[0]);"function"==typeof define&&define.amd&&define(["long"],function(e){return e&&e.isLong&&(o.util.Long=e,o.configure()),o}),"object"==typeof module&&module&&module.exports&&(module.exports=o)}({1:[function(e,t){function r(e,t){for(var r=Array(arguments.length-1),n=0,i=2,o=!0;i<arguments.length;)r[n++]=arguments[i++];return new Promise(function(i,s){r[n]=function(e){if(o)if(o=!1,e)s(e);else{for(var t=Array(arguments.length-1),r=0;r<t.length;)t[r++]=arguments[r];i.apply(null,t)}};try{e.apply(t||null,r)}catch(e){o&&(o=!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 o=Array(64),s=Array(123),a=0;a<64;)s[o[a]=a<26?a+65:a<52?a+71:a<62?a-4:a-59|43]=a++;i.encode=function(e,t,r){for(var n,i=null,s=[],a=0,u=0;t<r;){var f=e[t++];switch(u){case 0:s[a++]=o[f>>2],n=(3&f)<<4,u=1;break;case 1:s[a++]=o[n|f>>4],n=(15&f)<<2,u=2;break;case 2:s[a++]=o[n|f>>6],s[a++]=o[63&f],u=0}a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,s)),a=0)}return u&&(s[a++]=o[n],s[a++]=61,1===u&&(s[a++]=61)),i?(a&&i.push(String.fromCharCode.apply(String,s.slice(0,a))),i.join("")):String.fromCharCode.apply(String,s.slice(0,a))};i.decode=function(e,r,n){for(var i,o=n,a=0,u=0;u<e.length;){var f=e.charCodeAt(u++);if(61===f&&a>1)break;if((f=s[f])===t)throw Error("invalid encoding");switch(a){case 0:i=f,a=1;break;case 1:r[n++]=i<<2|(48&f)>>4,i=f,a=2;break;case 2:r[n++]=(15&i)<<4|(60&f)>>2,i=f,a=3;break;case 3:r[n++]=(3&i)<<6|f,a=0}}if(1===a)throw Error("invalid encoding");return n-o},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(e,r){function i(e){if("string"!=typeof e){var t=o();if(n.verbose&&console.log("codegen: "+t),t="return "+t,e){for(var r=Object.keys(e),a=Array(r.length+1),u=Array(r.length),f=0;f<r.length;)a[f]=r[f],u[f]=e[r[f++]];return a[f]=t,Function.apply(null,a).apply(null,u)}return Function(t)()}for(var l=Array(arguments.length-1),c=0;c<l.length;)l[c]=arguments[++c];if(c=0,e=e.replace(/%([%dfijs])/g,function(e,t){var r=l[c++];switch(t){case"d":case"f":return+r+"";case"i":return Math.floor(r)+"";case"j":return JSON.stringify(r);case"s":return r+""}return"%"}),c!==l.length)throw Error("parameter count mismatch");return s.push(e),i}function o(t){return"function "+(t||r||"")+"("+(e&&e.join(",")||"")+"){\n "+s.join("\n ")+"\n}"}"string"==typeof e&&(r=e,e=t);var s=[];return i.toString=o,i}r.exports=n,n.verbose=!1},{}],4:[function(e,r){function n(){this.a={}}r.exports=n,n.prototype.on=function(e,t,r){return(this.a[e]||(this.a[e]=[])).push({fn:t,ctx:r||this}),this},n.prototype.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},n.prototype.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,r){function n(e,t,r){return"function"==typeof t?(r=t,t={}):t||(t={}),r?!t.xhr&&s&&s.readFile?s.readFile(e,function(i,o){return i&&"undefined"!=typeof XMLHttpRequest?n.xhr(e,t,r):i?r(i):r(null,t.binary?o:o.toString("utf8"))}):n.xhr(e,t,r):i(n,this,e,t)}r.exports=n;var i=e(1),o=e(7),s=o("fs");n.xhr=function(e,r,n){var i=new XMLHttpRequest;i.onreadystatechange=function(){if(4!==i.readyState)return t;if(0!==i.status&&200!==i.status)return n(Error("status "+i.status));if(r.binary){var e=i.response;if(!e){e=[];for(var o=0;o<i.responseText.length;++o)e.push(255&i.responseText.charCodeAt(o))}return n(null,"undefined"!=typeof Uint8Array?new Uint8Array(e):e)}return n(null,i.responseText)},r.binary&&("overrideMimeType"in i&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.responseType="arraybuffer"),i.open("GET",e),i.send()}},{1:1,7:7}],6:[function(e,t){function r(e){return"undefined"!=typeof Float32Array?function(){function t(e,t,r){o[0]=e,t[r]=s[0],t[r+1]=s[1],t[r+2]=s[2],t[r+3]=s[3]}function r(e,t,r){o[0]=e,t[r]=s[3],t[r+1]=s[2],t[r+2]=s[1],t[r+3]=s[0]}function n(e,t){return s[0]=e[t],s[1]=e[t+1],s[2]=e[t+2],s[3]=e[t+3],o[0]}function i(e,t){return s[3]=e[t],s[2]=e[t+1],s[1]=e[t+2],s[0]=e[t+3],o[0]}var o=new Float32Array([-0]),s=new Uint8Array(o.buffer),a=128===s[3];e.writeFloatLE=a?t:r,e.writeFloatBE=a?r:t,e.readFloatLE=a?n:i,e.readFloatBE=a?i:n}():function(){function t(e,t,r,n){var i=t<0?1:0;if(i&&(t=-t),0===t)e(1/t>0?0:2147483648,r,n);else if(isNaN(t))e(2143289344,r,n);else if(t>3.4028234663852886e38)e((i<<31|2139095040)>>>0,r,n);else if(t<1.1754943508222875e-38)e((i<<31|Math.round(t/1.401298464324817e-45))>>>0,r,n);else{var o=Math.floor(Math.log(t)/Math.LN2),s=8388607&Math.round(t*Math.pow(2,-o)*8388608);e((i<<31|o+127<<23|s)>>>0,r,n)}}function r(e,t,r){var n=e(t,r),i=2*(n>>31)+1,o=n>>>23&255,s=8388607&n;return 255===o?s?NaN:i*(1/0):0===o?1.401298464324817e-45*i*s:i*Math.pow(2,o-150)*(s+8388608)}e.writeFloatLE=t.bind(null,n),e.writeFloatBE=t.bind(null,i),e.readFloatLE=r.bind(null,o),e.readFloatBE=r.bind(null,s)}(),"undefined"!=typeof Float64Array?function(){function t(e,t,r){o[0]=e,t[r]=s[0],t[r+1]=s[1],t[r+2]=s[2],t[r+3]=s[3],t[r+4]=s[4],t[r+5]=s[5],t[r+6]=s[6],t[r+7]=s[7]}function r(e,t,r){o[0]=e,t[r]=s[7],t[r+1]=s[6],t[r+2]=s[5],t[r+3]=s[4],t[r+4]=s[3],t[r+5]=s[2],t[r+6]=s[1],t[r+7]=s[0]}function n(e,t){return s[0]=e[t],s[1]=e[t+1],s[2]=e[t+2],s[3]=e[t+3],s[4]=e[t+4],s[5]=e[t+5],s[6]=e[t+6],s[7]=e[t+7],o[0]}function i(e,t){return s[7]=e[t],s[6]=e[t+1],s[5]=e[t+2],s[4]=e[t+3],s[3]=e[t+4],s[2]=e[t+5],s[1]=e[t+6],s[0]=e[t+7],o[0]}var o=new Float64Array([-0]),s=new Uint8Array(o.buffer),a=128===s[7];e.writeDoubleLE=a?t:r,e.writeDoubleBE=a?r:t,e.readDoubleLE=a?n:i,e.readDoubleBE=a?i:n}():function(){function t(e,t,r,n,i,o){var s=n<0?1:0;if(s&&(n=-n),0===n)e(0,i,o+t),e(1/n>0?0:2147483648,i,o+r);else if(isNaN(n))e(0,i,o+t),e(2146959360,i,o+r);else if(n>1.7976931348623157e308)e(0,i,o+t),e((s<<31|2146435072)>>>0,i,o+r);else{var a;if(n<2.2250738585072014e-308)a=n/5e-324,e(a>>>0,i,o+t),e((s<<31|a/4294967296)>>>0,i,o+r);else{var u=Math.floor(Math.log(n)/Math.LN2);1024===u&&(u=1023),a=n*Math.pow(2,-u),e(4503599627370496*a>>>0,i,o+t),e((s<<31|u+1023<<20|1048576*a&1048575)>>>0,i,o+r)}}}function r(e,t,r,n,i){var o=e(n,i+t),s=e(n,i+r),a=2*(s>>31)+1,u=s>>>20&2047,f=4294967296*(1048575&s)+o;return 2047===u?f?NaN:a*(1/0):0===u?5e-324*a*f:a*Math.pow(2,u-1075)*(f+4503599627370496)}e.writeDoubleLE=t.bind(null,n,0,4),e.writeDoubleBE=t.bind(null,i,4,0),e.readDoubleLE=r.bind(null,o,0,4),e.readDoubleBE=r.bind(null,s,4,0)}(),e}function n(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function i(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function o(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function s(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}t.exports=r(r)},{}],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)},o=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 o=0;o<t.length;)".."===t[o]?o>0&&".."!==t[o-1]?t.splice(--o,2):r?t.splice(o,1):++o:"."===t[o]?t.splice(o,1):++o;return n+t.join("/")};n.resolve=function(e,t,r){return r||(t=o(t)),i(t)?t:(r||(e=o(e)),(e=e.replace(/(?:\/|^)[^\/]+$/,"")).length?o(e+"/"+t):t)}},{}],9:[function(e,t){function r(e,t,r){var n=r||8192,i=n>>>1,o=null,s=n;return function(r){if(r<1||r>i)return e(r);s+r>n&&(o=e(n),s=0);var a=t.call(o,s,s+=r);return 7&s&&(s=1+(7|s)),a}}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){if(r-t<1)return"";for(var n,i=null,o=[],s=0;t<r;)n=e[t++],n<128?o[s++]=n:n>191&&n<224?o[s++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[s++]=55296+(n>>10),o[s++]=56320+(1023&n)):o[s++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,o)),s=0);return i?(s&&i.push(String.fromCharCode.apply(String,o.slice(0,s))),i.join("")):String.fromCharCode.apply(String,o.slice(0,s))},n.write=function(e,t,r){for(var n,i,o=r,s=0;s<e.length;++s)n=e.charCodeAt(s),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(s+1)))?(n=65536+((1023&n)<<10)+(1023&i),++s,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-o}},{}],11:[function(e,t){function r(e,t){n.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),r[e]=t}t.exports=r;var n=/\/|\./;r("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var i;r("duration",{Duration:i={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),r("timestamp",{Timestamp:i}),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}}}}),r("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),r.get=function(e){return r[e]||null}},{}],12:[function(e,t,r){function n(e,t,r,n){if(t.resolvedType)if(t.resolvedType instanceof s){e("switch(d%s){",n);for(var i=t.resolvedType.values,o=Object.keys(i),a=0;a<o.length;++a)t.repeated&&i[o[a]]===t.typeDefault&&e("default:"),e("case%j:",o[a])("case %i:",i[o[a]])("m%s=%j",n,i[o[a]])("break");e("}")}else e('if(typeof d%s!=="object")',n)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",n,r,n);else{var u=!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":u=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,u)('else if(typeof d%s==="string")',n)("m%s=parseInt(d%s,10)",n,n)('else if(typeof d%s==="number")',n)("m%s=d%s",n,n)('else if(typeof d%s==="object")',n)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",n,n,n,u?"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.length)",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 s?e("d%s=o.enums===String?types[%i].values[m%s]:m%s",n,r,n,n):e("d%s=types[%i].toObject(m%s,o)",n,r,n);else{var i=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",n,n,n,n);break;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>>>0,m%s.high>>>0).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 o=r,s=e(15),a=e(37);o.fromObject=function(e){var t=e.fieldsArray,r=a.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return r("return new this.ctor");r("var m=new this.ctor");for(var i=0;i<t.length;++i){var o=t[i].resolve(),u=a.safeProp(o.name);o.map?(r("if(d%s){",u)('if(typeof d%s!=="object")',u)("throw TypeError(%j)",o.fullName+": object expected")("m%s={}",u)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",u),n(r,o,i,u+"[ks[i]]")("}")("}")):o.repeated?(r("if(d%s){",u)("if(!Array.isArray(d%s))",u)("throw TypeError(%j)",o.fullName+": array expected")("m%s=[]",u)("for(var i=0;i<d%s.length;++i){",u),n(r,o,i,u+"[i]")("}")("}")):(o.resolvedType instanceof s||r("if(d%s!=null){",u),n(r,o,i,u),o.resolvedType instanceof s||r("}"))}return r("return m")},o.toObject=function(e){var t=e.fieldsArray.slice().sort(a.compareFieldsById);if(!t.length)return a.codegen()("return {}");for(var r=a.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),n=[],o=[],s=[],u=0;u<t.length;++u)t[u].partOf||(t[u].resolve().repeated?n:t[u].map?o:s).push(t[u]);var f,l,c=!1;for(u=0;u<t.length;++u){var f=t[u],p=e.b.indexOf(f),l=a.safeProp(f.name);f.map?(c||(c=!0,r("var ks2")),r("if(m%s&&(ks2=Object.keys(m%s)).length){",l,l)("d%s={}",l)("for(var j=0;j<ks2.length;++j){"),i(r,f,p,l+"[ks2[j]]")("}")):f.repeated?(r("if(m%s&&m%s.length){",l,l)("d%s=[]",l)("for(var j=0;j<m%s.length;++j){",l),i(r,f,p,l+"[j]")("}")):(r("if(m%s!=null&&m.hasOwnProperty(%j)){",l,f.name),i(r,f,p,l),f.partOf&&r("if(o.oneofs)")("d%s=%j",a.safeProp(f.partOf.name),f.name)),r("}")}return r("return d")}},{15:15,37:37}],13:[function(e,r){function n(e){return"missing required '"+e.name+"'"}function i(e){var r=a.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter(function(e){return e.map}).length?",k":""))("while(r.pos<c){")("var t=r.uint32()");e.group&&r("if((t&7)===4)")("break"),r("switch(t>>>3){");for(var i=0;i<e.fieldsArray.length;++i){var u=e.b[i].resolve(),f=u.resolvedType instanceof o?"int32":u.type,l="m"+a.safeProp(u.name);r("case %i:",u.id),u.map?(r("r.skip().pos++")("if(%s===util.emptyObject)",l)("%s={}",l)("k=r.%s()",u.keyType)("r.pos++"),s.long[u.keyType]!==t?s.basic[f]===t?r('%s[typeof k==="object"?util.longToHash(k):k]=types[%i].decode(r,r.uint32())',l,i):r('%s[typeof k==="object"?util.longToHash(k):k]=r.%s()',l,f):s.basic[f]===t?r("%s[k]=types[%i].decode(r,r.uint32())",l,i):r("%s[k]=r.%s()",l,f)):u.repeated?(r("if(!(%s&&%s.length))",l,l)("%s=[]",l),s.packed[f]!==t&&r("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",l,f)("}else"),s.basic[f]===t?r(u.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",l,i):r("%s.push(r.%s())",l,f)):s.basic[f]===t?r(u.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",l,i):r("%s=r.%s()",l,f),r("break")}for(r("default:")("r.skipType(t&7)")("break")("}")("}"),i=0;i<e.b.length;++i){var c=e.b[i];c.required&&r("if(!m.hasOwnProperty(%j))",c.name)("throw util.ProtocolError(%j,{instance:m})",n(c))}return r("return m")}r.exports=i;var o=e(15),s=e(36),a=e(37)},{15:15,36:36,37:37}],14:[function(e,r){function n(e,t,r,n){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",r,n,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}function i(e){for(var r,i,u=a.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),f=e.fieldsArray.slice().sort(a.compareFieldsById),r=0;r<f.length;++r){var l=f[r].resolve(),c=e.b.indexOf(l),p=l.resolvedType instanceof o?"int32":l.type,h=s.basic[p];i="m"+a.safeProp(l.name),l.map?(u("if(%s!=null&&m.hasOwnProperty(%j)){",i,l.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",i)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(l.id<<3|2)>>>0,8|s.mapKey[l.keyType],l.keyType),h===t?u("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",c,i):u(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|h,p,i),u("}")("}")):l.repeated?(u("if(%s!=null&&%s.length){",i,i),l.packed&&s.packed[p]!==t?u("w.uint32(%i).fork()",(l.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",i)("w.%s(%s[i])",p,i)("w.ldelim()"):(u("for(var i=0;i<%s.length;++i)",i),h===t?n(u,l,c,i+"[i]"):u("w.uint32(%i).%s(%s[i])",(l.id<<3|h)>>>0,p,i)),u("}")):(l.optional&&u("if(%s!=null&&m.hasOwnProperty(%j))",i,l.name),h===t?n(u,l,c,i):u("w.uint32(%i).%s(%s)",(l.id<<3|h)>>>0,p,i))}return u("return w")}r.exports=i;var o=e(15),s=e(36),a=e(37)},{15:15,36:36,37:37}],15:[function(e,r){function n(e,r,n,o,s){if(i.call(this,e,n),r&&"object"!=typeof r)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=o,this.comments=s||{},this.reserved=t,r)for(var a=Object.keys(r),u=0;u<a.length;++u)"number"==typeof r[a[u]]&&(this.valuesById[this.values[a[u]]=r[a[u]]]=a[u])}r.exports=n;var i=e(24);((n.prototype=Object.create(i.prototype)).constructor=n).className="Enum";var o=e(23),s=e(37);n.fromJSON=function(e,t){var r=new n(e,t.values,t.options,t.comment,t.comments);return r.reserved=t.reserved,r},n.prototype.toJSON=function(e){var r=!!e&&!!e.keepComments;return s.toObject(["options",this.options,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:t,"comment",r?this.comment:t,"comments",r?this.comments:t])},n.prototype.add=function(e,r,n){if(!s.isString(e))throw TypeError("name must be a string");if(!s.isInteger(r))throw TypeError("id must be an integer");if(this.values[e]!==t)throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(r))throw Error("id "+r+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(this.valuesById[r]!==t){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+r+" in "+this);this.values[e]=r}else this.valuesById[this.values[e]=r]=e;return this.comments[e]=n||null,this},n.prototype.remove=function(e){if(!s.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this},n.prototype.isReservedId=function(e){return o.isReservedId(this.reserved,e)},n.prototype.isReservedName=function(e){return o.isReservedName(this.reserved,e)}},{23:23,24:24,37:37}],16:[function(e,r){function n(e,r,n,o,s,l,c){if(u.isObject(o)?(c=s,l=o,o=s=t):u.isObject(s)&&(c=l,l=s,s=t),i.call(this,e,l),!u.isInteger(r)||r<0)throw TypeError("id must be a non-negative integer");if(!u.isString(n))throw TypeError("type must be a string");if(o!==t&&!f.test(o=(""+o).toLowerCase()))throw TypeError("rule must be a string rule");if(s!==t&&!u.isString(s))throw TypeError("extend must be a string");this.rule=o&&"optional"!==o?o:t,this.type=n,this.id=r,this.extend=s||t,this.required="required"===o,this.optional=!this.required,this.repeated="repeated"===o,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!u.Long&&a.long[n]!==t,this.bytes="bytes"===n,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.c=null,this.comment=c}r.exports=n;var i=e(24);((n.prototype=Object.create(i.prototype)).constructor=n).className="Field";var o,s=e(15),a=e(36),u=e(37),f=/^required|optional|repeated$/;n.fromJSON=function(e,t){return new n(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)},Object.defineProperty(n.prototype,"packed",{get:function(){return null===this.c&&(this.c=!1!==this.getOption("packed")),this.c}}),n.prototype.setOption=function(e,t,r){return"packed"===e&&(this.c=null),i.prototype.setOption.call(this,e,t,r)},n.prototype.toJSON=function(e){var r=!!e&&!!e.keepComments;return u.toObject(["rule","optional"!==this.rule&&this.rule||t,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",r?this.comment:t])},n.prototype.resolve=function(){if(this.resolved)return this;if((this.typeDefault=a.defaults[this.type])===t&&(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof o?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof s&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(this.options.packed===t||!this.resolvedType||this.resolvedType instanceof s)||delete this.options.packed,Object.keys(this.options).length||(this.options=t)),this.long)this.typeDefault=u.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var e;u.base64.test(this.typeDefault)?u.base64.decode(this.typeDefault,e=u.newBuffer(u.base64.length(this.typeDefault)),0):u.utf8.write(this.typeDefault,e=u.newBuffer(u.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=u.emptyObject:this.repeated?this.defaultValue=u.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof o&&(this.parent.ctor.prototype[this.name]=this.defaultValue),i.prototype.resolve.call(this)},n.d=function(e,t,r,i){return"function"==typeof t?t=u.decorateType(t).name:t&&"object"==typeof t&&(t=u.decorateEnum(t).name),function(o,s){u.decorateType(o.constructor).add(new n(s,e,t,r,{default:i}))}},n.e=function(e){o=e}},{15:15,24:24,36:36,37:37}],17:[function(e,t){function r(e,t,r){return"function"==typeof t?(r=t,t=new i.Root):t||(t=new i.Root),t.load(e,r)}function n(e,t){return t||(t=new i.Root),t.loadSync(e)}var i=t.exports=e(18);i.build="light",i.load=r,i.loadSync=n,i.encoder=e(14),i.decoder=e(13),i.verifier=e(40),i.converter=e(12),i.ReflectionObject=e(24),i.Namespace=e(23),i.Root=e(29),i.Enum=e(15),i.Type=e(35),i.Field=e(16),i.OneOf=e(25),i.MapField=e(20),i.Service=e(33),i.Method=e(22),i.Message=e(21),i.wrappers=e(41),i.types=e(36),i.util=e(37),i.ReflectionObject.e(i.Root),i.Namespace.e(i.Type,i.Service),i.Root.e(i.Type),i.Field.e(i.Type)},{12:12,13:13,14:14,15:15,16:16,18:18,20:20,21:21,22:22,23:23,24:24,25:25,29:29,33:33,35:35,36:36,37:37,40:40,41:41}],18:[function(e,t,r){function n(){i.Reader.e(i.BufferReader),i.util.e()}var i=r;i.build="minimal",i.Writer=e(42),i.BufferWriter=e(43),i.Reader=e(27),i.BufferReader=e(28),i.util=e(39),i.rpc=e(31),i.roots=e(30),i.configure=n,i.Writer.e(i.BufferWriter),n()},{27:27,28:28,30:30,31:31,39:39,42:42,43:43}],19:[function(e,t){var r=t.exports=e(17);r.build="full",r.tokenize=e(34),r.parse=e(26),r.common=e(11),r.Root.e(r.Type,r.parse,r.common)},{11:11,17:17,26:26,34:34}],20:[function(e,r){function n(e,r,n,o,a,u){if(i.call(this,e,r,o,t,t,a,u),!s.isString(n))throw TypeError("keyType must be a string");this.keyType=n,this.resolvedKeyType=null,this.map=!0}r.exports=n;var i=e(16);((n.prototype=Object.create(i.prototype)).constructor=n).className="MapField";var o=e(36),s=e(37);n.fromJSON=function(e,t){return new n(e,t.id,t.keyType,t.type,t.options,t.comment)},n.prototype.toJSON=function(e){var r=!!e&&!!e.keepComments;return s.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",r?this.comment:t])},n.prototype.resolve=function(){if(this.resolved)return this;if(o.mapKey[this.keyType]===t)throw Error("invalid key type: "+this.keyType);return i.prototype.resolve.call(this)},n.d=function(e,t,r){return"function"==typeof r?r=s.decorateType(r).name:r&&"object"==typeof r&&(r=s.decorateEnum(r).name),function(i,o){s.decorateType(i.constructor).add(new n(o,e,t,r))}}},{16:16,36:36,37:37}],21:[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(39);r.create=function(e){return this.$type.create(e)},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.toObject=function(e,t){return this.$type.toObject(e,t)},r.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},{39:39}],22:[function(e,r){function n(e,r,n,s,a,u,f,l){if(o.isObject(a)?(f=a,a=u=t):o.isObject(u)&&(f=u,u=t),r!==t&&!o.isString(r))throw TypeError("type must be a string");if(!o.isString(n))throw TypeError("requestType must be a string");if(!o.isString(s))throw TypeError("responseType must be a string");i.call(this,e,f),this.type=r||"rpc",this.requestType=n,this.requestStream=!!a||t,this.responseType=s,this.responseStream=!!u||t,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=l}r.exports=n;var i=e(24);((n.prototype=Object.create(i.prototype)).constructor=n).className="Method";var o=e(37);n.fromJSON=function(e,t){return new n(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment)},n.prototype.toJSON=function(e){var r=!!e&&!!e.keepComments;return o.toObject(["type","rpc"!==this.type&&this.type||t,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",r?this.comment:t])},n.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),i.prototype.resolve.call(this))}},{24:24,37:37}],23:[function(e,r){function n(e,r){if(!e||!e.length)return t;for(var n={},i=0;i<e.length;++i)n[e[i].name]=e[i].toJSON(r);return n}function i(e,r){s.call(this,e,r),this.nested=t,this.f=null}function o(e){return e.f=null,e}r.exports=i;var s=e(24);((i.prototype=Object.create(s.prototype)).constructor=i).className="Namespace";var a,u,f=e(15),l=e(16),c=e(37);i.fromJSON=function(e,t){return new i(e,t.options).addJSON(t.nested)},i.arrayToJSON=n,i.isReservedId=function(e,t){if(e)for(var r=0;r<e.length;++r)if("string"!=typeof e[r]&&e[r][0]<=t&&e[r][1]>=t)return!0;return!1},i.isReservedName=function(e,t){if(e)for(var r=0;r<e.length;++r)if(e[r]===t)return!0;return!1},Object.defineProperty(i.prototype,"nestedArray",{get:function(){return this.f||(this.f=c.toArray(this.nested))}}),i.prototype.toJSON=function(e){return c.toObject(["options",this.options,"nested",n(this.nestedArray,e)])},i.prototype.addJSON=function(e){var r=this;if(e)for(var n,o=Object.keys(e),s=0;s<o.length;++s)n=e[o[s]],r.add((n.fields!==t?a.fromJSON:n.values!==t?f.fromJSON:n.methods!==t?u.fromJSON:n.id!==t?l.fromJSON:i.fromJSON)(o[s],n));return this},i.prototype.get=function(e){return this.nested&&this.nested[e]||null},i.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof f)return this.nested[e].values;throw Error("no such enum: "+e)},i.prototype.add=function(e){if(!(e instanceof l&&e.extend!==t||e instanceof a||e instanceof f||e instanceof u||e instanceof i))throw TypeError("object must be a valid nested object");if(this.nested){var r=this.get(e.name);if(r){if(!(r instanceof i&&e instanceof i)||r instanceof a||r instanceof u)throw Error("duplicate name '"+e.name+"' in "+this);for(var n=r.nestedArray,s=0;s<n.length;++s)e.add(n[s]);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)},i.prototype.remove=function(e){if(!(e instanceof s))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)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)},i.prototype.define=function(e,t){if(c.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var r=this;e.length>0;){var n=e.shift();if(r.nested&&r.nested[n]){if(!((r=r.nested[n])instanceof i))throw Error("path conflicts with non-namespace objects")}else r.add(r=new i(n))}return t&&r.addJSON(t),r},i.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof i?e[t++].resolveAll():e[t++].resolve();return this.resolve()},i.prototype.lookup=function(e,r,n){if("boolean"==typeof r?(n=r,r=t):r&&!Array.isArray(r)&&(r=[r]),c.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;if(""===e[0])return this.root.lookup(e.slice(1),r);var o=this.get(e[0]);if(o){if(1===e.length){if(!r||r.indexOf(o.constructor)>-1)return o}else if(o instanceof i&&(o=o.lookup(e.slice(1),r,!0)))return o}else for(var s=0;s<this.nestedArray.length;++s)if(this.f[s]instanceof i&&(o=this.f[s].lookup(e,r,!0)))return o;return null===this.parent||n?null:this.parent.lookup(e,r)},i.prototype.lookupType=function(e){var t=this.lookup(e,[a]);if(!t)throw Error("no such type: "+e);return t},i.prototype.lookupEnum=function(e){var t=this.lookup(e,[f]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},i.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[a,f]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t},i.prototype.lookupService=function(e){var t=this.lookup(e,[u]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},i.e=function(e,t){a=e,u=t}},{15:15,16:16,24:24,37:37}],24:[function(e,r){function n(e,t){if(!o.isString(e))throw TypeError("name must be a string");if(t&&!o.isObject(t))throw TypeError("options must be an object");this.options=t,this.name=e,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}r.exports=n,n.className="ReflectionObject";var i,o=e(37);Object.defineProperties(n.prototype,{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(".")}}}),n.prototype.toJSON=function(){throw Error()},n.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof i&&t.g(this)},n.prototype.onRemove=function(e){var t=e.root;t instanceof i&&t.h(this),this.parent=null,this.resolved=!1},n.prototype.resolve=function(){return this.resolved?this:(this.root instanceof i&&(this.resolved=!0),this)},n.prototype.getOption=function(e){return this.options?this.options[e]:t},n.prototype.setOption=function(e,r,n){return n&&this.options&&this.options[e]!==t||((this.options||(this.options={}))[e]=r),this},n.prototype.setOptions=function(e,t){if(e)for(var r=Object.keys(e),n=0;n<r.length;++n)this.setOption(r[n],e[r[n]],t);return this},n.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},n.e=function(e){i=e}},{37:37}],25:[function(e,r){function n(e,r,n,i){if(Array.isArray(r)||(n=r,r=t),o.call(this,e,n),r!==t&&!Array.isArray(r))throw TypeError("fieldNames must be an Array");this.oneof=r||[],this.fieldsArray=[],this.comment=i}function i(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}r.exports=n;var o=e(24);((n.prototype=Object.create(o.prototype)).constructor=n).className="OneOf";var s=e(16),a=e(37);n.fromJSON=function(e,t){return new n(e,t.oneof,t.options,t.comment)},n.prototype.toJSON=function(e){var r=!!e&&!!e.keepComments;return a.toObject(["options",this.options,"oneof",this.oneof,"comment",r?this.comment:t])},n.prototype.add=function(e){if(!(e instanceof s))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,i(this),this},n.prototype.remove=function(e){if(!(e instanceof s))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),t=this.oneof.indexOf(e.name),t>-1&&this.oneof.splice(t,1),e.partOf=null,this},n.prototype.onAdd=function(e){o.prototype.onAdd.call(this,e);for(var t=this,r=0;r<this.oneof.length;++r){var n=e.get(this.oneof[r]);n&&!n.partOf&&(n.partOf=t,t.fieldsArray.push(n))}i(this)},n.prototype.onRemove=function(e){for(var t,r=0;r<this.fieldsArray.length;++r)(t=this.fieldsArray[r]).parent&&t.parent.remove(t);o.prototype.onRemove.call(this,e)},n.d=function(){for(var e=Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,r){a.decorateType(t.constructor).add(new n(r,e)),Object.defineProperty(t,r,{get:a.oneOfGetter(e),set:a.oneOfSetter(e)})}}},{16:16,24:24,37:37}],26:[function(e,r){function n(e,r,A){function S(e,t,r){var i=n.filename;return r||(n.filename=null),Error("illegal "+(t||"token")+" '"+e+"' ("+(i?i+", ":"")+"line "+Y.line+")")}function T(){var e,t=[];do{if('"'!==(e=ee())&&"'"!==e)throw S(e);t.push(ee()),ne(e),e=re()}while('"'===e||"'"===e);return t.join("")}function E(e){var t=ee();switch(t){case"'":case'"':return te(t),T();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return R(t,!0)}catch(r){if(e&&j.test(t))return t;throw S(t,"value")}}function N(e,t){var r,n;do{!t||'"'!==(r=re())&&"'"!==r?e.push([n=I(ee()),ne("to",!0)?I(ee()):n]):e.push(T())}while(ne(",",!0));ne(";")}function R(e,t){var r=1;switch("-"===e.charAt(0)&&(r=-1,e=e.substring(1)),e){case"inf":case"INF":case"Inf":return r*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(y.test(e))return r*parseInt(e,10);if(v.test(e))return r*parseInt(e,16);if(b.test(e))return r*parseInt(e,8);if(O.test(e))return r*parseFloat(e);throw S(e,"number",t)}function I(e,t){switch(e){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!t&&"-"===e.charAt(0))throw S(e,"id");if(m.test(e))return parseInt(e,10);if(g.test(e))return parseInt(e,16);if(w.test(e))return parseInt(e,8);throw S(e,"id")}function F(e,t){switch(t){case"option":return q(e,t),ne(";"),!0;case"message":return B(e,t),!0;case"enum":return C(e,t),!0;case"service":return _(e,t),!0;case"extend":return Z(e,t),!0}return!1}function L(e,t,r){var i=Y.line;if(e&&(e.comment=ie(),e.filename=n.filename),ne("{",!0)){for(var o;"}"!==(o=ee());)t(o);ne(";",!0)}else r&&r(),ne(";"),e&&"string"!=typeof e.comment&&(e.comment=ie(i))}function B(e,t){if(!k.test(t=ee()))throw S(t,"type name");var r=new s(t);L(r,function(e){if(!F(r,e))switch(e){case"map":D(r);break;case"required":case"optional":case"repeated":J(r,e);break;case"oneof":P(r,e);break;case"extensions":N(r.extensions||(r.extensions=[]));break;case"reserved":N(r.reserved||(r.reserved=[]),!0);break;default:if(!se||!j.test(e))throw S(e);te(e),J(r,"optional")}}),e.add(r)}function J(e,r,n){var i=ee();if("group"===i)return void $(e,r);if(!j.test(i))throw S(i,"type");var o=ee();if(!k.test(o))throw S(o,"name");o=ue(o),ne("=");var s=new a(o,I(ee()),i,r,n);L(s,function(e){if("option"!==e)throw S(e);q(s,e),ne(";")},function(){U(s)}),e.add(s),se||!s.repeated||h.packed[i]===t&&h.basic[i]!==t||s.setOption("packed",!1,!0)}function $(e,t){var r=ee();if(!k.test(r))throw S(r,"name");var i=d.lcFirst(r);r===i&&(r=d.ucFirst(r)),ne("=");var o=I(ee()),u=new s(r);u.group=!0;var f=new a(i,o,r,t);f.filename=n.filename,L(u,function(e){switch(e){case"option":q(u,e),ne(";");break;case"required":case"optional":case"repeated":J(u,e);break;default:throw S(e)}}),e.add(u).add(f)}function D(e){ne("<");var r=ee();if(h.mapKey[r]===t)throw S(r,"type");ne(",");var n=ee();if(!j.test(n))throw S(n,"type");ne(">");var i=ee();if(!k.test(i))throw S(i,"name");ne("=");var o=new u(ue(i),I(ee()),r,n);L(o,function(e){if("option"!==e)throw S(e);q(o,e),ne(";")},function(){U(o)}),e.add(o)}function P(e,t){if(!k.test(t=ee()))throw S(t,"name");var r=new f(ue(t));L(r,function(e){"option"===e?(q(r,e),ne(";")):(te(e),J(r,"optional"))}),e.add(r)}function C(e,t){if(!k.test(t=ee()))throw S(t,"name");var r=new l(t);L(r,function(e){switch(e){case"option":q(r,e),ne(";");break;case"reserved":N(r.reserved||(r.reserved=[]),!0);break;default:V(r,e)}}),e.add(r)}function V(e,t){if(!k.test(t))throw S(t,"name");ne("=");var r=I(ee(),!0),n={};L(n,function(e){if("option"!==e)throw S(e);q(n,e),ne(";")},function(){U(n)}),e.add(t,r,n.comment)}function q(e,t){var r=ne("(",!0);if(!j.test(t=ee()))throw S(t,"name");var n=t;r&&(ne(")"),n="("+n+")",t=re(),x.test(t)&&(n+=t,ee())),ne("="),z(e,n)}function z(e,t){if(ne("{",!0))do{if(!k.test(Q=ee()))throw S(Q,"name");"{"===re()?z(e,t+"."+Q):(ne(":"),"{"===re()?z(e,t+"."+Q):M(e,t+"."+Q,E(!0)))}while(!ne("}",!0));else M(e,t,E(!0))}function M(e,t,r){e.setOption&&e.setOption(t,r)}function U(e){if(ne("[",!0)){do{q(e,"option")}while(ne(",",!0));ne("]")}return e}function _(e,t){if(!k.test(t=ee()))throw S(t,"service name");var r=new c(t);L(r,function(e){if(!F(r,e)){if("rpc"!==e)throw S(e);H(r,e)}}),e.add(r)}function H(e,t){var r=t;if(!k.test(t=ee()))throw S(t,"name");var n,i,o,s,a=t;if(ne("("),ne("stream",!0)&&(i=!0),!j.test(t=ee()))throw S(t);if(n=t,ne(")"),ne("returns"),ne("("),ne("stream",!0)&&(s=!0),!j.test(t=ee()))throw S(t);o=t,ne(")");var u=new p(a,r,n,o,i,s);L(u,function(e){if("option"!==e)throw S(e);q(u,e),ne(";")}),e.add(u)}function Z(e,t){if(!j.test(t=ee()))throw S(t,"reference");var r=t;L(null,function(t){switch(t){case"required":case"repeated":case"optional":J(e,t,r);break;default:if(!se||!j.test(t))throw S(t);te(t),J(e,"optional",r)}})}r instanceof o||(A=r,r=new o),A||(A=n.defaults);for(var W,K,G,X,Q,Y=i(e,A.alternateCommentMode||!1),ee=Y.next,te=Y.push,re=Y.peek,ne=Y.skip,ie=Y.cmnt,oe=!0,se=!1,ae=r,ue=A.keepCase?function(e){return e}:d.camelCase;null!==(Q=ee());)switch(Q){case"package":if(!oe)throw S(Q);!function(){if(W!==t)throw S("package");if(W=ee(),!j.test(W))throw S(W,"name");ae=ae.define(W),ne(";")}();break;case"import":if(!oe)throw S(Q);!function(){var e,t=re();switch(t){case"weak":e=G||(G=[]),ee();break;case"public":ee();default:e=K||(K=[])}t=T(),ne(";"),e.push(t)}();break;case"syntax":if(!oe)throw S(Q);!function(){if(ne("="),X=T(),!(se="proto3"===X)&&"proto2"!==X)throw S(X,"syntax");ne(";")}();break;case"option":if(!oe)throw S(Q);q(ae,Q),ne(";");break;default:if(F(ae,Q)){oe=!1;continue}throw S(Q)}return n.filename=null,{package:W,imports:K,weakImports:G,syntax:X,root:r}}r.exports=n,n.filename=null,n.defaults={keepCase:!1};var i=e(34),o=e(29),s=e(35),a=e(16),u=e(20),f=e(25),l=e(15),c=e(33),p=e(22),h=e(36),d=e(37),y=/^[1-9][0-9]*$/,m=/^-?[1-9][0-9]*$/,v=/^0[x][0-9a-fA-F]+$/,g=/^-?0[x][0-9a-fA-F]+$/,b=/^0[0-7]+$/,w=/^-?0[0-7]+$/,O=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,k=/^[a-zA-Z_][a-zA-Z_0-9]*$/,j=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)+$/,x=/^(?:\.[a-zA-Z][a-zA-Z_0-9]*)+$/},{15:15,16:16,20:20,22:22,25:25,29:29,33:33,34:34,35:35,36:36,37:37}],27:[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 f(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++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}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;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;if(t=0,this.len-this.pos>4){for(;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<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 o(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function s(){if(this.pos+8>this.len)throw r(this,8);return new f(o(this.buf,this.pos+=4),o(this.buf,this.pos+=4))}t.exports=n;var a,u=e(39),f=u.LongBits,l=u.utf8,c="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new n(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new n(e);throw Error("illegal buffer")};n.create=u.Buffer?function(e){return(n.create=function(e){return u.Buffer.isBuffer(e)?new a(e):c(e)})(e)}:c,n.prototype.i=u.Array.prototype.subarray||u.Array.prototype.slice,n.prototype.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}}(),n.prototype.int32=function(){return 0|this.uint32()},n.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},n.prototype.bool=function(){return 0!==this.uint32()},n.prototype.fixed32=function(){if(this.pos+4>this.len)throw r(this,4);return o(this.buf,this.pos+=4)},n.prototype.sfixed32=function(){if(this.pos+4>this.len)throw r(this,4);return 0|o(this.buf,this.pos+=4)},n.prototype.float=function(){if(this.pos+4>this.len)throw r(this,4);var e=u.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},n.prototype.double=function(){if(this.pos+8>this.len)throw r(this,4);var e=u.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},n.prototype.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,Array.isArray(this.buf)?this.buf.slice(t,n):t===n?new this.buf.constructor(0):this.i.call(this.buf,t,n)},n.prototype.string=function(){var e=this.bytes();return l.read(e,0,e.length)},n.prototype.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},n.prototype.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.e=function(e){a=e;var t=u.Long?"toLong":"toNumber";u.merge(n.prototype,{int64:function(){return i.call(this)[t](!1)},uint64:function(){return i.call(this)[t](!0)},sint64:function(){return i.call(this).zzDecode()[t](!1)},fixed64:function(){return s.call(this)[t](!0)},sfixed64:function(){return s.call(this)[t](!1)}})}},{39:39}],28:[function(e,t){function r(e){n.call(this,e)}t.exports=r;var n=e(27);(r.prototype=Object.create(n.prototype)).constructor=r;var i=e(39);i.Buffer&&(r.prototype.i=i.Buffer.prototype.slice),r.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}},{27:27,39:39}],29:[function(e,r){function n(e){s.call(this,"",e),this.deferred=[],this.files=[]}function i(){}function o(e,r){var n=r.parent.lookup(r.extend);if(n){var i=new l(r.fullName,r.id,r.type,r.rule,t,r.options);return i.declaringField=r,r.extensionField=i,n.add(i),!0}return!1}r.exports=n;var s=e(23);((n.prototype=Object.create(s.prototype)).constructor=n).className="Root";var a,u,f,l=e(16),c=e(15),p=e(25),h=e(37);n.fromJSON=function(e,t){return t||(t=new n),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},n.prototype.resolvePath=h.path.resolve,n.prototype.load=function e(r,n,o){function s(e,t){if(o){var r=o;if(o=null,p)throw e;r(e,t)}}function a(e,t){try{if(h.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),h.isString(t)){u.filename=e;var r,i=u(t,c,n),o=0;if(i.imports)for(;o<i.imports.length;++o)(r=c.resolvePath(e,i.imports[o]))&&l(r);if(i.weakImports)for(o=0;o<i.weakImports.length;++o)(r=c.resolvePath(e,i.weakImports[o]))&&l(r,!0)}else c.setOptions(t.options).addJSON(t.nested)}catch(e){s(e)}p||d||s(null,c)}function l(e,t){var r=e.lastIndexOf("google/protobuf/");if(r>-1){var n=e.substring(r);n in f&&(e=n)}if(!(c.files.indexOf(e)>-1)){if(c.files.push(e),e in f)return void(p?a(e,f[e]):(++d,setTimeout(function(){--d,a(e,f[e])})));if(p){var i;try{i=h.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||s(e))}a(e,i)}else++d,h.fetch(e,function(r,n){if(--d,o)return r?void(t?d||s(null,c):s(r)):void a(e,n)})}}"function"==typeof n&&(o=n,n=t);var c=this;if(!o)return h.asPromise(e,c,r,n);var p=o===i,d=0;h.isString(r)&&(r=[r]);for(var y,m=0;m<r.length;++m)(y=c.resolvePath("",r[m]))&&l(y);return p?c:(d||s(null,c),t)},n.prototype.loadSync=function(e,t){if(!h.isNode)throw Error("not supported");return this.load(e,t,i)},n.prototype.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 s.prototype.resolveAll.call(this)};var d=/^[A-Z]/;n.prototype.g=function(e){if(e instanceof l)e.extend===t||e.extensionField||o(this,e)||this.deferred.push(e);else if(e instanceof c)d.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof p)){if(e instanceof a)for(var r=0;r<this.deferred.length;)o(this,this.deferred[r])?this.deferred.splice(r,1):++r;for(var n=0;n<e.nestedArray.length;++n)this.g(e.f[n]);d.test(e.name)&&(e.parent[e.name]=e)}},n.prototype.h=function(e){if(e instanceof l){if(e.extend!==t)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var r=this.deferred.indexOf(e);r>-1&&this.deferred.splice(r,1)}}else if(e instanceof c)d.test(e.name)&&delete e.parent[e.name];else if(e instanceof s){for(var n=0;n<e.nestedArray.length;++n)this.h(e.f[n]);d.test(e.name)&&delete e.parent[e.name]}},n.e=function(e,t,r){a=e,u=t,f=r}},{15:15,16:16,23:23,25:25,37:37}],30:[function(e,t){t.exports={}},{}],31:[function(e,t,r){r.Service=e(32)},{32:32}],32:[function(e,r){function n(e,t,r){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");i.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=!!t,this.responseDelimited=!!r}r.exports=n;var i=e(39);(n.prototype=Object.create(i.EventEmitter.prototype)).constructor=n,n.prototype.rpcCall=function e(r,n,o,s,a){if(!s)throw TypeError("request must be specified");var u=this;if(!a)return i.asPromise(e,u,r,n,o,s);if(!u.rpcImpl)return setTimeout(function(){a(Error("already ended"))},0),t;try{return u.rpcImpl(r,n[u.requestDelimited?"encodeDelimited":"encode"](s).finish(),function(e,n){if(e)return u.emit("error",e,r),a(e);if(null===n)return u.end(!0),t;if(!(n instanceof o))try{n=o[u.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return u.emit("error",e,r),a(e)}return u.emit("data",n,r),a(null,n)})}catch(e){return u.emit("error",e,r),setTimeout(function(){a(e)},0),t}},n.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{39:39}],33:[function(e,r){function n(e,t){o.call(this,e,t),this.methods={},this.j=null}function i(e){return e.j=null,e}r.exports=n;var o=e(23);((n.prototype=Object.create(o.prototype)).constructor=n).className="Service";var s=e(22),a=e(37),u=e(31);n.fromJSON=function(e,t){var r=new n(e,t.options);if(t.methods)for(var i=Object.keys(t.methods),o=0;o<i.length;++o)r.add(s.fromJSON(i[o],t.methods[i[o]]));return t.nested&&r.addJSON(t.nested),r.comment=t.comment,r},n.prototype.toJSON=function(e){var r=o.prototype.toJSON.call(this,e),n=!!e&&!!e.keepComments;return a.toObject(["options",r&&r.options||t,"methods",o.arrayToJSON(this.methodsArray,e)||{},"nested",r&&r.nested||t,"comment",n?this.comment:t])},Object.defineProperty(n.prototype,"methodsArray",{get:function(){return this.j||(this.j=a.toArray(this.methods))}}),n.prototype.get=function(e){return this.methods[e]||o.prototype.get.call(this,e)},n.prototype.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return o.prototype.resolve.call(this)},n.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof s?(this.methods[e.name]=e,e.parent=this,i(this)):o.prototype.add.call(this,e)},n.prototype.remove=function(e){if(e instanceof s){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.prototype.remove.call(this,e)},n.prototype.create=function(e,t,r){for(var n,i=new u.Service(e,t,r),o=0;o<this.methodsArray.length;++o){var s=a.lcFirst((n=this.j[o]).resolve().name).replace(/[^$\w_]/g,"");i[s]=a.codegen(["r","c"],a.isReserved(s)?s+"_":s)("return this.rpcCall(m,q,s,r,c)")({m:n,q:n.resolvedRequestType.ctor,s:n.resolvedResponseType.ctor})}return i}},{22:22,23:23,31:31,37:37}],34:[function(e,r){function n(e){return e.replace(p,function(e,t){switch(t){case"\\":case"":return t;default:return h[t]||""}})}function i(e,r){function i(e){return Error("illegal "+e+" (line "+x+")")}function p(){var t="'"===R?a:s;t.lastIndex=k-1;var r=t.exec(e);if(!r)throw i("string");return k=t.lastIndex,g(R),R=null,n(r[1])}function h(t){return e.charAt(t)}function d(t,n){A=e.charAt(t++),T=x,E=!1;var i;i=r?2:3;var o,s=t-i;do{if(--s<0||"\n"===(o=e.charAt(s))){E=!0;break}}while(" "===o||"\t"===o);for(var a=e.substring(t,n).split(l),c=0;c<a.length;++c)a[c]=a[c].replace(r?f:u,"").trim();S=a.join("\n").trim()}function y(t){var r=m(t);return/^\s*\/{1,2}/.test(e.substring(t,r))}function m(e){for(var t=e;t<j&&"\n"!==h(t);)t++;return t}function v(){if(N.length>0)return N.shift();if(R)return p();var t,n,s,a,u;do{if(k===j)return null;for(t=!1;c.test(s=h(k));)if("\n"===s&&++x,++k===j)return null;if("/"===h(k)){if(++k===j)throw i("comment");if("/"===h(k))if(r){if(a=k,u=!1,y(k)){u=!0;do{if((k=m(k))===j)break;k++}while(y(k))}else k=Math.min(j,m(k)+1);u&&d(a,k),x++,t=!0}else{for(u="/"===h(a=k+1);"\n"!==h(++k);)if(k===j)return null;++k,u&&d(a,k-1),++x,t=!0}else{if("*"!==(s=h(k)))return"/";a=k+1,u=r||"*"===h(a);do{if("\n"===s&&++x,++k===j)throw i("comment");n=s,s=h(k)}while("*"!==n||"/"!==s);++k,u&&d(a,k-2),t=!0}}}while(t);var f=k;if(o.lastIndex=0,!o.test(h(f++)))for(;f<j&&!o.test(h(f));)++f;var l=e.substring(k,k=f);return'"'!==l&&"'"!==l||(R=l),l}function g(e){N.push(e)}function b(){if(!N.length){var e=v();if(null===e)return null;g(e)}return N[0]}function w(e,t){var r=b();if(r===e)return v(),!0;if(!t)throw i("token '"+r+"', '"+e+"' expected");return!1}function O(e){var n=null;return e===t?T===x-1&&(r||"*"===A||E)&&(n=S):(T<e&&b(),T!==e||E||!r&&"/"!==A||(n=S)),n}e=""+e;var k=0,j=e.length,x=1,A=null,S=null,T=0,E=!1,N=[],R=null;return Object.defineProperty({next:v,peek:b,push:g,skip:w,cmnt:O},"line",{get:function(){return x}})}r.exports=i;var o=/[\s{}=;:[\],'"()<>]/g,s=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,a=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,u=/^ *[*\/]+ */,f=/^\s*\*?\/*/,l=/\n/g,c=/\s/,p=/\\(.?)/g,h={0:"\0",r:"\r",n:"\n",t:"\t"};i.unescape=n},{}],35:[function(e,r){function n(e,r){o.call(this,e,r),this.fields={},this.oneofs=t,this.extensions=t,this.reserved=t,this.group=t,this.k=null,this.b=null,this.l=null,this.o=null}function i(e){return e.k=e.b=e.l=null,delete e.encode,delete e.decode,delete e.verify,e}r.exports=n;var o=e(23);((n.prototype=Object.create(o.prototype)).constructor=n).className="Type";var s=e(15),a=e(25),u=e(16),f=e(20),l=e(33),c=e(21),p=e(27),h=e(42),d=e(37),y=e(14),m=e(13),v=e(40),g=e(12),b=e(41);Object.defineProperties(n.prototype,{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.b||(this.b=d.toArray(this.fields))}},oneofsArray:{get:function(){return this.l||(this.l=d.toArray(this.oneofs))}},ctor:{get:function(){return this.o||(this.ctor=n.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof c||((e.prototype=new c).constructor=e,d.merge(e.prototype,t)),e.$type=e.prototype.$type=this,d.merge(e,c,!0),this.o=e;for(var r=0;r<this.fieldsArray.length;++r)this.b[r].resolve();var n={};for(r=0;r<this.oneofsArray.length;++r)n[this.l[r].resolve().name]={get:d.oneOfGetter(this.l[r].oneof),set:d.oneOfSetter(this.l[r].oneof)};r&&Object.defineProperties(e.prototype,n)}}}),n.generateConstructor=function(e){for(var t,r=d.codegen(["p"],e.name),n=0;n<e.fieldsArray.length;++n)(t=e.b[n]).map?r("this%s={}",d.safeProp(t.name)):t.repeated&&r("this%s=[]",d.safeProp(t.name));return r("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},n.fromJSON=function(e,r){var i=new n(e,r.options);i.extensions=r.extensions,i.reserved=r.reserved;for(var c=Object.keys(r.fields),p=0;p<c.length;++p)i.add((t!==r.fields[c[p]].keyType?f.fromJSON:u.fromJSON)(c[p],r.fields[c[p]]));if(r.oneofs)for(c=Object.keys(r.oneofs),p=0;p<c.length;++p)i.add(a.fromJSON(c[p],r.oneofs[c[p]]));if(r.nested)for(c=Object.keys(r.nested),p=0;p<c.length;++p){var h=r.nested[c[p]];i.add((h.id!==t?u.fromJSON:h.fields!==t?n.fromJSON:h.values!==t?s.fromJSON:h.methods!==t?l.fromJSON:o.fromJSON)(c[p],h))}return r.extensions&&r.extensions.length&&(i.extensions=r.extensions),r.reserved&&r.reserved.length&&(i.reserved=r.reserved),r.group&&(i.group=!0),r.comment&&(i.comment=r.comment),i},n.prototype.toJSON=function(e){var r=o.prototype.toJSON.call(this,e),n=!!e&&!!e.keepComments;return d.toObject(["options",r&&r.options||t,"oneofs",o.arrayToJSON(this.oneofsArray,e),"fields",o.arrayToJSON(this.fieldsArray.filter(function(e){return!e.declaringField}),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:t,"reserved",this.reserved&&this.reserved.length?this.reserved:t,"group",this.group||t,"nested",r&&r.nested||t,"comment",n?this.comment:t])},n.prototype.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.prototype.resolveAll.call(this)},n.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},n.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof u&&e.extend===t){if(this.k?this.k[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);if(this.isReservedName(e.name))throw Error("name '"+e.name+"' is reserved 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.prototype.add.call(this,e)},n.prototype.remove=function(e){if(e instanceof u&&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.prototype.remove.call(this,e)},n.prototype.isReservedId=function(e){return o.isReservedId(this.reserved,e)},n.prototype.isReservedName=function(e){return o.isReservedName(this.reserved,e)},n.prototype.create=function(e){return new this.ctor(e)},n.prototype.setup=function(){for(var e=this.fullName,t=[],r=0;r<this.fieldsArray.length;++r)t.push(this.b[r].resolve().resolvedType);this.encode=y(this)({Writer:h,types:t,util:d}),this.decode=m(this)({Reader:p,types:t,util:d}),this.verify=v(this)({types:t,util:d}),this.fromObject=g.fromObject(this)({types:t,util:d}),this.toObject=g.toObject(this)({types:t,util:d});var n=b[e];if(n){var i=Object.create(this);i.fromObject=this.fromObject,this.fromObject=n.fromObject.bind(i),i.toObject=this.toObject,this.toObject=n.toObject.bind(i)}return this},n.prototype.encode=function(e,t){return this.setup().encode(e,t)},n.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},n.prototype.decode=function(e,t){return this.setup().decode(e,t)},n.prototype.decodeDelimited=function(e){return e instanceof p||(e=p.create(e)),this.decode(e,e.uint32())},n.prototype.verify=function(e){return this.setup().verify(e)},n.prototype.fromObject=function(e){return this.setup().fromObject(e)},n.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},n.d=function(e){return function(t){d.decorateType(t,e)}}},{12:12,13:13,14:14,15:15,16:16,20:20,21:21,23:23,25:25,27:27,33:33,37:37,40:40,41:41,42:42}],36:[function(e,t,r){function n(e,t){var r=0,n={};for(t|=0;r<e.length;)n[s[r+t]]=e[r++];return n}var i=r,o=e(37),s=["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,"",o.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])},{37:37}],37:[function(e,r){var n,i,o=r.exports=e(39),s=e(30);o.codegen=e(3),o.fetch=e(5),o.path=e(8),o.fs=o.inquire("fs"),o.toArray=function(e){if(e){for(var t=Object.keys(e),r=Array(t.length),n=0;n<t.length;)r[n]=e[t[n++]];return r}return[]},o.toObject=function(e){for(var r={},n=0;n<e.length;){var i=e[n++],o=e[n++];o!==t&&(r[i]=o)}return r};var a=/\\/g,u=/"/g;o.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)},o.safeProp=function(e){return!/^[$\w_]+$/.test(e)||o.isReserved(e)?'["'+e.replace(a,"\\\\").replace(u,'\\"')+'"]':"."+e},o.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var f=/_([a-z])/g;o.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(f,function(e,t){return t.toUpperCase()})},o.compareFieldsById=function(e,t){return e.id-t.id},o.decorateType=function(t,r){if(t.$type)return r&&t.$type.name!==r&&(o.decorateRoot.remove(t.$type),t.$type.name=r,o.decorateRoot.add(t.$type)),t.$type;n||(n=e(35));var i=new n(r||t.name);return o.decorateRoot.add(i),i.ctor=t,Object.defineProperty(t,"$type",{value:i,enumerable:!1}),Object.defineProperty(t.prototype,"$type",{value:i,enumerable:!1}),i};var l=0;o.decorateEnum=function(t){if(t.$type)return t.$type;i||(i=e(15));var r=new i("Enum"+l++,t);return o.decorateRoot.add(r),Object.defineProperty(t,"$type",{value:r,enumerable:!1}),r},Object.defineProperty(o,"decorateRoot",{get:function(){return s.decorated||(s.decorated=new(e(29)))}})},{15:15,29:29,3:3,30:30,35:35,39:39,5:5,8:8}],38:[function(e,t){function r(e,t){this.lo=e>>>0,this.hi=t>>>0}t.exports=r;var n=e(39),i=r.zero=new r(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var o=r.zeroHash="\0\0\0\0\0\0\0\0";r.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var n=e>>>0,o=(e-n)/4294967296>>>0;return t&&(o=~o>>>0,n=~n>>>0,++n>4294967295&&(n=0,++o>4294967295&&(o=0))),new r(n,o)},r.from=function(e){if("number"==typeof e)return r.fromNumber(e);if(n.isString(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):i},r.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},r.prototype.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 s=String.prototype.charCodeAt;r.fromHash=function(e){return e===o?i:new r((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},r.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},r.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},r.prototype.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},r.prototype.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}},{39:39}],39:[function(r,n,i){function o(e,r,n){for(var i=Object.keys(r),o=0;o<i.length;++o)e[i[o]]!==t&&n||(e[i[o]]=r[i[o]]);return e}function s(e){function t(e,r){if(!(this instanceof t))return new t(e,r);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:Error().stack||""}),r&&o(this,r)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return e}}),t.prototype.toString=function(){return this.name+": "+this.message},t}var a=i;a.asPromise=r(1),a.base64=r(2),a.EventEmitter=r(4),a.float=r(6),a.inquire=r(7),a.utf8=r(10),a.pool=r(9),a.LongBits=r(38),a.emptyArray=Object.freeze?Object.freeze([]):[],a.emptyObject=Object.freeze?Object.freeze({}):{},a.isNode=!!(e.process&&e.process.versions&&e.process.versions.node),a.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},a.isString=function(e){return"string"==typeof e||e instanceof String},a.isObject=function(e){return e&&"object"==typeof e},a.isset=a.isSet=function(e,t){var r=e[t];return!(null==r||!e.hasOwnProperty(t))&&("object"!=typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},a.Buffer=function(){try{var e=a.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),a.p=null,a.u=null,a.newBuffer=function(e){return"number"==typeof e?a.Buffer?a.u(e):new a.Array(e):a.Buffer?a.p(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},a.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,a.Long=e.dcodeIO&&e.dcodeIO.Long||a.inquire("long"),a.key2Re=/^true|false|0|1$/,a.key32Re=/^-?(?:0|[1-9][0-9]*)$/,a.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,a.longToHash=function(e){return e?a.LongBits.from(e).toHash():a.LongBits.zeroHash},a.longFromHash=function(e,t){var r=a.LongBits.fromHash(e);return a.Long?a.Long.fromBits(r.lo,r.hi,t):r.toNumber(!!t)},a.merge=o,a.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},a.newError=s,a.ProtocolError=s("ProtocolError"),a.oneOfGetter=function(e){for(var r={},n=0;n<e.length;++n)r[e[n]]=1;return 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]}},a.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},a.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},a.e=function(){var e=a.Buffer;if(!e)return void(a.p=a.u=null);a.p=e.from!==Uint8Array.from&&e.from||function(t,r){return new e(t,r)},a.u=e.allocUnsafe||function(t){return new e(t)}}},{1:1,10:10,2:2,38:38,4:4,6:6,7:7,9:9}],40:[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 s){e("switch(%s){",i)("default:")("return%j",r(t,"enum value"));for(var o=Object.keys(t.resolvedType.values),a=0;a<o.length;++a)e("case %i:",t.resolvedType.values[o[a]]);e("break")("}")}else e("{")("var e=types[%i].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(!util.key32Re.test(%s))",n)("return%j",r(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",n)("return%j",r(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",n)("return%j",r(t,"boolean key"))}return e}function o(e){var t=a.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),o=e.oneofsArray,s={};o.length&&t("var p={}");for(var u=0;u<e.fieldsArray.length;++u){var f=e.b[u].resolve(),l="m"+a.safeProp(f.name);if(f.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",l,f.name),f.map)t("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(t,f,"k[i]"),n(t,f,u,l+"[k[i]]")("}");else if(f.repeated)t("if(!Array.isArray(%s))",l)("return%j",r(f,"array"))("for(var i=0;i<%s.length;++i){",l),n(t,f,u,l+"[i]")("}");else{if(f.partOf){var c=a.safeProp(f.partOf.name);1===s[f.partOf.name]&&t("if(p%s===1)",c)("return%j",f.partOf.name+": multiple values"),s[f.partOf.name]=1,t("p%s=1",c)}n(t,f,u,l)}f.optional&&t("}")}return t("return null")}t.exports=o;var s=e(15),a=e(37)},{15:15,37:37}],41:[function(e,t,r){var n=r,i=e(21);n[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=this.lookup(e["@type"]);if(t){var r="."===e["@type"].charAt(0)?e["@type"].substr(1):e["@type"];return this.create({type_url:"/"+r,value:t.encode(t.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){if(t&&t.json&&e.type_url&&e.value){var r=e.type_url.substring(e.type_url.lastIndexOf("/")+1),n=this.lookup(r);n&&(e=n.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof i){var o=e.$type.toObject(e,t);return o["@type"]=e.$type.fullName,o}return this.toObject(e,t)}}},{21:21}],42:[function(e,r){function n(e,r,n){this.fn=e,this.len=r,this.next=t,this.val=n}function i(){}function o(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function s(){this.len=0,this.head=new n(i,0,0),this.tail=this.head,this.states=null}function a(e,t,r){t[r]=255&e}function u(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 c(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}r.exports=s;var p,h=e(39),d=h.LongBits,y=h.base64,m=h.utf8;s.create=h.Buffer?function(){return(s.create=function(){return new p})()}:function(){return new s},s.alloc=function(e){return new h.Array(e)},h.Array!==Array&&(s.alloc=h.pool(s.alloc,h.Array.prototype.subarray)),s.prototype.v=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=u,s.prototype.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},s.prototype.int32=function(e){return e<0?this.v(l,10,d.fromNumber(e)):this.uint32(e)},s.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},s.prototype.uint64=function(e){var t=d.from(e);return this.v(l,t.length(),t)},s.prototype.int64=s.prototype.uint64,s.prototype.sint64=function(e){var t=d.from(e).zzEncode();return this.v(l,t.length(),t)},s.prototype.bool=function(e){return this.v(a,1,e?1:0)},s.prototype.fixed32=function(e){return this.v(c,4,e>>>0)},s.prototype.sfixed32=s.prototype.fixed32,s.prototype.fixed64=function(e){var t=d.from(e);return this.v(c,4,t.lo).v(c,4,t.hi)},s.prototype.sfixed64=s.prototype.fixed64,s.prototype.float=function(e){return this.v(h.float.writeFloatLE,4,e)},s.prototype.double=function(e){return this.v(h.float.writeDoubleLE,8,e)};var v=h.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]};s.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this.v(a,1,0);if(h.isString(e)){var r=s.alloc(t=y.length(e));y.decode(e,r,0),e=r}return this.uint32(t).v(v,t,e)},s.prototype.string=function(e){var t=m.length(e);return t?this.uint32(t).v(m.write,t,e):this.v(a,1,0)},s.prototype.fork=function(){return this.states=new o(this),this.head=this.tail=new n(i,0,0),this.len=0,this},s.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new n(i,0,0),this.len=0),this},s.prototype.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},s.prototype.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},s.e=function(e){p=e}},{39:39}],43:[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(42);(r.prototype=Object.create(i.prototype)).constructor=r;var o=e(39),s=o.Buffer;r.alloc=function(e){return(r.alloc=o.u)(e)};var a=s&&s.prototype instanceof Uint8Array&&"set"===s.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++]};r.prototype.bytes=function(e){o.isString(e)&&(e=o.p(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this.v(a,t,e),this},r.prototype.string=function(e){var t=s.byteLength(e);return this.uint32(t),t&&this.v(n,t,e),this}},{39:39,42:42}]},{},[19])}("object"==typeof window&&window||"object"==typeof self&&self||this);
7
+ !function(tt){"use strict";var r,e,t,i;r={1:[function(t,i){i.exports=function(t,i){var n=Array(arguments.length-1),s=0,r=2,u=!0;for(;r<arguments.length;)n[s++]=arguments[r++];return new Promise(function(r,e){n[s]=function(t){if(u)if(u=!1,t)e(t);else{for(var i=Array(arguments.length-1),n=0;n<i.length;)i[n++]=arguments[n];r.apply(null,i)}};try{t.apply(i||null,n)}catch(t){u&&(u=!1,e(t))}})}},{}],2:[function(t,i,n){var r=n;r.length=function(t){var i=t.length;if(!i)return 0;for(var n=0;1<--i%4&&"="===t.charAt(i);)++n;return Math.ceil(3*t.length)/4-n};for(var h=Array(64),f=Array(123),e=0;e<64;)f[h[e]=e<26?e+65:e<52?e+71:e<62?e-4:e-59|43]=e++;r.encode=function(t,i,n){for(var r,e=null,s=[],u=0,o=0;i<n;){var f=t[i++];switch(o){case 0:s[u++]=h[f>>2],r=(3&f)<<4,o=1;break;case 1:s[u++]=h[r|f>>4],r=(15&f)<<2,o=2;break;case 2:s[u++]=h[r|f>>6],s[u++]=h[63&f],o=0}8191<u&&((e||(e=[])).push(String.fromCharCode.apply(String,s)),u=0)}return o&&(s[u++]=h[r],s[u++]=61,1===o&&(s[u++]=61)),e?(u&&e.push(String.fromCharCode.apply(String,s.slice(0,u))),e.join("")):String.fromCharCode.apply(String,s.slice(0,u))};var a="invalid encoding";r.decode=function(t,i,n){for(var r,e=n,s=0,u=0;u<t.length;){var o=t.charCodeAt(u++);if(61===o&&1<s)break;if((o=f[o])===tt)throw Error(a);switch(s){case 0:r=o,s=1;break;case 1:i[n++]=r<<2|(48&o)>>4,r=o,s=2;break;case 2:i[n++]=(15&r)<<4|(60&o)>>2,r=o,s=3;break;case 3:i[n++]=(3&r)<<6|o,s=0}}if(1===s)throw Error(a);return n-e},r.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},{}],3:[function(t,i){function c(i,n){"string"==typeof i&&(n=i,i=tt);var f=[];function h(t){if("string"!=typeof t){var i=a();if(c.verbose&&console.log("codegen: "+i),i="return "+i,t){for(var n=Object.keys(t),r=Array(n.length+1),e=Array(n.length),s=0;s<n.length;)r[s]=n[s],e[s]=t[n[s++]];return r[s]=i,Function.apply(null,r).apply(null,e)}return Function(i)()}for(var u=Array(arguments.length-1),o=0;o<u.length;)u[o]=arguments[++o];if(o=0,t=t.replace(/%([%dfijs])/g,function(t,i){var n=u[o++];switch(i){case"d":case"f":return+n+"";case"i":return Math.floor(n)+"";case"j":return JSON.stringify(n);case"s":return n+""}return"%"}),o!==u.length)throw Error("parameter count mismatch");return f.push(t),h}function a(t){return"function "+(t||n||"")+"("+(i&&i.join(",")||"")+"){\n "+f.join("\n ")+"\n}"}return h.toString=a,h}(i.exports=c).verbose=!1},{}],4:[function(t,i){function n(){this.i={}}(i.exports=n).prototype.on=function(t,i,n){return(this.i[t]||(this.i[t]=[])).push({fn:i,ctx:n||this}),this},n.prototype.off=function(t,i){if(t===tt)this.i={};else if(i===tt)this.i[t]=[];else for(var n=this.i[t],r=0;r<n.length;)n[r].fn===i?n.splice(r,1):++r;return this},n.prototype.emit=function(t){var i=this.i[t];if(i){for(var n=[],r=1;r<arguments.length;)n.push(arguments[r++]);for(r=0;r<i.length;)i[r].fn.apply(i[r++].ctx,n)}return this}},{}],5:[function(t,i){i.exports=o;var s=t(1),u=t(7)("fs");function o(n,r,e){return"function"==typeof r?(e=r,r={}):r||(r={}),e?!r.xhr&&u&&u.readFile?u.readFile(n,function(t,i){return t&&"undefined"!=typeof XMLHttpRequest?o.xhr(n,r,e):t?e(t):e(null,r.binary?i:i.toString("utf8"))}):o.xhr(n,r,e):s(o,this,n,r)}o.xhr=function(t,n,r){var e=new XMLHttpRequest;e.onreadystatechange=function(){if(4!==e.readyState)return tt;if(0!==e.status&&200!==e.status)return r(Error("status "+e.status));if(n.binary){var t=e.response;if(!t){t=[];for(var i=0;i<e.responseText.length;++i)t.push(255&e.responseText.charCodeAt(i))}return r(null,"undefined"!=typeof Uint8Array?new Uint8Array(t):t)}return r(null,e.responseText)},n.binary&&("overrideMimeType"in e&&e.overrideMimeType("text/plain; charset=x-user-defined"),e.responseType="arraybuffer"),e.open("GET",t),e.send()}},{1:1,7:7}],6:[function(t,i){function n(o){return"undefined"!=typeof Float32Array?function(){var r=new Float32Array([-0]),e=new Uint8Array(r.buffer),t=128===e[3];function i(t,i,n){r[0]=t,i[n]=e[0],i[n+1]=e[1],i[n+2]=e[2],i[n+3]=e[3]}function n(t,i,n){r[0]=t,i[n]=e[3],i[n+1]=e[2],i[n+2]=e[1],i[n+3]=e[0]}function s(t,i){return e[0]=t[i],e[1]=t[i+1],e[2]=t[i+2],e[3]=t[i+3],r[0]}function u(t,i){return e[3]=t[i],e[2]=t[i+1],e[1]=t[i+2],e[0]=t[i+3],r[0]}o.writeFloatLE=t?i:n,o.writeFloatBE=t?n:i,o.readFloatLE=t?s:u,o.readFloatBE=t?u:s}():function(){function t(t,i,n,r){var e=i<0?1:0;if(e&&(i=-i),0===i)t(0<1/i?0:2147483648,n,r);else if(isNaN(i))t(2143289344,n,r);else if(34028234663852886e22<i)t((e<<31|2139095040)>>>0,n,r);else if(i<11754943508222875e-54)t((e<<31|Math.round(i/1401298464324817e-60))>>>0,n,r);else{var s=Math.floor(Math.log(i)/Math.LN2);t((e<<31|s+127<<23|8388607&Math.round(i*Math.pow(2,-s)*8388608))>>>0,n,r)}}function i(t,i,n){var r=t(i,n),e=2*(r>>31)+1,s=r>>>23&255,u=8388607&r;return 255===s?u?NaN:e*(1/0):0===s?1401298464324817e-60*e*u:e*Math.pow(2,s-150)*(u+8388608)}o.writeFloatLE=t.bind(null,r),o.writeFloatBE=t.bind(null,e),o.readFloatLE=i.bind(null,s),o.readFloatBE=i.bind(null,u)}(),"undefined"!=typeof Float64Array?function(){var r=new Float64Array([-0]),e=new Uint8Array(r.buffer),t=128===e[7];function i(t,i,n){r[0]=t,i[n]=e[0],i[n+1]=e[1],i[n+2]=e[2],i[n+3]=e[3],i[n+4]=e[4],i[n+5]=e[5],i[n+6]=e[6],i[n+7]=e[7]}function n(t,i,n){r[0]=t,i[n]=e[7],i[n+1]=e[6],i[n+2]=e[5],i[n+3]=e[4],i[n+4]=e[3],i[n+5]=e[2],i[n+6]=e[1],i[n+7]=e[0]}function s(t,i){return e[0]=t[i],e[1]=t[i+1],e[2]=t[i+2],e[3]=t[i+3],e[4]=t[i+4],e[5]=t[i+5],e[6]=t[i+6],e[7]=t[i+7],r[0]}function u(t,i){return e[7]=t[i],e[6]=t[i+1],e[5]=t[i+2],e[4]=t[i+3],e[3]=t[i+4],e[2]=t[i+5],e[1]=t[i+6],e[0]=t[i+7],r[0]}o.writeDoubleLE=t?i:n,o.writeDoubleBE=t?n:i,o.readDoubleLE=t?s:u,o.readDoubleBE=t?u:s}():function(){function t(t,i,n,r,e,s){var u=r<0?1:0;if(u&&(r=-r),0===r)t(0,e,s+i),t(0<1/r?0:2147483648,e,s+n);else if(isNaN(r))t(0,e,s+i),t(2146959360,e,s+n);else if(17976931348623157e292<r)t(0,e,s+i),t((u<<31|2146435072)>>>0,e,s+n);else{var o;if(r<22250738585072014e-324)t((o=r/5e-324)>>>0,e,s+i),t((u<<31|o/4294967296)>>>0,e,s+n);else{var f=Math.floor(Math.log(r)/Math.LN2);1024===f&&(f=1023),t(4503599627370496*(o=r*Math.pow(2,-f))>>>0,e,s+i),t((u<<31|f+1023<<20|1048576*o&1048575)>>>0,e,s+n)}}}function i(t,i,n,r,e){var s=t(r,e+i),u=t(r,e+n),o=2*(u>>31)+1,f=u>>>20&2047,h=4294967296*(1048575&u)+s;return 2047===f?h?NaN:o*(1/0):0===f?5e-324*o*h:o*Math.pow(2,f-1075)*(h+4503599627370496)}o.writeDoubleLE=t.bind(null,r,0,4),o.writeDoubleBE=t.bind(null,e,4,0),o.readDoubleLE=i.bind(null,s,0,4),o.readDoubleBE=i.bind(null,u,4,0)}(),o}function r(t,i,n){i[n]=255&t,i[n+1]=t>>>8&255,i[n+2]=t>>>16&255,i[n+3]=t>>>24}function e(t,i,n){i[n]=t>>>24,i[n+1]=t>>>16&255,i[n+2]=t>>>8&255,i[n+3]=255&t}function s(t,i){return(t[i]|t[i+1]<<8|t[i+2]<<16|t[i+3]<<24)>>>0}function u(t,i){return(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3])>>>0}i.exports=n(n)},{}],7:[function(t,i,n){function r(t){try{var i=eval("require")(t);if(i&&(i.length||Object.keys(i).length))return i}catch(t){}return null}i.exports=r},{}],8:[function(t,i,n){var r=n,s=r.isAbsolute=function(t){return/^(?:\/|\w+:)/.test(t)},e=r.normalize=function(t){var i=(t=t.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),n=s(t),r="";n&&(r=i.shift()+"/");for(var e=0;e<i.length;)".."===i[e]?0<e&&".."!==i[e-1]?i.splice(--e,2):n?i.splice(e,1):++e:"."===i[e]?i.splice(e,1):++e;return r+i.join("/")};r.resolve=function(t,i,n){return n||(i=e(i)),s(i)?i:(n||(t=e(t)),(t=t.replace(/(?:\/|^)[^/]+$/,"")).length?e(t+"/"+i):i)}},{}],9:[function(t,i){i.exports=function(n,r,t){var e=t||8192,s=e>>>1,u=null,o=e;return function(t){if(t<1||s<t)return n(t);e<o+t&&(u=n(e),o=0);var i=r.call(u,o,o+=t);return 7&o&&(o=1+(7|o)),i}}},{}],10:[function(t,i,n){var r=n;r.length=function(t){for(var i=0,n=0,r=0;r<t.length;++r)(n=t.charCodeAt(r))<128?i+=1:n<2048?i+=2:55296==(64512&n)&&56320==(64512&t.charCodeAt(r+1))?(++r,i+=4):i+=3;return i},r.read=function(t,i,n){if(n-i<1)return"";for(var r,e=null,s=[],u=0;i<n;)(r=t[i++])<128?s[u++]=r:191<r&&r<224?s[u++]=(31&r)<<6|63&t[i++]:239<r&&r<365?(r=((7&r)<<18|(63&t[i++])<<12|(63&t[i++])<<6|63&t[i++])-65536,s[u++]=55296+(r>>10),s[u++]=56320+(1023&r)):s[u++]=(15&r)<<12|(63&t[i++])<<6|63&t[i++],8191<u&&((e||(e=[])).push(String.fromCharCode.apply(String,s)),u=0);return e?(u&&e.push(String.fromCharCode.apply(String,s.slice(0,u))),e.join("")):String.fromCharCode.apply(String,s.slice(0,u))},r.write=function(t,i,n){for(var r,e,s=n,u=0;u<t.length;++u)(r=t.charCodeAt(u))<128?i[n++]=r:(r<2048?i[n++]=r>>6|192:(55296==(64512&r)&&56320==(64512&(e=t.charCodeAt(u+1)))?(r=65536+((1023&r)<<10)+(1023&e),++u,i[n++]=r>>18|240,i[n++]=r>>12&63|128):i[n++]=r>>12|224,i[n++]=r>>6&63|128),i[n++]=63&r|128);return n-s}},{}],11:[function(t,i){i.exports=e;var n,r=/\/|\./;function e(t,i){r.test(t)||(t="google/protobuf/"+t+".proto",i={nested:{google:{nested:{protobuf:{nested:i}}}}}),e[t]=i}e("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}}),e("duration",{Duration:n={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),e("timestamp",{Timestamp:n}),e("empty",{Empty:{fields:{}}}),e("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}}}}),e("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}}}}),e("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),e.get=function(t){return e[t]||null}},{}],12:[function(t,i,n){var r=n,l=t(15),v=t(37);function u(t,i,n,r){if(i.resolvedType)if(i.resolvedType instanceof l){t("switch(d%s){",r);for(var e=i.resolvedType.values,s=Object.keys(e),u=0;u<s.length;++u)i.repeated&&e[s[u]]===i.typeDefault&&t("default:"),t("case%j:",s[u])("case %i:",e[s[u]])("m%s=%j",r,e[s[u]])("break");t("}")}else t('if(typeof d%s!=="object")',r)("throw TypeError(%j)",i.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",r,n,r);else{var o=!1;switch(i.type){case"double":case"float":t("m%s=Number(d%s)",r,r);break;case"uint32":case"fixed32":t("m%s=d%s>>>0",r,r);break;case"int32":case"sint32":case"sfixed32":t("m%s=d%s|0",r,r);break;case"uint64":o=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",r,r,o)('else if(typeof d%s==="string")',r)("m%s=parseInt(d%s,10)",r,r)('else if(typeof d%s==="number")',r)("m%s=d%s",r,r)('else if(typeof d%s==="object")',r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",r,r,r,o?"true":"");break;case"bytes":t('if(typeof d%s==="string")',r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",r,r,r)("else if(d%s.length)",r)("m%s=d%s",r,r);break;case"string":t("m%s=String(d%s)",r,r);break;case"bool":t("m%s=Boolean(d%s)",r,r)}}return t}function d(t,i,n,r){if(i.resolvedType)i.resolvedType instanceof l?t("d%s=o.enums===String?types[%i].values[m%s]:m%s",r,n,r,r):t("d%s=types[%i].toObject(m%s,o)",r,n,r);else{var e=!1;switch(i.type){case"double":case"float":t("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",r,r,r,r);break;case"uint64":e=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t('if(typeof m%s==="number")',r)("d%s=o.longs===String?String(m%s):m%s",r,r,r)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",r,r,r,r,e?"true":"",r);break;case"bytes":t("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",r,r,r,r,r);break;default:t("d%s=m%s",r,r)}}return t}r.fromObject=function(t){var i=t.fieldsArray,n=v.codegen(["d"],t.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!i.length)return n("return new this.ctor");n("var m=new this.ctor");for(var r=0;r<i.length;++r){var e=i[r].resolve(),s=v.safeProp(e.name);e.map?(n("if(d%s){",s)('if(typeof d%s!=="object")',s)("throw TypeError(%j)",e.fullName+": object expected")("m%s={}",s)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",s),u(n,e,r,s+"[ks[i]]")("}")("}")):e.repeated?(n("if(d%s){",s)("if(!Array.isArray(d%s))",s)("throw TypeError(%j)",e.fullName+": array expected")("m%s=[]",s)("for(var i=0;i<d%s.length;++i){",s),u(n,e,r,s+"[i]")("}")("}")):(e.resolvedType instanceof l||n("if(d%s!=null){",s),u(n,e,r,s),e.resolvedType instanceof l||n("}"))}return n("return m")},r.toObject=function(t){var i=t.fieldsArray.slice().sort(v.compareFieldsById);if(!i.length)return v.codegen()("return {}");for(var n=v.codegen(["m","o"],t.name+"$toObject")("if(!o)")("o={}")("var d={}"),r=[],e=[],s=[],u=0;u<i.length;++u)i[u].partOf||(i[u].resolve().repeated?r:i[u].map?e:s).push(i[u]);if(r.length){for(n("if(o.arrays||o.defaults){"),u=0;u<r.length;++u)n("d%s=[]",v.safeProp(r[u].name));n("}")}if(e.length){for(n("if(o.objects||o.defaults){"),u=0;u<e.length;++u)n("d%s={}",v.safeProp(e[u].name));n("}")}if(s.length){for(n("if(o.defaults){"),u=0;u<s.length;++u){var o=s[u],f=v.safeProp(o.name);if(o.resolvedType instanceof l)n("d%s=o.enums===String?%j:%j",f,o.resolvedType.valuesById[o.typeDefault],o.typeDefault);else if(o.long)n("if(util.Long){")("var n=new util.Long(%i,%i,%j)",o.typeDefault.low,o.typeDefault.high,o.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",f)("}else")("d%s=o.longs===String?%j:%i",f,o.typeDefault.toString(),o.typeDefault.toNumber());else if(o.bytes){var h="["+Array.prototype.slice.call(o.typeDefault).join(",")+"]";n("if(o.bytes===String)d%s=%j",f,String.fromCharCode.apply(String,o.typeDefault))("else{")("d%s=%s",f,h)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",f,f)("}")}else n("d%s=%j",f,o.typeDefault)}n("}")}var a=!1;for(u=0;u<i.length;++u){o=i[u];var c=t.e.indexOf(o);f=v.safeProp(o.name);o.map?(a||(a=!0,n("var ks2")),n("if(m%s&&(ks2=Object.keys(m%s)).length){",f,f)("d%s={}",f)("for(var j=0;j<ks2.length;++j){"),d(n,o,c,f+"[ks2[j]]")("}")):o.repeated?(n("if(m%s&&m%s.length){",f,f)("d%s=[]",f)("for(var j=0;j<m%s.length;++j){",f),d(n,o,c,f+"[j]")("}")):(n("if(m%s!=null&&m.hasOwnProperty(%j)){",f,o.name),d(n,o,c,f),o.partOf&&n("if(o.oneofs)")("d%s=%j",v.safeProp(o.partOf.name),o.name)),n("}")}return n("return d")}},{15:15,37:37}],13:[function(t,i){i.exports=function(t){var i=h.codegen(["r","l"],t.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(t.fieldsArray.filter(function(t){return t.map}).length?",k":""))("while(r.pos<c){")("var t=r.uint32()");t.group&&i("if((t&7)===4)")("break");i("switch(t>>>3){");for(var n=0;n<t.fieldsArray.length;++n){var r=t.e[n].resolve(),e=r.resolvedType instanceof o?"int32":r.type,s="m"+h.safeProp(r.name);i("case %i:",r.id),r.map?(i("r.skip().pos++")("if(%s===util.emptyObject)",s)("%s={}",s)("k=r.%s()",r.keyType)("r.pos++"),f.long[r.keyType]!==tt?f.basic[e]===tt?i('%s[typeof k==="object"?util.longToHash(k):k]=types[%i].decode(r,r.uint32())',s,n):i('%s[typeof k==="object"?util.longToHash(k):k]=r.%s()',s,e):f.basic[e]===tt?i("%s[k]=types[%i].decode(r,r.uint32())",s,n):i("%s[k]=r.%s()",s,e)):r.repeated?(i("if(!(%s&&%s.length))",s,s)("%s=[]",s),f.packed[e]!==tt&&i("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",s,e)("}else"),f.basic[e]===tt?i(r.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",s,n):i("%s.push(r.%s())",s,e)):f.basic[e]===tt?i(r.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",s,n):i("%s=r.%s()",s,e),i("break")}for(i("default:")("r.skipType(t&7)")("break")("}")("}"),n=0;n<t.e.length;++n){var u=t.e[n];u.required&&i("if(!m.hasOwnProperty(%j))",u.name)("throw util.ProtocolError(%j,{instance:m})","missing required '"+u.name+"'")}return i("return m")};var o=t(15),f=t(36),h=t(37)},{15:15,36:36,37:37}],14:[function(t,i){i.exports=function(t){for(var i,n=c.codegen(["m","w"],t.name+"$encode")("if(!w)")("w=Writer.create()"),r=t.fieldsArray.slice().sort(c.compareFieldsById),e=0;e<r.length;++e){var s=r[e].resolve(),u=t.e.indexOf(s),o=s.resolvedType instanceof h?"int32":s.type,f=a.basic[o];i="m"+c.safeProp(s.name),s.map?(n("if(%s!=null&&m.hasOwnProperty(%j)){",i,s.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",i)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(s.id<<3|2)>>>0,8|a.mapKey[s.keyType],s.keyType),f===tt?n("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",u,i):n(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|f,o,i),n("}")("}")):s.repeated?(n("if(%s!=null&&%s.length){",i,i),s.packed&&a.packed[o]!==tt?n("w.uint32(%i).fork()",(s.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",i)("w.%s(%s[i])",o,i)("w.ldelim()"):(n("for(var i=0;i<%s.length;++i)",i),f===tt?l(n,s,u,i+"[i]"):n("w.uint32(%i).%s(%s[i])",(s.id<<3|f)>>>0,o,i)),n("}")):(s.optional&&n("if(%s!=null&&m.hasOwnProperty(%j))",i,s.name),f===tt?l(n,s,u,i):n("w.uint32(%i).%s(%s)",(s.id<<3|f)>>>0,o,i))}return n("return w")};var h=t(15),a=t(36),c=t(37);function l(t,i,n,r){return i.resolvedType.group?t("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",n,r,(i.id<<3|3)>>>0,(i.id<<3|4)>>>0):t("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",n,r,(i.id<<3|2)>>>0)}},{15:15,36:36,37:37}],15:[function(t,i){i.exports=e;var o=t(24);((e.prototype=Object.create(o.prototype)).constructor=e).className="Enum";var n=t(23),r=t(37);function e(t,i,n,r,e){if(o.call(this,t,n),i&&"object"!=typeof i)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=r,this.comments=e||{},this.reserved=tt,i)for(var s=Object.keys(i),u=0;u<s.length;++u)"number"==typeof i[s[u]]&&(this.valuesById[this.values[s[u]]=i[s[u]]]=s[u])}e.fromJSON=function(t,i){var n=new e(t,i.values,i.options,i.comment,i.comments);return n.reserved=i.reserved,n},e.prototype.toJSON=function(t){var i=!!t&&!!t.keepComments;return r.toObject(["options",this.options,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:tt,"comment",i?this.comment:tt,"comments",i?this.comments:tt])},e.prototype.add=function(t,i,n){if(!r.isString(t))throw TypeError("name must be a string");if(!r.isInteger(i))throw TypeError("id must be an integer");if(this.values[t]!==tt)throw Error("duplicate name '"+t+"' in "+this);if(this.isReservedId(i))throw Error("id "+i+" is reserved in "+this);if(this.isReservedName(t))throw Error("name '"+t+"' is reserved in "+this);if(this.valuesById[i]!==tt){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+i+" in "+this);this.values[t]=i}else this.valuesById[this.values[t]=i]=t;return this.comments[t]=n||null,this},e.prototype.remove=function(t){if(!r.isString(t))throw TypeError("name must be a string");var i=this.values[t];if(null==i)throw Error("name '"+t+"' does not exist in "+this);return delete this.valuesById[i],delete this.values[t],delete this.comments[t],this},e.prototype.isReservedId=function(t){return n.isReservedId(this.reserved,t)},e.prototype.isReservedName=function(t){return n.isReservedName(this.reserved,t)}},{23:23,24:24,37:37}],16:[function(t,i){i.exports=u;var o=t(24);((u.prototype=Object.create(o.prototype)).constructor=u).className="Field";var n,r=t(15),f=t(36),h=t(37),a=/^required|optional|repeated$/;function u(t,i,n,r,e,s,u){if(h.isObject(r)?(u=e,s=r,r=e=tt):h.isObject(e)&&(u=s,s=e,e=tt),o.call(this,t,s),!h.isInteger(i)||i<0)throw TypeError("id must be a non-negative integer");if(!h.isString(n))throw TypeError("type must be a string");if(r!==tt&&!a.test(r=r.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(e!==tt&&!h.isString(e))throw TypeError("extend must be a string");this.rule=r&&"optional"!==r?r:tt,this.type=n,this.id=i,this.extend=e||tt,this.required="required"===r,this.optional=!this.required,this.repeated="repeated"===r,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!h.Long&&f.long[n]!==tt,this.bytes="bytes"===n,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.u=null,this.comment=u}u.fromJSON=function(t,i){return new u(t,i.id,i.type,i.rule,i.extend,i.options,i.comment)},Object.defineProperty(u.prototype,"packed",{get:function(){return null===this.u&&(this.u=!1!==this.getOption("packed")),this.u}}),u.prototype.setOption=function(t,i,n){return"packed"===t&&(this.u=null),o.prototype.setOption.call(this,t,i,n)},u.prototype.toJSON=function(t){var i=!!t&&!!t.keepComments;return h.toObject(["rule","optional"!==this.rule&&this.rule||tt,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",i?this.comment:tt])},u.prototype.resolve=function(){if(this.resolved)return this;if((this.typeDefault=f.defaults[this.type])===tt&&(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof n?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof r&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(this.options.packed===tt||!this.resolvedType||this.resolvedType instanceof r)||delete this.options.packed,Object.keys(this.options).length||(this.options=tt)),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 t;h.base64.test(this.typeDefault)?h.base64.decode(this.typeDefault,t=h.newBuffer(h.base64.length(this.typeDefault)),0):h.utf8.write(this.typeDefault,t=h.newBuffer(h.utf8.length(this.typeDefault)),0),this.typeDefault=t}return this.map?this.defaultValue=h.emptyObject:this.repeated?this.defaultValue=h.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof n&&(this.parent.ctor.prototype[this.name]=this.defaultValue),o.prototype.resolve.call(this)},u.d=function(n,r,e,s){return"function"==typeof r?r=h.decorateType(r).name:r&&"object"==typeof r&&(r=h.decorateEnum(r).name),function(t,i){h.decorateType(t.constructor).add(new u(i,n,r,e,{default:s}))}},u.o=function(t){n=t}},{15:15,24:24,36:36,37:37}],17:[function(t,i){var r=i.exports=t(18);r.build="light",r.load=function(t,i,n){return"function"==typeof i?(n=i,i=new r.Root):i||(i=new r.Root),i.load(t,n)},r.loadSync=function(t,i){return i||(i=new r.Root),i.loadSync(t)},r.encoder=t(14),r.decoder=t(13),r.verifier=t(40),r.converter=t(12),r.ReflectionObject=t(24),r.Namespace=t(23),r.Root=t(29),r.Enum=t(15),r.Type=t(35),r.Field=t(16),r.OneOf=t(25),r.MapField=t(20),r.Service=t(33),r.Method=t(22),r.Message=t(21),r.wrappers=t(41),r.types=t(36),r.util=t(37),r.ReflectionObject.o(r.Root),r.Namespace.o(r.Type,r.Service,r.Enum),r.Root.o(r.Type),r.Field.o(r.Type)},{12:12,13:13,14:14,15:15,16:16,18:18,20:20,21:21,22:22,23:23,24:24,25:25,29:29,33:33,35:35,36:36,37:37,40:40,41:41}],18:[function(t,i,n){var r=n;function e(){r.Reader.o(r.BufferReader),r.util.o()}r.build="minimal",r.Writer=t(42),r.BufferWriter=t(43),r.Reader=t(27),r.BufferReader=t(28),r.util=t(39),r.rpc=t(31),r.roots=t(30),r.configure=e,r.Writer.o(r.BufferWriter),e()},{27:27,28:28,30:30,31:31,39:39,42:42,43:43}],19:[function(t,i){var n=i.exports=t(17);n.build="full",n.tokenize=t(34),n.parse=t(26),n.common=t(11),n.Root.o(n.Type,n.parse,n.common)},{11:11,17:17,26:26,34:34}],20:[function(t,i){i.exports=s;var u=t(16);((s.prototype=Object.create(u.prototype)).constructor=s).className="MapField";var n=t(36),o=t(37);function s(t,i,n,r,e,s){if(u.call(this,t,i,r,tt,tt,e,s),!o.isString(n))throw TypeError("keyType must be a string");this.keyType=n,this.resolvedKeyType=null,this.map=!0}s.fromJSON=function(t,i){return new s(t,i.id,i.keyType,i.type,i.options,i.comment)},s.prototype.toJSON=function(t){var i=!!t&&!!t.keepComments;return o.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",i?this.comment:tt])},s.prototype.resolve=function(){if(this.resolved)return this;if(n.mapKey[this.keyType]===tt)throw Error("invalid key type: "+this.keyType);return u.prototype.resolve.call(this)},s.d=function(n,r,e){return"function"==typeof e?e=o.decorateType(e).name:e&&"object"==typeof e&&(e=o.decorateEnum(e).name),function(t,i){o.decorateType(t.constructor).add(new s(i,n,r,e))}}},{16:16,36:36,37:37}],21:[function(t,i){i.exports=r;var n=t(39);function r(t){if(t)for(var i=Object.keys(t),n=0;n<i.length;++n)this[i[n]]=t[i[n]]}r.create=function(t){return this.$type.create(t)},r.encode=function(t,i){return this.$type.encode(t,i)},r.encodeDelimited=function(t,i){return this.$type.encodeDelimited(t,i)},r.decode=function(t){return this.$type.decode(t)},r.decodeDelimited=function(t){return this.$type.decodeDelimited(t)},r.verify=function(t){return this.$type.verify(t)},r.fromObject=function(t){return this.$type.fromObject(t)},r.toObject=function(t,i){return this.$type.toObject(t,i)},r.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},{39:39}],22:[function(t,i){i.exports=n;var f=t(24);((n.prototype=Object.create(f.prototype)).constructor=n).className="Method";var h=t(37);function n(t,i,n,r,e,s,u,o){if(h.isObject(e)?(u=e,e=s=tt):h.isObject(s)&&(u=s,s=tt),i!==tt&&!h.isString(i))throw TypeError("type must be a string");if(!h.isString(n))throw TypeError("requestType must be a string");if(!h.isString(r))throw TypeError("responseType must be a string");f.call(this,t,u),this.type=i||"rpc",this.requestType=n,this.requestStream=!!e||tt,this.responseType=r,this.responseStream=!!s||tt,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=o}n.fromJSON=function(t,i){return new n(t,i.type,i.requestType,i.responseType,i.requestStream,i.responseStream,i.options,i.comment)},n.prototype.toJSON=function(t){var i=!!t&&!!t.keepComments;return h.toObject(["type","rpc"!==this.type&&this.type||tt,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",i?this.comment:tt])},n.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),f.prototype.resolve.call(this))}},{24:24,37:37}],23:[function(t,i){i.exports=h;var n=t(24);((h.prototype=Object.create(n.prototype)).constructor=h).className="Namespace";var e,s,u,o=t(16),f=t(37);function r(t,i){if(!t||!t.length)return tt;for(var n={},r=0;r<t.length;++r)n[t[r].name]=t[r].toJSON(i);return n}function h(t,i){n.call(this,t,i),this.nested=tt,this.f=null}function a(t){return t.f=null,t}h.fromJSON=function(t,i){return new h(t,i.options).addJSON(i.nested)},h.arrayToJSON=r,h.isReservedId=function(t,i){if(t)for(var n=0;n<t.length;++n)if("string"!=typeof t[n]&&t[n][0]<=i&&t[n][1]>=i)return!0;return!1},h.isReservedName=function(t,i){if(t)for(var n=0;n<t.length;++n)if(t[n]===i)return!0;return!1},Object.defineProperty(h.prototype,"nestedArray",{get:function(){return this.f||(this.f=f.toArray(this.nested))}}),h.prototype.toJSON=function(t){return f.toObject(["options",this.options,"nested",r(this.nestedArray,t)])},h.prototype.addJSON=function(t){if(t)for(var i,n=Object.keys(t),r=0;r<n.length;++r)i=t[n[r]],this.add((i.fields!==tt?e.fromJSON:i.values!==tt?u.fromJSON:i.methods!==tt?s.fromJSON:i.id!==tt?o.fromJSON:h.fromJSON)(n[r],i));return this},h.prototype.get=function(t){return this.nested&&this.nested[t]||null},h.prototype.getEnum=function(t){if(this.nested&&this.nested[t]instanceof u)return this.nested[t].values;throw Error("no such enum: "+t)},h.prototype.add=function(t){if(!(t instanceof o&&t.extend!==tt||t instanceof e||t instanceof u||t instanceof s||t instanceof h))throw TypeError("object must be a valid nested object");if(this.nested){var i=this.get(t.name);if(i){if(!(i instanceof h&&t instanceof h)||i instanceof e||i instanceof s)throw Error("duplicate name '"+t.name+"' in "+this);for(var n=i.nestedArray,r=0;r<n.length;++r)t.add(n[r]);this.remove(i),this.nested||(this.nested={}),t.setOptions(i.options,!0)}}else this.nested={};return(this.nested[t.name]=t).onAdd(this),a(this)},h.prototype.remove=function(t){if(!(t instanceof n))throw TypeError("object must be a ReflectionObject");if(t.parent!==this)throw Error(t+" is not a member of "+this);return delete this.nested[t.name],Object.keys(this.nested).length||(this.nested=tt),t.onRemove(this),a(this)},h.prototype.define=function(t,i){if(f.isString(t))t=t.split(".");else if(!Array.isArray(t))throw TypeError("illegal path");if(t&&t.length&&""===t[0])throw Error("path must be relative");for(var n=this;0<t.length;){var r=t.shift();if(n.nested&&n.nested[r]){if(!((n=n.nested[r])instanceof h))throw Error("path conflicts with non-namespace objects")}else n.add(n=new h(r))}return i&&n.addJSON(i),n},h.prototype.resolveAll=function(){for(var t=this.nestedArray,i=0;i<t.length;)t[i]instanceof h?t[i++].resolveAll():t[i++].resolve();return this.resolve()},h.prototype.lookup=function(t,i,n){if("boolean"==typeof i?(n=i,i=tt):i&&!Array.isArray(i)&&(i=[i]),f.isString(t)&&t.length){if("."===t)return this.root;t=t.split(".")}else if(!t.length)return this;if(""===t[0])return this.root.lookup(t.slice(1),i);var r=this.get(t[0]);if(r){if(1===t.length){if(!i||-1<i.indexOf(r.constructor))return r}else if(r instanceof h&&(r=r.lookup(t.slice(1),i,!0)))return r}else for(var e=0;e<this.nestedArray.length;++e)if(this.f[e]instanceof h&&(r=this.f[e].lookup(t,i,!0)))return r;return null===this.parent||n?null:this.parent.lookup(t,i)},h.prototype.lookupType=function(t){var i=this.lookup(t,[e]);if(!i)throw Error("no such type: "+t);return i},h.prototype.lookupEnum=function(t){var i=this.lookup(t,[u]);if(!i)throw Error("no such Enum '"+t+"' in "+this);return i},h.prototype.lookupTypeOrEnum=function(t){var i=this.lookup(t,[e,u]);if(!i)throw Error("no such Type or Enum '"+t+"' in "+this);return i},h.prototype.lookupService=function(t){var i=this.lookup(t,[s]);if(!i)throw Error("no such Service '"+t+"' in "+this);return i},h.o=function(t,i,n){e=t,s=i,u=n}},{16:16,24:24,37:37}],24:[function(t,i){(i.exports=e).className="ReflectionObject";var n,r=t(37);function e(t,i){if(!r.isString(t))throw TypeError("name must be a string");if(i&&!r.isObject(i))throw TypeError("options must be an object");this.options=i,this.name=t,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(e.prototype,{root:{get:function(){for(var t=this;null!==t.parent;)t=t.parent;return t}},fullName:{get:function(){for(var t=[this.name],i=this.parent;i;)t.unshift(i.name),i=i.parent;return t.join(".")}}}),e.prototype.toJSON=function(){throw Error()},e.prototype.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var i=t.root;i instanceof n&&i.h(this)},e.prototype.onRemove=function(t){var i=t.root;i instanceof n&&i.a(this),this.parent=null,this.resolved=!1},e.prototype.resolve=function(){return this.resolved||this.root instanceof n&&(this.resolved=!0),this},e.prototype.getOption=function(t){return this.options?this.options[t]:tt},e.prototype.setOption=function(t,i,n){return n&&this.options&&this.options[t]!==tt||((this.options||(this.options={}))[t]=i),this},e.prototype.setOptions=function(t,i){if(t)for(var n=Object.keys(t),r=0;r<n.length;++r)this.setOption(n[r],t[n[r]],i);return this},e.prototype.toString=function(){var t=this.constructor.className,i=this.fullName;return i.length?t+" "+i:t},e.o=function(t){n=t}},{37:37}],25:[function(t,i){i.exports=s;var e=t(24);((s.prototype=Object.create(e.prototype)).constructor=s).className="OneOf";var n=t(16),r=t(37);function s(t,i,n,r){if(Array.isArray(i)||(n=i,i=tt),e.call(this,t,n),i!==tt&&!Array.isArray(i))throw TypeError("fieldNames must be an Array");this.oneof=i||[],this.fieldsArray=[],this.comment=r}function u(t){if(t.parent)for(var i=0;i<t.fieldsArray.length;++i)t.fieldsArray[i].parent||t.parent.add(t.fieldsArray[i])}s.fromJSON=function(t,i){return new s(t,i.oneof,i.options,i.comment)},s.prototype.toJSON=function(t){var i=!!t&&!!t.keepComments;return r.toObject(["options",this.options,"oneof",this.oneof,"comment",i?this.comment:tt])},s.prototype.add=function(t){if(!(t instanceof n))throw TypeError("field must be a Field");return t.parent&&t.parent!==this.parent&&t.parent.remove(t),this.oneof.push(t.name),this.fieldsArray.push(t),u(t.partOf=this),this},s.prototype.remove=function(t){if(!(t instanceof n))throw TypeError("field must be a Field");var i=this.fieldsArray.indexOf(t);if(i<0)throw Error(t+" is not a member of "+this);return this.fieldsArray.splice(i,1),-1<(i=this.oneof.indexOf(t.name))&&this.oneof.splice(i,1),t.partOf=null,this},s.prototype.onAdd=function(t){e.prototype.onAdd.call(this,t);for(var i=0;i<this.oneof.length;++i){var n=t.get(this.oneof[i]);n&&!n.partOf&&(n.partOf=this).fieldsArray.push(n)}u(this)},s.prototype.onRemove=function(t){for(var i,n=0;n<this.fieldsArray.length;++n)(i=this.fieldsArray[n]).parent&&i.parent.remove(i);e.prototype.onRemove.call(this,t)},s.d=function(){for(var n=Array(arguments.length),t=0;t<arguments.length;)n[t]=arguments[t++];return function(t,i){r.decorateType(t.constructor).add(new s(i,n)),Object.defineProperty(t,i,{get:r.oneOfGetter(n),set:r.oneOfSetter(n)})}}},{16:16,24:24,37:37}],26:[function(t,i){(i.exports=Y).filename=null,Y.defaults={keepCase:!1};var M=t(34),I=t(29),F=t(35),L=t(16),U=t(20),_=t(25),q=t(15),R=t(33),z=t(22),Z=t(36),B=t(37),P=/^[1-9][0-9]*$/,H=/^-?[1-9][0-9]*$/,X=/^0[x][0-9a-fA-F]+$/,C=/^-?0[x][0-9a-fA-F]+$/,D=/^0[0-7]+$/,J=/^-?0[0-7]+$/,W=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,G=/^[a-zA-Z_][a-zA-Z_0-9]*$/,K=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,Q=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;function Y(t,i,n){i instanceof I||(n=i,i=new I),n||(n=Y.defaults);var r,e,s,u,o,f=M(t,n.alternateCommentMode||!1),h=f.next,a=f.push,c=f.peek,l=f.skip,v=f.cmnt,d=!0,p=!1,w=i,y=n.keepCase?function(t){return t}:B.camelCase;function b(t,i,n){var r=Y.filename;return n||(Y.filename=null),Error("illegal "+(i||"token")+" '"+t+"' ("+(r?r+", ":"")+"line "+f.line+")")}function m(){var t,i=[];do{if('"'!==(t=h())&&"'"!==t)throw b(t);i.push(h()),l(t),t=c()}while('"'===t||"'"===t);return i.join("")}function g(i){var n=h();switch(n){case"'":case'"':return a(n),m();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return function(t,i){var n=1;"-"===t.charAt(0)&&(n=-1,t=t.substring(1));switch(t){case"inf":case"INF":case"Inf":return n*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(P.test(t))return n*parseInt(t,10);if(X.test(t))return n*parseInt(t,16);if(D.test(t))return n*parseInt(t,8);if(W.test(t))return n*parseFloat(t);throw b(t,"number",i)}(n,!0)}catch(t){if(i&&K.test(n))return n;throw b(n,"value")}}function j(t,i){for(var n,r;!i||'"'!==(n=c())&&"'"!==n?t.push([r=k(h()),l("to",!0)?k(h()):r]):t.push(m()),l(",",!0););l(";")}function k(t,i){switch(t){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!i&&"-"===t.charAt(0))throw b(t,"id");if(H.test(t))return parseInt(t,10);if(C.test(t))return parseInt(t,16);if(J.test(t))return parseInt(t,8);throw b(t,"id")}function E(){if(r!==tt)throw b("package");if(r=h(),!K.test(r))throw b(r,"name");w=w.define(r),l(";")}function O(){var t,i=c();switch(i){case"weak":t=s||(s=[]),h();break;case"public":h();default:t=e||(e=[])}i=m(),l(";"),t.push(i)}function A(){if(l("="),u=m(),!(p="proto3"===u)&&"proto2"!==u)throw b(u,"syntax");l(";")}function x(t,i){switch(i){case"option":return N(t,i),l(";"),!0;case"message":return function(t,i){if(!G.test(i=h()))throw b(i,"type name");var n=new F(i);S(n,function(t){if(!x(n,t))switch(t){case"map":!function(t){l("<");var i=h();if(Z.mapKey[i]===tt)throw b(i,"type");l(",");var n=h();if(!K.test(n))throw b(n,"type");l(">");var r=h();if(!G.test(r))throw b(r,"name");l("=");var e=new U(y(r),k(h()),i,n);S(e,function(t){if("option"!==t)throw b(t);N(e,t),l(";")},function(){$(e)}),t.add(e)}(n);break;case"required":case"optional":case"repeated":T(n,t);break;case"oneof":!function(t,i){if(!G.test(i=h()))throw b(i,"name");var n=new _(y(i));S(n,function(t){"option"===t?(N(n,t),l(";")):(a(t),T(n,"optional"))}),t.add(n)}(n,t);break;case"extensions":j(n.extensions||(n.extensions=[]));break;case"reserved":j(n.reserved||(n.reserved=[]),!0);break;default:if(!p||!K.test(t))throw b(t);a(t),T(n,"optional")}}),t.add(n)}(t,i),!0;case"enum":return function(t,i){if(!G.test(i=h()))throw b(i,"name");var n=new q(i);S(n,function(t){switch(t){case"option":N(n,t),l(";");break;case"reserved":j(n.reserved||(n.reserved=[]),!0);break;default:!function(t,i){if(!G.test(i))throw b(i,"name");l("=");var n=k(h(),!0),r={};S(r,function(t){if("option"!==t)throw b(t);N(r,t),l(";")},function(){$(r)}),t.add(i,n,r.comment)}(n,t)}}),t.add(n)}(t,i),!0;case"service":return function(t,i){if(!G.test(i=h()))throw b(i,"service name");var n=new R(i);S(n,function(t){if(!x(n,t)){if("rpc"!==t)throw b(t);!function(t,i){var n=i;if(!G.test(i=h()))throw b(i,"name");var r,e,s,u,o=i;l("("),l("stream",!0)&&(e=!0);if(!K.test(i=h()))throw b(i);r=i,l(")"),l("returns"),l("("),l("stream",!0)&&(u=!0);if(!K.test(i=h()))throw b(i);s=i,l(")");var f=new z(o,n,r,s,e,u);S(f,function(t){if("option"!==t)throw b(t);N(f,t),l(";")}),t.add(f)}(n,t)}}),t.add(n)}(t,i),!0;case"extend":return function(i,t){if(!K.test(t=h()))throw b(t,"reference");var n=t;S(null,function(t){switch(t){case"required":case"repeated":case"optional":T(i,t,n);break;default:if(!p||!K.test(t))throw b(t);a(t),T(i,"optional",n)}})}(t,i),!0}return!1}function S(t,i,n){var r=f.line;if(t&&(t.comment=v(),t.filename=Y.filename),l("{",!0)){for(var e;"}"!==(e=h());)i(e);l(";",!0)}else n&&n(),l(";"),t&&"string"!=typeof t.comment&&(t.comment=v(r))}function T(t,i,n){var r=h();if("group"!==r){if(!K.test(r))throw b(r,"type");var e=h();if(!G.test(e))throw b(e,"name");e=y(e),l("=");var s=new L(e,k(h()),r,i,n);S(s,function(t){if("option"!==t)throw b(t);N(s,t),l(";")},function(){$(s)}),t.add(s),p||!s.repeated||Z.packed[r]===tt&&Z.basic[r]!==tt||s.setOption("packed",!1,!0)}else!function(t,i){var n=h();if(!G.test(n))throw b(n,"name");var r=B.lcFirst(n);n===r&&(n=B.ucFirst(n));l("=");var e=k(h()),s=new F(n);s.group=!0;var u=new L(r,e,n,i);u.filename=Y.filename,S(s,function(t){switch(t){case"option":N(s,t),l(";");break;case"required":case"optional":case"repeated":T(s,t);break;default:throw b(t)}}),t.add(s).add(u)}(t,i)}function N(t,i){var n=l("(",!0);if(!K.test(i=h()))throw b(i,"name");var r=i;n&&(l(")"),r="("+r+")",i=c(),Q.test(i)&&(r+=i,h())),l("="),function t(i,n){if(l("{",!0))do{if(!G.test(o=h()))throw b(o,"name");"{"===c()?t(i,n+"."+o):(l(":"),"{"===c()?t(i,n+"."+o):V(i,n+"."+o,g(!0))),l(",",!0)}while(!l("}",!0));else V(i,n,g(!0))}(t,r)}function V(t,i,n){t.setOption&&t.setOption(i,n)}function $(t){if(l("[",!0)){for(;N(t,"option"),l(",",!0););l("]")}return t}for(;null!==(o=h());)switch(o){case"package":if(!d)throw b(o);E();break;case"import":if(!d)throw b(o);O();break;case"syntax":if(!d)throw b(o);A();break;case"option":if(!d)throw b(o);N(w,o),l(";");break;default:if(x(w,o)){d=!1;continue}throw b(o)}return Y.filename=null,{package:r,imports:e,weakImports:s,syntax:u,root:i}}},{15:15,16:16,20:20,22:22,25:25,29:29,33:33,34:34,35:35,36:36,37:37}],27:[function(t,i){i.exports=o;var n,r=t(39),e=r.LongBits,s=r.utf8;function u(t,i){return RangeError("index out of range: "+t.pos+" + "+(i||1)+" > "+t.len)}function o(t){this.buf=t,this.pos=0,this.len=t.length}var f,h="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new o(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new o(t);throw Error("illegal buffer")};function a(){var t=new e(0,0),i=0;if(!(4<this.len-this.pos)){for(;i<3;++i){if(this.pos>=this.len)throw u(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*i)>>>0,t}for(;i<4;++i)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(i=0,4<this.len-this.pos){for(;i<5;++i)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}else for(;i<5;++i){if(this.pos>=this.len)throw u(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function c(t,i){return(t[i-4]|t[i-3]<<8|t[i-2]<<16|t[i-1]<<24)>>>0}function l(){if(this.pos+8>this.len)throw u(this,8);return new e(c(this.buf,this.pos+=4),c(this.buf,this.pos+=4))}o.create=r.Buffer?function(t){return(o.create=function(t){return r.Buffer.isBuffer(t)?new n(t):h(t)})(t)}:h,o.prototype.c=r.Array.prototype.subarray||r.Array.prototype.slice,o.prototype.uint32=(f=4294967295,function(){if(f=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return f;if(f=(f|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return f;if(f=(f|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return f;if(f=(f|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return f;if(f=(f|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return f;if((this.pos+=5)>this.len)throw this.pos=this.len,u(this,10);return f}),o.prototype.int32=function(){return 0|this.uint32()},o.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},o.prototype.bool=function(){return 0!==this.uint32()},o.prototype.fixed32=function(){if(this.pos+4>this.len)throw u(this,4);return c(this.buf,this.pos+=4)},o.prototype.sfixed32=function(){if(this.pos+4>this.len)throw u(this,4);return 0|c(this.buf,this.pos+=4)},o.prototype.float=function(){if(this.pos+4>this.len)throw u(this,4);var t=r.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},o.prototype.double=function(){if(this.pos+8>this.len)throw u(this,4);var t=r.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},o.prototype.bytes=function(){var t=this.uint32(),i=this.pos,n=this.pos+t;if(n>this.len)throw u(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(i,n):i===n?new this.buf.constructor(0):this.c.call(this.buf,i,n)},o.prototype.string=function(){var t=this.bytes();return s.read(t,0,t.length)},o.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw u(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw u(this)}while(128&this.buf[this.pos++]);return this},o.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},o.o=function(t){n=t;var i=r.Long?"toLong":"toNumber";r.merge(o.prototype,{int64:function(){return a.call(this)[i](!1)},uint64:function(){return a.call(this)[i](!0)},sint64:function(){return a.call(this).zzDecode()[i](!1)},fixed64:function(){return l.call(this)[i](!0)},sfixed64:function(){return l.call(this)[i](!1)}})}},{39:39}],28:[function(t,i){i.exports=e;var n=t(27);(e.prototype=Object.create(n.prototype)).constructor=e;var r=t(39);function e(t){n.call(this,t)}r.Buffer&&(e.prototype.c=r.Buffer.prototype.slice),e.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len))}},{27:27,39:39}],29:[function(t,i){i.exports=n;var r=t(23);((n.prototype=Object.create(r.prototype)).constructor=n).className="Root";var e,v,d,s=t(16),u=t(15),o=t(25),p=t(37);function n(t){r.call(this,"",t),this.deferred=[],this.files=[]}function w(){}n.fromJSON=function(t,i){return i||(i=new n),t.options&&i.setOptions(t.options),i.addJSON(t.nested)},n.prototype.resolvePath=p.path.resolve,n.prototype.load=function t(i,s,u){"function"==typeof s&&(u=s,s=tt);var o=this;if(!u)return p.asPromise(t,o,i,s);var f=u===w;function h(t,i){if(u){var n=u;if(u=null,f)throw t;n(t,i)}}function a(t,i){try{if(p.isString(i)&&"{"===i.charAt(0)&&(i=JSON.parse(i)),p.isString(i)){v.filename=t;var n,r=v(i,o,s),e=0;if(r.imports)for(;e<r.imports.length;++e)(n=o.resolvePath(t,r.imports[e]))&&c(n);if(r.weakImports)for(e=0;e<r.weakImports.length;++e)(n=o.resolvePath(t,r.weakImports[e]))&&c(n,!0)}else o.setOptions(i.options).addJSON(i.nested)}catch(t){h(t)}f||l||h(null,o)}function c(n,r){var t=n.lastIndexOf("google/protobuf/");if(-1<t){var i=n.substring(t);i in d&&(n=i)}if(!(-1<o.files.indexOf(n)))if(o.files.push(n),n in d)f?a(n,d[n]):(++l,setTimeout(function(){--l,a(n,d[n])}));else if(f){var e;try{e=p.fs.readFileSync(n).toString("utf8")}catch(t){return void(r||h(t))}a(n,e)}else++l,p.fetch(n,function(t,i){--l,u&&(t?r?l||h(null,o):h(t):a(n,i))})}var l=0;p.isString(i)&&(i=[i]);for(var n,r=0;r<i.length;++r)(n=o.resolvePath("",i[r]))&&c(n);return f?o:(l||h(null,o),tt)},n.prototype.loadSync=function(t,i){if(!p.isNode)throw Error("not supported");return this.load(t,i,w)},n.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(t){return"'extend "+t.extend+"' in "+t.parent.fullName}).join(", "));return r.prototype.resolveAll.call(this)};var f=/^[A-Z]/;function h(t,i){var n=i.parent.lookup(i.extend);if(n){var r=new s(i.fullName,i.id,i.type,i.rule,tt,i.options);return(r.declaringField=i).extensionField=r,n.add(r),!0}return!1}n.prototype.h=function(t){if(t instanceof s)t.extend===tt||t.extensionField||h(0,t)||this.deferred.push(t);else if(t instanceof u)f.test(t.name)&&(t.parent[t.name]=t.values);else if(!(t instanceof o)){if(t instanceof e)for(var i=0;i<this.deferred.length;)h(0,this.deferred[i])?this.deferred.splice(i,1):++i;for(var n=0;n<t.nestedArray.length;++n)this.h(t.f[n]);f.test(t.name)&&(t.parent[t.name]=t)}},n.prototype.a=function(t){if(t instanceof s){if(t.extend!==tt)if(t.extensionField)t.extensionField.parent.remove(t.extensionField),t.extensionField=null;else{var i=this.deferred.indexOf(t);-1<i&&this.deferred.splice(i,1)}}else if(t instanceof u)f.test(t.name)&&delete t.parent[t.name];else if(t instanceof r){for(var n=0;n<t.nestedArray.length;++n)this.a(t.f[n]);f.test(t.name)&&delete t.parent[t.name]}},n.o=function(t,i,n){e=t,v=i,d=n}},{15:15,16:16,23:23,25:25,37:37}],30:[function(t,i){i.exports={}},{}],31:[function(t,i,n){n.Service=t(32)},{32:32}],32:[function(t,i){i.exports=n;var o=t(39);function n(t,i,n){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");o.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!i,this.responseDelimited=!!n}((n.prototype=Object.create(o.EventEmitter.prototype)).constructor=n).prototype.rpcCall=function t(n,i,r,e,s){if(!e)throw TypeError("request must be specified");var u=this;if(!s)return o.asPromise(t,u,n,i,r,e);if(!u.rpcImpl)return setTimeout(function(){s(Error("already ended"))},0),tt;try{return u.rpcImpl(n,i[u.requestDelimited?"encodeDelimited":"encode"](e).finish(),function(t,i){if(t)return u.emit("error",t,n),s(t);if(null===i)return u.end(!0),tt;if(!(i instanceof r))try{i=r[u.responseDelimited?"decodeDelimited":"decode"](i)}catch(t){return u.emit("error",t,n),s(t)}return u.emit("data",i,n),s(null,i)})}catch(t){return u.emit("error",t,n),setTimeout(function(){s(t)},0),tt}},n.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{39:39}],33:[function(t,i){i.exports=u;var r=t(23);((u.prototype=Object.create(r.prototype)).constructor=u).className="Service";var s=t(22),o=t(37),f=t(31);function u(t,i){r.call(this,t,i),this.methods={},this.l=null}function n(t){return t.l=null,t}u.fromJSON=function(t,i){var n=new u(t,i.options);if(i.methods)for(var r=Object.keys(i.methods),e=0;e<r.length;++e)n.add(s.fromJSON(r[e],i.methods[r[e]]));return i.nested&&n.addJSON(i.nested),n.comment=i.comment,n},u.prototype.toJSON=function(t){var i=r.prototype.toJSON.call(this,t),n=!!t&&!!t.keepComments;return o.toObject(["options",i&&i.options||tt,"methods",r.arrayToJSON(this.methodsArray,t)||{},"nested",i&&i.nested||tt,"comment",n?this.comment:tt])},Object.defineProperty(u.prototype,"methodsArray",{get:function(){return this.l||(this.l=o.toArray(this.methods))}}),u.prototype.get=function(t){return this.methods[t]||r.prototype.get.call(this,t)},u.prototype.resolveAll=function(){for(var t=this.methodsArray,i=0;i<t.length;++i)t[i].resolve();return r.prototype.resolve.call(this)},u.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);return t instanceof s?n((this.methods[t.name]=t).parent=this):r.prototype.add.call(this,t)},u.prototype.remove=function(t){if(t instanceof s){if(this.methods[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.methods[t.name],t.parent=null,n(this)}return r.prototype.remove.call(this,t)},u.prototype.create=function(t,i,n){for(var r,e=new f.Service(t,i,n),s=0;s<this.methodsArray.length;++s){var u=o.lcFirst((r=this.l[s]).resolve().name).replace(/[^$\w_]/g,"");e[u]=o.codegen(["r","c"],o.isReserved(u)?u+"_":u)("return this.rpcCall(m,q,s,r,c)")({m:r,q:r.resolvedRequestType.ctor,s:r.resolvedResponseType.ctor})}return e}},{22:22,23:23,31:31,37:37}],34:[function(t,i){i.exports=e;var E=/[\s{}=;:[\],'"()<>]/g,O=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,A=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,x=/^ *[*/]+ */,S=/^\s*\*?\/*/,T=/\n/g,N=/\s/,n=/\\(.?)/g,r={0:"\0",r:"\r",n:"\n",t:"\t"};function V(t){return t.replace(n,function(t,i){switch(i){case"\\":case"":return i;default:return r[i]||""}})}function e(o,f){o=o.toString();var h=0,a=o.length,c=1,u=null,l=null,v=0,d=!1,p=[],w=null;function y(t){return Error("illegal "+t+" (line "+c+")")}function b(t){return o.charAt(t)}function m(t,i){u=o.charAt(t++),v=c,d=!1;var n,r=t-(f?2:3);do{if(--r<0||"\n"===(n=o.charAt(r))){d=!0;break}}while(" "===n||"\t"===n);for(var e=o.substring(t,i).split(T),s=0;s<e.length;++s)e[s]=e[s].replace(f?S:x,"").trim();l=e.join("\n").trim()}function g(t){var i=j(t),n=o.substring(t,i);return/^\s*\/{1,2}/.test(n)}function j(t){for(var i=t;i<a&&"\n"!==b(i);)i++;return i}function r(){if(0<p.length)return p.shift();if(w)return function(){var t="'"===w?A:O;t.lastIndex=h-1;var i=t.exec(o);if(!i)throw y("string");return h=t.lastIndex,k(w),w=null,V(i[1])}();var t,i,n,r,e;do{if(h===a)return null;for(t=!1;N.test(n=b(h));)if("\n"===n&&++c,++h===a)return null;if("/"===b(h)){if(++h===a)throw y("comment");if("/"===b(h))if(f){if(e=!1,g(r=h)){e=!0;do{if((h=j(h))===a)break;h++}while(g(h))}else h=Math.min(a,j(h)+1);e&&m(r,h),c++,t=!0}else{for(e="/"===b(r=h+1);"\n"!==b(++h);)if(h===a)return null;++h,e&&m(r,h-1),++c,t=!0}else{if("*"!==(n=b(h)))return"/";r=h+1,e=f||"*"===b(r);do{if("\n"===n&&++c,++h===a)throw y("comment");i=n,n=b(h)}while("*"!==i||"/"!==n);++h,e&&m(r,h-2),t=!0}}}while(t);var s=h;if(E.lastIndex=0,!E.test(b(s++)))for(;s<a&&!E.test(b(s));)++s;var u=o.substring(h,h=s);return'"'!==u&&"'"!==u||(w=u),u}function k(t){p.push(t)}function e(){if(!p.length){var t=r();if(null===t)return null;k(t)}return p[0]}return Object.defineProperty({next:r,peek:e,push:k,skip:function(t,i){var n=e();if(n===t)return r(),!0;if(!i)throw y("token '"+n+"', '"+t+"' expected");return!1},cmnt:function(t){var i=null;return t===tt?v===c-1&&(f||"*"===u||d)&&(i=l):(v<t&&e(),v!==t||d||!f&&"/"!==u||(i=l)),i}},"line",{get:function(){return c}})}e.unescape=V},{}],35:[function(t,i){i.exports=m;var u=t(23);((m.prototype=Object.create(u.prototype)).constructor=m).className="Type";var o=t(15),f=t(25),h=t(16),a=t(20),c=t(33),e=t(21),s=t(27),l=t(42),v=t(37),d=t(14),p=t(13),w=t(40),y=t(12),b=t(41);function m(t,i){u.call(this,t,i),this.fields={},this.oneofs=tt,this.extensions=tt,this.reserved=tt,this.group=tt,this.v=null,this.e=null,this.p=null,this.w=null}function n(t){return t.v=t.e=t.p=null,delete t.encode,delete t.decode,delete t.verify,t}Object.defineProperties(m.prototype,{fieldsById:{get:function(){if(this.v)return this.v;this.v={};for(var t=Object.keys(this.fields),i=0;i<t.length;++i){var n=this.fields[t[i]],r=n.id;if(this.v[r])throw Error("duplicate id "+r+" in "+this);this.v[r]=n}return this.v}},fieldsArray:{get:function(){return this.e||(this.e=v.toArray(this.fields))}},oneofsArray:{get:function(){return this.p||(this.p=v.toArray(this.oneofs))}},ctor:{get:function(){return this.w||(this.ctor=m.generateConstructor(this)())},set:function(t){var i=t.prototype;i instanceof e||((t.prototype=new e).constructor=t,v.merge(t.prototype,i)),t.$type=t.prototype.$type=this,v.merge(t,e,!0),this.w=t;for(var n=0;n<this.fieldsArray.length;++n)this.e[n].resolve();var r={};for(n=0;n<this.oneofsArray.length;++n)r[this.p[n].resolve().name]={get:v.oneOfGetter(this.p[n].oneof),set:v.oneOfSetter(this.p[n].oneof)};n&&Object.defineProperties(t.prototype,r)}}}),m.generateConstructor=function(t){for(var i,n=v.codegen(["p"],t.name),r=0;r<t.fieldsArray.length;++r)(i=t.e[r]).map?n("this%s={}",v.safeProp(i.name)):i.repeated&&n("this%s=[]",v.safeProp(i.name));return n("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},m.fromJSON=function(t,i){var n=new m(t,i.options);n.extensions=i.extensions,n.reserved=i.reserved;for(var r=Object.keys(i.fields),e=0;e<r.length;++e)n.add((void 0!==i.fields[r[e]].keyType?a.fromJSON:h.fromJSON)(r[e],i.fields[r[e]]));if(i.oneofs)for(r=Object.keys(i.oneofs),e=0;e<r.length;++e)n.add(f.fromJSON(r[e],i.oneofs[r[e]]));if(i.nested)for(r=Object.keys(i.nested),e=0;e<r.length;++e){var s=i.nested[r[e]];n.add((s.id!==tt?h.fromJSON:s.fields!==tt?m.fromJSON:s.values!==tt?o.fromJSON:s.methods!==tt?c.fromJSON:u.fromJSON)(r[e],s))}return i.extensions&&i.extensions.length&&(n.extensions=i.extensions),i.reserved&&i.reserved.length&&(n.reserved=i.reserved),i.group&&(n.group=!0),i.comment&&(n.comment=i.comment),n},m.prototype.toJSON=function(t){var i=u.prototype.toJSON.call(this,t),n=!!t&&!!t.keepComments;return v.toObject(["options",i&&i.options||tt,"oneofs",u.arrayToJSON(this.oneofsArray,t),"fields",u.arrayToJSON(this.fieldsArray.filter(function(t){return!t.declaringField}),t)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:tt,"reserved",this.reserved&&this.reserved.length?this.reserved:tt,"group",this.group||tt,"nested",i&&i.nested||tt,"comment",n?this.comment:tt])},m.prototype.resolveAll=function(){for(var t=this.fieldsArray,i=0;i<t.length;)t[i++].resolve();var n=this.oneofsArray;for(i=0;i<n.length;)n[i++].resolve();return u.prototype.resolveAll.call(this)},m.prototype.get=function(t){return this.fields[t]||this.oneofs&&this.oneofs[t]||this.nested&&this.nested[t]||null},m.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);if(t instanceof h&&t.extend===tt){if(this.v?this.v[t.id]:this.fieldsById[t.id])throw Error("duplicate id "+t.id+" in "+this);if(this.isReservedId(t.id))throw Error("id "+t.id+" is reserved in "+this);if(this.isReservedName(t.name))throw Error("name '"+t.name+"' is reserved in "+this);return t.parent&&t.parent.remove(t),(this.fields[t.name]=t).message=this,t.onAdd(this),n(this)}return t instanceof f?(this.oneofs||(this.oneofs={}),(this.oneofs[t.name]=t).onAdd(this),n(this)):u.prototype.add.call(this,t)},m.prototype.remove=function(t){if(t instanceof h&&t.extend===tt){if(!this.fields||this.fields[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.fields[t.name],t.parent=null,t.onRemove(this),n(this)}if(t instanceof f){if(!this.oneofs||this.oneofs[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.oneofs[t.name],t.parent=null,t.onRemove(this),n(this)}return u.prototype.remove.call(this,t)},m.prototype.isReservedId=function(t){return u.isReservedId(this.reserved,t)},m.prototype.isReservedName=function(t){return u.isReservedName(this.reserved,t)},m.prototype.create=function(t){return new this.ctor(t)},m.prototype.setup=function(){for(var t=this.fullName,i=[],n=0;n<this.fieldsArray.length;++n)i.push(this.e[n].resolve().resolvedType);this.encode=d(this)({Writer:l,types:i,util:v}),this.decode=p(this)({Reader:s,types:i,util:v}),this.verify=w(this)({types:i,util:v}),this.fromObject=y.fromObject(this)({types:i,util:v}),this.toObject=y.toObject(this)({types:i,util:v});var r=b[t];if(r){var e=Object.create(this);e.fromObject=this.fromObject,this.fromObject=r.fromObject.bind(e),e.toObject=this.toObject,this.toObject=r.toObject.bind(e)}return this},m.prototype.encode=function(t,i){return this.setup().encode(t,i)},m.prototype.encodeDelimited=function(t,i){return this.encode(t,i&&i.len?i.fork():i).ldelim()},m.prototype.decode=function(t,i){return this.setup().decode(t,i)},m.prototype.decodeDelimited=function(t){return t instanceof s||(t=s.create(t)),this.decode(t,t.uint32())},m.prototype.verify=function(t){return this.setup().verify(t)},m.prototype.fromObject=function(t){return this.setup().fromObject(t)},m.prototype.toObject=function(t,i){return this.setup().toObject(t,i)},m.d=function(i){return function(t){v.decorateType(t,i)}}},{12:12,13:13,14:14,15:15,16:16,20:20,21:21,23:23,25:25,27:27,33:33,37:37,40:40,41:41,42:42}],36:[function(t,i,n){var r=n,e=t(37),s=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function u(t,i){var n=0,r={};for(i|=0;n<t.length;)r[s[n+i]]=t[n++];return r}r.basic=u([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),r.defaults=u([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",e.emptyArray,null]),r.long=u([0,0,0,1,1],7),r.mapKey=u([0,0,0,5,5,0,0,0,1,1,0,2],2),r.packed=u([1,5,0,0,0,5,5,0,0,0,1,1,0])},{37:37}],37:[function(r,t){var e,n,s=t.exports=r(39),i=r(30);s.codegen=r(3),s.fetch=r(5),s.path=r(8),s.fs=s.inquire("fs"),s.toArray=function(t){if(t){for(var i=Object.keys(t),n=Array(i.length),r=0;r<i.length;)n[r]=t[i[r++]];return n}return[]},s.toObject=function(t){for(var i={},n=0;n<t.length;){var r=t[n++],e=t[n++];e!==tt&&(i[r]=e)}return i};var u=/\\/g,o=/"/g;s.isReserved=function(t){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(t)},s.safeProp=function(t){return!/^[$\w_]+$/.test(t)||s.isReserved(t)?'["'+t.replace(u,"\\\\").replace(o,'\\"')+'"]':"."+t},s.ucFirst=function(t){return t.charAt(0).toUpperCase()+t.substring(1)};var f=/_([a-z])/g;s.camelCase=function(t){return t.substring(0,1)+t.substring(1).replace(f,function(t,i){return i.toUpperCase()})},s.compareFieldsById=function(t,i){return t.id-i.id},s.decorateType=function(t,i){if(t.$type)return i&&t.$type.name!==i&&(s.decorateRoot.remove(t.$type),t.$type.name=i,s.decorateRoot.add(t.$type)),t.$type;e||(e=r(35));var n=new e(i||t.name);return s.decorateRoot.add(n),n.ctor=t,Object.defineProperty(t,"$type",{value:n,enumerable:!1}),Object.defineProperty(t.prototype,"$type",{value:n,enumerable:!1}),n};var h=0;s.decorateEnum=function(t){if(t.$type)return t.$type;n||(n=r(15));var i=new n("Enum"+h++,t);return s.decorateRoot.add(i),Object.defineProperty(t,"$type",{value:i,enumerable:!1}),i},Object.defineProperty(s,"decorateRoot",{get:function(){return i.decorated||(i.decorated=new(r(29)))}})},{15:15,29:29,3:3,30:30,35:35,39:39,5:5,8:8}],38:[function(t,i){i.exports=e;var n=t(39);function e(t,i){this.lo=t>>>0,this.hi=i>>>0}var s=e.zero=new e(0,0);s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1};var r=e.zeroHash="\0\0\0\0\0\0\0\0";e.fromNumber=function(t){if(0===t)return s;var i=t<0;i&&(t=-t);var n=t>>>0,r=(t-n)/4294967296>>>0;return i&&(r=~r>>>0,n=~n>>>0,4294967295<++n&&(n=0,4294967295<++r&&(r=0))),new e(n,r)},e.from=function(t){if("number"==typeof t)return e.fromNumber(t);if(n.isString(t)){if(!n.Long)return e.fromNumber(parseInt(t,10));t=n.Long.fromString(t)}return t.low||t.high?new e(t.low>>>0,t.high>>>0):s},e.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var i=1+~this.lo>>>0,n=~this.hi>>>0;return i||(n=n+1>>>0),-(i+4294967296*n)}return this.lo+4294967296*this.hi},e.prototype.toLong=function(t){return n.Long?new n.Long(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}};var u=String.prototype.charCodeAt;e.fromHash=function(t){return t===r?s:new e((u.call(t,0)|u.call(t,1)<<8|u.call(t,2)<<16|u.call(t,3)<<24)>>>0,(u.call(t,4)|u.call(t,5)<<8|u.call(t,6)<<16|u.call(t,7)<<24)>>>0)},e.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},e.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},e.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},e.prototype.length=function(){var t=this.lo,i=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===i?t<16384?t<128?1:2:t<2097152?3:4:i<16384?i<128?5:6:i<2097152?7:8:n<128?9:10}},{39:39}],39:[function(t,i,n){var r=n;function e(t,i,n){for(var r=Object.keys(i),e=0;e<r.length;++e)t[r[e]]!==tt&&n||(t[r[e]]=i[r[e]]);return t}function s(t){function n(t,i){if(!(this instanceof n))return new n(t,i);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,n):Object.defineProperty(this,"stack",{value:Error().stack||""}),i&&e(this,i)}return(n.prototype=Object.create(Error.prototype)).constructor=n,Object.defineProperty(n.prototype,"name",{get:function(){return t}}),n.prototype.toString=function(){return this.name+": "+this.message},n}r.asPromise=t(1),r.base64=t(2),r.EventEmitter=t(4),r.float=t(6),r.inquire=t(7),r.utf8=t(10),r.pool=t(9),r.LongBits=t(38),r.global="undefined"!=typeof window&&window||"undefined"!=typeof global&&global||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isNode=!!(r.global.process&&r.global.process.versions&&r.global.process.versions.node),r.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},r.isString=function(t){return"string"==typeof t||t instanceof String},r.isObject=function(t){return t&&"object"==typeof t},r.isset=r.isSet=function(t,i){var n=t[i];return!(null==n||!t.hasOwnProperty(i))&&("object"!=typeof n||0<(Array.isArray(n)?n.length:Object.keys(n).length))},r.Buffer=function(){try{var t=r.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),r.y=null,r.b=null,r.newBuffer=function(t){return"number"==typeof t?r.Buffer?r.b(t):new r.Array(t):r.Buffer?r.y(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(t){return t?r.LongBits.from(t).toHash():r.LongBits.zeroHash},r.longFromHash=function(t,i){var n=r.LongBits.fromHash(t);return r.Long?r.Long.fromBits(n.lo,n.hi,i):n.toNumber(!!i)},r.merge=e,r.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},r.newError=s,r.ProtocolError=s("ProtocolError"),r.oneOfGetter=function(t){for(var n={},i=0;i<t.length;++i)n[t[i]]=1;return function(){for(var t=Object.keys(this),i=t.length-1;-1<i;--i)if(1===n[t[i]]&&this[t[i]]!==tt&&null!==this[t[i]])return t[i]}},r.oneOfSetter=function(n){return function(t){for(var i=0;i<n.length;++i)n[i]!==t&&delete this[n[i]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r.o=function(){var n=r.Buffer;n?(r.y=n.from!==Uint8Array.from&&n.from||function(t,i){return new n(t,i)},r.b=n.allocUnsafe||function(t){return new n(t)}):r.y=r.b=null}},{1:1,10:10,2:2,38:38,4:4,6:6,7:7,9:9}],40:[function(t,i){i.exports=function(t){var i=f.codegen(["m"],t.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),n=t.oneofsArray,r={};n.length&&i("var p={}");for(var e=0;e<t.fieldsArray.length;++e){var s=t.e[e].resolve(),u="m"+f.safeProp(s.name);if(s.optional&&i("if(%s!=null&&m.hasOwnProperty(%j)){",u,s.name),s.map)i("if(!util.isObject(%s))",u)("return%j",h(s,"object"))("var k=Object.keys(%s)",u)("for(var i=0;i<k.length;++i){"),c(i,s,"k[i]"),a(i,s,e,u+"[k[i]]")("}");else if(s.repeated)i("if(!Array.isArray(%s))",u)("return%j",h(s,"array"))("for(var i=0;i<%s.length;++i){",u),a(i,s,e,u+"[i]")("}");else{if(s.partOf){var o=f.safeProp(s.partOf.name);1===r[s.partOf.name]&&i("if(p%s===1)",o)("return%j",s.partOf.name+": multiple values"),r[s.partOf.name]=1,i("p%s=1",o)}a(i,s,e,u)}s.optional&&i("}")}return i("return null")};var u=t(15),f=t(37);function h(t,i){return t.name+": "+i+(t.repeated&&"array"!==i?"[]":t.map&&"object"!==i?"{k:"+t.keyType+"}":"")+" expected"}function a(t,i,n,r){if(i.resolvedType)if(i.resolvedType instanceof u){t("switch(%s){",r)("default:")("return%j",h(i,"enum value"));for(var e=Object.keys(i.resolvedType.values),s=0;s<e.length;++s)t("case %i:",i.resolvedType.values[e[s]]);t("break")("}")}else t("{")("var e=types[%i].verify(%s);",n,r)("if(e)")("return%j+e",i.name+".")("}");else switch(i.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.isInteger(%s))",r)("return%j",h(i,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",r,r,r,r)("return%j",h(i,"integer|Long"));break;case"float":case"double":t('if(typeof %s!=="number")',r)("return%j",h(i,"number"));break;case"bool":t('if(typeof %s!=="boolean")',r)("return%j",h(i,"boolean"));break;case"string":t("if(!util.isString(%s))",r)("return%j",h(i,"string"));break;case"bytes":t('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',r,r,r)("return%j",h(i,"buffer"))}return t}function c(t,i,n){switch(i.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.key32Re.test(%s))",n)("return%j",h(i,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.key64Re.test(%s))",n)("return%j",h(i,"integer|Long key"));break;case"bool":t("if(!util.key2Re.test(%s))",n)("return%j",h(i,"boolean key"))}return t}},{15:15,37:37}],41:[function(t,i,n){var r=n,s=t(21);r[".google.protobuf.Any"]={fromObject:function(t){if(t&&t["@type"]){var i=this.lookup(t["@type"]);if(i){var n="."===t["@type"].charAt(0)?t["@type"].substr(1):t["@type"];return this.create({type_url:"/"+n,value:i.encode(i.fromObject(t)).finish()})}}return this.fromObject(t)},toObject:function(t,i){if(i&&i.json&&t.type_url&&t.value){var n=t.type_url.substring(t.type_url.lastIndexOf("/")+1),r=this.lookup(n);r&&(t=r.decode(t.value))}if(!(t instanceof this.ctor)&&t instanceof s){var e=t.$type.toObject(t,i);return e["@type"]=t.$type.fullName,e}return this.toObject(t,i)}}},{21:21}],42:[function(t,i){i.exports=a;var n,r=t(39),e=r.LongBits,s=r.base64,u=r.utf8;function o(t,i,n){this.fn=t,this.len=i,this.next=tt,this.val=n}function f(){}function h(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function a(){this.len=0,this.head=new o(f,0,0),this.tail=this.head,this.states=null}function c(t,i,n){i[n]=255&t}function l(t,i){this.len=t,this.next=tt,this.val=i}function v(t,i,n){for(;t.hi;)i[n++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;127<t.lo;)i[n++]=127&t.lo|128,t.lo=t.lo>>>7;i[n++]=t.lo}function d(t,i,n){i[n]=255&t,i[n+1]=t>>>8&255,i[n+2]=t>>>16&255,i[n+3]=t>>>24}a.create=r.Buffer?function(){return(a.create=function(){return new n})()}:function(){return new a},a.alloc=function(t){return new r.Array(t)},r.Array!==Array&&(a.alloc=r.pool(a.alloc,r.Array.prototype.subarray)),a.prototype.g=function(t,i,n){return this.tail=this.tail.next=new o(t,i,n),this.len+=i,this},(l.prototype=Object.create(o.prototype)).fn=function(t,i,n){for(;127<t;)i[n++]=127&t|128,t>>>=7;i[n]=t},a.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new l((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},a.prototype.int32=function(t){return t<0?this.g(v,10,e.fromNumber(t)):this.uint32(t)},a.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},a.prototype.int64=a.prototype.uint64=function(t){var i=e.from(t);return this.g(v,i.length(),i)},a.prototype.sint64=function(t){var i=e.from(t).zzEncode();return this.g(v,i.length(),i)},a.prototype.bool=function(t){return this.g(c,1,t?1:0)},a.prototype.sfixed32=a.prototype.fixed32=function(t){return this.g(d,4,t>>>0)},a.prototype.sfixed64=a.prototype.fixed64=function(t){var i=e.from(t);return this.g(d,4,i.lo).g(d,4,i.hi)},a.prototype.float=function(t){return this.g(r.float.writeFloatLE,4,t)},a.prototype.double=function(t){return this.g(r.float.writeDoubleLE,8,t)};var p=r.Array.prototype.set?function(t,i,n){i.set(t,n)}:function(t,i,n){for(var r=0;r<t.length;++r)i[n+r]=t[r]};a.prototype.bytes=function(t){var i=t.length>>>0;if(!i)return this.g(c,1,0);if(r.isString(t)){var n=a.alloc(i=s.length(t));s.decode(t,n,0),t=n}return this.uint32(i).g(p,i,t)},a.prototype.string=function(t){var i=u.length(t);return i?this.uint32(i).g(u.write,i,t):this.g(c,1,0)},a.prototype.fork=function(){return this.states=new h(this),this.head=this.tail=new o(f,0,0),this.len=0,this},a.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new o(f,0,0),this.len=0),this},a.prototype.ldelim=function(){var t=this.head,i=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=i,this.len+=n),this},a.prototype.finish=function(){for(var t=this.head.next,i=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,i,n),n+=t.len,t=t.next;return i},a.o=function(t){n=t}},{39:39}],43:[function(t,i){i.exports=s;var n=t(42);(s.prototype=Object.create(n.prototype)).constructor=s;var r=t(39),e=r.Buffer;function s(){n.call(this)}s.alloc=function(t){return(s.alloc=r.b)(t)};var u=e&&e.prototype instanceof Uint8Array&&"set"===e.prototype.set.name?function(t,i,n){i.set(t,n)}:function(t,i,n){if(t.copy)t.copy(i,n,0,t.length);else for(var r=0;r<t.length;)i[n++]=t[r++]};function o(t,i,n){t.length<40?r.utf8.write(t,i,n):i.utf8Write(t,n)}s.prototype.bytes=function(t){r.isString(t)&&(t=r.y(t,"base64"));var i=t.length>>>0;return this.uint32(i),i&&this.g(u,i,t),this},s.prototype.string=function(t){var i=e.byteLength(t);return this.uint32(i),i&&this.g(o,i,t),this}},{39:39,42:42}]},e={},t=[19],i=function t(i){var n=e[i];return n||r[i][0].call(n=e[i]={exports:{}},t,n,n.exports),n.exports}(t[0]),i.util.global.protobuf=i,"function"==typeof define&&define.amd&&define(["long"],function(t){return t&&t.isLong&&(i.util.Long=t,i.configure()),i}),"object"==typeof module&&module&&module.exports&&(module.exports=i)}();
8
8
  //# sourceMappingURL=protobuf.min.js.map