easemob-websdk 5.1.0 → 5.1.2

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 (100) hide show
  1. package/bundle/im-sdk-web.iife.js +1 -1
  2. package/chat-client.d.ts +42 -8
  3. package/chunks/{chat-manager-D_KF5qM1.cjs → chat-manager-BFd2Z4oY.cjs} +1 -1
  4. package/chunks/{chat-manager-DCqgMxLm.js → chat-manager-CId_M_e5.js} +1 -1
  5. package/chunks/common-BvlDAw4a.js +1 -0
  6. package/chunks/common-tHGz9VBk.cjs +1 -0
  7. package/chunks/event-system-B62vbKqG.js +1 -0
  8. package/chunks/{event-system-COBJFEIq.cjs → event-system-TYhmgy4K.cjs} +1 -1
  9. package/chunks/group-user-info-resolver-B-dyr__b.cjs +1 -0
  10. package/chunks/group-user-info-resolver-DMccCqez.js +1 -0
  11. package/chunks/index-BBFJYOM8.js +1 -0
  12. package/chunks/{index-Dvvh1nf6.cjs → index-DJPAjXAp.cjs} +1 -1
  13. package/chunks/index-DtWkVcfb.cjs +1 -0
  14. package/chunks/index-l_BUKi77.js +1 -0
  15. package/chunks/light-BcQg8h2W.cjs +1 -0
  16. package/chunks/light-DImBnNes.js +1 -0
  17. package/chunks/{reflection-proto-codec-CjRraw85.js → reflection-proto-codec-7r8Sei3y.js} +1 -1
  18. package/chunks/{reflection-proto-codec-BerStgkC.cjs → reflection-proto-codec-CwrIKT1L.cjs} +1 -1
  19. package/chunks/{session-list-query-rynxSxtv.js → session-list-query-Cvr6rlme.js} +1 -1
  20. package/chunks/{session-list-query-C4OQMvPf.cjs → session-list-query-Dslj2k3t.cjs} +1 -1
  21. package/chunks/{user-info-DfbCp80h.js → user-info-AlshAvdy.js} +1 -1
  22. package/chunks/{user-info-DsDDTJrw.cjs → user-info-DH3aE1gm.cjs} +1 -1
  23. package/config/timeouts.d.ts +11 -0
  24. package/core/connection/connection-manager.d.ts +18 -1
  25. package/core/connection/login-deadline.d.ts +22 -0
  26. package/core/events/event-hub.d.ts +1 -0
  27. package/core/index.d.ts +8 -1
  28. package/core/message/attachment-downloader.d.ts +1 -1
  29. package/core/session-list-sync/session-list-sync-controller.d.ts +5 -0
  30. package/index.cjs +1 -1
  31. package/index.d.ts +11 -9
  32. package/index.js +2 -2
  33. package/log.d.ts +27 -0
  34. package/managers/chat/index.cjs +1 -1
  35. package/managers/chat/index.js +1 -1
  36. package/managers/chat-thread/index.cjs +1 -1
  37. package/managers/chat-thread/index.js +1 -1
  38. package/managers/chatroom/chatroom.d.ts +1 -1
  39. package/managers/chatroom/index.cjs +1 -1
  40. package/managers/chatroom/index.js +1 -1
  41. package/managers/chatroom-manager.d.ts +6 -1
  42. package/managers/contact/index.cjs +1 -1
  43. package/managers/contact/index.js +1 -1
  44. package/managers/group/index.cjs +1 -1
  45. package/managers/group/index.js +1 -1
  46. package/managers/presence/index.cjs +1 -1
  47. package/managers/presence/index.js +1 -1
  48. package/managers/push/index.cjs +1 -1
  49. package/managers/push/index.d.ts +2 -0
  50. package/managers/push/index.js +1 -1
  51. package/managers/push/native-push-controller.d.ts +62 -0
  52. package/managers/push/native-push-normalizer.d.ts +15 -0
  53. package/managers/push-manager.d.ts +63 -4
  54. package/managers/user-info/index.cjs +1 -1
  55. package/managers/user-info/index.js +1 -1
  56. package/managers/user-info-manager.d.ts +3 -2
  57. package/message/combine-payload-codec.d.ts +2 -1
  58. package/package.json +1 -1
  59. package/platform/index.d.ts +1 -1
  60. package/platform/request/default-request-adapter.d.ts +7 -0
  61. package/platform/socket/default-socket-adapter.d.ts +6 -0
  62. package/platform/types.d.ts +22 -2
  63. package/platform/upload/legacy-multipart-upload.d.ts +14 -0
  64. package/platform/upload/legacy-simple-upload.d.ts +3 -0
  65. package/protocol/msync/codec.d.ts +5 -0
  66. package/rest/client.d.ts +0 -4
  67. package/rest/contact-management.d.ts +1 -0
  68. package/rest/dns-config.d.ts +6 -1
  69. package/rest/error-maps/chatroom.d.ts +6 -0
  70. package/rest/error-maps/common.d.ts +3 -0
  71. package/rest/error-maps/contact.d.ts +8 -3
  72. package/rest/error-maps/push.d.ts +13 -1
  73. package/rest/error-maps/user-info.d.ts +51 -3
  74. package/rest/service-url.d.ts +6 -0
  75. package/types/chat-client.d.ts +16 -9
  76. package/types/chatroom.d.ts +3 -34
  77. package/types/event-system.d.ts +52 -1
  78. package/types/index.d.ts +5 -7
  79. package/types/log.d.ts +19 -0
  80. package/types/manager.d.ts +31 -0
  81. package/types/push.d.ts +77 -0
  82. package/upload/attachment-uploader.d.ts +1 -5
  83. package/upload/multipart-upload.d.ts +4 -14
  84. package/upload/simple-upload.d.ts +4 -3
  85. package/upload/types.d.ts +2 -1
  86. package/utils/error-codes.generated.d.ts +1 -0
  87. package/utils/log-reporter.d.ts +1 -7
  88. package/utils/logger.d.ts +28 -2
  89. package/validators/chat-client.d.ts +22 -50
  90. package/validators/message-create.d.ts +18 -18
  91. package/chunks/common-BIpcR2uQ.cjs +0 -1
  92. package/chunks/common-D_DfwSd3.js +0 -1
  93. package/chunks/event-system-D6IJA0C4.js +0 -1
  94. package/chunks/group-user-info-resolver-Ds35Z1Uf.cjs +0 -1
  95. package/chunks/group-user-info-resolver-lEtRdWli.js +0 -1
  96. package/chunks/index-BmwQgZ3E.js +0 -1
  97. package/chunks/index-BsIqq7LU.cjs +0 -1
  98. package/chunks/index-CFMcR5a_.js +0 -1
  99. package/chunks/light-Dg9A1Xmd.js +0 -1
  100. package/chunks/light-dJjIln5b.cjs +0 -1
@@ -1 +0,0 @@
1
- var e,t,r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i={exports:{}},n={},o={};function s(){if(t)return e;return t=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(a){o&&(o=!1,s(a))}})},e}var a,u,f,l,h,p,c,d={};function y(){return c?p:(c=1,p=function(){return null})}var v,m,g,b,O,_,w,j,A,k,E,S,T,N,x={};function R(){return _||(_=1,function(){var e,t=o;function i(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 n(e){function t(e,r){if(!(this instanceof t))return new t(e,r);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),r&&i(this,r)}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=s(),t.base64=(a||(a=1,function(){var e=d;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=[],a=0,u=0;r<i;){var f=e[r++];switch(u){case 0:s[a++]=t[f>>2],n=(3&f)<<4,u=1;break;case 1:s[a++]=t[n|f>>4],n=(15&f)<<2,u=2;break;case 2:s[a++]=t[n|f>>6],s[a++]=t[63&f],u=0}a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),a=0)}return u&&(s[a++]=t[n],s[a++]=61,1===u&&(s[a++]=61)),o?(a&&o.push(String.fromCharCode.apply(String,s.slice(0,a))),o.join("")):String.fromCharCode.apply(String,s.slice(0,a))};var n="invalid encoding";e.decode=function(e,t,i){for(var o,s=i,a=0,u=0;u<e.length;){var f=e.charCodeAt(u++);if(61===f&&a>1)break;if(void 0===(f=r[f]))throw Error(n);switch(a){case 0:o=f,a=1;break;case 1:t[i++]=o<<2|(48&f)>>4,o=f,a=2;break;case 2:t[i++]=(15&o)<<4|(60&f)>>2,o=f,a=3;break;case 3:t[i++]=(3&o)<<6|f,a=0}}if(1===a)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)}}()),d),t.EventEmitter=function(){if(f)return u;function e(){this._listeners={}}return f=1,u=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},u}(),t.float=function(){if(h)return l;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 a(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:a,e.readFloatBE=i?a: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 a(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:a,e.readDoubleBE=i?a: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 a;if(i<22250738585072014e-324)e((a=i/5e-324)>>>0,n,o+t),e((s<<31|a/4294967296)>>>0,n,o+r);else{var u=Math.floor(Math.log(i)/Math.LN2);1024===u&&(u=1023),e(4503599627370496*(a=i*Math.pow(2,-u))>>>0,n,o+t),e((s<<31|u+1023<<20|1048576*a&1048575)>>>0,n,o+r)}}}function s(e,t,r,i,n){var o=e(i,n+t),s=e(i,n+r),a=2*(s>>31)+1,u=s>>>20&2047,f=4294967296*(1048575&s)+o;return 2047===u?f?NaN:a*(1/0):0===u?5e-324*a*f:a*Math.pow(2,u-1075)*(f+4503599627370496)}e.writeDoubleLE=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 h=1,l=e(e)}(),t.inquire=y(),t.utf8=(v||(v=1,(e=x).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}),x),t.pool=g?m:(g=1,m=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 a=t.call(o,s,s+=r);return 7&s&&(s=1+(7|s)),a}}),t.LongBits=function(){if(O)return b;O=1,b=t;var e=R();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},b}(),t.isNode=Boolean(void 0!==r&&r&&r.process&&r.process.versions&&r.process.versions.node),t.global=t.isNode&&r||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||o,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=i,t.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},t.newError=n,t.ProtocolError=n("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}}()),o}function B(){if(j)return w;j=1,w=u;var e,t=R(),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 a(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function u(){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(u.create=function(){return new e})()}:function(){return new u}};function l(e,t,r){t[r]=255&e}function h(e,t){this.len=e,this.next=void 0,this.val=t}function p(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function c(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}u.create=f(),u.alloc=function(e){return new t.Array(e)},t.Array!==Array&&(u.alloc=t.pool(u.alloc,t.Array.prototype.subarray)),u.prototype._push=function(e,t,r){return this.tail=this.tail.next=new o(e,t,r),this.len+=t,this},h.prototype=Object.create(o.prototype),h.prototype.fn=function(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e},u.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new h((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},u.prototype.int32=function(e){return e<0?this._push(p,10,r.fromNumber(e)):this.uint32(e)},u.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},u.prototype.uint64=function(e){var t=r.from(e);return this._push(p,t.length(),t)},u.prototype.int64=u.prototype.uint64,u.prototype.sint64=function(e){var t=r.from(e).zzEncode();return this._push(p,t.length(),t)},u.prototype.bool=function(e){return this._push(l,1,e?1:0)},u.prototype.fixed32=function(e){return this._push(c,4,e>>>0)},u.prototype.sfixed32=u.prototype.fixed32,u.prototype.fixed64=function(e){var t=r.from(e);return this._push(c,4,t.lo)._push(c,4,t.hi)},u.prototype.sfixed64=u.prototype.fixed64,u.prototype.float=function(e){return this._push(t.float.writeFloatLE,4,e)},u.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 u.prototype.bytes=function(e){var r=e.length>>>0;if(!r)return this._push(l,1,0);if(t.isString(e)){var n=u.alloc(r=i.length(e));i.decode(e,n,0),e=n}return this.uint32(r)._push(d,r,e)},u.prototype.string=function(e){var t=n.length(e);return t?this.uint32(t)._push(n.write,t,e):this._push(l,1,0)},u.prototype.fork=function(){return this.states=new a(this),this.head=this.tail=new o(s,0,0),this.len=0,this},u.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},u.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},u.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},u._configure=function(t){e=t,u.create=f(),e._configure()},w}function F(){if(S)return E;S=1,E=o;var e,t=R(),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")},a=function(){return t.Buffer?function(r){return(o.create=function(r){return t.Buffer.isBuffer(r)?new e(r):s(r)})(r)}:s};function u(){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 l(){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=a(),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=a(),e._configure();var i=t.Long?"toLong":"toNumber";t.merge(o.prototype,{int64:function(){return u.call(this)[i](!1)},uint64:function(){return u.call(this)[i](!0)},sint64:function(){return u.call(this).zzDecode()[i](!1)},fixed64:function(){return l.call(this)[i](!0)},sfixed64:function(){return l.call(this)[i](!1)}})},E}var I,P,D,L,C,J,$={};function q(){return D||(D=1,$.Service=function(){if(P)return I;P=1,I=t;var e=R();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 a=this;if(!s)return e.asPromise(t,a,r,i,n,o);if(a.rpcImpl)try{return a.rpcImpl(r,i[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(e,t){if(e)return a.emit("error",e,r),s(e);if(null!==t){if(!(t instanceof n))try{t=n[a.responseDelimited?"decodeDelimited":"decode"](t)}catch(i){return a.emit("error",i,r),s(i)}return a.emit("data",t,r),s(null,t)}a.end(!0)})}catch(u){return a.emit("error",u,r),void setTimeout(function(){s(u)},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},I}()),$}function M(){return C?L:(C=1,L={})}function z(){return J||(J=1,function(){var e=n;function t(){e.util._configure(),e.Writer._configure(e.BufferWriter),e.Reader._configure(e.BufferReader)}e.build="minimal",e.Writer=B(),e.BufferWriter=function(){if(k)return A;k=1,A=r;var e=B();(r.prototype=Object.create(e.prototype)).constructor=r;var t=R();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(),A}(),e.Reader=F(),e.BufferReader=function(){if(N)return T;N=1,T=r;var e=F();(r.prototype=Object.create(e.prototype)).constructor=r;var t=R();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(),T}(),e.util=R(),e.rpc=q(),e.roots=M(),e.configure=t,t()}()),n}var U,H,W,G,X={},K={exports:{}};var V,Q,Y,Z,ee,te,re,ie,ne,oe,se,ae,ue,fe,le,he={};function pe(){if(Y)return Q;Y=1,Q=u;var e=Ve();((u.prototype=Object.create(e.prototype)).constructor=u).className="Namespace";var t,r,i,n=Xe(),o=We(),s=Ke();function a(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 u(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 u.fromJSON=function(e,t){return new u(e,t.options).addJSON(t.nested)},u.arrayToJSON=a,u.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},u.isReservedName=function(e,t){if(e)for(var r=0;r<e.length;++r)if(e[r]===t)return!0;return!1},Object.defineProperty(u.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=o.toArray(this.nested))}}),u.prototype.toJSON=function(e){return o.toObject(["options",this.options,"nested",a(this.nestedArray,e)])},u.prototype.addJSON=function(e){if(e)for(var o,s=Object.keys(e),a=0;a<s.length;++a)o=e[s[a]],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:u.fromJSON)(s[a],o));return this},u.prototype.get=function(e){return this.nested&&this.nested[e]||null},u.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof i)return this.nested[e].values;throw Error("no such enum: "+e)},u.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 u))throw TypeError("object must be a valid nested object");if(this.nested){var o=this.get(e.name);if(o){if(!(o instanceof u&&e instanceof u)||o instanceof t||o instanceof r)throw Error("duplicate name '"+e.name+"' in "+this);for(var a=o.nestedArray,l=0;l<a.length;++l)e.add(a[l]);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 h=this;h=h.parent;)h._needsRecursiveFeatureResolution=!0,h._needsRecursiveResolve=!0;return e.onAdd(this),f(this)},u.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)},u.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 u))throw Error("path conflicts with non-namespace objects")}else r.add(r=new u(i))}return t&&r.addJSON(t),r},u.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 u?e[t++].resolveAll():e[t++].resolve();return this._needsRecursiveResolve=!1,this},u.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},u.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},u.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 u&&(e=e.slice(1),i=r._lookupImpl(e,e.join(".")));else for(var n=0;n<this.nestedArray.length;++n)this._nestedArray[n]instanceof u&&(r=this._nestedArray[n]._lookupImpl(e,t))&&(i=r);return this._lookupCache[t]=i,i},u.prototype.lookupType=function(e){var r=this.lookup(e,[t]);if(!r)throw Error("no such type: "+e);return r},u.prototype.lookupEnum=function(e){var t=this.lookup(e,[i]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},u.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},u.prototype.lookupService=function(e){var t=this.lookup(e,[r]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},u._configure=function(e,n,o){t=e,r=n,i=o},Q}function ce(){if(ee)return Z;ee=1,Z=i;var e=Xe();((i.prototype=Object.create(e.prototype)).constructor=i).className="MapField";var t=Ge(),r=We();function i(t,i,n,o,s,a){if(e.call(this,t,i,o,void 0,void 0,s,a),!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))}},Z}function de(){if(re)return te;re=1,te=r;var e=Ve();((r.prototype=Object.create(e.prototype)).constructor=r).className="Method";var t=We();function r(r,i,n,o,s,a,u,f,l){if(t.isObject(s)?(u=s,s=a=void 0):t.isObject(a)&&(u=a,a=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,u),this.type=i||"rpc",this.requestType=n,this.requestStream=!!s||void 0,this.responseType=o,this.responseStream=!!a||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=f,this.parsedOptions=l}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))},te}function ye(){if(ne)return ie;ne=1,ie=n;var e=pe();((n.prototype=Object.create(e.prototype)).constructor=n).className="Service";var t=de(),r=We(),i=q();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),a=0;a<this.methodsArray.length;++a){var u=r.lcFirst((o=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"");s[u]=r.codegen(["r","c"],r.isReserved(u)?u+"_":u)("return this.rpcCall(m,q,s,r,c)")({m:o,q:o.resolvedRequestType.ctor,s:o.resolvedResponseType.ctor})}return s},ie}function ve(){if(se)return oe;se=1,oe=t;var e=R();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)},oe}function me(){if(ue)return ae;ue=1,ae=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 a=n._fieldsArray[s].resolve(),u=a.resolvedType instanceof e?"int32":a.type,f="m"+r.safeProp(a.name);o("case %i: {",a.id),a.map?(o("if(%s===util.emptyObject)",f)("%s={}",f)("var c2 = r.uint32()+r.pos"),void 0!==t.defaults[a.keyType]?o("k=%j",t.defaults[a.keyType]):o("k=null"),void 0!==t.defaults[u]?o("value=%j",t.defaults[u]):o("value=null"),o("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",a.keyType)("case 2:"),void 0===t.basic[u]?o("value=types[%i].decode(r,r.uint32())",s):o("value=r.%s()",u),o("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==t.long[a.keyType]?o('%s[typeof k==="object"?util.longToHash(k):k]=value',f):o("%s[k]=value",f)):a.repeated?(o("if(!(%s&&%s.length))",f,f)("%s=[]",f),void 0!==t.packed[u]&&o("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",f,u)("}else"),void 0===t.basic[u]?o(a.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,u)):void 0===t.basic[u]?o(a.delimited?"%s=types[%i].decode(r,undefined,((t&~7)|4))":"%s=types[%i].decode(r,r.uint32())",f,s):o("%s=r.%s()",f,u),o("break")("}")}for(o("default:")("r.skipType(t&7)")("break")("}")("}"),s=0;s<n._fieldsArray.length;++s){var l=n._fieldsArray[s];l.required&&o("if(!m.hasOwnProperty(%j))",l.name)("throw util.ProtocolError(%j,{instance:m})",i(l))}return o("return m")};var e=Qe(),t=Ge(),r=We();function i(e){return"missing required '"+e.name+"'"}return ae}function ge(){if(le)return fe;le=1,fe=function(e){var o=t.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),s=e.oneofsArray,a={};s.length&&o("var p={}");for(var u=0;u<e.fieldsArray.length;++u){var f=e._fieldsArray[u].resolve(),l="m"+t.safeProp(f.name);if(f.optional&&o("if(%s!=null&&m.hasOwnProperty(%j)){",l,f.name),f.map)o("if(!util.isObject(%s))",l)("return%j",r(f,"object"))("var k=Object.keys(%s)",l)("for(var i=0;i<k.length;++i){"),n(o,f,"k[i]"),i(o,f,u,l+"[k[i]]")("}");else if(f.repeated)o("if(!Array.isArray(%s))",l)("return%j",r(f,"array"))("for(var i=0;i<%s.length;++i){",l),i(o,f,u,l+"[i]")("}");else{if(f.partOf){var h=t.safeProp(f.partOf.name);1===a[f.partOf.name]&&o("if(p%s===1)",h)("return%j",f.partOf.name+": multiple values"),a[f.partOf.name]=1,o("p%s=1",h)}i(o,f,u,l)}f.optional&&o("}")}return o("return null")};var e=Qe(),t=We();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),a=0;a<s.length;++a)t("case %i:",i.resolvedType.values[s[a]]);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 fe}var be,Oe={};function _e(){return be||(be=1,function(){var e=Oe,t=Qe(),r=We();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,a=Object.keys(s),u=0;u<a.length;++u)s[a[u]]!==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:",a[u])("case %i:",s[a[u]])("m%s=%j",n,s[a[u]])("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 a=n[s].resolve(),u=r.safeProp(a.name);a.map?(o("if(d%s){",u)('if(typeof d%s!=="object")',u)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",u)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",u),i(o,a,s,u+"[ks[i]]")("}")("}")):a.repeated?(o("if(d%s){",u)("if(!Array.isArray(d%s))",u)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",u)("for(var i=0;i<d%s.length;++i){",u),i(o,a,s,u+"[i]")("}")("}")):(a.resolvedType instanceof t||o("if(d%s!=null){",u),i(o,a,s,u),a.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=[],a=[],u=[],f=0;f<i.length;++f)i[f].partOf||(i[f].resolve().repeated?s:i[f].map?a:u).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(a.length){for(o("if(o.objects||o.defaults){"),f=0;f<a.length;++f)o("d%s={}",r.safeProp(a[f].name));o("}")}if(u.length){for(o("if(o.defaults){"),f=0;f<u.length;++f){var l=u[f],h=r.safeProp(l.name);if(l.resolvedType instanceof t)o("d%s=o.enums===String?%j:%j",h,l.resolvedType.valuesById[l.typeDefault],l.typeDefault);else if(l.long)o("if(util.Long){")("var n=new util.Long(%i,%i,%j)",l.typeDefault.low,l.typeDefault.high,l.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",h)("}else")("d%s=o.longs===String?%j:%i",h,l.typeDefault.toString(),l.typeDefault.toNumber());else if(l.bytes){var p="["+Array.prototype.slice.call(l.typeDefault).join(",")+"]";o("if(o.bytes===String)d%s=%j",h,String.fromCharCode.apply(String,l.typeDefault))("else{")("d%s=%s",h,p)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",h,h)("}")}else o("d%s=%j",h,l.typeDefault)}o("}")}var c=!1;for(f=0;f<i.length;++f){l=i[f];var d=e._fieldsArray.indexOf(l);h=r.safeProp(l.name);l.map?(c||(c=!0,o("var ks2")),o("if(m%s&&(ks2=Object.keys(m%s)).length){",h,h)("d%s={}",h)("for(var j=0;j<ks2.length;++j){"),n(o,l,d,h+"[ks2[j]]")("}")):l.repeated?(o("if(m%s&&m%s.length){",h,h)("d%s=[]",h)("for(var j=0;j<m%s.length;++j){",h),n(o,l,d,h+"[j]")("}")):(o("if(m%s!=null&&m.hasOwnProperty(%j)){",h,l.name),n(o,l,d,h),l.partOf&&o("if(o.oneofs)")("d%s=%j",r.safeProp(l.partOf.name),l.name)),o("}")}return o("return d")}}()),Oe}var we,je,Ae,ke,Ee,Se,Te,Ne,xe,Re,Be,Fe,Ie,Pe,De,Le,Ce,Je,$e,qe,Me={};function ze(){return we||(we=1,e=Me,t=ve(),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)}}),Me;var e,t}function Ue(){if(Ae)return je;Ae=1,je=y;var e=pe();((y.prototype=Object.create(e.prototype)).constructor=y).className="Type";var t=Qe(),r=Ke(),i=Xe(),n=ce(),o=ye(),s=ve(),a=F(),u=B(),f=We(),l=Ye(),h=me(),p=ge(),c=_e(),d=ze();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,a){var u=new y(s,a.options);u.extensions=a.extensions,u.reserved=a.reserved;for(var f=Object.keys(a.fields),l=0;l<f.length;++l)u.add((void 0!==a.fields[f[l]].keyType?n.fromJSON:i.fromJSON)(f[l],a.fields[f[l]]));if(a.oneofs)for(f=Object.keys(a.oneofs),l=0;l<f.length;++l)u.add(r.fromJSON(f[l],a.oneofs[f[l]]));if(a.nested)for(f=Object.keys(a.nested),l=0;l<f.length;++l){var h=a.nested[f[l]];u.add((void 0!==h.id?i.fromJSON:void 0!==h.fields?y.fromJSON:void 0!==h.values?t.fromJSON:void 0!==h.methods?o.fromJSON:e.fromJSON)(f[l],h))}return a.extensions&&a.extensions.length&&(u.extensions=a.extensions),a.reserved&&a.reserved.length&&(u.reserved=a.reserved),a.group&&(u.group=!0),a.comment&&(u.comment=a.comment),a.edition&&(u._edition=a.edition),u._defaultEdition="proto3",u},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=l(this)({Writer:u,types:t,util:f}),this.decode=h(this)({Reader:a,types:t,util:f}),this.verify=p(this)({types:t,util:f}),this.fromObject=c.fromObject(this)({types:t,util:f}),this.toObject=c.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 a||(e=a.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)}},je}function He(){if(Ee)return ke;Ee=1,ke=u;var e=pe();((u.prototype=Object.create(e.prototype)).constructor=u).className="Root";var t,r,i,n=Xe(),o=Qe(),s=Ke(),a=We();function u(t){e.call(this,"",t),this.deferred=[],this.files=[],this._edition="proto2",this._fullyQualifiedObjects={}}function f(){}u.fromJSON=function(e,t){return t||(t=new u),e.options&&t.setOptions(e.options),t.addJSON(e.nested).resolveAll()},u.prototype.resolvePath=a.path.resolve,u.prototype.fetch=a.fetch,u.prototype.load=function e(t,n,o){"function"==typeof n&&(o=n,n=void 0);var s=this;if(!o)return a.asPromise(e,s,t,n);var u=o===f;function l(e,t){if(o){if(u)throw e;t&&t.resolveAll();var r=o;o=null,r(e,t)}}function h(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var r=e.substring(t);if(r in i)return r}return null}function p(e,t){try{if(a.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),a.isString(t)){r.filename=e;var i,o=r(t,s,n),f=0;if(o.imports)for(;f<o.imports.length;++f)(i=h(o.imports[f])||s.resolvePath(e,o.imports[f]))&&c(i);if(o.weakImports)for(f=0;f<o.weakImports.length;++f)(i=h(o.weakImports[f])||s.resolvePath(e,o.weakImports[f]))&&c(i,!0)}else s.setOptions(t.options).addJSON(t.nested)}catch(p){l(p)}u||d||l(null,s)}function c(e,t){if(e=h(e)||e,!(s.files.indexOf(e)>-1))if(s.files.push(e),e in i)u?p(e,i[e]):(++d,setTimeout(function(){--d,p(e,i[e])}));else if(u){var r;try{r=a.fs.readFileSync(e).toString("utf8")}catch(n){return void(t||l(n))}p(e,r)}else++d,s.fetch(e,function(r,i){--d,o&&(r?t?d||l(null,s):l(r):p(e,i))})}var d=0;a.isString(t)&&(t=[t]);for(var y,v=0;v<t.length;++v)(y=s.resolvePath("",t[v]))&&c(y);return u?(s.resolveAll(),s):(d||l(null,s),s)},u.prototype.loadSync=function(e,t){if(!a.isNode)throw Error("not supported");return this.load(e,t,f)},u.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 l=/^[A-Z]/;function h(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 u.prototype._handleAdd=function(e){if(e instanceof n)void 0===e.extend||e.extensionField||h(0,e)||this.deferred.push(e);else if(e instanceof o)l.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;)h(0,this.deferred[r])?this.deferred.splice(r,1):++r;for(var i=0;i<e.nestedArray.length;++i)this._handleAdd(e._nestedArray[i]);l.test(e.name)&&(e.parent[e.name]=e)}(e instanceof t||e instanceof o||e instanceof n)&&(this._fullyQualifiedObjects[e.fullName]=e)},u.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)l.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]);l.test(t.name)&&delete t.parent[t.name]}delete this._fullyQualifiedObjects[t.fullName]},u._configure=function(e,n,o){t=e,r=n,i=o},ke}function We(){if(Se)return K.exports;Se=1;var e,t,r,i,n,o=K.exports=R(),a=M();o.codegen=function(){if(H)return U;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),a=new Array(s.length+1),u=new Array(s.length),f=0;f<s.length;)a[f]=s[f],u[f]=t[s[f++]];return a[f]=r,Function.apply(null,a).apply(null,u)}return Function(r)()}for(var l=new Array(arguments.length-1),h=0;h<l.length;)l[h]=arguments[++h];if(h=0,t=t.replace(/%([%dfijs])/g,function(e,t){var r=l[h++];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"%"}),h!==l.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 H=1,U=e,e.verbose=!1,U}(),o.fetch=function(){if(G)return W;G=1,W=r;var e=s(),t=y()("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()},W}(),o.path=(V||(V=1,i=(r=he).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)}),he),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,f=/"/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(f,'\\"')+'"]':"."+e},o.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var l=/_([a-z])/g;o.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(l,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=Ue());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=Qe());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 a.decorated||(a.decorated=new(He()))}}),K.exports}function Ge(){return Te||(Te=1,function(){var e=X,t=We(),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])}()),X}function Xe(){if(xe)return Ne;xe=1,Ne=s;var e=Ve();((s.prototype=Object.create(e.prototype)).constructor=s).className="Field";var t,r=Qe(),i=Ge(),n=We(),o=/^required|optional|repeated$/;function s(t,r,s,a,u,f,l){if(n.isObject(a)?(l=u,f=a,a=u=void 0):n.isObject(u)&&(l=f,f=u,u=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!==a&&!o.test(a=a.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==u&&!n.isString(u))throw TypeError("extend must be a string");"proto3_optional"===a&&(a="optional"),this.rule=a&&"optional"!==a?a:void 0,this.type=s,this.id=r,this.extend=u||void 0,this.repeated="repeated"===a,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=l}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,a){n.decorateType(o.constructor).add(new s(a,e,t,r,{default:i}))}},s._configure=function(e){t=e},Ne}function Ke(){if(Be)return Re;Be=1,Re=i;var e=Ve();((i.prototype=Object.create(e.prototype)).constructor=i).className="OneOf";var t=Xe(),r=We();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)})}},Re}function Ve(){if(Ie)return Fe;Ie=1,Fe=s,s.className="ReflectionObject";const e=Ke();var t,r=We(),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 a=Object.assign({},this.partOf._features);this._features=Object.assign(a,s||{})}else if(this.declaringField);else{if(!this.parent)throw new Error("Unable to find a parent for "+this.fullName);var u=Object.assign({},this.parent._features);this._features=Object.assign(u,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 a={};a[e]=t,n.push(a)}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},Fe}function Qe(){if(De)return Pe;De=1,Pe=i;var e=Ve();((i.prototype=Object.create(e.prototype)).constructor=i).className="Enum";var t=pe(),r=We();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 a=Object.keys(r),u=0;u<a.length;++u)"number"==typeof r[a[u]]&&(this.valuesById[this.values[a[u]]=r[a[u]]]=a[u])}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)},Pe}function Ye(){if(Ce)return Le;Ce=1,Le=function(n){for(var o,s=r.codegen(["m","w"],n.name+"$encode")("if(!w)")("w=Writer.create()"),a=n.fieldsArray.slice().sort(r.compareFieldsById),u=0;u<a.length;++u){var f=a[u].resolve(),l=n._fieldsArray.indexOf(f),h=f.resolvedType instanceof e?"int32":f.type,p=t.basic[h];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===p?s("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",l,o):s(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|p,h,o),s("}")("}")):f.repeated?(s("if(%s!=null&&%s.length){",o,o),f.packed&&void 0!==t.packed[h]?s("w.uint32(%i).fork()",(f.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",o)("w.%s(%s[i])",h,o)("w.ldelim()"):(s("for(var i=0;i<%s.length;++i)",o),void 0===p?i(s,f,l,o+"[i]"):s("w.uint32(%i).%s(%s[i])",(f.id<<3|p)>>>0,h,o)),s("}")):(f.optional&&s("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",o,f.name),void 0===p?i(s,f,l,o):s("w.uint32(%i).%s(%s)",(f.id<<3|p)>>>0,h,o))}return s("return w")};var e=Qe(),t=Ge(),r=We();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 Le}var Ze=qe?$e:(qe=1,$e=function(){if(Je)return i.exports;Je=1;var e=i.exports=z();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=Ye(),e.decoder=me(),e.verifier=ge(),e.converter=_e(),e.ReflectionObject=Ve(),e.Namespace=pe(),e.Root=He(),e.Enum=Qe(),e.Type=Ue(),e.Field=Xe(),e.OneOf=Ke(),e.MapField=ce(),e.Service=ye(),e.Method=de(),e.Message=ve(),e.wrappers=ze(),e.types=Ge(),e.util=We(),e.ReflectionObject._configure(e.Root),e.Namespace._configure(e.Type,e.Service,e.Enum),e.Root._configure(e.Type),e.Field._configure(e.Type),i.exports}());export{Ze as l};
@@ -1 +0,0 @@
1
- "use strict";var e,t,r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i={exports:{}},n={},o={};function s(){if(t)return e;return t=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(a){o&&(o=!1,s(a))}})},e}var a,u,f,l,h,p,c,d={};function y(){return c?p:(c=1,p=function(){return null})}var v,m,g,b,O,_,w,j,A,k,E,S,T,N,x={};function R(){return _||(_=1,function(){var e,t=o;function i(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 n(e){function t(e,r){if(!(this instanceof t))return new t(e,r);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),r&&i(this,r)}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=s(),t.base64=(a||(a=1,function(){var e=d;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=[],a=0,u=0;r<i;){var f=e[r++];switch(u){case 0:s[a++]=t[f>>2],n=(3&f)<<4,u=1;break;case 1:s[a++]=t[n|f>>4],n=(15&f)<<2,u=2;break;case 2:s[a++]=t[n|f>>6],s[a++]=t[63&f],u=0}a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),a=0)}return u&&(s[a++]=t[n],s[a++]=61,1===u&&(s[a++]=61)),o?(a&&o.push(String.fromCharCode.apply(String,s.slice(0,a))),o.join("")):String.fromCharCode.apply(String,s.slice(0,a))};var n="invalid encoding";e.decode=function(e,t,i){for(var o,s=i,a=0,u=0;u<e.length;){var f=e.charCodeAt(u++);if(61===f&&a>1)break;if(void 0===(f=r[f]))throw Error(n);switch(a){case 0:o=f,a=1;break;case 1:t[i++]=o<<2|(48&f)>>4,o=f,a=2;break;case 2:t[i++]=(15&o)<<4|(60&f)>>2,o=f,a=3;break;case 3:t[i++]=(3&o)<<6|f,a=0}}if(1===a)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)}}()),d),t.EventEmitter=function(){if(f)return u;function e(){this._listeners={}}return f=1,u=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},u}(),t.float=function(){if(h)return l;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 a(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:a,e.readFloatBE=i?a: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 a(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:a,e.readDoubleBE=i?a: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 a;if(i<22250738585072014e-324)e((a=i/5e-324)>>>0,n,o+t),e((s<<31|a/4294967296)>>>0,n,o+r);else{var u=Math.floor(Math.log(i)/Math.LN2);1024===u&&(u=1023),e(4503599627370496*(a=i*Math.pow(2,-u))>>>0,n,o+t),e((s<<31|u+1023<<20|1048576*a&1048575)>>>0,n,o+r)}}}function s(e,t,r,i,n){var o=e(i,n+t),s=e(i,n+r),a=2*(s>>31)+1,u=s>>>20&2047,f=4294967296*(1048575&s)+o;return 2047===u?f?NaN:a*(1/0):0===u?5e-324*a*f:a*Math.pow(2,u-1075)*(f+4503599627370496)}e.writeDoubleLE=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 h=1,l=e(e)}(),t.inquire=y(),t.utf8=(v||(v=1,(e=x).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}),x),t.pool=g?m:(g=1,m=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 a=t.call(o,s,s+=r);return 7&s&&(s=1+(7|s)),a}}),t.LongBits=function(){if(O)return b;O=1,b=t;var e=R();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},b}(),t.isNode=Boolean(void 0!==r&&r&&r.process&&r.process.versions&&r.process.versions.node),t.global=t.isNode&&r||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||o,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=i,t.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},t.newError=n,t.ProtocolError=n("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}}()),o}function B(){if(j)return w;j=1,w=u;var e,t=R(),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 a(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function u(){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(u.create=function(){return new e})()}:function(){return new u}};function l(e,t,r){t[r]=255&e}function h(e,t){this.len=e,this.next=void 0,this.val=t}function p(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function c(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}u.create=f(),u.alloc=function(e){return new t.Array(e)},t.Array!==Array&&(u.alloc=t.pool(u.alloc,t.Array.prototype.subarray)),u.prototype._push=function(e,t,r){return this.tail=this.tail.next=new o(e,t,r),this.len+=t,this},h.prototype=Object.create(o.prototype),h.prototype.fn=function(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e},u.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new h((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},u.prototype.int32=function(e){return e<0?this._push(p,10,r.fromNumber(e)):this.uint32(e)},u.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},u.prototype.uint64=function(e){var t=r.from(e);return this._push(p,t.length(),t)},u.prototype.int64=u.prototype.uint64,u.prototype.sint64=function(e){var t=r.from(e).zzEncode();return this._push(p,t.length(),t)},u.prototype.bool=function(e){return this._push(l,1,e?1:0)},u.prototype.fixed32=function(e){return this._push(c,4,e>>>0)},u.prototype.sfixed32=u.prototype.fixed32,u.prototype.fixed64=function(e){var t=r.from(e);return this._push(c,4,t.lo)._push(c,4,t.hi)},u.prototype.sfixed64=u.prototype.fixed64,u.prototype.float=function(e){return this._push(t.float.writeFloatLE,4,e)},u.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 u.prototype.bytes=function(e){var r=e.length>>>0;if(!r)return this._push(l,1,0);if(t.isString(e)){var n=u.alloc(r=i.length(e));i.decode(e,n,0),e=n}return this.uint32(r)._push(d,r,e)},u.prototype.string=function(e){var t=n.length(e);return t?this.uint32(t)._push(n.write,t,e):this._push(l,1,0)},u.prototype.fork=function(){return this.states=new a(this),this.head=this.tail=new o(s,0,0),this.len=0,this},u.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},u.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},u.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},u._configure=function(t){e=t,u.create=f(),e._configure()},w}function F(){if(S)return E;S=1,E=o;var e,t=R(),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")},a=function(){return t.Buffer?function(r){return(o.create=function(r){return t.Buffer.isBuffer(r)?new e(r):s(r)})(r)}:s};function u(){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 l(){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=a(),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=a(),e._configure();var i=t.Long?"toLong":"toNumber";t.merge(o.prototype,{int64:function(){return u.call(this)[i](!1)},uint64:function(){return u.call(this)[i](!0)},sint64:function(){return u.call(this).zzDecode()[i](!1)},fixed64:function(){return l.call(this)[i](!0)},sfixed64:function(){return l.call(this)[i](!1)}})},E}var I,P,D,L,C,J,$={};function q(){return D||(D=1,$.Service=function(){if(P)return I;P=1,I=t;var e=R();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 a=this;if(!s)return e.asPromise(t,a,r,i,n,o);if(a.rpcImpl)try{return a.rpcImpl(r,i[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(e,t){if(e)return a.emit("error",e,r),s(e);if(null!==t){if(!(t instanceof n))try{t=n[a.responseDelimited?"decodeDelimited":"decode"](t)}catch(i){return a.emit("error",i,r),s(i)}return a.emit("data",t,r),s(null,t)}a.end(!0)})}catch(u){return a.emit("error",u,r),void setTimeout(function(){s(u)},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},I}()),$}function M(){return C?L:(C=1,L={})}function z(){return J||(J=1,function(){var e=n;function t(){e.util._configure(),e.Writer._configure(e.BufferWriter),e.Reader._configure(e.BufferReader)}e.build="minimal",e.Writer=B(),e.BufferWriter=function(){if(k)return A;k=1,A=r;var e=B();(r.prototype=Object.create(e.prototype)).constructor=r;var t=R();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(),A}(),e.Reader=F(),e.BufferReader=function(){if(N)return T;N=1,T=r;var e=F();(r.prototype=Object.create(e.prototype)).constructor=r;var t=R();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(),T}(),e.util=R(),e.rpc=q(),e.roots=M(),e.configure=t,t()}()),n}var U,H,W,G,X={},K={exports:{}};var V,Q,Y,Z,ee,te,re,ie,ne,oe,se,ae,ue,fe,le,he={};function pe(){if(Y)return Q;Y=1,Q=u;var e=Ve();((u.prototype=Object.create(e.prototype)).constructor=u).className="Namespace";var t,r,i,n=Xe(),o=We(),s=Ke();function a(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 u(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 u.fromJSON=function(e,t){return new u(e,t.options).addJSON(t.nested)},u.arrayToJSON=a,u.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},u.isReservedName=function(e,t){if(e)for(var r=0;r<e.length;++r)if(e[r]===t)return!0;return!1},Object.defineProperty(u.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=o.toArray(this.nested))}}),u.prototype.toJSON=function(e){return o.toObject(["options",this.options,"nested",a(this.nestedArray,e)])},u.prototype.addJSON=function(e){if(e)for(var o,s=Object.keys(e),a=0;a<s.length;++a)o=e[s[a]],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:u.fromJSON)(s[a],o));return this},u.prototype.get=function(e){return this.nested&&this.nested[e]||null},u.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof i)return this.nested[e].values;throw Error("no such enum: "+e)},u.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 u))throw TypeError("object must be a valid nested object");if(this.nested){var o=this.get(e.name);if(o){if(!(o instanceof u&&e instanceof u)||o instanceof t||o instanceof r)throw Error("duplicate name '"+e.name+"' in "+this);for(var a=o.nestedArray,l=0;l<a.length;++l)e.add(a[l]);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 h=this;h=h.parent;)h._needsRecursiveFeatureResolution=!0,h._needsRecursiveResolve=!0;return e.onAdd(this),f(this)},u.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)},u.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 u))throw Error("path conflicts with non-namespace objects")}else r.add(r=new u(i))}return t&&r.addJSON(t),r},u.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 u?e[t++].resolveAll():e[t++].resolve();return this._needsRecursiveResolve=!1,this},u.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},u.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},u.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 u&&(e=e.slice(1),i=r._lookupImpl(e,e.join(".")));else for(var n=0;n<this.nestedArray.length;++n)this._nestedArray[n]instanceof u&&(r=this._nestedArray[n]._lookupImpl(e,t))&&(i=r);return this._lookupCache[t]=i,i},u.prototype.lookupType=function(e){var r=this.lookup(e,[t]);if(!r)throw Error("no such type: "+e);return r},u.prototype.lookupEnum=function(e){var t=this.lookup(e,[i]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},u.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},u.prototype.lookupService=function(e){var t=this.lookup(e,[r]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},u._configure=function(e,n,o){t=e,r=n,i=o},Q}function ce(){if(ee)return Z;ee=1,Z=i;var e=Xe();((i.prototype=Object.create(e.prototype)).constructor=i).className="MapField";var t=Ge(),r=We();function i(t,i,n,o,s,a){if(e.call(this,t,i,o,void 0,void 0,s,a),!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))}},Z}function de(){if(re)return te;re=1,te=r;var e=Ve();((r.prototype=Object.create(e.prototype)).constructor=r).className="Method";var t=We();function r(r,i,n,o,s,a,u,f,l){if(t.isObject(s)?(u=s,s=a=void 0):t.isObject(a)&&(u=a,a=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,u),this.type=i||"rpc",this.requestType=n,this.requestStream=!!s||void 0,this.responseType=o,this.responseStream=!!a||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=f,this.parsedOptions=l}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))},te}function ye(){if(ne)return ie;ne=1,ie=n;var e=pe();((n.prototype=Object.create(e.prototype)).constructor=n).className="Service";var t=de(),r=We(),i=q();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),a=0;a<this.methodsArray.length;++a){var u=r.lcFirst((o=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"");s[u]=r.codegen(["r","c"],r.isReserved(u)?u+"_":u)("return this.rpcCall(m,q,s,r,c)")({m:o,q:o.resolvedRequestType.ctor,s:o.resolvedResponseType.ctor})}return s},ie}function ve(){if(se)return oe;se=1,oe=t;var e=R();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)},oe}function me(){if(ue)return ae;ue=1,ae=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 a=n._fieldsArray[s].resolve(),u=a.resolvedType instanceof e?"int32":a.type,f="m"+r.safeProp(a.name);o("case %i: {",a.id),a.map?(o("if(%s===util.emptyObject)",f)("%s={}",f)("var c2 = r.uint32()+r.pos"),void 0!==t.defaults[a.keyType]?o("k=%j",t.defaults[a.keyType]):o("k=null"),void 0!==t.defaults[u]?o("value=%j",t.defaults[u]):o("value=null"),o("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",a.keyType)("case 2:"),void 0===t.basic[u]?o("value=types[%i].decode(r,r.uint32())",s):o("value=r.%s()",u),o("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==t.long[a.keyType]?o('%s[typeof k==="object"?util.longToHash(k):k]=value',f):o("%s[k]=value",f)):a.repeated?(o("if(!(%s&&%s.length))",f,f)("%s=[]",f),void 0!==t.packed[u]&&o("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",f,u)("}else"),void 0===t.basic[u]?o(a.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,u)):void 0===t.basic[u]?o(a.delimited?"%s=types[%i].decode(r,undefined,((t&~7)|4))":"%s=types[%i].decode(r,r.uint32())",f,s):o("%s=r.%s()",f,u),o("break")("}")}for(o("default:")("r.skipType(t&7)")("break")("}")("}"),s=0;s<n._fieldsArray.length;++s){var l=n._fieldsArray[s];l.required&&o("if(!m.hasOwnProperty(%j))",l.name)("throw util.ProtocolError(%j,{instance:m})",i(l))}return o("return m")};var e=Qe(),t=Ge(),r=We();function i(e){return"missing required '"+e.name+"'"}return ae}function ge(){if(le)return fe;le=1,fe=function(e){var o=t.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),s=e.oneofsArray,a={};s.length&&o("var p={}");for(var u=0;u<e.fieldsArray.length;++u){var f=e._fieldsArray[u].resolve(),l="m"+t.safeProp(f.name);if(f.optional&&o("if(%s!=null&&m.hasOwnProperty(%j)){",l,f.name),f.map)o("if(!util.isObject(%s))",l)("return%j",r(f,"object"))("var k=Object.keys(%s)",l)("for(var i=0;i<k.length;++i){"),n(o,f,"k[i]"),i(o,f,u,l+"[k[i]]")("}");else if(f.repeated)o("if(!Array.isArray(%s))",l)("return%j",r(f,"array"))("for(var i=0;i<%s.length;++i){",l),i(o,f,u,l+"[i]")("}");else{if(f.partOf){var h=t.safeProp(f.partOf.name);1===a[f.partOf.name]&&o("if(p%s===1)",h)("return%j",f.partOf.name+": multiple values"),a[f.partOf.name]=1,o("p%s=1",h)}i(o,f,u,l)}f.optional&&o("}")}return o("return null")};var e=Qe(),t=We();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),a=0;a<s.length;++a)t("case %i:",i.resolvedType.values[s[a]]);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 fe}var be,Oe={};function _e(){return be||(be=1,function(){var e=Oe,t=Qe(),r=We();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,a=Object.keys(s),u=0;u<a.length;++u)s[a[u]]!==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:",a[u])("case %i:",s[a[u]])("m%s=%j",n,s[a[u]])("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 a=n[s].resolve(),u=r.safeProp(a.name);a.map?(o("if(d%s){",u)('if(typeof d%s!=="object")',u)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",u)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",u),i(o,a,s,u+"[ks[i]]")("}")("}")):a.repeated?(o("if(d%s){",u)("if(!Array.isArray(d%s))",u)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",u)("for(var i=0;i<d%s.length;++i){",u),i(o,a,s,u+"[i]")("}")("}")):(a.resolvedType instanceof t||o("if(d%s!=null){",u),i(o,a,s,u),a.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=[],a=[],u=[],f=0;f<i.length;++f)i[f].partOf||(i[f].resolve().repeated?s:i[f].map?a:u).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(a.length){for(o("if(o.objects||o.defaults){"),f=0;f<a.length;++f)o("d%s={}",r.safeProp(a[f].name));o("}")}if(u.length){for(o("if(o.defaults){"),f=0;f<u.length;++f){var l=u[f],h=r.safeProp(l.name);if(l.resolvedType instanceof t)o("d%s=o.enums===String?%j:%j",h,l.resolvedType.valuesById[l.typeDefault],l.typeDefault);else if(l.long)o("if(util.Long){")("var n=new util.Long(%i,%i,%j)",l.typeDefault.low,l.typeDefault.high,l.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",h)("}else")("d%s=o.longs===String?%j:%i",h,l.typeDefault.toString(),l.typeDefault.toNumber());else if(l.bytes){var p="["+Array.prototype.slice.call(l.typeDefault).join(",")+"]";o("if(o.bytes===String)d%s=%j",h,String.fromCharCode.apply(String,l.typeDefault))("else{")("d%s=%s",h,p)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",h,h)("}")}else o("d%s=%j",h,l.typeDefault)}o("}")}var c=!1;for(f=0;f<i.length;++f){l=i[f];var d=e._fieldsArray.indexOf(l);h=r.safeProp(l.name);l.map?(c||(c=!0,o("var ks2")),o("if(m%s&&(ks2=Object.keys(m%s)).length){",h,h)("d%s={}",h)("for(var j=0;j<ks2.length;++j){"),n(o,l,d,h+"[ks2[j]]")("}")):l.repeated?(o("if(m%s&&m%s.length){",h,h)("d%s=[]",h)("for(var j=0;j<m%s.length;++j){",h),n(o,l,d,h+"[j]")("}")):(o("if(m%s!=null&&m.hasOwnProperty(%j)){",h,l.name),n(o,l,d,h),l.partOf&&o("if(o.oneofs)")("d%s=%j",r.safeProp(l.partOf.name),l.name)),o("}")}return o("return d")}}()),Oe}var we,je,Ae,ke,Ee,Se,Te,Ne,xe,Re,Be,Fe,Ie,Pe,De,Le,Ce,Je,$e,qe,Me={};function ze(){return we||(we=1,e=Me,t=ve(),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)}}),Me;var e,t}function Ue(){if(Ae)return je;Ae=1,je=y;var e=pe();((y.prototype=Object.create(e.prototype)).constructor=y).className="Type";var t=Qe(),r=Ke(),i=Xe(),n=ce(),o=ye(),s=ve(),a=F(),u=B(),f=We(),l=Ye(),h=me(),p=ge(),c=_e(),d=ze();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,a){var u=new y(s,a.options);u.extensions=a.extensions,u.reserved=a.reserved;for(var f=Object.keys(a.fields),l=0;l<f.length;++l)u.add((void 0!==a.fields[f[l]].keyType?n.fromJSON:i.fromJSON)(f[l],a.fields[f[l]]));if(a.oneofs)for(f=Object.keys(a.oneofs),l=0;l<f.length;++l)u.add(r.fromJSON(f[l],a.oneofs[f[l]]));if(a.nested)for(f=Object.keys(a.nested),l=0;l<f.length;++l){var h=a.nested[f[l]];u.add((void 0!==h.id?i.fromJSON:void 0!==h.fields?y.fromJSON:void 0!==h.values?t.fromJSON:void 0!==h.methods?o.fromJSON:e.fromJSON)(f[l],h))}return a.extensions&&a.extensions.length&&(u.extensions=a.extensions),a.reserved&&a.reserved.length&&(u.reserved=a.reserved),a.group&&(u.group=!0),a.comment&&(u.comment=a.comment),a.edition&&(u._edition=a.edition),u._defaultEdition="proto3",u},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=l(this)({Writer:u,types:t,util:f}),this.decode=h(this)({Reader:a,types:t,util:f}),this.verify=p(this)({types:t,util:f}),this.fromObject=c.fromObject(this)({types:t,util:f}),this.toObject=c.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 a||(e=a.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)}},je}function He(){if(Ee)return ke;Ee=1,ke=u;var e=pe();((u.prototype=Object.create(e.prototype)).constructor=u).className="Root";var t,r,i,n=Xe(),o=Qe(),s=Ke(),a=We();function u(t){e.call(this,"",t),this.deferred=[],this.files=[],this._edition="proto2",this._fullyQualifiedObjects={}}function f(){}u.fromJSON=function(e,t){return t||(t=new u),e.options&&t.setOptions(e.options),t.addJSON(e.nested).resolveAll()},u.prototype.resolvePath=a.path.resolve,u.prototype.fetch=a.fetch,u.prototype.load=function e(t,n,o){"function"==typeof n&&(o=n,n=void 0);var s=this;if(!o)return a.asPromise(e,s,t,n);var u=o===f;function l(e,t){if(o){if(u)throw e;t&&t.resolveAll();var r=o;o=null,r(e,t)}}function h(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var r=e.substring(t);if(r in i)return r}return null}function p(e,t){try{if(a.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),a.isString(t)){r.filename=e;var i,o=r(t,s,n),f=0;if(o.imports)for(;f<o.imports.length;++f)(i=h(o.imports[f])||s.resolvePath(e,o.imports[f]))&&c(i);if(o.weakImports)for(f=0;f<o.weakImports.length;++f)(i=h(o.weakImports[f])||s.resolvePath(e,o.weakImports[f]))&&c(i,!0)}else s.setOptions(t.options).addJSON(t.nested)}catch(p){l(p)}u||d||l(null,s)}function c(e,t){if(e=h(e)||e,!(s.files.indexOf(e)>-1))if(s.files.push(e),e in i)u?p(e,i[e]):(++d,setTimeout(function(){--d,p(e,i[e])}));else if(u){var r;try{r=a.fs.readFileSync(e).toString("utf8")}catch(n){return void(t||l(n))}p(e,r)}else++d,s.fetch(e,function(r,i){--d,o&&(r?t?d||l(null,s):l(r):p(e,i))})}var d=0;a.isString(t)&&(t=[t]);for(var y,v=0;v<t.length;++v)(y=s.resolvePath("",t[v]))&&c(y);return u?(s.resolveAll(),s):(d||l(null,s),s)},u.prototype.loadSync=function(e,t){if(!a.isNode)throw Error("not supported");return this.load(e,t,f)},u.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 l=/^[A-Z]/;function h(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 u.prototype._handleAdd=function(e){if(e instanceof n)void 0===e.extend||e.extensionField||h(0,e)||this.deferred.push(e);else if(e instanceof o)l.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;)h(0,this.deferred[r])?this.deferred.splice(r,1):++r;for(var i=0;i<e.nestedArray.length;++i)this._handleAdd(e._nestedArray[i]);l.test(e.name)&&(e.parent[e.name]=e)}(e instanceof t||e instanceof o||e instanceof n)&&(this._fullyQualifiedObjects[e.fullName]=e)},u.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)l.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]);l.test(t.name)&&delete t.parent[t.name]}delete this._fullyQualifiedObjects[t.fullName]},u._configure=function(e,n,o){t=e,r=n,i=o},ke}function We(){if(Se)return K.exports;Se=1;var e,t,r,i,n,o=K.exports=R(),a=M();o.codegen=function(){if(H)return U;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),a=new Array(s.length+1),u=new Array(s.length),f=0;f<s.length;)a[f]=s[f],u[f]=t[s[f++]];return a[f]=r,Function.apply(null,a).apply(null,u)}return Function(r)()}for(var l=new Array(arguments.length-1),h=0;h<l.length;)l[h]=arguments[++h];if(h=0,t=t.replace(/%([%dfijs])/g,function(e,t){var r=l[h++];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"%"}),h!==l.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 H=1,U=e,e.verbose=!1,U}(),o.fetch=function(){if(G)return W;G=1,W=r;var e=s(),t=y()("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()},W}(),o.path=(V||(V=1,i=(r=he).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)}),he),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,f=/"/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(f,'\\"')+'"]':"."+e},o.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var l=/_([a-z])/g;o.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(l,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=Ue());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=Qe());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 a.decorated||(a.decorated=new(He()))}}),K.exports}function Ge(){return Te||(Te=1,function(){var e=X,t=We(),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])}()),X}function Xe(){if(xe)return Ne;xe=1,Ne=s;var e=Ve();((s.prototype=Object.create(e.prototype)).constructor=s).className="Field";var t,r=Qe(),i=Ge(),n=We(),o=/^required|optional|repeated$/;function s(t,r,s,a,u,f,l){if(n.isObject(a)?(l=u,f=a,a=u=void 0):n.isObject(u)&&(l=f,f=u,u=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!==a&&!o.test(a=a.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==u&&!n.isString(u))throw TypeError("extend must be a string");"proto3_optional"===a&&(a="optional"),this.rule=a&&"optional"!==a?a:void 0,this.type=s,this.id=r,this.extend=u||void 0,this.repeated="repeated"===a,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=l}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,a){n.decorateType(o.constructor).add(new s(a,e,t,r,{default:i}))}},s._configure=function(e){t=e},Ne}function Ke(){if(Be)return Re;Be=1,Re=i;var e=Ve();((i.prototype=Object.create(e.prototype)).constructor=i).className="OneOf";var t=Xe(),r=We();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)})}},Re}function Ve(){if(Ie)return Fe;Ie=1,Fe=s,s.className="ReflectionObject";const e=Ke();var t,r=We(),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 a=Object.assign({},this.partOf._features);this._features=Object.assign(a,s||{})}else if(this.declaringField);else{if(!this.parent)throw new Error("Unable to find a parent for "+this.fullName);var u=Object.assign({},this.parent._features);this._features=Object.assign(u,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 a={};a[e]=t,n.push(a)}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},Fe}function Qe(){if(De)return Pe;De=1,Pe=i;var e=Ve();((i.prototype=Object.create(e.prototype)).constructor=i).className="Enum";var t=pe(),r=We();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 a=Object.keys(r),u=0;u<a.length;++u)"number"==typeof r[a[u]]&&(this.valuesById[this.values[a[u]]=r[a[u]]]=a[u])}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)},Pe}function Ye(){if(Ce)return Le;Ce=1,Le=function(n){for(var o,s=r.codegen(["m","w"],n.name+"$encode")("if(!w)")("w=Writer.create()"),a=n.fieldsArray.slice().sort(r.compareFieldsById),u=0;u<a.length;++u){var f=a[u].resolve(),l=n._fieldsArray.indexOf(f),h=f.resolvedType instanceof e?"int32":f.type,p=t.basic[h];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===p?s("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",l,o):s(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|p,h,o),s("}")("}")):f.repeated?(s("if(%s!=null&&%s.length){",o,o),f.packed&&void 0!==t.packed[h]?s("w.uint32(%i).fork()",(f.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",o)("w.%s(%s[i])",h,o)("w.ldelim()"):(s("for(var i=0;i<%s.length;++i)",o),void 0===p?i(s,f,l,o+"[i]"):s("w.uint32(%i).%s(%s[i])",(f.id<<3|p)>>>0,h,o)),s("}")):(f.optional&&s("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",o,f.name),void 0===p?i(s,f,l,o):s("w.uint32(%i).%s(%s)",(f.id<<3|p)>>>0,h,o))}return s("return w")};var e=Qe(),t=Ge(),r=We();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 Le}var Ze=qe?$e:(qe=1,$e=function(){if(Je)return i.exports;Je=1;var e=i.exports=z();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=Ye(),e.decoder=me(),e.verifier=ge(),e.converter=_e(),e.ReflectionObject=Ve(),e.Namespace=pe(),e.Root=He(),e.Enum=Qe(),e.Type=Ue(),e.Field=Xe(),e.OneOf=Ke(),e.MapField=ce(),e.Service=ye(),e.Method=de(),e.Message=ve(),e.wrappers=ze(),e.types=Ge(),e.util=We(),e.ReflectionObject._configure(e.Root),e.Namespace._configure(e.Type,e.Service,e.Enum),e.Root._configure(e.Type),e.Field._configure(e.Type),i.exports}());exports.lightExports=Ze;