o11y 264.6.0 → 264.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/modules/o11y/client/collectors/core-collector/CoreCollector.d.ts +1 -0
- package/dist/modules/o11y/client/collectors/core-collector/interfaces/CoreCollectorOptions.d.ts +1 -0
- package/dist/modules/o11y/collectors/collectors/core-collector/CoreCollector.d.ts +1 -0
- package/dist/modules/o11y/collectors/collectors/core-collector/interfaces/CoreCollectorOptions.d.ts +1 -0
- package/dist/modules/o11y/collectors/collectors.js +9 -3
- package/dist/modules/o11y/collectors/collectors.js.map +1 -1
- package/dist/modules/o11y/core_envelope/collectors/core-collector/CoreCollector.d.ts +1 -0
- package/dist/modules/o11y/core_envelope/collectors/core-collector/interfaces/CoreCollectorOptions.d.ts +1 -0
- package/dist/modules/o11y/shared/collectors/core-collector/CoreCollector.d.ts +1 -0
- package/dist/modules/o11y/shared/collectors/core-collector/interfaces/CoreCollectorOptions.d.ts +1 -0
- package/dist/modules/o11y/simple_collector/collectors/core-collector/CoreCollector.d.ts +1 -0
- package/dist/modules/o11y/simple_collector/collectors/core-collector/interfaces/CoreCollectorOptions.d.ts +1 -0
- package/dist/modules/o11y/web_vitals/collectors/core-collector/CoreCollector.d.ts +1 -0
- package/dist/modules/o11y/web_vitals/collectors/core-collector/interfaces/CoreCollectorOptions.d.ts +1 -0
- package/package.json +2 -2
|
@@ -21,6 +21,7 @@ export declare class CoreCollector implements LogCollector, MetricsCollector {
|
|
|
21
21
|
private readonly _emptySize;
|
|
22
22
|
private _messageSize;
|
|
23
23
|
private _uploadOptionsCallback;
|
|
24
|
+
private readonly _apiKey;
|
|
24
25
|
constructor(uploadEndpoint?: string, uploadMode?: UploadMode, environment?: Environment, options?: CoreCollectorOptions);
|
|
25
26
|
get uploadInterval(): number;
|
|
26
27
|
set uploadInterval(uploadInterval: number);
|
|
@@ -21,6 +21,7 @@ export declare class CoreCollector implements LogCollector, MetricsCollector {
|
|
|
21
21
|
private readonly _emptySize;
|
|
22
22
|
private _messageSize;
|
|
23
23
|
private _uploadOptionsCallback;
|
|
24
|
+
private readonly _apiKey;
|
|
24
25
|
constructor(uploadEndpoint?: string, uploadMode?: UploadMode, environment?: Environment, options?: CoreCollectorOptions);
|
|
25
26
|
get uploadInterval(): number;
|
|
26
27
|
set uploadInterval(uploadInterval: number);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* protobuf.js v7.5.
|
|
3
|
-
* compiled
|
|
2
|
+
* protobuf.js v7.5.6 (c) 2016, daniel wirtz
|
|
3
|
+
* compiled fri, 29 may 2026 08:30:19 utc
|
|
4
4
|
* licensed under the bsd-3-clause license
|
|
5
5
|
* see: https://github.com/dcodeio/protobuf.js for details
|
|
6
6
|
*/
|
|
7
|
-
var __protobufjs;!function(g){"use strict";!function(r,e,t){__protobufjs=function t(i){var n=e[i];return n||r[i][0].call(n=e[i]={exports:{}},t,n,n.exports),n.exports}(t[0])}({1:[function(t,i,n){i.exports=function(t,i){var n=Array(arguments.length-1),s=0,r=2,o=!0;for(;r<arguments.length;)n[s++]=arguments[r++];return new Promise(function(r,e){n[s]=function(t){if(o)if(o=!1,t)e(t);else{for(var i=Array(arguments.length-1),n=0;n<i.length;)i[n++]=arguments[n];r.apply(null,i)}};try{t.apply(i||null,n)}catch(t){o&&(o=!1,e(t))}})}},{}],2:[function(t,i,n){n.length=function(t){var i=t.length;if(!i)return 0;for(var n=0;1<--i%4&&"="==(t[0|i]||"");)++n;return Math.ceil(3*t.length)/4-n};for(var f=Array(64),h=Array(123),r=0;r<64;)h[f[r]=r<26?r+65:r<52?r+71:r<62?r-4:r-59|43]=r++;n.encode=function(t,i,n){for(var r,e=null,s=[],o=0,u=0;i<n;){var h=t[i++];switch(u){case 0:s[o++]=f[h>>2],r=(3&h)<<4,u=1;break;case 1:s[o++]=f[r|h>>4],r=(15&h)<<2,u=2;break;case 2:s[o++]=f[r|h>>6],s[o++]=f[63&h],u=0}8191<o&&((e=e||[]).push(String.fromCharCode.apply(String,s)),o=0)}return u&&(s[o++]=f[r],s[o++]=61,1===u&&(s[o++]=61)),e?(o&&e.push(String.fromCharCode.apply(String,s.slice(0,o))),e.join("")):String.fromCharCode.apply(String,s.slice(0,o))};var c="invalid encoding";n.decode=function(t,i,n){for(var r,e=n,s=0,o=0;o<t.length;){var u=t.charCodeAt(o++);if(61==u&&1<s)break;if((u=h[u])===g)throw Error(c);switch(s){case 0:r=u,s=1;break;case 1:i[n++]=r<<2|(48&u)>>4,r=u,s=2;break;case 2:i[n++]=(15&r)<<4|(60&u)>>2,r=u,s=3;break;case 3:i[n++]=(3&r)<<6|u,s=0}}if(1===s)throw Error(c);return n-e},n.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},{}],3:[function(t,i,n){function a(i,n){"string"==typeof i&&(n=i,i=g);var h=[];function f(t){if("string"!=typeof t){var i=c();if(a.verbose&&console.log("codegen: "+i),i="return "+i,t){for(var n=Object.keys(t),r=Array(n.length+1),e=Array(n.length),s=0;s<n.length;)r[s]=n[s],e[s]=t[n[s++]];return r[s]=i,Function.apply(null,r).apply(null,e)}return Function(i)()}for(var o=Array(arguments.length-1),u=0;u<o.length;)o[u]=arguments[++u];if(u=0,t=t.replace(/%([%dfijs])/g,function(t,i){var n=o[u++];switch(i){case"d":case"f":return""+ +(""+n);case"i":return""+Math.floor(n);case"j":return JSON.stringify(n);case"s":return""+n}return"%"}),u!==o.length)throw Error("parameter count mismatch");return h.push(t),f}function c(t){return"function "+(t||n||"")+"("+(i&&i.join(",")||"")+"){\n "+h.join("\n ")+"\n}"}return f.toString=c,f}(i.exports=a).verbose=!1},{}],4:[function(t,i,n){function r(){this.t={}}(i.exports=r).prototype.on=function(t,i,n){return(this.t[t]||(this.t[t]=[])).push({fn:i,ctx:n||this}),this},r.prototype.off=function(t,i){if(t===g)this.t={};else if(i===g)this.t[t]=[];else for(var n=this.t[t],r=0;r<n.length;)n[r].fn===i?n.splice(r,1):++r;return this},r.prototype.emit=function(t){var i=this.t[t];if(i){for(var n=[],r=1;r<arguments.length;)n.push(arguments[r++]);for(r=0;r<i.length;)i[r].fn.apply(i[r++].ctx,n)}return this}},{}],5:[function(t,i,n){i.exports=u;var s=t(1),o=t(7)("fs");function u(n,r,e){return r="function"==typeof r?(e=r,{}):r||{},e?!r.xhr&&o&&o.readFile?o.readFile(n,function(t,i){return t&&"undefined"!=typeof XMLHttpRequest?u.xhr(n,r,e):t?e(t):e(null,r.binary?i:i.toString("utf8"))}):u.xhr(n,r,e):s(u,this,n,r)}u.xhr=function(t,n,r){var e=new XMLHttpRequest;e.onreadystatechange=function(){if(4!==e.readyState)return g;if(0!==e.status&&200!==e.status)return r(Error("status "+e.status));if(n.binary){if(!(t=e.response))for(var t=[],i=0;i<e.responseText.length;++i)t.push(255&e.responseText.charCodeAt(i));return r(null,"undefined"!=typeof Uint8Array?new Uint8Array(t):t)}return r(null,e.responseText)},n.binary&&("overrideMimeType"in e&&e.overrideMimeType("text/plain; charset=x-user-defined"),e.responseType="arraybuffer"),e.open("GET",t),e.send()}},{1:1,7:7}],6:[function(t,i,n){function r(t){function i(t,i,n,r){var e=i<0?1:0;t(0===(i=e?-i:i)?0<1/i?0:2147483648:isNaN(i)?2143289344:34028234663852886e22<i?(e<<31|2139095040)>>>0:i<11754943508222875e-54?(e<<31|Math.round(i/1401298464324817e-60))>>>0:(e<<31|127+(t=Math.floor(Math.log(i)/Math.LN2))<<23|8388607&Math.round(i*Math.pow(2,-t)*8388608))>>>0,n,r)}function n(t,i,n){t=t(i,n),i=2*(t>>31)+1,n=t>>>23&255,t&=8388607;return 255==n?t?NaN:1/0*i:0==n?1401298464324817e-60*i*t:i*Math.pow(2,n-150)*(8388608+t)}function r(t,i,n){u[0]=t,i[n]=h[0],i[n+1]=h[1],i[n+2]=h[2],i[n+3]=h[3]}function e(t,i,n){u[0]=t,i[n]=h[3],i[n+1]=h[2],i[n+2]=h[1],i[n+3]=h[0]}function s(t,i){return h[0]=t[i],h[1]=t[i+1],h[2]=t[i+2],h[3]=t[i+3],u[0]}function o(t,i){return h[3]=t[i],h[2]=t[i+1],h[1]=t[i+2],h[0]=t[i+3],u[0]}var u,h,f,c,a;function l(t,i,n,r,e,s){var o,u=r<0?1:0;0===(r=u?-r:r)?(t(0,e,s+i),t(0<1/r?0:2147483648,e,s+n)):isNaN(r)?(t(0,e,s+i),t(2146959360,e,s+n)):17976931348623157e292<r?(t(0,e,s+i),t((u<<31|2146435072)>>>0,e,s+n)):r<22250738585072014e-324?(t((o=r/5e-324)>>>0,e,s+i),t((u<<31|o/4294967296)>>>0,e,s+n)):(t(4503599627370496*(o=r*Math.pow(2,-(r=1024===(r=Math.floor(Math.log(r)/Math.LN2))?1023:r)))>>>0,e,s+i),t((u<<31|r+1023<<20|1048576*o&1048575)>>>0,e,s+n))}function d(t,i,n,r,e){i=t(r,e+i),t=t(r,e+n),r=2*(t>>31)+1,e=t>>>20&2047,n=4294967296*(1048575&t)+i;return 2047==e?n?NaN:1/0*r:0==e?5e-324*r*n:r*Math.pow(2,e-1075)*(n+4503599627370496)}function v(t,i,n){f[0]=t,i[n]=c[0],i[n+1]=c[1],i[n+2]=c[2],i[n+3]=c[3],i[n+4]=c[4],i[n+5]=c[5],i[n+6]=c[6],i[n+7]=c[7]}function b(t,i,n){f[0]=t,i[n]=c[7],i[n+1]=c[6],i[n+2]=c[5],i[n+3]=c[4],i[n+4]=c[3],i[n+5]=c[2],i[n+6]=c[1],i[n+7]=c[0]}function p(t,i){return c[0]=t[i],c[1]=t[i+1],c[2]=t[i+2],c[3]=t[i+3],c[4]=t[i+4],c[5]=t[i+5],c[6]=t[i+6],c[7]=t[i+7],f[0]}function y(t,i){return c[7]=t[i],c[6]=t[i+1],c[5]=t[i+2],c[4]=t[i+3],c[3]=t[i+4],c[2]=t[i+5],c[1]=t[i+6],c[0]=t[i+7],f[0]}return"undefined"!=typeof Float32Array?(u=new Float32Array([-0]),h=new Uint8Array(u.buffer),a=128===h[3],t.writeFloatLE=a?r:e,t.writeFloatBE=a?e:r,t.readFloatLE=a?s:o,t.readFloatBE=a?o:s):(t.writeFloatLE=i.bind(null,m),t.writeFloatBE=i.bind(null,w),t.readFloatLE=n.bind(null,g),t.readFloatBE=n.bind(null,j)),"undefined"!=typeof Float64Array?(f=new Float64Array([-0]),c=new Uint8Array(f.buffer),a=128===c[7],t.writeDoubleLE=a?v:b,t.writeDoubleBE=a?b:v,t.readDoubleLE=a?p:y,t.readDoubleBE=a?y:p):(t.writeDoubleLE=l.bind(null,m,0,4),t.writeDoubleBE=l.bind(null,w,4,0),t.readDoubleLE=d.bind(null,g,0,4),t.readDoubleBE=d.bind(null,j,4,0)),t}function m(t,i,n){i[n]=255&t,i[n+1]=t>>>8&255,i[n+2]=t>>>16&255,i[n+3]=t>>>24}function w(t,i,n){i[n]=t>>>24,i[n+1]=t>>>16&255,i[n+2]=t>>>8&255,i[n+3]=255&t}function g(t,i){return(t[i]|t[i+1]<<8|t[i+2]<<16|t[i+3]<<24)>>>0}function j(t,i){return(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3])>>>0}i.exports=r(r)},{}],7:[function(t,i,n){function r(t){try{var i=(function(){})(t);if(i&&(i.length||Object.keys(i).length))return i}catch(t){}return null}i.exports=r},{}],8:[function(t,i,n){var e=n.isAbsolute=function(t){return/^(?:\/|\w+:)/.test(t)},r=n.normalize=function(t){var i=(t=t.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),n=e(t),t="";n&&(t=i.shift()+"/");for(var r=0;r<i.length;)".."===i[r]?0<r&&".."!==i[r-1]?i.splice(--r,2):n?i.splice(r,1):++r:"."===i[r]?i.splice(r,1):++r;return t+i.join("/")};n.resolve=function(t,i,n){return n||(i=r(i)),!e(i)&&(t=(t=n?t:r(t)).replace(/(?:\/|^)[^/]+$/,"")).length?r(t+"/"+i):i}},{}],9:[function(t,i,n){i.exports=function(i,n,t){var r=t||8192,e=r>>>1,s=null,o=r;return function(t){if(t<1||e<t)return i(t);r<o+t&&(s=i(r),o=0);t=n.call(s,o,o+=t);return 7&o&&(o=1+(7|o)),t}}},{}],10:[function(t,i,n){n.length=function(t){for(var i,n=0,r=0;r<t.length;++r)(i=t.charCodeAt(r))<128?n+=1:i<2048?n+=2:55296==(64512&i)&&56320==(64512&t.charCodeAt(r+1))?(++r,n+=4):n+=3;return n},n.read=function(t,i,n){if(n-i<1)return"";for(var r,e=null,s=[],o=0;i<n;)(r=t[i++])<128?s[o++]=r:191<r&&r<224?s[o++]=(31&r)<<6|63&t[i++]:239<r&&r<365?(r=((7&r)<<18|(63&t[i++])<<12|(63&t[i++])<<6|63&t[i++])-65536,s[o++]=55296+(r>>10),s[o++]=56320+(1023&r)):s[o++]=(15&r)<<12|(63&t[i++])<<6|63&t[i++],8191<o&&((e=e||[]).push(String.fromCharCode.apply(String,s)),o=0);return e?(o&&e.push(String.fromCharCode.apply(String,s.slice(0,o))),e.join("")):String.fromCharCode.apply(String,s.slice(0,o))},n.write=function(t,i,n){for(var r,e,s=n,o=0;o<t.length;++o)(r=t.charCodeAt(o))<128?i[n++]=r:(r<2048?i[n++]=r>>6|192:(55296==(64512&r)&&56320==(64512&(e=t.charCodeAt(o+1)))?(++o,i[n++]=(r=65536+((1023&r)<<10)+(1023&e))>>18|240,i[n++]=r>>12&63|128):i[n++]=r>>12|224,i[n++]=r>>6&63|128),i[n++]=63&r|128);return n-s}},{}],11:[function(t,i,n){var l=t(14),d=t(33);function o(t,i,n,r){var e=!1;if(i.resolvedType)if(i.resolvedType instanceof l){t("switch(d%s){",r);for(var s=i.resolvedType.values,o=Object.keys(s),u=0;u<o.length;++u)s[o[u]]!==i.typeDefault||e||(t("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',r,r,r),i.repeated||t("break"),e=!0),t("case%j:",o[u])("case %i:",s[o[u]])("m%s=%j",r,s[o[u]])("break");t("}")}else t('if(typeof d%s!=="object")',r)("throw TypeError(%j)",i.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",r,n,r);else{var h=!1;switch(i.type){case"double":case"float":t("m%s=Number(d%s)",r,r);break;case"uint32":case"fixed32":t("m%s=d%s>>>0",r,r);break;case"int32":case"sint32":case"sfixed32":t("m%s=d%s|0",r,r);break;case"uint64":h=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",r,r,h)('else if(typeof d%s==="string")',r)("m%s=parseInt(d%s,10)",r,r)('else if(typeof d%s==="number")',r)("m%s=d%s",r,r)('else if(typeof d%s==="object")',r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",r,r,r,h?"true":"");break;case"bytes":t('if(typeof d%s==="string")',r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",r,r,r)("else if(d%s.length >= 0)",r)("m%s=d%s",r,r);break;case"string":t("m%s=String(d%s)",r,r);break;case"bool":t("m%s=Boolean(d%s)",r,r)}}return t}function v(t,i,n,r){if(i.resolvedType)i.resolvedType instanceof l?t("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",r,n,r,r,n,r,r):t("d%s=types[%i].toObject(m%s,o)",r,n,r);else{var e=!1;switch(i.type){case"double":case"float":t("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",r,r,r,r);break;case"uint64":e=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t('if(typeof m%s==="number")',r)("d%s=o.longs===String?String(m%s):m%s",r,r,r)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",r,r,r,r,e?"true":"",r);break;case"bytes":t("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",r,r,r,r,r);break;default:t("d%s=m%s",r,r)}}return t}n.fromObject=function(t){var i=t.fieldsArray,n=d.codegen(["d"],t.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!i.length)return n("return new this.ctor");n("var m=new this.ctor");for(var r=0;r<i.length;++r){var e=i[r].resolve(),s=d.safeProp(e.name);e.map?(n("if(d%s){",s)('if(typeof d%s!=="object")',s)("throw TypeError(%j)",e.fullName+": object expected")("m%s={}",s)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",s),o(n,e,r,s+"[ks[i]]")("}")("}")):e.repeated?(n("if(d%s){",s)("if(!Array.isArray(d%s))",s)("throw TypeError(%j)",e.fullName+": array expected")("m%s=[]",s)("for(var i=0;i<d%s.length;++i){",s),o(n,e,r,s+"[i]")("}")("}")):(e.resolvedType instanceof l||n("if(d%s!=null){",s),o(n,e,r,s),e.resolvedType instanceof l||n("}"))}return n("return m")},n.toObject=function(t){var i=t.fieldsArray.slice().sort(d.compareFieldsById);if(!i.length)return d.codegen()("return {}");for(var n=d.codegen(["m","o"],t.name+"$toObject")("if(!o)")("o={}")("var d={}"),r=[],e=[],s=[],o=0;o<i.length;++o)i[o].partOf||(i[o].resolve().repeated?r:i[o].map?e:s).push(i[o]);if(r.length){for(n("if(o.arrays||o.defaults){"),o=0;o<r.length;++o)n("d%s=[]",d.safeProp(r[o].name));n("}")}if(e.length){for(n("if(o.objects||o.defaults){"),o=0;o<e.length;++o)n("d%s={}",d.safeProp(e[o].name));n("}")}if(s.length){for(n("if(o.defaults){"),o=0;o<s.length;++o){var u,h=s[o],f=d.safeProp(h.name);h.resolvedType instanceof l?n("d%s=o.enums===String?%j:%j",f,h.resolvedType.valuesById[h.typeDefault],h.typeDefault):h.long?n("if(util.Long){")("var n=new util.Long(%i,%i,%j)",h.typeDefault.low,h.typeDefault.high,h.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",f)("}else")("d%s=o.longs===String?%j:%i",f,h.typeDefault.toString(),h.typeDefault.toNumber()):h.bytes?(u="["+Array.prototype.slice.call(h.typeDefault).join(",")+"]",n("if(o.bytes===String)d%s=%j",f,String.fromCharCode.apply(String,h.typeDefault))("else{")("d%s=%s",f,u)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",f,f)("}")):n("d%s=%j",f,h.typeDefault)}n("}")}for(var c=!1,o=0;o<i.length;++o){var h=i[o],a=t.i.indexOf(h),f=d.safeProp(h.name);h.map?(c||(c=!0,n("var ks2")),n("if(m%s&&(ks2=Object.keys(m%s)).length){",f,f)("d%s={}",f)("for(var j=0;j<ks2.length;++j){"),v(n,h,a,f+"[ks2[j]]")("}")):h.repeated?(n("if(m%s&&m%s.length){",f,f)("d%s=[]",f)("for(var j=0;j<m%s.length;++j){",f),v(n,h,a,f+"[j]")("}")):(n("if(m%s!=null&&m.hasOwnProperty(%j)){",f,h.name),v(n,h,a,f),h.partOf&&n("if(o.oneofs)")("d%s=%j",d.safeProp(h.partOf.name),h.name)),n("}")}return n("return d")}},{14:14,33:33}],12:[function(t,i,n){i.exports=function(t){for(var i=f.codegen(["r","l","e"],t.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(t.fieldsArray.filter(function(t){return t.map}).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()")("if(t===e)")("break")("switch(t>>>3){"),n=0;n<t.fieldsArray.length;++n){var r=t.i[n].resolve(),e=r.resolvedType instanceof u?"int32":r.type,s="m"+f.safeProp(r.name);i("case %i: {",r.id),r.map?(i("if(%s===util.emptyObject)",s)("%s={}",s)("var c2 = r.uint32()+r.pos"),h.defaults[r.keyType]!==g?i("k=%j",h.defaults[r.keyType]):i("k=null"),h.defaults[e]!==g?i("value=%j",h.defaults[e]):i("value=null"),i("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",r.keyType)("case 2:"),h.basic[e]===g?i("value=types[%i].decode(r,r.uint32())",n):i("value=r.%s()",e),i("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),h.long[r.keyType]!==g?i('%s[typeof k==="object"?util.longToHash(k):k]=value',s):i("%s[k]=value",s)):r.repeated?(i("if(!(%s&&%s.length))",s,s)("%s=[]",s),h.packed[e]!==g&&i("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",s,e)("}else"),h.basic[e]===g?i(r.delimited?"%s.push(types[%i].decode(r,undefined,((t&~7)|4)))":"%s.push(types[%i].decode(r,r.uint32()))",s,n):i("%s.push(r.%s())",s,e)):h.basic[e]===g?i(r.delimited?"%s=types[%i].decode(r,undefined,((t&~7)|4))":"%s=types[%i].decode(r,r.uint32())",s,n):i("%s=r.%s()",s,e),i("break")("}")}for(i("default:")("r.skipType(t&7)")("break")("}")("}"),n=0;n<t.i.length;++n){var o=t.i[n];o.required&&i("if(!m.hasOwnProperty(%j))",o.name)("throw util.ProtocolError(%j,{instance:m})","missing required '"+o.name+"'")}return i("return m")};var u=t(14),h=t(32),f=t(33)},{14:14,32:32,33:33}],13:[function(t,i,n){i.exports=function(t){for(var i,n=a.codegen(["m","w"],t.name+"$encode")("if(!w)")("w=Writer.create()"),r=t.fieldsArray.slice().sort(a.compareFieldsById),e=0;e<r.length;++e){var s=r[e].resolve(),o=t.i.indexOf(s),u=s.resolvedType instanceof f?"int32":s.type,h=c.basic[u];i="m"+a.safeProp(s.name),s.map?(n("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",i,s.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",i)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(s.id<<3|2)>>>0,8|c.mapKey[s.keyType],s.keyType),h===g?n("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",o,i):n(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|h,u,i),n("}")("}")):s.repeated?(n("if(%s!=null&&%s.length){",i,i),s.packed&&c.packed[u]!==g?n("w.uint32(%i).fork()",(s.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",i)("w.%s(%s[i])",u,i)("w.ldelim()"):(n("for(var i=0;i<%s.length;++i)",i),h===g?l(n,s,o,i+"[i]"):n("w.uint32(%i).%s(%s[i])",(s.id<<3|h)>>>0,u,i)),n("}")):(s.optional&&n("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",i,s.name),h===g?l(n,s,o,i):n("w.uint32(%i).%s(%s)",(s.id<<3|h)>>>0,u,i))}return n("return w")};var f=t(14),c=t(32),a=t(33);function l(t,i,n,r){i.delimited?t("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",n,r,(i.id<<3|3)>>>0,(i.id<<3|4)>>>0):t("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",n,r,(i.id<<3|2)>>>0)}},{14:14,32:32,33:33}],14:[function(t,i,n){i.exports=s;var h=t(22),r=(((s.prototype=Object.create(h.prototype)).constructor=s).className="Enum",t(21)),e=t(33);function s(t,i,n,r,e,s){if(h.call(this,t,n),i&&"object"!=typeof i)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=r,this.comments=e||{},this.valuesOptions=s,this.n={},this.reserved=g,i)for(var o=Object.keys(i),u=0;u<o.length;++u)"number"==typeof i[o[u]]&&(this.valuesById[this.values[o[u]]=i[o[u]]]=o[u])}s.prototype.r=function(t){return t=this.e||t,h.prototype.r.call(this,t),Object.keys(this.values).forEach(t=>{var i=Object.assign({},this.o);this.n[t]=Object.assign(i,this.valuesOptions&&this.valuesOptions[t]&&this.valuesOptions[t].features)}),this},s.fromJSON=function(t,i){t=new s(t,i.values,i.options,i.comment,i.comments);return t.reserved=i.reserved,i.edition&&(t.e=i.edition),t.u="proto3",t},s.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return e.toObject(["edition",this.h(),"options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:g,"comment",t?this.comment:g,"comments",t?this.comments:g])},s.prototype.add=function(t,i,n,r){if(!e.isString(t))throw TypeError("name must be a string");if(!e.isInteger(i))throw TypeError("id must be an integer");if(this.values[t]!==g)throw Error("duplicate name '"+t+"' in "+this);if(this.isReservedId(i))throw Error("id "+i+" is reserved in "+this);if(this.isReservedName(t))throw Error("name '"+t+"' is reserved in "+this);if(this.valuesById[i]!==g){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+i+" in "+this);this.values[t]=i}else this.valuesById[this.values[t]=i]=t;return r&&(this.valuesOptions===g&&(this.valuesOptions={}),this.valuesOptions[t]=r||null),this.comments[t]=n||null,this},s.prototype.remove=function(t){if(!e.isString(t))throw TypeError("name must be a string");var i=this.values[t];if(null==i)throw Error("name '"+t+"' does not exist in "+this);return delete this.valuesById[i],delete this.values[t],delete this.comments[t],this.valuesOptions&&delete this.valuesOptions[t],this},s.prototype.isReservedId=function(t){return r.isReservedId(this.reserved,t)},s.prototype.isReservedName=function(t){return r.isReservedName(this.reserved,t)}},{21:21,22:22,33:33}],15:[function(t,i,n){i.exports=o;var r,u=t(22),e=(((o.prototype=Object.create(u.prototype)).constructor=o).className="Field",t(14)),h=t(32),f=t(33),c=/^required|optional|repeated$/;function o(t,i,n,r,e,s,o){if(f.isObject(r)?(o=e,s=r,r=e=g):f.isObject(e)&&(o=s,s=e,e=g),u.call(this,t,s),!f.isInteger(i)||i<0)throw TypeError("id must be a non-negative integer");if(!f.isString(n))throw TypeError("type must be a string");if(r!==g&&!c.test(r=r.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(e!==g&&!f.isString(e))throw TypeError("extend must be a string");this.rule=(r="proto3_optional"===r?"optional":r)&&"optional"!==r?r:g,this.type=n,this.id=i,this.extend=e||g,this.repeated="repeated"===r,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!f.Long&&h.long[n]!==g,this.bytes="bytes"===n,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.comment=o}o.fromJSON=function(t,i){t=new o(t,i.id,i.type,i.rule,i.extend,i.options,i.comment);return i.edition&&(t.e=i.edition),t.u="proto3",t},Object.defineProperty(o.prototype,"required",{get:function(){return"LEGACY_REQUIRED"===this.o.field_presence}}),Object.defineProperty(o.prototype,"optional",{get:function(){return!this.required}}),Object.defineProperty(o.prototype,"delimited",{get:function(){return this.resolvedType instanceof r&&"DELIMITED"===this.o.message_encoding}}),Object.defineProperty(o.prototype,"packed",{get:function(){return"PACKED"===this.o.repeated_field_encoding}}),Object.defineProperty(o.prototype,"hasPresence",{get:function(){return!this.repeated&&!this.map&&(this.partOf||this.declaringField||this.extensionField||"IMPLICIT"!==this.o.field_presence)}}),o.prototype.setOption=function(t,i,n){return u.prototype.setOption.call(this,t,i,n)},o.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return f.toObject(["edition",this.h(),"rule","optional"!==this.rule&&this.rule||g,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:g])},o.prototype.resolve=function(){var t;return this.resolved?this:((this.typeDefault=h.defaults[this.type])===g?(this.resolvedType=(this.declaringField||this).parent.lookupTypeOrEnum(this.type),this.resolvedType instanceof r?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 e&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(this.options.packed===g||!this.resolvedType||this.resolvedType instanceof e||delete this.options.packed,Object.keys(this.options).length||(this.options=g)),this.long?(this.typeDefault=f.Long.fromNumber(this.typeDefault,"u"==(this.type[0]||"")),Object.freeze&&Object.freeze(this.typeDefault)):this.bytes&&"string"==typeof this.typeDefault&&(f.base64.test(this.typeDefault)?f.base64.decode(this.typeDefault,t=f.newBuffer(f.base64.length(this.typeDefault)),0):f.utf8.write(this.typeDefault,t=f.newBuffer(f.utf8.length(this.typeDefault)),0),this.typeDefault=t),this.map?this.defaultValue=f.emptyObject:this.repeated?this.defaultValue=f.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof r&&(this.parent.ctor.prototype[this.name]=this.defaultValue),u.prototype.resolve.call(this))},o.prototype.f=function(t){var i;return"proto2"!==t&&"proto3"!==t?{}:(t={},"required"===this.rule&&(t.field_presence="LEGACY_REQUIRED"),this.parent&&h.defaults[this.type]===g&&(i=this.parent.get(this.type.split(".").pop()))&&i instanceof r&&i.group&&(t.message_encoding="DELIMITED"),!0===this.getOption("packed")?t.repeated_field_encoding="PACKED":!1===this.getOption("packed")&&(t.repeated_field_encoding="EXPANDED"),t)},o.prototype.r=function(t){return u.prototype.r.call(this,this.e||t)},o.d=function(n,r,e,s){return"function"==typeof r?r=f.decorateType(r).name:r&&"object"==typeof r&&(r=f.decorateEnum(r).name),function(t,i){f.decorateType(t.constructor).add(new o(i,n,r,e,{default:s}))}},o.c=function(t){r=t}},{14:14,22:22,32:32,33:33}],16:[function(t,i,n){var r=i.exports=t(17);r.build="light",r.load=function(t,i,n){return(i="function"==typeof i?(n=i,new r.Root):i||new r.Root).load(t,n)},r.loadSync=function(t,i){return(i=i||new r.Root).loadSync(t)},r.encoder=t(13),r.decoder=t(12),r.verifier=t(36),r.converter=t(11),r.ReflectionObject=t(22),r.Namespace=t(21),r.Root=t(26),r.Enum=t(14),r.Type=t(31),r.Field=t(15),r.OneOf=t(23),r.MapField=t(18),r.Service=t(30),r.Method=t(20),r.Message=t(19),r.wrappers=t(37),r.types=t(32),r.util=t(33),r.ReflectionObject.c(r.Root),r.Namespace.c(r.Type,r.Service,r.Enum),r.Root.c(r.Type),r.Field.c(r.Type)},{11:11,12:12,13:13,14:14,15:15,17:17,18:18,19:19,20:20,21:21,22:22,23:23,26:26,30:30,31:31,32:32,33:33,36:36,37:37}],17:[function(t,i,n){var r=n;function e(){r.util.c(),r.Writer.c(r.BufferWriter),r.Reader.c(r.BufferReader)}r.build="minimal",r.Writer=t(38),r.BufferWriter=t(39),r.Reader=t(24),r.BufferReader=t(25),r.util=t(35),r.rpc=t(28),r.roots=t(27),r.configure=e,e()},{24:24,25:25,27:27,28:28,35:35,38:38,39:39}],18:[function(t,i,n){i.exports=s;var o=t(15),r=(((s.prototype=Object.create(o.prototype)).constructor=s).className="MapField",t(32)),u=t(33);function s(t,i,n,r,e,s){if(o.call(this,t,i,r,g,g,e,s),!u.isString(n))throw TypeError("keyType must be a string");this.keyType=n,this.resolvedKeyType=null,this.map=!0}s.fromJSON=function(t,i){return new s(t,i.id,i.keyType,i.type,i.options,i.comment)},s.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return u.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:g])},s.prototype.resolve=function(){if(this.resolved)return this;if(r.mapKey[this.keyType]===g)throw Error("invalid key type: "+this.keyType);return o.prototype.resolve.call(this)},s.d=function(n,r,e){return"function"==typeof e?e=u.decorateType(e).name:e&&"object"==typeof e&&(e=u.decorateEnum(e).name),function(t,i){u.decorateType(t.constructor).add(new s(i,n,r,e))}}},{15:15,32:32,33:33}],19:[function(t,i,n){i.exports=e;var r=t(35);function e(t){if(t)for(var i=Object.keys(t),n=0;n<i.length;++n){var r=i[n];"__proto__"!==r&&(this[r]=t[r])}}e.create=function(t){return this.$type.create(t)},e.encode=function(t,i){return this.$type.encode(t,i)},e.encodeDelimited=function(t,i){return this.$type.encodeDelimited(t,i)},e.decode=function(t){return this.$type.decode(t)},e.decodeDelimited=function(t){return this.$type.decodeDelimited(t)},e.verify=function(t){return this.$type.verify(t)},e.fromObject=function(t){return this.$type.fromObject(t)},e.toObject=function(t,i){return this.$type.toObject(t,i)},e.prototype.toJSON=function(){return this.$type.toObject(this,r.toJSONOptions)}},{35:35}],20:[function(t,i,n){i.exports=r;var f=t(22),c=(((r.prototype=Object.create(f.prototype)).constructor=r).className="Method",t(33));function r(t,i,n,r,e,s,o,u,h){if(c.isObject(e)?(o=e,e=s=g):c.isObject(s)&&(o=s,s=g),i!==g&&!c.isString(i))throw TypeError("type must be a string");if(!c.isString(n))throw TypeError("requestType must be a string");if(!c.isString(r))throw TypeError("responseType must be a string");f.call(this,t,o),this.type=i||"rpc",this.requestType=n,this.requestStream=!!e||g,this.responseType=r,this.responseStream=!!s||g,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=u,this.parsedOptions=h}r.fromJSON=function(t,i){return new r(t,i.type,i.requestType,i.responseType,i.requestStream,i.responseStream,i.options,i.comment,i.parsedOptions)},r.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return c.toObject(["type","rpc"!==this.type&&this.type||g,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:g,"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),f.prototype.resolve.call(this))}},{22:22,33:33}],21:[function(t,i,n){i.exports=a;var s,o,u,r=t(22),h=(((a.prototype=Object.create(r.prototype)).constructor=a).className="Namespace",t(15)),f=t(33),c=t(23);function e(t,i){if(!t||!t.length)return g;for(var n={},r=0;r<t.length;++r)n[t[r].name]=t[r].toJSON(i);return n}function a(t,i){r.call(this,t,i),this.nested=g,this.a=null,this.l={},this.v=!0,this.b=!0}function l(t){t.a=null,t.l={};for(var i=t;i=i.parent;)i.l={};return t}a.fromJSON=function(t,i){return new a(t,i.options).addJSON(i.nested)},a.arrayToJSON=e,a.isReservedId=function(t,i){if(t)for(var n=0;n<t.length;++n)if("string"!=typeof t[n]&&t[n][0]<=i&&t[n][1]>i)return!0;return!1},a.isReservedName=function(t,i){if(t)for(var n=0;n<t.length;++n)if(t[n]===i)return!0;return!1},Object.defineProperty(a.prototype,"nestedArray",{get:function(){return this.a||(this.a=f.toArray(this.nested))}}),a.prototype.toJSON=function(t){return f.toObject(["options",this.options,"nested",e(this.nestedArray,t)])},a.prototype.addJSON=function(t){if(t)for(var i,n=Object.keys(t),r=0;r<n.length;++r)i=t[n[r]],this.add((i.fields!==g?s:i.values!==g?u:i.methods!==g?o:i.id!==g?h:a).fromJSON(n[r],i));return this},a.prototype.get=function(t){return this.nested&&this.nested[t]||null},a.prototype.getEnum=function(t){if(this.nested&&this.nested[t]instanceof u)return this.nested[t].values;throw Error("no such enum: "+t)},a.prototype.add=function(t){if(!(t instanceof h&&t.extend!==g||t instanceof s||t instanceof c||t instanceof u||t instanceof o||t instanceof a))throw TypeError("object must be a valid nested object");if(this.nested){var i=this.get(t.name);if(i){if(!(i instanceof a&&t instanceof a)||i instanceof s||i instanceof o)throw Error("duplicate name '"+t.name+"' in "+this);for(var n=i.nestedArray,r=0;r<n.length;++r)t.add(n[r]);this.remove(i),this.nested||(this.nested={}),t.setOptions(i.options,!0)}}else this.nested={};this.nested[t.name]=t,this instanceof s||this instanceof o||this instanceof u||this instanceof h||t.e||(t.e=t.u),this.v=!0,this.b=!0;for(var e=this;e=e.parent;)e.v=!0,e.b=!0;return t.onAdd(this),l(this)},a.prototype.remove=function(t){if(!(t instanceof r))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=g),t.onRemove(this),l(this)},a.prototype.define=function(t,i){if(f.isString(t))t=t.split(".");else if(!Array.isArray(t))throw TypeError("illegal path");if(t&&t.length&&""===t[0])throw Error("path must be relative");for(var n=this;0<t.length;){var r=t.shift();if(n.nested&&n.nested[r]){if(!((n=n.nested[r])instanceof a))throw Error("path conflicts with non-namespace objects")}else n.add(n=new a(r))}return i&&n.addJSON(i),n},a.prototype.resolveAll=function(){if(this.b){this.p(this.e);var t=this.nestedArray,i=0;for(this.resolve();i<t.length;)t[i]instanceof a?t[i++].resolveAll():t[i++].resolve();this.b=!1}return this},a.prototype.p=function(i){return this.v&&(this.v=!1,i=this.e||i,r.prototype.p.call(this,i),this.nestedArray.forEach(t=>{t.p(i)})),this},a.prototype.lookup=function(t,i,n){if("boolean"==typeof i?(n=i,i=g):i&&!Array.isArray(i)&&(i=[i]),f.isString(t)&&t.length){if("."===t)return this.root;t=t.split(".")}else if(!t.length)return this;var r=t.join(".");if(""===t[0])return this.root.lookup(t.slice(1),i);var e=this.root.y&&this.root.y["."+r];if(e&&(!i||~i.indexOf(e.constructor)))return e;if((e=this.w(t,r))&&(!i||~i.indexOf(e.constructor)))return e;if(!n)for(var s=this;s.parent;){if((e=s.parent.w(t,r))&&(!i||~i.indexOf(e.constructor)))return e;s=s.parent}return null},a.prototype.w=function(t,i){if(Object.prototype.hasOwnProperty.call(this.l,i))return this.l[i];var n=this.get(t[0]),r=null;if(n)1===t.length?r=n:n instanceof a&&(t=t.slice(1),r=n.w(t,t.join(".")));else for(var e=0;e<this.nestedArray.length;++e)this.a[e]instanceof a&&(n=this.a[e].w(t,i))&&(r=n);return this.l[i]=r},a.prototype.lookupType=function(t){var i=this.lookup(t,[s]);if(i)return i;throw Error("no such type: "+t)},a.prototype.lookupEnum=function(t){var i=this.lookup(t,[u]);if(i)return i;throw Error("no such Enum '"+t+"' in "+this)},a.prototype.lookupTypeOrEnum=function(t){var i=this.lookup(t,[s,u]);if(i)return i;throw Error("no such Type or Enum '"+t+"' in "+this)},a.prototype.lookupService=function(t){var i=this.lookup(t,[o]);if(i)return i;throw Error("no such Service '"+t+"' in "+this)},a.c=function(t,i,n){s=t,o=i,u=n}},{15:15,22:22,23:23,33:33}],22:[function(t,i,n){(i.exports=f).className="ReflectionObject";const r=t(23);var e,o=t(33),s={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY"},u={enum_type:"CLOSED",field_presence:"EXPLICIT",json_format:"LEGACY_BEST_EFFORT",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"EXPANDED",utf8_validation:"NONE"},h={enum_type:"OPEN",field_presence:"IMPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY"};function f(t,i){if(!o.isString(t))throw TypeError("name must be a string");if(i&&!o.isObject(i))throw TypeError("options must be an object");this.options=i,this.parsedOptions=null,this.name=t,this.e=null,this.u="proto2",this.o={},this.g=!1,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(f.prototype,{root:{get:function(){for(var t=this;null!==t.parent;)t=t.parent;return t}},fullName:{get:function(){for(var t=[this.name],i=this.parent;i;)t.unshift(i.name),i=i.parent;return t.join(".")}}}),f.prototype.toJSON=function(){throw Error()},f.prototype.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;t=t.root;t instanceof e&&t.j(this)},f.prototype.onRemove=function(t){t=t.root;t instanceof e&&t.O(this),this.parent=null,this.resolved=!1},f.prototype.resolve=function(){return this.resolved||this.root instanceof e&&(this.resolved=!0),this},f.prototype.p=function(t){return this.r(this.e||t)},f.prototype.r=function(t){if(!this.g){var i={};if(!t)throw Error("Unknown edition for "+this.fullName);var n=Object.assign(this.options?Object.assign({},this.options.features):{},this.f(t));if(this.e){if("proto2"===t)i=Object.assign({},u);else if("proto3"===t)i=Object.assign({},h);else{if("2023"!==t)throw Error("Unknown edition: "+t);i=Object.assign({},s)}this.o=Object.assign(i,n||{})}else{if(this.partOf instanceof r){t=Object.assign({},this.partOf.o);this.o=Object.assign(t,n||{})}else if(!this.declaringField){if(!this.parent)throw Error("Unable to find a parent for "+this.fullName);i=Object.assign({},this.parent.o);this.o=Object.assign(i,n||{})}this.extensionField&&(this.extensionField.o=this.o)}this.g=!0}},f.prototype.f=function(){return{}},f.prototype.getOption=function(t){return this.options?this.options[t]:g},f.prototype.setOption=function(t,i,n){return this.options||(this.options={}),/^features\./.test(t)?o.setProperty(this.options,t,i,n):n&&this.options[t]!==g||(this.getOption(t)!==i&&(this.resolved=!1),this.options[t]=i),this},f.prototype.setParsedOption=function(i,t,n){this.parsedOptions||(this.parsedOptions=[]);var r,e,s=this.parsedOptions;return n?(r=s.find(function(t){return Object.prototype.hasOwnProperty.call(t,i)}))?(e=r[i],o.setProperty(e,n,t)):((r={})[i]=o.setProperty({},n,t),s.push(r)):((e={})[i]=t,s.push(e)),this},f.prototype.setOptions=function(t,i){if(t)for(var n=Object.keys(t),r=0;r<n.length;++r)this.setOption(n[r],t[n[r]],i);return this},f.prototype.toString=function(){var t=this.constructor.className,i=this.fullName;return i.length?t+" "+i:t},f.prototype.h=function(){return this.e&&"proto3"!==this.e?this.e:g},f.c=function(t){e=t}},{23:23,33:33}],23:[function(t,i,n){i.exports=o;var e=t(22),r=(((o.prototype=Object.create(e.prototype)).constructor=o).className="OneOf",t(15)),s=t(33);function o(t,i,n,r){if(Array.isArray(i)||(n=i,i=g),e.call(this,t,n),i!==g&&!Array.isArray(i))throw TypeError("fieldNames must be an Array");this.oneof=i||[],this.fieldsArray=[],this.comment=r}function u(t){if(t.parent)for(var i=0;i<t.fieldsArray.length;++i)t.fieldsArray[i].parent||t.parent.add(t.fieldsArray[i])}o.fromJSON=function(t,i){return new o(t,i.oneof,i.options,i.comment)},o.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return s.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:g])},o.prototype.add=function(t){if(t instanceof r)return t.parent&&t.parent!==this.parent&&t.parent.remove(t),this.oneof.push(t.name),this.fieldsArray.push(t),u(t.partOf=this),this;throw TypeError("field must be a Field")},o.prototype.remove=function(t){if(!(t instanceof r))throw TypeError("field must be a Field");var i=this.fieldsArray.indexOf(t);if(i<0)throw Error(t+" is not a member of "+this);return this.fieldsArray.splice(i,1),-1<(i=this.oneof.indexOf(t.name))&&this.oneof.splice(i,1),t.partOf=null,this},o.prototype.onAdd=function(t){e.prototype.onAdd.call(this,t);for(var i=0;i<this.oneof.length;++i){var n=t.get(this.oneof[i]);n&&!n.partOf&&(n.partOf=this).fieldsArray.push(n)}u(this)},o.prototype.onRemove=function(t){for(var i,n=0;n<this.fieldsArray.length;++n)(i=this.fieldsArray[n]).parent&&i.parent.remove(i);e.prototype.onRemove.call(this,t)},Object.defineProperty(o.prototype,"isProto3Optional",{get:function(){var t;return null!=this.fieldsArray&&1===this.fieldsArray.length&&(null!=(t=this.fieldsArray[0]).options&&!0===t.options.proto3_optional)}}),o.d=function(){for(var n=Array(arguments.length),t=0;t<arguments.length;)n[t]=arguments[t++];return function(t,i){s.decorateType(t.constructor).add(new o(i,n)),Object.defineProperty(t,i,{get:s.oneOfGetter(n),set:s.oneOfSetter(n)})}}},{15:15,22:22,33:33}],24:[function(t,i,n){i.exports=h;var r,e=t(35),s=e.LongBits,o=e.utf8;function u(t,i){return RangeError("index out of range: "+t.pos+" + "+(i||1)+" > "+t.len)}function h(t){this.buf=t,this.pos=0,this.len=t.length}function f(){return e.Buffer?function(t){return(h.create=function(t){return e.Buffer.isBuffer(t)?new r(t):a(t)})(t)}:a}var c,a="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new h(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new h(t);throw Error("illegal buffer")};function l(){var t=new s(0,0),i=0;if(!(4<this.len-this.pos)){for(;i<3;++i){if(this.pos>=this.len)throw u(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*i)>>>0,t}for(;i<4;++i)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(i=0,4<this.len-this.pos){for(;i<5;++i)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}else for(;i<5;++i){if(this.pos>=this.len)throw u(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function d(t,i){return(t[i-4]|t[i-3]<<8|t[i-2]<<16|t[i-1]<<24)>>>0}function v(){if(this.pos+8>this.len)throw u(this,8);return new s(d(this.buf,this.pos+=4),d(this.buf,this.pos+=4))}h.create=f(),h.prototype.k=e.Array.prototype.subarray||e.Array.prototype.slice,h.prototype.uint32=(c=4294967295,function(){if(c=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(c=(c|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128||(c=(c|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128||(c=(c|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128||(c=(c|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128||!((this.pos+=5)>this.len))))))return c;throw this.pos=this.len,u(this,10)}),h.prototype.int32=function(){return 0|this.uint32()},h.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},h.prototype.bool=function(){return 0!==this.uint32()},h.prototype.fixed32=function(){if(this.pos+4>this.len)throw u(this,4);return d(this.buf,this.pos+=4)},h.prototype.sfixed32=function(){if(this.pos+4>this.len)throw u(this,4);return 0|d(this.buf,this.pos+=4)},h.prototype.float=function(){if(this.pos+4>this.len)throw u(this,4);var t=e.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},h.prototype.double=function(){if(this.pos+8>this.len)throw u(this,4);var t=e.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},h.prototype.bytes=function(){var t=this.uint32(),i=this.pos,n=this.pos+t;if(n>this.len)throw u(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(i,n):i===n?(t=e.Buffer)?t.alloc(0):new this.buf.constructor(0):this.k.call(this.buf,i,n)},h.prototype.string=function(){var t=this.bytes();return o.read(t,0,t.length)},h.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw u(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw u(this)}while(128&this.buf[this.pos++]);return this},h.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},h.c=function(t){r=t,h.create=f(),r.c();var i=e.Long?"toLong":"toNumber";e.merge(h.prototype,{int64:function(){return l.call(this)[i](!1)},uint64:function(){return l.call(this)[i](!0)},sint64:function(){return l.call(this).zzDecode()[i](!1)},fixed64:function(){return v.call(this)[i](!0)},sfixed64:function(){return v.call(this)[i](!1)}})}},{35:35}],25:[function(t,i,n){i.exports=s;var r=t(24),e=((s.prototype=Object.create(r.prototype)).constructor=s,t(35));function s(t){r.call(this,t)}s.c=function(){e.Buffer&&(s.prototype.k=e.Buffer.prototype.slice)},s.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},s.c()},{24:24,35:35}],26:[function(t,i,n){i.exports=h;var r,d,v,e=t(21),s=(((h.prototype=Object.create(e.prototype)).constructor=h).className="Root",t(15)),o=t(14),u=t(23),b=t(33);function h(t){e.call(this,"",t),this.deferred=[],this.files=[],this.e="proto2",this.y={}}function p(){}h.fromJSON=function(t,i){return i=i||new h,t.options&&i.setOptions(t.options),i.addJSON(t.nested).resolveAll()},h.prototype.resolvePath=b.path.resolve,h.prototype.fetch=b.fetch,h.prototype.load=function t(i,s,e){"function"==typeof s&&(e=s,s=g);var o=this;if(!e)return b.asPromise(t,o,i,s);var u=e===p;function h(t,i){if(e){if(u)throw t;i&&i.resolveAll();var n=e;e=null,n(t,i)}}function f(t){var i=t.lastIndexOf("google/protobuf/");if(-1<i){t=t.substring(i);if(t in v)return t}return null}function c(t,i){try{if(b.isString(i)&&"{"==(i[0]||"")&&(i=JSON.parse(i)),b.isString(i)){d.filename=t;var n,r=d(i,o,s),e=0;if(r.imports)for(;e<r.imports.length;++e)(n=f(r.imports[e])||o.resolvePath(t,r.imports[e]))&&a(n);if(r.weakImports)for(e=0;e<r.weakImports.length;++e)(n=f(r.weakImports[e])||o.resolvePath(t,r.weakImports[e]))&&a(n,!0)}else o.setOptions(i.options).addJSON(i.nested)}catch(t){h(t)}u||l||h(null,o)}function a(n,r){if(n=f(n)||n,!~o.files.indexOf(n))if(o.files.push(n),n in v)u?c(n,v[n]):(++l,setTimeout(function(){--l,c(n,v[n])}));else if(u){var t;try{t=b.fs.readFileSync(n).toString("utf8")}catch(t){return void(r||h(t))}c(n,t)}else++l,o.fetch(n,function(t,i){--l,e&&(t?r?l||h(null,o):h(t):c(n,i))})}var l=0;b.isString(i)&&(i=[i]);for(var n,r=0;r<i.length;++r)(n=o.resolvePath("",i[r]))&&a(n);return u?o.resolveAll():l||h(null,o),o},h.prototype.loadSync=function(t,i){if(b.isNode)return this.load(t,i,p);throw Error("not supported")},h.prototype.resolveAll=function(){if(!this.b)return this;if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(t){return"'extend "+t.extend+"' in "+t.parent.fullName}).join(", "));return e.prototype.resolveAll.call(this)};var f=/^[A-Z]/;function c(t,i){var n,r=i.parent.lookup(i.extend);if(r)return n=new s(i.fullName,i.id,i.type,i.rule,g,i.options),r.get(n.name)||((n.declaringField=i).extensionField=n,r.add(n)),1}h.prototype.j=function(t){if(t instanceof s)t.extend===g||t.extensionField||c(0,t)||this.deferred.push(t);else if(t instanceof o)f.test(t.name)&&(t.parent[t.name]=t.values);else if(!(t instanceof u)){if(t instanceof r)for(var i=0;i<this.deferred.length;)c(0,this.deferred[i])?this.deferred.splice(i,1):++i;for(var n=0;n<t.nestedArray.length;++n)this.j(t.a[n]);f.test(t.name)&&(t.parent[t.name]=t)}(t instanceof r||t instanceof o||t instanceof s)&&(this.y[t.fullName]=t)},h.prototype.O=function(t){var i;if(t instanceof s)t.extend!==g&&(t.extensionField?(t.extensionField.parent.remove(t.extensionField),t.extensionField=null):-1<(i=this.deferred.indexOf(t))&&this.deferred.splice(i,1));else if(t instanceof o)f.test(t.name)&&delete t.parent[t.name];else if(t instanceof e){for(var n=0;n<t.nestedArray.length;++n)this.O(t.a[n]);f.test(t.name)&&delete t.parent[t.name]}delete this.y[t.fullName]},h.c=function(t,i,n){r=t,d=i,v=n}},{14:14,15:15,21:21,23:23,33:33}],27:[function(t,i,n){i.exports={}},{}],28:[function(t,i,n){n.Service=t(29)},{29:29}],29:[function(t,i,n){i.exports=r;var u=t(35);function r(t,i,n){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");u.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!i,this.responseDelimited=!!n}((r.prototype=Object.create(u.EventEmitter.prototype)).constructor=r).prototype.rpcCall=function t(n,i,r,e,s){if(!e)throw TypeError("request must be specified");var o=this;if(!s)return u.asPromise(t,o,n,i,r,e);if(!o.rpcImpl)return setTimeout(function(){s(Error("already ended"))},0),g;try{return o.rpcImpl(n,i[o.requestDelimited?"encodeDelimited":"encode"](e).finish(),function(t,i){if(t)return o.emit("error",t,n),s(t);if(null===i)return o.end(!0),g;if(!(i instanceof r))try{i=r[o.responseDelimited?"decodeDelimited":"decode"](i)}catch(t){return o.emit("error",t,n),s(t)}return o.emit("data",i,n),s(null,i)})}catch(t){return o.emit("error",t,n),setTimeout(function(){s(t)},0),g}},r.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{35:35}],30:[function(t,i,n){i.exports=o;var r=t(21),s=(((o.prototype=Object.create(r.prototype)).constructor=o).className="Service",t(20)),u=t(33),h=t(28);function o(t,i){r.call(this,t,i),this.methods={},this.A=null}function e(t){return t.A=null,t}o.fromJSON=function(t,i){var n=new o(t,i.options);if(i.methods)for(var r=Object.keys(i.methods),e=0;e<r.length;++e)n.add(s.fromJSON(r[e],i.methods[r[e]]));return i.nested&&n.addJSON(i.nested),i.edition&&(n.e=i.edition),n.comment=i.comment,n.u="proto3",n},o.prototype.toJSON=function(t){var i=r.prototype.toJSON.call(this,t),n=!!t&&!!t.keepComments;return u.toObject(["edition",this.h(),"options",i&&i.options||g,"methods",r.arrayToJSON(this.methodsArray,t)||{},"nested",i&&i.nested||g,"comment",n?this.comment:g])},Object.defineProperty(o.prototype,"methodsArray",{get:function(){return this.A||(this.A=u.toArray(this.methods))}}),o.prototype.get=function(t){return this.methods[t]||r.prototype.get.call(this,t)},o.prototype.resolveAll=function(){if(this.b){r.prototype.resolve.call(this);for(var t=this.methodsArray,i=0;i<t.length;++i)t[i].resolve()}return this},o.prototype.p=function(i){return this.v&&(i=this.e||i,r.prototype.p.call(this,i),this.methodsArray.forEach(t=>{t.p(i)})),this},o.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);return t instanceof s?e((this.methods[t.name]=t).parent=this):r.prototype.add.call(this,t)},o.prototype.remove=function(t){if(t instanceof s){if(this.methods[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.methods[t.name],t.parent=null,e(this)}return r.prototype.remove.call(this,t)},o.prototype.create=function(t,i,n){for(var r,e=new h.Service(t,i,n),s=0;s<this.methodsArray.length;++s){var o=u.lcFirst((r=this.A[s]).resolve().name).replace(/[^$\w_]/g,"");e[o]=u.codegen(["r","c"],u.isReserved(o)?o+"_":o)("return this.rpcCall(m,q,s,r,c)")({m:r,q:r.resolvedRequestType.ctor,s:r.resolvedResponseType.ctor})}return e}},{20:20,21:21,28:28,33:33}],31:[function(t,i,n){i.exports=w;var o=t(21),u=(((w.prototype=Object.create(o.prototype)).constructor=w).className="Type",t(14)),h=t(23),f=t(15),c=t(18),a=t(30),e=t(19),s=t(24),l=t(38),d=t(33),v=t(13),b=t(12),p=t(36),y=t(11),m=t(37);function w(t,i){t=t.replace(/\W/g,""),o.call(this,t,i),this.fields={},this.oneofs=g,this.extensions=g,this.reserved=g,this.group=g,this.T=null,this.i=null,this._=null,this.S=null}function r(t){return t.T=t.i=t._=null,delete t.encode,delete t.decode,delete t.verify,t}Object.defineProperties(w.prototype,{fieldsById:{get:function(){if(!this.T){this.T={};for(var t=Object.keys(this.fields),i=0;i<t.length;++i){var n=this.fields[t[i]],r=n.id;if(this.T[r])throw Error("duplicate id "+r+" in "+this);this.T[r]=n}}return this.T}},fieldsArray:{get:function(){return this.i||(this.i=d.toArray(this.fields))}},oneofsArray:{get:function(){return this._||(this._=d.toArray(this.oneofs))}},ctor:{get:function(){return this.S||(this.ctor=w.generateConstructor(this)())},set:function(t){for(var i=t.prototype,n=(i instanceof e||((t.prototype=new e).constructor=t,d.merge(t.prototype,i)),t.$type=t.prototype.$type=this,d.merge(t,e,!0),this.S=t,0);n<this.fieldsArray.length;++n)this.i[n].resolve();for(var r={},n=0;n<this.oneofsArray.length;++n)r[this._[n].resolve().name]={get:d.oneOfGetter(this._[n].oneof),set:d.oneOfSetter(this._[n].oneof)};n&&Object.defineProperties(t.prototype,r)}}}),w.generateConstructor=function(t){for(var i,n=d.codegen(["p"],t.name),r=0;r<t.fieldsArray.length;++r)(i=t.i[r]).map?n("this%s={}",d.safeProp(i.name)):i.repeated&&n("this%s=[]",d.safeProp(i.name));return n("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},w.fromJSON=function(t,i){for(var n=new w(t,i.options),r=(n.extensions=i.extensions,n.reserved=i.reserved,Object.keys(i.fields)),e=0;e<r.length;++e)n.add((void 0!==i.fields[r[e]].keyType?c:f).fromJSON(r[e],i.fields[r[e]]));if(i.oneofs)for(r=Object.keys(i.oneofs),e=0;e<r.length;++e)n.add(h.fromJSON(r[e],i.oneofs[r[e]]));if(i.nested)for(r=Object.keys(i.nested),e=0;e<r.length;++e){var s=i.nested[r[e]];n.add((s.id!==g?f:s.fields!==g?w:s.values!==g?u:s.methods!==g?a:o).fromJSON(r[e],s))}return i.extensions&&i.extensions.length&&(n.extensions=i.extensions),i.reserved&&i.reserved.length&&(n.reserved=i.reserved),i.group&&(n.group=!0),i.comment&&(n.comment=i.comment),i.edition&&(n.e=i.edition),n.u="proto3",n},w.prototype.toJSON=function(t){var i=o.prototype.toJSON.call(this,t),n=!!t&&!!t.keepComments;return d.toObject(["edition",this.h(),"options",i&&i.options||g,"oneofs",o.arrayToJSON(this.oneofsArray,t),"fields",o.arrayToJSON(this.fieldsArray.filter(function(t){return!t.declaringField}),t)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:g,"reserved",this.reserved&&this.reserved.length?this.reserved:g,"group",this.group||g,"nested",i&&i.nested||g,"comment",n?this.comment:g])},w.prototype.resolveAll=function(){if(this.b){o.prototype.resolveAll.call(this);for(var t=this.oneofsArray,i=0;i<t.length;)t[i++].resolve();for(var n=this.fieldsArray,i=0;i<n.length;)n[i++].resolve()}return this},w.prototype.p=function(i){return this.v&&(i=this.e||i,o.prototype.p.call(this,i),this.oneofsArray.forEach(t=>{t.r(i)}),this.fieldsArray.forEach(t=>{t.r(i)})),this},w.prototype.get=function(t){return this.fields[t]||this.oneofs&&this.oneofs[t]||this.nested&&this.nested[t]||null},w.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);if(t instanceof f&&t.extend===g){if((this.T||this.fieldsById)[t.id])throw Error("duplicate id "+t.id+" in "+this);if(this.isReservedId(t.id))throw Error("id "+t.id+" is reserved in "+this);if(this.isReservedName(t.name))throw Error("name '"+t.name+"' is reserved in "+this);return t.parent&&t.parent.remove(t),(this.fields[t.name]=t).message=this,t.onAdd(this),r(this)}return t instanceof h?(this.oneofs||(this.oneofs={}),(this.oneofs[t.name]=t).onAdd(this),r(this)):o.prototype.add.call(this,t)},w.prototype.remove=function(t){if(t instanceof f&&t.extend===g){if(this.fields&&this.fields[t.name]===t)return delete this.fields[t.name],t.parent=null,t.onRemove(this),r(this);throw Error(t+" is not a member of "+this)}if(t instanceof h){if(this.oneofs&&this.oneofs[t.name]===t)return delete this.oneofs[t.name],t.parent=null,t.onRemove(this),r(this);throw Error(t+" is not a member of "+this)}return o.prototype.remove.call(this,t)},w.prototype.isReservedId=function(t){return o.isReservedId(this.reserved,t)},w.prototype.isReservedName=function(t){return o.isReservedName(this.reserved,t)},w.prototype.create=function(t){return new this.ctor(t)},w.prototype.setup=function(){for(var t=this.fullName,i=[],n=0;n<this.fieldsArray.length;++n)i.push(this.i[n].resolve().resolvedType);this.encode=v(this)({Writer:l,types:i,util:d}),this.decode=b(this)({Reader:s,types:i,util:d}),this.verify=p(this)({types:i,util:d}),this.fromObject=y.fromObject(this)({types:i,util:d}),this.toObject=y.toObject(this)({types:i,util:d});var r,t=m[t];return t&&((r=Object.create(this)).fromObject=this.fromObject,this.fromObject=t.fromObject.bind(r),r.toObject=this.toObject,this.toObject=t.toObject.bind(r)),this},w.prototype.encode=function(t,i){return this.setup().encode(t,i)},w.prototype.encodeDelimited=function(t,i){return this.encode(t,i&&i.len?i.fork():i).ldelim()},w.prototype.decode=function(t,i){return this.setup().decode(t,i)},w.prototype.decodeDelimited=function(t){return t instanceof s||(t=s.create(t)),this.decode(t,t.uint32())},w.prototype.verify=function(t){return this.setup().verify(t)},w.prototype.fromObject=function(t){return this.setup().fromObject(t)},w.prototype.toObject=function(t,i){return this.setup().toObject(t,i)},w.d=function(i){return function(t){d.decorateType(t,i)}}},{11:11,12:12,13:13,14:14,15:15,18:18,19:19,21:21,23:23,24:24,30:30,33:33,36:36,37:37,38:38}],32:[function(t,i,n){var t=t(33),e=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function r(t,i){var n=0,r={};for(i|=0;n<t.length;)r[e[n+i]]=t[n++];return r}n.basic=r([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),n.defaults=r([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",t.emptyArray,null]),n.long=r([0,0,0,1,1],7),n.mapKey=r([0,0,0,5,5,0,0,0,1,1,0,2],2),n.packed=r([1,5,0,0,0,5,5,0,0,0,1,1,0])},{33:33}],33:[function(n,t,i){var r,e,s=t.exports=n(35),o=n(27),u=(s.codegen=n(3),s.fetch=n(5),s.path=n(8),s.fs=s.inquire("fs"),s.toArray=function(t){if(t){for(var i=Object.keys(t),n=Array(i.length),r=0;r<i.length;)n[r]=t[i[r++]];return n}return[]},s.toObject=function(t){for(var i={},n=0;n<t.length;){var r=t[n++],e=t[n++];e!==g&&(i[r]=e)}return i},/\\/g),h=/"/g,f=(s.isReserved=function(t){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(t)},s.safeProp=function(t){return!/^[$\w_]+$/.test(t)||s.isReserved(t)?'["'+t.replace(u,"\\\\").replace(h,'\\"')+'"]':"."+t},s.ucFirst=function(t){return(t[0]||"").toUpperCase()+t.substring(1)},/_([a-z])/g),c=(s.camelCase=function(t){return t.substring(0,1)+t.substring(1).replace(f,function(t,i){return i.toUpperCase()})},s.compareFieldsById=function(t,i){return t.id-i.id},s.decorateType=function(t,i){return t.$type?(i&&t.$type.name!==i&&(s.decorateRoot.remove(t.$type),t.$type.name=i,s.decorateRoot.add(t.$type)),t.$type):(i=new(r=r||n(31))(i||t.name),s.decorateRoot.add(i),i.ctor=t,Object.defineProperty(t,"$type",{value:i,enumerable:!1}),Object.defineProperty(t.prototype,"$type",{value:i,enumerable:!1}),i)},0);s.decorateEnum=function(t){var i;return t.$type||(i=new(e=e||n(14))("Enum"+c++,t),s.decorateRoot.add(i),Object.defineProperty(t,"$type",{value:i,enumerable:!1}),i)},s.setProperty=function(t,i,n,s){if("object"!=typeof t)throw TypeError("dst must be an object");if(i)return function t(i,n,r){var e=n.shift();if("__proto__"!==e&&"prototype"!==e)if(0<n.length)i[e]=t(i[e]||{},n,r);else{if((n=i[e])&&s)return i;n&&(r=[].concat(n).concat(r)),i[e]=r}return i}(t,i=i.split("."),n);throw TypeError("path must be specified")},Object.defineProperty(s,"decorateRoot",{get:function(){return o.decorated||(o.decorated=new(n(26)))}})},{14:14,26:26,27:27,3:3,31:31,35:35,5:5,8:8}],34:[function(t,i,n){i.exports=e;var r=t(35);function e(t,i){this.lo=t>>>0,this.hi=i>>>0}var s=e.zero=new e(0,0),o=(s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1},e.zeroHash="\0\0\0\0\0\0\0\0",e.fromNumber=function(t){var i,n;return 0===t?s:(n=(t=(i=t<0)?-t:t)>>>0,t=(t-n)/4294967296>>>0,i&&(t=~t>>>0,n=~n>>>0,4294967295<++n&&(n=0,4294967295<++t&&(t=0))),new e(n,t))},e.from=function(t){if("number"==typeof t)return e.fromNumber(t);if(r.isString(t)){if(!r.Long)return e.fromNumber(parseInt(t,10));t=r.Long.fromString(t)}return t.low||t.high?new e(t.low>>>0,t.high>>>0):s},e.prototype.toNumber=function(t){var i;return!t&&this.hi>>>31?(t=1+~this.lo>>>0,i=~this.hi>>>0,-(t+4294967296*(i=t?i:i+1>>>0))):this.lo+4294967296*this.hi},e.prototype.toLong=function(t){return r.Long?new r.Long(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}},String.prototype.charCodeAt);e.fromHash=function(t){return"\0\0\0\0\0\0\0\0"===t?s:new e((o.call(t,0)|o.call(t,1)<<8|o.call(t,2)<<16|o.call(t,3)<<24)>>>0,(o.call(t,4)|o.call(t,5)<<8|o.call(t,6)<<16|o.call(t,7)<<24)>>>0)},e.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},e.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},e.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},e.prototype.length=function(){var t=this.lo,i=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0==n?0==i?t<16384?t<128?1:2:t<2097152?3:4:i<16384?i<128?5:6:i<2097152?7:8:n<128?9:10}},{35:35}],35:[function(t,i,n){var r=n;function e(t,i,n){for(var r=Object.keys(i),e=0;e<r.length;++e)t[r[e]]!==g&&n||(t[r[e]]=i[r[e]]);return t}function s(t){function n(t,i){if(!(this instanceof n))return new n(t,i);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,n):Object.defineProperty(this,"stack",{value:Error().stack||""}),i&&e(this,i)}return n.prototype=Object.create(Error.prototype,{constructor:{value:n,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return t},set:g,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),n}r.asPromise=t(1),r.base64=t(2),r.EventEmitter=t(4),r.float=t(6),r.inquire=t(7),r.utf8=t(10),r.pool=t(9),r.LongBits=t(34),r.isNode=!!("undefined"!=typeof global&&global&&global.process&&global.process.versions&&global.process.versions.node),r.global=r.isNode&&global||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},r.isString=function(t){return"string"==typeof t||t instanceof String},r.isObject=function(t){return t&&"object"==typeof t},r.isset=r.isSet=function(t,i){var n=t[i];return null!=n&&t.hasOwnProperty(i)&&("object"!=typeof n||0<(Array.isArray(n)?n:Object.keys(n)).length)},r.Buffer=null,r.x=null,r.N=null,r.newBuffer=function(t){return"number"==typeof t?r.Buffer?r.N(t):new r.Array(t):r.Buffer?r.x(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(t){return t?r.LongBits.from(t).toHash():r.LongBits.zeroHash},r.longFromHash=function(t,i){t=r.LongBits.fromHash(t);return r.Long?r.Long.fromBits(t.lo,t.hi,i):t.toNumber(!!i)},r.merge=e,r.lcFirst=function(t){return(t[0]||"").toLowerCase()+t.substring(1)},r.newError=s,r.ProtocolError=s("ProtocolError"),r.oneOfGetter=function(t){for(var n={},i=0;i<t.length;++i)n[t[i]]=1;return function(){for(var t=Object.keys(this),i=t.length-1;-1<i;--i)if(1===n[t[i]]&&this[t[i]]!==g&&null!==this[t[i]])return t[i]}},r.oneOfSetter=function(n){return function(t){for(var i=0;i<n.length;++i)n[i]!==t&&delete this[n[i]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r.c=function(){var n=r.Buffer;n?(r.x=n.from!==Uint8Array.from&&n.from||function(t,i){return new n(t,i)},r.N=n.allocUnsafe||function(t){return new n(t)}):r.x=r.N=null}},{1:1,10:10,2:2,34:34,4:4,6:6,7:7,9:9}],36:[function(t,i,n){i.exports=function(t){var i=h.codegen(["m"],t.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),n=t.oneofsArray,r={};n.length&&i("var p={}");for(var e=0;e<t.fieldsArray.length;++e){var s,o=t.i[e].resolve(),u="m"+h.safeProp(o.name);o.optional&&i("if(%s!=null&&m.hasOwnProperty(%j)){",u,o.name),o.map?(i("if(!util.isObject(%s))",u)("return%j",f(o,"object"))("var k=Object.keys(%s)",u)("for(var i=0;i<k.length;++i){"),function(t,i,n){switch(i.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.key32Re.test(%s))",n)("return%j",f(i,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.key64Re.test(%s))",n)("return%j",f(i,"integer|Long key"));break;case"bool":t("if(!util.key2Re.test(%s))",n)("return%j",f(i,"boolean key"))}}(i,o,"k[i]"),c(i,o,e,u+"[k[i]]")("}")):o.repeated?(i("if(!Array.isArray(%s))",u)("return%j",f(o,"array"))("for(var i=0;i<%s.length;++i){",u),c(i,o,e,u+"[i]")("}")):(o.partOf&&(s=h.safeProp(o.partOf.name),1===r[o.partOf.name]&&i("if(p%s===1)",s)("return%j",o.partOf.name+": multiple values"),r[o.partOf.name]=1,i("p%s=1",s)),c(i,o,e,u)),o.optional&&i("}")}return i("return null")};var o=t(14),h=t(33);function f(t,i){return t.name+": "+i+(t.repeated&&"array"!==i?"[]":t.map&&"object"!==i?"{k:"+t.keyType+"}":"")+" expected"}function c(t,i,n,r){if(i.resolvedType)if(i.resolvedType instanceof o){t("switch(%s){",r)("default:")("return%j",f(i,"enum value"));for(var e=Object.keys(i.resolvedType.values),s=0;s<e.length;++s)t("case %i:",i.resolvedType.values[e[s]]);t("break")("}")}else t("{")("var e=types[%i].verify(%s);",n,r)("if(e)")("return%j+e",i.name+".")("}");else switch(i.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.isInteger(%s))",r)("return%j",f(i,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",r,r,r,r)("return%j",f(i,"integer|Long"));break;case"float":case"double":t('if(typeof %s!=="number")',r)("return%j",f(i,"number"));break;case"bool":t('if(typeof %s!=="boolean")',r)("return%j",f(i,"boolean"));break;case"string":t("if(!util.isString(%s))",r)("return%j",f(i,"string"));break;case"bytes":t('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',r,r,r)("return%j",f(i,"buffer"))}return t}},{14:14,33:33}],37:[function(t,i,n){var o=t(19);n[".google.protobuf.Any"]={fromObject:function(t){if(t&&t["@type"]){var i,n=t["@type"].substring(1+t["@type"].lastIndexOf("/")),n=this.lookup(n);if(n)return~(i="."==(t["@type"][0]||"")?t["@type"].slice(1):t["@type"]).indexOf("/")||(i="/"+i),this.create({type_url:i,value:n.encode(n.fromObject(t)).finish()})}return this.fromObject(t)},toObject:function(t,i){var n,r,e="",s="";return i&&i.json&&t.type_url&&t.value&&(s=t.type_url.substring(1+t.type_url.lastIndexOf("/")),e=t.type_url.substring(0,1+t.type_url.lastIndexOf("/")),(n=this.lookup(s))&&(t=n.decode(t.value))),!(t instanceof this.ctor)&&t instanceof o?(n=t.$type.toObject(t,i),r="."===t.$type.fullName[0]?t.$type.fullName.slice(1):t.$type.fullName,n["@type"]=s=(e=""===e?"type.googleapis.com/":e)+r,n):this.toObject(t,i)}}},{19:19}],38:[function(t,i,n){i.exports=a;var r,e=t(35),s=e.LongBits,o=e.base64,u=e.utf8;function h(t,i,n){this.fn=t,this.len=i,this.next=g,this.val=n}function f(){}function c(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function a(){this.len=0,this.head=new h(f,0,0),this.tail=this.head,this.states=null}function l(){return e.Buffer?function(){return(a.create=function(){return new r})()}:function(){return new a}}function d(t,i,n){i[n]=255&t}function v(t,i){this.len=t,this.next=g,this.val=i}function b(t,i,n){for(;t.hi;)i[n++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;127<t.lo;)i[n++]=127&t.lo|128,t.lo=t.lo>>>7;i[n++]=t.lo}function p(t,i,n){i[n]=255&t,i[n+1]=t>>>8&255,i[n+2]=t>>>16&255,i[n+3]=t>>>24}a.create=l(),a.alloc=function(t){return new e.Array(t)},e.Array!==Array&&(a.alloc=e.pool(a.alloc,e.Array.prototype.subarray)),a.prototype.I=function(t,i,n){return this.tail=this.tail.next=new h(t,i,n),this.len+=i,this},(v.prototype=Object.create(h.prototype)).fn=function(t,i,n){for(;127<t;)i[n++]=127&t|128,t>>>=7;i[n]=t},a.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new v((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},a.prototype.int32=function(t){return t<0?this.I(b,10,s.fromNumber(t)):this.uint32(t)},a.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},a.prototype.int64=a.prototype.uint64=function(t){t=s.from(t);return this.I(b,t.length(),t)},a.prototype.sint64=function(t){t=s.from(t).zzEncode();return this.I(b,t.length(),t)},a.prototype.bool=function(t){return this.I(d,1,t?1:0)},a.prototype.sfixed32=a.prototype.fixed32=function(t){return this.I(p,4,t>>>0)},a.prototype.sfixed64=a.prototype.fixed64=function(t){t=s.from(t);return this.I(p,4,t.lo).I(p,4,t.hi)},a.prototype.float=function(t){return this.I(e.float.writeFloatLE,4,t)},a.prototype.double=function(t){return this.I(e.float.writeDoubleLE,8,t)};var y=e.Array.prototype.set?function(t,i,n){i.set(t,n)}:function(t,i,n){for(var r=0;r<t.length;++r)i[n+r]=t[r]};a.prototype.bytes=function(t){var i,n=t.length>>>0;return n?(e.isString(t)&&(i=a.alloc(n=o.length(t)),o.decode(t,i,0),t=i),this.uint32(n).I(y,n,t)):this.I(d,1,0)},a.prototype.string=function(t){var i=u.length(t);return i?this.uint32(i).I(u.write,i,t):this.I(d,1,0)},a.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new h(f,0,0),this.len=0,this},a.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new h(f,0,0),this.len=0),this},a.prototype.ldelim=function(){var t=this.head,i=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=i,this.len+=n),this},a.prototype.finish=function(){for(var t=this.head.next,i=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,i,n),n+=t.len,t=t.next;return i},a.c=function(t){r=t,a.create=l(),r.c()}},{35:35}],39:[function(t,i,n){i.exports=s;var r=t(38),e=((s.prototype=Object.create(r.prototype)).constructor=s,t(35));function s(){r.call(this)}function o(t,i,n){t.length<40?e.utf8.write(t,i,n):i.utf8Write?i.utf8Write(t,n):i.write(t,n)}s.c=function(){s.alloc=e.N,s.writeBytesBuffer=e.Buffer&&e.Buffer.prototype instanceof Uint8Array&&"set"===e.Buffer.prototype.set.name?function(t,i,n){i.set(t,n)}:function(t,i,n){if(t.copy)t.copy(i,n,0,t.length);else for(var r=0;r<t.length;)i[n++]=t[r++]}},s.prototype.bytes=function(t){var i=(t=e.isString(t)?e.x(t,"base64"):t).length>>>0;return this.uint32(i),i&&this.I(s.writeBytesBuffer,i,t),this},s.prototype.string=function(t){var i=e.Buffer.byteLength(t);return this.uint32(i),i&&this.I(o,i,t),this},s.c()},{35:35,38:38}]},{},[16])}();
|
|
7
|
+
var __protobufjs;!function(g){"use strict";var r,e;r={1:[function(t,i,n){i.exports=function(t,i){var n=Array(arguments.length-1),s=0,r=2,o=!0;for(;r<arguments.length;)n[s++]=arguments[r++];return new Promise(function(r,e){n[s]=function(t){if(o)if(o=!1,t)e(t);else{for(var i=Array(arguments.length-1),n=0;n<i.length;)i[n++]=arguments[n];r.apply(null,i)}};try{t.apply(i||null,n)}catch(t){o&&(o=!1,e(t))}})}},{}],2:[function(t,i,n){n.length=function(t){var i=t.length;if(!i)return 0;for(var n=0;1<--i%4&&"="==(t[0|i]||"");)++n;return Math.ceil(3*t.length)/4-n};for(var f=Array(64),h=Array(123),r=0;r<64;)h[f[r]=r<26?r+65:r<52?r+71:r<62?r-4:r-59|43]=r++;n.encode=function(t,i,n){for(var r,e=null,s=[],o=0,u=0;i<n;){var h=t[i++];switch(u){case 0:s[o++]=f[h>>2],r=(3&h)<<4,u=1;break;case 1:s[o++]=f[r|h>>4],r=(15&h)<<2,u=2;break;case 2:s[o++]=f[r|h>>6],s[o++]=f[63&h],u=0}8191<o&&((e=e||[]).push(String.fromCharCode.apply(String,s)),o=0)}return u&&(s[o++]=f[r],s[o++]=61,1===u&&(s[o++]=61)),e?(o&&e.push(String.fromCharCode.apply(String,s.slice(0,o))),e.join("")):String.fromCharCode.apply(String,s.slice(0,o))};var c="invalid encoding";n.decode=function(t,i,n){for(var r,e=n,s=0,o=0;o<t.length;){var u=t.charCodeAt(o++);if(61==u&&1<s)break;if((u=h[u])===g)throw Error(c);switch(s){case 0:r=u,s=1;break;case 1:i[n++]=r<<2|(48&u)>>4,r=u,s=2;break;case 2:i[n++]=(15&r)<<4|(60&u)>>2,r=u,s=3;break;case 3:i[n++]=(3&r)<<6|u,s=0}}if(1===s)throw Error(c);return n-e},n.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},{}],3:[function(t,i,n){i.exports=a;var r=/^(?: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)$/;function a(i,n){"string"==typeof i&&(n=i,i=g);var h=[];function f(t){if("string"!=typeof t){var i=c();if(a.verbose&&console.log("codegen: "+i),i="return "+i,t){for(var n=Object.keys(t),r=Array(n.length+1),e=Array(n.length),s=0;s<n.length;)r[s]=n[s],e[s]=t[n[s++]];return r[s]=i,Function.apply(null,r).apply(null,e)}return Function(i)()}for(var o=Array(arguments.length-1),u=0;u<o.length;)o[u]=arguments[++u];if(u=0,t=t.replace(/%([%dfijs])/g,function(t,i){var n=o[u++];switch(i){case"d":case"f":return""+ +(""+n);case"i":return""+Math.floor(n);case"j":return JSON.stringify(n);case"s":return""+n}return"%"}),u!==o.length)throw Error("parameter count mismatch");return h.push(t),f}function c(t){return"function "+function(t){if(!t)return"";if(!(t=(""+t).replace(/[^\w$]/g,"")))return"";/^\d/.test(t)&&(t="_"+t);return r.test(t)?t+"_":t}(t||n)+"("+(i&&i.join(",")||"")+"){\n "+h.join("\n ")+"\n}"}return f.toString=c,f}a.verbose=!1},{}],4:[function(t,i,n){function r(){this.t={}}(i.exports=r).prototype.on=function(t,i,n){return(this.t[t]||(this.t[t]=[])).push({fn:i,ctx:n||this}),this},r.prototype.off=function(t,i){if(t===g)this.t={};else if(i===g)this.t[t]=[];else for(var n=this.t[t],r=0;r<n.length;)n[r].fn===i?n.splice(r,1):++r;return this},r.prototype.emit=function(t){var i=this.t[t];if(i){for(var n=[],r=1;r<arguments.length;)n.push(arguments[r++]);for(r=0;r<i.length;)i[r].fn.apply(i[r++].ctx,n)}return this}},{}],5:[function(t,i,n){i.exports=u;var s=t(1),o=t(7)("fs");function u(n,r,e){return r="function"==typeof r?(e=r,{}):r||{},e?!r.xhr&&o&&o.readFile?o.readFile(n,function(t,i){return t&&"undefined"!=typeof XMLHttpRequest?u.xhr(n,r,e):t?e(t):e(null,r.binary?i:i.toString("utf8"))}):u.xhr(n,r,e):s(u,this,n,r)}u.xhr=function(t,n,r){var e=new XMLHttpRequest;e.onreadystatechange=function(){if(4!==e.readyState)return g;if(0!==e.status&&200!==e.status)return r(Error("status "+e.status));if(n.binary){if(!(t=e.response))for(var t=[],i=0;i<e.responseText.length;++i)t.push(255&e.responseText.charCodeAt(i));return r(null,"undefined"!=typeof Uint8Array?new Uint8Array(t):t)}return r(null,e.responseText)},n.binary&&("overrideMimeType"in e&&e.overrideMimeType("text/plain; charset=x-user-defined"),e.responseType="arraybuffer"),e.open("GET",t),e.send()}},{1:1,7:7}],6:[function(t,i,n){function r(t){function i(t,i,n,r){var e=i<0?1:0;t(0===(i=e?-i:i)?0<1/i?0:2147483648:isNaN(i)?2143289344:34028234663852886e22<i?(e<<31|2139095040)>>>0:i<11754943508222875e-54?(e<<31|Math.round(i/1401298464324817e-60))>>>0:(e<<31|127+(t=Math.floor(Math.log(i)/Math.LN2))<<23|8388607&Math.round(i*Math.pow(2,-t)*8388608))>>>0,n,r)}function n(t,i,n){t=t(i,n),i=2*(t>>31)+1,n=t>>>23&255,t&=8388607;return 255==n?t?NaN:1/0*i:0==n?1401298464324817e-60*i*t:i*Math.pow(2,n-150)*(8388608+t)}function r(t,i,n){u[0]=t,i[n]=h[0],i[n+1]=h[1],i[n+2]=h[2],i[n+3]=h[3]}function e(t,i,n){u[0]=t,i[n]=h[3],i[n+1]=h[2],i[n+2]=h[1],i[n+3]=h[0]}function s(t,i){return h[0]=t[i],h[1]=t[i+1],h[2]=t[i+2],h[3]=t[i+3],u[0]}function o(t,i){return h[3]=t[i],h[2]=t[i+1],h[1]=t[i+2],h[0]=t[i+3],u[0]}var u,h,f,c,a;function l(t,i,n,r,e,s){var o,u=r<0?1:0;0===(r=u?-r:r)?(t(0,e,s+i),t(0<1/r?0:2147483648,e,s+n)):isNaN(r)?(t(0,e,s+i),t(2146959360,e,s+n)):17976931348623157e292<r?(t(0,e,s+i),t((u<<31|2146435072)>>>0,e,s+n)):r<22250738585072014e-324?(t((o=r/5e-324)>>>0,e,s+i),t((u<<31|o/4294967296)>>>0,e,s+n)):(t(4503599627370496*(o=r*Math.pow(2,-(r=1024===(r=Math.floor(Math.log(r)/Math.LN2))?1023:r)))>>>0,e,s+i),t((u<<31|r+1023<<20|1048576*o&1048575)>>>0,e,s+n))}function d(t,i,n,r,e){i=t(r,e+i),t=t(r,e+n),r=2*(t>>31)+1,e=t>>>20&2047,n=4294967296*(1048575&t)+i;return 2047==e?n?NaN:1/0*r:0==e?5e-324*r*n:r*Math.pow(2,e-1075)*(n+4503599627370496)}function p(t,i,n){f[0]=t,i[n]=c[0],i[n+1]=c[1],i[n+2]=c[2],i[n+3]=c[3],i[n+4]=c[4],i[n+5]=c[5],i[n+6]=c[6],i[n+7]=c[7]}function b(t,i,n){f[0]=t,i[n]=c[7],i[n+1]=c[6],i[n+2]=c[5],i[n+3]=c[4],i[n+4]=c[3],i[n+5]=c[2],i[n+6]=c[1],i[n+7]=c[0]}function v(t,i){return c[0]=t[i],c[1]=t[i+1],c[2]=t[i+2],c[3]=t[i+3],c[4]=t[i+4],c[5]=t[i+5],c[6]=t[i+6],c[7]=t[i+7],f[0]}function m(t,i){return c[7]=t[i],c[6]=t[i+1],c[5]=t[i+2],c[4]=t[i+3],c[3]=t[i+4],c[2]=t[i+5],c[1]=t[i+6],c[0]=t[i+7],f[0]}return"undefined"!=typeof Float32Array?(u=new Float32Array([-0]),h=new Uint8Array(u.buffer),a=128===h[3],t.writeFloatLE=a?r:e,t.writeFloatBE=a?e:r,t.readFloatLE=a?s:o,t.readFloatBE=a?o:s):(t.writeFloatLE=i.bind(null,y),t.writeFloatBE=i.bind(null,w),t.readFloatLE=n.bind(null,g),t.readFloatBE=n.bind(null,j)),"undefined"!=typeof Float64Array?(f=new Float64Array([-0]),c=new Uint8Array(f.buffer),a=128===c[7],t.writeDoubleLE=a?p:b,t.writeDoubleBE=a?b:p,t.readDoubleLE=a?v:m,t.readDoubleBE=a?m:v):(t.writeDoubleLE=l.bind(null,y,0,4),t.writeDoubleBE=l.bind(null,w,4,0),t.readDoubleLE=d.bind(null,g,0,4),t.readDoubleBE=d.bind(null,j,4,0)),t}function y(t,i,n){i[n]=255&t,i[n+1]=t>>>8&255,i[n+2]=t>>>16&255,i[n+3]=t>>>24}function w(t,i,n){i[n]=t>>>24,i[n+1]=t>>>16&255,i[n+2]=t>>>8&255,i[n+3]=255&t}function g(t,i){return(t[i]|t[i+1]<<8|t[i+2]<<16|t[i+3]<<24)>>>0}function j(t,i){return(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3])>>>0}i.exports=r(r)},{}],7:[function(n,t,i){t.exports=function(t){try{var i;return"function"!=typeof n?null:(i=n(t))&&(i.length||Object.keys(i).length)?i:null}catch(t){return null}}},{}],8:[function(t,i,n){var e=n.isAbsolute=function(t){return/^(?:\/|\w+:)/.test(t)},r=n.normalize=function(t){var i=(t=t.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),n=e(t),t="";n&&(t=i.shift()+"/");for(var r=0;r<i.length;)".."===i[r]?0<r&&".."!==i[r-1]?i.splice(--r,2):n?i.splice(r,1):++r:"."===i[r]?i.splice(r,1):++r;return t+i.join("/")};n.resolve=function(t,i,n){return n||(i=r(i)),!e(i)&&(t=(t=n?t:r(t)).replace(/(?:\/|^)[^/]+$/,"")).length?r(t+"/"+i):i}},{}],9:[function(t,i,n){i.exports=function(i,n,t){var r=t||8192,e=r>>>1,s=null,o=r;return function(t){if(t<1||e<t)return i(t);r<o+t&&(s=i(r),o=0);t=n.call(s,o,o+=t);return 7&o&&(o=1+(7|o)),t}}},{}],10:[function(t,i,n){n.length=function(t){for(var i,n=0,r=0;r<t.length;++r)(i=t.charCodeAt(r))<128?n+=1:i<2048?n+=2:55296==(64512&i)&&56320==(64512&t.charCodeAt(r+1))?(++r,n+=4):n+=3;return n},n.read=function(t,i,n){if(n-i<1)return"";for(var r="",e=i;e<n;){var s,o=t[e++];o<=127?r+=String.fromCharCode(o):192<=o&&o<224?r+=128<=(s=(31&o)<<6|63&t[e++])?String.fromCharCode(s):"�":224<=o&&o<240?r+=2048<=(s=(15&o)<<12|(63&t[e++])<<6|63&t[e++])?String.fromCharCode(s):"�":240<=o&&((o=(7&o)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])<65536||1114111<o?r+="�":r=r+String.fromCharCode(55296+((o-=65536)>>10))+String.fromCharCode(56320+(1023&o)))}return r},n.write=function(t,i,n){for(var r,e,s=n,o=0;o<t.length;++o)(r=t.charCodeAt(o))<128?i[n++]=r:(r<2048?i[n++]=r>>6|192:(55296==(64512&r)&&56320==(64512&(e=t.charCodeAt(o+1)))?(++o,i[n++]=(r=65536+((1023&r)<<10)+(1023&e))>>18|240,i[n++]=r>>12&63|128):i[n++]=r>>12|224,i[n++]=r>>6&63|128),i[n++]=63&r|128);return n-s}},{}],11:[function(t,i,n){var l=t(14),d=t(33);function o(t,i,n,r){var e=!1;if(i.resolvedType)if(i.resolvedType instanceof l){t("switch(d%s){",r);for(var s=i.resolvedType.values,o=Object.keys(s),u=0;u<o.length;++u)s[o[u]]!==i.typeDefault||e||(t("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',r,r,r),i.repeated||t("break"),e=!0),t("case%j:",o[u])("case %i:",s[o[u]])("m%s=%j",r,s[o[u]])("break");t("}")}else t('if(typeof d%s!=="object")',r)("throw TypeError(%j)",i.fullName+": object expected")("m%s=types[%i].fromObject(d%s,n+1)",r,n,r);else{var h=!1;switch(i.type){case"double":case"float":t("m%s=Number(d%s)",r,r);break;case"uint32":case"fixed32":t("m%s=d%s>>>0",r,r);break;case"int32":case"sint32":case"sfixed32":t("m%s=d%s|0",r,r);break;case"uint64":h=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",r,r,h)('else if(typeof d%s==="string")',r)("m%s=parseInt(d%s,10)",r,r)('else if(typeof d%s==="number")',r)("m%s=d%s",r,r)('else if(typeof d%s==="object")',r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",r,r,r,h?"true":"");break;case"bytes":t('if(typeof d%s==="string")',r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",r,r,r)("else if(d%s.length >= 0)",r)("m%s=d%s",r,r);break;case"string":t("m%s=String(d%s)",r,r);break;case"bool":t("m%s=Boolean(d%s)",r,r)}}return t}function p(t,i,n,r){if(i.resolvedType)i.resolvedType instanceof l?t("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",r,n,r,r,n,r,r):t("d%s=types[%i].toObject(m%s,o)",r,n,r);else{var e=!1;switch(i.type){case"double":case"float":t("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",r,r,r,r);break;case"uint64":e=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t('if(typeof m%s==="number")',r)("d%s=o.longs===String?String(m%s):m%s",r,r,r)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",r,r,r,r,e?"true":"",r);break;case"bytes":t("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",r,r,r,r,r);break;default:t("d%s=m%s",r,r)}}return t}n.fromObject=function(t){var i=t.fieldsArray,n=d.codegen(["d","n"],t.name+"$fromObject")("if(d instanceof this.ctor)")("return d")("if(n===undefined)n=0")("if(n>util.recursionLimit)")('throw Error("maximum nesting depth exceeded")');if(!i.length)return n("return new this.ctor");n("var m=new this.ctor");for(var r=0;r<i.length;++r){var e=i[r].resolve(),s=d.safeProp(e.name);e.map?(n("if(d%s){",s)('if(typeof d%s!=="object")',s)("throw TypeError(%j)",e.fullName+": object expected")("m%s={}",s)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",s),n('if(ks[i]==="__proto__")')("util.makeProp(m%s,ks[i])",s),o(n,e,r,s+"[ks[i]]")("}")("}")):e.repeated?(n("if(d%s){",s)("if(!Array.isArray(d%s))",s)("throw TypeError(%j)",e.fullName+": array expected")("m%s=[]",s)("for(var i=0;i<d%s.length;++i){",s),o(n,e,r,s+"[i]")("}")("}")):(e.resolvedType instanceof l||n("if(d%s!=null){",s),o(n,e,r,s),e.resolvedType instanceof l||n("}"))}return n("return m")},n.toObject=function(t){var i=t.fieldsArray.slice().sort(d.compareFieldsById);if(!i.length)return d.codegen()("return {}");for(var n=d.codegen(["m","o"],t.name+"$toObject")("if(!o)")("o={}")("var d={}"),r=[],e=[],s=[],o=0;o<i.length;++o)i[o].partOf||(i[o].resolve().repeated?r:i[o].map?e:s).push(i[o]);if(r.length){for(n("if(o.arrays||o.defaults){"),o=0;o<r.length;++o)n("d%s=[]",d.safeProp(r[o].name));n("}")}if(e.length){for(n("if(o.objects||o.defaults){"),o=0;o<e.length;++o)n("d%s={}",d.safeProp(e[o].name));n("}")}if(s.length){for(n("if(o.defaults){"),o=0;o<s.length;++o){var u,h=s[o],f=d.safeProp(h.name);h.resolvedType instanceof l?n("d%s=o.enums===String?%j:%j",f,h.resolvedType.valuesById[h.typeDefault],h.typeDefault):h.long?n("if(util.Long){")("var n=new util.Long(%i,%i,%j)",h.typeDefault.low,h.typeDefault.high,h.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",f)("}else")("d%s=o.longs===String?%j:%i",f,h.typeDefault.toString(),h.typeDefault.toNumber()):h.bytes?(u=Array.prototype.slice.call(h.typeDefault),n("if(o.bytes===String)d%s=%j",f,String.fromCharCode.apply(String,h.typeDefault))("else{")("d%s=%j",f,u)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",f,f)("}")):n("d%s=%j",f,h.typeDefault)}n("}")}for(var c=!1,o=0;o<i.length;++o){var h=i[o],a=t.i.indexOf(h),f=d.safeProp(h.name);h.map?(c||(c=!0,n("var ks2")),n("if(m%s&&(ks2=Object.keys(m%s)).length){",f,f)("d%s={}",f)("for(var j=0;j<ks2.length;++j){"),n('if(ks2[j]==="__proto__")')("util.makeProp(d%s,ks2[j])",f),p(n,h,a,f+"[ks2[j]]")("}")):h.repeated?(n("if(m%s&&m%s.length){",f,f)("d%s=[]",f)("for(var j=0;j<m%s.length;++j){",f),p(n,h,a,f+"[j]")("}")):(n("if(m%s!=null&&m.hasOwnProperty(%j)){",f,h.name),p(n,h,a,f),h.partOf&&n("if(o.oneofs)")("d%s=%j",d.safeProp(h.partOf.name),h.name)),n("}")}return n("return d")}},{14:14,33:33}],12:[function(t,i,n){i.exports=function(t){for(var i=f.codegen(["r","l","e","n"],t.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("if(n===undefined)n=0")("if(n>Reader.recursionLimit)")('throw Error("maximum nesting depth exceeded")')("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(t.fieldsArray.filter(function(t){return t.map}).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()")("if(t===e)")("break")("switch(t>>>3){"),n=0;n<t.fieldsArray.length;++n){var r=t.i[n].resolve(),e=r.resolvedType instanceof u?"int32":r.type,s="m"+f.safeProp(r.name);i("case %i: {",r.id),r.map?(i("if(%s===util.emptyObject)",s)("%s={}",s)("var c2 = r.uint32()+r.pos"),h.defaults[r.keyType]!==g?i("k=%j",h.defaults[r.keyType]):i("k=null"),h.defaults[e]!==g?i("value=%j",h.defaults[e]):i("value=null"),i("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",r.keyType)("case 2:"),h.basic[e]===g?i("value=types[%i].decode(r,r.uint32(),undefined,n+1)",n):i("value=r.%s()",e),i("break")("default:")("r.skipType(tag2&7,n)")("break")("}")("}"),h.long[r.keyType]!==g?i('%s[typeof k==="object"?util.longToHash(k):k]=value',s):("string"===r.keyType&&i('if(k==="__proto__")')("util.makeProp(%s,k)",s),i("%s[k]=value",s))):r.repeated?(i("if(!(%s&&%s.length))",s,s)("%s=[]",s),h.packed[e]!==g&&i("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",s,e)("}else"),h.basic[e]===g?i(r.delimited?"%s.push(types[%i].decode(r,undefined,((t&~7)|4),n+1))":"%s.push(types[%i].decode(r,r.uint32(),undefined,n+1))",s,n):i("%s.push(r.%s())",s,e)):h.basic[e]===g?i(r.delimited?"%s=types[%i].decode(r,undefined,((t&~7)|4),n+1)":"%s=types[%i].decode(r,r.uint32(),undefined,n+1)",s,n):i("%s=r.%s()",s,e),i("break")("}")}for(i("default:")("r.skipType(t&7,n)")("break")("}")("}"),n=0;n<t.i.length;++n){var o=t.i[n];o.required&&i("if(!m.hasOwnProperty(%j))",o.name)("throw util.ProtocolError(%j,{instance:m})","missing required '"+o.name+"'")}return i("return m")};var u=t(14),h=t(32),f=t(33)},{14:14,32:32,33:33}],13:[function(t,i,n){i.exports=function(t){for(var i,n=a.codegen(["m","w"],t.name+"$encode")("if(!w)")("w=Writer.create()"),r=t.fieldsArray.slice().sort(a.compareFieldsById),e=0;e<r.length;++e){var s=r[e].resolve(),o=t.i.indexOf(s),u=s.resolvedType instanceof f?"int32":s.type,h=c.basic[u];i="m"+a.safeProp(s.name),s.map?(n("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",i,s.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",i)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(s.id<<3|2)>>>0,8|c.mapKey[s.keyType],s.keyType),h===g?n("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",o,i):n(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|h,u,i),n("}")("}")):s.repeated?(n("if(%s!=null&&%s.length){",i,i),s.packed&&c.packed[u]!==g?n("w.uint32(%i).fork()",(s.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",i)("w.%s(%s[i])",u,i)("w.ldelim()"):(n("for(var i=0;i<%s.length;++i)",i),h===g?l(n,s,o,i+"[i]"):n("w.uint32(%i).%s(%s[i])",(s.id<<3|h)>>>0,u,i)),n("}")):(s.optional&&n("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",i,s.name),h===g?l(n,s,o,i):n("w.uint32(%i).%s(%s)",(s.id<<3|h)>>>0,u,i))}return n("return w")};var f=t(14),c=t(32),a=t(33);function l(t,i,n,r){i.delimited?t("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",n,r,(i.id<<3|3)>>>0,(i.id<<3|4)>>>0):t("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",n,r,(i.id<<3|2)>>>0)}},{14:14,32:32,33:33}],14:[function(t,i,n){i.exports=s;var h=t(22),r=(((s.prototype=Object.create(h.prototype)).constructor=s).className="Enum",t(21)),e=t(33);function s(t,i,n,r,e,s){if(h.call(this,t,n),i&&"object"!=typeof i)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=r,this.comments=e||{},this.valuesOptions=s,this.n={},this.reserved=g,i)for(var o=Object.keys(i),u=0;u<o.length;++u)"__proto__"!==o[u]&&"number"==typeof i[o[u]]&&(this.valuesById[this.values[o[u]]=i[o[u]]]=o[u])}s.prototype.r=function(t){return t=this.e||t,h.prototype.r.call(this,t),Object.keys(this.values).forEach(t=>{var i=Object.assign({},this.o);this.n[t]=Object.assign(i,this.valuesOptions&&this.valuesOptions[t]&&this.valuesOptions[t].features)}),this},s.fromJSON=function(t,i){t=new s(t,i.values,i.options,i.comment,i.comments);return t.reserved=i.reserved,i.edition&&(t.e=i.edition),t.u="proto3",t},s.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return e.toObject(["edition",this.h(),"options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:g,"comment",t?this.comment:g,"comments",t?this.comments:g])},s.prototype.add=function(t,i,n,r){if(!e.isString(t))throw TypeError("name must be a string");if(!e.isInteger(i))throw TypeError("id must be an integer");if("__proto__"!==t){if(this.values[t]!==g)throw Error("duplicate name '"+t+"' in "+this);if(this.isReservedId(i))throw Error("id "+i+" is reserved in "+this);if(this.isReservedName(t))throw Error("name '"+t+"' is reserved in "+this);if(this.valuesById[i]!==g){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+i+" in "+this);this.values[t]=i}else this.valuesById[this.values[t]=i]=t;r&&(this.valuesOptions===g&&(this.valuesOptions={}),this.valuesOptions[t]=r||null),this.comments[t]=n||null}return this},s.prototype.remove=function(t){if(!e.isString(t))throw TypeError("name must be a string");var i=this.values[t];if(null==i)throw Error("name '"+t+"' does not exist in "+this);return delete this.valuesById[i],delete this.values[t],delete this.comments[t],this.valuesOptions&&delete this.valuesOptions[t],this},s.prototype.isReservedId=function(t){return r.isReservedId(this.reserved,t)},s.prototype.isReservedName=function(t){return r.isReservedName(this.reserved,t)}},{21:21,22:22,33:33}],15:[function(t,i,n){i.exports=o;var r,u=t(22),e=(((o.prototype=Object.create(u.prototype)).constructor=o).className="Field",t(14)),h=t(32),f=t(33),c=/^required|optional|repeated$/;function o(t,i,n,r,e,s,o){if(f.isObject(r)?(o=e,s=r,r=e=g):f.isObject(e)&&(o=s,s=e,e=g),u.call(this,t,s),!f.isInteger(i)||i<0)throw TypeError("id must be a non-negative integer");if(!f.isString(n))throw TypeError("type must be a string");if(r!==g&&!c.test(r=r.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(e!==g&&!f.isString(e))throw TypeError("extend must be a string");this.rule=(r="proto3_optional"===r?"optional":r)&&"optional"!==r?r:g,this.type=n,this.id=i,this.extend=e||g,this.repeated="repeated"===r,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!f.Long&&h.long[n]!==g,this.bytes="bytes"===n,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.comment=o}o.fromJSON=function(t,i){t=new o(t,i.id,i.type,i.rule,i.extend,i.options,i.comment);return i.edition&&(t.e=i.edition),t.u="proto3",t},Object.defineProperty(o.prototype,"required",{get:function(){return"LEGACY_REQUIRED"===this.o.field_presence}}),Object.defineProperty(o.prototype,"optional",{get:function(){return!this.required}}),Object.defineProperty(o.prototype,"delimited",{get:function(){return this.resolvedType instanceof r&&"DELIMITED"===this.o.message_encoding}}),Object.defineProperty(o.prototype,"packed",{get:function(){return"PACKED"===this.o.repeated_field_encoding}}),Object.defineProperty(o.prototype,"hasPresence",{get:function(){return!this.repeated&&!this.map&&(this.partOf||this.declaringField||this.extensionField||"IMPLICIT"!==this.o.field_presence)}}),o.prototype.setOption=function(t,i,n){return u.prototype.setOption.call(this,t,i,n)},o.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return f.toObject(["edition",this.h(),"rule","optional"!==this.rule&&this.rule||g,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:g])},o.prototype.resolve=function(){var t;return this.resolved?this:((this.typeDefault=h.defaults[this.type])===g?(this.resolvedType=(this.declaringField||this).parent.lookupTypeOrEnum(this.type),this.resolvedType instanceof r?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 e&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(this.options.packed===g||!this.resolvedType||this.resolvedType instanceof e||delete this.options.packed,Object.keys(this.options).length||(this.options=g)),this.long?(this.typeDefault=f.Long.fromNumber(this.typeDefault,"u"==(this.type[0]||"")),Object.freeze&&Object.freeze(this.typeDefault)):this.bytes&&"string"==typeof this.typeDefault&&(f.base64.test(this.typeDefault)?f.base64.decode(this.typeDefault,t=f.newBuffer(f.base64.length(this.typeDefault)),0):f.utf8.write(this.typeDefault,t=f.newBuffer(f.utf8.length(this.typeDefault)),0),this.typeDefault=t),this.map?this.defaultValue=f.emptyObject:this.repeated?this.defaultValue=f.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof r&&(this.parent.ctor.prototype[this.name]=this.defaultValue),u.prototype.resolve.call(this))},o.prototype.f=function(t){var i;return"proto2"!==t&&"proto3"!==t?{}:(t={},"required"===this.rule&&(t.field_presence="LEGACY_REQUIRED"),this.parent&&h.defaults[this.type]===g&&(i=this.parent.get(this.type.split(".").pop()))&&i instanceof r&&i.group&&(t.message_encoding="DELIMITED"),!0===this.getOption("packed")?t.repeated_field_encoding="PACKED":!1===this.getOption("packed")&&(t.repeated_field_encoding="EXPANDED"),t)},o.prototype.r=function(t){return u.prototype.r.call(this,this.e||t)},o.d=function(n,r,e,s){return"function"==typeof r?r=f.decorateType(r).name:r&&"object"==typeof r&&(r=f.decorateEnum(r).name),function(t,i){f.decorateType(t.constructor).add(new o(i,n,r,e,{default:s}))}},o.c=function(t){r=t}},{14:14,22:22,32:32,33:33}],16:[function(t,i,n){var r=i.exports=t(17);r.build="light",r.load=function(t,i,n){return(i="function"==typeof i?(n=i,new r.Root):i||new r.Root).load(t,n)},r.loadSync=function(t,i){return(i=i||new r.Root).loadSync(t)},r.encoder=t(13),r.decoder=t(12),r.verifier=t(37),r.converter=t(11),r.ReflectionObject=t(22),r.Namespace=t(21),r.Root=t(26),r.Enum=t(14),r.Type=t(31),r.Field=t(15),r.OneOf=t(23),r.MapField=t(18),r.Service=t(30),r.Method=t(20),r.Message=t(19),r.wrappers=t(38),r.types=t(32),r.util=t(33),r.ReflectionObject.c(r.Root),r.Namespace.c(r.Type,r.Service,r.Enum),r.Root.c(r.Type),r.Field.c(r.Type)},{11:11,12:12,13:13,14:14,15:15,17:17,18:18,19:19,20:20,21:21,22:22,23:23,26:26,30:30,31:31,32:32,33:33,37:37,38:38}],17:[function(t,i,n){var r=n;function e(){r.util.c(),r.Writer.c(r.BufferWriter),r.Reader.c(r.BufferReader)}r.build="minimal",r.Writer=t(39),r.BufferWriter=t(40),r.Reader=t(24),r.BufferReader=t(25),r.util=t(35),r.rpc=t(28),r.roots=t(27),r.configure=e,e()},{24:24,25:25,27:27,28:28,35:35,39:39,40:40}],18:[function(t,i,n){i.exports=s;var o=t(15),r=(((s.prototype=Object.create(o.prototype)).constructor=s).className="MapField",t(32)),u=t(33);function s(t,i,n,r,e,s){if(o.call(this,t,i,r,g,g,e,s),!u.isString(n))throw TypeError("keyType must be a string");this.keyType=n,this.resolvedKeyType=null,this.map=!0}s.fromJSON=function(t,i){return new s(t,i.id,i.keyType,i.type,i.options,i.comment)},s.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return u.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:g])},s.prototype.resolve=function(){if(this.resolved)return this;if(r.mapKey[this.keyType]===g)throw Error("invalid key type: "+this.keyType);return o.prototype.resolve.call(this)},s.d=function(n,r,e){return"function"==typeof e?e=u.decorateType(e).name:e&&"object"==typeof e&&(e=u.decorateEnum(e).name),function(t,i){u.decorateType(t.constructor).add(new s(i,n,r,e))}}},{15:15,32:32,33:33}],19:[function(t,i,n){i.exports=e;var r=t(35);function e(t){if(t)for(var i=Object.keys(t),n=0;n<i.length;++n){var r=i[n];"__proto__"!==r&&(this[r]=t[r])}}e.create=function(t){return this.$type.create(t)},e.encode=function(t,i){return this.$type.encode(t,i)},e.encodeDelimited=function(t,i){return this.$type.encodeDelimited(t,i)},e.decode=function(t){return this.$type.decode(t)},e.decodeDelimited=function(t){return this.$type.decodeDelimited(t)},e.verify=function(t){return this.$type.verify(t)},e.fromObject=function(t){return this.$type.fromObject(t)},e.toObject=function(t,i){return this.$type.toObject(t,i)},e.prototype.toJSON=function(){return this.$type.toObject(this,r.toJSONOptions)}},{35:35}],20:[function(t,i,n){i.exports=r;var f=t(22),c=(((r.prototype=Object.create(f.prototype)).constructor=r).className="Method",t(33));function r(t,i,n,r,e,s,o,u,h){if(c.isObject(e)?(o=e,e=s=g):c.isObject(s)&&(o=s,s=g),i!==g&&!c.isString(i))throw TypeError("type must be a string");if(!c.isString(n))throw TypeError("requestType must be a string");if(!c.isString(r))throw TypeError("responseType must be a string");f.call(this,t,o),this.type=i||"rpc",this.requestType=n,this.requestStream=!!e||g,this.responseType=r,this.responseStream=!!s||g,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=u,this.parsedOptions=h}r.fromJSON=function(t,i){return new r(t,i.type,i.requestType,i.responseType,i.requestStream,i.responseStream,i.options,i.comment,i.parsedOptions)},r.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return c.toObject(["type","rpc"!==this.type&&this.type||g,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:g,"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),f.prototype.resolve.call(this))}},{22:22,33:33}],21:[function(t,i,n){i.exports=a;var s,o,u,r=t(22),h=(((a.prototype=Object.create(r.prototype)).constructor=a).className="Namespace",t(15)),f=t(33),c=t(23);function e(t,i){if(!t||!t.length)return g;for(var n={},r=0;r<t.length;++r)n[t[r].name]=t[r].toJSON(i);return n}function a(t,i){r.call(this,t,i),this.nested=g,this.a=null,this.l=Object.create(null),this.p=!0,this.b=!0}function l(t){t.a=null,t.l=Object.create(null);for(var i=t;i=i.parent;)i.l=Object.create(null);return t}a.fromJSON=function(t,i){return new a(t,i.options).addJSON(i.nested)},a.arrayToJSON=e,a.isReservedId=function(t,i){if(t)for(var n=0;n<t.length;++n)if("string"!=typeof t[n]&&t[n][0]<=i&&t[n][1]>i)return!0;return!1},a.isReservedName=function(t,i){if(t)for(var n=0;n<t.length;++n)if(t[n]===i)return!0;return!1},Object.defineProperty(a.prototype,"nestedArray",{get:function(){return this.a||(this.a=f.toArray(this.nested))}}),a.prototype.toJSON=function(t){return f.toObject(["options",this.options,"nested",e(this.nestedArray,t)])},a.prototype.addJSON=function(t){if(t)for(var i,n=Object.keys(t),r=0;r<n.length;++r)i=t[n[r]],this.add((i.fields!==g?s:i.values!==g?u:i.methods!==g?o:i.id!==g?h:a).fromJSON(n[r],i));return this},a.prototype.get=function(t){return this.nested&&Object.prototype.hasOwnProperty.call(this.nested,t)?this.nested[t]:null},a.prototype.getEnum=function(t){if(this.nested&&Object.prototype.hasOwnProperty.call(this.nested,t)&&this.nested[t]instanceof u)return this.nested[t].values;throw Error("no such enum: "+t)},a.prototype.add=function(t){if(!(t instanceof h&&t.extend!==g||t instanceof s||t instanceof c||t instanceof u||t instanceof o||t instanceof a))throw TypeError("object must be a valid nested object");if("__proto__"===t.name)return this;if(this.nested){var i=this.get(t.name);if(i){if(!(i instanceof a&&t instanceof a)||i instanceof s||i instanceof o)throw Error("duplicate name '"+t.name+"' in "+this);for(var n=i.nestedArray,r=0;r<n.length;++r)t.add(n[r]);this.remove(i),this.nested||(this.nested={}),t.setOptions(i.options,!0)}}else this.nested={};this.nested[t.name]=t,this instanceof s||this instanceof o||this instanceof u||this instanceof h||t.e||(t.e=t.u),this.p=!0,this.b=!0;for(var e=this;e=e.parent;)e.p=!0,e.b=!0;return t.onAdd(this),l(this)},a.prototype.remove=function(t){if(!(t instanceof r))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=g),t.onRemove(this),l(this)},a.prototype.define=function(t,i){if(f.isString(t))t=t.split(".");else if(!Array.isArray(t))throw TypeError("illegal path");if(t&&t.length&&""===t[0])throw Error("path must be relative");for(var n=this;0<t.length;){var r=t.shift();if(n.nested&&n.nested[r]){if(!((n=n.nested[r])instanceof a))throw Error("path conflicts with non-namespace objects")}else n.add(n=new a(r))}return i&&n.addJSON(i),n},a.prototype.resolveAll=function(){if(this.b){this.v(this.e);var t=this.nestedArray,i=0;for(this.resolve();i<t.length;)t[i]instanceof a?t[i++].resolveAll():t[i++].resolve();this.b=!1}return this},a.prototype.v=function(i){return this.p&&(this.p=!1,i=this.e||i,r.prototype.v.call(this,i),this.nestedArray.forEach(t=>{t.v(i)})),this},a.prototype.lookup=function(t,i,n){if("boolean"==typeof i?(n=i,i=g):i&&!Array.isArray(i)&&(i=[i]),f.isString(t)&&t.length){if("."===t)return this.root;t=t.split(".")}else if(!t.length)return this;var r=t.join(".");if(""===t[0])return this.root.lookup(t.slice(1),i);var e=this.root.y&&this.root.y["."+r];if(e&&(!i||~i.indexOf(e.constructor)))return e;if((e=this.w(t,r))&&(!i||~i.indexOf(e.constructor)))return e;if(!n)for(var s=this;s.parent;){if((e=s.parent.w(t,r))&&(!i||~i.indexOf(e.constructor)))return e;s=s.parent}return null},a.prototype.w=function(t,i){if(Object.prototype.hasOwnProperty.call(this.l,i))return this.l[i];var n=this.get(t[0]),r=null;if(n)1===t.length?r=n:n instanceof a&&(t=t.slice(1),r=n.w(t,t.join(".")));else for(var e=0;e<this.nestedArray.length;++e)this.a[e]instanceof a&&(n=this.a[e].w(t,i))&&(r=n);return this.l[i]=r},a.prototype.lookupType=function(t){var i=this.lookup(t,[s]);if(i)return i;throw Error("no such type: "+t)},a.prototype.lookupEnum=function(t){var i=this.lookup(t,[u]);if(i)return i;throw Error("no such Enum '"+t+"' in "+this)},a.prototype.lookupTypeOrEnum=function(t){var i=this.lookup(t,[s,u]);if(i)return i;throw Error("no such Type or Enum '"+t+"' in "+this)},a.prototype.lookupService=function(t){var i=this.lookup(t,[o]);if(i)return i;throw Error("no such Service '"+t+"' in "+this)},a.c=function(t,i,n){s=t,o=i,u=n}},{15:15,22:22,23:23,33:33}],22:[function(t,i,n){(i.exports=f).className="ReflectionObject";const r=t(23);var e,o=t(33),s={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY"},u={enum_type:"CLOSED",field_presence:"EXPLICIT",json_format:"LEGACY_BEST_EFFORT",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"EXPANDED",utf8_validation:"NONE"},h={enum_type:"OPEN",field_presence:"IMPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY"};function f(t,i){if(!o.isString(t))throw TypeError("name must be a string");if(i&&!o.isObject(i))throw TypeError("options must be an object");this.options=i,this.parsedOptions=null,this.name=t,this.e=null,this.u="proto2",this.o={},this.g=!1,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(f.prototype,{root:{get:function(){for(var t=this;null!==t.parent;)t=t.parent;return t}},fullName:{get:function(){for(var t=[this.name],i=this.parent;i;)t.unshift(i.name),i=i.parent;return t.join(".")}}}),f.prototype.toJSON=function(){throw Error()},f.prototype.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;t=t.root;t instanceof e&&t.j(this)},f.prototype.onRemove=function(t){t=t.root;t instanceof e&&t.O(this),this.parent=null,this.resolved=!1},f.prototype.resolve=function(){return this.resolved||this.root instanceof e&&(this.resolved=!0),this},f.prototype.v=function(t){return this.r(this.e||t)},f.prototype.r=function(t){if(!this.g){var i={};if(!t)throw Error("Unknown edition for "+this.fullName);var n=Object.assign(this.options?Object.assign({},this.options.features):{},this.f(t));if(this.e){if("proto2"===t)i=Object.assign({},u);else if("proto3"===t)i=Object.assign({},h);else{if("2023"!==t)throw Error("Unknown edition: "+t);i=Object.assign({},s)}this.o=Object.assign(i,n||{})}else{if(this.partOf instanceof r){t=Object.assign({},this.partOf.o);this.o=Object.assign(t,n||{})}else if(!this.declaringField){if(!this.parent)throw Error("Unable to find a parent for "+this.fullName);i=Object.assign({},this.parent.o);this.o=Object.assign(i,n||{})}this.extensionField&&(this.extensionField.o=this.o)}this.g=!0}},f.prototype.f=function(){return{}},f.prototype.getOption=function(t){return this.options?this.options[t]:g},f.prototype.setOption=function(t,i,n){return"__proto__"!==t&&(this.options||(this.options={}),/^features\./.test(t)?o.setProperty(this.options,t,i,n):n&&this.options[t]!==g||(this.getOption(t)!==i&&(this.resolved=!1),this.options[t]=i)),this},f.prototype.setParsedOption=function(i,t,n){var r,e,s;return"__proto__"!==i&&(this.parsedOptions||(this.parsedOptions=[]),r=this.parsedOptions,n?(e=r.find(function(t){return Object.prototype.hasOwnProperty.call(t,i)}))?(s=e[i],o.setProperty(s,n,t)):((e={})[i]=o.setProperty({},n,t),r.push(e)):((s={})[i]=t,r.push(s))),this},f.prototype.setOptions=function(t,i){if(t)for(var n=Object.keys(t),r=0;r<n.length;++r)this.setOption(n[r],t[n[r]],i);return this},f.prototype.toString=function(){var t=this.constructor.className,i=this.fullName;return i.length?t+" "+i:t},f.prototype.h=function(){return this.e&&"proto3"!==this.e?this.e:g},f.c=function(t){e=t}},{23:23,33:33}],23:[function(t,i,n){i.exports=o;var e=t(22),r=(((o.prototype=Object.create(e.prototype)).constructor=o).className="OneOf",t(15)),s=t(33);function o(t,i,n,r){if(Array.isArray(i)||(n=i,i=g),e.call(this,t,n),i!==g&&!Array.isArray(i))throw TypeError("fieldNames must be an Array");this.oneof=i||[],this.fieldsArray=[],this.comment=r}function u(t){if(t.parent)for(var i=0;i<t.fieldsArray.length;++i)t.fieldsArray[i].parent||t.parent.add(t.fieldsArray[i])}o.fromJSON=function(t,i){return new o(t,i.oneof,i.options,i.comment)},o.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return s.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:g])},o.prototype.add=function(t){if(t instanceof r)return t.parent&&t.parent!==this.parent&&t.parent.remove(t),this.oneof.push(t.name),this.fieldsArray.push(t),u(t.partOf=this),this;throw TypeError("field must be a Field")},o.prototype.remove=function(t){if(!(t instanceof r))throw TypeError("field must be a Field");var i=this.fieldsArray.indexOf(t);if(i<0)throw Error(t+" is not a member of "+this);return this.fieldsArray.splice(i,1),-1<(i=this.oneof.indexOf(t.name))&&this.oneof.splice(i,1),t.partOf=null,this},o.prototype.onAdd=function(t){e.prototype.onAdd.call(this,t);for(var i=0;i<this.oneof.length;++i){var n=t.get(this.oneof[i]);n&&!n.partOf&&(n.partOf=this).fieldsArray.push(n)}u(this)},o.prototype.onRemove=function(t){for(var i,n=0;n<this.fieldsArray.length;++n)(i=this.fieldsArray[n]).parent&&i.parent.remove(i);e.prototype.onRemove.call(this,t)},Object.defineProperty(o.prototype,"isProto3Optional",{get:function(){var t;return null!=this.fieldsArray&&1===this.fieldsArray.length&&(null!=(t=this.fieldsArray[0]).options&&!0===t.options.proto3_optional)}}),o.d=function(){for(var n=Array(arguments.length),t=0;t<arguments.length;)n[t]=arguments[t++];return function(t,i){s.decorateType(t.constructor).add(new o(i,n)),Object.defineProperty(t,i,{get:s.oneOfGetter(n),set:s.oneOfSetter(n)})}}},{15:15,22:22,33:33}],24:[function(t,i,n){i.exports=h;var r,e=t(35),s=e.LongBits,o=e.utf8;function u(t,i){return RangeError("index out of range: "+t.pos+" + "+(i||1)+" > "+t.len)}function h(t){this.buf=t,this.pos=0,this.len=t.length}function f(){return e.Buffer?function(t){return(h.create=function(t){return e.Buffer.isBuffer(t)?new r(t):a(t)})(t)}:a}var c,a="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new h(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new h(t);throw Error("illegal buffer")};function l(){var t=new s(0,0),i=0;if(!(4<this.len-this.pos)){for(;i<3;++i){if(this.pos>=this.len)throw u(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*i)>>>0,t}for(;i<4;++i)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(i=0,4<this.len-this.pos){for(;i<5;++i)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}else for(;i<5;++i){if(this.pos>=this.len)throw u(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function d(t,i){return(t[i-4]|t[i-3]<<8|t[i-2]<<16|t[i-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw u(this,8);return new s(d(this.buf,this.pos+=4),d(this.buf,this.pos+=4))}h.create=f(),h.prototype.k=e.Array.prototype.subarray||e.Array.prototype.slice,h.prototype.uint32=(c=4294967295,function(){if(c=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(c=(c|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128||(c=(c|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128||(c=(c|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128||(c=(c|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128||!((this.pos+=5)>this.len))))))return c;throw this.pos=this.len,u(this,10)}),h.prototype.int32=function(){return 0|this.uint32()},h.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},h.prototype.bool=function(){return 0!==this.uint32()},h.prototype.fixed32=function(){if(this.pos+4>this.len)throw u(this,4);return d(this.buf,this.pos+=4)},h.prototype.sfixed32=function(){if(this.pos+4>this.len)throw u(this,4);return 0|d(this.buf,this.pos+=4)},h.prototype.float=function(){if(this.pos+4>this.len)throw u(this,4);var t=e.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},h.prototype.double=function(){if(this.pos+8>this.len)throw u(this,4);var t=e.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},h.prototype.bytes=function(){var t=this.uint32(),i=this.pos,n=this.pos+t;if(n>this.len)throw u(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(i,n):i===n?(t=e.Buffer)?t.alloc(0):new this.buf.constructor(0):this.k.call(this.buf,i,n)},h.prototype.string=function(){var t=this.bytes();return o.read(t,0,t.length)},h.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw u(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw u(this)}while(128&this.buf[this.pos++]);return this},h.recursionLimit=e.recursionLimit,h.prototype.skipType=function(t,i){if(h.recursionLimit<(i=i===g?0:i))throw Error("maximum nesting depth exceeded");switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t,i+1);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},h.c=function(t){r=t,h.create=f(),r.c();var i=e.Long?"toLong":"toNumber";e.merge(h.prototype,{int64:function(){return l.call(this)[i](!1)},uint64:function(){return l.call(this)[i](!0)},sint64:function(){return l.call(this).zzDecode()[i](!1)},fixed64:function(){return p.call(this)[i](!0)},sfixed64:function(){return p.call(this)[i](!1)}})}},{35:35}],25:[function(t,i,n){i.exports=s;var r=t(24),e=((s.prototype=Object.create(r.prototype)).constructor=s,t(35));function s(t){r.call(this,t)}s.c=function(){e.Buffer&&(s.prototype.k=e.Buffer.prototype.slice)},s.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},s.c()},{24:24,35:35}],26:[function(t,i,n){i.exports=h;var r,d,p,e=t(21),s=(((h.prototype=Object.create(e.prototype)).constructor=h).className="Root",t(15)),o=t(14),u=t(23),b=t(33);function h(t){e.call(this,"",t),this.deferred=[],this.files=[],this.e="proto2",this.y={}}function v(){}h.fromJSON=function(t,i){return i=i||new h,t.options&&i.setOptions(t.options),i.addJSON(t.nested).resolveAll()},h.prototype.resolvePath=b.path.resolve,h.prototype.fetch=b.fetch,h.prototype.load=function t(i,s,e){"function"==typeof s&&(e=s,s=g);var o=this;if(!e)return b.asPromise(t,o,i,s);var u=e===v;function h(t,i){if(e){if(u)throw t;i&&i.resolveAll();var n=e;e=null,n(t,i)}}function f(t){var i=t.lastIndexOf("google/protobuf/");if(-1<i){t=t.substring(i);if(t in p)return t}return null}function c(t,i){try{if(b.isString(i)&&"{"==(i[0]||"")&&(i=JSON.parse(i)),b.isString(i)){d.filename=t;var n,r=d(i,o,s),e=0;if(r.imports)for(;e<r.imports.length;++e)(n=f(r.imports[e])||o.resolvePath(t,r.imports[e]))&&a(n);if(r.weakImports)for(e=0;e<r.weakImports.length;++e)(n=f(r.weakImports[e])||o.resolvePath(t,r.weakImports[e]))&&a(n,!0)}else o.setOptions(i.options).addJSON(i.nested)}catch(t){h(t)}u||l||h(null,o)}function a(n,r){if(n=f(n)||n,!~o.files.indexOf(n))if(o.files.push(n),n in p)u?c(n,p[n]):(++l,setTimeout(function(){--l,c(n,p[n])}));else if(u){var t;try{t=b.fs.readFileSync(n).toString("utf8")}catch(t){return void(r||h(t))}c(n,t)}else++l,o.fetch(n,function(t,i){--l,e&&(t?r?l||h(null,o):h(t):c(n,i))})}var l=0;b.isString(i)&&(i=[i]);for(var n,r=0;r<i.length;++r)(n=o.resolvePath("",i[r]))&&a(n);return u?o.resolveAll():l||h(null,o),o},h.prototype.loadSync=function(t,i){if(b.isNode)return this.load(t,i,v);throw Error("not supported")},h.prototype.resolveAll=function(){if(!this.b)return this;if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(t){return"'extend "+t.extend+"' in "+t.parent.fullName}).join(", "));return e.prototype.resolveAll.call(this)};var f=/^[A-Z]/;function c(t,i){var n,r=i.parent.lookup(i.extend);if(r)return n=new s(i.fullName,i.id,i.type,i.rule,g,i.options),r.get(n.name)||((n.declaringField=i).extensionField=n,r.add(n)),1}h.prototype.j=function(t){if(t instanceof s)t.extend===g||t.extensionField||c(0,t)||this.deferred.push(t);else if(t instanceof o)f.test(t.name)&&(t.parent[t.name]=t.values);else if(!(t instanceof u)){if(t instanceof r)for(var i=0;i<this.deferred.length;)c(0,this.deferred[i])?this.deferred.splice(i,1):++i;for(var n=0;n<t.nestedArray.length;++n)this.j(t.a[n]);f.test(t.name)&&(t.parent[t.name]=t)}(t instanceof r||t instanceof o||t instanceof s)&&(this.y[t.fullName]=t)},h.prototype.O=function(t){var i;if(t instanceof s)t.extend!==g&&(t.extensionField?(t.extensionField.parent.remove(t.extensionField),t.extensionField=null):-1<(i=this.deferred.indexOf(t))&&this.deferred.splice(i,1));else if(t instanceof o)f.test(t.name)&&delete t.parent[t.name];else if(t instanceof e){for(var n=0;n<t.nestedArray.length;++n)this.O(t.a[n]);f.test(t.name)&&delete t.parent[t.name]}delete this.y[t.fullName]},h.c=function(t,i,n){r=t,d=i,p=n}},{14:14,15:15,21:21,23:23,33:33}],27:[function(t,i,n){i.exports={}},{}],28:[function(t,i,n){n.Service=t(29)},{29:29}],29:[function(t,i,n){i.exports=r;var u=t(35);function r(t,i,n){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");u.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!i,this.responseDelimited=!!n}((r.prototype=Object.create(u.EventEmitter.prototype)).constructor=r).prototype.rpcCall=function t(n,i,r,e,s){if(!e)throw TypeError("request must be specified");var o=this;if(!s)return u.asPromise(t,o,n,i,r,e);if(!o.rpcImpl)return setTimeout(function(){s(Error("already ended"))},0),g;try{return o.rpcImpl(n,i[o.requestDelimited?"encodeDelimited":"encode"](e).finish(),function(t,i){if(t)return o.emit("error",t,n),s(t);if(null===i)return o.end(!0),g;if(!(i instanceof r))try{i=r[o.responseDelimited?"decodeDelimited":"decode"](i)}catch(t){return o.emit("error",t,n),s(t)}return o.emit("data",i,n),s(null,i)})}catch(t){return o.emit("error",t,n),setTimeout(function(){s(t)},0),g}},r.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{35:35}],30:[function(t,i,n){i.exports=o;var r=t(21),s=(((o.prototype=Object.create(r.prototype)).constructor=o).className="Service",t(20)),u=t(33),h=t(28),f=u.patterns.reservedRe;function o(t,i){r.call(this,t,i),this.methods={},this._=null}function e(t){return t._=null,t}o.fromJSON=function(t,i){var n=new o(t,i.options);if(i.methods)for(var r=Object.keys(i.methods),e=0;e<r.length;++e)n.add(s.fromJSON(r[e],i.methods[r[e]]));return i.nested&&n.addJSON(i.nested),i.edition&&(n.e=i.edition),n.comment=i.comment,n.u="proto3",n},o.prototype.toJSON=function(t){var i=r.prototype.toJSON.call(this,t),n=!!t&&!!t.keepComments;return u.toObject(["edition",this.h(),"options",i&&i.options||g,"methods",r.arrayToJSON(this.methodsArray,t)||{},"nested",i&&i.nested||g,"comment",n?this.comment:g])},Object.defineProperty(o.prototype,"methodsArray",{get:function(){return this._||(this._=u.toArray(this.methods))}}),o.prototype.get=function(t){return Object.prototype.hasOwnProperty.call(this.methods,t)?this.methods[t]:r.prototype.get.call(this,t)},o.prototype.resolveAll=function(){if(this.b){r.prototype.resolve.call(this);for(var t=this.methodsArray,i=0;i<t.length;++i)t[i].resolve()}return this},o.prototype.v=function(i){return this.p&&(i=this.e||i,r.prototype.v.call(this,i),this.methodsArray.forEach(t=>{t.v(i)})),this},o.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);return t instanceof s?"__proto__"===t.name?this:e((this.methods[t.name]=t).parent=this):r.prototype.add.call(this,t)},o.prototype.remove=function(t){if(t instanceof s){if(this.methods[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.methods[t.name],t.parent=null,e(this)}return r.prototype.remove.call(this,t)},o.prototype.create=function(t,i,n){for(var r,e=new h.Service(t,i,n),s=0;s<this.methodsArray.length;++s){var o=u.lcFirst((r=this._[s]).resolve().name).replace(/[^$\w_]/g,"");e[o]=u.codegen(["r","c"],f.test(o)?o+"_":o)("return this.rpcCall(m,q,s,r,c)")({m:r,q:r.resolvedRequestType.ctor,s:r.resolvedResponseType.ctor})}return e}},{20:20,21:21,28:28,33:33}],31:[function(t,i,n){i.exports=w;var o=t(21),u=(((w.prototype=Object.create(o.prototype)).constructor=w).className="Type",t(14)),h=t(23),f=t(15),c=t(18),a=t(30),e=t(19),s=t(24),l=t(39),d=t(33),p=t(13),b=t(12),v=t(37),m=t(11),y=t(38);function w(t,i){t=t.replace(/\W/g,""),o.call(this,t,i),this.fields={},this.oneofs=g,this.extensions=g,this.reserved=g,this.group=g,this.A=null,this.i=null,this.T=null,this.x=null}function r(t){return t.A=t.i=t.T=null,delete t.encode,delete t.decode,delete t.verify,t}Object.defineProperties(w.prototype,{fieldsById:{get:function(){if(!this.A){this.A={};for(var t=Object.keys(this.fields),i=0;i<t.length;++i){var n=this.fields[t[i]],r=n.id;if(this.A[r])throw Error("duplicate id "+r+" in "+this);this.A[r]=n}}return this.A}},fieldsArray:{get:function(){return this.i||(this.i=d.toArray(this.fields))}},oneofsArray:{get:function(){return this.T||(this.T=d.toArray(this.oneofs))}},ctor:{get:function(){return this.x||(this.ctor=w.generateConstructor(this)())},set:function(t){for(var i=t.prototype,n=(i instanceof e||((t.prototype=new e).constructor=t,d.merge(t.prototype,i)),t.$type=t.prototype.$type=this,d.merge(t,e,!0),this.x=t,0);n<this.fieldsArray.length;++n)this.i[n].resolve();for(var r={},n=0;n<this.oneofsArray.length;++n)r[this.T[n].resolve().name]={get:d.oneOfGetter(this.T[n].oneof),set:d.oneOfSetter(this.T[n].oneof)};n&&Object.defineProperties(t.prototype,r)}}}),w.generateConstructor=function(t){for(var i,n=d.codegen(["p"],t.name),r=0;r<t.fieldsArray.length;++r)(i=t.i[r]).map?n("this%s={}",d.safeProp(i.name)):i.repeated&&n("this%s=[]",d.safeProp(i.name));return n('if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null&&ks[i]!=="__proto__")')("this[ks[i]]=p[ks[i]]")},w.fromJSON=function(t,i){for(var n=new w(t,i.options),r=(n.extensions=i.extensions,n.reserved=i.reserved,Object.keys(i.fields)),e=0;e<r.length;++e)n.add((void 0!==i.fields[r[e]].keyType?c:f).fromJSON(r[e],i.fields[r[e]]));if(i.oneofs)for(r=Object.keys(i.oneofs),e=0;e<r.length;++e)n.add(h.fromJSON(r[e],i.oneofs[r[e]]));if(i.nested)for(r=Object.keys(i.nested),e=0;e<r.length;++e){var s=i.nested[r[e]];n.add((s.id!==g?f:s.fields!==g?w:s.values!==g?u:s.methods!==g?a:o).fromJSON(r[e],s))}return i.extensions&&i.extensions.length&&(n.extensions=i.extensions),i.reserved&&i.reserved.length&&(n.reserved=i.reserved),i.group&&(n.group=!0),i.comment&&(n.comment=i.comment),i.edition&&(n.e=i.edition),n.u="proto3",n},w.prototype.toJSON=function(t){var i=o.prototype.toJSON.call(this,t),n=!!t&&!!t.keepComments;return d.toObject(["edition",this.h(),"options",i&&i.options||g,"oneofs",o.arrayToJSON(this.oneofsArray,t),"fields",o.arrayToJSON(this.fieldsArray.filter(function(t){return!t.declaringField}),t)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:g,"reserved",this.reserved&&this.reserved.length?this.reserved:g,"group",this.group||g,"nested",i&&i.nested||g,"comment",n?this.comment:g])},w.prototype.resolveAll=function(){if(this.b){o.prototype.resolveAll.call(this);for(var t=this.oneofsArray,i=0;i<t.length;)t[i++].resolve();for(var n=this.fieldsArray,i=0;i<n.length;)n[i++].resolve()}return this},w.prototype.v=function(i){return this.p&&(i=this.e||i,o.prototype.v.call(this,i),this.oneofsArray.forEach(t=>{t.r(i)}),this.fieldsArray.forEach(t=>{t.r(i)})),this},w.prototype.get=function(t){return Object.prototype.hasOwnProperty.call(this.fields,t)?this.fields[t]:this.oneofs&&Object.prototype.hasOwnProperty.call(this.oneofs,t)?this.oneofs[t]:this.nested&&Object.prototype.hasOwnProperty.call(this.nested,t)?this.nested[t]:null},w.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);if(t instanceof f&&t.extend===g){if((this.A||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"__proto__"===t.name?this:(t.parent&&t.parent.remove(t),(this.fields[t.name]=t).message=this,t.onAdd(this),r(this))}return t instanceof h?"__proto__"===t.name?this:(this.oneofs||(this.oneofs={}),(this.oneofs[t.name]=t).onAdd(this),r(this)):o.prototype.add.call(this,t)},w.prototype.remove=function(t){if(t instanceof f&&t.extend===g){if(this.fields&&this.fields[t.name]===t)return delete this.fields[t.name],t.parent=null,t.onRemove(this),r(this);throw Error(t+" is not a member of "+this)}if(t instanceof h){if(this.oneofs&&this.oneofs[t.name]===t)return delete this.oneofs[t.name],t.parent=null,t.onRemove(this),r(this);throw Error(t+" is not a member of "+this)}return o.prototype.remove.call(this,t)},w.prototype.isReservedId=function(t){return o.isReservedId(this.reserved,t)},w.prototype.isReservedName=function(t){return o.isReservedName(this.reserved,t)},w.prototype.create=function(t){return new this.ctor(t)},w.prototype.setup=function(){for(var t=this.fullName,i=[],n=0;n<this.fieldsArray.length;++n)i.push(this.i[n].resolve().resolvedType);this.encode=p(this)({Writer:l,types:i,util:d}),this.decode=b(this)({Reader:s,types:i,util:d}),this.verify=v(this)({types:i,util:d}),this.fromObject=m.fromObject(this)({types:i,util:d}),this.toObject=m.toObject(this)({types:i,util:d});var r,t=y[t];return t&&((r=Object.create(this)).fromObject=this.fromObject,this.fromObject=t.fromObject.bind(r),r.toObject=this.toObject,this.toObject=t.toObject.bind(r)),this},w.prototype.encode=function(t,i){return this.setup().encode(t,i)},w.prototype.encodeDelimited=function(t,i){return this.encode(t,i&&i.len?i.fork():i).ldelim()},w.prototype.decode=function(t,i,n,r){return this.setup().decode(t,i,n,r)},w.prototype.decodeDelimited=function(t){return t instanceof s||(t=s.create(t)),this.decode(t,t.uint32())},w.prototype.verify=function(t,i){return this.setup().verify(t,i)},w.prototype.fromObject=function(t,i){return this.setup().fromObject(t,i)},w.prototype.toObject=function(t,i){return this.setup().toObject(t,i)},w.d=function(i){return function(t){d.decorateType(t,i)}}},{11:11,12:12,13:13,14:14,15:15,18:18,19:19,21:21,23:23,24:24,30:30,33:33,37:37,38:38,39:39}],32:[function(t,i,n){var t=t(33),e=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function r(t,i){var n=0,r=Object.create(null);for(i|=0;n<t.length;)r[e[n+i]]=t[n++];return r}n.basic=r([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),n.defaults=r([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",t.emptyArray,null]),n.long=r([0,0,0,1,1],7),n.mapKey=r([0,0,0,5,5,0,0,0,1,1,0,2],2),n.packed=r([1,5,0,0,0,5,5,0,0,0,1,1,0])},{33:33}],33:[function(n,t,i){var r,e,s=t.exports=n(35),o=n(27),u=(s.codegen=n(3),s.fetch=n(5),s.path=n(8),s.patterns=n(36),s.patterns.reservedRe),h=s.patterns.unsafePropertyRe,f=(s.fs=s.inquire("fs"),s.toArray=function(t){if(t){for(var i=Object.keys(t),n=Array(i.length),r=0;r<i.length;)n[r]=t[i[r++]];return n}return[]},s.toObject=function(t){for(var i={},n=0;n<t.length;){var r=t[n++],e=t[n++];e!==g&&(i[r]=e)}return i},s.isReserved=function(t){return u.test(t)},s.safeProp=function(t){return!/^[$\w_]+$/.test(t)||u.test(t)?"["+JSON.stringify(t)+"]":"."+t},s.ucFirst=function(t){return(t[0]||"").toUpperCase()+t.substring(1)},/_([a-z])/g),c=(s.camelCase=function(t){return t.substring(0,1)+t.substring(1).replace(f,function(t,i){return i.toUpperCase()})},s.compareFieldsById=function(t,i){return t.id-i.id},s.decorateType=function(t,i){return t.$type?(i&&t.$type.name!==i&&(s.decorateRoot.remove(t.$type),t.$type.name=i,s.decorateRoot.add(t.$type)),t.$type):(i=new(r=r||n(31))(i||t.name),s.decorateRoot.add(i),i.ctor=t,Object.defineProperty(t,"$type",{value:i,enumerable:!1}),Object.defineProperty(t.prototype,"$type",{value:i,enumerable:!1}),i)},0);s.decorateEnum=function(t){var i;return t.$type||(i=new(e=e||n(14))("Enum"+c++,t),s.decorateRoot.add(i),Object.defineProperty(t,"$type",{value:i,enumerable:!1}),i)},s.setProperty=function(t,i,n,s){if("object"!=typeof t)throw TypeError("dst must be an object");if(i)return function t(i,n,r){var e=n.shift();if(!h.test(e))if(0<n.length)i[e]=t(i[e]||{},n,r);else{if((n=i[e])&&s)return i;n&&(r=[].concat(n).concat(r)),i[e]=r}return i}(t,i=i.split("."),n);throw TypeError("path must be specified")},Object.defineProperty(s,"decorateRoot",{get:function(){return o.decorated||(o.decorated=new(n(26)))}})},{14:14,26:26,27:27,3:3,31:31,35:35,36:36,5:5,8:8}],34:[function(t,i,n){i.exports=e;var r=t(35);function e(t,i){this.lo=t>>>0,this.hi=i>>>0}var s=e.zero=new e(0,0),o=(s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1},e.zeroHash="\0\0\0\0\0\0\0\0",e.fromNumber=function(t){var i,n;return 0===t?s:(n=(t=(i=t<0)?-t:t)>>>0,t=(t-n)/4294967296>>>0,i&&(t=~t>>>0,n=~n>>>0,4294967295<++n&&(n=0,4294967295<++t&&(t=0))),new e(n,t))},e.from=function(t){if("number"==typeof t)return e.fromNumber(t);if(r.isString(t)){if(!r.Long)return e.fromNumber(parseInt(t,10));t=r.Long.fromString(t)}return t.low||t.high?new e(t.low>>>0,t.high>>>0):s},e.prototype.toNumber=function(t){var i;return!t&&this.hi>>>31?(t=1+~this.lo>>>0,i=~this.hi>>>0,-(t+4294967296*(i=t?i:i+1>>>0))):this.lo+4294967296*this.hi},e.prototype.toLong=function(t){return r.Long?new r.Long(0|this.lo,0|this.hi,!!t):{low:0|this.lo,high:0|this.hi,unsigned:!!t}},String.prototype.charCodeAt);e.fromHash=function(t){return"\0\0\0\0\0\0\0\0"===t?s:new e((o.call(t,0)|o.call(t,1)<<8|o.call(t,2)<<16|o.call(t,3)<<24)>>>0,(o.call(t,4)|o.call(t,5)<<8|o.call(t,6)<<16|o.call(t,7)<<24)>>>0)},e.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},e.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},e.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},e.prototype.length=function(){var t=this.lo,i=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0==n?0==i?t<16384?t<128?1:2:t<2097152?3:4:i<16384?i<128?5:6:i<2097152?7:8:n<128?9:10}},{35:35}],35:[function(t,i,n){var r=n;function e(t,i,n){for(var r=Object.keys(i),e=0;e<r.length;++e)t[r[e]]!==g&&n||"__proto__"!==r[e]&&(t[r[e]]=i[r[e]]);return t}function s(t){function n(t,i){if(!(this instanceof n))return new n(t,i);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,n):Object.defineProperty(this,"stack",{value:Error().stack||""}),i&&e(this,i)}return n.prototype=Object.create(Error.prototype,{constructor:{value:n,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return t},set:g,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),n}r.asPromise=t(1),r.base64=t(2),r.EventEmitter=t(4),r.float=t(6),r.inquire=t(7),r.utf8=t(10),r.pool=t(9),r.LongBits=t(34),r.isNode=!!("undefined"!=typeof global&&global&&global.process&&global.process.versions&&global.process.versions.node),r.global=r.isNode&&global||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},r.isString=function(t){return"string"==typeof t||t instanceof String},r.isObject=function(t){return t&&"object"==typeof t},r.isset=r.isSet=function(t,i){var n=t[i];return null!=n&&t.hasOwnProperty(i)&&("object"!=typeof n||0<(Array.isArray(n)?n:Object.keys(n)).length)},r.Buffer=null,r.S=null,r.L=null,r.newBuffer=function(t){return"number"==typeof t?r.Buffer?r.L(t):new r.Array(t):r.Buffer?r.S(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(t){return t?r.LongBits.from(t).toHash():r.LongBits.zeroHash},r.longFromHash=function(t,i){t=r.LongBits.fromHash(t);return r.Long?r.Long.fromBits(t.lo,t.hi,i):t.toNumber(!!i)},r.merge=e,r.recursionLimit=100,r.makeProp=function(t,i){Object.defineProperty(t,i,{enumerable:!0,configurable:!0,writable:!0})},r.lcFirst=function(t){return(t[0]||"").toLowerCase()+t.substring(1)},r.newError=s,r.ProtocolError=s("ProtocolError"),r.oneOfGetter=function(t){for(var n={},i=0;i<t.length;++i)n[t[i]]=1;return function(){for(var t=Object.keys(this),i=t.length-1;-1<i;--i)if(1===n[t[i]]&&this[t[i]]!==g&&null!==this[t[i]])return t[i]}},r.oneOfSetter=function(n){return function(t){for(var i=0;i<n.length;++i)n[i]!==t&&delete this[n[i]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r.c=function(){var n=r.Buffer;n?(r.S=n.from!==Uint8Array.from&&n.from||function(t,i){return new n(t,i)},r.L=n.allocUnsafe||function(t){return new n(t)}):r.S=r.L=null}},{1:1,10:10,2:2,34:34,4:4,6:6,7:7,9:9}],36:[function(t,i,n){n.numberRe=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,n.typeRefRe=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,n.reservedRe=/^(?: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)$/,n.unsafePropertyRe=/^(?:__proto__|prototype|constructor)$/},{}],37:[function(t,i,n){i.exports=function(t){var i=h.codegen(["m","n"],t.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected")("if(n===undefined)n=0")("if(n>util.recursionLimit)")("return%j","maximum nesting depth exceeded"),n=t.oneofsArray,r={};n.length&&i("var p={}");for(var e=0;e<t.fieldsArray.length;++e){var s,o=t.i[e].resolve(),u="m"+h.safeProp(o.name);o.optional&&i("if(%s!=null&&m.hasOwnProperty(%j)){",u,o.name),o.map?(i("if(!util.isObject(%s))",u)("return%j",f(o,"object"))("var k=Object.keys(%s)",u)("for(var i=0;i<k.length;++i){"),function(t,i,n){switch(i.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.key32Re.test(%s))",n)("return%j",f(i,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.key64Re.test(%s))",n)("return%j",f(i,"integer|Long key"));break;case"bool":t("if(!util.key2Re.test(%s))",n)("return%j",f(i,"boolean key"))}}(i,o,"k[i]"),c(i,o,e,u+"[k[i]]")("}")):o.repeated?(i("if(!Array.isArray(%s))",u)("return%j",f(o,"array"))("for(var i=0;i<%s.length;++i){",u),c(i,o,e,u+"[i]")("}")):(o.partOf&&(s=h.safeProp(o.partOf.name),1===r[o.partOf.name]&&i("if(p%s===1)",s)("return%j",o.partOf.name+": multiple values"),r[o.partOf.name]=1,i("p%s=1",s)),c(i,o,e,u)),o.optional&&i("}")}return i("return null")};var o=t(14),h=t(33);function f(t,i){return t.name+": "+i+(t.repeated&&"array"!==i?"[]":t.map&&"object"!==i?"{k:"+t.keyType+"}":"")+" expected"}function c(t,i,n,r){if(i.resolvedType)if(i.resolvedType instanceof o){t("switch(%s){",r)("default:")("return%j",f(i,"enum value"));for(var e=Object.keys(i.resolvedType.values),s=0;s<e.length;++s)t("case %i:",i.resolvedType.values[e[s]]);t("break")("}")}else t("{")("var e=types[%i].verify(%s,n+1);",n,r)("if(e)")("return%j+e",i.name+".")("}");else switch(i.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.isInteger(%s))",r)("return%j",f(i,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",r,r,r,r)("return%j",f(i,"integer|Long"));break;case"float":case"double":t('if(typeof %s!=="number")',r)("return%j",f(i,"number"));break;case"bool":t('if(typeof %s!=="boolean")',r)("return%j",f(i,"boolean"));break;case"string":t("if(!util.isString(%s))",r)("return%j",f(i,"string"));break;case"bytes":t('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',r,r,r)("return%j",f(i,"buffer"))}return t}},{14:14,33:33}],38:[function(t,i,n){var o=t(19);n[".google.protobuf.Any"]={fromObject:function(t,i){if(t&&t["@type"]){var n,r=t["@type"].substring(1+t["@type"].lastIndexOf("/")),r=this.lookup(r);if(r)return~(n="."==(t["@type"][0]||"")?t["@type"].slice(1):t["@type"]).indexOf("/")||(n="/"+n),this.create({type_url:n,value:r.encode(r.fromObject(t,i===g?1:i+1)).finish()})}return this.fromObject(t,i)},toObject:function(t,i){var n,r,e="",s="";return i&&i.json&&t.type_url&&t.value&&(s=t.type_url.substring(1+t.type_url.lastIndexOf("/")),e=t.type_url.substring(0,1+t.type_url.lastIndexOf("/")),(n=this.lookup(s))&&(t=n.decode(t.value))),!(t instanceof this.ctor)&&t instanceof o?(n=t.$type.toObject(t,i),r="."===t.$type.fullName[0]?t.$type.fullName.slice(1):t.$type.fullName,n["@type"]=s=(e=""===e?"type.googleapis.com/":e)+r,n):this.toObject(t,i)}}},{19:19}],39:[function(t,i,n){i.exports=a;var r,e=t(35),s=e.LongBits,o=e.base64,u=e.utf8;function h(t,i,n){this.fn=t,this.len=i,this.next=g,this.val=n}function f(){}function c(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function a(){this.len=0,this.head=new h(f,0,0),this.tail=this.head,this.states=null}function l(){return e.Buffer?function(){return(a.create=function(){return new r})()}:function(){return new a}}function d(t,i,n){i[n]=255&t}function p(t,i){this.len=t,this.next=g,this.val=i}function b(t,i,n){for(;t.hi;)i[n++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;127<t.lo;)i[n++]=127&t.lo|128,t.lo=t.lo>>>7;i[n++]=t.lo}function v(t,i,n){i[n]=255&t,i[n+1]=t>>>8&255,i[n+2]=t>>>16&255,i[n+3]=t>>>24}a.create=l(),a.alloc=function(t){return new e.Array(t)},e.Array!==Array&&(a.alloc=e.pool(a.alloc,e.Array.prototype.subarray)),a.prototype.N=function(t,i,n){return this.tail=this.tail.next=new h(t,i,n),this.len+=i,this},(p.prototype=Object.create(h.prototype)).fn=function(t,i,n){for(;127<t;)i[n++]=127&t|128,t>>>=7;i[n]=t},a.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new p((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},a.prototype.int32=function(t){return t<0?this.N(b,10,s.fromNumber(t)):this.uint32(t)},a.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},a.prototype.int64=a.prototype.uint64=function(t){t=s.from(t);return this.N(b,t.length(),t)},a.prototype.sint64=function(t){t=s.from(t).zzEncode();return this.N(b,t.length(),t)},a.prototype.bool=function(t){return this.N(d,1,t?1:0)},a.prototype.sfixed32=a.prototype.fixed32=function(t){return this.N(v,4,t>>>0)},a.prototype.sfixed64=a.prototype.fixed64=function(t){t=s.from(t);return this.N(v,4,t.lo).N(v,4,t.hi)},a.prototype.float=function(t){return this.N(e.float.writeFloatLE,4,t)},a.prototype.double=function(t){return this.N(e.float.writeDoubleLE,8,t)};var m=e.Array.prototype.set?function(t,i,n){i.set(t,n)}:function(t,i,n){for(var r=0;r<t.length;++r)i[n+r]=t[r]};a.prototype.bytes=function(t){var i,n=t.length>>>0;return n?(e.isString(t)&&(i=a.alloc(n=o.length(t)),o.decode(t,i,0),t=i),this.uint32(n).N(m,n,t)):this.N(d,1,0)},a.prototype.string=function(t){var i=u.length(t);return i?this.uint32(i).N(u.write,i,t):this.N(d,1,0)},a.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new h(f,0,0),this.len=0,this},a.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new h(f,0,0),this.len=0),this},a.prototype.ldelim=function(){var t=this.head,i=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=i,this.len+=n),this},a.prototype.finish=function(){for(var t=this.head.next,i=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,i,n),n+=t.len,t=t.next;return i},a.c=function(t){r=t,a.create=l(),r.c()}},{35:35}],40:[function(t,i,n){i.exports=s;var r=t(39),e=((s.prototype=Object.create(r.prototype)).constructor=s,t(35));function s(){r.call(this)}function o(t,i,n){t.length<40?e.utf8.write(t,i,n):i.utf8Write?i.utf8Write(t,n):i.write(t,n)}s.c=function(){s.alloc=e.L,s.writeBytesBuffer=e.Buffer&&e.Buffer.prototype instanceof Uint8Array&&"set"===e.Buffer.prototype.set.name?function(t,i,n){i.set(t,n)}:function(t,i,n){if(t.copy)t.copy(i,n,0,t.length);else for(var r=0;r<t.length;)i[n++]=t[r++]}},s.prototype.bytes=function(t){var i=(t=e.isString(t)?e.S(t,"base64"):t).length>>>0;return this.uint32(i),i&&this.N(s.writeBytesBuffer,i,t),this},s.prototype.string=function(t){var i=e.Buffer.byteLength(t);return this.uint32(i),i&&this.N(o,i,t),this},s.c()},{35:35,39:39}]},e={},__protobufjs=function t(i){var n=e[i];return n||r[i][0].call(n=e[i]={exports:{}},t,n,n.exports),n.exports}([16][0])}();
|
|
8
8
|
//# sourceMappingURL=protobuf.min.js.map
|
|
9
9
|
|
|
10
10
|
|
|
@@ -174,6 +174,9 @@ class CoreCollector {
|
|
|
174
174
|
if (utility.requireArgumentIfDefined(options.uploadFailedListener, 'options.uploadFailedListener', 'function')) {
|
|
175
175
|
this._uploadFailedListener = options.uploadFailedListener;
|
|
176
176
|
}
|
|
177
|
+
if (utility.requireArgumentIfDefined(options.apiKey, 'options.apiKey', 'string')) {
|
|
178
|
+
this._apiKey = options.apiKey;
|
|
179
|
+
}
|
|
177
180
|
}
|
|
178
181
|
this._messageBuffers = new LazyMapToList(maxUniqueSchemas);
|
|
179
182
|
this._emptySize = this.getByteSize(1);
|
|
@@ -275,6 +278,9 @@ class CoreCollector {
|
|
|
275
278
|
envelopeContents: contents
|
|
276
279
|
};
|
|
277
280
|
try {
|
|
281
|
+
if (this._apiKey) {
|
|
282
|
+
requestInit.headers['x-o11y-api-key'] = this._apiKey;
|
|
283
|
+
}
|
|
278
284
|
if (this._uploadOptionsCallback) {
|
|
279
285
|
const options = this._uploadOptionsCallback() || {};
|
|
280
286
|
if (options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collectors.js","sources":["../../../../src/collectors/protobuf-util.ts","../../../../src/collectors/core-collector/CoreEnvelopeProtobufUtility.ts","../../../../src/collectors/core-collector/UploadMode.ts","../../../../src/collectors/core-collector/CoreCollector.ts","../../../../src/collectors/hybrid-collector/HybridCollector.ts"],"sourcesContent":["import { Message, Root, Type } from 'protobufjs';\nimport { SchematizedData, schemaUtil, utility } from 'o11y/shared';\n\nimport { LogMeta, Schema, SchematizedPayload } from '../interfaces';\nimport { EncodedSchematizedPayload, LogMessage, LogMessageRaw } from '../core_envelope/interfaces';\n\nclass ProtobufUtil {\n private readonly _typeStore = new Map<string, Type>();\n\n public getSchemaType(schema: Schema): Type {\n utility.requireArgument(schema, 'schema');\n const schemaPath = schemaUtil.getSchemaId(schema);\n let type = this._typeStore.get(schemaPath);\n\n if (!type) {\n // Lazy add to the type store\n const schemaInstance = Root.fromJSON(schema.pbjsSchema);\n // this will throw if it can't find it\n type = schemaInstance.lookupType(schemaPath);\n this._typeStore.set(schemaPath, type);\n }\n\n return type;\n }\n\n public validate(schema: Schema, data: SchematizedData): Type {\n utility.requireArgument(schema, 'schema');\n utility.requireArgument(data, 'data');\n const type: Type = this.getSchemaType(schema);\n\n const errorText = type.verify(data);\n if (errorText) {\n throw new Error(`Data is invalid for ${type.fullName}: ${errorText}`);\n }\n return type;\n }\n\n // Note: In a Node environment, this actually returns an instance of Buffer.\n public encode(schema: Schema, data: SchematizedData): Uint8Array {\n const type: Type = this.validate(schema, data);\n const message: Message = type.fromObject(data);\n const encoded: Uint8Array = type.encode(message).finish();\n return encoded;\n }\n\n public encodePayload(rawPayload: SchematizedPayload): EncodedSchematizedPayload {\n if (rawPayload?.schema && rawPayload.payload) {\n return {\n schemaName: schemaUtil.getSchemaId(rawPayload.schema),\n payload: this.encode(rawPayload.schema, rawPayload.payload)\n };\n }\n return undefined;\n }\n\n // This method generates a LogMessage (used in the CoreEnvelope) from the provided arguments.\n public getLogMessage(schema: Schema, data: SchematizedData, logMeta: LogMeta): LogMessage {\n return {\n timestamp: logMeta.timestamp,\n data: this.encode(schema, data),\n age: logMeta.age,\n rootId: logMeta.rootId,\n seq: logMeta.sequence,\n sseq: logMeta.schemaSequence,\n loggerName: logMeta.loggerName,\n pagePayload: this.encodePayload(logMeta.pagePayload),\n loggerAppName: logMeta.loggerAppName,\n connectionType: logMeta.connectionType,\n appPayload: this.encodePayload(logMeta.appPayload),\n csId: logMeta.clientSessionId,\n recCsId: logMeta.receiverClientSessionId,\n recRootId: logMeta.receiverRootId\n };\n }\n\n public processRawLogMessage(schema: Schema, raw: LogMessageRaw): LogMessage {\n const dataClone = raw.data ? Object.assign({}, raw.data) : {};\n if (schemaUtil.isInternal(schema) && dataClone.userPayload) {\n dataClone.userPayload = this.encodePayload(dataClone.userPayload);\n }\n\n return Object.assign({}, raw, {\n data: this.encode(schema, dataClone),\n pagePayload: this.encodePayload(raw.pagePayload),\n appPayload: this.encodePayload(raw.appPayload)\n });\n }\n}\n\nexport const protobufUtil = new ProtobufUtil();\n","import { Root, Type } from 'protobufjs';\nimport {\n CoreEnvelope,\n CoreEnvelopeContents,\n CoreEnvelopeContentsRaw,\n LogMessage,\n CoreEnvelopeBuilder\n} from 'o11y/core_envelope';\nimport { coreEnvelopeSchema } from 'o11y_schema/sf_instrumentation';\nimport { Schema } from '../../interfaces';\nimport { protobufUtil } from '../protobuf-util';\n\nconst root: Root = Root.fromJSON(coreEnvelopeSchema.pbjsSchema);\nconst _coreEnvelopeType: Type = root.lookupType('CoreEnvelope');\n\nexport function processRawContents(contentsRaw: CoreEnvelopeContentsRaw): CoreEnvelopeContents {\n const processed: CoreEnvelopeContents = Object.assign({}, contentsRaw, {\n messages: new Map<Schema, LogMessage[]>()\n });\n // Encode individual messages\n contentsRaw.messages.forEach(function (rawMessages, schema) {\n processed.messages.set(\n schema,\n rawMessages.map((msg) => protobufUtil.processRawLogMessage(schema, msg))\n );\n });\n return processed;\n}\n\nexport function envelopeContents(contents: CoreEnvelopeContents): CoreEnvelope {\n return CoreEnvelopeBuilder.buildFrom(contents);\n}\n\nexport function encodeCoreEnvelope(coreEnvelope: CoreEnvelope): Uint8Array {\n const errorMessage = _coreEnvelopeType.verify(coreEnvelope);\n if (errorMessage) {\n throw new Error(`Invalid CoreEnvelope: ${errorMessage}`);\n }\n\n const encodedCoreEnvelope = _coreEnvelopeType.encode(coreEnvelope).finish();\n return encodedCoreEnvelope;\n}\n\nexport function encodeCoreEnvelopeContentsRaw(contentsRaw: CoreEnvelopeContentsRaw): Uint8Array {\n const contents: CoreEnvelopeContents = processRawContents(contentsRaw);\n const coreEnvelope: CoreEnvelope = envelopeContents(contents);\n const encoded: Uint8Array = encodeCoreEnvelope(coreEnvelope);\n return encoded;\n}\n","export enum UploadMode {\n fetchBinary, // application/octet-stream\n fetchFile, // multipart/form-data\n noUpload\n}\n","import {\n Environment,\n LogCollector,\n LogMeta,\n MetricsCollector,\n MetricsExtractorMethods,\n Schema\n} from '../../interfaces';\nimport { LazyMapToList, SchematizedData, schemaUtil, utility } from 'o11y/shared';\nimport {\n CoreEnvelope,\n CoreEnvelopeBuilder,\n CoreEnvelopeContents,\n LogMessage,\n StaticAttributes\n} from 'o11y/core_envelope';\n\nimport { protobufUtil } from '../protobuf-util';\n\nimport { envelopeContents, encodeCoreEnvelope } from './CoreEnvelopeProtobufUtility';\nimport { UploadResult } from './interfaces/UploadResult';\nimport { CoreCollectorOptions } from './interfaces/CoreCollectorOptions';\nimport { UploadMode } from './UploadMode';\n\nconst defaultFormDataKey = 'telemetry';\nconst defaultMaxUniqueSchemas = 10000;\nconst defaultMaxDelayBeforeUpload = 10000;\nconst defaultMessagesLimit = 10;\nconst defaultMetricsLimit = 10;\nconst defaultUploadMode = UploadMode.fetchBinary;\n\nexport type UploadOptionsCallback = () => RequestInit;\n\nexport class CoreCollector implements LogCollector, MetricsCollector {\n private readonly _messageBuffers: LazyMapToList<Schema, LogMessage>;\n private _intervalHandle: NodeJS.Timeout;\n private _metricsExtractors: MetricsExtractorMethods;\n private readonly _staticAttributes: StaticAttributes;\n private _immediateUpload: boolean;\n private readonly _messagesLimit: number = defaultMessagesLimit;\n /*\n Known limitation:\n Unlike _messagesLimit, _metricsLimit is not a strict limit in all cases, as the CoreCollector\n doesn't get notified every time a new metric is added. Instead, it takes metrics into account\n when a message is logged or the upload timer is elapsed. If the _metricsLimit is exceeded \n with no messages logged and upload time not yet elapsed, upload will not occur.\n */\n private readonly _metricsLimit: number = defaultMetricsLimit;\n private readonly _formDataKey: string = defaultFormDataKey;\n private readonly _uploadFailedListener: (ur: UploadResult) => unknown;\n private _uploadInterval: number = defaultMaxDelayBeforeUpload;\n private _uploadEndpoint: string;\n private _uploadMode: UploadMode;\n private readonly _emptySize: number;\n private _messageSize = 0;\n private _uploadOptionsCallback: UploadOptionsCallback;\n\n constructor(\n uploadEndpoint?: string,\n uploadMode?: UploadMode,\n environment?: Environment,\n options?: CoreCollectorOptions\n ) {\n this.uploadEndpoint = uploadEndpoint;\n this.uploadMode = uploadMode == undefined ? defaultUploadMode : uploadMode;\n\n if (environment) {\n this._staticAttributes = {\n appName: environment.appName,\n appVersion: environment.appVersion,\n appExperience: environment.appExperience,\n deviceId: environment.deviceId,\n deviceModel: environment.deviceModel,\n sdkVersion: environment.sdkVersion\n };\n }\n\n let maxUniqueSchemas = defaultMaxUniqueSchemas;\n if (options) {\n const mus: number = options.maxUniqueSchemas;\n if (mus !== undefined) {\n if (typeof mus !== 'number' || !(mus > 0)) {\n throw new Error('options.maxUniqueSchemas, if defined, must be > 0');\n }\n maxUniqueSchemas = mus;\n }\n\n const msglim: number = options.messagesLimit;\n if (msglim !== undefined) {\n if (typeof msglim !== 'number' || !(msglim > 0)) {\n throw new Error('options.messagesLimit, if defined, must be > 0');\n }\n this._messagesLimit = msglim;\n }\n\n const metlim: number = options.metricsLimit;\n if (metlim !== undefined) {\n if (typeof metlim !== 'number' || !(metlim > 0)) {\n throw new Error('options.metricsLimit, if defined, must be > 0');\n }\n this._metricsLimit = metlim;\n }\n\n if (\n utility.requireArgumentIfDefined(\n options.formDataKeyName,\n 'options.formDataKeyName',\n 'string'\n )\n ) {\n this._formDataKey = options.formDataKeyName;\n }\n\n if (\n utility.requireArgumentIfDefined(\n options.uploadFailedListener,\n 'options.uploadFailedListener',\n 'function'\n )\n ) {\n this._uploadFailedListener = options.uploadFailedListener;\n }\n }\n this._messageBuffers = new LazyMapToList<Schema, LogMessage>(maxUniqueSchemas);\n\n this._emptySize = this.getByteSize(1);\n this._restartTimer();\n }\n\n get uploadInterval(): number {\n return this._uploadInterval;\n }\n set uploadInterval(uploadInterval: number) {\n if (uploadInterval === undefined) {\n uploadInterval = defaultMaxDelayBeforeUpload;\n }\n if (typeof uploadInterval !== 'number' || !(uploadInterval > 0)) {\n throw new Error('uploadInterval, if defined, must be > 0');\n }\n if (uploadInterval !== this._uploadInterval) {\n this._uploadInterval = uploadInterval;\n // Now that the interval has changed, restart the timer\n this._restartTimer();\n }\n }\n\n get uploadEndpoint(): string {\n return this._uploadEndpoint;\n }\n set uploadEndpoint(uploadEndpoint: string) {\n utility.requireArgumentIfDefined(uploadEndpoint, 'uploadEndpoint', 'string');\n this._uploadEndpoint = uploadEndpoint;\n }\n\n get uploadOptionsCallback(): UploadOptionsCallback {\n return this._uploadOptionsCallback;\n }\n set uploadOptionsCallback(uploadOptionsCallback: UploadOptionsCallback) {\n utility.requireArgumentIfDefined(\n uploadOptionsCallback,\n 'uploadOptionsCallback',\n 'function'\n );\n\n this._uploadOptionsCallback = uploadOptionsCallback;\n }\n\n get uploadMode(): UploadMode {\n return this._uploadMode;\n }\n set uploadMode(uploadMode: UploadMode) {\n utility.requireArgumentIfDefined(uploadMode, 'uploadMode', 'number');\n if (uploadMode === undefined) {\n uploadMode = defaultUploadMode;\n }\n if (!(uploadMode in UploadMode)) {\n throw new Error(`Unsupported upload mode: ${uploadMode}`);\n }\n this._uploadMode = uploadMode;\n }\n\n // Note: If making changes to this method, please locally test using SizeEstimation.test.js\n getByteSize(accuracy?: number): number {\n // This method provides an estimate.\n // Accuracy is specified as 1 = most accurate\n return accuracy >= 1\n ? this._buildProtoEncodedCoreEnvelope(false).byteLength\n : accuracy >= 0.5\n ? this._emptySize + this._messageSize + this.metricsCount * 8\n : this._emptySize + this._messageSize;\n }\n\n private _stopTimer(): void {\n if (this._intervalHandle !== undefined) {\n clearInterval(this._intervalHandle);\n this._intervalHandle = undefined;\n }\n }\n\n private _restartTimer(): void {\n this._stopTimer();\n this._intervalHandle = setInterval(() => {\n if (this.hasData) {\n this._upload();\n }\n }, this._uploadInterval);\n }\n\n // This method is implementing the LogCollector interface, but needs to return (not swallow)\n // the async result in order for direct call to it from test to handle failure cases properly.\n async collect(schema: Schema, data: SchematizedData, logMeta: LogMeta): Promise<UploadResult> {\n if (schemaUtil.isInternal(schema) && data.userPayload) {\n data.userPayload = protobufUtil.encodePayload(data.userPayload);\n }\n const msg: LogMessage = protobufUtil.getLogMessage(schema, data, logMeta);\n\n if (!this._messageBuffers.push(schema, msg)) {\n throw new Error(`Buffer is full. Refusing schemaId ${schemaUtil.getSchemaId(schema)}`);\n }\n // Get an estimate\n this._messageSize += utility.estimateObjectSize(msg);\n if (this._shouldUpload()) {\n return this._upload();\n }\n return undefined;\n }\n\n private _shouldUpload(): boolean {\n return (\n (this._immediateUpload && this.hasData) ||\n this.messagesCount >= this._messagesLimit ||\n this.metricsCount >= this._metricsLimit\n );\n }\n\n private async _upload(userInitiated?: boolean): Promise<UploadResult> {\n this._restartTimer();\n if (!this._uploadEndpoint || this._uploadMode === UploadMode.noUpload) {\n return undefined;\n }\n\n const contents: CoreEnvelopeContents = this._getContentsOfCoreEnvelope(true);\n return this._uploadContents(contents, userInitiated);\n }\n\n private async _uploadContents(\n contents: CoreEnvelopeContents,\n userInitiated: boolean\n ): Promise<UploadResult> {\n let requestInit: RequestInit = this._getRequestInit(contents);\n const ur: UploadResult = {\n envelopeContents: contents\n };\n try {\n if (this._uploadOptionsCallback) {\n const options: RequestInit = this._uploadOptionsCallback() || {};\n if (options) {\n if (options.headers && requestInit.headers) {\n // According to lib.dom.d.ts:\n // type HeadersInit = [string, string][] | Record<string, string> | Headers;\n if (options.headers instanceof Headers) {\n for (const key in requestInit.headers) {\n if (\n Object.prototype.hasOwnProperty.call(requestInit.headers, key)\n ) {\n options.headers.set(\n key,\n (requestInit.headers as Record<string, string>)[key]\n );\n }\n }\n } else if (Array.isArray(options.headers)) {\n // This doesn't seem valid according to https://developer.mozilla.org/en-US/docs/Web/API/fetch\n throw new Error('Headers as array is not supported.');\n } else {\n Object.assign(options.headers, requestInit.headers);\n }\n }\n options.method = requestInit.method;\n options.body = requestInit.body;\n requestInit = options;\n }\n }\n\n ur.response = await fetch(this._uploadEndpoint, requestInit);\n // fetch only throws on network errors, not HTTP errors, so handle that here\n if (!ur.response.ok) {\n throw new Error('HTTP Not OK');\n }\n return ur;\n } catch (err) {\n ur.error = err;\n if (!userInitiated && this._uploadFailedListener) {\n try {\n this._uploadFailedListener(ur);\n } catch {}\n }\n throw ur;\n }\n }\n\n private _getRequestInit(contents: CoreEnvelopeContents): RequestInit {\n const coreEnvelope: CoreEnvelope = envelopeContents(contents);\n const coreEnvelopeEncoded: Uint8Array = encodeCoreEnvelope(coreEnvelope);\n\n let requestInit: RequestInit;\n switch (this._uploadMode) {\n case UploadMode.fetchBinary:\n requestInit = {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/octet-stream'\n },\n body: coreEnvelopeEncoded\n };\n break;\n case undefined:\n case UploadMode.fetchFile:\n if (typeof FormData !== 'function') {\n throw new Error('FormData is not a function in the global namespace.');\n }\n const formData = new FormData();\n formData.append(\n this._formDataKey || defaultFormDataKey,\n new Blob([coreEnvelopeEncoded])\n );\n // Per [this article](https://muffinman.io/uploading-files-using-fetch-multipart-form-data/)\n // make sure not to set the Content-Type header.\n // The browser will set it for you, including the boundary parameter.\n requestInit = {\n method: 'POST',\n body: formData\n };\n break;\n case UploadMode.noUpload:\n default:\n throw new Error('Invalid uploadMode');\n }\n return requestInit;\n }\n\n private _checkUploadState(): void {\n if (this._uploadEndpoint === undefined) {\n throw new Error('Upload endpoint is unset');\n }\n if (this._uploadMode === UploadMode.noUpload) {\n throw new Error('Upload mode is unset');\n }\n }\n\n // User initiated method\n public async upload(contents?: CoreEnvelopeContents): Promise<UploadResult> {\n this._checkUploadState();\n if (utility.requireArgumentIfDefined(contents, 'contents', 'object')) {\n return this._uploadContents(contents, true);\n }\n\n return this.hasData ? this._upload(true) : undefined;\n }\n\n get hasData(): boolean {\n return this.messagesCount > 0 || this.metricsCount > 0;\n }\n\n get messagesCount(): number {\n return this._messageBuffers.totalItemCount;\n }\n\n get metricsCount(): number {\n let count = 0;\n\n if (this._metricsExtractors) {\n count += this._metricsExtractors.getAllUpCounters().length || 0;\n count += this._metricsExtractors.getAllValueRecorders().length || 0;\n count += this._metricsExtractors.getAllBucketHistograms().length || 0;\n }\n\n return count;\n }\n\n getProtoEncodedCoreEnvelope(): Uint8Array {\n return this._buildProtoEncodedCoreEnvelope(true);\n }\n\n getContentsOfCoreEnvelope(): CoreEnvelopeContents {\n return this._getContentsOfCoreEnvelope(true);\n }\n\n private _getContentsOfCoreEnvelope(extract: boolean): CoreEnvelopeContents {\n // 1. extract=true is for most use cases.\n // 2. extract=false is for peeking into the contents without affecting them\n // (i.e. messages are kept in the buffers and metrics are not reset.)\n // Message arrays are references to the originals and should be handled carefully.\n\n const contents: CoreEnvelopeContents = {\n staticAttributes: this._staticAttributes,\n messages: this._messageBuffers.getAllMessages(extract)\n };\n\n if (this._metricsExtractors) {\n contents.upCounters = CoreEnvelopeBuilder.getUpCounters(\n this._metricsExtractors.getAllUpCounters(),\n extract\n );\n contents.valueRecorders = CoreEnvelopeBuilder.getValueRecorders(\n this._metricsExtractors.getAllValueRecorders(),\n extract\n );\n contents.bucketHistograms = CoreEnvelopeBuilder.getBucketHistograms(\n this._metricsExtractors.getAllBucketHistograms(),\n extract\n );\n }\n\n if (extract) {\n this._messageSize = 0;\n }\n return contents;\n }\n\n private _buildProtoEncodedCoreEnvelope(extract: boolean): Uint8Array {\n const contents: CoreEnvelopeContents = this._getContentsOfCoreEnvelope(extract);\n const coreEnvelope: CoreEnvelope = envelopeContents(contents);\n return encodeCoreEnvelope(coreEnvelope);\n }\n\n receiveMetricsExtractors(metricsExtractors: MetricsExtractorMethods): void {\n this._metricsExtractors = metricsExtractors;\n }\n}\n","import {\n BucketMetric,\n LogCollector,\n LogMeta,\n Metric,\n MetricsCollector,\n MetricsExtractorMethods,\n Schema\n} from '../../interfaces';\nimport { SchematizedData, MetricsTags, schemaUtil } from 'o11y/shared';\nimport { protobufUtil } from '../protobuf-util';\nimport {\n BucketHistogram,\n EncodedSchematizedPayload,\n LogMessage,\n Metrics,\n MetricTag,\n UpCounter,\n ValueRecorder\n} from 'o11y/core_envelope';\n\nconst metricsCollectionMilliseconds = 30000;\n\n// The observability plugin expects encoded payloads, so can't use LogMeta as-is.\ninterface LogMetaObservability {\n timestamp: number;\n rootId: string;\n sequence: number;\n schemaSequence: number;\n loggerName: string;\n pagePayload: EncodedSchematizedPayload;\n loggerAppName: string;\n connectionType: string;\n appPayload: EncodedSchematizedPayload;\n clientSessionId: string;\n age: number;\n receiverClientSessionId?: string;\n receiverRootId?: string;\n}\n\n// The following interface is expected to be fulfilled by the\n// observability plugin in Lightning SDK.\ndeclare type NimbusObservabilityPlugin = {\n // Called to send a collected message to native for handling\n log: (schema: string, encodedMessage: Uint8Array, logMeta: LogMetaObservability) => void;\n\n // Called to send metrics to native for handling\n logMetrics: (metrics: Metrics) => void;\n\n // Called to inform native that the web view has detected an idle state.\n idleDetected: (timestamp: number) => void;\n};\n\n// The `HybridCollector` uses nimbus to send log data immediately across\n// to be handled by the native observability library.\nexport class HybridCollector implements LogCollector, MetricsCollector {\n private readonly _observability: NimbusObservabilityPlugin;\n private _metricsExtractors: MetricsExtractorMethods;\n\n constructor() {\n if (typeof __nimbus === 'undefined') {\n throw new Error('Nimbus is unavailable');\n }\n if (!__nimbus.plugins || !__nimbus.plugins.observability) {\n throw new Error('Observability plugin not found in Nimbus plugins');\n }\n this._observability = __nimbus.plugins.observability as NimbusObservabilityPlugin;\n setInterval(() => {\n this._collectMetrics();\n }, metricsCollectionMilliseconds);\n }\n\n collect(schema: Schema, data: SchematizedData, logMeta: LogMeta): void {\n if (schemaUtil.isInternal(schema) && data.userPayload) {\n data.userPayload = protobufUtil.encodePayload(data.userPayload);\n }\n const logMessage: LogMessage = protobufUtil.getLogMessage(schema, data, logMeta);\n const logMetaObs: LogMetaObservability = {\n timestamp: logMeta.timestamp,\n rootId: logMeta.rootId,\n sequence: logMeta.sequence,\n schemaSequence: logMeta.schemaSequence,\n loggerName: logMeta.loggerName,\n pagePayload: logMessage.pagePayload,\n loggerAppName: logMeta.loggerAppName,\n connectionType: logMeta.connectionType,\n appPayload: logMessage.appPayload,\n clientSessionId: logMeta.clientSessionId,\n age: logMeta.age,\n receiverClientSessionId: logMeta.receiverClientSessionId,\n receiverRootId: logMeta.receiverRootId\n };\n this._observability.log(schemaUtil.getSchemaId(schema), logMessage.data, logMetaObs);\n }\n\n receiveMetricsExtractors(metricsExtractors: MetricsExtractorMethods): void {\n this._metricsExtractors = metricsExtractors;\n }\n\n // An app should call this method when it detects idle in the web view in order\n // to inform the native app of the idle state.\n notifyIdleDetected(timestamp: number): void {\n this._observability.idleDetected(timestamp);\n }\n\n private _collectMetrics(): void {\n if (this._metricsExtractors) {\n const upCounters: Metric<number>[] = this._metricsExtractors.getAllUpCounters();\n const valueRecorders: Metric<number[]>[] =\n this._metricsExtractors.getAllValueRecorders();\n const bucketHistograms: BucketMetric<number[]>[] =\n this._metricsExtractors.getAllBucketHistograms();\n const recorders: ValueRecorder[] = [];\n const counters: UpCounter[] = [];\n const histograms: BucketHistogram[] = [];\n\n for (const valueRecorder of valueRecorders) {\n const vr: ValueRecorder = {\n name: valueRecorder.getName(),\n createdTimestamp: valueRecorder.getCreatedOn(),\n lastUpdatedTimestamp: valueRecorder.getLastUpdatedOn(),\n values: valueRecorder.getData(),\n ownerName: valueRecorder.getOwnerName(),\n ownerAppName: valueRecorder.getOwnerAppName(),\n tags: this._getMetricTags(valueRecorder)\n };\n recorders.push(vr);\n valueRecorder.reset();\n }\n\n for (const upCounter of upCounters) {\n const uc: UpCounter = {\n name: upCounter.getName(),\n createdTimestamp: upCounter.getCreatedOn(),\n lastUpdatedTimestamp: upCounter.getLastUpdatedOn(),\n value: upCounter.getData(),\n ownerName: upCounter.getOwnerName(),\n ownerAppName: upCounter.getOwnerAppName(),\n tags: this._getMetricTags(upCounter)\n };\n counters.push(uc);\n upCounter.reset();\n }\n\n for (const bucketHistogram of bucketHistograms) {\n const bh: BucketHistogram = {\n name: bucketHistogram.getName(),\n createdTimestamp: bucketHistogram.getCreatedOn(),\n lastUpdatedTimestamp: bucketHistogram.getLastUpdatedOn(),\n values: bucketHistogram.getData(),\n buckets: bucketHistogram.getBuckets(),\n ownerName: bucketHistogram.getOwnerName(),\n ownerAppName: bucketHistogram.getOwnerAppName(),\n tags: this._getMetricTags(bucketHistogram)\n };\n histograms.push(bh);\n bucketHistogram.reset();\n }\n\n if (recorders.length > 0 || counters.length > 0) {\n const metrics: Metrics = {\n upCounters: counters,\n valueRecorders: recorders,\n bucketHistograms: histograms\n };\n this._observability.logMetrics(metrics);\n }\n }\n }\n\n private _getMetricTags<T>(metric: Metric<T>): MetricTag[] {\n const metricsTags: MetricsTags = metric.getTags();\n\n if (metricsTags) {\n return Object.entries(metricsTags).map((entry) => {\n const mt: MetricTag = {\n name: entry[0],\n value: entry[1].toString()\n };\n return mt;\n });\n }\n return [];\n }\n}\n"],"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AAK,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;iBAC7B,CAAC;AACF,gBAAA,OAAO,EAAE,CAAC;AACd,aAAC,CAAC,CAAC;AACN,SAAA;AACD,QAAA,OAAO,EAAE,CAAC;KACb;AACJ;;;;"}
|
|
1
|
+
{"version":3,"file":"collectors.js","sources":["../../../../src/collectors/protobuf-util.ts","../../../../src/collectors/core-collector/CoreEnvelopeProtobufUtility.ts","../../../../src/collectors/core-collector/UploadMode.ts","../../../../src/collectors/core-collector/CoreCollector.ts","../../../../src/collectors/hybrid-collector/HybridCollector.ts"],"sourcesContent":["import { Message, Root, Type } from 'protobufjs';\nimport { SchematizedData, schemaUtil, utility } from 'o11y/shared';\n\nimport { LogMeta, Schema, SchematizedPayload } from '../interfaces';\nimport { EncodedSchematizedPayload, LogMessage, LogMessageRaw } from '../core_envelope/interfaces';\n\nclass ProtobufUtil {\n private readonly _typeStore = new Map<string, Type>();\n\n public getSchemaType(schema: Schema): Type {\n utility.requireArgument(schema, 'schema');\n const schemaPath = schemaUtil.getSchemaId(schema);\n let type = this._typeStore.get(schemaPath);\n\n if (!type) {\n // Lazy add to the type store\n const schemaInstance = Root.fromJSON(schema.pbjsSchema);\n // this will throw if it can't find it\n type = schemaInstance.lookupType(schemaPath);\n this._typeStore.set(schemaPath, type);\n }\n\n return type;\n }\n\n public validate(schema: Schema, data: SchematizedData): Type {\n utility.requireArgument(schema, 'schema');\n utility.requireArgument(data, 'data');\n const type: Type = this.getSchemaType(schema);\n\n const errorText = type.verify(data);\n if (errorText) {\n throw new Error(`Data is invalid for ${type.fullName}: ${errorText}`);\n }\n return type;\n }\n\n // Note: In a Node environment, this actually returns an instance of Buffer.\n public encode(schema: Schema, data: SchematizedData): Uint8Array {\n const type: Type = this.validate(schema, data);\n const message: Message = type.fromObject(data);\n const encoded: Uint8Array = type.encode(message).finish();\n return encoded;\n }\n\n public encodePayload(rawPayload: SchematizedPayload): EncodedSchematizedPayload {\n if (rawPayload?.schema && rawPayload.payload) {\n return {\n schemaName: schemaUtil.getSchemaId(rawPayload.schema),\n payload: this.encode(rawPayload.schema, rawPayload.payload)\n };\n }\n return undefined;\n }\n\n // This method generates a LogMessage (used in the CoreEnvelope) from the provided arguments.\n public getLogMessage(schema: Schema, data: SchematizedData, logMeta: LogMeta): LogMessage {\n return {\n timestamp: logMeta.timestamp,\n data: this.encode(schema, data),\n age: logMeta.age,\n rootId: logMeta.rootId,\n seq: logMeta.sequence,\n sseq: logMeta.schemaSequence,\n loggerName: logMeta.loggerName,\n pagePayload: this.encodePayload(logMeta.pagePayload),\n loggerAppName: logMeta.loggerAppName,\n connectionType: logMeta.connectionType,\n appPayload: this.encodePayload(logMeta.appPayload),\n csId: logMeta.clientSessionId,\n recCsId: logMeta.receiverClientSessionId,\n recRootId: logMeta.receiverRootId\n };\n }\n\n public processRawLogMessage(schema: Schema, raw: LogMessageRaw): LogMessage {\n const dataClone = raw.data ? Object.assign({}, raw.data) : {};\n if (schemaUtil.isInternal(schema) && dataClone.userPayload) {\n dataClone.userPayload = this.encodePayload(dataClone.userPayload);\n }\n\n return Object.assign({}, raw, {\n data: this.encode(schema, dataClone),\n pagePayload: this.encodePayload(raw.pagePayload),\n appPayload: this.encodePayload(raw.appPayload)\n });\n }\n}\n\nexport const protobufUtil = new ProtobufUtil();\n","import { Root, Type } from 'protobufjs';\nimport {\n CoreEnvelope,\n CoreEnvelopeContents,\n CoreEnvelopeContentsRaw,\n LogMessage,\n CoreEnvelopeBuilder\n} from 'o11y/core_envelope';\nimport { coreEnvelopeSchema } from 'o11y_schema/sf_instrumentation';\nimport { Schema } from '../../interfaces';\nimport { protobufUtil } from '../protobuf-util';\n\nconst root: Root = Root.fromJSON(coreEnvelopeSchema.pbjsSchema);\nconst _coreEnvelopeType: Type = root.lookupType('CoreEnvelope');\n\nexport function processRawContents(contentsRaw: CoreEnvelopeContentsRaw): CoreEnvelopeContents {\n const processed: CoreEnvelopeContents = Object.assign({}, contentsRaw, {\n messages: new Map<Schema, LogMessage[]>()\n });\n // Encode individual messages\n contentsRaw.messages.forEach(function (rawMessages, schema) {\n processed.messages.set(\n schema,\n rawMessages.map((msg) => protobufUtil.processRawLogMessage(schema, msg))\n );\n });\n return processed;\n}\n\nexport function envelopeContents(contents: CoreEnvelopeContents): CoreEnvelope {\n return CoreEnvelopeBuilder.buildFrom(contents);\n}\n\nexport function encodeCoreEnvelope(coreEnvelope: CoreEnvelope): Uint8Array {\n const errorMessage = _coreEnvelopeType.verify(coreEnvelope);\n if (errorMessage) {\n throw new Error(`Invalid CoreEnvelope: ${errorMessage}`);\n }\n\n const encodedCoreEnvelope = _coreEnvelopeType.encode(coreEnvelope).finish();\n return encodedCoreEnvelope;\n}\n\nexport function encodeCoreEnvelopeContentsRaw(contentsRaw: CoreEnvelopeContentsRaw): Uint8Array {\n const contents: CoreEnvelopeContents = processRawContents(contentsRaw);\n const coreEnvelope: CoreEnvelope = envelopeContents(contents);\n const encoded: Uint8Array = encodeCoreEnvelope(coreEnvelope);\n return encoded;\n}\n","export enum UploadMode {\n fetchBinary, // application/octet-stream\n fetchFile, // multipart/form-data\n noUpload\n}\n","import {\n Environment,\n LogCollector,\n LogMeta,\n MetricsCollector,\n MetricsExtractorMethods,\n Schema\n} from '../../interfaces';\nimport { LazyMapToList, SchematizedData, schemaUtil, utility } from 'o11y/shared';\nimport {\n CoreEnvelope,\n CoreEnvelopeBuilder,\n CoreEnvelopeContents,\n LogMessage,\n StaticAttributes\n} from 'o11y/core_envelope';\n\nimport { protobufUtil } from '../protobuf-util';\n\nimport { envelopeContents, encodeCoreEnvelope } from './CoreEnvelopeProtobufUtility';\nimport { UploadResult } from './interfaces/UploadResult';\nimport { CoreCollectorOptions } from './interfaces/CoreCollectorOptions';\nimport { UploadMode } from './UploadMode';\n\nconst defaultFormDataKey = 'telemetry';\nconst defaultMaxUniqueSchemas = 10000;\nconst defaultMaxDelayBeforeUpload = 10000;\nconst defaultMessagesLimit = 10;\nconst defaultMetricsLimit = 10;\nconst defaultUploadMode = UploadMode.fetchBinary;\n\nexport type UploadOptionsCallback = () => RequestInit;\n\nexport class CoreCollector implements LogCollector, MetricsCollector {\n private readonly _messageBuffers: LazyMapToList<Schema, LogMessage>;\n private _intervalHandle: NodeJS.Timeout;\n private _metricsExtractors: MetricsExtractorMethods;\n private readonly _staticAttributes: StaticAttributes;\n private _immediateUpload: boolean;\n private readonly _messagesLimit: number = defaultMessagesLimit;\n /*\n Known limitation:\n Unlike _messagesLimit, _metricsLimit is not a strict limit in all cases, as the CoreCollector\n doesn't get notified every time a new metric is added. Instead, it takes metrics into account\n when a message is logged or the upload timer is elapsed. If the _metricsLimit is exceeded \n with no messages logged and upload time not yet elapsed, upload will not occur.\n */\n private readonly _metricsLimit: number = defaultMetricsLimit;\n private readonly _formDataKey: string = defaultFormDataKey;\n private readonly _uploadFailedListener: (ur: UploadResult) => unknown;\n private _uploadInterval: number = defaultMaxDelayBeforeUpload;\n private _uploadEndpoint: string;\n private _uploadMode: UploadMode;\n private readonly _emptySize: number;\n private _messageSize = 0;\n private _uploadOptionsCallback: UploadOptionsCallback;\n private readonly _apiKey: string;\n\n constructor(\n uploadEndpoint?: string,\n uploadMode?: UploadMode,\n environment?: Environment,\n options?: CoreCollectorOptions\n ) {\n this.uploadEndpoint = uploadEndpoint;\n this.uploadMode = uploadMode == undefined ? defaultUploadMode : uploadMode;\n\n if (environment) {\n this._staticAttributes = {\n appName: environment.appName,\n appVersion: environment.appVersion,\n appExperience: environment.appExperience,\n deviceId: environment.deviceId,\n deviceModel: environment.deviceModel,\n sdkVersion: environment.sdkVersion\n };\n }\n\n let maxUniqueSchemas = defaultMaxUniqueSchemas;\n if (options) {\n const mus: number = options.maxUniqueSchemas;\n if (mus !== undefined) {\n if (typeof mus !== 'number' || !(mus > 0)) {\n throw new Error('options.maxUniqueSchemas, if defined, must be > 0');\n }\n maxUniqueSchemas = mus;\n }\n\n const msglim: number = options.messagesLimit;\n if (msglim !== undefined) {\n if (typeof msglim !== 'number' || !(msglim > 0)) {\n throw new Error('options.messagesLimit, if defined, must be > 0');\n }\n this._messagesLimit = msglim;\n }\n\n const metlim: number = options.metricsLimit;\n if (metlim !== undefined) {\n if (typeof metlim !== 'number' || !(metlim > 0)) {\n throw new Error('options.metricsLimit, if defined, must be > 0');\n }\n this._metricsLimit = metlim;\n }\n\n if (\n utility.requireArgumentIfDefined(\n options.formDataKeyName,\n 'options.formDataKeyName',\n 'string'\n )\n ) {\n this._formDataKey = options.formDataKeyName;\n }\n\n if (\n utility.requireArgumentIfDefined(\n options.uploadFailedListener,\n 'options.uploadFailedListener',\n 'function'\n )\n ) {\n this._uploadFailedListener = options.uploadFailedListener;\n }\n\n if (utility.requireArgumentIfDefined(options.apiKey, 'options.apiKey', 'string')) {\n this._apiKey = options.apiKey;\n }\n }\n this._messageBuffers = new LazyMapToList<Schema, LogMessage>(maxUniqueSchemas);\n\n this._emptySize = this.getByteSize(1);\n this._restartTimer();\n }\n\n get uploadInterval(): number {\n return this._uploadInterval;\n }\n set uploadInterval(uploadInterval: number) {\n if (uploadInterval === undefined) {\n uploadInterval = defaultMaxDelayBeforeUpload;\n }\n if (typeof uploadInterval !== 'number' || !(uploadInterval > 0)) {\n throw new Error('uploadInterval, if defined, must be > 0');\n }\n if (uploadInterval !== this._uploadInterval) {\n this._uploadInterval = uploadInterval;\n // Now that the interval has changed, restart the timer\n this._restartTimer();\n }\n }\n\n get uploadEndpoint(): string {\n return this._uploadEndpoint;\n }\n set uploadEndpoint(uploadEndpoint: string) {\n utility.requireArgumentIfDefined(uploadEndpoint, 'uploadEndpoint', 'string');\n this._uploadEndpoint = uploadEndpoint;\n }\n\n get uploadOptionsCallback(): UploadOptionsCallback {\n return this._uploadOptionsCallback;\n }\n set uploadOptionsCallback(uploadOptionsCallback: UploadOptionsCallback) {\n utility.requireArgumentIfDefined(\n uploadOptionsCallback,\n 'uploadOptionsCallback',\n 'function'\n );\n\n this._uploadOptionsCallback = uploadOptionsCallback;\n }\n\n get uploadMode(): UploadMode {\n return this._uploadMode;\n }\n set uploadMode(uploadMode: UploadMode) {\n utility.requireArgumentIfDefined(uploadMode, 'uploadMode', 'number');\n if (uploadMode === undefined) {\n uploadMode = defaultUploadMode;\n }\n if (!(uploadMode in UploadMode)) {\n throw new Error(`Unsupported upload mode: ${uploadMode}`);\n }\n this._uploadMode = uploadMode;\n }\n\n // Note: If making changes to this method, please locally test using SizeEstimation.test.js\n getByteSize(accuracy?: number): number {\n // This method provides an estimate.\n // Accuracy is specified as 1 = most accurate\n return accuracy >= 1\n ? this._buildProtoEncodedCoreEnvelope(false).byteLength\n : accuracy >= 0.5\n ? this._emptySize + this._messageSize + this.metricsCount * 8\n : this._emptySize + this._messageSize;\n }\n\n private _stopTimer(): void {\n if (this._intervalHandle !== undefined) {\n clearInterval(this._intervalHandle);\n this._intervalHandle = undefined;\n }\n }\n\n private _restartTimer(): void {\n this._stopTimer();\n this._intervalHandle = setInterval(() => {\n if (this.hasData) {\n this._upload();\n }\n }, this._uploadInterval);\n }\n\n // This method is implementing the LogCollector interface, but needs to return (not swallow)\n // the async result in order for direct call to it from test to handle failure cases properly.\n async collect(schema: Schema, data: SchematizedData, logMeta: LogMeta): Promise<UploadResult> {\n if (schemaUtil.isInternal(schema) && data.userPayload) {\n data.userPayload = protobufUtil.encodePayload(data.userPayload);\n }\n const msg: LogMessage = protobufUtil.getLogMessage(schema, data, logMeta);\n\n if (!this._messageBuffers.push(schema, msg)) {\n throw new Error(`Buffer is full. Refusing schemaId ${schemaUtil.getSchemaId(schema)}`);\n }\n // Get an estimate\n this._messageSize += utility.estimateObjectSize(msg);\n if (this._shouldUpload()) {\n return this._upload();\n }\n return undefined;\n }\n\n private _shouldUpload(): boolean {\n return (\n (this._immediateUpload && this.hasData) ||\n this.messagesCount >= this._messagesLimit ||\n this.metricsCount >= this._metricsLimit\n );\n }\n\n private async _upload(userInitiated?: boolean): Promise<UploadResult> {\n this._restartTimer();\n if (!this._uploadEndpoint || this._uploadMode === UploadMode.noUpload) {\n return undefined;\n }\n\n const contents: CoreEnvelopeContents = this._getContentsOfCoreEnvelope(true);\n return this._uploadContents(contents, userInitiated);\n }\n\n private async _uploadContents(\n contents: CoreEnvelopeContents,\n userInitiated: boolean\n ): Promise<UploadResult> {\n let requestInit: RequestInit = this._getRequestInit(contents);\n const ur: UploadResult = {\n envelopeContents: contents\n };\n try {\n if (this._apiKey) {\n (requestInit.headers as Record<string, string>)['x-o11y-api-key'] = this._apiKey;\n }\n if (this._uploadOptionsCallback) {\n const options: RequestInit = this._uploadOptionsCallback() || {};\n if (options) {\n if (options.headers && requestInit.headers) {\n // According to lib.dom.d.ts:\n // type HeadersInit = [string, string][] | Record<string, string> | Headers;\n if (options.headers instanceof Headers) {\n for (const key in requestInit.headers) {\n if (\n Object.prototype.hasOwnProperty.call(requestInit.headers, key)\n ) {\n options.headers.set(\n key,\n (requestInit.headers as Record<string, string>)[key]\n );\n }\n }\n } else if (Array.isArray(options.headers)) {\n // This doesn't seem valid according to https://developer.mozilla.org/en-US/docs/Web/API/fetch\n throw new Error('Headers as array is not supported.');\n } else {\n Object.assign(options.headers, requestInit.headers);\n }\n }\n options.method = requestInit.method;\n options.body = requestInit.body;\n requestInit = options;\n }\n }\n\n ur.response = await fetch(this._uploadEndpoint, requestInit);\n // fetch only throws on network errors, not HTTP errors, so handle that here\n if (!ur.response.ok) {\n throw new Error('HTTP Not OK');\n }\n return ur;\n } catch (err) {\n ur.error = err;\n if (!userInitiated && this._uploadFailedListener) {\n try {\n this._uploadFailedListener(ur);\n } catch {}\n }\n throw ur;\n }\n }\n\n private _getRequestInit(contents: CoreEnvelopeContents): RequestInit {\n const coreEnvelope: CoreEnvelope = envelopeContents(contents);\n const coreEnvelopeEncoded: Uint8Array = encodeCoreEnvelope(coreEnvelope);\n\n let requestInit: RequestInit;\n switch (this._uploadMode) {\n case UploadMode.fetchBinary:\n requestInit = {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/octet-stream'\n },\n body: coreEnvelopeEncoded\n };\n break;\n case undefined:\n case UploadMode.fetchFile:\n if (typeof FormData !== 'function') {\n throw new Error('FormData is not a function in the global namespace.');\n }\n const formData = new FormData();\n formData.append(\n this._formDataKey || defaultFormDataKey,\n new Blob([coreEnvelopeEncoded])\n );\n // Per [this article](https://muffinman.io/uploading-files-using-fetch-multipart-form-data/)\n // make sure not to set the Content-Type header.\n // The browser will set it for you, including the boundary parameter.\n requestInit = {\n method: 'POST',\n body: formData\n };\n break;\n case UploadMode.noUpload:\n default:\n throw new Error('Invalid uploadMode');\n }\n return requestInit;\n }\n\n private _checkUploadState(): void {\n if (this._uploadEndpoint === undefined) {\n throw new Error('Upload endpoint is unset');\n }\n if (this._uploadMode === UploadMode.noUpload) {\n throw new Error('Upload mode is unset');\n }\n }\n\n // User initiated method\n public async upload(contents?: CoreEnvelopeContents): Promise<UploadResult> {\n this._checkUploadState();\n if (utility.requireArgumentIfDefined(contents, 'contents', 'object')) {\n return this._uploadContents(contents, true);\n }\n\n return this.hasData ? this._upload(true) : undefined;\n }\n\n get hasData(): boolean {\n return this.messagesCount > 0 || this.metricsCount > 0;\n }\n\n get messagesCount(): number {\n return this._messageBuffers.totalItemCount;\n }\n\n get metricsCount(): number {\n let count = 0;\n\n if (this._metricsExtractors) {\n count += this._metricsExtractors.getAllUpCounters().length || 0;\n count += this._metricsExtractors.getAllValueRecorders().length || 0;\n count += this._metricsExtractors.getAllBucketHistograms().length || 0;\n }\n\n return count;\n }\n\n getProtoEncodedCoreEnvelope(): Uint8Array {\n return this._buildProtoEncodedCoreEnvelope(true);\n }\n\n getContentsOfCoreEnvelope(): CoreEnvelopeContents {\n return this._getContentsOfCoreEnvelope(true);\n }\n\n private _getContentsOfCoreEnvelope(extract: boolean): CoreEnvelopeContents {\n // 1. extract=true is for most use cases.\n // 2. extract=false is for peeking into the contents without affecting them\n // (i.e. messages are kept in the buffers and metrics are not reset.)\n // Message arrays are references to the originals and should be handled carefully.\n\n const contents: CoreEnvelopeContents = {\n staticAttributes: this._staticAttributes,\n messages: this._messageBuffers.getAllMessages(extract)\n };\n\n if (this._metricsExtractors) {\n contents.upCounters = CoreEnvelopeBuilder.getUpCounters(\n this._metricsExtractors.getAllUpCounters(),\n extract\n );\n contents.valueRecorders = CoreEnvelopeBuilder.getValueRecorders(\n this._metricsExtractors.getAllValueRecorders(),\n extract\n );\n contents.bucketHistograms = CoreEnvelopeBuilder.getBucketHistograms(\n this._metricsExtractors.getAllBucketHistograms(),\n extract\n );\n }\n\n if (extract) {\n this._messageSize = 0;\n }\n return contents;\n }\n\n private _buildProtoEncodedCoreEnvelope(extract: boolean): Uint8Array {\n const contents: CoreEnvelopeContents = this._getContentsOfCoreEnvelope(extract);\n const coreEnvelope: CoreEnvelope = envelopeContents(contents);\n return encodeCoreEnvelope(coreEnvelope);\n }\n\n receiveMetricsExtractors(metricsExtractors: MetricsExtractorMethods): void {\n this._metricsExtractors = metricsExtractors;\n }\n}\n","import {\n BucketMetric,\n LogCollector,\n LogMeta,\n Metric,\n MetricsCollector,\n MetricsExtractorMethods,\n Schema\n} from '../../interfaces';\nimport { SchematizedData, MetricsTags, schemaUtil } from 'o11y/shared';\nimport { protobufUtil } from '../protobuf-util';\nimport {\n BucketHistogram,\n EncodedSchematizedPayload,\n LogMessage,\n Metrics,\n MetricTag,\n UpCounter,\n ValueRecorder\n} from 'o11y/core_envelope';\n\nconst metricsCollectionMilliseconds = 30000;\n\n// The observability plugin expects encoded payloads, so can't use LogMeta as-is.\ninterface LogMetaObservability {\n timestamp: number;\n rootId: string;\n sequence: number;\n schemaSequence: number;\n loggerName: string;\n pagePayload: EncodedSchematizedPayload;\n loggerAppName: string;\n connectionType: string;\n appPayload: EncodedSchematizedPayload;\n clientSessionId: string;\n age: number;\n receiverClientSessionId?: string;\n receiverRootId?: string;\n}\n\n// The following interface is expected to be fulfilled by the\n// observability plugin in Lightning SDK.\ndeclare type NimbusObservabilityPlugin = {\n // Called to send a collected message to native for handling\n log: (schema: string, encodedMessage: Uint8Array, logMeta: LogMetaObservability) => void;\n\n // Called to send metrics to native for handling\n logMetrics: (metrics: Metrics) => void;\n\n // Called to inform native that the web view has detected an idle state.\n idleDetected: (timestamp: number) => void;\n};\n\n// The `HybridCollector` uses nimbus to send log data immediately across\n// to be handled by the native observability library.\nexport class HybridCollector implements LogCollector, MetricsCollector {\n private readonly _observability: NimbusObservabilityPlugin;\n private _metricsExtractors: MetricsExtractorMethods;\n\n constructor() {\n if (typeof __nimbus === 'undefined') {\n throw new Error('Nimbus is unavailable');\n }\n if (!__nimbus.plugins || !__nimbus.plugins.observability) {\n throw new Error('Observability plugin not found in Nimbus plugins');\n }\n this._observability = __nimbus.plugins.observability as NimbusObservabilityPlugin;\n setInterval(() => {\n this._collectMetrics();\n }, metricsCollectionMilliseconds);\n }\n\n collect(schema: Schema, data: SchematizedData, logMeta: LogMeta): void {\n if (schemaUtil.isInternal(schema) && data.userPayload) {\n data.userPayload = protobufUtil.encodePayload(data.userPayload);\n }\n const logMessage: LogMessage = protobufUtil.getLogMessage(schema, data, logMeta);\n const logMetaObs: LogMetaObservability = {\n timestamp: logMeta.timestamp,\n rootId: logMeta.rootId,\n sequence: logMeta.sequence,\n schemaSequence: logMeta.schemaSequence,\n loggerName: logMeta.loggerName,\n pagePayload: logMessage.pagePayload,\n loggerAppName: logMeta.loggerAppName,\n connectionType: logMeta.connectionType,\n appPayload: logMessage.appPayload,\n clientSessionId: logMeta.clientSessionId,\n age: logMeta.age,\n receiverClientSessionId: logMeta.receiverClientSessionId,\n receiverRootId: logMeta.receiverRootId\n };\n this._observability.log(schemaUtil.getSchemaId(schema), logMessage.data, logMetaObs);\n }\n\n receiveMetricsExtractors(metricsExtractors: MetricsExtractorMethods): void {\n this._metricsExtractors = metricsExtractors;\n }\n\n // An app should call this method when it detects idle in the web view in order\n // to inform the native app of the idle state.\n notifyIdleDetected(timestamp: number): void {\n this._observability.idleDetected(timestamp);\n }\n\n private _collectMetrics(): void {\n if (this._metricsExtractors) {\n const upCounters: Metric<number>[] = this._metricsExtractors.getAllUpCounters();\n const valueRecorders: Metric<number[]>[] =\n this._metricsExtractors.getAllValueRecorders();\n const bucketHistograms: BucketMetric<number[]>[] =\n this._metricsExtractors.getAllBucketHistograms();\n const recorders: ValueRecorder[] = [];\n const counters: UpCounter[] = [];\n const histograms: BucketHistogram[] = [];\n\n for (const valueRecorder of valueRecorders) {\n const vr: ValueRecorder = {\n name: valueRecorder.getName(),\n createdTimestamp: valueRecorder.getCreatedOn(),\n lastUpdatedTimestamp: valueRecorder.getLastUpdatedOn(),\n values: valueRecorder.getData(),\n ownerName: valueRecorder.getOwnerName(),\n ownerAppName: valueRecorder.getOwnerAppName(),\n tags: this._getMetricTags(valueRecorder)\n };\n recorders.push(vr);\n valueRecorder.reset();\n }\n\n for (const upCounter of upCounters) {\n const uc: UpCounter = {\n name: upCounter.getName(),\n createdTimestamp: upCounter.getCreatedOn(),\n lastUpdatedTimestamp: upCounter.getLastUpdatedOn(),\n value: upCounter.getData(),\n ownerName: upCounter.getOwnerName(),\n ownerAppName: upCounter.getOwnerAppName(),\n tags: this._getMetricTags(upCounter)\n };\n counters.push(uc);\n upCounter.reset();\n }\n\n for (const bucketHistogram of bucketHistograms) {\n const bh: BucketHistogram = {\n name: bucketHistogram.getName(),\n createdTimestamp: bucketHistogram.getCreatedOn(),\n lastUpdatedTimestamp: bucketHistogram.getLastUpdatedOn(),\n values: bucketHistogram.getData(),\n buckets: bucketHistogram.getBuckets(),\n ownerName: bucketHistogram.getOwnerName(),\n ownerAppName: bucketHistogram.getOwnerAppName(),\n tags: this._getMetricTags(bucketHistogram)\n };\n histograms.push(bh);\n bucketHistogram.reset();\n }\n\n if (recorders.length > 0 || counters.length > 0) {\n const metrics: Metrics = {\n upCounters: counters,\n valueRecorders: recorders,\n bucketHistograms: histograms\n };\n this._observability.logMetrics(metrics);\n }\n }\n }\n\n private _getMetricTags<T>(metric: Metric<T>): MetricTag[] {\n const metricsTags: MetricsTags = metric.getTags();\n\n if (metricsTags) {\n return Object.entries(metricsTags).map((entry) => {\n const mt: MetricTag = {\n name: entry[0],\n value: entry[1].toString()\n };\n return mt;\n });\n }\n return [];\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAMA,MAAA,YAAA,CAAA;AAAA,IAAA,WAAA,GAAA;AACqB,QAAA,IAAA,CAAA,UAAA,GAAA,IAAA,GAAA,EAAA,CAAA;;AAEV,IAAA,aAAA,CAAA,MAAA,EAAA;AACH,QAAA,OAAA,CAAA,eAAA,CAAA,MAAA,EAAA,QAAA,CAAA,CAAA;;;;mCAM2B,YAAI,CAAA,IAAA,CAAA,QAAA,CAAA,MAAA,CAAA,UAAA,CAAA,CAAA;AAE3B,YAAA,IAAA,GAAA,cAAA,CAAA,UAAA,CAAA,UAAA,CAAA,CAAA;;AAEH,SAAA;AAED,QAAA,OAAA,IAAA,CAAA;;;AAIA,QAAA,OAAA,CAAA,eAAA,CAAA,MAAA,EAAA,QAAA,CAAA,CAAA;AACA,QAAA,OAAA,CAAA,eAAA,CAAA,IAAA,EAAA,MAAA,CAAA,CAAA;;;AAIA,QAAA,IAAA,SAAA,EAAA;;AAEC,SAAA;AACD,QAAA,OAAA,IAAA,CAAA;;;;;;AAQA,QAAA,OAAA,OAAA,CAAA;;AAGG,IAAA,aAAA,CAAA,UAAA,EAAA;AACH,QAAA,IAAA,CAAA,UAAA,KAAA,IAAA,IAAA,UAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,UAAA,CAAA,MAAA,KAAA,UAAA,CAAA,OAAA,EAAA;;;AAGQ,gBAAA,OAAA,EAAA,IAAA,CAAA,MAAA,CAAA,UAAA,CAAA,MAAA,EAAA,UAAA,CAAA,OAAA,CAAA;;AAEP,SAAA;AACD,QAAA,OAAA,SAAA,CAAA;;AAIG,IAAA,aAAA,CAAA,MAAA,EAAA,IAAA,EAAA,OAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;AAuBF,SAAA;AAED,QAAA,OAAA,MAAA,CAAA,MAAA,CAA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cAAc,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AAC3C,aAAA;AACJ,SAAA;KACJ;AAEO,IAAA,cAAc,CAAI,MAAiB,EAAA;AACvC,QAAA,MAAM,WAAW,GAAgB,MAAM,CAAC,OAAO,EAAE,CAAC;AAElD,QAAA,IAAI,WAAW,EAAE;AACb,YAAA,OAAO,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,KAAI;AAC7C,gBAAA,MAAM,EAAE,GAAc;AAClB,oBAAA,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;AACd,oBAAA,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;iBAC7B,CAAC;AACF,gBAAA,OAAO,EAAE,CAAC;AACd,aAAC,CAAC,CAAC;AACN,SAAA;AACD,QAAA,OAAO,EAAE,CAAC;KACb;AACJ;;;;"}
|
|
@@ -21,6 +21,7 @@ export declare class CoreCollector implements LogCollector, MetricsCollector {
|
|
|
21
21
|
private readonly _emptySize;
|
|
22
22
|
private _messageSize;
|
|
23
23
|
private _uploadOptionsCallback;
|
|
24
|
+
private readonly _apiKey;
|
|
24
25
|
constructor(uploadEndpoint?: string, uploadMode?: UploadMode, environment?: Environment, options?: CoreCollectorOptions);
|
|
25
26
|
get uploadInterval(): number;
|
|
26
27
|
set uploadInterval(uploadInterval: number);
|
|
@@ -21,6 +21,7 @@ export declare class CoreCollector implements LogCollector, MetricsCollector {
|
|
|
21
21
|
private readonly _emptySize;
|
|
22
22
|
private _messageSize;
|
|
23
23
|
private _uploadOptionsCallback;
|
|
24
|
+
private readonly _apiKey;
|
|
24
25
|
constructor(uploadEndpoint?: string, uploadMode?: UploadMode, environment?: Environment, options?: CoreCollectorOptions);
|
|
25
26
|
get uploadInterval(): number;
|
|
26
27
|
set uploadInterval(uploadInterval: number);
|
|
@@ -21,6 +21,7 @@ export declare class CoreCollector implements LogCollector, MetricsCollector {
|
|
|
21
21
|
private readonly _emptySize;
|
|
22
22
|
private _messageSize;
|
|
23
23
|
private _uploadOptionsCallback;
|
|
24
|
+
private readonly _apiKey;
|
|
24
25
|
constructor(uploadEndpoint?: string, uploadMode?: UploadMode, environment?: Environment, options?: CoreCollectorOptions);
|
|
25
26
|
get uploadInterval(): number;
|
|
26
27
|
set uploadInterval(uploadInterval: number);
|
|
@@ -21,6 +21,7 @@ export declare class CoreCollector implements LogCollector, MetricsCollector {
|
|
|
21
21
|
private readonly _emptySize;
|
|
22
22
|
private _messageSize;
|
|
23
23
|
private _uploadOptionsCallback;
|
|
24
|
+
private readonly _apiKey;
|
|
24
25
|
constructor(uploadEndpoint?: string, uploadMode?: UploadMode, environment?: Environment, options?: CoreCollectorOptions);
|
|
25
26
|
get uploadInterval(): number;
|
|
26
27
|
set uploadInterval(uploadInterval: number);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "o11y",
|
|
3
|
-
"version": "264.
|
|
3
|
+
"version": "264.19.0",
|
|
4
4
|
"description": "O11y Client-Side Instrumentation & Observability Library",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"exports": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"license": "BSD-3-Clause",
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"o11y_schema": "260.5.0",
|
|
41
|
-
"protobufjs": "7.5.
|
|
41
|
+
"protobufjs": "7.5.6",
|
|
42
42
|
"web-vitals": "^5.1.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|