easemob-websdk 5.0.0 → 5.1.0

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 (67) hide show
  1. package/bundle/im-sdk-web.iife.js +1 -1
  2. package/cache/cache-manager.d.ts +3 -0
  3. package/cache/cache-store.d.ts +6 -4
  4. package/cache/cache-utils.d.ts +1 -1
  5. package/chat-client.d.ts +25 -12
  6. package/chunks/cache-utils-B99glc0H.js +1 -0
  7. package/chunks/cache-utils-gowrxNr8.cjs +1 -0
  8. package/chunks/chat-manager-DCqgMxLm.js +2 -0
  9. package/chunks/chat-manager-D_KF5qM1.cjs +1 -0
  10. package/chunks/common-BIpcR2uQ.cjs +1 -0
  11. package/chunks/common-D_DfwSd3.js +1 -0
  12. package/chunks/{group-user-info-resolver-C5pdiqox.cjs → group-user-info-resolver-Ds35Z1Uf.cjs} +1 -1
  13. package/chunks/{group-user-info-resolver-FNRqDg18.js → group-user-info-resolver-lEtRdWli.js} +1 -1
  14. package/chunks/index-BmwQgZ3E.js +1 -0
  15. package/chunks/index-BsIqq7LU.cjs +1 -0
  16. package/chunks/index-CFMcR5a_.js +1 -0
  17. package/chunks/index-Dvvh1nf6.cjs +1 -0
  18. package/chunks/light-Dg9A1Xmd.js +1 -0
  19. package/chunks/light-dJjIln5b.cjs +1 -0
  20. package/chunks/query-params-BHyPuD2k.cjs +1 -0
  21. package/chunks/query-params-Bu3Xq4b6.js +1 -0
  22. package/chunks/reflection-proto-codec-BerStgkC.cjs +1 -0
  23. package/chunks/reflection-proto-codec-CjRraw85.js +1 -0
  24. package/chunks/{session-list-query-B6dh-b4Y.cjs → session-list-query-C4OQMvPf.cjs} +1 -1
  25. package/chunks/{session-list-query-Dnp2HbpW.js → session-list-query-rynxSxtv.js} +1 -1
  26. package/chunks/{user-info-BfRwS4ZA.js → user-info-DfbCp80h.js} +1 -1
  27. package/chunks/{user-info-icpL0Eaw.cjs → user-info-DsDDTJrw.cjs} +1 -1
  28. package/index.cjs +1 -1
  29. package/index.js +2 -2
  30. package/managers/chat/index.cjs +1 -1
  31. package/managers/chat/index.js +1 -1
  32. package/managers/chat-manager.d.ts +3 -2
  33. package/managers/chat-thread/index.cjs +1 -1
  34. package/managers/chat-thread/index.js +1 -1
  35. package/managers/chat-thread-manager.d.ts +3 -2
  36. package/managers/chatroom/index.cjs +1 -1
  37. package/managers/chatroom/index.js +1 -1
  38. package/managers/contact/index.cjs +1 -1
  39. package/managers/contact/index.js +1 -1
  40. package/managers/group/index.cjs +1 -1
  41. package/managers/group/index.js +1 -1
  42. package/managers/presence/index.cjs +1 -1
  43. package/managers/presence/index.js +1 -1
  44. package/managers/push/index.cjs +1 -1
  45. package/managers/push/index.js +1 -1
  46. package/managers/user-info/index.cjs +1 -1
  47. package/managers/user-info/index.js +1 -1
  48. package/package.json +1 -1
  49. package/platform/env.d.ts +1 -0
  50. package/rest/dns-config.d.ts +10 -2
  51. package/types/chat-client.d.ts +28 -3
  52. package/utils/query-params.d.ts +16 -0
  53. package/utils/runtime-global.d.ts +13 -0
  54. package/utils/storage-error.d.ts +8 -0
  55. package/validators/chat-client.d.ts +13 -5
  56. package/chunks/cache-utils-BwRPIZ7n.js +0 -1
  57. package/chunks/cache-utils-CKbcYPlM.cjs +0 -1
  58. package/chunks/chat-manager-ChdK26ck.cjs +0 -1
  59. package/chunks/chat-manager-DH8a6Qj9.js +0 -2
  60. package/chunks/common-CfAlncj9.cjs +0 -1
  61. package/chunks/common-DN_g4O3n.js +0 -1
  62. package/chunks/index-BKg4EGcI.cjs +0 -1
  63. package/chunks/index-CK3GHdGU.cjs +0 -1
  64. package/chunks/index-CjofwvEQ.js +0 -1
  65. package/chunks/index-uKWbjx-u.js +0 -1
  66. package/chunks/reflection-proto-codec-64ocOTHU.js +0 -1
  67. package/chunks/reflection-proto-codec-BnQFQdZC.cjs +0 -1
@@ -1 +0,0 @@
1
- var e=null;try{e=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function t(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}function r(e){return!0===(e&&e.__isLong__)}function i(e){var t=Math.clz32(e&-e);return e?31-t:t}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0}),t.isLong=r;var n={},o={};function s(e,t){var r,i,s;return t?(s=0<=(e>>>=0)&&e<256)&&(i=o[e])?i:(r=a(e,0,!0),s&&(o[e]=r),r):(s=-128<=(e|=0)&&e<128)&&(i=n[e])?i:(r=a(e,e<0?-1:0,!1),s&&(n[e]=r),r)}function u(e,t){if(isNaN(e))return t?g:v;if(t){if(e<0)return g;if(e>=p)return _}else{if(e<=-d)return j;if(e+1>=d)return O}return e<0?u(-e,t).neg():a(e%c|0,e/c|0,t)}function a(e,r,i){return new t(e,r,i)}t.fromInt=s,t.fromNumber=u,t.fromBits=a;var f=Math.pow;function h(e,t,r){if(0===e.length)throw Error("empty string");if("number"==typeof t?(r=t,t=!1):t=!!t,"NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return t?g:v;if((r=r||10)<2||36<r)throw RangeError("radix");var i;if((i=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return h(e.substring(1),t,r).neg();for(var n=u(f(r,8)),o=v,s=0;s<e.length;s+=8){var a=Math.min(8,e.length-s),l=parseInt(e.substring(s,s+a),r);if(a<8){var c=u(f(r,a));o=o.mul(c).add(u(l))}else o=(o=o.mul(n)).add(u(l))}return o.unsigned=t,o}function l(e,t){return"number"==typeof e?u(e,t):"string"==typeof e?h(e,t):a(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}t.fromString=h,t.fromValue=l;var c=4294967296,p=c*c,d=p/2,y=s(1<<24),v=s(0);t.ZERO=v;var g=s(0,!0);t.UZERO=g;var m=s(1);t.ONE=m;var b=s(1,!0);t.UONE=b;var w=s(-1);t.NEG_ONE=w;var O=a(-1,2147483647,!1);t.MAX_VALUE=O;var _=a(-1,-1,!0);t.MAX_UNSIGNED_VALUE=_;var j=a(0,-2147483648,!1);t.MIN_VALUE=j;var A=t.prototype;A.toInt=function(){return this.unsigned?this.low>>>0:this.low},A.toNumber=function(){return this.unsigned?(this.high>>>0)*c+(this.low>>>0):this.high*c+(this.low>>>0)},A.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(j)){var t=u(e),r=this.div(t),i=r.mul(t).sub(this);return r.toString(e)+i.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var n=u(f(e,6),this.unsigned),o=this,s="";;){var a=o.div(n),h=(o.sub(a.mul(n)).toInt()>>>0).toString(e);if((o=a).isZero())return h+s;for(;h.length<6;)h="0"+h;s=""+h+s}},A.getHighBits=function(){return this.high},A.getHighBitsUnsigned=function(){return this.high>>>0},A.getLowBits=function(){return this.low},A.getLowBitsUnsigned=function(){return this.low>>>0},A.getNumBitsAbs=function(){if(this.isNegative())return this.eq(j)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&!(e&1<<t);t--);return 0!=this.high?t+33:t+1},A.isSafeInteger=function(){var e=this.high>>21;return!e||!this.unsigned&&(-1===e&&!(0===this.low&&-2097152===this.high))},A.isZero=function(){return 0===this.high&&0===this.low},A.eqz=A.isZero,A.isNegative=function(){return!this.unsigned&&this.high<0},A.isPositive=function(){return this.unsigned||this.high>=0},A.isOdd=function(){return!(1&~this.low)},A.isEven=function(){return!(1&this.low)},A.equals=function(e){return r(e)||(e=l(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&(this.high===e.high&&this.low===e.low)},A.eq=A.equals,A.notEquals=function(e){return!this.eq(e)},A.neq=A.notEquals,A.ne=A.notEquals,A.lessThan=function(e){return this.comp(e)<0},A.lt=A.lessThan,A.lessThanOrEqual=function(e){return this.comp(e)<=0},A.lte=A.lessThanOrEqual,A.le=A.lessThanOrEqual,A.greaterThan=function(e){return this.comp(e)>0},A.gt=A.greaterThan,A.greaterThanOrEqual=function(e){return this.comp(e)>=0},A.gte=A.greaterThanOrEqual,A.ge=A.greaterThanOrEqual,A.compare=function(e){if(r(e)||(e=l(e)),this.eq(e))return 0;var t=this.isNegative(),i=e.isNegative();return t&&!i?-1:!t&&i?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},A.comp=A.compare,A.negate=function(){return!this.unsigned&&this.eq(j)?j:this.not().add(m)},A.neg=A.negate,A.add=function(e){r(e)||(e=l(e));var t=this.high>>>16,i=65535&this.high,n=this.low>>>16,o=65535&this.low,s=e.high>>>16,u=65535&e.high,f=e.low>>>16,h=0,c=0,p=0,d=0;return p+=(d+=o+(65535&e.low))>>>16,c+=(p+=n+f)>>>16,h+=(c+=i+u)>>>16,h+=t+s,a((p&=65535)<<16|(d&=65535),(h&=65535)<<16|(c&=65535),this.unsigned)},A.subtract=function(e){return r(e)||(e=l(e)),this.add(e.neg())},A.sub=A.subtract,A.multiply=function(t){if(this.isZero())return this;if(r(t)||(t=l(t)),e)return a(e.mul(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned);if(t.isZero())return this.unsigned?g:v;if(this.eq(j))return t.isOdd()?j:v;if(t.eq(j))return this.isOdd()?j:v;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(y)&&t.lt(y))return u(this.toNumber()*t.toNumber(),this.unsigned);var i=this.high>>>16,n=65535&this.high,o=this.low>>>16,s=65535&this.low,f=t.high>>>16,h=65535&t.high,c=t.low>>>16,p=65535&t.low,d=0,m=0,b=0,w=0;return b+=(w+=s*p)>>>16,m+=(b+=o*p)>>>16,b&=65535,m+=(b+=s*c)>>>16,d+=(m+=n*p)>>>16,m&=65535,d+=(m+=o*c)>>>16,m&=65535,d+=(m+=s*h)>>>16,d+=i*p+n*c+o*h+s*f,a((b&=65535)<<16|(w&=65535),(d&=65535)<<16|(m&=65535),this.unsigned)},A.mul=A.multiply,A.divide=function(t){if(r(t)||(t=l(t)),t.isZero())throw Error("division by zero");var i,n,o;if(e)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?a((this.unsigned?e.div_u:e.div_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?g:v;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return g;if(t.gt(this.shru(1)))return b;o=g}else{if(this.eq(j))return t.eq(m)||t.eq(w)?j:t.eq(j)?m:(i=this.shr(1).div(t).shl(1)).eq(v)?t.isNegative()?m:w:(n=this.sub(t.mul(i)),o=i.add(n.div(t)));if(t.eq(j))return this.unsigned?g:v;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();o=v}for(n=this;n.gte(t);){i=Math.max(1,Math.floor(n.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(i)/Math.LN2),h=s<=48?1:f(2,s-48),c=u(i),p=c.mul(t);p.isNegative()||p.gt(n);)p=(c=u(i-=h,this.unsigned)).mul(t);c.isZero()&&(c=m),o=o.add(c),n=n.sub(p)}return o},A.div=A.divide,A.modulo=function(t){return r(t)||(t=l(t)),e?a((this.unsigned?e.rem_u:e.rem_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},A.mod=A.modulo,A.rem=A.modulo,A.not=function(){return a(~this.low,~this.high,this.unsigned)},A.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},A.clz=A.countLeadingZeros,A.countTrailingZeros=function(){return this.low?i(this.low):i(this.high)+32},A.ctz=A.countTrailingZeros,A.and=function(e){return r(e)||(e=l(e)),a(this.low&e.low,this.high&e.high,this.unsigned)},A.or=function(e){return r(e)||(e=l(e)),a(this.low|e.low,this.high|e.high,this.unsigned)},A.xor=function(e){return r(e)||(e=l(e)),a(this.low^e.low,this.high^e.high,this.unsigned)},A.shiftLeft=function(e){return r(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?a(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):a(0,this.low<<e-32,this.unsigned)},A.shl=A.shiftLeft,A.shiftRight=function(e){return r(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?a(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):a(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},A.shr=A.shiftRight,A.shiftRightUnsigned=function(e){return r(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?a(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):a(32===e?this.high:this.high>>>e-32,0,this.unsigned)},A.shru=A.shiftRightUnsigned,A.shr_u=A.shiftRightUnsigned,A.rotateLeft=function(e){var t;return r(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?a(this.high,this.low,this.unsigned):e<32?(t=32-e,a(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned)):(t=32-(e-=32),a(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned))},A.rotl=A.rotateLeft,A.rotateRight=function(e){var t;return r(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?a(this.high,this.low,this.unsigned):e<32?(t=32-e,a(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned)):(t=32-(e-=32),a(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned))},A.rotr=A.rotateRight,A.toSigned=function(){return this.unsigned?a(this.low,this.high,!1):this},A.toUnsigned=function(){return this.unsigned?this:a(this.low,this.high,!0)},A.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},A.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},A.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},t.fromBytes=function(e,r,i){return i?t.fromBytesLE(e,r):t.fromBytesBE(e,r)},t.fromBytesLE=function(e,r){return new t(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,r)},t.fromBytesBE=function(e,r){return new t(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],r)},"function"==typeof BigInt&&(t.fromBigInt=function(e,t){return a(Number(BigInt.asIntN(32,e)),Number(BigInt.asIntN(32,e>>BigInt(32))),t)},t.fromValue=function(e,r){return"bigint"==typeof e?t.fromBigInt(e,r):l(e,r)},A.toBigInt=function(){var e=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|e});var E,k,T="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},N={exports:{}},S={},x={};function R(){if(k)return E;return k=1,E=function(e,t){var r=new Array(arguments.length-1),i=0,n=2,o=!0;for(;n<arguments.length;)r[i++]=arguments[n++];return new Promise(function(n,s){r[i]=function(e){if(o)if(o=!1,e)s(e);else{for(var t=new Array(arguments.length-1),r=0;r<t.length;)t[r++]=arguments[r];n.apply(null,t)}};try{e.apply(t||null,r)}catch(u){o&&(o=!1,s(u))}})},E}var B,I,L,F,D,P,C,$={};function q(){return C?P:(C=1,P=function(){return null})}var J,U,M,z,Z,H,V,W,G,X,K,Q,Y,ee,te={};function re(){return H||(H=1,function(){var e,t=x;function r(e,t,r){for(var i=Object.keys(t),n=0;n<i.length;++n)void 0!==e[i[n]]&&r||(e[i[n]]=t[i[n]]);return e}function i(e){function t(e,i){if(!(this instanceof t))return new t(e,i);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),i&&r(this,i)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}t.asPromise=R(),t.base64=(B||(B=1,function(){var e=$;e.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 t=new Array(64),r=new Array(123),i=0;i<64;)r[t[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;e.encode=function(e,r,i){for(var n,o=null,s=[],u=0,a=0;r<i;){var f=e[r++];switch(a){case 0:s[u++]=t[f>>2],n=(3&f)<<4,a=1;break;case 1:s[u++]=t[n|f>>4],n=(15&f)<<2,a=2;break;case 2:s[u++]=t[n|f>>6],s[u++]=t[63&f],a=0}u>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),u=0)}return a&&(s[u++]=t[n],s[u++]=61,1===a&&(s[u++]=61)),o?(u&&o.push(String.fromCharCode.apply(String,s.slice(0,u))),o.join("")):String.fromCharCode.apply(String,s.slice(0,u))};var n="invalid encoding";e.decode=function(e,t,i){for(var o,s=i,u=0,a=0;a<e.length;){var f=e.charCodeAt(a++);if(61===f&&u>1)break;if(void 0===(f=r[f]))throw Error(n);switch(u){case 0:o=f,u=1;break;case 1:t[i++]=o<<2|(48&f)>>4,o=f,u=2;break;case 2:t[i++]=(15&o)<<4|(60&f)>>2,o=f,u=3;break;case 3:t[i++]=(3&o)<<6|f,u=0}}if(1===u)throw Error(n);return i-s},e.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}}()),$),t.EventEmitter=function(){if(L)return I;function e(){this._listeners={}}return L=1,I=e,e.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},e.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],i=0;i<r.length;)r[i].fn===t?r.splice(i,1):++i;return this},e.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var r=[],i=1;i<arguments.length;)r.push(arguments[i++]);for(i=0;i<t.length;)t[i].fn.apply(t[i++].ctx,r)}return this},I}(),t.float=function(){if(D)return F;function e(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),i=128===r[3];function n(e,i,n){t[0]=e,i[n]=r[0],i[n+1]=r[1],i[n+2]=r[2],i[n+3]=r[3]}function o(e,i,n){t[0]=e,i[n]=r[3],i[n+1]=r[2],i[n+2]=r[1],i[n+3]=r[0]}function s(e,i){return r[0]=e[i],r[1]=e[i+1],r[2]=e[i+2],r[3]=e[i+3],t[0]}function u(e,i){return r[3]=e[i],r[2]=e[i+1],r[1]=e[i+2],r[0]=e[i+3],t[0]}e.writeFloatLE=i?n:o,e.writeFloatBE=i?o:n,e.readFloatLE=i?s:u,e.readFloatBE=i?u:s}():function(){function o(e,t,r,i){var n=t<0?1:0;if(n&&(t=-t),0===t)e(1/t>0?0:2147483648,r,i);else if(isNaN(t))e(2143289344,r,i);else if(t>34028234663852886e22)e((n<<31|2139095040)>>>0,r,i);else if(t<11754943508222875e-54)e((n<<31|Math.round(t/1401298464324817e-60))>>>0,r,i);else{var o=Math.floor(Math.log(t)/Math.LN2);e((n<<31|o+127<<23|8388607&Math.round(t*Math.pow(2,-o)*8388608))>>>0,r,i)}}function s(e,t,r){var i=e(t,r),n=2*(i>>31)+1,o=i>>>23&255,s=8388607&i;return 255===o?s?NaN:n*(1/0):0===o?1401298464324817e-60*n*s:n*Math.pow(2,o-150)*(s+8388608)}e.writeFloatLE=o.bind(null,t),e.writeFloatBE=o.bind(null,r),e.readFloatLE=s.bind(null,i),e.readFloatBE=s.bind(null,n)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),i=128===r[7];function n(e,i,n){t[0]=e,i[n]=r[0],i[n+1]=r[1],i[n+2]=r[2],i[n+3]=r[3],i[n+4]=r[4],i[n+5]=r[5],i[n+6]=r[6],i[n+7]=r[7]}function o(e,i,n){t[0]=e,i[n]=r[7],i[n+1]=r[6],i[n+2]=r[5],i[n+3]=r[4],i[n+4]=r[3],i[n+5]=r[2],i[n+6]=r[1],i[n+7]=r[0]}function s(e,i){return r[0]=e[i],r[1]=e[i+1],r[2]=e[i+2],r[3]=e[i+3],r[4]=e[i+4],r[5]=e[i+5],r[6]=e[i+6],r[7]=e[i+7],t[0]}function u(e,i){return r[7]=e[i],r[6]=e[i+1],r[5]=e[i+2],r[4]=e[i+3],r[3]=e[i+4],r[2]=e[i+5],r[1]=e[i+6],r[0]=e[i+7],t[0]}e.writeDoubleLE=i?n:o,e.writeDoubleBE=i?o:n,e.readDoubleLE=i?s:u,e.readDoubleBE=i?u:s}():function(){function o(e,t,r,i,n,o){var s=i<0?1:0;if(s&&(i=-i),0===i)e(0,n,o+t),e(1/i>0?0:2147483648,n,o+r);else if(isNaN(i))e(0,n,o+t),e(2146959360,n,o+r);else if(i>17976931348623157e292)e(0,n,o+t),e((s<<31|2146435072)>>>0,n,o+r);else{var u;if(i<22250738585072014e-324)e((u=i/5e-324)>>>0,n,o+t),e((s<<31|u/4294967296)>>>0,n,o+r);else{var a=Math.floor(Math.log(i)/Math.LN2);1024===a&&(a=1023),e(4503599627370496*(u=i*Math.pow(2,-a))>>>0,n,o+t),e((s<<31|a+1023<<20|1048576*u&1048575)>>>0,n,o+r)}}}function s(e,t,r,i,n){var o=e(i,n+t),s=e(i,n+r),u=2*(s>>31)+1,a=s>>>20&2047,f=4294967296*(1048575&s)+o;return 2047===a?f?NaN:u*(1/0):0===a?5e-324*u*f:u*Math.pow(2,a-1075)*(f+4503599627370496)}e.writeDoubleLE=o.bind(null,t,0,4),e.writeDoubleBE=o.bind(null,r,4,0),e.readDoubleLE=s.bind(null,i,0,4),e.readDoubleBE=s.bind(null,n,4,0)}(),e}function t(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 r(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 i(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function n(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}return D=1,F=e(e)}(),t.inquire=q(),t.utf8=(J||(J=1,(e=te).length=function(e){for(var t=0,r=0,i=0;i<e.length;++i)(r=e.charCodeAt(i))<128?t+=1:r<2048?t+=2:55296==(64512&r)&&56320==(64512&e.charCodeAt(i+1))?(++i,t+=4):t+=3;return t},e.read=function(e,t,r){if(r-t<1)return"";for(var i,n=null,o=[],s=0;t<r;)(i=e[t++])<128?o[s++]=i:i>191&&i<224?o[s++]=(31&i)<<6|63&e[t++]:i>239&&i<365?(i=((7&i)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[s++]=55296+(i>>10),o[s++]=56320+(1023&i)):o[s++]=(15&i)<<12|(63&e[t++])<<6|63&e[t++],s>8191&&((n||(n=[])).push(String.fromCharCode.apply(String,o)),s=0);return n?(s&&n.push(String.fromCharCode.apply(String,o.slice(0,s))),n.join("")):String.fromCharCode.apply(String,o.slice(0,s))},e.write=function(e,t,r){for(var i,n,o=r,s=0;s<e.length;++s)(i=e.charCodeAt(s))<128?t[r++]=i:i<2048?(t[r++]=i>>6|192,t[r++]=63&i|128):55296==(64512&i)&&56320==(64512&(n=e.charCodeAt(s+1)))?(i=65536+((1023&i)<<10)+(1023&n),++s,t[r++]=i>>18|240,t[r++]=i>>12&63|128,t[r++]=i>>6&63|128,t[r++]=63&i|128):(t[r++]=i>>12|224,t[r++]=i>>6&63|128,t[r++]=63&i|128);return r-o}),te),t.pool=M?U:(M=1,U=function(e,t,r){var i=r||8192,n=i>>>1,o=null,s=i;return function(r){if(r<1||r>n)return e(r);s+r>i&&(o=e(i),s=0);var u=t.call(o,s,s+=r);return 7&s&&(s=1+(7|s)),u}}),t.LongBits=function(){if(Z)return z;Z=1,z=t;var e=re();function t(e,t){this.lo=e>>>0,this.hi=t>>>0}var r=t.zero=new t(0,0);r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1};var i=t.zeroHash="\0\0\0\0\0\0\0\0";t.fromNumber=function(e){if(0===e)return r;var i=e<0;i&&(e=-e);var n=e>>>0,o=(e-n)/4294967296>>>0;return i&&(o=~o>>>0,n=~n>>>0,++n>4294967295&&(n=0,++o>4294967295&&(o=0))),new t(n,o)},t.from=function(i){if("number"==typeof i)return t.fromNumber(i);if(e.isString(i)){if(!e.Long)return t.fromNumber(parseInt(i,10));i=e.Long.fromString(i)}return i.low||i.high?new t(i.low>>>0,i.high>>>0):r},t.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},t.prototype.toLong=function(t){return e.Long?new e.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var n=String.prototype.charCodeAt;return t.fromHash=function(e){return e===i?r:new t((n.call(e,0)|n.call(e,1)<<8|n.call(e,2)<<16|n.call(e,3)<<24)>>>0,(n.call(e,4)|n.call(e,5)<<8|n.call(e,6)<<16|n.call(e,7)<<24)>>>0)},t.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)},t.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},t.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},t.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},z}(),t.isNode=Boolean(void 0!==T&&T&&T.process&&T.process.versions&&T.process.versions.node),t.global=t.isNode&&T||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||x,t.emptyArray=Object.freeze?Object.freeze([]):[],t.emptyObject=Object.freeze?Object.freeze({}):{},t.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},t.isString=function(e){return"string"==typeof e||e instanceof String},t.isObject=function(e){return e&&"object"==typeof e},t.isset=t.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)},t.Buffer=function(){try{var e=t.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(r){return null}}(),t._Buffer_from=null,t._Buffer_allocUnsafe=null,t.newBuffer=function(e){return"number"==typeof e?t.Buffer?t._Buffer_allocUnsafe(e):new t.Array(e):t.Buffer?t._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},t.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,t.Long=t.global.dcodeIO&&t.global.dcodeIO.Long||t.global.Long||t.inquire("long"),t.key2Re=/^true|false|0|1$/,t.key32Re=/^-?(?:0|[1-9][0-9]*)$/,t.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,t.longToHash=function(e){return e?t.LongBits.from(e).toHash():t.LongBits.zeroHash},t.longFromHash=function(e,r){var i=t.LongBits.fromHash(e);return t.Long?t.Long.fromBits(i.lo,i.hi,r):i.toNumber(Boolean(r))},t.merge=r,t.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},t.newError=i,t.ProtocolError=i("ProtocolError"),t.oneOfGetter=function(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=1;return function(){for(var e=Object.keys(this),r=e.length-1;r>-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},t.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},t.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},t._configure=function(){var e=t.Buffer;e?(t._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,r){return new e(t,r)},t._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):t._Buffer_from=t._Buffer_allocUnsafe=null}}()),x}function ie(){if(W)return V;W=1,V=a;var e,t=re(),r=t.LongBits,i=t.base64,n=t.utf8;function o(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function s(){}function u(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function a(){this.len=0,this.head=new o(s,0,0),this.tail=this.head,this.states=null}var f=function(){return t.Buffer?function(){return(a.create=function(){return new e})()}:function(){return new a}};function h(e,t,r){t[r]=255&e}function l(e,t){this.len=e,this.next=void 0,this.val=t}function c(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 p(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}a.create=f(),a.alloc=function(e){return new t.Array(e)},t.Array!==Array&&(a.alloc=t.pool(a.alloc,t.Array.prototype.subarray)),a.prototype._push=function(e,t,r){return this.tail=this.tail.next=new o(e,t,r),this.len+=t,this},l.prototype=Object.create(o.prototype),l.prototype.fn=function(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e},a.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new l((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},a.prototype.int32=function(e){return e<0?this._push(c,10,r.fromNumber(e)):this.uint32(e)},a.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},a.prototype.uint64=function(e){var t=r.from(e);return this._push(c,t.length(),t)},a.prototype.int64=a.prototype.uint64,a.prototype.sint64=function(e){var t=r.from(e).zzEncode();return this._push(c,t.length(),t)},a.prototype.bool=function(e){return this._push(h,1,e?1:0)},a.prototype.fixed32=function(e){return this._push(p,4,e>>>0)},a.prototype.sfixed32=a.prototype.fixed32,a.prototype.fixed64=function(e){var t=r.from(e);return this._push(p,4,t.lo)._push(p,4,t.hi)},a.prototype.sfixed64=a.prototype.fixed64,a.prototype.float=function(e){return this._push(t.float.writeFloatLE,4,e)},a.prototype.double=function(e){return this._push(t.float.writeDoubleLE,8,e)};var d=t.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var i=0;i<e.length;++i)t[r+i]=e[i]};return a.prototype.bytes=function(e){var r=e.length>>>0;if(!r)return this._push(h,1,0);if(t.isString(e)){var n=a.alloc(r=i.length(e));i.decode(e,n,0),e=n}return this.uint32(r)._push(d,r,e)},a.prototype.string=function(e){var t=n.length(e);return t?this.uint32(t)._push(n.write,t,e):this._push(h,1,0)},a.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new o(s,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(s,0,0),this.len=0),this},a.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},a.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},a._configure=function(t){e=t,a.create=f(),e._configure()},V}function ne(){if(Q)return K;Q=1,K=o;var e,t=re(),r=t.LongBits,i=t.utf8;function n(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function o(e){this.buf=e,this.pos=0,this.len=e.length}var s="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new o(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new o(e);throw Error("illegal buffer")},u=function(){return t.Buffer?function(r){return(o.create=function(r){return t.Buffer.isBuffer(r)?new e(r):s(r)})(r)}:s};function a(){var e=new r(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw n(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 n(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 f(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function h(){if(this.pos+8>this.len)throw n(this,8);return new r(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}return o.create=u(),o.prototype._slice=t.Array.prototype.subarray||t.Array.prototype.slice,o.prototype.uint32=/* @__PURE__ */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,n(this,10);return e}}(),o.prototype.int32=function(){return 0|this.uint32()},o.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},o.prototype.bool=function(){return 0!==this.uint32()},o.prototype.fixed32=function(){if(this.pos+4>this.len)throw n(this,4);return f(this.buf,this.pos+=4)},o.prototype.sfixed32=function(){if(this.pos+4>this.len)throw n(this,4);return 0|f(this.buf,this.pos+=4)},o.prototype.float=function(){if(this.pos+4>this.len)throw n(this,4);var e=t.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},o.prototype.double=function(){if(this.pos+8>this.len)throw n(this,4);var e=t.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},o.prototype.bytes=function(){var e=this.uint32(),r=this.pos,i=this.pos+e;if(i>this.len)throw n(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(r,i);if(r===i){var o=t.Buffer;return o?o.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,r,i)},o.prototype.string=function(){var e=this.bytes();return i.read(e,0,e.length)},o.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw n(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw n(this)}while(128&this.buf[this.pos++]);return this},o.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(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},o._configure=function(r){e=r,o.create=u(),e._configure();var i=t.Long?"toLong":"toNumber";t.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 h.call(this)[i](!0)},sfixed64:function(){return h.call(this)[i](!1)}})},K}var oe,se,ue,ae,fe,he,le={};function ce(){return ue||(ue=1,le.Service=function(){if(se)return oe;se=1,oe=t;var e=re();function t(t,r,i){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");e.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(r),this.responseDelimited=Boolean(i)}return(t.prototype=Object.create(e.EventEmitter.prototype)).constructor=t,t.prototype.rpcCall=function t(r,i,n,o,s){if(!o)throw TypeError("request must be specified");var u=this;if(!s)return e.asPromise(t,u,r,i,n,o);if(u.rpcImpl)try{return u.rpcImpl(r,i[u.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(e,t){if(e)return u.emit("error",e,r),s(e);if(null!==t){if(!(t instanceof n))try{t=n[u.responseDelimited?"decodeDelimited":"decode"](t)}catch(i){return u.emit("error",i,r),s(i)}return u.emit("data",t,r),s(null,t)}u.end(!0)})}catch(a){return u.emit("error",a,r),void setTimeout(function(){s(a)},0)}else setTimeout(function(){s(Error("already ended"))},0)},t.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this},oe}()),le}function pe(){return fe?ae:(fe=1,ae={})}function de(){return he||(he=1,function(){var e=S;function t(){e.util._configure(),e.Writer._configure(e.BufferWriter),e.Reader._configure(e.BufferReader)}e.build="minimal",e.Writer=ie(),e.BufferWriter=function(){if(X)return G;X=1,G=r;var e=ie();(r.prototype=Object.create(e.prototype)).constructor=r;var t=re();function r(){e.call(this)}function i(e,r,i){e.length<40?t.utf8.write(e,r,i):r.utf8Write?r.utf8Write(e,i):r.write(e,i)}return r._configure=function(){r.alloc=t._Buffer_allocUnsafe,r.writeBytesBuffer=t.Buffer&&t.Buffer.prototype instanceof Uint8Array&&"set"===t.Buffer.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 i=0;i<e.length;)t[r++]=e[i++]}},r.prototype.bytes=function(e){t.isString(e)&&(e=t._Buffer_from(e,"base64"));var i=e.length>>>0;return this.uint32(i),i&&this._push(r.writeBytesBuffer,i,e),this},r.prototype.string=function(e){var r=t.Buffer.byteLength(e);return this.uint32(r),r&&this._push(i,r,e),this},r._configure(),G}(),e.Reader=ne(),e.BufferReader=function(){if(ee)return Y;ee=1,Y=r;var e=ne();(r.prototype=Object.create(e.prototype)).constructor=r;var t=re();function r(t){e.call(this,t)}return r._configure=function(){t.Buffer&&(r.prototype._slice=t.Buffer.prototype.slice)},r.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},r._configure(),Y}(),e.util=re(),e.rpc=ce(),e.roots=pe(),e.configure=t,t()}()),S}var ye,ve,ge,me,be={},we={exports:{}};var Oe,_e,je,Ae,Ee,ke,Te,Ne,Se,xe,Re,Be,Ie,Le,Fe,De={};function Pe(){if(je)return _e;je=1,_e=a;var e=Ot();((a.prototype=Object.create(e.prototype)).constructor=a).className="Namespace";var t,r,i,n=bt(),o=gt(),s=wt();function u(e,t){if(e&&e.length){for(var r={},i=0;i<e.length;++i)r[e[i].name]=e[i].toJSON(t);return r}}function a(t,r){e.call(this,t,r),this.nested=void 0,this._nestedArray=null,this._lookupCache={},this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0}function f(e){e._nestedArray=null,e._lookupCache={};for(var t=e;t=t.parent;)t._lookupCache={};return e}return a.fromJSON=function(e,t){return new a(e,t.options).addJSON(t.nested)},a.arrayToJSON=u,a.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},a.isReservedName=function(e,t){if(e)for(var r=0;r<e.length;++r)if(e[r]===t)return!0;return!1},Object.defineProperty(a.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=o.toArray(this.nested))}}),a.prototype.toJSON=function(e){return o.toObject(["options",this.options,"nested",u(this.nestedArray,e)])},a.prototype.addJSON=function(e){if(e)for(var o,s=Object.keys(e),u=0;u<s.length;++u)o=e[s[u]],this.add((void 0!==o.fields?t.fromJSON:void 0!==o.values?i.fromJSON:void 0!==o.methods?r.fromJSON:void 0!==o.id?n.fromJSON:a.fromJSON)(s[u],o));return this},a.prototype.get=function(e){return this.nested&&this.nested[e]||null},a.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof i)return this.nested[e].values;throw Error("no such enum: "+e)},a.prototype.add=function(e){if(!(e instanceof n&&void 0!==e.extend||e instanceof t||e instanceof s||e instanceof i||e instanceof r||e instanceof a))throw TypeError("object must be a valid nested object");if(this.nested){var o=this.get(e.name);if(o){if(!(o instanceof a&&e instanceof a)||o instanceof t||o instanceof r)throw Error("duplicate name '"+e.name+"' in "+this);for(var u=o.nestedArray,h=0;h<u.length;++h)e.add(u[h]);this.remove(o),this.nested||(this.nested={}),e.setOptions(o.options,!0)}}else this.nested={};this.nested[e.name]=e,this instanceof t||this instanceof r||this instanceof i||this instanceof n||e._edition||(e._edition=e._defaultEdition),this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0;for(var l=this;l=l.parent;)l._needsRecursiveFeatureResolution=!0,l._needsRecursiveResolve=!0;return e.onAdd(this),f(this)},a.prototype.remove=function(t){if(!(t instanceof e))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=void 0),t.onRemove(this),f(this)},a.prototype.define=function(e,t){if(o.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 i=e.shift();if(r.nested&&r.nested[i]){if(!((r=r.nested[i])instanceof a))throw Error("path conflicts with non-namespace objects")}else r.add(r=new a(i))}return t&&r.addJSON(t),r},a.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;this._resolveFeaturesRecursive(this._edition);var e=this.nestedArray,t=0;for(this.resolve();t<e.length;)e[t]instanceof a?e[t++].resolveAll():e[t++].resolve();return this._needsRecursiveResolve=!1,this},a.prototype._resolveFeaturesRecursive=function(t){return this._needsRecursiveFeatureResolution?(this._needsRecursiveFeatureResolution=!1,t=this._edition||t,e.prototype._resolveFeaturesRecursive.call(this,t),this.nestedArray.forEach(e=>{e._resolveFeaturesRecursive(t)}),this):this},a.prototype.lookup=function(e,t,r){if("boolean"==typeof t?(r=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),o.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;var i=e.join(".");if(""===e[0])return this.root.lookup(e.slice(1),t);var n=this.root._fullyQualifiedObjects&&this.root._fullyQualifiedObjects["."+i];if(n&&(!t||t.indexOf(n.constructor)>-1))return n;if((n=this._lookupImpl(e,i))&&(!t||t.indexOf(n.constructor)>-1))return n;if(r)return null;for(var s=this;s.parent;){if((n=s.parent._lookupImpl(e,i))&&(!t||t.indexOf(n.constructor)>-1))return n;s=s.parent}return null},a.prototype._lookupImpl=function(e,t){if(Object.prototype.hasOwnProperty.call(this._lookupCache,t))return this._lookupCache[t];var r=this.get(e[0]),i=null;if(r)1===e.length?i=r:r instanceof a&&(e=e.slice(1),i=r._lookupImpl(e,e.join(".")));else for(var n=0;n<this.nestedArray.length;++n)this._nestedArray[n]instanceof a&&(r=this._nestedArray[n]._lookupImpl(e,t))&&(i=r);return this._lookupCache[t]=i,i},a.prototype.lookupType=function(e){var r=this.lookup(e,[t]);if(!r)throw Error("no such type: "+e);return r},a.prototype.lookupEnum=function(e){var t=this.lookup(e,[i]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},a.prototype.lookupTypeOrEnum=function(e){var r=this.lookup(e,[t,i]);if(!r)throw Error("no such Type or Enum '"+e+"' in "+this);return r},a.prototype.lookupService=function(e){var t=this.lookup(e,[r]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},a._configure=function(e,n,o){t=e,r=n,i=o},_e}function Ce(){if(Ee)return Ae;Ee=1,Ae=i;var e=bt();((i.prototype=Object.create(e.prototype)).constructor=i).className="MapField";var t=mt(),r=gt();function i(t,i,n,o,s,u){if(e.call(this,t,i,o,void 0,void 0,s,u),!r.isString(n))throw TypeError("keyType must be a string");this.keyType=n,this.resolvedKeyType=null,this.map=!0}return i.fromJSON=function(e,t){return new i(e,t.id,t.keyType,t.type,t.options,t.comment)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return r.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},i.prototype.resolve=function(){if(this.resolved)return this;if(void 0===t.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return e.prototype.resolve.call(this)},i.d=function(e,t,n){return"function"==typeof n?n=r.decorateType(n).name:n&&"object"==typeof n&&(n=r.decorateEnum(n).name),function(o,s){r.decorateType(o.constructor).add(new i(s,e,t,n))}},Ae}function $e(){if(Te)return ke;Te=1,ke=r;var e=Ot();((r.prototype=Object.create(e.prototype)).constructor=r).className="Method";var t=gt();function r(r,i,n,o,s,u,a,f,h){if(t.isObject(s)?(a=s,s=u=void 0):t.isObject(u)&&(a=u,u=void 0),void 0!==i&&!t.isString(i))throw TypeError("type must be a string");if(!t.isString(n))throw TypeError("requestType must be a string");if(!t.isString(o))throw TypeError("responseType must be a string");e.call(this,r,a),this.type=i||"rpc",this.requestType=n,this.requestStream=!!s||void 0,this.responseType=o,this.responseStream=!!u||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=f,this.parsedOptions=h}return r.fromJSON=function(e,t){return new r(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},r.prototype.toJSON=function(e){var r=!!e&&Boolean(e.keepComments);return t.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",r?this.comment:void 0,"parsedOptions",this.parsedOptions])},r.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),e.prototype.resolve.call(this))},ke}function qe(){if(Se)return Ne;Se=1,Ne=n;var e=Pe();((n.prototype=Object.create(e.prototype)).constructor=n).className="Service";var t=$e(),r=gt(),i=ce();function n(t,r){e.call(this,t,r),this.methods={},this._methodsArray=null}function o(e){return e._methodsArray=null,e}return n.fromJSON=function(e,r){var i=new n(e,r.options);if(r.methods)for(var o=Object.keys(r.methods),s=0;s<o.length;++s)i.add(t.fromJSON(o[s],r.methods[o[s]]));return r.nested&&i.addJSON(r.nested),r.edition&&(i._edition=r.edition),i.comment=r.comment,i._defaultEdition="proto3",i},n.prototype.toJSON=function(t){var i=e.prototype.toJSON.call(this,t),n=!!t&&Boolean(t.keepComments);return r.toObject(["edition",this._editionToJSON(),"options",i&&i.options||void 0,"methods",e.arrayToJSON(this.methodsArray,t)||{},"nested",i&&i.nested||void 0,"comment",n?this.comment:void 0])},Object.defineProperty(n.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=r.toArray(this.methods))}}),n.prototype.get=function(t){return this.methods[t]||e.prototype.get.call(this,t)},n.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;e.prototype.resolve.call(this);for(var t=this.methodsArray,r=0;r<t.length;++r)t[r].resolve();return this},n.prototype._resolveFeaturesRecursive=function(t){return this._needsRecursiveFeatureResolution?(t=this._edition||t,e.prototype._resolveFeaturesRecursive.call(this,t),this.methodsArray.forEach(e=>{e._resolveFeaturesRecursive(t)}),this):this},n.prototype.add=function(r){if(this.get(r.name))throw Error("duplicate name '"+r.name+"' in "+this);return r instanceof t?(this.methods[r.name]=r,r.parent=this,o(this)):e.prototype.add.call(this,r)},n.prototype.remove=function(r){if(r instanceof t){if(this.methods[r.name]!==r)throw Error(r+" is not a member of "+this);return delete this.methods[r.name],r.parent=null,o(this)}return e.prototype.remove.call(this,r)},n.prototype.create=function(e,t,n){for(var o,s=new i.Service(e,t,n),u=0;u<this.methodsArray.length;++u){var a=r.lcFirst((o=this._methodsArray[u]).resolve().name).replace(/[^$\w_]/g,"");s[a]=r.codegen(["r","c"],r.isReserved(a)?a+"_":a)("return this.rpcCall(m,q,s,r,c)")({m:o,q:o.resolvedRequestType.ctor,s:o.resolvedResponseType.ctor})}return s},Ne}function Je(){if(Re)return xe;Re=1,xe=t;var e=re();function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}return t.create=function(e){return this.$type.create(e)},t.encode=function(e,t){return this.$type.encode(e,t)},t.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},t.decode=function(e){return this.$type.decode(e)},t.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},t.verify=function(e){return this.$type.verify(e)},t.fromObject=function(e){return this.$type.fromObject(e)},t.toObject=function(e,t){return this.$type.toObject(e,t)},t.prototype.toJSON=function(){return this.$type.toObject(this,e.toJSONOptions)},xe}function Ue(){if(Ie)return Be;Ie=1,Be=function(n){for(var o=r.codegen(["r","l","e"],n.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(n.fieldsArray.filter(function(e){return e.map}).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()")("if(t===e)")("break")("switch(t>>>3){"),s=0;s<n.fieldsArray.length;++s){var u=n._fieldsArray[s].resolve(),a=u.resolvedType instanceof e?"int32":u.type,f="m"+r.safeProp(u.name);o("case %i: {",u.id),u.map?(o("if(%s===util.emptyObject)",f)("%s={}",f)("var c2 = r.uint32()+r.pos"),void 0!==t.defaults[u.keyType]?o("k=%j",t.defaults[u.keyType]):o("k=null"),void 0!==t.defaults[a]?o("value=%j",t.defaults[a]):o("value=null"),o("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",u.keyType)("case 2:"),void 0===t.basic[a]?o("value=types[%i].decode(r,r.uint32())",s):o("value=r.%s()",a),o("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==t.long[u.keyType]?o('%s[typeof k==="object"?util.longToHash(k):k]=value',f):o("%s[k]=value",f)):u.repeated?(o("if(!(%s&&%s.length))",f,f)("%s=[]",f),void 0!==t.packed[a]&&o("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",f,a)("}else"),void 0===t.basic[a]?o(u.delimited?"%s.push(types[%i].decode(r,undefined,((t&~7)|4)))":"%s.push(types[%i].decode(r,r.uint32()))",f,s):o("%s.push(r.%s())",f,a)):void 0===t.basic[a]?o(u.delimited?"%s=types[%i].decode(r,undefined,((t&~7)|4))":"%s=types[%i].decode(r,r.uint32())",f,s):o("%s=r.%s()",f,a),o("break")("}")}for(o("default:")("r.skipType(t&7)")("break")("}")("}"),s=0;s<n._fieldsArray.length;++s){var h=n._fieldsArray[s];h.required&&o("if(!m.hasOwnProperty(%j))",h.name)("throw util.ProtocolError(%j,{instance:m})",i(h))}return o("return m")};var e=_t(),t=mt(),r=gt();function i(e){return"missing required '"+e.name+"'"}return Be}function Me(){if(Fe)return Le;Fe=1,Le=function(e){var o=t.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),s=e.oneofsArray,u={};s.length&&o("var p={}");for(var a=0;a<e.fieldsArray.length;++a){var f=e._fieldsArray[a].resolve(),h="m"+t.safeProp(f.name);if(f.optional&&o("if(%s!=null&&m.hasOwnProperty(%j)){",h,f.name),f.map)o("if(!util.isObject(%s))",h)("return%j",r(f,"object"))("var k=Object.keys(%s)",h)("for(var i=0;i<k.length;++i){"),n(o,f,"k[i]"),i(o,f,a,h+"[k[i]]")("}");else if(f.repeated)o("if(!Array.isArray(%s))",h)("return%j",r(f,"array"))("for(var i=0;i<%s.length;++i){",h),i(o,f,a,h+"[i]")("}");else{if(f.partOf){var l=t.safeProp(f.partOf.name);1===u[f.partOf.name]&&o("if(p%s===1)",l)("return%j",f.partOf.name+": multiple values"),u[f.partOf.name]=1,o("p%s=1",l)}i(o,f,a,h)}f.optional&&o("}")}return o("return null")};var e=_t(),t=gt();function r(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function i(t,i,n,o){if(i.resolvedType)if(i.resolvedType instanceof e){t("switch(%s){",o)("default:")("return%j",r(i,"enum value"));for(var s=Object.keys(i.resolvedType.values),u=0;u<s.length;++u)t("case %i:",i.resolvedType.values[s[u]]);t("break")("}")}else t("{")("var e=types[%i].verify(%s);",n,o)("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))",o)("return%j",r(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)))",o,o,o,o)("return%j",r(i,"integer|Long"));break;case"float":case"double":t('if(typeof %s!=="number")',o)("return%j",r(i,"number"));break;case"bool":t('if(typeof %s!=="boolean")',o)("return%j",r(i,"boolean"));break;case"string":t("if(!util.isString(%s))",o)("return%j",r(i,"string"));break;case"bytes":t('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',o,o,o)("return%j",r(i,"buffer"))}return t}function n(e,t,i){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",i)("return%j",r(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",i)("return%j",r(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",i)("return%j",r(t,"boolean key"))}return e}return Le}var ze,Ze={};function He(){return ze||(ze=1,function(){var e=Ze,t=_t(),r=gt();function i(e,r,i,n){var o=!1;if(r.resolvedType)if(r.resolvedType instanceof t){e("switch(d%s){",n);for(var s=r.resolvedType.values,u=Object.keys(s),a=0;a<u.length;++a)s[u[a]]!==r.typeDefault||o||(e("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',n,n,n),r.repeated||e("break"),o=!0),e("case%j:",u[a])("case %i:",s[u[a]])("m%s=%j",n,s[u[a]])("break");e("}")}else e('if(typeof d%s!=="object")',n)("throw TypeError(%j)",r.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",n,i,n);else{var f=!1;switch(r.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":f=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,f)('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,f?"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 >= 0)",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 n(e,r,i,n){if(r.resolvedType)r.resolvedType instanceof t?e("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",n,i,n,n,i,n,n):e("d%s=types[%i].toObject(m%s,o)",n,i,n);else{var o=!1;switch(r.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":o=!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,o?"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}e.fromObject=function(e){var n=e.fieldsArray,o=r.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!n.length)return o("return new this.ctor");o("var m=new this.ctor");for(var s=0;s<n.length;++s){var u=n[s].resolve(),a=r.safeProp(u.name);u.map?(o("if(d%s){",a)('if(typeof d%s!=="object")',a)("throw TypeError(%j)",u.fullName+": object expected")("m%s={}",a)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",a),i(o,u,s,a+"[ks[i]]")("}")("}")):u.repeated?(o("if(d%s){",a)("if(!Array.isArray(d%s))",a)("throw TypeError(%j)",u.fullName+": array expected")("m%s=[]",a)("for(var i=0;i<d%s.length;++i){",a),i(o,u,s,a+"[i]")("}")("}")):(u.resolvedType instanceof t||o("if(d%s!=null){",a),i(o,u,s,a),u.resolvedType instanceof t||o("}"))}return o("return m")},e.toObject=function(e){var i=e.fieldsArray.slice().sort(r.compareFieldsById);if(!i.length)return r.codegen()("return {}");for(var o=r.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),s=[],u=[],a=[],f=0;f<i.length;++f)i[f].partOf||(i[f].resolve().repeated?s:i[f].map?u:a).push(i[f]);if(s.length){for(o("if(o.arrays||o.defaults){"),f=0;f<s.length;++f)o("d%s=[]",r.safeProp(s[f].name));o("}")}if(u.length){for(o("if(o.objects||o.defaults){"),f=0;f<u.length;++f)o("d%s={}",r.safeProp(u[f].name));o("}")}if(a.length){for(o("if(o.defaults){"),f=0;f<a.length;++f){var h=a[f],l=r.safeProp(h.name);if(h.resolvedType instanceof t)o("d%s=o.enums===String?%j:%j",l,h.resolvedType.valuesById[h.typeDefault],h.typeDefault);else if(h.long)o("if(util.Long){")("var n=new util.Long(%i,%i,%j)",h.typeDefault.low,h.typeDefault.high,h.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",l)("}else")("d%s=o.longs===String?%j:%i",l,h.typeDefault.toString(),h.typeDefault.toNumber());else if(h.bytes){var c="["+Array.prototype.slice.call(h.typeDefault).join(",")+"]";o("if(o.bytes===String)d%s=%j",l,String.fromCharCode.apply(String,h.typeDefault))("else{")("d%s=%s",l,c)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",l,l)("}")}else o("d%s=%j",l,h.typeDefault)}o("}")}var p=!1;for(f=0;f<i.length;++f){h=i[f];var d=e._fieldsArray.indexOf(h);l=r.safeProp(h.name);h.map?(p||(p=!0,o("var ks2")),o("if(m%s&&(ks2=Object.keys(m%s)).length){",l,l)("d%s={}",l)("for(var j=0;j<ks2.length;++j){"),n(o,h,d,l+"[ks2[j]]")("}")):h.repeated?(o("if(m%s&&m%s.length){",l,l)("d%s=[]",l)("for(var j=0;j<m%s.length;++j){",l),n(o,h,d,l+"[j]")("}")):(o("if(m%s!=null&&m.hasOwnProperty(%j)){",l,h.name),n(o,h,d,l),h.partOf&&o("if(o.oneofs)")("d%s=%j",r.safeProp(h.partOf.name),h.name)),o("}")}return o("return d")}}()),Ze}var Ve,We,Ge,Xe,Ke,Qe,Ye,et,tt,rt,it,nt,ot,st,ut,at,ft,ht,lt,ct,pt={};function dt(){return Ve||(Ve=1,e=pt,t=Je(),e[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),r=this.lookup(t);if(r){var i="."===e["@type"].charAt(0)?e["@type"].slice(1):e["@type"];return-1===i.indexOf("/")&&(i="/"+i),this.create({type_url:i,value:r.encode(r.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,r){var i="",n="";if(r&&r.json&&e.type_url&&e.value){n=e.type_url.substring(e.type_url.lastIndexOf("/")+1),i=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var o=this.lookup(n);o&&(e=o.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof t){var s=e.$type.toObject(e,r);return""===i&&(i="type.googleapis.com/"),n=i+("."===e.$type.fullName[0]?e.$type.fullName.slice(1):e.$type.fullName),s["@type"]=n,s}return this.toObject(e,r)}}),pt;var e,t}function yt(){if(Ge)return We;Ge=1,We=y;var e=Pe();((y.prototype=Object.create(e.prototype)).constructor=y).className="Type";var t=_t(),r=wt(),i=bt(),n=Ce(),o=qe(),s=Je(),u=ne(),a=ie(),f=gt(),h=jt(),l=Ue(),c=Me(),p=He(),d=dt();function y(t,r){e.call(this,t,r),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function v(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}return Object.defineProperties(y.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var r=this.fields[e[t]],i=r.id;if(this._fieldsById[i])throw Error("duplicate id "+i+" in "+this);this._fieldsById[i]=r}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=f.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=f.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=y.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof s||((e.prototype=new s).constructor=e,f.merge(e.prototype,t)),e.$type=e.prototype.$type=this,f.merge(e,s,!0),this._ctor=e;for(var r=0;r<this.fieldsArray.length;++r)this._fieldsArray[r].resolve();var i={};for(r=0;r<this.oneofsArray.length;++r)i[this._oneofsArray[r].resolve().name]={get:f.oneOfGetter(this._oneofsArray[r].oneof),set:f.oneOfSetter(this._oneofsArray[r].oneof)};r&&Object.defineProperties(e.prototype,i)}}}),y.generateConstructor=function(e){for(var t,r=f.codegen(["p"],e.name),i=0;i<e.fieldsArray.length;++i)(t=e._fieldsArray[i]).map?r("this%s={}",f.safeProp(t.name)):t.repeated&&r("this%s=[]",f.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]]")},y.fromJSON=function(s,u){var a=new y(s,u.options);a.extensions=u.extensions,a.reserved=u.reserved;for(var f=Object.keys(u.fields),h=0;h<f.length;++h)a.add((void 0!==u.fields[f[h]].keyType?n.fromJSON:i.fromJSON)(f[h],u.fields[f[h]]));if(u.oneofs)for(f=Object.keys(u.oneofs),h=0;h<f.length;++h)a.add(r.fromJSON(f[h],u.oneofs[f[h]]));if(u.nested)for(f=Object.keys(u.nested),h=0;h<f.length;++h){var l=u.nested[f[h]];a.add((void 0!==l.id?i.fromJSON:void 0!==l.fields?y.fromJSON:void 0!==l.values?t.fromJSON:void 0!==l.methods?o.fromJSON:e.fromJSON)(f[h],l))}return u.extensions&&u.extensions.length&&(a.extensions=u.extensions),u.reserved&&u.reserved.length&&(a.reserved=u.reserved),u.group&&(a.group=!0),u.comment&&(a.comment=u.comment),u.edition&&(a._edition=u.edition),a._defaultEdition="proto3",a},y.prototype.toJSON=function(t){var r=e.prototype.toJSON.call(this,t),i=!!t&&Boolean(t.keepComments);return f.toObject(["edition",this._editionToJSON(),"options",r&&r.options||void 0,"oneofs",e.arrayToJSON(this.oneofsArray,t),"fields",e.arrayToJSON(this.fieldsArray.filter(function(e){return!e.declaringField}),t)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",r&&r.nested||void 0,"comment",i?this.comment:void 0])},y.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;e.prototype.resolveAll.call(this);var t=this.oneofsArray;for(i=0;i<t.length;)t[i++].resolve();for(var r=this.fieldsArray,i=0;i<r.length;)r[i++].resolve();return this},y.prototype._resolveFeaturesRecursive=function(t){return this._needsRecursiveFeatureResolution?(t=this._edition||t,e.prototype._resolveFeaturesRecursive.call(this,t),this.oneofsArray.forEach(e=>{e._resolveFeatures(t)}),this.fieldsArray.forEach(e=>{e._resolveFeatures(t)}),this):this},y.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},y.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);if(t instanceof i&&void 0===t.extend){if(this._fieldsById?this._fieldsById[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,t.message=this,t.onAdd(this),v(this)}return t instanceof r?(this.oneofs||(this.oneofs={}),this.oneofs[t.name]=t,t.onAdd(this),v(this)):e.prototype.add.call(this,t)},y.prototype.remove=function(t){if(t instanceof i&&void 0===t.extend){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),v(this)}if(t instanceof r){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),v(this)}return e.prototype.remove.call(this,t)},y.prototype.isReservedId=function(t){return e.isReservedId(this.reserved,t)},y.prototype.isReservedName=function(t){return e.isReservedName(this.reserved,t)},y.prototype.create=function(e){return new this.ctor(e)},y.prototype.setup=function(){for(var e=this.fullName,t=[],r=0;r<this.fieldsArray.length;++r)t.push(this._fieldsArray[r].resolve().resolvedType);this.encode=h(this)({Writer:a,types:t,util:f}),this.decode=l(this)({Reader:u,types:t,util:f}),this.verify=c(this)({types:t,util:f}),this.fromObject=p.fromObject(this)({types:t,util:f}),this.toObject=p.toObject(this)({types:t,util:f});var i=d[e];if(i){var n=Object.create(this);n.fromObject=this.fromObject,this.fromObject=i.fromObject.bind(n),n.toObject=this.toObject,this.toObject=i.toObject.bind(n)}return this},y.prototype.encode=function(e,t){return this.setup().encode(e,t)},y.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},y.prototype.decode=function(e,t){return this.setup().decode(e,t)},y.prototype.decodeDelimited=function(e){return e instanceof u||(e=u.create(e)),this.decode(e,e.uint32())},y.prototype.verify=function(e){return this.setup().verify(e)},y.prototype.fromObject=function(e){return this.setup().fromObject(e)},y.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},y.d=function(e){return function(t){f.decorateType(t,e)}},We}function vt(){if(Ke)return Xe;Ke=1,Xe=a;var e=Pe();((a.prototype=Object.create(e.prototype)).constructor=a).className="Root";var t,r,i,n=bt(),o=_t(),s=wt(),u=gt();function a(t){e.call(this,"",t),this.deferred=[],this.files=[],this._edition="proto2",this._fullyQualifiedObjects={}}function f(){}a.fromJSON=function(e,t){return t||(t=new a),e.options&&t.setOptions(e.options),t.addJSON(e.nested).resolveAll()},a.prototype.resolvePath=u.path.resolve,a.prototype.fetch=u.fetch,a.prototype.load=function e(t,n,o){"function"==typeof n&&(o=n,n=void 0);var s=this;if(!o)return u.asPromise(e,s,t,n);var a=o===f;function h(e,t){if(o){if(a)throw e;t&&t.resolveAll();var r=o;o=null,r(e,t)}}function l(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var r=e.substring(t);if(r in i)return r}return null}function c(e,t){try{if(u.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),u.isString(t)){r.filename=e;var i,o=r(t,s,n),f=0;if(o.imports)for(;f<o.imports.length;++f)(i=l(o.imports[f])||s.resolvePath(e,o.imports[f]))&&p(i);if(o.weakImports)for(f=0;f<o.weakImports.length;++f)(i=l(o.weakImports[f])||s.resolvePath(e,o.weakImports[f]))&&p(i,!0)}else s.setOptions(t.options).addJSON(t.nested)}catch(c){h(c)}a||d||h(null,s)}function p(e,t){if(e=l(e)||e,!(s.files.indexOf(e)>-1))if(s.files.push(e),e in i)a?c(e,i[e]):(++d,setTimeout(function(){--d,c(e,i[e])}));else if(a){var r;try{r=u.fs.readFileSync(e).toString("utf8")}catch(n){return void(t||h(n))}c(e,r)}else++d,s.fetch(e,function(r,i){--d,o&&(r?t?d||h(null,s):h(r):c(e,i))})}var d=0;u.isString(t)&&(t=[t]);for(var y,v=0;v<t.length;++v)(y=s.resolvePath("",t[v]))&&p(y);return a?(s.resolveAll(),s):(d||h(null,s),s)},a.prototype.loadSync=function(e,t){if(!u.isNode)throw Error("not supported");return this.load(e,t,f)},a.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(e){return"'extend "+e.extend+"' in "+e.parent.fullName}).join(", "));return e.prototype.resolveAll.call(this)};var h=/^[A-Z]/;function l(e,t){var r=t.parent.lookup(t.extend);if(r){var i=new n(t.fullName,t.id,t.type,t.rule,void 0,t.options);return r.get(i.name)||(i.declaringField=t,t.extensionField=i,r.add(i)),!0}return!1}return a.prototype._handleAdd=function(e){if(e instanceof n)void 0===e.extend||e.extensionField||l(0,e)||this.deferred.push(e);else if(e instanceof o)h.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof s)){if(e instanceof t)for(var r=0;r<this.deferred.length;)l(0,this.deferred[r])?this.deferred.splice(r,1):++r;for(var i=0;i<e.nestedArray.length;++i)this._handleAdd(e._nestedArray[i]);h.test(e.name)&&(e.parent[e.name]=e)}(e instanceof t||e instanceof o||e instanceof n)&&(this._fullyQualifiedObjects[e.fullName]=e)},a.prototype._handleRemove=function(t){if(t instanceof n){if(void 0!==t.extend)if(t.extensionField)t.extensionField.parent.remove(t.extensionField),t.extensionField=null;else{var r=this.deferred.indexOf(t);r>-1&&this.deferred.splice(r,1)}}else if(t instanceof o)h.test(t.name)&&delete t.parent[t.name];else if(t instanceof e){for(var i=0;i<t.nestedArray.length;++i)this._handleRemove(t._nestedArray[i]);h.test(t.name)&&delete t.parent[t.name]}delete this._fullyQualifiedObjects[t.fullName]},a._configure=function(e,n,o){t=e,r=n,i=o},Xe}function gt(){if(Qe)return we.exports;Qe=1;var e,t,r,i,n,o=we.exports=re(),s=pe();o.codegen=function(){if(ve)return ye;function e(t,r){"string"==typeof t&&(r=t,t=void 0);var i=[];function n(t){if("string"!=typeof t){var r=o();if(e.verbose&&console.log("codegen: "+r),r="return "+r,t){for(var s=Object.keys(t),u=new Array(s.length+1),a=new Array(s.length),f=0;f<s.length;)u[f]=s[f],a[f]=t[s[f++]];return u[f]=r,Function.apply(null,u).apply(null,a)}return Function(r)()}for(var h=new Array(arguments.length-1),l=0;l<h.length;)h[l]=arguments[++l];if(l=0,t=t.replace(/%([%dfijs])/g,function(e,t){var r=h[l++];switch(t){case"d":case"f":return String(Number(r));case"i":return String(Math.floor(r));case"j":return JSON.stringify(r);case"s":return String(r)}return"%"}),l!==h.length)throw Error("parameter count mismatch");return i.push(t),n}function o(e){return"function "+(e||r||"")+"("+(t&&t.join(",")||"")+"){\n "+i.join("\n ")+"\n}"}return n.toString=o,n}return ve=1,ye=e,e.verbose=!1,ye}(),o.fetch=function(){if(me)return ge;me=1,ge=r;var e=R(),t=q()("fs");function r(i,n,o){return"function"==typeof n?(o=n,n={}):n||(n={}),o?!n.xhr&&t&&t.readFile?t.readFile(i,function(e,t){return e&&"undefined"!=typeof XMLHttpRequest?r.xhr(i,n,o):e?o(e):o(null,n.binary?t:t.toString("utf8"))}):r.xhr(i,n,o):e(r,this,i,n)}return r.xhr=function(e,t,r){var i=new XMLHttpRequest;i.onreadystatechange=function(){if(4===i.readyState){if(0!==i.status&&200!==i.status)return r(Error("status "+i.status));if(t.binary){var e=i.response;if(!e){e=[];for(var n=0;n<i.responseText.length;++n)e.push(255&i.responseText.charCodeAt(n))}return r(null,"undefined"!=typeof Uint8Array?new Uint8Array(e):e)}return r(null,i.responseText)}},t.binary&&("overrideMimeType"in i&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.responseType="arraybuffer"),i.open("GET",e),i.send()},ge}(),o.path=(Oe||(Oe=1,i=(r=De).isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},n=r.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).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("/")},r.resolve=function(e,t,r){return r||(t=n(t)),i(t)?t:(r||(e=n(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?n(e+"/"+t):t)}),De),o.fs=o.inquire("fs"),o.toArray=function(e){if(e){for(var t=Object.keys(e),r=new Array(t.length),i=0;i<t.length;)r[i]=e[t[i++]];return r}return[]},o.toObject=function(e){for(var t={},r=0;r<e.length;){var i=e[r++],n=e[r++];void 0!==n&&(t[i]=n)}return t};var u=/\\/g,a=/"/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(u,"\\\\").replace(a,'\\"')+'"]':"."+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;e||(e=yt());var i=new e(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 h=0;return o.decorateEnum=function(e){if(e.$type)return e.$type;t||(t=_t());var r=new t("Enum"+h++,e);return o.decorateRoot.add(r),Object.defineProperty(e,"$type",{value:r,enumerable:!1}),r},o.setProperty=function(e,t,r,i){if("object"!=typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return function e(t,r,n){var o=r.shift();if("__proto__"===o||"prototype"===o)return t;if(r.length>0)t[o]=e(t[o]||{},r,n);else{var s=t[o];if(s&&i)return t;s&&(n=[].concat(s).concat(n)),t[o]=n}return t}(e,t=t.split("."),r)},Object.defineProperty(o,"decorateRoot",{get:function(){return s.decorated||(s.decorated=new(vt()))}}),we.exports}function mt(){return Ye||(Ye=1,function(){var e=be,t=gt(),r=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function i(e,t){var i=0,n={};for(t|=0;i<e.length;)n[r[i+t]]=e[i++];return n}e.basic=i([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),e.defaults=i([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",t.emptyArray,null]),e.long=i([0,0,0,1,1],7),e.mapKey=i([0,0,0,5,5,0,0,0,1,1,0,2],2),e.packed=i([1,5,0,0,0,5,5,0,0,0,1,1,0])}()),be}function bt(){if(tt)return et;tt=1,et=s;var e=Ot();((s.prototype=Object.create(e.prototype)).constructor=s).className="Field";var t,r=_t(),i=mt(),n=gt(),o=/^required|optional|repeated$/;function s(t,r,s,u,a,f,h){if(n.isObject(u)?(h=a,f=u,u=a=void 0):n.isObject(a)&&(h=f,f=a,a=void 0),e.call(this,t,f),!n.isInteger(r)||r<0)throw TypeError("id must be a non-negative integer");if(!n.isString(s))throw TypeError("type must be a string");if(void 0!==u&&!o.test(u=u.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==a&&!n.isString(a))throw TypeError("extend must be a string");"proto3_optional"===u&&(u="optional"),this.rule=u&&"optional"!==u?u:void 0,this.type=s,this.id=r,this.extend=a||void 0,this.repeated="repeated"===u,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!n.Long&&void 0!==i.long[s],this.bytes="bytes"===s,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.comment=h}return s.fromJSON=function(e,t){var r=new s(e,t.id,t.type,t.rule,t.extend,t.options,t.comment);return t.edition&&(r._edition=t.edition),r._defaultEdition="proto3",r},Object.defineProperty(s.prototype,"required",{get:function(){return"LEGACY_REQUIRED"===this._features.field_presence}}),Object.defineProperty(s.prototype,"optional",{get:function(){return!this.required}}),Object.defineProperty(s.prototype,"delimited",{get:function(){return this.resolvedType instanceof t&&"DELIMITED"===this._features.message_encoding}}),Object.defineProperty(s.prototype,"packed",{get:function(){return"PACKED"===this._features.repeated_field_encoding}}),Object.defineProperty(s.prototype,"hasPresence",{get:function(){return!this.repeated&&!this.map&&(this.partOf||this.declaringField||this.extensionField||"IMPLICIT"!==this._features.field_presence)}}),s.prototype.setOption=function(t,r,i){return e.prototype.setOption.call(this,t,r,i)},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return n.toObject(["edition",this._editionToJSON(),"rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},s.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=i.defaults[this.type])?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof t?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),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&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof r||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=n.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var o;n.base64.test(this.typeDefault)?n.base64.decode(this.typeDefault,o=n.newBuffer(n.base64.length(this.typeDefault)),0):n.utf8.write(this.typeDefault,o=n.newBuffer(n.utf8.length(this.typeDefault)),0),this.typeDefault=o}return this.map?this.defaultValue=n.emptyObject:this.repeated?this.defaultValue=n.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof t&&(this.parent.ctor.prototype[this.name]=this.defaultValue),e.prototype.resolve.call(this)},s.prototype._inferLegacyProtoFeatures=function(e){if("proto2"!==e&&"proto3"!==e)return{};var r={};if("required"===this.rule&&(r.field_presence="LEGACY_REQUIRED"),this.parent&&void 0===i.defaults[this.type]){var n=this.parent.get(this.type.split(".").pop());n&&n instanceof t&&n.group&&(r.message_encoding="DELIMITED")}return!0===this.getOption("packed")?r.repeated_field_encoding="PACKED":!1===this.getOption("packed")&&(r.repeated_field_encoding="EXPANDED"),r},s.prototype._resolveFeatures=function(t){return e.prototype._resolveFeatures.call(this,this._edition||t)},s.d=function(e,t,r,i){return"function"==typeof t?t=n.decorateType(t).name:t&&"object"==typeof t&&(t=n.decorateEnum(t).name),function(o,u){n.decorateType(o.constructor).add(new s(u,e,t,r,{default:i}))}},s._configure=function(e){t=e},et}function wt(){if(it)return rt;it=1,rt=i;var e=Ot();((i.prototype=Object.create(e.prototype)).constructor=i).className="OneOf";var t=bt(),r=gt();function i(t,r,i,n){if(Array.isArray(r)||(i=r,r=void 0),e.call(this,t,i),void 0!==r&&!Array.isArray(r))throw TypeError("fieldNames must be an Array");this.oneof=r||[],this.fieldsArray=[],this.comment=n}function n(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}return i.fromJSON=function(e,t){return new i(e,t.oneof,t.options,t.comment)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return r.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])},i.prototype.add=function(e){if(!(e instanceof t))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,n(this),this},i.prototype.remove=function(e){if(!(e instanceof t))throw TypeError("field must be a Field");var r=this.fieldsArray.indexOf(e);if(r<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(r,1),(r=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(r,1),e.partOf=null,this},i.prototype.onAdd=function(t){e.prototype.onAdd.call(this,t);for(var r=0;r<this.oneof.length;++r){var i=t.get(this.oneof[r]);i&&!i.partOf&&(i.partOf=this,this.fieldsArray.push(i))}n(this)},i.prototype.onRemove=function(t){for(var r,i=0;i<this.fieldsArray.length;++i)(r=this.fieldsArray[i]).parent&&r.parent.remove(r);e.prototype.onRemove.call(this,t)},Object.defineProperty(i.prototype,"isProto3Optional",{get:function(){if(null==this.fieldsArray||1!==this.fieldsArray.length)return!1;var e=this.fieldsArray[0];return null!=e.options&&!0===e.options.proto3_optional}}),i.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,n){r.decorateType(t.constructor).add(new i(n,e)),Object.defineProperty(t,n,{get:r.oneOfGetter(e),set:r.oneOfSetter(e)})}},rt}function Ot(){if(ot)return nt;ot=1,nt=s,s.className="ReflectionObject";const e=wt();var t,r=gt(),i={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY"},n={enum_type:"CLOSED",field_presence:"EXPLICIT",json_format:"LEGACY_BEST_EFFORT",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"EXPANDED",utf8_validation:"NONE"},o={enum_type:"OPEN",field_presence:"IMPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY"};function s(e,t){if(!r.isString(e))throw TypeError("name must be a string");if(t&&!r.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this._edition=null,this._defaultEdition="proto2",this._features={},this._featuresResolved=!1,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}return Object.defineProperties(s.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(".")}}}),s.prototype.toJSON=function(){throw Error()},s.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var r=e.root;r instanceof t&&r._handleAdd(this)},s.prototype.onRemove=function(e){var r=e.root;r instanceof t&&r._handleRemove(this),this.parent=null,this.resolved=!1},s.prototype.resolve=function(){return this.resolved||this.root instanceof t&&(this.resolved=!0),this},s.prototype._resolveFeaturesRecursive=function(e){return this._resolveFeatures(this._edition||e)},s.prototype._resolveFeatures=function(t){if(!this._featuresResolved){var r={};if(!t)throw new Error("Unknown edition for "+this.fullName);var s=Object.assign(this.options?Object.assign({},this.options.features):{},this._inferLegacyProtoFeatures(t));if(this._edition){if("proto2"===t)r=Object.assign({},n);else if("proto3"===t)r=Object.assign({},o);else{if("2023"!==t)throw new Error("Unknown edition: "+t);r=Object.assign({},i)}return this._features=Object.assign(r,s||{}),void(this._featuresResolved=!0)}if(this.partOf instanceof e){var u=Object.assign({},this.partOf._features);this._features=Object.assign(u,s||{})}else if(this.declaringField);else{if(!this.parent)throw new Error("Unable to find a parent for "+this.fullName);var a=Object.assign({},this.parent._features);this._features=Object.assign(a,s||{})}this.extensionField&&(this.extensionField._features=this._features),this._featuresResolved=!0}},s.prototype._inferLegacyProtoFeatures=function(){return{}},s.prototype.getOption=function(e){if(this.options)return this.options[e]},s.prototype.setOption=function(e,t,i){return this.options||(this.options={}),/^features\./.test(e)?r.setProperty(this.options,e,t,i):i&&void 0!==this.options[e]||(this.getOption(e)!==t&&(this.resolved=!1),this.options[e]=t),this},s.prototype.setParsedOption=function(e,t,i){this.parsedOptions||(this.parsedOptions=[]);var n=this.parsedOptions;if(i){var o=n.find(function(t){return Object.prototype.hasOwnProperty.call(t,e)});if(o){var s=o[e];r.setProperty(s,i,t)}else(o={})[e]=r.setProperty({},i,t),n.push(o)}else{var u={};u[e]=t,n.push(u)}return this},s.prototype.setOptions=function(e,t){if(e)for(var r=Object.keys(e),i=0;i<r.length;++i)this.setOption(r[i],e[r[i]],t);return this},s.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},s.prototype._editionToJSON=function(){if(this._edition&&"proto3"!==this._edition)return this._edition},s._configure=function(e){t=e},nt}function _t(){if(ut)return st;ut=1,st=i;var e=Ot();((i.prototype=Object.create(e.prototype)).constructor=i).className="Enum";var t=Pe(),r=gt();function i(t,r,i,n,o,s){if(e.call(this,t,i),r&&"object"!=typeof r)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=n,this.comments=o||{},this.valuesOptions=s,this._valuesFeatures={},this.reserved=void 0,r)for(var u=Object.keys(r),a=0;a<u.length;++a)"number"==typeof r[u[a]]&&(this.valuesById[this.values[u[a]]=r[u[a]]]=u[a])}return i.prototype._resolveFeatures=function(t){return t=this._edition||t,e.prototype._resolveFeatures.call(this,t),Object.keys(this.values).forEach(e=>{var t=Object.assign({},this._features);this._valuesFeatures[e]=Object.assign(t,this.valuesOptions&&this.valuesOptions[e]&&this.valuesOptions[e].features)}),this},i.fromJSON=function(e,t){var r=new i(e,t.values,t.options,t.comment,t.comments);return r.reserved=t.reserved,t.edition&&(r._edition=t.edition),r._defaultEdition="proto3",r},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return r.toObject(["edition",this._editionToJSON(),"options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},i.prototype.add=function(e,t,i,n){if(!r.isString(e))throw TypeError("name must be a string");if(!r.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return n&&(void 0===this.valuesOptions&&(this.valuesOptions={}),this.valuesOptions[e]=n||null),this.comments[e]=i||null,this},i.prototype.remove=function(e){if(!r.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.valuesOptions&&delete this.valuesOptions[e],this},i.prototype.isReservedId=function(e){return t.isReservedId(this.reserved,e)},i.prototype.isReservedName=function(e){return t.isReservedName(this.reserved,e)},st}function jt(){if(ft)return at;ft=1,at=function(n){for(var o,s=r.codegen(["m","w"],n.name+"$encode")("if(!w)")("w=Writer.create()"),u=n.fieldsArray.slice().sort(r.compareFieldsById),a=0;a<u.length;++a){var f=u[a].resolve(),h=n._fieldsArray.indexOf(f),l=f.resolvedType instanceof e?"int32":f.type,c=t.basic[l];o="m"+r.safeProp(f.name),f.map?(s("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",o,f.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",o)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(f.id<<3|2)>>>0,8|t.mapKey[f.keyType],f.keyType),void 0===c?s("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",h,o):s(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|c,l,o),s("}")("}")):f.repeated?(s("if(%s!=null&&%s.length){",o,o),f.packed&&void 0!==t.packed[l]?s("w.uint32(%i).fork()",(f.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",o)("w.%s(%s[i])",l,o)("w.ldelim()"):(s("for(var i=0;i<%s.length;++i)",o),void 0===c?i(s,f,h,o+"[i]"):s("w.uint32(%i).%s(%s[i])",(f.id<<3|c)>>>0,l,o)),s("}")):(f.optional&&s("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",o,f.name),void 0===c?i(s,f,h,o):s("w.uint32(%i).%s(%s)",(f.id<<3|c)>>>0,l,o))}return s("return w")};var e=_t(),t=mt(),r=gt();function i(e,t,r,i){return t.delimited?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",r,i,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",r,i,(t.id<<3|2)>>>0)}return at}var At=ct?lt:(ct=1,lt=function(){if(ht)return N.exports;ht=1;var e=N.exports=de();return e.build="light",e.load=function(t,r,i){return"function"==typeof r?(i=r,r=new e.Root):r||(r=new e.Root),r.load(t,i)},e.loadSync=function(t,r){return r||(r=new e.Root),r.loadSync(t)},e.encoder=jt(),e.decoder=Ue(),e.verifier=Me(),e.converter=He(),e.ReflectionObject=Ot(),e.Namespace=Pe(),e.Root=vt(),e.Enum=_t(),e.Type=yt(),e.Field=bt(),e.OneOf=wt(),e.MapField=Ce(),e.Service=qe(),e.Method=$e(),e.Message=Je(),e.wrappers=dt(),e.types=mt(),e.util=gt(),e.ReflectionObject._configure(e.Root),e.Namespace._configure(e.Type,e.Service,e.Enum),e.Root._configure(e.Type),e.Field._configure(e.Type),N.exports}());const Et=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),kt=e=>{class t extends At.Message{constructor(e){super(),((e,t)=>{if(t)for(const r of Object.keys(t)){const i=t[r];null!=i&&(e[r]=i)}})(this,e)}}const r=t;return r.$type=e,r.prototype.$type=e,r},Tt=e=>t.isLong(e),Nt=e=>e instanceof Uint8Array||ArrayBuffer.isView(e)&&"number"==typeof e.byteLength,St=e=>Object.prototype.hasOwnProperty.call(At.types.packed,e),xt=e=>{const t=e.resolve();return t.resolvedType instanceof At.Enum||St(t.type)},Rt=(e,t)=>t in e?e[t]:void 0,Bt=e=>{const t=e.resolve();return t.resolvedType instanceof At.Enum?0:(r=t.type,Object.prototype.hasOwnProperty.call(At.types.basic,r)?At.types.basic[t.type]:2);var r},It=(e,r)=>Tt(e)||"number"==typeof e||"string"==typeof e?e:Et(e)&&"number"==typeof e.low&&"number"==typeof e.high?new t(e.low,e.high,r):r?t.UZERO:t.ZERO,Lt=(e,t,r)=>{switch(t){case"double":return e.double(Number(r));case"float":return e.float(Number(r));case"int32":return e.int32(Number(r));case"uint32":return e.uint32(Number(r));case"sint32":return e.sint32(Number(r));case"fixed32":return e.fixed32(Number(r));case"sfixed32":return e.sfixed32(Number(r));case"int64":return e.int64(It(r,!1));case"uint64":return e.uint64(It(r,!0));case"sint64":return e.sint64(It(r,!1));case"fixed64":return e.fixed64(It(r,!0));case"sfixed64":return e.sfixed64(It(r,!1));case"bool":return e.bool(Boolean(r));case"string":return e.string(String(r));case"bytes":return e.bytes((e=>"string"==typeof e?e:Nt(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Array.isArray(e)?Uint8Array.from(e.filter(e=>"number"==typeof e)):new Uint8Array)(r));default:throw new TypeError(`Unsupported protobuf field type: ${t}`)}},Ft=(e,t,r)=>{if(t<0||e.pos+t>r)throw RangeError(`index out of range: ${e.pos} + ${t} > ${r}`)},Dt=(e,t)=>{const r=e.uint32();return Ft(e,r,t),r},Pt=(e,t,r)=>{const i=e.len;e.len=r;try{switch(t){case 0:return void e.skip();case 1:return Ft(e,8,r),void e.skip(8);case 2:{const t=Dt(e,r);return void e.skip(t)}case 5:return Ft(e,4,r),void e.skip(4);default:throw new Error(`Unsupported protobuf wire type: ${String(t)}`)}}finally{e.len=i}},Ct=(e,t,r)=>{const i=t.resolve(),n=i.resolvedType;if(n instanceof At.Type){const t=e.fork();return qt(n,Et(r)?r:{},t),t.ldelim(),e}return n instanceof At.Enum?(e.int32("number"==typeof r?r:Number(r)),e):Lt(e,i.type,r)},$t=(e,t,r)=>{if(0===r.length)return e;const i=t.resolve();if(St(i.type)&&t.packed){e.uint32(t.id<<3|2).fork();for(const i of r)Ct(e,t,i);return e.ldelim(),e}const n=Bt(t);for(const o of r)e.uint32(t.id<<3|n),Ct(e,t,o);return e},qt=(e,t,r=At.Writer.create())=>{const i=e.fieldsArray.slice().sort(At.util.compareFieldsById);for(const n of i){const e=Rt(t,n.name);null!=e&&(n.repeated?$t(r,n,Array.isArray(e)?e:[]):(r.uint32(n.id<<3|Bt(n)),Ct(r,n,e)))}return r},Jt=(e,t,r,i)=>{const n=t.resolve(),o=n.resolvedType;return o instanceof At.Type?2!==r?void Pt(e,r,i):Ut(o,e,Dt(e,i)):o instanceof At.Enum?e.int32():((e,t)=>{switch(t){case"double":return e.double();case"float":return e.float();case"int32":return e.int32();case"uint32":return e.uint32();case"sint32":return e.sint32();case"fixed32":return e.fixed32();case"sfixed32":return e.sfixed32();case"int64":return e.int64();case"uint64":return e.uint64();case"sint64":return e.sint64();case"fixed64":return e.fixed64();case"sfixed64":return e.sfixed64();case"bool":return e.bool();case"string":return e.string();case"bytes":return e.bytes();default:throw new TypeError(`Unsupported protobuf field type: ${t}`)}})(e,n.type)},Ut=(e,t,r)=>{const i=t instanceof At.Reader?t:At.Reader.create(t),n=void 0===r?i.len:i.pos+r,o=(e=>{const t={};for(const r of e.fieldsArray)r.repeated&&(t[r.name]=[]);return t})(e),s=e.fieldsById;for(;i.pos<n;){const t=i.pos,r=i.uint32(),a=s[r>>>3],f=7&r;try{if(!a){Pt(i,f,n);continue}if(a.repeated){const e=Array.isArray(o[a.name])?o[a.name]:[];if(xt(a)&&2===f){const t=Dt(i,n)+i.pos;for(;i.pos<t;)e.push(Jt(i,a,0,t))}else{const t=Jt(i,a,f,n);void 0!==t&&e.push(t)}o[a.name]=e;continue}const e=Jt(i,a,f,n);void 0!==e&&(o[a.name]=e)}catch(u){if(u instanceof RangeError){const o=a?`${a.name}#${a.id}`:`unknown#${r>>>3}`;throw new RangeError(`${u.message}; protobufType=${e.fullName}; field=${o}; tag=${r}; wireType=${f}; tagPosition=${t}; readerPosition=${i.pos}; messageEnd=${n}`)}throw u}}return o},Mt=(e,t)=>t?.longs===String?e.toString():t?.longs===Number?e.toNumber():e,zt=(e,t)=>{const r=e.resolve();if(r.resolvedType instanceof At.Type)return null;if(r.resolvedType instanceof At.Enum){if(t?.enums===String){return r.resolvedType.valuesById[r.typeDefault]??r.typeDefault}return r.typeDefault}return"bytes"===r.type?t?.bytes===String?"":t?.bytes===Array?[]:new Uint8Array:r.long&&Tt(r.typeDefault)?Mt(r.typeDefault,t):r.typeDefault},Zt=(e,t,r)=>{const i=e.resolve();if(void 0!==t)return i.resolvedType instanceof At.Type?Et(t)?Ht(i.resolvedType,t,r):t:i.resolvedType instanceof At.Enum?r?.enums===String&&"number"==typeof t?i.resolvedType.valuesById[t]??t:t:i.long&&Tt(t)?Mt(t,r):"bytes"===i.type&&Nt(t)?((e,t)=>t?.bytes===String?At.util.base64.encode(e,0,e.length):t?.bytes===Array?Array.prototype.slice.call(e):e)(t,r):t},Ht=(e,t,r)=>{const i={};for(const n of e.fieldsArray.slice().sort(At.util.compareFieldsById)){const e=Rt(t,n.name);n.repeated?Array.isArray(e)?i[n.name]=e.map(e=>Zt(n,e,r)):(r?.arrays||r?.defaults)&&(i[n.name]=[]):null==e?r?.defaults&&(i[n.name]=zt(n,r)):i[n.name]=Zt(n,e,r)}return i},Vt=e=>{const t=e;t.__reflectionCodecInstalled||(t.__reflectionCodecInstalled=!0,e.encode=(t,r)=>qt(e,Et(t)?t:{},r),e.decode=(t,r)=>Ut(e,t,r),e.fromObject=e=>Et(e)?e:{},e.toObject=(t,r)=>Ht(e,Et(t)?t:{},r),e.create=e=>e?{...e}:{},e.verify=()=>null)},Wt=e=>{Vt(e);for(const t of e.nestedArray)if(t instanceof At.Type)Wt(t);else if(t instanceof At.Namespace)for(const e of t.nestedArray)e instanceof At.Type&&Wt(e)},Gt=e=>{for(const t of e.nestedArray)t instanceof At.Type?Wt(t):t instanceof At.Namespace&&Gt(t)},Xt=()=>{const e=At.Type;e.__reflectionRuntimeInstalled||(e.generateConstructor=e=>()=>kt(e),At.Type.prototype.setup=function(){return Vt(this),this},At.Type.prototype.create=function(e){return e?{...e}:{}},At.Type.prototype.encode=function(e,t){return qt(this,Et(e)?e:{},t)},At.Type.prototype.decode=function(e,t){return Ut(this,e,t)},At.Type.prototype.fromObject=function(e){return Et(e)?e:{}},At.Type.prototype.toObject=function(e,t){return Ht(this,Et(e)?e:{},t)},At.Type.prototype.verify=function(){return null},e.__reflectionRuntimeInstalled=!0)};export{t as L,Xt as a,Gt as b,qt as e,Wt as i,At as l};
@@ -1 +0,0 @@
1
- "use strict";var e=null;try{e=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function t(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}function r(e){return!0===(e&&e.__isLong__)}function i(e){var t=Math.clz32(e&-e);return e?31-t:t}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0}),t.isLong=r;var n={},o={};function s(e,t){var r,i,s;return t?(s=0<=(e>>>=0)&&e<256)&&(i=o[e])?i:(r=a(e,0,!0),s&&(o[e]=r),r):(s=-128<=(e|=0)&&e<128)&&(i=n[e])?i:(r=a(e,e<0?-1:0,!1),s&&(n[e]=r),r)}function u(e,t){if(isNaN(e))return t?g:v;if(t){if(e<0)return g;if(e>=p)return _}else{if(e<=-d)return j;if(e+1>=d)return O}return e<0?u(-e,t).neg():a(e%c|0,e/c|0,t)}function a(e,r,i){return new t(e,r,i)}t.fromInt=s,t.fromNumber=u,t.fromBits=a;var f=Math.pow;function h(e,t,r){if(0===e.length)throw Error("empty string");if("number"==typeof t?(r=t,t=!1):t=!!t,"NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return t?g:v;if((r=r||10)<2||36<r)throw RangeError("radix");var i;if((i=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return h(e.substring(1),t,r).neg();for(var n=u(f(r,8)),o=v,s=0;s<e.length;s+=8){var a=Math.min(8,e.length-s),l=parseInt(e.substring(s,s+a),r);if(a<8){var c=u(f(r,a));o=o.mul(c).add(u(l))}else o=(o=o.mul(n)).add(u(l))}return o.unsigned=t,o}function l(e,t){return"number"==typeof e?u(e,t):"string"==typeof e?h(e,t):a(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}t.fromString=h,t.fromValue=l;var c=4294967296,p=c*c,d=p/2,y=s(1<<24),v=s(0);t.ZERO=v;var g=s(0,!0);t.UZERO=g;var m=s(1);t.ONE=m;var b=s(1,!0);t.UONE=b;var w=s(-1);t.NEG_ONE=w;var O=a(-1,2147483647,!1);t.MAX_VALUE=O;var _=a(-1,-1,!0);t.MAX_UNSIGNED_VALUE=_;var j=a(0,-2147483648,!1);t.MIN_VALUE=j;var A=t.prototype;A.toInt=function(){return this.unsigned?this.low>>>0:this.low},A.toNumber=function(){return this.unsigned?(this.high>>>0)*c+(this.low>>>0):this.high*c+(this.low>>>0)},A.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(j)){var t=u(e),r=this.div(t),i=r.mul(t).sub(this);return r.toString(e)+i.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var n=u(f(e,6),this.unsigned),o=this,s="";;){var a=o.div(n),h=(o.sub(a.mul(n)).toInt()>>>0).toString(e);if((o=a).isZero())return h+s;for(;h.length<6;)h="0"+h;s=""+h+s}},A.getHighBits=function(){return this.high},A.getHighBitsUnsigned=function(){return this.high>>>0},A.getLowBits=function(){return this.low},A.getLowBitsUnsigned=function(){return this.low>>>0},A.getNumBitsAbs=function(){if(this.isNegative())return this.eq(j)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&!(e&1<<t);t--);return 0!=this.high?t+33:t+1},A.isSafeInteger=function(){var e=this.high>>21;return!e||!this.unsigned&&(-1===e&&!(0===this.low&&-2097152===this.high))},A.isZero=function(){return 0===this.high&&0===this.low},A.eqz=A.isZero,A.isNegative=function(){return!this.unsigned&&this.high<0},A.isPositive=function(){return this.unsigned||this.high>=0},A.isOdd=function(){return!(1&~this.low)},A.isEven=function(){return!(1&this.low)},A.equals=function(e){return r(e)||(e=l(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&(this.high===e.high&&this.low===e.low)},A.eq=A.equals,A.notEquals=function(e){return!this.eq(e)},A.neq=A.notEquals,A.ne=A.notEquals,A.lessThan=function(e){return this.comp(e)<0},A.lt=A.lessThan,A.lessThanOrEqual=function(e){return this.comp(e)<=0},A.lte=A.lessThanOrEqual,A.le=A.lessThanOrEqual,A.greaterThan=function(e){return this.comp(e)>0},A.gt=A.greaterThan,A.greaterThanOrEqual=function(e){return this.comp(e)>=0},A.gte=A.greaterThanOrEqual,A.ge=A.greaterThanOrEqual,A.compare=function(e){if(r(e)||(e=l(e)),this.eq(e))return 0;var t=this.isNegative(),i=e.isNegative();return t&&!i?-1:!t&&i?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},A.comp=A.compare,A.negate=function(){return!this.unsigned&&this.eq(j)?j:this.not().add(m)},A.neg=A.negate,A.add=function(e){r(e)||(e=l(e));var t=this.high>>>16,i=65535&this.high,n=this.low>>>16,o=65535&this.low,s=e.high>>>16,u=65535&e.high,f=e.low>>>16,h=0,c=0,p=0,d=0;return p+=(d+=o+(65535&e.low))>>>16,c+=(p+=n+f)>>>16,h+=(c+=i+u)>>>16,h+=t+s,a((p&=65535)<<16|(d&=65535),(h&=65535)<<16|(c&=65535),this.unsigned)},A.subtract=function(e){return r(e)||(e=l(e)),this.add(e.neg())},A.sub=A.subtract,A.multiply=function(t){if(this.isZero())return this;if(r(t)||(t=l(t)),e)return a(e.mul(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned);if(t.isZero())return this.unsigned?g:v;if(this.eq(j))return t.isOdd()?j:v;if(t.eq(j))return this.isOdd()?j:v;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(y)&&t.lt(y))return u(this.toNumber()*t.toNumber(),this.unsigned);var i=this.high>>>16,n=65535&this.high,o=this.low>>>16,s=65535&this.low,f=t.high>>>16,h=65535&t.high,c=t.low>>>16,p=65535&t.low,d=0,m=0,b=0,w=0;return b+=(w+=s*p)>>>16,m+=(b+=o*p)>>>16,b&=65535,m+=(b+=s*c)>>>16,d+=(m+=n*p)>>>16,m&=65535,d+=(m+=o*c)>>>16,m&=65535,d+=(m+=s*h)>>>16,d+=i*p+n*c+o*h+s*f,a((b&=65535)<<16|(w&=65535),(d&=65535)<<16|(m&=65535),this.unsigned)},A.mul=A.multiply,A.divide=function(t){if(r(t)||(t=l(t)),t.isZero())throw Error("division by zero");var i,n,o;if(e)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?a((this.unsigned?e.div_u:e.div_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?g:v;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return g;if(t.gt(this.shru(1)))return b;o=g}else{if(this.eq(j))return t.eq(m)||t.eq(w)?j:t.eq(j)?m:(i=this.shr(1).div(t).shl(1)).eq(v)?t.isNegative()?m:w:(n=this.sub(t.mul(i)),o=i.add(n.div(t)));if(t.eq(j))return this.unsigned?g:v;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();o=v}for(n=this;n.gte(t);){i=Math.max(1,Math.floor(n.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(i)/Math.LN2),h=s<=48?1:f(2,s-48),c=u(i),p=c.mul(t);p.isNegative()||p.gt(n);)p=(c=u(i-=h,this.unsigned)).mul(t);c.isZero()&&(c=m),o=o.add(c),n=n.sub(p)}return o},A.div=A.divide,A.modulo=function(t){return r(t)||(t=l(t)),e?a((this.unsigned?e.rem_u:e.rem_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},A.mod=A.modulo,A.rem=A.modulo,A.not=function(){return a(~this.low,~this.high,this.unsigned)},A.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},A.clz=A.countLeadingZeros,A.countTrailingZeros=function(){return this.low?i(this.low):i(this.high)+32},A.ctz=A.countTrailingZeros,A.and=function(e){return r(e)||(e=l(e)),a(this.low&e.low,this.high&e.high,this.unsigned)},A.or=function(e){return r(e)||(e=l(e)),a(this.low|e.low,this.high|e.high,this.unsigned)},A.xor=function(e){return r(e)||(e=l(e)),a(this.low^e.low,this.high^e.high,this.unsigned)},A.shiftLeft=function(e){return r(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?a(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):a(0,this.low<<e-32,this.unsigned)},A.shl=A.shiftLeft,A.shiftRight=function(e){return r(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?a(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):a(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},A.shr=A.shiftRight,A.shiftRightUnsigned=function(e){return r(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?a(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):a(32===e?this.high:this.high>>>e-32,0,this.unsigned)},A.shru=A.shiftRightUnsigned,A.shr_u=A.shiftRightUnsigned,A.rotateLeft=function(e){var t;return r(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?a(this.high,this.low,this.unsigned):e<32?(t=32-e,a(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned)):(t=32-(e-=32),a(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned))},A.rotl=A.rotateLeft,A.rotateRight=function(e){var t;return r(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?a(this.high,this.low,this.unsigned):e<32?(t=32-e,a(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned)):(t=32-(e-=32),a(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned))},A.rotr=A.rotateRight,A.toSigned=function(){return this.unsigned?a(this.low,this.high,!1):this},A.toUnsigned=function(){return this.unsigned?this:a(this.low,this.high,!0)},A.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},A.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},A.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},t.fromBytes=function(e,r,i){return i?t.fromBytesLE(e,r):t.fromBytesBE(e,r)},t.fromBytesLE=function(e,r){return new t(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,r)},t.fromBytesBE=function(e,r){return new t(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],r)},"function"==typeof BigInt&&(t.fromBigInt=function(e,t){return a(Number(BigInt.asIntN(32,e)),Number(BigInt.asIntN(32,e>>BigInt(32))),t)},t.fromValue=function(e,r){return"bigint"==typeof e?t.fromBigInt(e,r):l(e,r)},A.toBigInt=function(){var e=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|e});var E,k,T="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},N={exports:{}},S={},x={};function R(){if(k)return E;return k=1,E=function(e,t){var r=new Array(arguments.length-1),i=0,n=2,o=!0;for(;n<arguments.length;)r[i++]=arguments[n++];return new Promise(function(n,s){r[i]=function(e){if(o)if(o=!1,e)s(e);else{for(var t=new Array(arguments.length-1),r=0;r<t.length;)t[r++]=arguments[r];n.apply(null,t)}};try{e.apply(t||null,r)}catch(u){o&&(o=!1,s(u))}})},E}var B,I,L,F,D,P,C,$={};function q(){return C?P:(C=1,P=function(){return null})}var J,U,M,z,Z,H,W,V,G,X,K,Q,Y,ee,te={};function re(){return H||(H=1,function(){var e,t=x;function r(e,t,r){for(var i=Object.keys(t),n=0;n<i.length;++n)void 0!==e[i[n]]&&r||(e[i[n]]=t[i[n]]);return e}function i(e){function t(e,i){if(!(this instanceof t))return new t(e,i);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),i&&r(this,i)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}t.asPromise=R(),t.base64=(B||(B=1,function(){var e=$;e.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 t=new Array(64),r=new Array(123),i=0;i<64;)r[t[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;e.encode=function(e,r,i){for(var n,o=null,s=[],u=0,a=0;r<i;){var f=e[r++];switch(a){case 0:s[u++]=t[f>>2],n=(3&f)<<4,a=1;break;case 1:s[u++]=t[n|f>>4],n=(15&f)<<2,a=2;break;case 2:s[u++]=t[n|f>>6],s[u++]=t[63&f],a=0}u>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),u=0)}return a&&(s[u++]=t[n],s[u++]=61,1===a&&(s[u++]=61)),o?(u&&o.push(String.fromCharCode.apply(String,s.slice(0,u))),o.join("")):String.fromCharCode.apply(String,s.slice(0,u))};var n="invalid encoding";e.decode=function(e,t,i){for(var o,s=i,u=0,a=0;a<e.length;){var f=e.charCodeAt(a++);if(61===f&&u>1)break;if(void 0===(f=r[f]))throw Error(n);switch(u){case 0:o=f,u=1;break;case 1:t[i++]=o<<2|(48&f)>>4,o=f,u=2;break;case 2:t[i++]=(15&o)<<4|(60&f)>>2,o=f,u=3;break;case 3:t[i++]=(3&o)<<6|f,u=0}}if(1===u)throw Error(n);return i-s},e.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}}()),$),t.EventEmitter=function(){if(L)return I;function e(){this._listeners={}}return L=1,I=e,e.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},e.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],i=0;i<r.length;)r[i].fn===t?r.splice(i,1):++i;return this},e.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var r=[],i=1;i<arguments.length;)r.push(arguments[i++]);for(i=0;i<t.length;)t[i].fn.apply(t[i++].ctx,r)}return this},I}(),t.float=function(){if(D)return F;function e(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),i=128===r[3];function n(e,i,n){t[0]=e,i[n]=r[0],i[n+1]=r[1],i[n+2]=r[2],i[n+3]=r[3]}function o(e,i,n){t[0]=e,i[n]=r[3],i[n+1]=r[2],i[n+2]=r[1],i[n+3]=r[0]}function s(e,i){return r[0]=e[i],r[1]=e[i+1],r[2]=e[i+2],r[3]=e[i+3],t[0]}function u(e,i){return r[3]=e[i],r[2]=e[i+1],r[1]=e[i+2],r[0]=e[i+3],t[0]}e.writeFloatLE=i?n:o,e.writeFloatBE=i?o:n,e.readFloatLE=i?s:u,e.readFloatBE=i?u:s}():function(){function o(e,t,r,i){var n=t<0?1:0;if(n&&(t=-t),0===t)e(1/t>0?0:2147483648,r,i);else if(isNaN(t))e(2143289344,r,i);else if(t>34028234663852886e22)e((n<<31|2139095040)>>>0,r,i);else if(t<11754943508222875e-54)e((n<<31|Math.round(t/1401298464324817e-60))>>>0,r,i);else{var o=Math.floor(Math.log(t)/Math.LN2);e((n<<31|o+127<<23|8388607&Math.round(t*Math.pow(2,-o)*8388608))>>>0,r,i)}}function s(e,t,r){var i=e(t,r),n=2*(i>>31)+1,o=i>>>23&255,s=8388607&i;return 255===o?s?NaN:n*(1/0):0===o?1401298464324817e-60*n*s:n*Math.pow(2,o-150)*(s+8388608)}e.writeFloatLE=o.bind(null,t),e.writeFloatBE=o.bind(null,r),e.readFloatLE=s.bind(null,i),e.readFloatBE=s.bind(null,n)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),i=128===r[7];function n(e,i,n){t[0]=e,i[n]=r[0],i[n+1]=r[1],i[n+2]=r[2],i[n+3]=r[3],i[n+4]=r[4],i[n+5]=r[5],i[n+6]=r[6],i[n+7]=r[7]}function o(e,i,n){t[0]=e,i[n]=r[7],i[n+1]=r[6],i[n+2]=r[5],i[n+3]=r[4],i[n+4]=r[3],i[n+5]=r[2],i[n+6]=r[1],i[n+7]=r[0]}function s(e,i){return r[0]=e[i],r[1]=e[i+1],r[2]=e[i+2],r[3]=e[i+3],r[4]=e[i+4],r[5]=e[i+5],r[6]=e[i+6],r[7]=e[i+7],t[0]}function u(e,i){return r[7]=e[i],r[6]=e[i+1],r[5]=e[i+2],r[4]=e[i+3],r[3]=e[i+4],r[2]=e[i+5],r[1]=e[i+6],r[0]=e[i+7],t[0]}e.writeDoubleLE=i?n:o,e.writeDoubleBE=i?o:n,e.readDoubleLE=i?s:u,e.readDoubleBE=i?u:s}():function(){function o(e,t,r,i,n,o){var s=i<0?1:0;if(s&&(i=-i),0===i)e(0,n,o+t),e(1/i>0?0:2147483648,n,o+r);else if(isNaN(i))e(0,n,o+t),e(2146959360,n,o+r);else if(i>17976931348623157e292)e(0,n,o+t),e((s<<31|2146435072)>>>0,n,o+r);else{var u;if(i<22250738585072014e-324)e((u=i/5e-324)>>>0,n,o+t),e((s<<31|u/4294967296)>>>0,n,o+r);else{var a=Math.floor(Math.log(i)/Math.LN2);1024===a&&(a=1023),e(4503599627370496*(u=i*Math.pow(2,-a))>>>0,n,o+t),e((s<<31|a+1023<<20|1048576*u&1048575)>>>0,n,o+r)}}}function s(e,t,r,i,n){var o=e(i,n+t),s=e(i,n+r),u=2*(s>>31)+1,a=s>>>20&2047,f=4294967296*(1048575&s)+o;return 2047===a?f?NaN:u*(1/0):0===a?5e-324*u*f:u*Math.pow(2,a-1075)*(f+4503599627370496)}e.writeDoubleLE=o.bind(null,t,0,4),e.writeDoubleBE=o.bind(null,r,4,0),e.readDoubleLE=s.bind(null,i,0,4),e.readDoubleBE=s.bind(null,n,4,0)}(),e}function t(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 r(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 i(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function n(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}return D=1,F=e(e)}(),t.inquire=q(),t.utf8=(J||(J=1,(e=te).length=function(e){for(var t=0,r=0,i=0;i<e.length;++i)(r=e.charCodeAt(i))<128?t+=1:r<2048?t+=2:55296==(64512&r)&&56320==(64512&e.charCodeAt(i+1))?(++i,t+=4):t+=3;return t},e.read=function(e,t,r){if(r-t<1)return"";for(var i,n=null,o=[],s=0;t<r;)(i=e[t++])<128?o[s++]=i:i>191&&i<224?o[s++]=(31&i)<<6|63&e[t++]:i>239&&i<365?(i=((7&i)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[s++]=55296+(i>>10),o[s++]=56320+(1023&i)):o[s++]=(15&i)<<12|(63&e[t++])<<6|63&e[t++],s>8191&&((n||(n=[])).push(String.fromCharCode.apply(String,o)),s=0);return n?(s&&n.push(String.fromCharCode.apply(String,o.slice(0,s))),n.join("")):String.fromCharCode.apply(String,o.slice(0,s))},e.write=function(e,t,r){for(var i,n,o=r,s=0;s<e.length;++s)(i=e.charCodeAt(s))<128?t[r++]=i:i<2048?(t[r++]=i>>6|192,t[r++]=63&i|128):55296==(64512&i)&&56320==(64512&(n=e.charCodeAt(s+1)))?(i=65536+((1023&i)<<10)+(1023&n),++s,t[r++]=i>>18|240,t[r++]=i>>12&63|128,t[r++]=i>>6&63|128,t[r++]=63&i|128):(t[r++]=i>>12|224,t[r++]=i>>6&63|128,t[r++]=63&i|128);return r-o}),te),t.pool=M?U:(M=1,U=function(e,t,r){var i=r||8192,n=i>>>1,o=null,s=i;return function(r){if(r<1||r>n)return e(r);s+r>i&&(o=e(i),s=0);var u=t.call(o,s,s+=r);return 7&s&&(s=1+(7|s)),u}}),t.LongBits=function(){if(Z)return z;Z=1,z=t;var e=re();function t(e,t){this.lo=e>>>0,this.hi=t>>>0}var r=t.zero=new t(0,0);r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1};var i=t.zeroHash="\0\0\0\0\0\0\0\0";t.fromNumber=function(e){if(0===e)return r;var i=e<0;i&&(e=-e);var n=e>>>0,o=(e-n)/4294967296>>>0;return i&&(o=~o>>>0,n=~n>>>0,++n>4294967295&&(n=0,++o>4294967295&&(o=0))),new t(n,o)},t.from=function(i){if("number"==typeof i)return t.fromNumber(i);if(e.isString(i)){if(!e.Long)return t.fromNumber(parseInt(i,10));i=e.Long.fromString(i)}return i.low||i.high?new t(i.low>>>0,i.high>>>0):r},t.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},t.prototype.toLong=function(t){return e.Long?new e.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var n=String.prototype.charCodeAt;return t.fromHash=function(e){return e===i?r:new t((n.call(e,0)|n.call(e,1)<<8|n.call(e,2)<<16|n.call(e,3)<<24)>>>0,(n.call(e,4)|n.call(e,5)<<8|n.call(e,6)<<16|n.call(e,7)<<24)>>>0)},t.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)},t.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},t.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},t.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},z}(),t.isNode=Boolean(void 0!==T&&T&&T.process&&T.process.versions&&T.process.versions.node),t.global=t.isNode&&T||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||x,t.emptyArray=Object.freeze?Object.freeze([]):[],t.emptyObject=Object.freeze?Object.freeze({}):{},t.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},t.isString=function(e){return"string"==typeof e||e instanceof String},t.isObject=function(e){return e&&"object"==typeof e},t.isset=t.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)},t.Buffer=function(){try{var e=t.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(r){return null}}(),t._Buffer_from=null,t._Buffer_allocUnsafe=null,t.newBuffer=function(e){return"number"==typeof e?t.Buffer?t._Buffer_allocUnsafe(e):new t.Array(e):t.Buffer?t._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},t.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,t.Long=t.global.dcodeIO&&t.global.dcodeIO.Long||t.global.Long||t.inquire("long"),t.key2Re=/^true|false|0|1$/,t.key32Re=/^-?(?:0|[1-9][0-9]*)$/,t.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,t.longToHash=function(e){return e?t.LongBits.from(e).toHash():t.LongBits.zeroHash},t.longFromHash=function(e,r){var i=t.LongBits.fromHash(e);return t.Long?t.Long.fromBits(i.lo,i.hi,r):i.toNumber(Boolean(r))},t.merge=r,t.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},t.newError=i,t.ProtocolError=i("ProtocolError"),t.oneOfGetter=function(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=1;return function(){for(var e=Object.keys(this),r=e.length-1;r>-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},t.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},t.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},t._configure=function(){var e=t.Buffer;e?(t._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,r){return new e(t,r)},t._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):t._Buffer_from=t._Buffer_allocUnsafe=null}}()),x}function ie(){if(V)return W;V=1,W=a;var e,t=re(),r=t.LongBits,i=t.base64,n=t.utf8;function o(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function s(){}function u(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function a(){this.len=0,this.head=new o(s,0,0),this.tail=this.head,this.states=null}var f=function(){return t.Buffer?function(){return(a.create=function(){return new e})()}:function(){return new a}};function h(e,t,r){t[r]=255&e}function l(e,t){this.len=e,this.next=void 0,this.val=t}function c(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 p(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}a.create=f(),a.alloc=function(e){return new t.Array(e)},t.Array!==Array&&(a.alloc=t.pool(a.alloc,t.Array.prototype.subarray)),a.prototype._push=function(e,t,r){return this.tail=this.tail.next=new o(e,t,r),this.len+=t,this},l.prototype=Object.create(o.prototype),l.prototype.fn=function(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e},a.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new l((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},a.prototype.int32=function(e){return e<0?this._push(c,10,r.fromNumber(e)):this.uint32(e)},a.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},a.prototype.uint64=function(e){var t=r.from(e);return this._push(c,t.length(),t)},a.prototype.int64=a.prototype.uint64,a.prototype.sint64=function(e){var t=r.from(e).zzEncode();return this._push(c,t.length(),t)},a.prototype.bool=function(e){return this._push(h,1,e?1:0)},a.prototype.fixed32=function(e){return this._push(p,4,e>>>0)},a.prototype.sfixed32=a.prototype.fixed32,a.prototype.fixed64=function(e){var t=r.from(e);return this._push(p,4,t.lo)._push(p,4,t.hi)},a.prototype.sfixed64=a.prototype.fixed64,a.prototype.float=function(e){return this._push(t.float.writeFloatLE,4,e)},a.prototype.double=function(e){return this._push(t.float.writeDoubleLE,8,e)};var d=t.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var i=0;i<e.length;++i)t[r+i]=e[i]};return a.prototype.bytes=function(e){var r=e.length>>>0;if(!r)return this._push(h,1,0);if(t.isString(e)){var n=a.alloc(r=i.length(e));i.decode(e,n,0),e=n}return this.uint32(r)._push(d,r,e)},a.prototype.string=function(e){var t=n.length(e);return t?this.uint32(t)._push(n.write,t,e):this._push(h,1,0)},a.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new o(s,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(s,0,0),this.len=0),this},a.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},a.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},a._configure=function(t){e=t,a.create=f(),e._configure()},W}function ne(){if(Q)return K;Q=1,K=o;var e,t=re(),r=t.LongBits,i=t.utf8;function n(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function o(e){this.buf=e,this.pos=0,this.len=e.length}var s="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new o(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new o(e);throw Error("illegal buffer")},u=function(){return t.Buffer?function(r){return(o.create=function(r){return t.Buffer.isBuffer(r)?new e(r):s(r)})(r)}:s};function a(){var e=new r(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw n(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 n(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 f(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function h(){if(this.pos+8>this.len)throw n(this,8);return new r(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}return o.create=u(),o.prototype._slice=t.Array.prototype.subarray||t.Array.prototype.slice,o.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,n(this,10);return e}}(),o.prototype.int32=function(){return 0|this.uint32()},o.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},o.prototype.bool=function(){return 0!==this.uint32()},o.prototype.fixed32=function(){if(this.pos+4>this.len)throw n(this,4);return f(this.buf,this.pos+=4)},o.prototype.sfixed32=function(){if(this.pos+4>this.len)throw n(this,4);return 0|f(this.buf,this.pos+=4)},o.prototype.float=function(){if(this.pos+4>this.len)throw n(this,4);var e=t.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},o.prototype.double=function(){if(this.pos+8>this.len)throw n(this,4);var e=t.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},o.prototype.bytes=function(){var e=this.uint32(),r=this.pos,i=this.pos+e;if(i>this.len)throw n(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(r,i);if(r===i){var o=t.Buffer;return o?o.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,r,i)},o.prototype.string=function(){var e=this.bytes();return i.read(e,0,e.length)},o.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw n(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw n(this)}while(128&this.buf[this.pos++]);return this},o.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(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},o._configure=function(r){e=r,o.create=u(),e._configure();var i=t.Long?"toLong":"toNumber";t.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 h.call(this)[i](!0)},sfixed64:function(){return h.call(this)[i](!1)}})},K}var oe,se,ue,ae,fe,he,le={};function ce(){return ue||(ue=1,le.Service=function(){if(se)return oe;se=1,oe=t;var e=re();function t(t,r,i){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");e.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(r),this.responseDelimited=Boolean(i)}return(t.prototype=Object.create(e.EventEmitter.prototype)).constructor=t,t.prototype.rpcCall=function t(r,i,n,o,s){if(!o)throw TypeError("request must be specified");var u=this;if(!s)return e.asPromise(t,u,r,i,n,o);if(u.rpcImpl)try{return u.rpcImpl(r,i[u.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(e,t){if(e)return u.emit("error",e,r),s(e);if(null!==t){if(!(t instanceof n))try{t=n[u.responseDelimited?"decodeDelimited":"decode"](t)}catch(i){return u.emit("error",i,r),s(i)}return u.emit("data",t,r),s(null,t)}u.end(!0)})}catch(a){return u.emit("error",a,r),void setTimeout(function(){s(a)},0)}else setTimeout(function(){s(Error("already ended"))},0)},t.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this},oe}()),le}function pe(){return fe?ae:(fe=1,ae={})}function de(){return he||(he=1,function(){var e=S;function t(){e.util._configure(),e.Writer._configure(e.BufferWriter),e.Reader._configure(e.BufferReader)}e.build="minimal",e.Writer=ie(),e.BufferWriter=function(){if(X)return G;X=1,G=r;var e=ie();(r.prototype=Object.create(e.prototype)).constructor=r;var t=re();function r(){e.call(this)}function i(e,r,i){e.length<40?t.utf8.write(e,r,i):r.utf8Write?r.utf8Write(e,i):r.write(e,i)}return r._configure=function(){r.alloc=t._Buffer_allocUnsafe,r.writeBytesBuffer=t.Buffer&&t.Buffer.prototype instanceof Uint8Array&&"set"===t.Buffer.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 i=0;i<e.length;)t[r++]=e[i++]}},r.prototype.bytes=function(e){t.isString(e)&&(e=t._Buffer_from(e,"base64"));var i=e.length>>>0;return this.uint32(i),i&&this._push(r.writeBytesBuffer,i,e),this},r.prototype.string=function(e){var r=t.Buffer.byteLength(e);return this.uint32(r),r&&this._push(i,r,e),this},r._configure(),G}(),e.Reader=ne(),e.BufferReader=function(){if(ee)return Y;ee=1,Y=r;var e=ne();(r.prototype=Object.create(e.prototype)).constructor=r;var t=re();function r(t){e.call(this,t)}return r._configure=function(){t.Buffer&&(r.prototype._slice=t.Buffer.prototype.slice)},r.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},r._configure(),Y}(),e.util=re(),e.rpc=ce(),e.roots=pe(),e.configure=t,t()}()),S}var ye,ve,ge,me,be={},we={exports:{}};var Oe,_e,je,Ae,Ee,ke,Te,Ne,Se,xe,Re,Be,Ie,Le,Fe,De={};function Pe(){if(je)return _e;je=1,_e=a;var e=Ot();((a.prototype=Object.create(e.prototype)).constructor=a).className="Namespace";var t,r,i,n=bt(),o=gt(),s=wt();function u(e,t){if(e&&e.length){for(var r={},i=0;i<e.length;++i)r[e[i].name]=e[i].toJSON(t);return r}}function a(t,r){e.call(this,t,r),this.nested=void 0,this._nestedArray=null,this._lookupCache={},this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0}function f(e){e._nestedArray=null,e._lookupCache={};for(var t=e;t=t.parent;)t._lookupCache={};return e}return a.fromJSON=function(e,t){return new a(e,t.options).addJSON(t.nested)},a.arrayToJSON=u,a.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},a.isReservedName=function(e,t){if(e)for(var r=0;r<e.length;++r)if(e[r]===t)return!0;return!1},Object.defineProperty(a.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=o.toArray(this.nested))}}),a.prototype.toJSON=function(e){return o.toObject(["options",this.options,"nested",u(this.nestedArray,e)])},a.prototype.addJSON=function(e){if(e)for(var o,s=Object.keys(e),u=0;u<s.length;++u)o=e[s[u]],this.add((void 0!==o.fields?t.fromJSON:void 0!==o.values?i.fromJSON:void 0!==o.methods?r.fromJSON:void 0!==o.id?n.fromJSON:a.fromJSON)(s[u],o));return this},a.prototype.get=function(e){return this.nested&&this.nested[e]||null},a.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof i)return this.nested[e].values;throw Error("no such enum: "+e)},a.prototype.add=function(e){if(!(e instanceof n&&void 0!==e.extend||e instanceof t||e instanceof s||e instanceof i||e instanceof r||e instanceof a))throw TypeError("object must be a valid nested object");if(this.nested){var o=this.get(e.name);if(o){if(!(o instanceof a&&e instanceof a)||o instanceof t||o instanceof r)throw Error("duplicate name '"+e.name+"' in "+this);for(var u=o.nestedArray,h=0;h<u.length;++h)e.add(u[h]);this.remove(o),this.nested||(this.nested={}),e.setOptions(o.options,!0)}}else this.nested={};this.nested[e.name]=e,this instanceof t||this instanceof r||this instanceof i||this instanceof n||e._edition||(e._edition=e._defaultEdition),this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0;for(var l=this;l=l.parent;)l._needsRecursiveFeatureResolution=!0,l._needsRecursiveResolve=!0;return e.onAdd(this),f(this)},a.prototype.remove=function(t){if(!(t instanceof e))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=void 0),t.onRemove(this),f(this)},a.prototype.define=function(e,t){if(o.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 i=e.shift();if(r.nested&&r.nested[i]){if(!((r=r.nested[i])instanceof a))throw Error("path conflicts with non-namespace objects")}else r.add(r=new a(i))}return t&&r.addJSON(t),r},a.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;this._resolveFeaturesRecursive(this._edition);var e=this.nestedArray,t=0;for(this.resolve();t<e.length;)e[t]instanceof a?e[t++].resolveAll():e[t++].resolve();return this._needsRecursiveResolve=!1,this},a.prototype._resolveFeaturesRecursive=function(t){return this._needsRecursiveFeatureResolution?(this._needsRecursiveFeatureResolution=!1,t=this._edition||t,e.prototype._resolveFeaturesRecursive.call(this,t),this.nestedArray.forEach(e=>{e._resolveFeaturesRecursive(t)}),this):this},a.prototype.lookup=function(e,t,r){if("boolean"==typeof t?(r=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),o.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;var i=e.join(".");if(""===e[0])return this.root.lookup(e.slice(1),t);var n=this.root._fullyQualifiedObjects&&this.root._fullyQualifiedObjects["."+i];if(n&&(!t||t.indexOf(n.constructor)>-1))return n;if((n=this._lookupImpl(e,i))&&(!t||t.indexOf(n.constructor)>-1))return n;if(r)return null;for(var s=this;s.parent;){if((n=s.parent._lookupImpl(e,i))&&(!t||t.indexOf(n.constructor)>-1))return n;s=s.parent}return null},a.prototype._lookupImpl=function(e,t){if(Object.prototype.hasOwnProperty.call(this._lookupCache,t))return this._lookupCache[t];var r=this.get(e[0]),i=null;if(r)1===e.length?i=r:r instanceof a&&(e=e.slice(1),i=r._lookupImpl(e,e.join(".")));else for(var n=0;n<this.nestedArray.length;++n)this._nestedArray[n]instanceof a&&(r=this._nestedArray[n]._lookupImpl(e,t))&&(i=r);return this._lookupCache[t]=i,i},a.prototype.lookupType=function(e){var r=this.lookup(e,[t]);if(!r)throw Error("no such type: "+e);return r},a.prototype.lookupEnum=function(e){var t=this.lookup(e,[i]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},a.prototype.lookupTypeOrEnum=function(e){var r=this.lookup(e,[t,i]);if(!r)throw Error("no such Type or Enum '"+e+"' in "+this);return r},a.prototype.lookupService=function(e){var t=this.lookup(e,[r]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},a._configure=function(e,n,o){t=e,r=n,i=o},_e}function Ce(){if(Ee)return Ae;Ee=1,Ae=i;var e=bt();((i.prototype=Object.create(e.prototype)).constructor=i).className="MapField";var t=mt(),r=gt();function i(t,i,n,o,s,u){if(e.call(this,t,i,o,void 0,void 0,s,u),!r.isString(n))throw TypeError("keyType must be a string");this.keyType=n,this.resolvedKeyType=null,this.map=!0}return i.fromJSON=function(e,t){return new i(e,t.id,t.keyType,t.type,t.options,t.comment)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return r.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},i.prototype.resolve=function(){if(this.resolved)return this;if(void 0===t.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return e.prototype.resolve.call(this)},i.d=function(e,t,n){return"function"==typeof n?n=r.decorateType(n).name:n&&"object"==typeof n&&(n=r.decorateEnum(n).name),function(o,s){r.decorateType(o.constructor).add(new i(s,e,t,n))}},Ae}function $e(){if(Te)return ke;Te=1,ke=r;var e=Ot();((r.prototype=Object.create(e.prototype)).constructor=r).className="Method";var t=gt();function r(r,i,n,o,s,u,a,f,h){if(t.isObject(s)?(a=s,s=u=void 0):t.isObject(u)&&(a=u,u=void 0),void 0!==i&&!t.isString(i))throw TypeError("type must be a string");if(!t.isString(n))throw TypeError("requestType must be a string");if(!t.isString(o))throw TypeError("responseType must be a string");e.call(this,r,a),this.type=i||"rpc",this.requestType=n,this.requestStream=!!s||void 0,this.responseType=o,this.responseStream=!!u||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=f,this.parsedOptions=h}return r.fromJSON=function(e,t){return new r(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},r.prototype.toJSON=function(e){var r=!!e&&Boolean(e.keepComments);return t.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",r?this.comment:void 0,"parsedOptions",this.parsedOptions])},r.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),e.prototype.resolve.call(this))},ke}function qe(){if(Se)return Ne;Se=1,Ne=n;var e=Pe();((n.prototype=Object.create(e.prototype)).constructor=n).className="Service";var t=$e(),r=gt(),i=ce();function n(t,r){e.call(this,t,r),this.methods={},this._methodsArray=null}function o(e){return e._methodsArray=null,e}return n.fromJSON=function(e,r){var i=new n(e,r.options);if(r.methods)for(var o=Object.keys(r.methods),s=0;s<o.length;++s)i.add(t.fromJSON(o[s],r.methods[o[s]]));return r.nested&&i.addJSON(r.nested),r.edition&&(i._edition=r.edition),i.comment=r.comment,i._defaultEdition="proto3",i},n.prototype.toJSON=function(t){var i=e.prototype.toJSON.call(this,t),n=!!t&&Boolean(t.keepComments);return r.toObject(["edition",this._editionToJSON(),"options",i&&i.options||void 0,"methods",e.arrayToJSON(this.methodsArray,t)||{},"nested",i&&i.nested||void 0,"comment",n?this.comment:void 0])},Object.defineProperty(n.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=r.toArray(this.methods))}}),n.prototype.get=function(t){return this.methods[t]||e.prototype.get.call(this,t)},n.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;e.prototype.resolve.call(this);for(var t=this.methodsArray,r=0;r<t.length;++r)t[r].resolve();return this},n.prototype._resolveFeaturesRecursive=function(t){return this._needsRecursiveFeatureResolution?(t=this._edition||t,e.prototype._resolveFeaturesRecursive.call(this,t),this.methodsArray.forEach(e=>{e._resolveFeaturesRecursive(t)}),this):this},n.prototype.add=function(r){if(this.get(r.name))throw Error("duplicate name '"+r.name+"' in "+this);return r instanceof t?(this.methods[r.name]=r,r.parent=this,o(this)):e.prototype.add.call(this,r)},n.prototype.remove=function(r){if(r instanceof t){if(this.methods[r.name]!==r)throw Error(r+" is not a member of "+this);return delete this.methods[r.name],r.parent=null,o(this)}return e.prototype.remove.call(this,r)},n.prototype.create=function(e,t,n){for(var o,s=new i.Service(e,t,n),u=0;u<this.methodsArray.length;++u){var a=r.lcFirst((o=this._methodsArray[u]).resolve().name).replace(/[^$\w_]/g,"");s[a]=r.codegen(["r","c"],r.isReserved(a)?a+"_":a)("return this.rpcCall(m,q,s,r,c)")({m:o,q:o.resolvedRequestType.ctor,s:o.resolvedResponseType.ctor})}return s},Ne}function Je(){if(Re)return xe;Re=1,xe=t;var e=re();function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}return t.create=function(e){return this.$type.create(e)},t.encode=function(e,t){return this.$type.encode(e,t)},t.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},t.decode=function(e){return this.$type.decode(e)},t.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},t.verify=function(e){return this.$type.verify(e)},t.fromObject=function(e){return this.$type.fromObject(e)},t.toObject=function(e,t){return this.$type.toObject(e,t)},t.prototype.toJSON=function(){return this.$type.toObject(this,e.toJSONOptions)},xe}function Ue(){if(Ie)return Be;Ie=1,Be=function(n){for(var o=r.codegen(["r","l","e"],n.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(n.fieldsArray.filter(function(e){return e.map}).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()")("if(t===e)")("break")("switch(t>>>3){"),s=0;s<n.fieldsArray.length;++s){var u=n._fieldsArray[s].resolve(),a=u.resolvedType instanceof e?"int32":u.type,f="m"+r.safeProp(u.name);o("case %i: {",u.id),u.map?(o("if(%s===util.emptyObject)",f)("%s={}",f)("var c2 = r.uint32()+r.pos"),void 0!==t.defaults[u.keyType]?o("k=%j",t.defaults[u.keyType]):o("k=null"),void 0!==t.defaults[a]?o("value=%j",t.defaults[a]):o("value=null"),o("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",u.keyType)("case 2:"),void 0===t.basic[a]?o("value=types[%i].decode(r,r.uint32())",s):o("value=r.%s()",a),o("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==t.long[u.keyType]?o('%s[typeof k==="object"?util.longToHash(k):k]=value',f):o("%s[k]=value",f)):u.repeated?(o("if(!(%s&&%s.length))",f,f)("%s=[]",f),void 0!==t.packed[a]&&o("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",f,a)("}else"),void 0===t.basic[a]?o(u.delimited?"%s.push(types[%i].decode(r,undefined,((t&~7)|4)))":"%s.push(types[%i].decode(r,r.uint32()))",f,s):o("%s.push(r.%s())",f,a)):void 0===t.basic[a]?o(u.delimited?"%s=types[%i].decode(r,undefined,((t&~7)|4))":"%s=types[%i].decode(r,r.uint32())",f,s):o("%s=r.%s()",f,a),o("break")("}")}for(o("default:")("r.skipType(t&7)")("break")("}")("}"),s=0;s<n._fieldsArray.length;++s){var h=n._fieldsArray[s];h.required&&o("if(!m.hasOwnProperty(%j))",h.name)("throw util.ProtocolError(%j,{instance:m})",i(h))}return o("return m")};var e=_t(),t=mt(),r=gt();function i(e){return"missing required '"+e.name+"'"}return Be}function Me(){if(Fe)return Le;Fe=1,Le=function(e){var o=t.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),s=e.oneofsArray,u={};s.length&&o("var p={}");for(var a=0;a<e.fieldsArray.length;++a){var f=e._fieldsArray[a].resolve(),h="m"+t.safeProp(f.name);if(f.optional&&o("if(%s!=null&&m.hasOwnProperty(%j)){",h,f.name),f.map)o("if(!util.isObject(%s))",h)("return%j",r(f,"object"))("var k=Object.keys(%s)",h)("for(var i=0;i<k.length;++i){"),n(o,f,"k[i]"),i(o,f,a,h+"[k[i]]")("}");else if(f.repeated)o("if(!Array.isArray(%s))",h)("return%j",r(f,"array"))("for(var i=0;i<%s.length;++i){",h),i(o,f,a,h+"[i]")("}");else{if(f.partOf){var l=t.safeProp(f.partOf.name);1===u[f.partOf.name]&&o("if(p%s===1)",l)("return%j",f.partOf.name+": multiple values"),u[f.partOf.name]=1,o("p%s=1",l)}i(o,f,a,h)}f.optional&&o("}")}return o("return null")};var e=_t(),t=gt();function r(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function i(t,i,n,o){if(i.resolvedType)if(i.resolvedType instanceof e){t("switch(%s){",o)("default:")("return%j",r(i,"enum value"));for(var s=Object.keys(i.resolvedType.values),u=0;u<s.length;++u)t("case %i:",i.resolvedType.values[s[u]]);t("break")("}")}else t("{")("var e=types[%i].verify(%s);",n,o)("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))",o)("return%j",r(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)))",o,o,o,o)("return%j",r(i,"integer|Long"));break;case"float":case"double":t('if(typeof %s!=="number")',o)("return%j",r(i,"number"));break;case"bool":t('if(typeof %s!=="boolean")',o)("return%j",r(i,"boolean"));break;case"string":t("if(!util.isString(%s))",o)("return%j",r(i,"string"));break;case"bytes":t('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',o,o,o)("return%j",r(i,"buffer"))}return t}function n(e,t,i){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",i)("return%j",r(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",i)("return%j",r(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",i)("return%j",r(t,"boolean key"))}return e}return Le}var ze,Ze={};function He(){return ze||(ze=1,function(){var e=Ze,t=_t(),r=gt();function i(e,r,i,n){var o=!1;if(r.resolvedType)if(r.resolvedType instanceof t){e("switch(d%s){",n);for(var s=r.resolvedType.values,u=Object.keys(s),a=0;a<u.length;++a)s[u[a]]!==r.typeDefault||o||(e("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',n,n,n),r.repeated||e("break"),o=!0),e("case%j:",u[a])("case %i:",s[u[a]])("m%s=%j",n,s[u[a]])("break");e("}")}else e('if(typeof d%s!=="object")',n)("throw TypeError(%j)",r.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",n,i,n);else{var f=!1;switch(r.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":f=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,f)('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,f?"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 >= 0)",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 n(e,r,i,n){if(r.resolvedType)r.resolvedType instanceof t?e("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",n,i,n,n,i,n,n):e("d%s=types[%i].toObject(m%s,o)",n,i,n);else{var o=!1;switch(r.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":o=!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,o?"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}e.fromObject=function(e){var n=e.fieldsArray,o=r.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!n.length)return o("return new this.ctor");o("var m=new this.ctor");for(var s=0;s<n.length;++s){var u=n[s].resolve(),a=r.safeProp(u.name);u.map?(o("if(d%s){",a)('if(typeof d%s!=="object")',a)("throw TypeError(%j)",u.fullName+": object expected")("m%s={}",a)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",a),i(o,u,s,a+"[ks[i]]")("}")("}")):u.repeated?(o("if(d%s){",a)("if(!Array.isArray(d%s))",a)("throw TypeError(%j)",u.fullName+": array expected")("m%s=[]",a)("for(var i=0;i<d%s.length;++i){",a),i(o,u,s,a+"[i]")("}")("}")):(u.resolvedType instanceof t||o("if(d%s!=null){",a),i(o,u,s,a),u.resolvedType instanceof t||o("}"))}return o("return m")},e.toObject=function(e){var i=e.fieldsArray.slice().sort(r.compareFieldsById);if(!i.length)return r.codegen()("return {}");for(var o=r.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),s=[],u=[],a=[],f=0;f<i.length;++f)i[f].partOf||(i[f].resolve().repeated?s:i[f].map?u:a).push(i[f]);if(s.length){for(o("if(o.arrays||o.defaults){"),f=0;f<s.length;++f)o("d%s=[]",r.safeProp(s[f].name));o("}")}if(u.length){for(o("if(o.objects||o.defaults){"),f=0;f<u.length;++f)o("d%s={}",r.safeProp(u[f].name));o("}")}if(a.length){for(o("if(o.defaults){"),f=0;f<a.length;++f){var h=a[f],l=r.safeProp(h.name);if(h.resolvedType instanceof t)o("d%s=o.enums===String?%j:%j",l,h.resolvedType.valuesById[h.typeDefault],h.typeDefault);else if(h.long)o("if(util.Long){")("var n=new util.Long(%i,%i,%j)",h.typeDefault.low,h.typeDefault.high,h.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",l)("}else")("d%s=o.longs===String?%j:%i",l,h.typeDefault.toString(),h.typeDefault.toNumber());else if(h.bytes){var c="["+Array.prototype.slice.call(h.typeDefault).join(",")+"]";o("if(o.bytes===String)d%s=%j",l,String.fromCharCode.apply(String,h.typeDefault))("else{")("d%s=%s",l,c)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",l,l)("}")}else o("d%s=%j",l,h.typeDefault)}o("}")}var p=!1;for(f=0;f<i.length;++f){h=i[f];var d=e._fieldsArray.indexOf(h);l=r.safeProp(h.name);h.map?(p||(p=!0,o("var ks2")),o("if(m%s&&(ks2=Object.keys(m%s)).length){",l,l)("d%s={}",l)("for(var j=0;j<ks2.length;++j){"),n(o,h,d,l+"[ks2[j]]")("}")):h.repeated?(o("if(m%s&&m%s.length){",l,l)("d%s=[]",l)("for(var j=0;j<m%s.length;++j){",l),n(o,h,d,l+"[j]")("}")):(o("if(m%s!=null&&m.hasOwnProperty(%j)){",l,h.name),n(o,h,d,l),h.partOf&&o("if(o.oneofs)")("d%s=%j",r.safeProp(h.partOf.name),h.name)),o("}")}return o("return d")}}()),Ze}var We,Ve,Ge,Xe,Ke,Qe,Ye,et,tt,rt,it,nt,ot,st,ut,at,ft,ht,lt,ct,pt={};function dt(){return We||(We=1,e=pt,t=Je(),e[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),r=this.lookup(t);if(r){var i="."===e["@type"].charAt(0)?e["@type"].slice(1):e["@type"];return-1===i.indexOf("/")&&(i="/"+i),this.create({type_url:i,value:r.encode(r.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,r){var i="",n="";if(r&&r.json&&e.type_url&&e.value){n=e.type_url.substring(e.type_url.lastIndexOf("/")+1),i=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var o=this.lookup(n);o&&(e=o.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof t){var s=e.$type.toObject(e,r);return""===i&&(i="type.googleapis.com/"),n=i+("."===e.$type.fullName[0]?e.$type.fullName.slice(1):e.$type.fullName),s["@type"]=n,s}return this.toObject(e,r)}}),pt;var e,t}function yt(){if(Ge)return Ve;Ge=1,Ve=y;var e=Pe();((y.prototype=Object.create(e.prototype)).constructor=y).className="Type";var t=_t(),r=wt(),i=bt(),n=Ce(),o=qe(),s=Je(),u=ne(),a=ie(),f=gt(),h=jt(),l=Ue(),c=Me(),p=He(),d=dt();function y(t,r){e.call(this,t,r),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function v(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}return Object.defineProperties(y.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var r=this.fields[e[t]],i=r.id;if(this._fieldsById[i])throw Error("duplicate id "+i+" in "+this);this._fieldsById[i]=r}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=f.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=f.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=y.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof s||((e.prototype=new s).constructor=e,f.merge(e.prototype,t)),e.$type=e.prototype.$type=this,f.merge(e,s,!0),this._ctor=e;for(var r=0;r<this.fieldsArray.length;++r)this._fieldsArray[r].resolve();var i={};for(r=0;r<this.oneofsArray.length;++r)i[this._oneofsArray[r].resolve().name]={get:f.oneOfGetter(this._oneofsArray[r].oneof),set:f.oneOfSetter(this._oneofsArray[r].oneof)};r&&Object.defineProperties(e.prototype,i)}}}),y.generateConstructor=function(e){for(var t,r=f.codegen(["p"],e.name),i=0;i<e.fieldsArray.length;++i)(t=e._fieldsArray[i]).map?r("this%s={}",f.safeProp(t.name)):t.repeated&&r("this%s=[]",f.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]]")},y.fromJSON=function(s,u){var a=new y(s,u.options);a.extensions=u.extensions,a.reserved=u.reserved;for(var f=Object.keys(u.fields),h=0;h<f.length;++h)a.add((void 0!==u.fields[f[h]].keyType?n.fromJSON:i.fromJSON)(f[h],u.fields[f[h]]));if(u.oneofs)for(f=Object.keys(u.oneofs),h=0;h<f.length;++h)a.add(r.fromJSON(f[h],u.oneofs[f[h]]));if(u.nested)for(f=Object.keys(u.nested),h=0;h<f.length;++h){var l=u.nested[f[h]];a.add((void 0!==l.id?i.fromJSON:void 0!==l.fields?y.fromJSON:void 0!==l.values?t.fromJSON:void 0!==l.methods?o.fromJSON:e.fromJSON)(f[h],l))}return u.extensions&&u.extensions.length&&(a.extensions=u.extensions),u.reserved&&u.reserved.length&&(a.reserved=u.reserved),u.group&&(a.group=!0),u.comment&&(a.comment=u.comment),u.edition&&(a._edition=u.edition),a._defaultEdition="proto3",a},y.prototype.toJSON=function(t){var r=e.prototype.toJSON.call(this,t),i=!!t&&Boolean(t.keepComments);return f.toObject(["edition",this._editionToJSON(),"options",r&&r.options||void 0,"oneofs",e.arrayToJSON(this.oneofsArray,t),"fields",e.arrayToJSON(this.fieldsArray.filter(function(e){return!e.declaringField}),t)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",r&&r.nested||void 0,"comment",i?this.comment:void 0])},y.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;e.prototype.resolveAll.call(this);var t=this.oneofsArray;for(i=0;i<t.length;)t[i++].resolve();for(var r=this.fieldsArray,i=0;i<r.length;)r[i++].resolve();return this},y.prototype._resolveFeaturesRecursive=function(t){return this._needsRecursiveFeatureResolution?(t=this._edition||t,e.prototype._resolveFeaturesRecursive.call(this,t),this.oneofsArray.forEach(e=>{e._resolveFeatures(t)}),this.fieldsArray.forEach(e=>{e._resolveFeatures(t)}),this):this},y.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},y.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);if(t instanceof i&&void 0===t.extend){if(this._fieldsById?this._fieldsById[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,t.message=this,t.onAdd(this),v(this)}return t instanceof r?(this.oneofs||(this.oneofs={}),this.oneofs[t.name]=t,t.onAdd(this),v(this)):e.prototype.add.call(this,t)},y.prototype.remove=function(t){if(t instanceof i&&void 0===t.extend){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),v(this)}if(t instanceof r){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),v(this)}return e.prototype.remove.call(this,t)},y.prototype.isReservedId=function(t){return e.isReservedId(this.reserved,t)},y.prototype.isReservedName=function(t){return e.isReservedName(this.reserved,t)},y.prototype.create=function(e){return new this.ctor(e)},y.prototype.setup=function(){for(var e=this.fullName,t=[],r=0;r<this.fieldsArray.length;++r)t.push(this._fieldsArray[r].resolve().resolvedType);this.encode=h(this)({Writer:a,types:t,util:f}),this.decode=l(this)({Reader:u,types:t,util:f}),this.verify=c(this)({types:t,util:f}),this.fromObject=p.fromObject(this)({types:t,util:f}),this.toObject=p.toObject(this)({types:t,util:f});var i=d[e];if(i){var n=Object.create(this);n.fromObject=this.fromObject,this.fromObject=i.fromObject.bind(n),n.toObject=this.toObject,this.toObject=i.toObject.bind(n)}return this},y.prototype.encode=function(e,t){return this.setup().encode(e,t)},y.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},y.prototype.decode=function(e,t){return this.setup().decode(e,t)},y.prototype.decodeDelimited=function(e){return e instanceof u||(e=u.create(e)),this.decode(e,e.uint32())},y.prototype.verify=function(e){return this.setup().verify(e)},y.prototype.fromObject=function(e){return this.setup().fromObject(e)},y.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},y.d=function(e){return function(t){f.decorateType(t,e)}},Ve}function vt(){if(Ke)return Xe;Ke=1,Xe=a;var e=Pe();((a.prototype=Object.create(e.prototype)).constructor=a).className="Root";var t,r,i,n=bt(),o=_t(),s=wt(),u=gt();function a(t){e.call(this,"",t),this.deferred=[],this.files=[],this._edition="proto2",this._fullyQualifiedObjects={}}function f(){}a.fromJSON=function(e,t){return t||(t=new a),e.options&&t.setOptions(e.options),t.addJSON(e.nested).resolveAll()},a.prototype.resolvePath=u.path.resolve,a.prototype.fetch=u.fetch,a.prototype.load=function e(t,n,o){"function"==typeof n&&(o=n,n=void 0);var s=this;if(!o)return u.asPromise(e,s,t,n);var a=o===f;function h(e,t){if(o){if(a)throw e;t&&t.resolveAll();var r=o;o=null,r(e,t)}}function l(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var r=e.substring(t);if(r in i)return r}return null}function c(e,t){try{if(u.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),u.isString(t)){r.filename=e;var i,o=r(t,s,n),f=0;if(o.imports)for(;f<o.imports.length;++f)(i=l(o.imports[f])||s.resolvePath(e,o.imports[f]))&&p(i);if(o.weakImports)for(f=0;f<o.weakImports.length;++f)(i=l(o.weakImports[f])||s.resolvePath(e,o.weakImports[f]))&&p(i,!0)}else s.setOptions(t.options).addJSON(t.nested)}catch(c){h(c)}a||d||h(null,s)}function p(e,t){if(e=l(e)||e,!(s.files.indexOf(e)>-1))if(s.files.push(e),e in i)a?c(e,i[e]):(++d,setTimeout(function(){--d,c(e,i[e])}));else if(a){var r;try{r=u.fs.readFileSync(e).toString("utf8")}catch(n){return void(t||h(n))}c(e,r)}else++d,s.fetch(e,function(r,i){--d,o&&(r?t?d||h(null,s):h(r):c(e,i))})}var d=0;u.isString(t)&&(t=[t]);for(var y,v=0;v<t.length;++v)(y=s.resolvePath("",t[v]))&&p(y);return a?(s.resolveAll(),s):(d||h(null,s),s)},a.prototype.loadSync=function(e,t){if(!u.isNode)throw Error("not supported");return this.load(e,t,f)},a.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(e){return"'extend "+e.extend+"' in "+e.parent.fullName}).join(", "));return e.prototype.resolveAll.call(this)};var h=/^[A-Z]/;function l(e,t){var r=t.parent.lookup(t.extend);if(r){var i=new n(t.fullName,t.id,t.type,t.rule,void 0,t.options);return r.get(i.name)||(i.declaringField=t,t.extensionField=i,r.add(i)),!0}return!1}return a.prototype._handleAdd=function(e){if(e instanceof n)void 0===e.extend||e.extensionField||l(0,e)||this.deferred.push(e);else if(e instanceof o)h.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof s)){if(e instanceof t)for(var r=0;r<this.deferred.length;)l(0,this.deferred[r])?this.deferred.splice(r,1):++r;for(var i=0;i<e.nestedArray.length;++i)this._handleAdd(e._nestedArray[i]);h.test(e.name)&&(e.parent[e.name]=e)}(e instanceof t||e instanceof o||e instanceof n)&&(this._fullyQualifiedObjects[e.fullName]=e)},a.prototype._handleRemove=function(t){if(t instanceof n){if(void 0!==t.extend)if(t.extensionField)t.extensionField.parent.remove(t.extensionField),t.extensionField=null;else{var r=this.deferred.indexOf(t);r>-1&&this.deferred.splice(r,1)}}else if(t instanceof o)h.test(t.name)&&delete t.parent[t.name];else if(t instanceof e){for(var i=0;i<t.nestedArray.length;++i)this._handleRemove(t._nestedArray[i]);h.test(t.name)&&delete t.parent[t.name]}delete this._fullyQualifiedObjects[t.fullName]},a._configure=function(e,n,o){t=e,r=n,i=o},Xe}function gt(){if(Qe)return we.exports;Qe=1;var e,t,r,i,n,o=we.exports=re(),s=pe();o.codegen=function(){if(ve)return ye;function e(t,r){"string"==typeof t&&(r=t,t=void 0);var i=[];function n(t){if("string"!=typeof t){var r=o();if(e.verbose&&console.log("codegen: "+r),r="return "+r,t){for(var s=Object.keys(t),u=new Array(s.length+1),a=new Array(s.length),f=0;f<s.length;)u[f]=s[f],a[f]=t[s[f++]];return u[f]=r,Function.apply(null,u).apply(null,a)}return Function(r)()}for(var h=new Array(arguments.length-1),l=0;l<h.length;)h[l]=arguments[++l];if(l=0,t=t.replace(/%([%dfijs])/g,function(e,t){var r=h[l++];switch(t){case"d":case"f":return String(Number(r));case"i":return String(Math.floor(r));case"j":return JSON.stringify(r);case"s":return String(r)}return"%"}),l!==h.length)throw Error("parameter count mismatch");return i.push(t),n}function o(e){return"function "+(e||r||"")+"("+(t&&t.join(",")||"")+"){\n "+i.join("\n ")+"\n}"}return n.toString=o,n}return ve=1,ye=e,e.verbose=!1,ye}(),o.fetch=function(){if(me)return ge;me=1,ge=r;var e=R(),t=q()("fs");function r(i,n,o){return"function"==typeof n?(o=n,n={}):n||(n={}),o?!n.xhr&&t&&t.readFile?t.readFile(i,function(e,t){return e&&"undefined"!=typeof XMLHttpRequest?r.xhr(i,n,o):e?o(e):o(null,n.binary?t:t.toString("utf8"))}):r.xhr(i,n,o):e(r,this,i,n)}return r.xhr=function(e,t,r){var i=new XMLHttpRequest;i.onreadystatechange=function(){if(4===i.readyState){if(0!==i.status&&200!==i.status)return r(Error("status "+i.status));if(t.binary){var e=i.response;if(!e){e=[];for(var n=0;n<i.responseText.length;++n)e.push(255&i.responseText.charCodeAt(n))}return r(null,"undefined"!=typeof Uint8Array?new Uint8Array(e):e)}return r(null,i.responseText)}},t.binary&&("overrideMimeType"in i&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.responseType="arraybuffer"),i.open("GET",e),i.send()},ge}(),o.path=(Oe||(Oe=1,i=(r=De).isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},n=r.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).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("/")},r.resolve=function(e,t,r){return r||(t=n(t)),i(t)?t:(r||(e=n(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?n(e+"/"+t):t)}),De),o.fs=o.inquire("fs"),o.toArray=function(e){if(e){for(var t=Object.keys(e),r=new Array(t.length),i=0;i<t.length;)r[i]=e[t[i++]];return r}return[]},o.toObject=function(e){for(var t={},r=0;r<e.length;){var i=e[r++],n=e[r++];void 0!==n&&(t[i]=n)}return t};var u=/\\/g,a=/"/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(u,"\\\\").replace(a,'\\"')+'"]':"."+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;e||(e=yt());var i=new e(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 h=0;return o.decorateEnum=function(e){if(e.$type)return e.$type;t||(t=_t());var r=new t("Enum"+h++,e);return o.decorateRoot.add(r),Object.defineProperty(e,"$type",{value:r,enumerable:!1}),r},o.setProperty=function(e,t,r,i){if("object"!=typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return function e(t,r,n){var o=r.shift();if("__proto__"===o||"prototype"===o)return t;if(r.length>0)t[o]=e(t[o]||{},r,n);else{var s=t[o];if(s&&i)return t;s&&(n=[].concat(s).concat(n)),t[o]=n}return t}(e,t=t.split("."),r)},Object.defineProperty(o,"decorateRoot",{get:function(){return s.decorated||(s.decorated=new(vt()))}}),we.exports}function mt(){return Ye||(Ye=1,function(){var e=be,t=gt(),r=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function i(e,t){var i=0,n={};for(t|=0;i<e.length;)n[r[i+t]]=e[i++];return n}e.basic=i([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),e.defaults=i([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",t.emptyArray,null]),e.long=i([0,0,0,1,1],7),e.mapKey=i([0,0,0,5,5,0,0,0,1,1,0,2],2),e.packed=i([1,5,0,0,0,5,5,0,0,0,1,1,0])}()),be}function bt(){if(tt)return et;tt=1,et=s;var e=Ot();((s.prototype=Object.create(e.prototype)).constructor=s).className="Field";var t,r=_t(),i=mt(),n=gt(),o=/^required|optional|repeated$/;function s(t,r,s,u,a,f,h){if(n.isObject(u)?(h=a,f=u,u=a=void 0):n.isObject(a)&&(h=f,f=a,a=void 0),e.call(this,t,f),!n.isInteger(r)||r<0)throw TypeError("id must be a non-negative integer");if(!n.isString(s))throw TypeError("type must be a string");if(void 0!==u&&!o.test(u=u.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==a&&!n.isString(a))throw TypeError("extend must be a string");"proto3_optional"===u&&(u="optional"),this.rule=u&&"optional"!==u?u:void 0,this.type=s,this.id=r,this.extend=a||void 0,this.repeated="repeated"===u,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!n.Long&&void 0!==i.long[s],this.bytes="bytes"===s,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.comment=h}return s.fromJSON=function(e,t){var r=new s(e,t.id,t.type,t.rule,t.extend,t.options,t.comment);return t.edition&&(r._edition=t.edition),r._defaultEdition="proto3",r},Object.defineProperty(s.prototype,"required",{get:function(){return"LEGACY_REQUIRED"===this._features.field_presence}}),Object.defineProperty(s.prototype,"optional",{get:function(){return!this.required}}),Object.defineProperty(s.prototype,"delimited",{get:function(){return this.resolvedType instanceof t&&"DELIMITED"===this._features.message_encoding}}),Object.defineProperty(s.prototype,"packed",{get:function(){return"PACKED"===this._features.repeated_field_encoding}}),Object.defineProperty(s.prototype,"hasPresence",{get:function(){return!this.repeated&&!this.map&&(this.partOf||this.declaringField||this.extensionField||"IMPLICIT"!==this._features.field_presence)}}),s.prototype.setOption=function(t,r,i){return e.prototype.setOption.call(this,t,r,i)},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return n.toObject(["edition",this._editionToJSON(),"rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},s.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=i.defaults[this.type])?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof t?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),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&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof r||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=n.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var o;n.base64.test(this.typeDefault)?n.base64.decode(this.typeDefault,o=n.newBuffer(n.base64.length(this.typeDefault)),0):n.utf8.write(this.typeDefault,o=n.newBuffer(n.utf8.length(this.typeDefault)),0),this.typeDefault=o}return this.map?this.defaultValue=n.emptyObject:this.repeated?this.defaultValue=n.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof t&&(this.parent.ctor.prototype[this.name]=this.defaultValue),e.prototype.resolve.call(this)},s.prototype._inferLegacyProtoFeatures=function(e){if("proto2"!==e&&"proto3"!==e)return{};var r={};if("required"===this.rule&&(r.field_presence="LEGACY_REQUIRED"),this.parent&&void 0===i.defaults[this.type]){var n=this.parent.get(this.type.split(".").pop());n&&n instanceof t&&n.group&&(r.message_encoding="DELIMITED")}return!0===this.getOption("packed")?r.repeated_field_encoding="PACKED":!1===this.getOption("packed")&&(r.repeated_field_encoding="EXPANDED"),r},s.prototype._resolveFeatures=function(t){return e.prototype._resolveFeatures.call(this,this._edition||t)},s.d=function(e,t,r,i){return"function"==typeof t?t=n.decorateType(t).name:t&&"object"==typeof t&&(t=n.decorateEnum(t).name),function(o,u){n.decorateType(o.constructor).add(new s(u,e,t,r,{default:i}))}},s._configure=function(e){t=e},et}function wt(){if(it)return rt;it=1,rt=i;var e=Ot();((i.prototype=Object.create(e.prototype)).constructor=i).className="OneOf";var t=bt(),r=gt();function i(t,r,i,n){if(Array.isArray(r)||(i=r,r=void 0),e.call(this,t,i),void 0!==r&&!Array.isArray(r))throw TypeError("fieldNames must be an Array");this.oneof=r||[],this.fieldsArray=[],this.comment=n}function n(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}return i.fromJSON=function(e,t){return new i(e,t.oneof,t.options,t.comment)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return r.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])},i.prototype.add=function(e){if(!(e instanceof t))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,n(this),this},i.prototype.remove=function(e){if(!(e instanceof t))throw TypeError("field must be a Field");var r=this.fieldsArray.indexOf(e);if(r<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(r,1),(r=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(r,1),e.partOf=null,this},i.prototype.onAdd=function(t){e.prototype.onAdd.call(this,t);for(var r=0;r<this.oneof.length;++r){var i=t.get(this.oneof[r]);i&&!i.partOf&&(i.partOf=this,this.fieldsArray.push(i))}n(this)},i.prototype.onRemove=function(t){for(var r,i=0;i<this.fieldsArray.length;++i)(r=this.fieldsArray[i]).parent&&r.parent.remove(r);e.prototype.onRemove.call(this,t)},Object.defineProperty(i.prototype,"isProto3Optional",{get:function(){if(null==this.fieldsArray||1!==this.fieldsArray.length)return!1;var e=this.fieldsArray[0];return null!=e.options&&!0===e.options.proto3_optional}}),i.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,n){r.decorateType(t.constructor).add(new i(n,e)),Object.defineProperty(t,n,{get:r.oneOfGetter(e),set:r.oneOfSetter(e)})}},rt}function Ot(){if(ot)return nt;ot=1,nt=s,s.className="ReflectionObject";const e=wt();var t,r=gt(),i={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY"},n={enum_type:"CLOSED",field_presence:"EXPLICIT",json_format:"LEGACY_BEST_EFFORT",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"EXPANDED",utf8_validation:"NONE"},o={enum_type:"OPEN",field_presence:"IMPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY"};function s(e,t){if(!r.isString(e))throw TypeError("name must be a string");if(t&&!r.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this._edition=null,this._defaultEdition="proto2",this._features={},this._featuresResolved=!1,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}return Object.defineProperties(s.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(".")}}}),s.prototype.toJSON=function(){throw Error()},s.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var r=e.root;r instanceof t&&r._handleAdd(this)},s.prototype.onRemove=function(e){var r=e.root;r instanceof t&&r._handleRemove(this),this.parent=null,this.resolved=!1},s.prototype.resolve=function(){return this.resolved||this.root instanceof t&&(this.resolved=!0),this},s.prototype._resolveFeaturesRecursive=function(e){return this._resolveFeatures(this._edition||e)},s.prototype._resolveFeatures=function(t){if(!this._featuresResolved){var r={};if(!t)throw new Error("Unknown edition for "+this.fullName);var s=Object.assign(this.options?Object.assign({},this.options.features):{},this._inferLegacyProtoFeatures(t));if(this._edition){if("proto2"===t)r=Object.assign({},n);else if("proto3"===t)r=Object.assign({},o);else{if("2023"!==t)throw new Error("Unknown edition: "+t);r=Object.assign({},i)}return this._features=Object.assign(r,s||{}),void(this._featuresResolved=!0)}if(this.partOf instanceof e){var u=Object.assign({},this.partOf._features);this._features=Object.assign(u,s||{})}else if(this.declaringField);else{if(!this.parent)throw new Error("Unable to find a parent for "+this.fullName);var a=Object.assign({},this.parent._features);this._features=Object.assign(a,s||{})}this.extensionField&&(this.extensionField._features=this._features),this._featuresResolved=!0}},s.prototype._inferLegacyProtoFeatures=function(){return{}},s.prototype.getOption=function(e){if(this.options)return this.options[e]},s.prototype.setOption=function(e,t,i){return this.options||(this.options={}),/^features\./.test(e)?r.setProperty(this.options,e,t,i):i&&void 0!==this.options[e]||(this.getOption(e)!==t&&(this.resolved=!1),this.options[e]=t),this},s.prototype.setParsedOption=function(e,t,i){this.parsedOptions||(this.parsedOptions=[]);var n=this.parsedOptions;if(i){var o=n.find(function(t){return Object.prototype.hasOwnProperty.call(t,e)});if(o){var s=o[e];r.setProperty(s,i,t)}else(o={})[e]=r.setProperty({},i,t),n.push(o)}else{var u={};u[e]=t,n.push(u)}return this},s.prototype.setOptions=function(e,t){if(e)for(var r=Object.keys(e),i=0;i<r.length;++i)this.setOption(r[i],e[r[i]],t);return this},s.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},s.prototype._editionToJSON=function(){if(this._edition&&"proto3"!==this._edition)return this._edition},s._configure=function(e){t=e},nt}function _t(){if(ut)return st;ut=1,st=i;var e=Ot();((i.prototype=Object.create(e.prototype)).constructor=i).className="Enum";var t=Pe(),r=gt();function i(t,r,i,n,o,s){if(e.call(this,t,i),r&&"object"!=typeof r)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=n,this.comments=o||{},this.valuesOptions=s,this._valuesFeatures={},this.reserved=void 0,r)for(var u=Object.keys(r),a=0;a<u.length;++a)"number"==typeof r[u[a]]&&(this.valuesById[this.values[u[a]]=r[u[a]]]=u[a])}return i.prototype._resolveFeatures=function(t){return t=this._edition||t,e.prototype._resolveFeatures.call(this,t),Object.keys(this.values).forEach(e=>{var t=Object.assign({},this._features);this._valuesFeatures[e]=Object.assign(t,this.valuesOptions&&this.valuesOptions[e]&&this.valuesOptions[e].features)}),this},i.fromJSON=function(e,t){var r=new i(e,t.values,t.options,t.comment,t.comments);return r.reserved=t.reserved,t.edition&&(r._edition=t.edition),r._defaultEdition="proto3",r},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return r.toObject(["edition",this._editionToJSON(),"options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},i.prototype.add=function(e,t,i,n){if(!r.isString(e))throw TypeError("name must be a string");if(!r.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return n&&(void 0===this.valuesOptions&&(this.valuesOptions={}),this.valuesOptions[e]=n||null),this.comments[e]=i||null,this},i.prototype.remove=function(e){if(!r.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.valuesOptions&&delete this.valuesOptions[e],this},i.prototype.isReservedId=function(e){return t.isReservedId(this.reserved,e)},i.prototype.isReservedName=function(e){return t.isReservedName(this.reserved,e)},st}function jt(){if(ft)return at;ft=1,at=function(n){for(var o,s=r.codegen(["m","w"],n.name+"$encode")("if(!w)")("w=Writer.create()"),u=n.fieldsArray.slice().sort(r.compareFieldsById),a=0;a<u.length;++a){var f=u[a].resolve(),h=n._fieldsArray.indexOf(f),l=f.resolvedType instanceof e?"int32":f.type,c=t.basic[l];o="m"+r.safeProp(f.name),f.map?(s("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",o,f.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",o)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(f.id<<3|2)>>>0,8|t.mapKey[f.keyType],f.keyType),void 0===c?s("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",h,o):s(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|c,l,o),s("}")("}")):f.repeated?(s("if(%s!=null&&%s.length){",o,o),f.packed&&void 0!==t.packed[l]?s("w.uint32(%i).fork()",(f.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",o)("w.%s(%s[i])",l,o)("w.ldelim()"):(s("for(var i=0;i<%s.length;++i)",o),void 0===c?i(s,f,h,o+"[i]"):s("w.uint32(%i).%s(%s[i])",(f.id<<3|c)>>>0,l,o)),s("}")):(f.optional&&s("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",o,f.name),void 0===c?i(s,f,h,o):s("w.uint32(%i).%s(%s)",(f.id<<3|c)>>>0,l,o))}return s("return w")};var e=_t(),t=mt(),r=gt();function i(e,t,r,i){return t.delimited?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",r,i,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",r,i,(t.id<<3|2)>>>0)}return at}var At=ct?lt:(ct=1,lt=function(){if(ht)return N.exports;ht=1;var e=N.exports=de();return e.build="light",e.load=function(t,r,i){return"function"==typeof r?(i=r,r=new e.Root):r||(r=new e.Root),r.load(t,i)},e.loadSync=function(t,r){return r||(r=new e.Root),r.loadSync(t)},e.encoder=jt(),e.decoder=Ue(),e.verifier=Me(),e.converter=He(),e.ReflectionObject=Ot(),e.Namespace=Pe(),e.Root=vt(),e.Enum=_t(),e.Type=yt(),e.Field=bt(),e.OneOf=wt(),e.MapField=Ce(),e.Service=qe(),e.Method=$e(),e.Message=Je(),e.wrappers=dt(),e.types=mt(),e.util=gt(),e.ReflectionObject._configure(e.Root),e.Namespace._configure(e.Type,e.Service,e.Enum),e.Root._configure(e.Type),e.Field._configure(e.Type),N.exports}());const Et=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),kt=e=>{class t extends At.Message{constructor(e){super(),((e,t)=>{if(t)for(const r of Object.keys(t)){const i=t[r];null!=i&&(e[r]=i)}})(this,e)}}const r=t;return r.$type=e,r.prototype.$type=e,r},Tt=e=>t.isLong(e),Nt=e=>e instanceof Uint8Array||ArrayBuffer.isView(e)&&"number"==typeof e.byteLength,St=e=>Object.prototype.hasOwnProperty.call(At.types.packed,e),xt=e=>{const t=e.resolve();return t.resolvedType instanceof At.Enum||St(t.type)},Rt=(e,t)=>t in e?e[t]:void 0,Bt=e=>{const t=e.resolve();return t.resolvedType instanceof At.Enum?0:(r=t.type,Object.prototype.hasOwnProperty.call(At.types.basic,r)?At.types.basic[t.type]:2);var r},It=(e,r)=>Tt(e)||"number"==typeof e||"string"==typeof e?e:Et(e)&&"number"==typeof e.low&&"number"==typeof e.high?new t(e.low,e.high,r):r?t.UZERO:t.ZERO,Lt=(e,t,r)=>{switch(t){case"double":return e.double(Number(r));case"float":return e.float(Number(r));case"int32":return e.int32(Number(r));case"uint32":return e.uint32(Number(r));case"sint32":return e.sint32(Number(r));case"fixed32":return e.fixed32(Number(r));case"sfixed32":return e.sfixed32(Number(r));case"int64":return e.int64(It(r,!1));case"uint64":return e.uint64(It(r,!0));case"sint64":return e.sint64(It(r,!1));case"fixed64":return e.fixed64(It(r,!0));case"sfixed64":return e.sfixed64(It(r,!1));case"bool":return e.bool(Boolean(r));case"string":return e.string(String(r));case"bytes":return e.bytes((e=>"string"==typeof e?e:Nt(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Array.isArray(e)?Uint8Array.from(e.filter(e=>"number"==typeof e)):new Uint8Array)(r));default:throw new TypeError(`Unsupported protobuf field type: ${t}`)}},Ft=(e,t,r)=>{if(t<0||e.pos+t>r)throw RangeError(`index out of range: ${e.pos} + ${t} > ${r}`)},Dt=(e,t)=>{const r=e.uint32();return Ft(e,r,t),r},Pt=(e,t,r)=>{const i=e.len;e.len=r;try{switch(t){case 0:return void e.skip();case 1:return Ft(e,8,r),void e.skip(8);case 2:{const t=Dt(e,r);return void e.skip(t)}case 5:return Ft(e,4,r),void e.skip(4);default:throw new Error(`Unsupported protobuf wire type: ${String(t)}`)}}finally{e.len=i}},Ct=(e,t,r)=>{const i=t.resolve(),n=i.resolvedType;if(n instanceof At.Type){const t=e.fork();return qt(n,Et(r)?r:{},t),t.ldelim(),e}return n instanceof At.Enum?(e.int32("number"==typeof r?r:Number(r)),e):Lt(e,i.type,r)},$t=(e,t,r)=>{if(0===r.length)return e;const i=t.resolve();if(St(i.type)&&t.packed){e.uint32(t.id<<3|2).fork();for(const i of r)Ct(e,t,i);return e.ldelim(),e}const n=Bt(t);for(const o of r)e.uint32(t.id<<3|n),Ct(e,t,o);return e},qt=(e,t,r=At.Writer.create())=>{const i=e.fieldsArray.slice().sort(At.util.compareFieldsById);for(const n of i){const e=Rt(t,n.name);null!=e&&(n.repeated?$t(r,n,Array.isArray(e)?e:[]):(r.uint32(n.id<<3|Bt(n)),Ct(r,n,e)))}return r},Jt=(e,t,r,i)=>{const n=t.resolve(),o=n.resolvedType;return o instanceof At.Type?2!==r?void Pt(e,r,i):Ut(o,e,Dt(e,i)):o instanceof At.Enum?e.int32():((e,t)=>{switch(t){case"double":return e.double();case"float":return e.float();case"int32":return e.int32();case"uint32":return e.uint32();case"sint32":return e.sint32();case"fixed32":return e.fixed32();case"sfixed32":return e.sfixed32();case"int64":return e.int64();case"uint64":return e.uint64();case"sint64":return e.sint64();case"fixed64":return e.fixed64();case"sfixed64":return e.sfixed64();case"bool":return e.bool();case"string":return e.string();case"bytes":return e.bytes();default:throw new TypeError(`Unsupported protobuf field type: ${t}`)}})(e,n.type)},Ut=(e,t,r)=>{const i=t instanceof At.Reader?t:At.Reader.create(t),n=void 0===r?i.len:i.pos+r,o=(e=>{const t={};for(const r of e.fieldsArray)r.repeated&&(t[r.name]=[]);return t})(e),s=e.fieldsById;for(;i.pos<n;){const t=i.pos,r=i.uint32(),a=s[r>>>3],f=7&r;try{if(!a){Pt(i,f,n);continue}if(a.repeated){const e=Array.isArray(o[a.name])?o[a.name]:[];if(xt(a)&&2===f){const t=Dt(i,n)+i.pos;for(;i.pos<t;)e.push(Jt(i,a,0,t))}else{const t=Jt(i,a,f,n);void 0!==t&&e.push(t)}o[a.name]=e;continue}const e=Jt(i,a,f,n);void 0!==e&&(o[a.name]=e)}catch(u){if(u instanceof RangeError){const o=a?`${a.name}#${a.id}`:`unknown#${r>>>3}`;throw new RangeError(`${u.message}; protobufType=${e.fullName}; field=${o}; tag=${r}; wireType=${f}; tagPosition=${t}; readerPosition=${i.pos}; messageEnd=${n}`)}throw u}}return o},Mt=(e,t)=>t?.longs===String?e.toString():t?.longs===Number?e.toNumber():e,zt=(e,t)=>{const r=e.resolve();if(r.resolvedType instanceof At.Type)return null;if(r.resolvedType instanceof At.Enum){if(t?.enums===String){return r.resolvedType.valuesById[r.typeDefault]??r.typeDefault}return r.typeDefault}return"bytes"===r.type?t?.bytes===String?"":t?.bytes===Array?[]:new Uint8Array:r.long&&Tt(r.typeDefault)?Mt(r.typeDefault,t):r.typeDefault},Zt=(e,t,r)=>{const i=e.resolve();if(void 0!==t)return i.resolvedType instanceof At.Type?Et(t)?Ht(i.resolvedType,t,r):t:i.resolvedType instanceof At.Enum?r?.enums===String&&"number"==typeof t?i.resolvedType.valuesById[t]??t:t:i.long&&Tt(t)?Mt(t,r):"bytes"===i.type&&Nt(t)?((e,t)=>t?.bytes===String?At.util.base64.encode(e,0,e.length):t?.bytes===Array?Array.prototype.slice.call(e):e)(t,r):t},Ht=(e,t,r)=>{const i={};for(const n of e.fieldsArray.slice().sort(At.util.compareFieldsById)){const e=Rt(t,n.name);n.repeated?Array.isArray(e)?i[n.name]=e.map(e=>Zt(n,e,r)):(r?.arrays||r?.defaults)&&(i[n.name]=[]):null==e?r?.defaults&&(i[n.name]=zt(n,r)):i[n.name]=Zt(n,e,r)}return i},Wt=e=>{const t=e;t.__reflectionCodecInstalled||(t.__reflectionCodecInstalled=!0,e.encode=(t,r)=>qt(e,Et(t)?t:{},r),e.decode=(t,r)=>Ut(e,t,r),e.fromObject=e=>Et(e)?e:{},e.toObject=(t,r)=>Ht(e,Et(t)?t:{},r),e.create=e=>e?{...e}:{},e.verify=()=>null)},Vt=e=>{Wt(e);for(const t of e.nestedArray)if(t instanceof At.Type)Vt(t);else if(t instanceof At.Namespace)for(const e of t.nestedArray)e instanceof At.Type&&Vt(e)},Gt=e=>{for(const t of e.nestedArray)t instanceof At.Type?Vt(t):t instanceof At.Namespace&&Gt(t)};exports.Long=t,exports.encodeWithReflection=qt,exports.installReflectionCodecInNamespace=Gt,exports.installReflectionCodecRecursive=Vt,exports.installReflectionRuntime=()=>{const e=At.Type;e.__reflectionRuntimeInstalled||(e.generateConstructor=e=>()=>kt(e),At.Type.prototype.setup=function(){return Wt(this),this},At.Type.prototype.create=function(e){return e?{...e}:{}},At.Type.prototype.encode=function(e,t){return qt(this,Et(e)?e:{},t)},At.Type.prototype.decode=function(e,t){return Ut(this,e,t)},At.Type.prototype.fromObject=function(e){return Et(e)?e:{}},At.Type.prototype.toObject=function(e,t){return Ht(this,Et(e)?e:{},t)},At.Type.prototype.verify=function(){return null},e.__reflectionRuntimeInstalled=!0)},exports.lightExports=At;