UNPKG

protobufjs

Version:

Protocol Buffers for JavaScript & TypeScript.

7 lines 100 kB
/*! * protobuf.js v8.7.0 (c) 2016, daniel wirtz * compiled mon, 06 jul 2026 13:50:01 utc * licensed under the bsd-3-clause license * see: https://github.com/dcodeio/protobuf.js for details */ !function(nt){"use strict";var n,e,i;n={1:[function(t,i,r){},{}],2:[function(t,i,r){i.exports=e;var n=/\/|\./;function e(t,i){n.test(t)||(t="google/protobuf/"+t+".proto",i={nested:{google:{nested:{protobuf:{nested:i}}}}}),e[t]=i}e("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}}),e("duration",{Duration:i={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),e("timestamp",{Timestamp:i}),e("empty",{Empty:{fields:{}}}),e("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),e("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}}),e("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),e.get=function(t){return e[t]||null}},{}],3:[function(t,i,r){var v=t(6),p=t(27),b=t(28);function u(t,i,r,n,e){if(i.resolvedType)if(i.resolvedType instanceof v){var s=e?"m"+e+"[m"+e+".length]":"m"+n;t("switch(d%s){",n);for(var o=i.resolvedType.values,u=Object.keys(o),h=0;h<u.length;++h)t("case%j:",u[h])("case %i:",o[u[h]])("%s=%j",s,o[u[h]])("break");t("default:"),"CLOSED"!==i.resolvedType.i.enum_type&&t('if(typeof d%s==="number"&&(d%s|0)===d%s)',n,n,n)("%s=d%s",s,n),t("}")}else t("if(!util.isObject(d%s))",n)("throw TypeError(%j)",i.fullName+": object expected")("m%s=types[%i].fromObject(d%s,q+1)",n,r,n);else{var f=!1;switch(i.type){case"double":case"float":t("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":t("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":t("m%s=d%s|0",n,n);break;case"uint64":case"fixed64":f=!0;case"int64":case"sint64":case"sfixed64":t("if(util.Long)")("m%s=util.Long.fromValue(d%s,%j)",n,n,f)('else if(typeof d%s==="string")',n)("m%s=parseInt(d%s,10)",n,n)('else if(typeof d%s==="number")',n)("m%s=d%s",n,n)('else if(typeof d%s==="object")',n)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",n,n,n,f?"true":"");break;case"bytes":t('if(typeof d%s==="string")',n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",n,n,n)("else if(d%s.length>=0)",n)("m%s=d%s",n,n);break;case"string":t("m%s=String(d%s)",n,n);break;case"bool":t("m%s=Boolean(d%s)",n,n)}}return t}function w(t,i,r,n,e){if(e=e||n,i.resolvedType)i.resolvedType instanceof v?t("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",n,r,e,e,r,e,e):t("d%s=types[%i].toObject(m%s,o,q+1)",n,r,e);else{var s=!1;switch(i.type){case"double":case"float":t("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",n,e,e,e);break;case"uint64":case"fixed64":s=!0;case"int64":case"sint64":case"sfixed64":t('if(typeof BigInt!=="undefined"&&o.longs===BigInt)')('d%s=typeof m%s==="number"?BigInt(m%s):util.Long.fromBits(m%s.low>>>0,m%s.high>>>0,%j).toBigInt()',n,e,e,e,e,s)('else if(typeof m%s==="number")',e)("d%s=o.longs===String?String(m%s):m%s",n,e,e)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",n,e,e,e,s?"true":"",e);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",n,e,e,e,e);break;default:t("d%s=m%s",n,e)}}return t}r.fromObject=function(t){var i=t.fieldsArray,r=b.codegen(["d","q"])("if(d instanceof C)")("return d")("if(!util.isObject(d))")("throw TypeError(%j)",t.fullName+": object expected")("if(q===undefined)q=0")("if(q>util.recursionLimit)")('throw Error("max depth exceeded")');if(!i.length)return r("return new C");r("var m=new C");for(var n=0;n<i.length;++n){var e=i[n].resolve(),s=b.safeProp(e.name),o=!e.hasPresence&&!e.repeated&&!e.map&&(e.resolvedType instanceof v||p.basic[e.type]!==nt);e.map?(r("if(d%s){",s)("if(!util.isObject(d%s))",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),r('if(ks[i]==="__proto__")')("util.makeProp(m%s,ks[i])",s),u(r,e,n,s+"[ks[i]]")("}")("}")):e.repeated?(r("if(d%s){",s)("if(!Array.isArray(d%s))",s)("throw TypeError(%j)",e.fullName+": array expected"),e.resolvedType instanceof v?r("m%s=[]",s):r("m%s=Array(d%s.length)",s,s),r("for(var i=0;i<d%s.length;++i){",s),u(r,e,n,s+"[i]",e.resolvedType instanceof v?s:nt)("}")("}")):(e.resolvedType instanceof v||r("if(d%s!=null){",s),o&&(e.resolvedType instanceof v?r('if(d%s!==%j&&(typeof d%s!=="string"||types[%i].values[d%s]!==%j)){',s,e.typeDefault,s,n,s,e.typeDefault):"string"===e.type?r('if(typeof d%s!=="string"||d%s.length){',s,s):"bytes"===e.type?r("if(d%s.length){",s):"bool"===e.type?r("if(d%s){",s):"double"===e.type||"float"===e.type?r("if(!Object.is(Number(d%s),0)){",s):p.long[e.type]!==nt?r('if(typeof d%s==="object"?d%s.low||d%s.high:Number(d%s)!==0){',s,s,s,s):r("if(Number(d%s)!==0){",s)),u(r,e,n,s),o&&r("}"),e.resolvedType instanceof v||r("}"))}return r("return m")},r.toObject=function(t){var i=t.fieldsArray.slice().sort(b.compareFieldsById);if(!i.length)return b.codegen()("return {}");for(var r=b.codegen(["m","o","q"])("if(!o)")("o={}")("if(q===undefined)q=0")("if(q>util.recursionLimit)")('throw Error("max depth exceeded")')("var d={}"),n=[],e=[],s=[],o=0;o<i.length;++o)i[o].partOf||(i[o].resolve().repeated?n:i[o].map?e:s).push(i[o]);if(n.length){for(r("if(o.arrays||o.defaults){"),o=0;o<n.length;++o)r("d%s=[]",b.safeProp(n[o].name));r("}")}if(e.length){for(r("if(o.objects||o.defaults){"),o=0;o<e.length;++o)r("d%s={}",b.safeProp(e[o].name));r("}")}if(s.length){for(r("if(o.defaults){"),o=0;o<s.length;++o){var u,h=s[o],f=b.safeProp(h.name);h.resolvedType instanceof v?r("d%s=o.enums===String?%j:%j",f,h.resolvedType.valuesById[h.typeDefault],h.typeDefault):h.long?r("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():typeof BigInt!=="undefined"&&o.longs===BigInt?n.toBigInt():n',f)("}else")('d%s=o.longs===String?%j:typeof BigInt!=="undefined"&&o.longs===BigInt?BigInt(%j):%i',f,h.typeDefault.toString(),h.typeDefault.toString(),h.typeDefault.toNumber()):h.bytes?(u=Array.prototype.slice.call(h.typeDefault),r("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)("}")):r("d%s=%j",f,h.typeDefault)}r("}")}for(var a=!1,o=0;o<i.length;++o){var c,l,h=i[o],d=t.e.indexOf(h),f=b.safeProp(h.name);h.map?(a||(a=!0,r("var ks2")),r("if(m%s&&(ks2=Object.keys(m%s)).length){",f,f)("d%s={}",f),c=p.long[h.keyType]!==nt,l=f+"[ks2[j]]",r("for(var j=0;j<ks2.length;++j){"),c&&r("var k2=util.longFromKey(ks2[j],%j).toString()","uint64"===h.keyType||"fixed64"===h.keyType),r('if(ks2[j]==="__proto__")')("util.makeProp(d%s,ks2[j])",f),w(r,h,d,c?f+"[k2]":l,l)("}")):h.repeated?(r("if(m%s&&m%s.length){",f,f)("d%s=Array(m%s.length)",f,f)("for(var j=0;j<m%s.length;++j){",f),w(r,h,d,f+"[j]")("}")):(r("if(m%s!=null&&Object.hasOwnProperty.call(m,%j)){",f,h.name),w(r,h,d,f),h.partOf&&!h.partOf.isProto3Optional&&r("if(o.oneofs)")("d%s=%j",b.safeProp(h.partOf.name),h.name)),r("}")}return r("return d")}},{27:27,28:28,6:6}],4:[function(t,i,r){i.exports=function(t){for(var i=!1,r=!1,n=0;n<t.fieldsArray.length;++n){var e=t.e[n];e.map&&(i=!0),(e.resolvedType instanceof l||!e.repeated&&!e.map&&!e.hasPresence)&&(r=!0)}var s=v.codegen(["r","l","z","q","g"])("if(!(r instanceof Reader))")("r=Reader.create(r)")("if(q===undefined)q=0")("if(q>Reader.recursionLimit)")('throw Error("max depth exceeded")')("var c=l===undefined?r.len:r.pos+l,m=g||new C"+(i?",k,v":r?",v":""))("while(r.pos<c){")("var s=r.pos")("var t=r.tag()")("if(t===z){")("z=undefined")("break")("}");t.fieldsArray.length&&s("var u=t&7")("switch(t>>>=3){");for(n=0;n<t.fieldsArray.length;++n){var o,u=t.e[n].resolve(),h=u.resolvedType instanceof l?"int32":u.type,f="m"+v.safeProp(u.name),a=u.resolvedType instanceof l&&"CLOSED"===u.resolvedType.i.enum_type;u.map?(s("case %i:{",u.id)("if(u!==2)")("break"),a||s("if(%s===util.emptyObject)",f)("%s={}",f),s("var c2=r.uint32()+r.pos"),d.defaults[u.keyType]!==nt?s("k=%j",d.defaults[u.keyType]):s("k=null"),d.long[h]!==nt?s("v=util.Long?util.Long.fromNumber(0,%j):0","uint64"===h||"fixed64"===h):d.defaults[h]!==nt?s("v=%j",d.defaults[h]):s("v=null"),s("while(r.pos<c2){")("var t2=r.tag()")("u=t2&7")("switch(t2>>>=3){")("case 1:")("if(u!==%i)",d.mapKey[u.keyType])("break")("k=r.%s()","string"===u.keyType?p(u):u.keyType)("continue")("case 2:")("if(u!==%i)",d.basic[h]===nt?2:d.basic[h])("break"),d.basic[h]===nt?s("v=types[%i].decode(r,r.uint32(),undefined,q+1)",n):s("v=r.%s()","string"===h?p(u):h),s("continue")("}")("r.skipType(u,q,t2)")("}"),a&&(s("if(types[%i].valuesById[v]===undefined){",n),b(s,"r.raw(s,r.pos)")("continue")("}")("if(%s===util.emptyObject)",f)("%s={}",f)),o=d.basic[h]===nt?"v||new types["+n+"].ctor":"v",d.long[u.keyType]!==nt?s('%s[typeof k==="object"?util.longToHash(k):k]=%s',f,o):("string"===u.keyType&&s('if(k==="__proto__")')("util.makeProp(%s,k)",f),s("%s[k]=%s",f,o))):u.repeated?(s("case %i:",u.id)("{"),d.packed[h]!==nt&&(s("if(u===2){"),a?(s("var c2=r.uint32()+r.pos")("while(r.pos<c2){")("s=r.pos")("v=r.%s()",h)("if(types[%i].valuesById[v]!==undefined){",n)("if(!(%s&&%s.length))",f,f)("%s=[]",f)("%s.push(v)",f)("}else"),b(s,"util.rawField("+u.id+",0,r.raw(s,r.pos))")("}")):s("if(!(%s&&%s.length))",f,f)("%s=[]",f)("r.%ss(%s)",h,f),s("continue")("}")),s("if(u!==%i)",d.basic[h]===nt?u.delimited?3:2:d.basic[h])("break"),a||s("if(!(%s&&%s.length))",f,f)("%s=[]",f),d.basic[h]===nt?u.delimited?s("%s.push(types[%i].decode(r,undefined,%i,q+1))",f,n,8*u.id+4):s("%s.push(types[%i].decode(r,r.uint32(),undefined,q+1))",f,n):a?(s("v=r.%s()",h)("if(types[%i].valuesById[v]!==undefined){",n)("if(!(%s&&%s.length))",f,f)("%s=[]",f)("%s.push(v)",f)("}else"),b(s,"r.raw(s,r.pos)")):s("%s.push(r.%s())",f,"string"===h?p(u):h)):d.basic[h]===nt?(s("case %i:{",u.id)("if(u!==%i)",u.delimited?3:2)("break"),u.delimited?s("%s=types[%i].decode(r,undefined,%i,q+1,%s)",f,n,8*u.id+4,f):s("%s=types[%i].decode(r,r.uint32(),undefined,q+1,%s)",f,n,f)):u.hasPresence?(s("case %i:{",u.id)("if(u!==%i)",d.basic[h])("break"),a?(s("v=r.%s()",h)("if(types[%i].valuesById[v]!==undefined){",n)("%s=v",f),u.partOf&&s("m%s=%j",v.safeProp(u.partOf.name),u.name),s("}else"),b(s,"r.raw(s,r.pos)")):s("%s=r.%s()",f,"string"===h?p(u):h)):(s("case %i:{",u.id)("if(u!==%i)",d.basic[h])("break"),a?(s("v=r.%s()",h)("if(types[%i].valuesById[v]!==undefined){",n)("if(v!==%j)",u.typeDefault)("%s=v",f)("else")("delete %s",f)("}else{"),b(s,"r.raw(s,r.pos)")("}")):(u.resolvedType instanceof l&&0!==u.typeDefault?s("if((v=r.%s())!==%j)",h,u.typeDefault):"string"===h?s("if((v=r.%s()).length)",p(u)):"bytes"===h?s("if((v=r.%s()).length)",h):d.long[h]!==nt?s('if(typeof(v=r.%s())==="object"?v.low||v.high:v!==0)',h):s("double"===h||"float"===h?"if(!Object.is(v=r.%s(),0))":"if(v=r.%s())",h),s("%s=v",f)("else")("delete %s",f))),u.partOf&&!a&&s("m%s=%j",v.safeProp(u.partOf.name),u.name),s("continue")("}")}n&&s("}");for(s("r.skipType(%s,q,t)",n?"u":"t&7"),b(s,"r.raw(s,r.pos)")("}")("if(z!==undefined)")('throw Error("missing end group")'),n=0;n<t.e.length;++n){var c=t.e[n];c.required&&s("if(!Object.hasOwnProperty.call(m,%j))",c.name)("throw util.ProtocolError(%j,{instance:m})","missing required '"+c.name+"'")}return s("return m")};var l=t(6),d=t(27),v=t(28);function p(t){return"VERIFY"===t.i.utf8_validation?"stringVerify":"string"}function b(t,i){return t("if(!r.discardUnknown){")('util.makeProp(m,"$unknowns",false);')("(m.$unknowns||(m.$unknowns=[])).push(%s)",i)("}")}},{27:27,28:28,6:6}],5:[function(t,i,r){i.exports=function(t){for(var i,r=c.codegen(["m","w","q"])("if(!w)")("w=Writer.create()")("if(q===undefined)q=0")("if(q>util.recursionLimit)")('throw Error("max depth exceeded")'),n=t.fieldsArray.slice().sort(c.compareFieldsById),e=0;e<n.length;++e){var s=n[e].resolve(),o=t.e.indexOf(s),u=s.resolvedType instanceof f?"int32":s.type,h=a.basic[u];i="m"+c.safeProp(s.name),s.map?(r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",i,s.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",i),"bool"===s.keyType?r("w.uint32(%i).fork().uint32(%i).bool(util.boolFromKey(ks[i]))",(s.id<<3|2)>>>0,8|a.mapKey[s.keyType]):a.long[s.keyType]!==nt?r("w.uint32(%i).fork().uint32(%i).%s(util.longFromKey(ks[i],%j))",(s.id<<3|2)>>>0,8|a.mapKey[s.keyType],s.keyType,"uint64"===s.keyType||"fixed64"===s.keyType):r("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(s.id<<3|2)>>>0,8|a.mapKey[s.keyType],s.keyType),h===nt?r("types[%i].encode(%s[ks[i]],w.uint32(18).fork(),q+1).ldelim().ldelim()",o,i):r(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|h,u,i),r("}")("}")):s.repeated?(r("if(%s!=null&&%s.length){",i,i),s.packed&&a.packed[u]!==nt?r("w.uint32(%i).%ss(%s)",(s.id<<3|2)>>>0,u,i):(r("for(var i=0;i<%s.length;++i)",i),h===nt?l(r,s,o,i+"[i]"):r("w.uint32(%i).%s(%s[i])",(s.id<<3|h)>>>0,u,i)),r("}")):(s.required||(s.hasPresence||!(s.resolvedType instanceof f||a.basic[u]!==nt)?r("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",i,s.name):s.resolvedType instanceof f?r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&%s!==%j)",i,s.name,i,s.typeDefault):"bool"===u?r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&%s!==false)",i,s.name,i):"string"===u?r('if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&%s!=="")',i,s.name,i):"bytes"===u?r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&%s.length)",i,s.name,i):"double"===u||"float"===u?r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&!Object.is(%s,0))",i,s.name,i):a.long[u]!==nt?r('if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&(typeof %s==="object"?%s.low||%s.high:%s!==0))',i,s.name,i,i,i,i):r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&%s!==0)",i,s.name,i)),h===nt?l(r,s,o,i):r("w.uint32(%i).%s(%s)",(s.id<<3|h)>>>0,u,i))}return r('if(m.$unknowns!=null&&Object.hasOwnProperty.call(m,"$unknowns"))')("for(var i=0;i<m.$unknowns.length;++i)")("w.raw(m.$unknowns[i])")("return w")};var f=t(6),a=t(27),c=t(28);function l(t,i,r,n){i.delimited?t("types[%i].encode(%s,w.uint32(%i),q+1).uint32(%i)",r,n,(i.id<<3|3)>>>0,(i.id<<3|4)>>>0):t("types[%i].encode(%s,w.uint32(%i).fork(),q+1).ldelim()",r,n,(i.id<<3|2)>>>0)}},{27:27,28:28,6:6}],6:[function(t,i,r){i.exports=s;var h=t(15),n=(s.prototype=Object.create(h.prototype,{constructor:{value:s,writable:!0,enumerable:!1,configurable:!0}}),s.className="Enum",t(14)),e=t(28);function s(t,i,r,n,e,s){if(h.call(this,t,r),i&&"object"!=typeof i)throw TypeError("values must be an object");if(this.valuesById=Object.create(null),this.values=Object.create(this.valuesById),this.comment=n,this.comments=e||{},this.valuesOptions=s,this.s={},this.reserved=nt,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.o=function(t){return t=this.u||t,h.prototype.o.call(this,t),Object.keys(this.values).forEach(t=>{var i=e.merge({},this.i);this.s[t]=e.merge(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,i.valuesOptions);return t.reserved=i.reserved,i.edition&&(t.u=i.edition),t.h="proto3",t},s.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return e.toObject(["edition",this.f(),"options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:nt,"comment",t?this.comment:nt,"comments",t?this.comments:nt])},s.prototype.add=function(t,i,r,n){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]!==nt)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]!==nt){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;n&&(this.valuesOptions===nt&&(this.valuesOptions={}),this.valuesOptions[t]=n||null),this.comments[t]=r||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 n.isReservedId(this.reserved,t)},s.prototype.isReservedName=function(t){return n.isReservedName(this.reserved,t)}},{14:14,15:15,28:28}],7:[function(t,i,r){i.exports=o;var n,u=t(15),e=(o.prototype=Object.create(u.prototype,{constructor:{value:o,writable:!0,enumerable:!1,configurable:!0}}),o.className="Field",t(6)),h=t(27),f=t(28),a=/^(?:required|optional|repeated)$/;function o(t,i,r,n,e,s,o){if(f.isObject(n)?(o=e,s=n,n=e=nt):f.isObject(e)&&(o=s,s=e,e=nt),u.call(this,t,s),!f.isInteger(i)||i<0)throw TypeError("id must be a non-negative integer");if(!f.isString(r))throw TypeError("type must be a string");if(n!==nt&&!a.test(n=n.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(e!==nt&&!f.isString(e))throw TypeError("extend must be a string");this.rule=n&&"optional"!==n?n:nt,this.type=r,this.id=i,this.extend=e||nt,this.repeated="repeated"===n,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!f.Long&&h.long[r]!==nt,this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.comment=o,this.protoName=nt,this.jsonName=nt}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.u=i.edition),i.protoName&&(t.protoName=i.protoName),i.jsonName!==nt?t.jsonName=i.jsonName:i.options&&i.options.json_name!==nt&&(t.jsonName=i.options.json_name),t.h="proto3",t},Object.defineProperty(o.prototype,"required",{get:function(){return"LEGACY_REQUIRED"===this.i.field_presence}}),Object.defineProperty(o.prototype,"optional",{get:function(){return!this.required}}),Object.defineProperty(o.prototype,"delimited",{get:function(){return this.resolvedType instanceof n&&"DELIMITED"===this.i.message_encoding}}),Object.defineProperty(o.prototype,"packed",{get:function(){return"PACKED"===this.i.repeated_field_encoding}}),Object.defineProperty(o.prototype,"hasPresence",{get:function(){return!this.repeated&&!this.map&&(this.partOf||this.declaringField||this.extensionField||"IMPLICIT"!==this.i.field_presence)}}),o.prototype.setOption=function(t,i,r){return u.prototype.setOption.call(this,t,i,r)},o.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return f.toObject(["edition",this.f(),"rule","optional"!==this.rule&&this.rule||nt,"type",this.type,"id",this.id,"extend",this.extend,"protoName",this.protoName!==this.name?this.protoName:nt,"jsonName",this.jsonName!==f.jsonName(this.protoName||this.name)?this.jsonName:nt,"options",this.options,"comment",t?this.comment:nt])},o.prototype.resolve=function(){var t;return this.resolved?this:((this.typeDefault=h.defaults[this.type])===nt?(this.resolvedType=(this.declaringField||this).parent.lookupTypeOrEnum(this.type),this.resolvedType instanceof n?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&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===nt||!this.resolvedType||this.resolvedType instanceof e||delete this.options.packed,Object.keys(this.options).length||(this.options=nt)),this.long?(this.typeDefault=f.Long.fromNumber(this.typeDefault,"uint64"===this.type||"fixed64"===this.type),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 n&&this.parent.a&&(this.parent.a.prototype[this.name]=this.defaultValue),this.protoName===nt&&(this.protoName=this.name),this.jsonName===nt&&(this.jsonName=f.jsonName(this.protoName)),u.prototype.resolve.call(this))},o.prototype.c=function(t){var i;return"proto2"!==t&&"proto3"!==t?{}:(t={},"required"===this.rule&&(t.field_presence="LEGACY_REQUIRED"),this.parent&&h.defaults[this.type]===nt&&(i=this.parent.get(this.type.split(".").pop()))&&i instanceof n&&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.o=function(t){return u.prototype.o.call(this,this.u||t)},o.d=function(r,n,e,s){return"function"==typeof n?n=f.decorateType(n).name:n&&"object"==typeof n&&(n=f.decorateEnum(n).name),function(t,i){f.decorateType(t.constructor).add(new o(i,r,n,e,{default:s}))}},o.l=function(t){n=t}},{15:15,27:27,28:28,6:6}],8:[function(t,i,n){(n=i.exports=t(9)).build="light",n.load=function(t,i,r){return(i="function"==typeof i?(r=i,new n.Root):i||new n.Root).load(t,r)},n.loadSync=function(t,i){return(i=i||new n.Root).loadSync(t)},n.encoder=t(5),n.decoder=t(4),n.verifier=t(42),n.converter=t(3),n.ReflectionObject=t(15),n.Namespace=t(14),n.Root=t(20),n.Enum=t(6),n.Type=t(26),n.Field=t(7),n.OneOf=t(16),n.MapField=t(11),n.Service=t(24),n.Method=t(13),n.Message=t(12),n.wrappers=t(43),n.types=t(27),n.util=t(28),n.ReflectionObject.l(n.Root),n.Namespace.l(n.Type,n.Service,n.Enum),n.Root.l(n.Type,nt,{}),n.Field.l(n.Type)},{11:11,12:12,13:13,14:14,15:15,16:16,20:20,24:24,26:26,27:27,28:28,3:3,4:4,42:42,43:43,5:5,6:6,7:7,9:9}],9:[function(t,i,r){function n(){r.Writer.l(r.BufferWriter),r.Reader.l(r.BufferReader)}r.build="minimal",r.Writer=t(44),r.BufferWriter=t(45),r.Reader=t(18),r.BufferReader=t(19),r.util=t(37),r.rpc=t(22),r.roots=t(21),r.configure=n,n()},{18:18,19:19,21:21,22:22,37:37,44:44,45:45}],10:[function(t,i,r){(r=i.exports=t(8)).build="full",r.tokenize=t(25),r.parse=t(17),r.common=t(2),r.Root.l(r.Type,r.parse,r.common)},{17:17,2:2,25:25,8:8}],11:[function(t,i,r){i.exports=s;var o=t(7),n=(s.prototype=Object.create(o.prototype,{constructor:{value:s,writable:!0,enumerable:!1,configurable:!0}}),s.className="MapField",t(27)),u=t(28);function s(t,i,r,n,e,s){if(o.call(this,t,i,n,nt,nt,e,s),!u.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}s.fromJSON=function(t,i){t=new s(t,i.id,i.keyType,i.type,i.options,i.comment);return i.protoName&&(t.protoName=i.protoName),i.jsonName!==nt?t.jsonName=i.jsonName:i.options&&i.options.json_name!==nt&&(t.jsonName=i.options.json_name),t},s.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return u.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"protoName",this.protoName!==this.name?this.protoName:nt,"jsonName",this.jsonName!==u.jsonName(this.protoName||this.name)?this.jsonName:nt,"options",this.options,"comment",t?this.comment:nt])},s.prototype.resolve=function(){if(this.resolved)return this;if(n.mapKey[this.keyType]===nt)throw Error("invalid key type: "+this.keyType);return o.prototype.resolve.call(this)},s.d=function(r,n,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,r,n,e))}}},{27:27,28:28,7:7}],12:[function(t,i,r){i.exports=e;var n=t(37);function e(t){if(t)for(var i=Object.keys(t),r=0;r<i.length;++r)null!=t[i[r]]&&"__proto__"!==i[r]&&(this[i[r]]=t[i[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,n.toJSONOptions)}},{37:37}],13:[function(t,i,r){i.exports=n;var f=t(15),a=(n.prototype=Object.create(f.prototype,{constructor:{value:n,writable:!0,enumerable:!1,configurable:!0}}),n.className="Method",t(28));function n(t,i,r,n,e,s,o,u,h){if(a.isObject(e)?(o=e,e=s=nt):a.isObject(s)&&(o=s,s=nt),i!==nt&&!a.isString(i))throw TypeError("type must be a string");if(!a.isString(r))throw TypeError("requestType must be a string");if(!a.isString(n))throw TypeError("responseType must be a string");f.call(this,t,o),this.type=i||"rpc",this.requestType=r,this.requestStream=!!e||nt,this.responseType=n,this.responseStream=!!s||nt,this.path="/"+this.name,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=u,this.parsedOptions=h}n.fromJSON=function(t,i){return new n(t,i.type,i.requestType,i.responseType,i.requestStream,i.responseStream,i.options,i.comment,i.parsedOptions)},n.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return a.toObject(["type","rpc"!==this.type&&this.type||nt,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:nt,"parsedOptions",this.parsedOptions])},n.prototype.resolve=function(){var t;return this.resolved?this:(this.parent?("."==((t=this.parent.fullName)[0]||"")&&(t=t.substring(1)),this.path="/"+t+"/"+this.name):this.path="/"+this.name,this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),f.prototype.resolve.call(this))}},{15:15,28:28}],14:[function(t,i,r){i.exports=c;var s,o,u,n=t(15),h=(c.prototype=Object.create(n.prototype,{constructor:{value:c,writable:!0,enumerable:!1,configurable:!0}}),c.className="Namespace",t(7)),f=t(28),a=t(16);function e(t,i){if(!t||!t.length)return nt;for(var r={},n=0;n<t.length;++n)r[t[n].name]=t[n].toJSON(i);return r}function c(t,i){n.call(this,t,i),this.nested=nt,this.v=null,this.p=Object.create(null),this.b=!0,this.w=!0}function l(t){t.v=null,t.p=Object.create(null);for(var i=t;i=i.parent;)i.p=Object.create(null);return t}c.fromJSON=function(t,i,r){if((r=r===nt?0:r)>f.recursionLimit)throw Error("max depth exceeded");return new c(t,i.options).addJSON(i.nested,r)},c.arrayToJSON=e,c.isReservedId=function(t,i){if(t)for(var r=0;r<t.length;++r)if("string"!=typeof t[r]&&t[r][0]<=i&&t[r][1]>=i)return!0;return!1},c.isReservedName=function(t,i){if(t)for(var r=0;r<t.length;++r)if(t[r]===i)return!0;return!1},Object.defineProperty(c.prototype,"nestedArray",{get:function(){return this.v||(this.v=f.toArray(this.nested))}}),c.prototype.toJSON=function(t){return f.toObject(["options",this.options,"nested",e(this.nestedArray,t)])},c.prototype.addJSON=function(t,i){if((i=i===nt?0:i)>f.recursionLimit)throw Error("max depth exceeded");if(t)for(var r,n=Object.keys(t),e=0;e<n.length;++e)r=t[n[e]],this.add((r.fields!==nt?s:r.values!==nt?u:r.methods!==nt?o:r.id!==nt?h:c).fromJSON(n[e],r,i+1));return this},c.prototype.get=function(t){return this.nested&&Object.prototype.hasOwnProperty.call(this.nested,t)?this.nested[t]:null},c.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)},c.prototype.add=function(t){if(!(t instanceof h&&t.extend!==nt||t instanceof s||t instanceof a||t instanceof u||t instanceof o||t instanceof c))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 c&&t instanceof c)||i instanceof s||i instanceof o)throw Error("duplicate name '"+t.name+"' in "+this);for(var r=i.nestedArray,n=0;n<r.length;++n)t.add(r[n]);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.u||(t.u=t.h),this.b=!0,this.w=!0;for(var e=this;e=e.parent;)e.b=!0,e.w=!0;return t.onAdd(this),l(this)},c.prototype.remove=function(t){if(!(t instanceof n))throw TypeError("object must be a ReflectionObject");if(t.parent===this&&f.remove(this.nested,t,t.name))return Object.keys(this.nested).length||(this.nested=nt),t.onRemove(this),l(this);throw Error(t+" is not a member of "+this)},c.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");if(t.length>f.recursionLimit)throw Error("max depth exceeded");for(var r=this;0<t.length;){var n=t.shift();if(r.nested&&r.nested[n]){if(!((r=r.nested[n])instanceof c))throw Error("path conflicts with non-namespace objects")}else r.add(r=new c(n))}return i&&r.addJSON(i),r},c.prototype.resolveAll=function(){if(this.w){this.b&&this.m(this.u);var t=this.nestedArray,i=0;for(this.resolve();i<t.length;)t[i]instanceof c?t[i++].resolveAll():t[i++].resolve();this.w=!1}return this},c.prototype.m=function(i){return this.b&&(this.b=!1,i=this.u||i,n.prototype.m.call(this,i),this.nestedArray.forEach(t=>{t.m(i)})),this},c.prototype.lookup=function(t,i,r){if("boolean"==typeof i?(r=i,i=nt):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 n=t.join(".");if(""===t[0])return this.root.lookup(t.slice(1),i);var e=this.y(t,n);if(e&&(!i||~i.indexOf(e.constructor)))return e;if((e=this.root.g&&this.root.g["."+n])&&(!i||~i.indexOf(e.constructor)))return e;if(!r)for(var s=this;s.parent;){if((e=s.parent.y(t,n))&&(!i||~i.indexOf(e.constructor)))return e;s=s.parent}return null},c.prototype.y=function(t,i){if(Object.prototype.hasOwnProperty.call(this.p,i))return this.p[i];var r=this.get(t[0]),n=null;if(r)1===t.length?n=r:r instanceof c&&(t=t.slice(1),n=r.y(t,t.join(".")));else for(var e=0;e<this.nestedArray.length;++e)if(this.v[e]instanceof c&&(r=this.v[e].y(t,i))){n=r;break}return this.p[i]=n},c.prototype.lookupType=function(t){var i=this.lookup(t,[s]);if(i)return i;throw Error("no such type: "+t)},c.prototype.lookupEnum=function(t){var i=this.lookup(t,[u]);if(i)return i;throw Error("no such Enum '"+t+"' in "+this)},c.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)},c.prototype.lookupService=function(t){var i=this.lookup(t,[o]);if(i)return i;throw Error("no such Service '"+t+"' in "+this)},c.l=function(t,i,r){s=t,o=i,u=r}},{15:15,16:16,28:28,7:7}],15:[function(t,i,r){(i.exports=a).className="ReflectionObject";const n=t(16);var e,o=t(28),s={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY",enforce_naming_style:"STYLE2024",default_symbol_visibility:"EXPORT_TOP_LEVEL"},u={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY",enforce_naming_style:"STYLE_LEGACY",default_symbol_visibility:"EXPORT_ALL"},h={enum_type:"CLOSED",field_presence:"EXPLICIT",json_format:"LEGACY_BEST_EFFORT",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"EXPANDED",utf8_validation:"NONE",enforce_naming_style:"STYLE_LEGACY",default_symbol_visibility:"EXPORT_ALL"},f={enum_type:"OPEN",field_presence:"IMPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY",enforce_naming_style:"STYLE_LEGACY",default_symbol_visibility:"EXPORT_ALL"};function a(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.u=null,this.h="proto2",this.i={},this.j=!1,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(a.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(".")}}}),a.prototype.toJSON=function(){throw Error()},a.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.O(this)},a.prototype.onRemove=function(t){t=t.root;t instanceof e&&t.k(this),this.parent=null,this.resolved=!1},a.prototype.resolve=function(){return this.resolved||this.root instanceof e&&(this.resolved=!0),this},a.prototype.m=function(t){return this.o(this.u||t)},a.prototype.o=function(t){if(!this.j){var i={};if(!t)throw Error("Unknown edition for "+this.fullName);var r=o.merge({},this.options&&this.options.features,this.c(t));if(this.u){if("proto2"===t)i=Object.assign({},h);else if("proto3"===t)i=Object.assign({},f);else if("2023"===t)i=Object.assign({},u);else{if("2024"!==t)throw Error("Unknown edition: "+t);i=Object.assign({},s)}this.i=o.merge(i,r)}else if(this.partOf instanceof n){t=o.merge({},this.partOf.i);this.i=o.merge(t,r)}else if(!this.declaringField){if(!this.parent)throw Error("Unable to find a parent for "+this.fullName);i=o.merge({},this.parent.i);this.i=o.merge(i,r)}this.extensionField&&(this.extensionField.i=this.i),this.j=!0}},a.prototype.c=function(){return{}},a.prototype.getOption=function(t){return this.options&&Object.prototype.hasOwnProperty.call(this.options,t)?this.options[t]:nt},a.prototype.setOption=function(t,i,r){var n;return"__proto__"!==t&&(this.options||(this.options={}),/^features\./.test(t)?o.setProperty(this.options,t,i,r):(n=this.getOption(t),r&&n!==nt||(n!==i&&(this.resolved=!1),this.options[t]=i))),this},a.prototype.setParsedOption=function(i,t,r){var n,e,s;return"__proto__"!==i&&(this.parsedOptions||(this.parsedOptions=[]),n=this.parsedOptions,r?(e=n.find(function(t){return Object.prototype.hasOwnProperty.call(t,i)}))?(s=e[i],o.setProperty(s,r,t)):((e={})[i]=o.setProperty({},r,t),n.push(e)):((s={})[i]=t,n.push(s))),this},a.prototype.setOptions=function(t,i){if(t)for(var r=Object.keys(t),n=0;n<r.length;++n)this.setOption(r[n],t[r[n]],i);return this},Object.defineProperty(a.prototype,"toString",{value:function(){var t=this.constructor.className,i=this.fullName;return i.length?t+" "+i:t},writable:!0,enumerable:!1,configurable:!0}),a.prototype.f=function(){return this.u&&"proto3"!==this.u?this.u:nt},a.l=function(t){e=t}},{16:16,28:28}],16:[function(t,i,r){i.exports=o;var e=t(15),n=(o.prototype=Object.create(e.prototype,{constructor:{value:o,writable:!0,enumerable:!1,configurable:!0}}),o.className="OneOf",t(7)),s=t(28);function o(t,i,r,n){if(Array.isArray(i)||(r=i,i=nt),e.call(this,t,r),i!==nt&&!Array.isArray(i))throw TypeError("fieldNames must be an Array");this.oneof=i||[],this.fieldsArray=[],this.comment=n}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:nt])},o.prototype.add=function(t){if(t instanceof n)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 n))throw TypeError("field must be a Field");var i=this.fieldsArray.indexOf(t);if(i<0)throw Error(t+" is not a member of "+this);return this.fieldsArray.splice(i,1),-1<(i=this.oneof.indexOf(t.name))&&this.oneof.splice(i,1),t.partOf=null,this},o.prototype.onAdd=function(t){e.prototype.onAdd.call(this,t);for(var i=0;i<this.oneof.length;++i){var r=t.get(this.oneof[i]);r&&!r.partOf&&(r.partOf=this).fieldsArray.push(r)}u(this)},o.prototype.onRemove=function(t){for(var i,r=0;r<this.fieldsArray.length;++r)(i=this.fieldsArray[r]).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 r=Array(arguments.length),t=0;t<arguments.length;)r[t]=arguments[t++];return function(t,i){s.decorateType(t.constructor).add(new o(i,r)),Object.defineProperty(t,i,{get:s.oneOfGetter(r),set:s.oneOfSetter(r)})}}},{15:15,28:28,7:7}],17:[function(t,i,r){(i.exports=rt).filename=null,rt.defaults={keepCase:!1};var P=t(25),q=t(20),V=t(26),R=t(7),F=t(11),$=t(16),M=t(6),D=t(24),B=t(13),C=t(15),U=t(27),z=t(28),X=/^[1-9][0-9]*$/,Z=/^-?[1-9][0-9]*$/,Y=/^0[x][0-9a-fA-F]+$/,G=/^-?0[x][0-9a-fA-F]+$/,K=/^0[0-7]+$/,H=/^-?0[0-7]+$/,W=z.patterns.numberRe,J=/^[a-zA-Z_][a-zA-Z_0-9]*$/,Q=z.patterns.typeRefRe,tt=536870911,it=2147483647;function rt(t,i,r){i instanceof q||(r=i,i=new q);var n,e,s,a,o=(r=r||rt.defaults).preferTrailingComment||!1,u=P(t,r.alternateCommentMode||!1),v=u.next,c=u.push,p=u.peek,b=u.skip,l=u.cmnt,h=!0,w="proto2",m=i,y=[],f={},g=r.keepCase?function(t){return t}:z.camelCase;function j(t,i,r){var n=rt.filename;return r||(rt.filename=null),Error("illegal "+(i||"token")+" '"+t+"' ("+(n?n+", ":"")+"line "+u.line+")")}function d(){var t,i=[];do{if('"'!==(t=v())&&"'"!==t)throw j(t)}while(i.push(v()),b(t),'"'===(t=p())||"'"===t);return i.join("")}function E(i){var r=v();switch(r){case"'":case'"':return c(r),d();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{var t=r,n=!0,e=1;switch("-"==(t[0]||"")&&(e=-1,t=t.substring(1)),t){case"inf":case"INF":case"Inf":return e*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(X.test(t))return e*parseInt(t,10);if(Y.test(t))return e*parseInt(t,16);if(K.test(t))return e*parseInt(t,8);if(W.test(t))return e*parseFloat(t);throw j(t,"number",n)}catch(t){if(i&&Q.test(r))return r;throw j(r,"value")}}function O(i,r,t,n){var e;do{if(!r||'"'!==(s=p())&&"'"!==s)try{i.push([e=k(v(),n,t),b("to",!0)?k(v(),n,t):e])}catch(t){if(!(r&&Q.test(s)&&2023<=w))throw t;i.push(s)}else{var s=d();if(i.push(s),2023<=w)throw j(s,"id")}}while(b(",",!0));var o={options:nt,setOption:function(t,i){this.options===nt&&(this.options={}),this.options[t]=i}};x(o,function(t){if("option"!==t)throw j(t);I(o,t),b(";")},function(){N(o)})}function k(t,i,r){if(null===t)throw j(t,"end of input");switch(t){case"max":case"MAX":case"Max":return r||tt;case"0":return 0}if(i||"-"!=(t[0]||"")){if(Z.test(t))return parseInt(t,10);if(G.test(t))return parseInt(t,16);if(H.test(t))return parseInt(t,8)}throw j(t,"id")}function _(t,i,r){switch(r===nt&&(r=0),i){case"option":return I(t,i),b(";"),!0;case"message":return A(t,0,r+1),!0;case"enum":return L(t),!0;case"export":case"local":return w<"2024"?!1:"export"!==(i=v())&&"local"!==i&&(("message"===i||"enum"===i)&&_(t,i,r));case"service":var f,n=t,e=i,a=r+1;if((a=a===nt?0:a)>z.recursionLimit)throw Error("max depth exceeded");if(null!==(e=v())&&J.test(e))return x(f=new D(e),function(t){if(!_(f,t,a)&&";"!==t){if("rpc"!==t)throw j(t);var i=f,r=l(),n=t;if(!J.test(t=v()))throw j(t,"name");var e,s,o,u=t;if(b("("),b("stream",!0)&&(s=!0),!Q.test(t=v()))throw j(t);if(e=t,b(")"),b("returns"),b("("),b("stream",!0)&&(o=!0),!Q.test(t=v()))throw j(t);t=t,b(")");var h=new B(u,n,e,t,s,o);h.comment=r,x(h,function(t){if(";"!==t){if("option"!==t)throw j(t);I(h,t),b(";")}}),i.add(h)}}),n.add(f),n===m&&y.push(f),!0;throw j(e,"service name");case"extend":var s,o=t,n=i,u=r;if(null!==(n=v())&&Q.test(n))return s=n,x(null,function(t){switch(t){case"required":case"repeated":T(o,t,s,u+1);break;case"optional":T(o,"proto3"===w?"proto3_optional":"optional",s,u+1);break;default:if("proto2"===w||!Q.test(t))throw j(t);c(t),T(o,"optional",s,u+1)}}),!0;throw j(n,"reference")}return!1}function x(t,i,r){var n,e=u.line;if(t&&("string"!=typeof t.comment&&(t.comment=l()),t.filename=rt.filename),b("{",!0)){for(;"}"!==(n=v());)i(n);b(";",!0)}else r&&r(),b(";"),t&&("string"!=typeof t.comment||o)&&(t.comment=l(e)||t.comment)}function A(t,i,f){if((f=f===nt?0:f)>z.nestingLimit)throw Error("max depth exceeded");if(null===(i=v())||!J.test(i))throw j(i,"type name");var a=new V(i);x(a,function(t){if(!_(a,t,f))switch(t){case";":break;case"map":var i=a,r=(b("<"),v());if(U.mapKey[r]===nt)throw j(r,"type");b(",");var n=v();if(!Q.test(n))throw j(n,"type");b(">");var e=v();if(null===e||!J.test(e))throw j(e,"name");b("=");var s=e,o=(e=g(e),new F(e,k(v()),r,n));s!==e&&(o.protoName=s),x(o,function(t){if("option"!==t)throw j(t);I(o,t),b(";")},function(){N(o)}),i.add(o);break;case"required":if("proto2"!==w)throw j(t);case"repeated":T(a,t,nt,f+1);break;case"optional":if("proto3"===w)T(a,"proto3_optional",nt,f+1);else{if("proto2"!==w)throw j(t);T(a,"optional",nt,f+1)}break;case"oneof":var r=a,n=t,u=f+1;if(null===(n=v())||!J.test(n))throw j(n,"name");var h=new $(g(n));x(h,function(t){"option"===t?(I(h,t),b(";")):(c(t),T(h,"optional",nt,u))}),r.add(h);break;case"extensions":O(a.extensions||(a.extensions=[]));break;case"reserved":O(a.reserved||(a.reserved=[]),!0);break;default:if("proto2"===w||!Q.test(t))throw j(t);c(t),T(a,"optional",nt,f+1)}}),t.add(a),t===m&&y.push(a)}function T(t,i,r,n){var e=v();if(null===e)throw j(e,"end of input");if("group"===e){var s=t,o=i,u=r,h=n;if((h=h===nt?0:h)>z.nestingLimit)throw Error("max depth exceeded");if(2023<=w)throw j("group");var f,a,n=v();if(null!==n&&J.test(n))return a=z.lcFirst(n),n===a&&(n=z.ucFirst(n)),b("="),l=k(v()),(f=new V(n)).group=!0,(a=new R(a,l,n,o,u)).filename=rt.filename,x(f,function(t){switch(t){case";":break;case"option":I(f,t),b(";");break;case"required":case"repeated":T(f,t,nt,h+1);break;case"optional":T(f,"proto3"===w?"proto3_optional":"optional",nt,h+1);break;case"message":A(f,0,h+1);break;case"enum":L(f);break;case"reserved":O(f.reserved||(f.reserved=[]),!0);break;case"export":case"local":if(w<"2024")throw j(t);switch(t=v()){case"message":case"enum":A(f,0,h+1);break;default:throw j(t)}break;default:throw j(t)}}),s.add(f).add(a),void(s===m&&(y.push(f),y.push(a)));throw j(n,"name")}for(;e.endsWith(".")||(p()||"").startsWith(".");){var c=v();if(null===c)throw j(c,"end of input");e+=c}if(!Q.test(e))throw j(e,"type");if(null===(l=v()))throw j(l,"end of input");if(!J.test(l))throw j(l,"name");var o=l,l=g(l),d=(b("="),new R(l,k(v()),e,"proto3_optional"===i?"optional":i,r));o!==l&&(d.protoName=o),x(d,function(t){if("option"!==t)throw j(t);I(d,t),b(";")},function(){N(d)}),"proto3_optional"===i?(u=new $("_"+l),d.setOption("proto3_optional",!0),u.add(d),t.add(u)):t.add(d),t===m&&y.push(d)}function L(t,i){if(null===(i=v())||!J.test(i))throw j(i,"name");var s=new M(i);x(s,function(t){switch(t){case";":break;case"option":I(s,t),b(";");break;case"reserved":O(s.reserved||(s.reserved=[]),!0,it,!0),s.reserved===nt&&(s.reserved=[]);break;default:var i=s,r=t;if(!J.test(r))throw j(r,"name");b("=");var n=k(v(),!0),e={options:nt,getOption:function(t){return this.options[t]},setOption:function(t,i){C.prototype.setOption.call(e,t,i)},setParsedOption:function(){return nt}};return x(e,function(t){if("option"!==t)throw j(t);I(e,t),b(";")},function(){N(e)}),void i.add(r,n,e.comment,e.parsedOptions||e.options)}}),t.add(s),t===m&&y.push(s)}function I(t,i){var r=!0;for("option"===i&&(i=v());"="!==i;){if(null===i)throw j(i,"end of input");if("("===i&&(n=v(),b(")"),i="("+n+")"),r){if(r=!1,i.includes(".")&&!i.includes("(")){var n=i.split("."),e=n[0]+".";i=n[1];continue}e=i}else h=h?h+i:i;i=v()}var s,o,u=h?e.concat(h):e,u=function t(i,r,n){n===nt&&(n=0);if(n>z.recursionLimit)throw Error("max depth exceeded");if(b("{",!0)){for(var e={};!b("}",!0);){if(!J.test(a=v()))throw j(a,"name");if(null===a)throw j(a,"end of input");var s,o,u=a;if(b(":",!0),"{"===p())s=t(i,r+"."+a,n+1);else if("["===p()){if(s=[],b("[",!0)&&!b("]",!0)){for(;o=E(!0),s.push(o),b(",",!0););b("]"),void 0!==o&&S(i,r+"."+a,o)}}else s=E(!0),S(i,r+"."+a,s);var h=Object.prototype.hasOwnProperty.call(e,u)?e[u]:nt;h&&(s=[].concat(h).concat(s)),"__proto__"!==u&&(e[u]=s),b(",",!0),b(";",!0)}return e}var f=E(!0);S(i,r,f);return f}(t,u),h=h&&"."===h[0]?h.slice(1):h;e=e&&"."===e[e.length-1]?e.slice(0,-1):e,s=e,u=u,o=h,(t=t).setParsedOption&&t.setParsedOption(s,u,o)}function S(t,i,r){m===t&&/^features\./.test(i)?f[i]=r:("json_name"===i&&t instanceof R&&(t.jsonName=r),t.setOption&&t.setOption(i,r))}function N(t){if(b("[",!0)){for(;I(t,"option"),b(",",!0););b("]")}}for(;null!==(a=v());)switch(a){case";":break;case"package":if(!h)throw j(a);if(n!==nt)throw j("package");if(null===(n=v())||!Q.test(n))throw j(n,"name");m=m.define(n),b(";");break;case"import":!function(){var t,i;switch(p()){case"option":if(w<"2024")throw j("option");return v(),d(),b(";");case"weak":i=s=s||[],v();break;case"public":v();default:i=e=e||[]}t=d(),b(";"),i.push(t)}();break;case"syntax":if(!h)throw j(a);if(b("="),(w=d())<2023)throw j(w,"syntax");b(";");break;case"edition":if(!h)throw j(a);if(b("="),w=d(),!["2023","2024"].includes(w))throw j(w,"edition");b(";");break;case"option":I(m,a),b(";",!0);break;default:if(_(m,a,0)){h=!1;continue}throw j(a)}return y.forEach(i=>{i.u=w,Object.keys(f).forEach(t=>{i.getOption(t)===nt&&i.setOption(t,f[t],!0)})}),rt.filename=null,{package:n,imports:e,weakImports:s,root:i}}},{11:11,13:13,15:15,16:16,20:20,24:24,25:25,26:26,27:27,28:28,6:6,7:7}],18:[function(t,i,r){i.exports=o;var n,a=t(37),e=a.LongBits,s=a.utf8;function c(t,i){return RangeError("index out of range: "+t.pos+" + "+(i||1)+" > "+t.len)}function o(t){this.buf=t,this.pos=0,this.len=t.length,this.view=null,this.discardUnknown=o.discardUnknown}function u(t){if((t=Array.isArray(t)?new Uint8Array(t):t)instanceof Uint8Array)return new o(t);throw Error("illegal buffer")}function h(){return a.Buffer?function(t){return(o.create=function(t){return a.Buffer.isBuffer(t)?new n(t):u(t)})(t)}:u}function f(){var t=new e(0,0),i=0;if(!(4<this.len-this.pos)){for(;i<4;++i){if(this.pos>=this.len)throw c(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t}throw c(this)}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 c(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 l(t,i){return(t[i-4]|t[i-3]<<8|t[i-2]<<16|t[i-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw c(this,8);return new e(l(this.buf,this.pos+=4),l(this.buf,this.pos+=4))}o.create=h(),o.prototype.raw=function(t,i){return this.buf.subarray(t,i)},o.prototype.uint32=function(){var t=this.buf,i=this.pos,r=(127&t[i])>>>0;if(t[i++]<128)return this.pos=i,r;if(r=(r|(127&t[i])<<7)>>>0,t[i++]<128)return this.pos=i,r;if(r=(r|(127&t[i])<<14)>>>0,t[i++]<128)return this.pos=i,r;if(r=(r|(127&t[i])<<21)>>>0,t[i++]<128)return this.pos=i,r;if(r=(r|(15&t[i])<<28)>>>0,t[i++]<128)return this.pos=i,r;for(var n=0;n<5;++n){if(i>=this.len)throw this.pos=i,c(this);if(t[i++]<128)return this.pos=i,r}throw this.pos=i,Error("invalid varint encoding")},o.prototype.tag=function(){var t=this.buf,i=this.pos,r=(127&t[i])>>>0;if(t[i++]<128)return this.pos=i,r;if(r=(r|(127&t[i])<<7)>>>0,t[i++]<128)return this.pos=i,r;if(r=(r|(127&t[i])<<14)>>>0,t[i++]<128)return this.pos=i,r;if(r=(r|(127&t[i])<<21)>>>0,t[i++]<128)return this.pos=i,r;if(r=(r|(15&t[i])<<28)>>>0,t[i]<128&&0==(112&t[i]))return this.pos=i+1,r;throw this.pos=i+1,Error("invalid tag encoding")},o.prototype.int32=function(){return 0|this.uint32()},o.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},o.prototype.bool=function(){for(var t,i=!1,r=0;r<10;++r){if(this.pos>=this.len)throw c(this);if(127&(t=this.buf[this.pos++])&&(i=!0),t<128)return i}throw Error("invalid varint encoding")},o.prototype.fixed32=function(){if(this.pos+4>this.len)throw c(this,4);return l(this.buf,this.pos+=4)},o.prototype.sfixed32=function(){if(this.pos+4>this.len)throw c(this,4);return 0|l(this.buf,this.pos+=4)},o.prototype.float=function(){if(this.pos+4>this.len)throw c(this,4);var t=a.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},o.prototype.double=function(){if(this.pos+8>this.len)throw c(this,4);var t=a.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},o.prototype.uint32s=function(t){t===nt