@openhps/protobuf 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +58 -38
- package/dist/cjs/InternalProtobufDeserializer.js +30 -15
- package/dist/cjs/InternalProtobufDeserializer.js.map +1 -1
- package/dist/cjs/InternalProtobufSerializer.js +7 -7
- package/dist/cjs/InternalProtobufSerializer.js.map +1 -1
- package/dist/cjs/PrimitiveWrapper.js +13 -0
- package/dist/cjs/PrimitiveWrapper.js.map +1 -0
- package/dist/cjs/ProtobufSerializer.js +27 -2
- package/dist/cjs/ProtobufSerializer.js.map +1 -1
- package/dist/cjs/bin/generator.js +3 -3
- package/dist/cjs/bin/generator.js.map +1 -1
- package/dist/cjs/generator/ObjectGenerator.js +30 -12
- package/dist/cjs/generator/ObjectGenerator.js.map +1 -1
- package/dist/cjs/generator/ProjectGenerator.js +89 -38
- package/dist/cjs/generator/ProjectGenerator.js.map +1 -1
- package/dist/cjs/generator/constants.js +11 -4
- package/dist/cjs/generator/constants.js.map +1 -1
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/tsconfig.bundle.cjs.tsbuildinfo +1 -0
- package/dist/esm/InternalProtobufDeserializer.js +30 -14
- package/dist/esm/InternalProtobufDeserializer.js.map +1 -1
- package/dist/esm/InternalProtobufSerializer.js +7 -6
- package/dist/esm/InternalProtobufSerializer.js.map +1 -1
- package/dist/esm/PrimitiveWrapper.js +9 -0
- package/dist/esm/PrimitiveWrapper.js.map +1 -0
- package/dist/esm/ProtobufSerializer.js +30 -5
- package/dist/esm/ProtobufSerializer.js.map +1 -1
- package/dist/esm/bin/generator.js +5 -5
- package/dist/esm/bin/generator.js.map +1 -1
- package/dist/esm/decorators/index.js +1 -1
- package/dist/esm/generator/ObjectGenerator.js +32 -14
- package/dist/esm/generator/ObjectGenerator.js.map +1 -1
- package/dist/esm/generator/ProjectGenerator.js +92 -40
- package/dist/esm/generator/ProjectGenerator.js.map +1 -1
- package/dist/esm/generator/ServiceGenerator.js +1 -1
- package/dist/esm/generator/constants.js +11 -4
- package/dist/esm/generator/constants.js.map +1 -1
- package/dist/esm/generator/index.js +3 -3
- package/dist/esm/index.js +2 -2
- package/dist/esm/package.json +3 -0
- package/dist/esm/tsconfig.bundle.esm.tsbuildinfo +1 -0
- package/dist/esm/tsconfig.bundle.types.tsbuildinfo +1 -0
- package/dist/types/InternalProtobufDeserializer.d.ts +0 -2
- package/dist/types/InternalProtobufDeserializer.d.ts.map +1 -1
- package/dist/types/InternalProtobufSerializer.d.ts +0 -2
- package/dist/types/InternalProtobufSerializer.d.ts.map +1 -1
- package/dist/types/PrimitiveWrapper.d.ts +8 -0
- package/dist/types/PrimitiveWrapper.d.ts.map +1 -0
- package/dist/types/ProtobufSerializer.d.ts +6 -0
- package/dist/types/ProtobufSerializer.d.ts.map +1 -1
- package/dist/types/generator/ObjectGenerator.d.ts +2 -8
- package/dist/types/generator/ObjectGenerator.d.ts.map +1 -1
- package/dist/types/generator/ProjectGenerator.d.ts +1 -1
- package/dist/types/generator/ProjectGenerator.d.ts.map +1 -1
- package/dist/types/generator/constants.d.ts +1 -1
- package/dist/types/generator/constants.d.ts.map +1 -1
- package/dist/web/openhps-protobuf.es.js +17112 -12881
- package/dist/web/openhps-protobuf.es.js.map +1 -1
- package/dist/web/openhps-protobuf.es.min.js +2 -1
- package/dist/web/openhps-protobuf.es.min.js.LICENSE.txt +19 -0
- package/dist/web/openhps-protobuf.es.min.js.map +1 -1
- package/dist/web/openhps-protobuf.js +17434 -14605
- package/dist/web/openhps-protobuf.js.map +1 -1
- package/dist/web/openhps-protobuf.min.js +2 -1
- package/dist/web/openhps-protobuf.min.js.LICENSE.txt +19 -0
- package/dist/web/openhps-protobuf.min.js.map +1 -1
- package/package.json +125 -94
- package/src/InternalProtobufDeserializer.ts +52 -34
- package/src/InternalProtobufSerializer.ts +9 -10
- package/src/PrimitiveWrapper.ts +9 -0
- package/src/ProtobufSerializer.ts +33 -2
- package/src/bin/generator.ts +4 -4
- package/src/generator/ObjectGenerator.ts +34 -21
- package/src/generator/ProjectGenerator.ts +100 -42
- package/src/generator/constants.ts +11 -4
- package/dist/esm5/InternalProtobufDeserializer.js +0 -147
- package/dist/esm5/InternalProtobufDeserializer.js.map +0 -1
- package/dist/esm5/InternalProtobufSerializer.js +0 -132
- package/dist/esm5/InternalProtobufSerializer.js.map +0 -1
- package/dist/esm5/ProtobufSerializer.js +0 -131
- package/dist/esm5/ProtobufSerializer.js.map +0 -1
- package/dist/esm5/bin/generator.js +0 -104
- package/dist/esm5/bin/generator.js.map +0 -1
- package/dist/esm5/decorators/index.js +0 -2
- package/dist/esm5/decorators/index.js.map +0 -1
- package/dist/esm5/decorators/options.js +0 -2
- package/dist/esm5/decorators/options.js.map +0 -1
- package/dist/esm5/generator/ObjectGenerator.js +0 -311
- package/dist/esm5/generator/ObjectGenerator.js.map +0 -1
- package/dist/esm5/generator/ProjectGenerator.js +0 -115
- package/dist/esm5/generator/ProjectGenerator.js.map +0 -1
- package/dist/esm5/generator/ProtobufGenerator.js +0 -27
- package/dist/esm5/generator/ProtobufGenerator.js.map +0 -1
- package/dist/esm5/generator/ServiceGenerator.js +0 -10
- package/dist/esm5/generator/ServiceGenerator.js.map +0 -1
- package/dist/esm5/generator/constants.js +0 -18
- package/dist/esm5/generator/constants.js.map +0 -1
- package/dist/esm5/generator/index.js +0 -4
- package/dist/esm5/generator/index.js.map +0 -1
- package/dist/esm5/generator/types.js +0 -2
- package/dist/esm5/generator/types.js.map +0 -1
- package/dist/esm5/index.js +0 -3
- package/dist/esm5/index.js.map +0 -1
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import*as __WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__ from"./openhps-core.es.min.js";var __webpack_modules__={1521:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=1521,e.exports=t},4727:(e,t,r)=>{r.d(t,{Q:()=>ProtobufSerializer});const n=(e=>{var t={};return r.d(t,e),t})({ConcreteTypeDescriptor:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.ConcreteTypeDescriptor,DataSerializer:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.DataSerializer,DataSerializerUtils:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.DataSerializerUtils,Deserializer:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.Deserializer,NumberType:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.NumberType,SerializationUtils:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.SerializationUtils,Serializer:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.Serializer,TypedJSON:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.TypedJSON,UUID:()=>__WEBPACK_EXTERNAL_MODULE__openhps_core_es_min_js_27733f5f__.UUID});var o=r(1853),i=r(2549),s=r(4641),a=r(5248),c=r.n(a),l=function(e,t){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},l(e,t)};function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;var f=function(){function e(e){this.ctor=e}return e.prototype.getTypes=function(){return[this.ctor]},e.prototype.hasFriendlyName=function(){return"Object"!==this.ctor.name},e}(),p=function(e){function t(t){return e.call(this,t)||this}return u(t,e),t}(f),h=function(e){function t(t){return e.call(this,t)||this}return u(t,e),t}(f);!function(e){function t(t){var r=e.call(this,Array)||this;return r.elementType=t,r}u(t,e),t.prototype.getTypes=function(){return e.prototype.getTypes.call(this).concat(this.elementType.getTypes())}}(h);!function(e){function t(t){var r=e.call(this,Set)||this;return r.elementType=t,r}u(t,e),t.prototype.getTypes=function(){return e.prototype.getTypes.call(this).concat(this.elementType.getTypes())}}(h);!function(e){function t(t,r,n){var o=e.call(this,Map)||this;return o.keyType=t,o.valueType=r,o.options=n,o}u(t,e),t.prototype.getTypes=function(){return e.prototype.getTypes.call(this).concat(this.keyType.getTypes(),this.valueType.getTypes())},t.prototype.getCompleteOptions=function(){var e,t;return{shape:null!==(t=null===(e=this.options)||void 0===e?void 0:e.shape)&&void 0!==t?t:0}}}(h);var d=new p((function(){}));const y="/**\n * OpenHPS Protocol Buffer \n * This file was automatically generated with @openhps/protobuf\n * \n * (c) 2019-2023 Maxim Van de Wynckel & Vrije Universiteit Brussel\n **/\n\n",m=y+'syntax = "proto3";\n\nextend google.protobuf.EnumValueOptions {\n\toptional string className = 1;\n\toptional string packageName = 2;\n}\n';class ProtobufGenerator{constructor(e){this.logger=()=>{},this.options=e}static getNumberType(e){switch(e){case n.NumberType.DECIMAL:case n.NumberType.DOUBLE:return"double";case n.NumberType.FLOAT:return"float";case n.NumberType.LONG:return"int64";case n.NumberType.INTEGER:case n.NumberType.SHORT:return"int32";default:return"string"}}}class ObjectGenerator extends ProtobufGenerator{processObject(e,t){throw new Error("Method not implemented.")}generate(e,t){throw new Error("Method not implemented.")}static typeMapping(e,t,r,o){switch(t.ctor){case String:return{syntax:"string"};case Number:{const t=r.options,n=t?this.getNumberType(t.numberType):"int32";return"string"===n&&o.logLevel>1&&console.warn(c().yellow(`${e.classType.name}[${r.name}] defines a number without specifing a type. This will affect performance.`)),{syntax:n}}case Boolean:return{syntax:"bool"};case Array:{const n=this.typeMapping(e,t.elementType,r,o);return{syntax:`repeated ${n.syntax}`,types:[n]}}case Map:{const n=this.typeMapping(e,t.keyType,r,o),i=this.typeMapping(e,t.valueType,r,o);if(void 0===n||void 0===i)return;return{syntax:`map<${n.syntax},${i.syntax}>`,types:[i,n]}}case Set:case Object:case Function:return;case Buffer:case Uint8Array:return{syntax:"bytes"};default:{const i=n.DataSerializerUtils.getOwnMetadata(t.ctor);if(i){if(i.knownTypes.size>1&&i.protobuf.generator.type&&i.protobuf.generator.type!==e.classType)return this.typeMapping(n.DataSerializerUtils.getOwnMetadata(i.protobuf.generator.type),t,r,o);if(i.knownTypes.size>1&&!i.protobuf.generator.type&&r&&(o.useAnyType||!i.protobuf.generator.allowOverride))return{syntax:"google.protobuf.Any"};{const e=t.ctor.prototype._module?t.ctor.prototype._module:"@openhps/core";return{syntax:t.ctor.name,package:e}}}return{syntax:"google.protobuf.Any"}}}}static processObject(e,t){var r,o;e.protobuf=null!==(r=e.protobuf)&&void 0!==r?r:{generator:{subModules:new Set,subTypes:[],allowOverride:!0}};const i=e.dataMembers;if(e.knownTypes.size>1){const r=[],s=new Set,a=n.SerializationUtils.cloneDeep(i);e.knownTypes.forEach((t=>{const o=n.DataSerializerUtils.getOwnMetadata(t).dataMembers;s.add(t.prototype._module),t!==e.classType&&t.prototype instanceof e.classType&&r.push(t),o.forEach(((t,r)=>{var o,s,c,l,u,f,p;if(t.options=null!==(o=t.options)&&void 0!==o?o:{},t.options.protobuf=null!==(s=t.options.protobuf)&&void 0!==s?s:{},i.has(r)){if(i.get(r).type().ctor!==t.type().ctor){const r=a.get(t.key);e.protobuf.generator.allowOverride=!1,r.options=null!==(c=r.options)&&void 0!==c?c:{},r.options.protobuf=null!==(l=r.options.protobuf)&&void 0!==l?l:{subMembers:new Map};const n=null!==(u=r.options.protobuf.subMembers)&&void 0!==u?u:new Map,o=t.name+"_"+t.type().ctor.name.toLowerCase();n.set(o,t),t.options=null!==(f=t.options)&&void 0!==f?f:{},t.options.protobuf=null!==(p=t.options.protobuf)&&void 0!==p?p:{},t.options.protobuf.name=o}}else{const e=n.SerializationUtils.cloneDeep(t);e.options.protobuf={optional:!0,subMembers:new Map},a.set(r,e)}}))})),e.protobuf.generator.subTypes=r,e.protobuf.generator.subModules=s,r.length>0&&(1===s.size||!t.useAnyType)&&(e.protobuf.generator.dataMembers=a,e.protobuf.generator.type=null!==(o=e.protobuf.generator.type)&&void 0!==o?o:e.classType,r.forEach((t=>{var r;const o=n.DataSerializerUtils.getOwnMetadata(t);o.protobuf=null!==(r=o.protobuf)&&void 0!==r?r:{generator:{}},o.protobuf.generator.type=e.classType})))}}static createProtoMessage(e,t){var r;const o=n.DataSerializerUtils.getRootMetadata(e.classType),i=null!==(r=e.protobuf.generator.dataMembers)&&void 0!==r?r:e.dataMembers,s=e.classType.prototype._module?e.classType.prototype._module:"@openhps/core",a=[];let c;if(e.knownTypes.size>1&&e.protobuf.generator.subTypes.length>0&&(1===e.protobuf.generator.subModules.size||!t.useAnyType)&&(a.push('import "../../common.proto";'),c=`\nenum ${e.classType.name}Type {\n\tUNSPECIFIED = 0;\n`+[e.classType,...e.protobuf.generator.subTypes].map((e=>`\t${e.name.replace(/(?:^|\.?)(([A-Z0-9][a-z0-9]|$)|([0-9]+[A-Z]))/g,((e,t)=>"_"+t)).replace(/(^_)|(_$)/g,"").toUpperCase()} = ${Array.from(o.knownTypes.values()).indexOf(e)+1} [\n\t\t(className) = "${e.name}",\n\t\t(packageName) = "${e.prototype._module}"\n\t]`)).join(";\n")+";\n}\n"),o.classType!==e.classType){const e=this.typeMapping(o,new n.ConcreteTypeDescriptor(o.classType),void 0,t);e.package&&e.package===s?a.push(`import "${e.syntax}.proto";`):e.package&&a.push(`import "../../${e.package}/${e.syntax}.proto";`)}let l=1;const u=Array.from(i.values()).map((r=>{var n;const o=r.options&&r.options.protobuf?r.options.protobuf:{};let i;const c=null!==(n=o.name)&&void 0!==n?n:r.name;if("uid"===c)i={syntax:"oneof",types:[{syntax:"string",name:"uid_string"},{syntax:"bytes",name:"uid_bytes"}]};else if(r.type()===d)i=o.subMembers&&o.subMembers.size>0?{syntax:"oneof",types:[...Array.from(o.subMembers.keys()).map((r=>{const n=o.subMembers.get(r),i=this.typeMapping(e,n.type(),n,t);return i.name=r,i})),{syntax:"google.protobuf.Any",name:c+"_any"}]}:{syntax:"google.protobuf.Any"};else{if(r.serializer&&void 0===r.type)return;i=this.typeMapping(e,r.type(),r,t)}if(i)return i.package&&i.package===s?a.push(`import "${i.syntax}.proto";`):i.package?a.push(`import "../../${i.package}/${i.syntax}.proto";`):"google.protobuf.Any"===i.syntax&&a.push('import "google/protobuf/any.proto";'),i.types&&i.types.forEach((e=>{e.package&&e.package===s?a.push(`import "${e.syntax}.proto";`):e.package?a.push(`import "../../${e.package}/${e.syntax}.proto";`):"google.protobuf.Any"===e.syntax&&a.push('import "google/protobuf/any.proto";')})),"oneof"===i.syntax?`\toneof ${c} {\n`+i.types.map((e=>`\t\t${e.syntax} ${e.name} = ${l++}`)).join(";\n")+";\n\t}":`\t${!o.optional||i.syntax.includes("<")||i.syntax.includes("repeated")?"":"optional "}${i.syntax} ${c} = ${l++};`})).filter((e=>void 0!==e));return[s,y+`package ${s.replace("@","").replace("/",".")};\nsyntax = "proto3";\n`+a.filter(((e,t)=>a.indexOf(e)===t)).join("\n")+"\n"+(c||"")+`\nmessage ${e.classType.name} {\n`+(o.protobuf.generator.type?`\t${o.protobuf.generator.type.name}Type _type = 0;\n`:"")+u.join("\n")+"\n}\n"]}}var g=r(1605),v=r(9439);class ProjectGenerator extends n.DataSerializer{static findModule(e){const t=v.join(e,"package.json");if(g.existsSync(t)){return JSON.parse(g.readFileSync(t,{encoding:"utf-8"})).name}{const t=e.split(v.sep);return t.pop(),this.findModule(t.join(v.sep))}}static loadModules(e,t=r.c[r.s]){void 0!==t?(this._modules.add(t.id),Object.keys(t.exports).forEach((n=>{const o=t.exports[n];e.includes(o)&&(o.prototype._module=this.findModule(v.dirname(r(1521).resolve(t.id))),this._packages.add(o.prototype._module))})),t.children.forEach((t=>{this._modules.has(t.id)||this.loadModules(e,t)}))):Object.values(r.c).map((t=>this.loadModules(e,t)))}static getPackages(){return 0===this._packages.size&&this.loadClasses(),Array.from(this._packages.values())}static loadClasses(){const e=[];return this.knownTypes.forEach((t=>{const r=n.DataSerializerUtils.getOwnMetadata(t);r&&e.push(r)})),this.loadModules(e.map((e=>e.classType))),e}static generateProtoMessages(e){return new Promise((t=>{const r=new Map,n=this.loadClasses();n.forEach((t=>{ObjectGenerator.processObject(t,e)})),n.forEach((t=>{e.logLevel>2&&console.log(c().italic(`Generating ${t.classType.name}`,t.classType.prototype._module?`of module ${t.classType.prototype._module}`:""));const n=ObjectGenerator.createProtoMessage(t,e);r.set(t.classType.name,n)})),t(r)}))}static buildProject(e,t={}){return new Promise(((r,n)=>{g.existsSync(e)&&g.rmSync(e,{recursive:!0}),g.mkdirSync(e,{recursive:!0}),t.logLevel>0&&(console.log("Generating protocol buffer messages ..."),console.log("Use of any types = ",t.useAnyType)),ProjectGenerator.generateProtoMessages(t).then((n=>{t.logLevel>0&&console.log("Saving generating protocol buffer messages ..."),n.forEach(((t,r)=>{const n=v.join(e,...t[0].split("."));g.existsSync(n)||g.mkdirsSync(n),g.writeFileSync(v.join(n,r+".proto"),t[1],{encoding:"utf-8"})})),g.writeFileSync(v.join(e,"common.proto"),m,{encoding:"utf-8"}),r(n.size)})).catch(n)}))}}ProjectGenerator._modules=new Set,ProjectGenerator._packages=new Set;"object"==typeof Reflect&&Reflect.getMetadata;function b(e){return"string"==typeof e.name?e.name:"undefined"}var w="__typedJsonJsonObjectMetadataInformation__",k=function(){function e(e){this.dataMembers=new Map,this.knownTypes=new Set,this.knownTypesDeferred=[],this.isExplicitlyMarked=!1,this.isHandledWithoutAnnotation=!1,this.classType=e}return e.getJsonObjectName=function(t){var r=e.getFromConstructor(t);return b(void 0===r?t:r.classType)},e.getFromConstructor=function(t){var r=t.prototype;if(null!=r){var n;if(Object.prototype.hasOwnProperty.call(r,w)&&(n=r[w]),!0===(null==n?void 0:n.isExplicitlyMarked))return n;if(e.doesHandleWithoutAnnotation(t)){var o=new e(t);return o.isExplicitlyMarked=!0,o}}},e.ensurePresentInPrototype=function(t){if(Object.prototype.hasOwnProperty.call(t,w))return t[w];var r=new e(t.constructor),n=t[w];return void 0!==n&&(n.dataMembers.forEach((function(e,t){r.dataMembers.set(t,e)})),n.knownTypes.forEach((function(e){r.knownTypes.add(e)})),r.typeResolver=n.typeResolver,r.typeHintEmitter=n.typeHintEmitter),Object.defineProperty(t,w,{enumerable:!1,configurable:!1,writable:!1,value:r}),r},e.getKnownTypeNameFromType=function(t){var r=e.getFromConstructor(t);return b(void 0===r?t:r.classType)},e.doesHandleWithoutAnnotation=function(e){return-1!==[Date,Number,String,Boolean].indexOf(e)||function(e){return-1!==[Float32Array,Float64Array,Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array].indexOf(e)}(e)||e===DataView||e===ArrayBuffer},e.prototype.processDeferredKnownTypes=function(){var e=this;this.knownTypesDeferred.forEach((function(t){t().getTypes().forEach((function(t){return e.knownTypes.add(t)}))})),this.knownTypesDeferred=[]},e}();class InternalProtobufDeserializer extends n.Deserializer{constructor(){super(),InternalProtobufDeserializer.primitiveWrapper=new i.Type("PrimitiveWrapperMessage"),InternalProtobufDeserializer.primitiveWrapper.add(new i.Field("value",1,"string")),this.setDeserializationStrategy(Number,(e=>"number"==typeof e?e:"string"==typeof e?Number(e):e.toNumber?e.toNumber():e)),this.setDeserializationStrategy(Map,((e,t,r,n,o,i,s)=>{const a=new Map;return Object.keys(e).forEach((c=>{a.set(c,o.convertSingleValue(e[c],t.valueType,r,n,i,s))})),a}))}convertSingleValue(e,t,r,o,i,s){if(this.retrievePreserveNull(i)&&null===e)return null;if(!n.TypedJSON.utils.isValueDefined(e))return;const a=this.deserializationStrategy.get(t.ctor);if(void 0!==a)return a(e,t,r,o,this,i,s);if("object"==typeof e)return this.convertAsObject(e,t,r,o,this,i,s);let c=`Could not deserialize '${o}'; don't know how to deserialize type`;t.hasFriendlyName()&&(c+=` '${t.ctor.name}'`),this.errorHandler(new TypeError(`${c}.`))}convertAsObject(e,t,r,o,i,s,a){let c=t.ctor,l=k.getFromConstructor(c);if(e.hasOwnProperty("_type")&&0!==e._type){const t=l.protobuf.enumMapping.get(e._type);if(t){const e=r.get(t);e!==c&&(c=e,l=k.getFromConstructor(c))}}else if(e.type_url&&e.value){const t=a.types.get(e.type_url).decode(e.value);return this.convertAsObject(t,new n.ConcreteTypeDescriptor(r.get(e.type_url)),r,o,i,s,a)}const u=l,f={};u.dataMembers.forEach(((t,o)=>{var s;const c=`${n.TypedJSON.utils.nameof(u.classType)}.${o}`,l=n.TypedJSON.options.mergeOptions(u.options,t.options),p=null!==(s=l&&l.protobuf?l.protobuf.name:t.name)&&void 0!==s?s:t.name,h=e[p];let y;if("uid"===t.name)if(e.hasOwnProperty("uid_bytes")&&e.uid_bytes.byteLength>0)y=n.UUID.fromBuffer(e.uid_bytes).toString();else{if(!e.hasOwnProperty("uid_string"))return;y=e.uid_string}else{if(!e.hasOwnProperty(p)||!h)return;if(t.type()===d&&h.type_url){const t=a.types.get(e[p].type_url);if(t){const e=t.decode(h.value);y=i.convertSingleValue(e,new n.ConcreteTypeDescriptor(r.get(h.type_url)),r,c,l,a)}else if(h.value){const e=InternalProtobufDeserializer.primitiveWrapper.decode(h.value);switch(h.type_url){case"Boolean":y=Boolean(e.value);break;case"Number":y=Number(e.value);break;default:y=e.value}}}else y=i.convertSingleValue(h,t.type(),r,c,l,a)}n.TypedJSON.utils.isValueDefined(y)&&(f[t.key]=y)}));const p=i.instantiateType(c);Object.assign(p,f);const h=l.onDeserializedMethodName;return null!=h&&("function"==typeof p[h]?p[h]():"function"==typeof p.constructor[h]?p.constructor[h]():i.getErrorHandler()(new TypeError(`onDeserialized callback'${n.TypedJSON.utils.nameof(l.classType)}.${h}' is not a method.`))),p}}class InternalProtobufSerializer extends n.Serializer{constructor(){super(),this.setSerializationStrategy(Map,this.convertAsMap.bind(this)),InternalProtobufSerializer.primitiveWrapper=new i.Type("PrimitiveWrapperMessage"),InternalProtobufSerializer.primitiveWrapper.add(new i.Field("value",1,"string"))}convertSingleValue(e,t,r,o,i){if(!n.TypedJSON.utils.isValueDefined(e))return;if(!n.TypedJSON.utils.isInstanceOf(e,t.ctor)){const o=n.TypedJSON.utils.nameof(t.ctor),i=n.TypedJSON.utils.nameof(e.constructor);return void this.errorHandler(new TypeError(`Could not serialize '${r}': expected '${o}', got '${i}'.`))}const s=this.serializationStrategy.get(t.ctor);if(void 0!==s)return s(e,t,r,this,o,i);if("object"==typeof e)return this.convertAsObject(e,t,r,this,o,i);let a=`Could not serialize '${r}'; don't know how to serialize type`;t.hasFriendlyName()&&(a+=` '${t.ctor.name}'`),this.errorHandler(new TypeError(`${a}.`))}convertAsObject(e,t,r,o,i,s){const a=k.getFromConstructor(t.ctor);let c,l=k.getFromConstructor(e.constructor);l||(l=a);const u=l;c={};const f=n.TypedJSON.options.mergeOptions(o.options,u.options);u.dataMembers.forEach((t=>{var r;const o=n.TypedJSON.options.mergeOptions(f,t.options);let i,a=null!==(r=o&&o.protobuf?o.protobuf.name:t.name)&&void 0!==r?r:t.name;if(void 0!==e[t.key]){if(null==t.type)throw new TypeError(`Could not serialize ${t.name}, there is no constructor nor serialization function to use.`);if("uid"===t.name){const r=n.UUID.fromString(e[t.key]);r?(i=r.toBuffer(),a+="_bytes"):(i=e[t.key],a+="_string")}else{const r=l.protobuf.messageType.get(t.name);i=this.convertSingleValue(e[t.key],t.type(),`${n.TypedJSON.utils.nameof(u.classType)}.${t.key}`,o,Object.assign(Object.assign({},s),{field:r}))}if(n.TypedJSON.utils.isValueDefined(i)){if(t.type()===d){const r=s.types.get(e[t.key].constructor.name);if(r){const n=r.create(i);i={type_url:e[t.key].constructor.name,value:r.encode(n).finish()}}else{const r=InternalProtobufSerializer.primitiveWrapper.create({value:String(e[t.key])});i={type_url:e[t.key].constructor.name,value:InternalProtobufSerializer.primitiveWrapper.encode(r).finish()}}}c[a]=i}}}));const p=s.field&&"google.protobuf.Any"===s.field.type;if(!p&&a.knownTypes.size>1){const e=l.protobuf.messageType.create(Object.assign(Object.assign({},c),{_type:l.protobuf.messageTypeEnum}));c=e}else if(p){const t=l.protobuf.messageType,r=t.create(c);c={type_url:e.constructor.name,value:t.encode(r).finish()}}return c}convertAsMap(e,t,r,n,o,i){const s={};return e.forEach(((e,a)=>{s[a]=n.convertSingleValue(e,t.valueType,r,o,i)})),s}}class ProtobufSerializer extends n.DataSerializer{static getFiles(e,t=[]){if(!s.statSync(e).isDirectory())return[];const r=s.readdirSync(o.normalize(e));for(const n of r){const r=`${e}/${n}`;s.statSync(r).isDirectory()?this.getFiles(r,t):r.endsWith(".proto")&&t.push(o.normalize(r))}return t}static initialize(e){return new Promise(((t,r)=>{ProtobufSerializer.root=new i.Root,Promise.resolve(e?Promise.resolve():ProjectGenerator.buildProject(o.resolve("tmp"))).then((()=>{const t=this.getFiles(o.resolve(null!=e?e:"tmp")),s=new Promise((e=>{ProtobufSerializer.root.load(t,{keepCase:!0}).then((()=>{t.forEach((e=>{const t=o.parse(e).name;if(this.knownTypes.get(t)){const e=n.DataSerializerUtils.getOwnMetadata(this.knownTypes.get(t)),r=n.DataSerializerUtils.getRootMetadata(this.knownTypes.get(t)),o=ProtobufSerializer.root.lookupType(t);let i;const s=new Map;try{const e=ProtobufSerializer.root.lookupEnum(`${r.classType.name}Type`);Object.keys(e.values).forEach(((r,n)=>{if(0===n)return;e.valuesOptions[r]["(className)"]===t&&(i=e.values[r]),s.set(e.values[r],e.valuesOptions[r]["(className)"])}))}catch(e){}e.protobuf={messageType:o,messageTypeEnum:i,enumMapping:s},this.options.types.set(t,o)}})),e()})).catch((e=>r(e)))}));return this.wrapperMessage=new i.Type("WrapperMessage"),this.wrapperMessage.add(new i.Field("data",1,"google.protobuf.Any")),this.wrapperMessage.addJSON(i.common["google/protobuf/any.proto"].nested),s})).then((()=>{console.log(ProtobufSerializer.root.toJSON()),t()})).catch(r)}))}static serialize(e,t){const r=super.serialize(e,Object.assign(Object.assign({},this.options),t)),n=this.options.types.get(e.constructor.name),o=n.fromObject(r),i=this.wrapperMessage.create({data:{type_url:e.constructor.name,value:n.encode(o).finish()}});return this.wrapperMessage.encode(i).finish()}static deserialize(e,t,r){const o=this.wrapperMessage.decode(e),i=o.data.type_url,s=this.options.types.get(i).decode(o.data.value),a=null!=t?t:this.knownTypes.get(i);return this.options.deserializer.convertSingleValue(s,n.DataSerializerUtils.ensureTypeDescriptor(a),n.DataSerializer.knownTypes,void 0,void 0,Object.assign(Object.assign({},r),this.options))}}ProtobufSerializer.options={serializer:new InternalProtobufSerializer,deserializer:new InternalProtobufDeserializer,types:new Map}},8045:e=>{e.exports=function(e,t){var r=new Array(arguments.length-1),n=0,o=2,i=!0;for(;o<arguments.length;)r[n++]=arguments[o++];return new Promise((function(o,s){r[n]=function(e){if(i)if(i=!1,e)s(e);else{for(var t=new Array(arguments.length-1),r=0;r<t.length;)t[r++]=arguments[r];o.apply(null,t)}};try{e.apply(t||null,r)}catch(e){i&&(i=!1,s(e))}}))}},8839:(e,t)=>{var r=t;r.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var n=new Array(64),o=new Array(123),i=0;i<64;)o[n[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;r.encode=function(e,t,r){for(var o,i=null,s=[],a=0,c=0;t<r;){var l=e[t++];switch(c){case 0:s[a++]=n[l>>2],o=(3&l)<<4,c=1;break;case 1:s[a++]=n[o|l>>4],o=(15&l)<<2,c=2;break;case 2:s[a++]=n[o|l>>6],s[a++]=n[63&l],c=0}a>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,s)),a=0)}return c&&(s[a++]=n[o],s[a++]=61,1===c&&(s[a++]=61)),i?(a&&i.push(String.fromCharCode.apply(String,s.slice(0,a))),i.join("")):String.fromCharCode.apply(String,s.slice(0,a))};var s="invalid encoding";r.decode=function(e,t,r){for(var n,i=r,a=0,c=0;c<e.length;){var l=e.charCodeAt(c++);if(61===l&&a>1)break;if(void 0===(l=o[l]))throw Error(s);switch(a){case 0:n=l,a=1;break;case 1:t[r++]=n<<2|(48&l)>>4,n=l,a=2;break;case 2:t[r++]=(15&n)<<4|(60&l)>>2,n=l,a=3;break;case 3:t[r++]=(3&n)<<6|l,a=0}}if(1===a)throw Error(s);return r-i},r.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},8561:e=>{function t(e,r){"string"==typeof e&&(r=e,e=void 0);var n=[];function o(e){if("string"!=typeof e){var r=i();if(t.verbose&&console.log("codegen: "+r),r="return "+r,e){for(var s=Object.keys(e),a=new Array(s.length+1),c=new Array(s.length),l=0;l<s.length;)a[l]=s[l],c[l]=e[s[l++]];return a[l]=r,Function.apply(null,a).apply(null,c)}return Function(r)()}for(var u=new Array(arguments.length-1),f=0;f<u.length;)u[f]=arguments[++f];if(f=0,e=e.replace(/%([%dfijs])/g,(function(e,t){var r=u[f++];switch(t){case"d":case"f":return String(Number(r));case"i":return String(Math.floor(r));case"j":return JSON.stringify(r);case"s":return String(r)}return"%"})),f!==u.length)throw Error("parameter count mismatch");return n.push(e),o}function i(t){return"function "+(t||r||"")+"("+(e&&e.join(",")||"")+"){\n "+n.join("\n ")+"\n}"}return o.toString=i,o}e.exports=t,t.verbose=!1},4358:e=>{function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],n=0;n<r.length;)r[n].fn===t?r.splice(n,1):++n;return this},t.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},5212:(e,t,r)=>{e.exports=i;var n=r(8045),o=r(4153)("fs");function i(e,t,r){return"function"==typeof t?(r=t,t={}):t||(t={}),r?!t.xhr&&o&&o.readFile?o.readFile(e,(function(n,o){return n&&"undefined"!=typeof XMLHttpRequest?i.xhr(e,t,r):n?r(n):r(null,t.binary?o:o.toString("utf8"))})):i.xhr(e,t,r):n(i,this,e,t)}i.xhr=function(e,t,r){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===n.readyState){if(0!==n.status&&200!==n.status)return r(Error("status "+n.status));if(t.binary){var e=n.response;if(!e){e=[];for(var o=0;o<n.responseText.length;++o)e.push(255&n.responseText.charCodeAt(o))}return r(null,"undefined"!=typeof Uint8Array?new Uint8Array(e):e)}return r(null,n.responseText)}},t.binary&&("overrideMimeType"in n&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.responseType="arraybuffer"),n.open("GET",e),n.send()}},9410:e=>{function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),n=128===r[3];function o(e,n,o){t[0]=e,n[o]=r[0],n[o+1]=r[1],n[o+2]=r[2],n[o+3]=r[3]}function i(e,n,o){t[0]=e,n[o]=r[3],n[o+1]=r[2],n[o+2]=r[1],n[o+3]=r[0]}function s(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],t[0]}function a(e,n){return r[3]=e[n],r[2]=e[n+1],r[1]=e[n+2],r[0]=e[n+3],t[0]}e.writeFloatLE=n?o:i,e.writeFloatBE=n?i:o,e.readFloatLE=n?s:a,e.readFloatBE=n?a:s}():function(){function t(e,t,r,n){var o=t<0?1:0;if(o&&(t=-t),0===t)e(1/t>0?0:2147483648,r,n);else if(isNaN(t))e(2143289344,r,n);else if(t>34028234663852886e22)e((o<<31|2139095040)>>>0,r,n);else if(t<11754943508222875e-54)e((o<<31|Math.round(t/1401298464324817e-60))>>>0,r,n);else{var i=Math.floor(Math.log(t)/Math.LN2);e((o<<31|i+127<<23|8388607&Math.round(t*Math.pow(2,-i)*8388608))>>>0,r,n)}}function s(e,t,r){var n=e(t,r),o=2*(n>>31)+1,i=n>>>23&255,s=8388607&n;return 255===i?s?NaN:o*(1/0):0===i?1401298464324817e-60*o*s:o*Math.pow(2,i-150)*(s+8388608)}e.writeFloatLE=t.bind(null,r),e.writeFloatBE=t.bind(null,n),e.readFloatLE=s.bind(null,o),e.readFloatBE=s.bind(null,i)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=128===r[7];function o(e,n,o){t[0]=e,n[o]=r[0],n[o+1]=r[1],n[o+2]=r[2],n[o+3]=r[3],n[o+4]=r[4],n[o+5]=r[5],n[o+6]=r[6],n[o+7]=r[7]}function i(e,n,o){t[0]=e,n[o]=r[7],n[o+1]=r[6],n[o+2]=r[5],n[o+3]=r[4],n[o+4]=r[3],n[o+5]=r[2],n[o+6]=r[1],n[o+7]=r[0]}function s(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],r[4]=e[n+4],r[5]=e[n+5],r[6]=e[n+6],r[7]=e[n+7],t[0]}function a(e,n){return r[7]=e[n],r[6]=e[n+1],r[5]=e[n+2],r[4]=e[n+3],r[3]=e[n+4],r[2]=e[n+5],r[1]=e[n+6],r[0]=e[n+7],t[0]}e.writeDoubleLE=n?o:i,e.writeDoubleBE=n?i:o,e.readDoubleLE=n?s:a,e.readDoubleBE=n?a:s}():function(){function t(e,t,r,n,o,i){var s=n<0?1:0;if(s&&(n=-n),0===n)e(0,o,i+t),e(1/n>0?0:2147483648,o,i+r);else if(isNaN(n))e(0,o,i+t),e(2146959360,o,i+r);else if(n>17976931348623157e292)e(0,o,i+t),e((s<<31|2146435072)>>>0,o,i+r);else{var a;if(n<22250738585072014e-324)e((a=n/5e-324)>>>0,o,i+t),e((s<<31|a/4294967296)>>>0,o,i+r);else{var c=Math.floor(Math.log(n)/Math.LN2);1024===c&&(c=1023),e(4503599627370496*(a=n*Math.pow(2,-c))>>>0,o,i+t),e((s<<31|c+1023<<20|1048576*a&1048575)>>>0,o,i+r)}}}function s(e,t,r,n,o){var i=e(n,o+t),s=e(n,o+r),a=2*(s>>31)+1,c=s>>>20&2047,l=4294967296*(1048575&s)+i;return 2047===c?l?NaN:a*(1/0):0===c?5e-324*a*l:a*Math.pow(2,c-1075)*(l+4503599627370496)}e.writeDoubleLE=t.bind(null,r,0,4),e.writeDoubleBE=t.bind(null,n,4,0),e.readDoubleLE=s.bind(null,o,0,4),e.readDoubleBE=s.bind(null,i,4,0)}(),e}function r(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function n(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function o(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function i(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},4153:module=>{function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},9207:(e,t)=>{var r=t,n=r.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},o=r.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),r=n(e),o="";r&&(o=t.shift()+"/");for(var i=0;i<t.length;)".."===t[i]?i>0&&".."!==t[i-1]?t.splice(--i,2):r?t.splice(i,1):++i:"."===t[i]?t.splice(i,1):++i;return o+t.join("/")};r.resolve=function(e,t,r){return r||(t=o(t)),n(t)?t:(r||(e=o(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?o(e+"/"+t):t)}},9390:e=>{e.exports=function(e,t,r){var n=r||8192,o=n>>>1,i=null,s=n;return function(r){if(r<1||r>o)return e(r);s+r>n&&(i=e(n),s=0);var a=t.call(i,s,s+=r);return 7&s&&(s=1+(7|s)),a}}},1447:(e,t)=>{var r=t;r.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)(r=e.charCodeAt(n))<128?t+=1:r<2048?t+=2:55296==(64512&r)&&56320==(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},r.read=function(e,t,r){if(r-t<1)return"";for(var n,o=null,i=[],s=0;t<r;)(n=e[t++])<128?i[s++]=n:n>191&&n<224?i[s++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,i[s++]=55296+(n>>10),i[s++]=56320+(1023&n)):i[s++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],s>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),s=0);return o?(s&&o.push(String.fromCharCode.apply(String,i.slice(0,s))),o.join("")):String.fromCharCode.apply(String,i.slice(0,s))},r.write=function(e,t,r){for(var n,o,i=r,s=0;s<e.length;++s)(n=e.charCodeAt(s))<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=63&n|128):55296==(64512&n)&&56320==(64512&(o=e.charCodeAt(s+1)))?(n=65536+((1023&n)<<10)+(1023&o),++s,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-i}},4083:(e,t,r)=>{e=r.nmd(e);const n=(e,t)=>(...r)=>`[${e(...r)+t}m`,o=(e,t)=>(...r)=>{const n=e(...r);return`[${38+t};5;${n}m`},i=(e,t)=>(...r)=>{const n=e(...r);return`[${38+t};2;${n[0]};${n[1]};${n[2]}m`},s=e=>e,a=(e,t,r)=>[e,t,r],c=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{const n=r();return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})};let l;const u=(e,t,n,o)=>{void 0===l&&(l=r(248));const i=o?10:0,s={};for(const[r,o]of Object.entries(l)){const a="ansi16"===r?"ansi":r;r===t?s[a]=e(n,i):"object"==typeof o&&(s[a]=e(o[t],i))}return s};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(const[r,n]of Object.entries(t)){for(const[r,o]of Object.entries(n))t[r]={open:`[${o[0]}m`,close:`[${o[1]}m`},n[r]=t[r],e.set(o[0],o[1]);Object.defineProperty(t,r,{value:n,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="[39m",t.bgColor.close="[49m",c(t.color,"ansi",(()=>u(n,"ansi16",s,!1))),c(t.color,"ansi256",(()=>u(o,"ansi256",s,!1))),c(t.color,"ansi16m",(()=>u(i,"rgb",a,!1))),c(t.bgColor,"ansi",(()=>u(n,"ansi16",s,!0))),c(t.bgColor,"ansi256",(()=>u(o,"ansi256",s,!0))),c(t.bgColor,"ansi16m",(()=>u(i,"rgb",a,!0))),t}})},4389:(e,t,r)=>{const n=r(8156),o={};for(const e of Object.keys(n))o[n[e]]=e;const i={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=i;for(const e of Object.keys(i)){if(!("channels"in i[e]))throw new Error("missing channels property: "+e);if(!("labels"in i[e]))throw new Error("missing channel labels property: "+e);if(i[e].labels.length!==i[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=i[e];delete i[e].channels,delete i[e].labels,Object.defineProperty(i[e],"channels",{value:t}),Object.defineProperty(i[e],"labels",{value:r})}i.rgb.hsl=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(t,r,n),i=Math.max(t,r,n),s=i-o;let a,c;i===o?a=0:t===i?a=(r-n)/s:r===i?a=2+(n-t)/s:n===i&&(a=4+(t-r)/s),a=Math.min(60*a,360),a<0&&(a+=360);const l=(o+i)/2;return c=i===o?0:l<=.5?s/(i+o):s/(2-i-o),[a,100*c,100*l]},i.rgb.hsv=function(e){let t,r,n,o,i;const s=e[0]/255,a=e[1]/255,c=e[2]/255,l=Math.max(s,a,c),u=l-Math.min(s,a,c),f=function(e){return(l-e)/6/u+.5};return 0===u?(o=0,i=0):(i=u/l,t=f(s),r=f(a),n=f(c),s===l?o=n-r:a===l?o=1/3+t-n:c===l&&(o=2/3+r-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*i,100*l]},i.rgb.hwb=function(e){const t=e[0],r=e[1];let n=e[2];const o=i.rgb.hsl(e)[0],s=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[o,100*s,100*n]},i.rgb.cmyk=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.min(1-t,1-r,1-n);return[100*((1-t-o)/(1-o)||0),100*((1-r-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*o]},i.rgb.keyword=function(e){const t=o[e];if(t)return t;let r,i=1/0;for(const t of Object.keys(n)){const o=n[t],c=(a=o,((s=e)[0]-a[0])**2+(s[1]-a[1])**2+(s[2]-a[2])**2);c<i&&(i=c,r=t)}var s,a;return r},i.keyword.rgb=function(e){return n[e]},i.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;return[100*(.4124*t+.3576*r+.1805*n),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]},i.rgb.lab=function(e){const t=i.rgb.xyz(e);let r=t[0],n=t[1],o=t[2];r/=95.047,n/=100,o/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;return[116*n-16,500*(r-n),200*(n-o)]},i.hsl.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;let o,i,s;if(0===r)return s=255*n,[s,s,s];o=n<.5?n*(1+r):n+r-n*r;const a=2*n-o,c=[0,0,0];for(let e=0;e<3;e++)i=t+1/3*-(e-1),i<0&&i++,i>1&&i--,s=6*i<1?a+6*(o-a)*i:2*i<1?o:3*i<2?a+(o-a)*(2/3-i)*6:a,c[e]=255*s;return c},i.hsl.hsv=function(e){const t=e[0];let r=e[1]/100,n=e[2]/100,o=r;const i=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,o*=i<=1?i:2-i;return[t,100*(0===n?2*o/(i+o):2*r/(n+r)),100*((n+r)/2)]},i.hsv.rgb=function(e){const t=e[0]/60,r=e[1]/100;let n=e[2]/100;const o=Math.floor(t)%6,i=t-Math.floor(t),s=255*n*(1-r),a=255*n*(1-r*i),c=255*n*(1-r*(1-i));switch(n*=255,o){case 0:return[n,c,s];case 1:return[a,n,s];case 2:return[s,n,c];case 3:return[s,a,n];case 4:return[c,s,n];case 5:return[n,s,a]}},i.hsv.hsl=function(e){const t=e[0],r=e[1]/100,n=e[2]/100,o=Math.max(n,.01);let i,s;s=(2-r)*n;const a=(2-r)*o;return i=r*o,i/=a<=1?a:2-a,i=i||0,s/=2,[t,100*i,100*s]},i.hwb.rgb=function(e){const t=e[0]/360;let r=e[1]/100,n=e[2]/100;const o=r+n;let i;o>1&&(r/=o,n/=o);const s=Math.floor(6*t),a=1-n;i=6*t-s,1&s&&(i=1-i);const c=r+i*(a-r);let l,u,f;switch(s){default:case 6:case 0:l=a,u=c,f=r;break;case 1:l=c,u=a,f=r;break;case 2:l=r,u=a,f=c;break;case 3:l=r,u=c,f=a;break;case 4:l=c,u=r,f=a;break;case 5:l=a,u=r,f=c}return[255*l,255*u,255*f]},i.cmyk.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o))]},i.xyz.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100;let o,i,s;return o=3.2406*t+-1.5372*r+-.4986*n,i=-.9689*t+1.8758*r+.0415*n,s=.0557*t+-.204*r+1.057*n,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),s=Math.min(Math.max(0,s),1),[255*o,255*i,255*s]},i.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;return[116*r-16,500*(t-r),200*(r-n)]},i.lab.xyz=function(e){let t,r,n;r=(e[0]+16)/116,t=e[1]/500+r,n=r-e[2]/200;const o=r**3,i=t**3,s=n**3;return r=o>.008856?o:(r-16/116)/7.787,t=i>.008856?i:(t-16/116)/7.787,n=s>.008856?s:(n-16/116)/7.787,t*=95.047,r*=100,n*=108.883,[t,r,n]},i.lab.lch=function(e){const t=e[0],r=e[1],n=e[2];let o;o=360*Math.atan2(n,r)/2/Math.PI,o<0&&(o+=360);return[t,Math.sqrt(r*r+n*n),o]},i.lch.lab=function(e){const t=e[0],r=e[1],n=e[2]/360*2*Math.PI;return[t,r*Math.cos(n),r*Math.sin(n)]},i.rgb.ansi16=function(e,t=null){const[r,n,o]=e;let s=null===t?i.rgb.hsv(e)[2]:t;if(s=Math.round(s/50),0===s)return 30;let a=30+(Math.round(o/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return 2===s&&(a+=60),a},i.hsv.ansi16=function(e){return i.rgb.ansi16(i.hsv.rgb(e),e[2])},i.rgb.ansi256=function(e){const t=e[0],r=e[1],n=e[2];if(t===r&&r===n)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},i.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},i.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},i.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},i.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];3===t[0].length&&(r=r.split("").map((e=>e+e)).join(""));const n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},i.rgb.hcg=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,o=Math.max(Math.max(t,r),n),i=Math.min(Math.min(t,r),n),s=o-i;let a,c;return a=s<1?i/(1-s):0,c=s<=0?0:o===t?(r-n)/s%6:o===r?2+(n-t)/s:4+(t-r)/s,c/=6,c%=1,[360*c,100*s,100*a]},i.hsl.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r);let o=0;return n<1&&(o=(r-.5*n)/(1-n)),[e[0],100*n,100*o]},i.hsv.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=t*r;let o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],100*n,100*o]},i.hcg.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;if(0===r)return[255*n,255*n,255*n];const o=[0,0,0],i=t%1*6,s=i%1,a=1-s;let c=0;switch(Math.floor(i)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=a,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=a,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=a}return c=(1-r)*n,[255*(r*o[0]+c),255*(r*o[1]+c),255*(r*o[2]+c)]},i.hcg.hsv=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);let n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},i.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},i.hcg.hwb=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},i.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,n=r-t;let o=0;return n<1&&(o=(r-n)/(1-n)),[e[0],100*n,100*o]},i.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},i.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},i.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},i.gray.hsl=function(e){return[0,0,e[0]]},i.gray.hsv=i.gray.hsl,i.gray.hwb=function(e){return[0,100,e[0]]},i.gray.cmyk=function(e){return[0,0,0,e[0]]},i.gray.lab=function(e){return[e[0],0,0]},i.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},i.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},248:(e,t,r)=>{const n=r(4389),o=r(7913),i={};Object.keys(n).forEach((e=>{i[e]={},Object.defineProperty(i[e],"channels",{value:n[e].channels}),Object.defineProperty(i[e],"labels",{value:n[e].labels});const t=o(e);Object.keys(t).forEach((r=>{const n=t[r];i[e][r]=function(e){const t=function(...t){const r=t[0];if(null==r)return r;r.length>1&&(t=r);const n=e(t);if("object"==typeof n)for(let e=n.length,t=0;t<e;t++)n[t]=Math.round(n[t]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(n),i[e][r].raw=function(e){const t=function(...t){const r=t[0];return null==r?r:(r.length>1&&(t=r),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(n)}))})),e.exports=i},7913:(e,t,r)=>{const n=r(4389);function o(e){const t=function(){const e={},t=Object.keys(n);for(let r=t.length,n=0;n<r;n++)e[t[n]]={distance:-1,parent:null};return e}(),r=[e];for(t[e].distance=0;r.length;){const e=r.pop(),o=Object.keys(n[e]);for(let n=o.length,i=0;i<n;i++){const n=o[i],s=t[n];-1===s.distance&&(s.distance=t[e].distance+1,s.parent=e,r.unshift(n))}}return t}function i(e,t){return function(r){return t(e(r))}}function s(e,t){const r=[t[e].parent,e];let o=n[t[e].parent][e],s=t[e].parent;for(;t[s].parent;)r.unshift(t[s].parent),o=i(n[t[s].parent][s],o),s=t[s].parent;return o.conversion=r,o}e.exports=function(e){const t=o(e),r={},n=Object.keys(t);for(let e=n.length,o=0;o<e;o++){const e=n[o];null!==t[e].parent&&(r[e]=s(e,t))}return r}},5248:(e,t,r)=>{const n=r(4083),{stdout:o,stderr:i}=r(2747),{stringReplaceAll:s,stringEncaseCRLFWithFirstIndex:a}=r(4058),{isArray:c}=Array,l=["ansi","ansi","ansi256","ansi16m"],u=Object.create(null);class ChalkClass{constructor(e){return f(e)}}const f=e=>{const t={};return((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const r=o?o.level:0;e.level=void 0===t.level?r:t.level})(t,e),t.template=(...e)=>b(t.template,...e),Object.setPrototypeOf(t,p.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=ChalkClass,t.template};function p(e){return f(e)}for(const[e,t]of Object.entries(n))u[e]={get(){const r=m(this,y(t.open,t.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:r}),r}};u.visible={get(){const e=m(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};const h=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const e of h)u[e]={get(){const{level:t}=this;return function(...r){const o=y(n.color[l[t]][e](...r),n.color.close,this._styler);return m(this,o,this._isEmpty)}}};for(const e of h){u["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:t}=this;return function(...r){const o=y(n.bgColor[l[t]][e](...r),n.bgColor.close,this._styler);return m(this,o,this._isEmpty)}}}}const d=Object.defineProperties((()=>{}),{...u,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),y=(e,t,r)=>{let n,o;return void 0===r?(n=e,o=t):(n=r.openAll+e,o=t+r.closeAll),{open:e,close:t,openAll:n,closeAll:o,parent:r}},m=(e,t,r)=>{const n=(...e)=>c(e[0])&&c(e[0].raw)?g(n,b(n,...e)):g(n,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(n,d),n._generator=e,n._styler=t,n._isEmpty=r,n},g=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let r=e._styler;if(void 0===r)return t;const{openAll:n,closeAll:o}=r;if(-1!==t.indexOf(""))for(;void 0!==r;)t=s(t,r.close,r.open),r=r.parent;const i=t.indexOf("\n");return-1!==i&&(t=a(t,o,n,i)),n+t+o};let v;const b=(e,...t)=>{const[n]=t;if(!c(n)||!c(n.raw))return t.join(" ");const o=t.slice(1),i=[n.raw[0]];for(let e=1;e<n.length;e++)i.push(String(o[e-1]).replace(/[{}\\]/g,"\\$&"),String(n.raw[e]));return void 0===v&&(v=r(2991)),v(e,i.join(""))};Object.defineProperties(p.prototype,u);const w=p();w.supportsColor=o,w.stderr=p({level:i?i.level:0}),w.stderr.supportsColor=i,e.exports=w},2991:e=>{const t=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,r=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,n=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,o=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,i=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function s(e){const t="u"===e[0],r="{"===e[1];return t&&!r&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):t&&r?String.fromCodePoint(parseInt(e.slice(2,-1),16)):i.get(e)||e}function a(e,t){const r=[],i=t.trim().split(/\s*,\s*/g);let a;for(const t of i){const i=Number(t);if(Number.isNaN(i)){if(!(a=t.match(n)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);r.push(a[2].replace(o,((e,t,r)=>t?s(t):r)))}else r.push(i)}return r}function c(e){r.lastIndex=0;const t=[];let n;for(;null!==(n=r.exec(e));){const e=n[1];if(n[2]){const r=a(e,n[2]);t.push([e].concat(r))}else t.push([e])}return t}function l(e,t){const r={};for(const e of t)for(const t of e.styles)r[t[0]]=e.inverse?null:t.slice(1);let n=e;for(const[e,t]of Object.entries(r))if(Array.isArray(t)){if(!(e in n))throw new Error(`Unknown Chalk style: ${e}`);n=t.length>0?n[e](...t):n[e]}return n}e.exports=(e,r)=>{const n=[],o=[];let i=[];if(r.replace(t,((t,r,a,u,f,p)=>{if(r)i.push(s(r));else if(u){const t=i.join("");i=[],o.push(0===n.length?t:l(e,n)(t)),n.push({inverse:a,styles:c(u)})}else if(f){if(0===n.length)throw new Error("Found extraneous } in Chalk template literal");o.push(l(e,n)(i.join(""))),i=[],n.pop()}else i.push(p)})),o.push(i.join("")),n.length>0){const e=`Chalk template literal is missing ${n.length} closing bracket${1===n.length?"":"s"} (\`}\`)`;throw new Error(e)}return o.join("")}},4058:e=>{e.exports={stringReplaceAll:(e,t,r)=>{let n=e.indexOf(t);if(-1===n)return e;const o=t.length;let i=0,s="";do{s+=e.substr(i,n-i)+t+r,i=n+o,n=e.indexOf(t,i)}while(-1!==n);return s+=e.substr(i),s},stringEncaseCRLFWithFirstIndex:(e,t,r,n)=>{let o=0,i="";do{const s="\r"===e[n-1];i+=e.substr(o,(s?n-1:n)-o)+t+(s?"\r\n":"\n")+r,o=n+1,n=e.indexOf("\n",o)}while(-1!==n);return i+=e.substr(o),i}}},8156:e=>{e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},3876:(e,t,r)=>{const n=r(1420),o=r(7356),i=r(3798).mkdirsSync,s=r(7211).utimesMillisSync,a=r(6462);function c(e,t,r,i){const s=(i.dereference?n.statSync:n.lstatSync)(t);if(s.isDirectory())return function(e,t,r,o,i){return t?f(r,o,i):function(e,t,r,o){return n.mkdirSync(r),f(t,r,o),u(r,e)}(e.mode,r,o,i)}(s,e,t,r,i);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return function(e,t,r,o,i){return t?function(e,t,r,o){if(o.overwrite)return n.unlinkSync(r),l(e,t,r,o);if(o.errorOnExist)throw new Error(`'${r}' already exists`)}(e,r,o,i):l(e,r,o,i)}(s,e,t,r,i);if(s.isSymbolicLink())return function(e,t,r,i){let s=n.readlinkSync(t);i.dereference&&(s=o.resolve(process.cwd(),s));if(e){let e;try{e=n.readlinkSync(r)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return n.symlinkSync(s,r);throw e}if(i.dereference&&(e=o.resolve(process.cwd(),e)),a.isSrcSubdir(s,e))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${e}'.`);if(a.isSrcSubdir(e,s))throw new Error(`Cannot overwrite '${e}' with '${s}'.`);return function(e,t){return n.unlinkSync(t),n.symlinkSync(e,t)}(s,r)}return n.symlinkSync(s,r)}(e,t,r,i);if(s.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);if(s.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}function l(e,t,r,o){return n.copyFileSync(t,r),o.preserveTimestamps&&function(e,t,r){(function(e){return!(128&e)})(e)&&function(e,t){u(e,128|t)}(r,e);(function(e,t){const r=n.statSync(e);s(t,r.atime,r.mtime)})(t,r)}(e.mode,t,r),u(r,e.mode)}function u(e,t){return n.chmodSync(e,t)}function f(e,t,r){n.readdirSync(e).forEach((n=>function(e,t,r,n){const i=o.join(t,e),s=o.join(r,e);if(n.filter&&!n.filter(i,s))return;const{destStat:l}=a.checkPathsSync(i,s,"copy",n);return c(l,i,s,n)}(n,e,t,r)))}e.exports=function(e,t,r){"function"==typeof r&&(r={filter:r}),(r=r||{}).clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0002");const{srcStat:s,destStat:l}=a.checkPathsSync(e,t,"copy",r);if(a.checkParentPathsSync(e,s,t,"copy"),r.filter&&!r.filter(e,t))return;const u=o.dirname(t);return n.existsSync(u)||i(u),c(l,e,t,r)}},4994:(e,t,r)=>{const n=r(8737),o=r(7356),{mkdirs:i}=r(3798),{pathExists:s}=r(9288),{utimesMillis:a}=r(7211),c=r(6462);async function l(e,t,r){return!r.filter||r.filter(e,t)}async function u(e,t,r,i){const s=i.dereference?n.stat:n.lstat,a=await s(t);if(a.isDirectory())return async function(e,t,r,i,s){t||await n.mkdir(i);const a=await n.readdir(r);await Promise.all(a.map((async e=>{const t=o.join(r,e),n=o.join(i,e);if(!await l(t,n,s))return;const{destStat:a}=await c.checkPaths(t,n,"copy",s);return u(a,t,n,s)}))),t||await n.chmod(i,e.mode)}(a,e,t,r,i);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return async function(e,t,r,o,i){if(!t)return f(e,r,o,i);if(i.overwrite)return await n.unlink(o),f(e,r,o,i);if(i.errorOnExist)throw new Error(`'${o}' already exists`)}(a,e,t,r,i);if(a.isSymbolicLink())return async function(e,t,r,i){let s=await n.readlink(t);i.dereference&&(s=o.resolve(process.cwd(),s));if(!e)return n.symlink(s,r);let a=null;try{a=await n.readlink(r)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return n.symlink(s,r);throw e}i.dereference&&(a=o.resolve(process.cwd(),a));if(c.isSrcSubdir(s,a))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${a}'.`);if(c.isSrcSubdir(a,s))throw new Error(`Cannot overwrite '${a}' with '${s}'.`);return await n.unlink(r),n.symlink(s,r)}(e,t,r,i);if(a.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);if(a.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}async function f(e,t,r,o){if(await n.copyFile(t,r),o.preserveTimestamps){128&e.mode||await function(e,t){return n.chmod(e,128|t)}(r,e.mode);const o=await n.stat(t);await a(r,o.atime,o.mtime)}return n.chmod(r,e.mode)}e.exports=async function(e,t,r={}){"function"==typeof r&&(r={filter:r}),r.clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0001");const{srcStat:n,destStat:a}=await c.checkPaths(e,t,"copy",r);if(await c.checkParentPaths(e,n,t,"copy"),!await l(e,t,r))return;const f=o.dirname(t);await s(f)||await i(f),await u(a,e,t,r)}},4423:(e,t,r)=>{const n=r(1236).fromPromise;e.exports={copy:n(r(4994)),copySync:r(3876)}},2591:(e,t,r)=>{const n=r(1236).fromPromise,o=r(8737),i=r(2336),s=r(3798),a=r(5422),c=n((async function(e){let t;try{t=await o.readdir(e)}catch{return s.mkdirs(e)}return Promise.all(t.map((t=>a.remove(i.join(e,t)))))}));function l(e){let t;try{t=o.readdirSync(e)}catch{return s.mkdirsSync(e)}t.forEach((t=>{t=i.join(e,t),a.removeSync(t)}))}e.exports={emptyDirSync:l,emptydirSync:l,emptyDir:c,emptydir:c}},9616:(e,t,r)=>{const n=r(1236).fromPromise,o=r(8463),i=r(8737),s=r(3798);e.exports={createFile:n((async function(e){let t;try{t=await i.stat(e)}catch{}if(t&&t.isFile())return;const r=o.dirname(e);let n=null;try{n=await i.stat(r)}catch(t){if("ENOENT"===t.code)return await s.mkdirs(r),void await i.writeFile(e,"");throw t}n.isDirectory()?await i.writeFile(e,""):await i.readdir(r)})),createFileSync:function(e){let t;try{t=i.statSync(e)}catch{}if(t&&t.isFile())return;const r=o.dirname(e);try{i.statSync(r).isDirectory()||i.readdirSync(r)}catch(e){if(!e||"ENOENT"!==e.code)throw e;s.mkdirsSync(r)}i.writeFileSync(e,"")}}},6288:(e,t,r)=>{const{createFile:n,createFileSync:o}=r(9616),{createLink:i,createLinkSync:s}=r(1522),{createSymlink:a,createSymlinkSync:c}=r(5291);e.exports={createFile:n,createFileSync:o,ensureFile:n,ensureFileSync:o,createLink:i,createLinkSync:s,ensureLink:i,ensureLinkSync:s,createSymlink:a,createSymlinkSync:c,ensureSymlink:a,ensureSymlinkSync:c}},1522:(e,t,r)=>{const n=r(1236).fromPromise,o=r(8463),i=r(8737),s=r(3798),{pathExists:a}=r(9288),{areIdentical:c}=r(6462);e.exports={createLink:n((async function(e,t){let r,n;try{r=await i.lstat(t)}catch{}try{n=await i.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}if(r&&c(n,r))return;const l=o.dirname(t);await a(l)||await s.mkdirs(l),await i.link(e,t)})),createLinkSync:function(e,t){let r;try{r=i.lstatSync(t)}catch{}try{const t=i.lstatSync(e);if(r&&c(t,r))return}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}const n=o.dirname(t);return i.existsSync(n)||s.mkdirsSync(n),i.linkSync(e,t)}}},3838:(e,t,r)=>{const n=r(8463),o=r(8737),{pathExists:i}=r(9288),s=r(1236).fromPromise;e.exports={symlinkPaths:s((async function(e,t){if(n.isAbsolute(e)){try{await o.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureSymlink"),e}return{toCwd:e,toDst:e}}const r=n.dirname(t),s=n.join(r,e);if(await i(s))return{toCwd:s,toDst:e};try{await o.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureSymlink"),e}return{toCwd:e,toDst:n.relative(r,e)}})),symlinkPathsSync:function(e,t){if(n.isAbsolute(e)){if(!o.existsSync(e))throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}const r=n.dirname(t),i=n.join(r,e);if(o.existsSync(i))return{toCwd:i,toDst:e};if(!o.existsSync(e))throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:n.relative(r,e)}}}},7064:(e,t,r)=>{const n=r(8737),o=r(1236).fromPromise;e.exports={symlinkType:o((async function(e,t){if(t)return t;let r;try{r=await n.lstat(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"})),symlinkTypeSync:function(e,t){if(t)return t;let r;try{r=n.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}}},5291:(e,t,r)=>{const n=r(1236).fromPromise,o=r(8463),i=r(8737),{mkdirs:s,mkdirsSync:a}=r(3798),{symlinkPaths:c,symlinkPathsSync:l}=r(3838),{symlinkType:u,symlinkTypeSync:f}=r(7064),{pathExists:p}=r(9288),{areIdentical:h}=r(6462);e.exports={createSymlink:n((async function(e,t,r){let n;try{n=await i.lstat(t)}catch{}if(n&&n.isSymbolicLink()){const[r,n]=await Promise.all([i.stat(e),i.stat(t)]);if(h(r,n))return}const a=await c(e,t);e=a.toDst;const l=await u(a.toCwd,r),f=o.dirname(t);return await p(f)||await s(f),i.symlink(e,t,l)})),createSymlinkSync:function(e,t,r){let n;try{n=i.lstatSync(t)}catch{}if(n&&n.isSymbolicLink()){const r=i.statSync(e),n=i.statSync(t);if(h(r,n))return}const s=l(e,t);e=s.toDst,r=f(s.toCwd,r);const c=o.dirname(t);return i.existsSync(c)||a(c),i.symlinkSync(e,t,r)}}},8737:(e,t,r)=>{const n=r(1236).fromCallback,o=r(5542),i=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter((e=>"function"==typeof o[e]));Object.assign(t,o),i.forEach((e=>{t[e]=n(o[e])})),t.exists=function(e,t){return"function"==typeof t?o.exists(e,t):new Promise((t=>o.exists(e,t)))},t.read=function(e,t,r,n,i,s){return"function"==typeof s?o.read(e,t,r,n,i,s):new Promise(((s,a)=>{o.read(e,t,r,n,i,((e,t,r)=>{if(e)return a(e);s({bytesRead:t,buffer:r})}))}))},t.write=function(e,t,...r){return"function"==typeof r[r.length-1]?o.write(e,t,...r):new Promise(((n,i)=>{o.write(e,t,...r,((e,t,r)=>{if(e)return i(e);n({bytesWritten:t,buffer:r})}))}))},t.readv=function(e,t,...r){return"function"==typeof r[r.length-1]?o.readv(e,t,...r):new Promise(((n,i)=>{o.readv(e,t,...r,((e,t,r)=>{if(e)return i(e);n({bytesRead:t,buffers:r})}))}))},t.writev=function(e,t,...r){return"function"==typeof r[r.length-1]?o.writev(e,t,...r):new Promise(((n,i)=>{o.writev(e,t,...r,((e,t,r)=>{if(e)return i(e);n({bytesWritten:t,buffers:r})}))}))},"function"==typeof o.realpath.native?t.realpath.native=n(o.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")},1605:(e,t,r)=>{e.exports={...r(8737),...r(4423),...r(2591),...r(6288),...r(3376),...r(3798),...r(2455),...r(7024),...r(9288),...r(5422)}},3376:(e,t,r)=>{const n=r(1236).fromPromise,o=r(2934);o.outputJson=n(r(6426)),o.outputJsonSync=r(2188),o.outputJSON=o.outputJson,o.outputJSONSync=o.outputJsonSync,o.writeJSON=o.writeJson,o.writeJSONSync=o.writeJsonSync,o.readJSON=o.readJson,o.readJSONSync=o.readJsonSync,e.exports=o},2934:(e,t,r)=>{const n=r(2909);e.exports={readJson:n.readFile,readJsonSync:n.readFileSync,writeJson:n.writeFile,writeJsonSync:n.writeFileSync}},2188:(e,t,r)=>{const{stringify:n}=r(1144),{outputFileSync:o}=r(7024);e.exports=function(e,t,r){const i=n(t,r);o(e,i,r)}},6426:(e,t,r)=>{const{stringify:n}=r(1144),{outputFile:o}=r(7024);e.exports=async function(e,t,r={}){const i=n(t,r);await o(e,i,r)}},3798:(e,t,r)=>{const n=r(1236).fromPromise,{makeDir:o,makeDirSync:i}=r(8916),s=n(o);e.exports={mkdirs:s,mkdirsSync:i,mkdirp:s,mkdirpSync:i,ensureDir:s,ensureDirSync:i}},8916:(e,t,r)=>{const n=r(8737),{checkPath:o}=r(7111),i=e=>"number"==typeof e?e:{mode:511,...e}.mode;e.exports.makeDir=async(e,t)=>(o(e),n.mkdir(e,{mode:i(t),recursive:!0})),e.exports.makeDirSync=(e,t)=>(o(e),n.mkdirSync(e,{mode:i(t),recursive:!0}))},7111:(e,t,r)=>{const n=r(3217);e.exports.checkPath=function(e){if("win32"===process.platform){if(/[<>:"|?*]/.test(e.replace(n.parse(e).root,""))){const t=new Error(`Path contains invalid characters: ${e}`);throw t.code="EINVAL",t}}}},2455:(e,t,r)=>{const n=r(1236).fromPromise;e.exports={move:n(r(3314)),moveSync:r(6244)}},6244:(e,t,r)=>{const n=r(8124),o=r(6876),i=r(4423).copySync,s=r(5422).removeSync,a=r(3798).mkdirpSync,c=r(6462);function l(e,t,r){try{n.renameSync(e,t)}catch(n){if("EXDEV"!==n.code)throw n;return function(e,t,r){const n={overwrite:r,errorOnExist:!0,preserveTimestamps:!0};return i(e,t,n),s(e)}(e,t,r)}}e.exports=function(e,t,r){const i=(r=r||{}).overwrite||r.clobber||!1,{srcStat:u,isChangingCase:f=!1}=c.checkPathsSync(e,t,"move",r);return c.checkParentPathsSync(e,u,t,"move"),function(e){const t=o.dirname(e);return o.parse(t).root===t}(t)||a(o.dirname(t)),function(e,t,r,o){if(o)return l(e,t,r);if(r)return s(t),l(e,t,r);if(n.existsSync(t))throw new Error("dest already exists.");return l(e,t,r)}(e,t,i,f)}},3314:(e,t,r)=>{const n=r(8737),o=r(6876),{copy:i}=r(4423),{remove:s}=r(5422),{mkdirp:a}=r(3798),{pathExists:c}=r(9288),l=r(6462);e.exports=async function(e,t,r={}){const u=r.overwrite||r.clobber||!1,{srcStat:f,isChangingCase:p=!1}=await l.checkPaths(e,t,"move",r);await l.checkParentPaths(e,f,t,"move");const h=o.dirname(t);return o.parse(h).root!==h&&await a(h),async function(e,t,r,o){if(!o)if(r)await s(t);else if(await c(t))throw new Error("dest already exists.");try{await n.rename(e,t)}catch(n){if("EXDEV"!==n.code)throw n;await async function(e,t,r){const n={overwrite:r,errorOnExist:!0,preserveTimestamps:!0};return await i(e,t,n),s(e)}(e,t,r)}}(e,t,u,p)}},7024:(e,t,r)=>{const n=r(1236).fromPromise,o=r(8737),i=r(9007),s=r(3798),a=r(9288).pathExists;e.exports={outputFile:n((async function(e,t,r="utf-8"){const n=i.dirname(e);return await a(n)||await s.mkdirs(n),o.writeFile(e,t,r)})),outputFileSync:function(e,...t){const r=i.dirname(e);o.existsSync(r)||s.mkdirsSync(r),o.writeFileSync(e,...t)}}},9288:(e,t,r)=>{const n=r(1236).fromPromise,o=r(8737);e.exports={pathExists:n((function(e){return o.access(e).then((()=>!0)).catch((()=>!1))})),pathExistsSync:o.existsSync}},5422:(e,t,r)=>{const n=r(7091),o=r(1236).fromCallback;e.exports={remove:o((function(e,t){n.rm(e,{recursive:!0,force:!0},t)})),removeSync:function(e){n.rmSync(e,{recursive:!0,force:!0})}}},6462:(e,t,r)=>{const n=r(8737),o=r(8485),i=r(1236).fromPromise;function s(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function a(e,t){const r=o.resolve(e).split(o.sep).filter((e=>e)),n=o.resolve(t).split(o.sep).filter((e=>e));return r.every(((e,t)=>n[t]===e))}function c(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}e.exports={checkPaths:i((async function(e,t,r,i){const{srcStat:l,destStat:u}=await function(e,t,r){const o=r.dereference?e=>n.stat(e,{bigint:!0}):e=>n.lstat(e,{bigint:!0});return Promise.all([o(e),o(t).catch((e=>{if("ENOENT"===e.code)return null;throw e}))]).then((([e,t])=>({srcStat:e,destStat:t})))}(e,t,i);if(u){if(s(l,u)){const n=o.basename(e),i=o.basename(t);if("move"===r&&n!==i&&n.toLowerCase()===i.toLowerCase())return{srcStat:l,destStat:u,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(l.isDirectory()&&!u.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!l.isDirectory()&&u.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(l.isDirectory()&&a(e,t))throw new Error(c(e,t,r));return{srcStat:l,destStat:u}})),checkPathsSync:function(e,t,r,i){const{srcStat:l,destStat:u}=function(e,t,r){let o;const i=r.dereference?e=>n.statSync(e,{bigint:!0}):e=>n.lstatSync(e,{bigint:!0}),s=i(e);try{o=i(t)}catch(e){if("ENOENT"===e.code)return{srcStat:s,destStat:null};throw e}return{srcStat:s,destStat:o}}(e,t,i);if(u){if(s(l,u)){const n=o.basename(e),i=o.basename(t);if("move"===r&&n!==i&&n.toLowerCase()===i.toLowerCase())return{srcStat:l,destStat:u,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(l.isDirectory()&&!u.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!l.isDirectory()&&u.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(l.isDirectory()&&a(e,t))throw new Error(c(e,t,r));return{srcStat:l,destStat:u}},checkParentPaths:i((async function e(t,r,i,a){const l=o.resolve(o.dirname(t)),u=o.resolve(o.dirname(i));if(u===l||u===o.parse(u).root)return;let f;try{f=await n.stat(u,{bigint:!0})}catch(e){if("ENOENT"===e.code)return;throw e}if(s(r,f))throw new Error(c(t,i,a));return e(t,r,u,a)})),checkParentPathsSync:function e(t,r,i,a){const l=o.resolve(o.dirname(t)),u=o.resolve(o.dirname(i));if(u===l||u===o.parse(u).root)return;let f;try{f=n.statSync(u,{bigint:!0})}catch(e){if("ENOENT"===e.code)return;throw e}if(s(r,f))throw new Error(c(t,i,a));return e(t,r,u,a)},isSrcSubdir:a,areIdentical:s}},7211:(e,t,r)=>{const n=r(8737),o=r(1236).fromPromise;e.exports={utimesMillis:o((async function(e,t,r){const o=await n.open(e,"r+");let i=null;try{await n.futimes(o,t,r)}finally{try{await n.close(o)}catch(e){i=e}}if(i)throw i})),utimesMillisSync:function(e,t,r){const o=n.openSync(e,"r+");return n.futimesSync(o,t,r),n.closeSync(o)}}},2909:(e,t,r)=>{let n;try{n=r(1290)}catch(e){n=r(1006)}const o=r(1236),{stringify:i,stripBom:s}=r(1144);const a={readFile:o.fromPromise((async function(e,t={}){"string"==typeof t&&(t={encoding:t});const r=t.fs||n,i=!("throws"in t)||t.throws;let a,c=await o.fromCallback(r.readFile)(e,t);c=s(c);try{a=JSON.parse(c,t?t.reviver:null)}catch(t){if(i)throw t.message=`${e}: ${t.message}`,t;return null}return a})),readFileSync:function(e,t={}){"string"==typeof t&&(t={encoding:t});const r=t.fs||n,o=!("throws"in t)||t.throws;try{let n=r.readFileSync(e,t);return n=s(n),JSON.parse(n,t.reviver)}catch(t){if(o)throw t.message=`${e}: ${t.message}`,t;return null}},writeFile:o.fromPromise((async function(e,t,r={}){const s=r.fs||n,a=i(t,r);await o.fromCallback(s.writeFile)(e,a,r)})),writeFileSync:function(e,t,r={}){const o=r.fs||n,s=i(t,r);return o.writeFileSync(e,s,r)}};e.exports=a},1144:e=>{e.exports={stringify:function(e,{EOL:t="\n",finalEOL:r=!0,replacer:n=null,spaces:o}={}){const i=r?t:"";return JSON.stringify(e,n,o).replace(/\n/g,t)+i},stripBom:function(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}}},2549:(e,t,r)=>{e.exports=r(9100)},5095:e=>{e.exports=n;var t,r=/\/|\./;function n(e,t){r.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),n[e]=t}n("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}}),n("duration",{Duration:t={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),n("timestamp",{Timestamp:t}),n("empty",{Empty:{fields:{}}}),n("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}}}}),n("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}}}}),n("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),n.get=function(e){return n[e]||null}},744:(e,t,r)=>{var n=t,o=r(5643),i=r(3262);function s(e,t,r,n){var i=!1;if(t.resolvedType)if(t.resolvedType instanceof o){e("switch(d%s){",n);for(var s=t.resolvedType.values,a=Object.keys(s),c=0;c<a.length;++c)s[a[c]]!==t.typeDefault||i||(e("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',n,n,n),t.repeated||e("break"),i=!0),e("case%j:",a[c])("case %i:",s[a[c]])("m%s=%j",n,s[a[c]])("break");e("}")}else e('if(typeof d%s!=="object")',n)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",n,r,n);else{var l=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",n,n);break;case"uint64":l=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,l)('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,l?"true":"");break;case"bytes":e('if(typeof d%s==="string")',n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",n,n,n)("else if(d%s.length >= 0)",n)("m%s=d%s",n,n);break;case"string":e("m%s=String(d%s)",n,n);break;case"bool":e("m%s=Boolean(d%s)",n,n)}}return e}function a(e,t,r,n){if(t.resolvedType)t.resolvedType instanceof o?e("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",n,r,n,n,r,n,n):e("d%s=types[%i].toObject(m%s,o)",n,r,n);else{var i=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",n,n,n,n);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',n)("d%s=o.longs===String?String(m%s):m%s",n,n,n)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",n,n,n,n,i?"true":"",n);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",n,n,n,n,n);break;default:e("d%s=m%s",n,n)}}return e}n.fromObject=function(e){var t=e.fieldsArray,r=i.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return r("return new this.ctor");r("var m=new this.ctor");for(var n=0;n<t.length;++n){var a=t[n].resolve(),c=i.safeProp(a.name);a.map?(r("if(d%s){",c)('if(typeof d%s!=="object")',c)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",c)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",c),s(r,a,n,c+"[ks[i]]")("}")("}")):a.repeated?(r("if(d%s){",c)("if(!Array.isArray(d%s))",c)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",c)("for(var i=0;i<d%s.length;++i){",c),s(r,a,n,c+"[i]")("}")("}")):(a.resolvedType instanceof o||r("if(d%s!=null){",c),s(r,a,n,c),a.resolvedType instanceof o||r("}"))}return r("return m")},n.toObject=function(e){var t=e.fieldsArray.slice().sort(i.compareFieldsById);if(!t.length)return i.codegen()("return {}");for(var r=i.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),n=[],s=[],c=[],l=0;l<t.length;++l)t[l].partOf||(t[l].resolve().repeated?n:t[l].map?s:c).push(t[l]);if(n.length){for(r("if(o.arrays||o.defaults){"),l=0;l<n.length;++l)r("d%s=[]",i.safeProp(n[l].name));r("}")}if(s.length){for(r("if(o.objects||o.defaults){"),l=0;l<s.length;++l)r("d%s={}",i.safeProp(s[l].name));r("}")}if(c.length){for(r("if(o.defaults){"),l=0;l<c.length;++l){var u=c[l],f=i.safeProp(u.name);if(u.resolvedType instanceof o)r("d%s=o.enums===String?%j:%j",f,u.resolvedType.valuesById[u.typeDefault],u.typeDefault);else if(u.long)r("if(util.Long){")("var n=new util.Long(%i,%i,%j)",u.typeDefault.low,u.typeDefault.high,u.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,u.typeDefault.toString(),u.typeDefault.toNumber());else if(u.bytes){var p="["+Array.prototype.slice.call(u.typeDefault).join(",")+"]";r("if(o.bytes===String)d%s=%j",f,String.fromCharCode.apply(String,u.typeDefault))("else{")("d%s=%s",f,p)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",f,f)("}")}else r("d%s=%j",f,u.typeDefault)}r("}")}var h=!1;for(l=0;l<t.length;++l){u=t[l];var d=e._fieldsArray.indexOf(u);f=i.safeProp(u.name);u.map?(h||(h=!0,r("var ks2")),r("if(m%s&&(ks2=Object.keys(m%s)).length){",f,f)("d%s={}",f)("for(var j=0;j<ks2.length;++j){"),a(r,u,d,f+"[ks2[j]]")("}")):u.repeated?(r("if(m%s&&m%s.length){",f,f)("d%s=[]",f)("for(var j=0;j<m%s.length;++j){",f),a(r,u,d,f+"[j]")("}")):(r("if(m%s!=null&&m.hasOwnProperty(%j)){",f,u.name),a(r,u,d,f),u.partOf&&r("if(o.oneofs)")("d%s=%j",i.safeProp(u.partOf.name),u.name)),r("}")}return r("return d")}},7728:(e,t,r)=>{e.exports=function(e){var t=i.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter((function(e){return e.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");e.group&&t("if((t&7)===4)")("break");t("switch(t>>>3){");for(var r=0;r<e.fieldsArray.length;++r){var a=e._fieldsArray[r].resolve(),c=a.resolvedType instanceof n?"int32":a.type,l="m"+i.safeProp(a.name);t("case %i: {",a.id),a.map?(t("if(%s===util.emptyObject)",l)("%s={}",l)("var c2 = r.uint32()+r.pos"),void 0!==o.defaults[a.keyType]?t("k=%j",o.defaults[a.keyType]):t("k=null"),void 0!==o.defaults[c]?t("value=%j",o.defaults[c]):t("value=null"),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",a.keyType)("case 2:"),void 0===o.basic[c]?t("value=types[%i].decode(r,r.uint32())",r):t("value=r.%s()",c),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==o.long[a.keyType]?t('%s[typeof k==="object"?util.longToHash(k):k]=value',l):t("%s[k]=value",l)):a.repeated?(t("if(!(%s&&%s.length))",l,l)("%s=[]",l),void 0!==o.packed[c]&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",l,c)("}else"),void 0===o.basic[c]?t(a.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",l,r):t("%s.push(r.%s())",l,c)):void 0===o.basic[c]?t(a.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",l,r):t("%s=r.%s()",l,c),t("break")("}")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),r=0;r<e._fieldsArray.length;++r){var u=e._fieldsArray[r];u.required&&t("if(!m.hasOwnProperty(%j))",u.name)("throw util.ProtocolError(%j,{instance:m})",s(u))}return t("return m")};var n=r(5643),o=r(361),i=r(3262);function s(e){return"missing required '"+e.name+"'"}},1080:(e,t,r)=>{e.exports=function(e){for(var t,r=i.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),a=e.fieldsArray.slice().sort(i.compareFieldsById),c=0;c<a.length;++c){var l=a[c].resolve(),u=e._fieldsArray.indexOf(l),f=l.resolvedType instanceof n?"int32":l.type,p=o.basic[f];t="m"+i.safeProp(l.name),l.map?(r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",t,l.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",t)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(l.id<<3|2)>>>0,8|o.mapKey[l.keyType],l.keyType),void 0===p?r("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",u,t):r(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|p,f,t),r("}")("}")):l.repeated?(r("if(%s!=null&&%s.length){",t,t),l.packed&&void 0!==o.packed[f]?r("w.uint32(%i).fork()",(l.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",t)("w.%s(%s[i])",f,t)("w.ldelim()"):(r("for(var i=0;i<%s.length;++i)",t),void 0===p?s(r,l,u,t+"[i]"):r("w.uint32(%i).%s(%s[i])",(l.id<<3|p)>>>0,f,t)),r("}")):(l.optional&&r("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,l.name),void 0===p?s(r,l,u,t):r("w.uint32(%i).%s(%s)",(l.id<<3|p)>>>0,f,t))}return r("return w")};var n=r(5643),o=r(361),i=r(3262);function s(e,t,r,n){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",r,n,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",r,n,(t.id<<3|2)>>>0)}},5643:(e,t,r)=>{e.exports=s;var n=r(7209);((s.prototype=Object.create(n.prototype)).constructor=s).className="Enum";var o=r(8923),i=r(3262);function s(e,t,r,o,i,s){if(n.call(this,e,r),t&&"object"!=typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=o,this.comments=i||{},this.valuesOptions=s,this.reserved=void 0,t)for(var a=Object.keys(t),c=0;c<a.length;++c)"number"==typeof t[a[c]]&&(this.valuesById[this.values[a[c]]=t[a[c]]]=a[c])}s.fromJSON=function(e,t){var r=new s(e,t.values,t.options,t.comment,t.comments);return r.reserved=t.reserved,r},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},s.prototype.add=function(e,t,r,n){if(!i.isString(e))throw TypeError("name must be a string");if(!i.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return n&&(void 0===this.valuesOptions&&(this.valuesOptions={}),this.valuesOptions[e]=n||null),this.comments[e]=r||null,this},s.prototype.remove=function(e){if(!i.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this.valuesOptions&&delete this.valuesOptions[e],this},s.prototype.isReservedId=function(e){return o.isReservedId(this.reserved,e)},s.prototype.isReservedName=function(e){return o.isReservedName(this.reserved,e)}},1344:(e,t,r)=>{e.exports=l;var n=r(7209);((l.prototype=Object.create(n.prototype)).constructor=l).className="Field";var o,i=r(5643),s=r(361),a=r(3262),c=/^required|optional|repeated$/;function l(e,t,r,o,i,l,u){if(a.isObject(o)?(u=i,l=o,o=i=void 0):a.isObject(i)&&(u=l,l=i,i=void 0),n.call(this,e,l),!a.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!a.isString(r))throw TypeError("type must be a string");if(void 0!==o&&!c.test(o=o.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==i&&!a.isString(i))throw TypeError("extend must be a string");"proto3_optional"===o&&(o="optional"),this.rule=o&&"optional"!==o?o:void 0,this.type=r,this.id=t,this.extend=i||void 0,this.required="required"===o,this.optional=!this.required,this.repeated="repeated"===o,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!a.Long&&void 0!==s.long[r],this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=u}l.fromJSON=function(e,t){return new l(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)},Object.defineProperty(l.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),l.prototype.setOption=function(e,t,r){return"packed"===e&&(this._packed=null),n.prototype.setOption.call(this,e,t,r)},l.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return a.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},l.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=s.defaults[this.type])?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof o?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof i&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof i)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=a.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var e;a.base64.test(this.typeDefault)?a.base64.decode(this.typeDefault,e=a.newBuffer(a.base64.length(this.typeDefault)),0):a.utf8.write(this.typeDefault,e=a.newBuffer(a.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=a.emptyObject:this.repeated?this.defaultValue=a.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof o&&(this.parent.ctor.prototype[this.name]=this.defaultValue),n.prototype.resolve.call(this)},l.d=function(e,t,r,n){return"function"==typeof t?t=a.decorateType(t).name:t&&"object"==typeof t&&(t=a.decorateEnum(t).name),function(o,i){a.decorateType(o.constructor).add(new l(i,e,t,r,{default:n}))}},l._configure=function(e){o=e}},5325:(e,t,r)=>{var n=e.exports=r(4394);n.build="light",n.load=function(e,t,r){return"function"==typeof t?(r=t,t=new n.Root):t||(t=new n.Root),t.load(e,r)},n.loadSync=function(e,t){return t||(t=new n.Root),t.loadSync(e)},n.encoder=r(1080),n.decoder=r(7728),n.verifier=r(420),n.converter=r(744),n.ReflectionObject=r(7209),n.Namespace=r(8923),n.Root=r(5330),n.Enum=r(5643),n.Type=r(7882),n.Field=r(1344),n.OneOf=r(1457),n.MapField=r(8252),n.Service=r(9687),n.Method=r(8811),n.Message=r(2551),n.wrappers=r(6434),n.types=r(361),n.util=r(3262),n.ReflectionObject._configure(n.Root),n.Namespace._configure(n.Type,n.Service,n.Enum),n.Root._configure(n.Type),n.Field._configure(n.Type)},4394:(e,t,r)=>{var n=t;function o(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=r(3449),n.BufferWriter=r(818),n.Reader=r(6237),n.BufferReader=r(3158),n.util=r(3610),n.rpc=r(5047),n.roots=r(4529),n.configure=o,o()},9100:(e,t,r)=>{var n=e.exports=r(5325);n.build="full",n.tokenize=r(527),n.parse=r(4863),n.common=r(5095),n.Root._configure(n.Type,n.parse,n.common)},8252:(e,t,r)=>{e.exports=s;var n=r(1344);((s.prototype=Object.create(n.prototype)).constructor=s).className="MapField";var o=r(361),i=r(3262);function s(e,t,r,o,s,a){if(n.call(this,e,t,o,void 0,void 0,s,a),!i.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}s.fromJSON=function(e,t){return new s(e,t.id,t.keyType,t.type,t.options,t.comment)},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},s.prototype.resolve=function(){if(this.resolved)return this;if(void 0===o.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return n.prototype.resolve.call(this)},s.d=function(e,t,r){return"function"==typeof r?r=i.decorateType(r).name:r&&"object"==typeof r&&(r=i.decorateEnum(r).name),function(n,o){i.decorateType(n.constructor).add(new s(o,e,t,r))}}},2551:(e,t,r)=>{e.exports=o;var n=r(3610);function o(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}o.create=function(e){return this.$type.create(e)},o.encode=function(e,t){return this.$type.encode(e,t)},o.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},o.decode=function(e){return this.$type.decode(e)},o.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},o.verify=function(e){return this.$type.verify(e)},o.fromObject=function(e){return this.$type.fromObject(e)},o.toObject=function(e,t){return this.$type.toObject(e,t)},o.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},8811:(e,t,r)=>{e.exports=i;var n=r(7209);((i.prototype=Object.create(n.prototype)).constructor=i).className="Method";var o=r(3262);function i(e,t,r,i,s,a,c,l,u){if(o.isObject(s)?(c=s,s=a=void 0):o.isObject(a)&&(c=a,a=void 0),void 0!==t&&!o.isString(t))throw TypeError("type must be a string");if(!o.isString(r))throw TypeError("requestType must be a string");if(!o.isString(i))throw TypeError("responseType must be a string");n.call(this,e,c),this.type=t||"rpc",this.requestType=r,this.requestStream=!!s||void 0,this.responseType=i,this.responseStream=!!a||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=l,this.parsedOptions=u}i.fromJSON=function(e,t){return new i(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])},i.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),n.prototype.resolve.call(this))}},8923:(e,t,r)=>{e.exports=f;var n=r(7209);((f.prototype=Object.create(n.prototype)).constructor=f).className="Namespace";var o,i,s,a=r(1344),c=r(3262),l=r(1457);function u(e,t){if(e&&e.length){for(var r={},n=0;n<e.length;++n)r[e[n].name]=e[n].toJSON(t);return r}}function f(e,t){n.call(this,e,t),this.nested=void 0,this._nestedArray=null}function p(e){return e._nestedArray=null,e}f.fromJSON=function(e,t){return new f(e,t.options).addJSON(t.nested)},f.arrayToJSON=u,f.isReservedId=function(e,t){if(e)for(var r=0;r<e.length;++r)if("string"!=typeof e[r]&&e[r][0]<=t&&e[r][1]>t)return!0;return!1},f.isReservedName=function(e,t){if(e)for(var r=0;r<e.length;++r)if(e[r]===t)return!0;return!1},Object.defineProperty(f.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=c.toArray(this.nested))}}),f.prototype.toJSON=function(e){return c.toObject(["options",this.options,"nested",u(this.nestedArray,e)])},f.prototype.addJSON=function(e){if(e)for(var t,r=Object.keys(e),n=0;n<r.length;++n)t=e[r[n]],this.add((void 0!==t.fields?o.fromJSON:void 0!==t.values?s.fromJSON:void 0!==t.methods?i.fromJSON:void 0!==t.id?a.fromJSON:f.fromJSON)(r[n],t));return this},f.prototype.get=function(e){return this.nested&&this.nested[e]||null},f.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof s)return this.nested[e].values;throw Error("no such enum: "+e)},f.prototype.add=function(e){if(!(e instanceof a&&void 0!==e.extend||e instanceof o||e instanceof l||e instanceof s||e instanceof i||e instanceof f))throw TypeError("object must be a valid nested object");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof f&&e instanceof f)||t instanceof o||t instanceof i)throw Error("duplicate name '"+e.name+"' in "+this);for(var r=t.nestedArray,n=0;n<r.length;++n)e.add(r[n]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),p(this)},f.prototype.remove=function(e){if(!(e instanceof n))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),p(this)},f.prototype.define=function(e,t){if(c.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var r=this;e.length>0;){var n=e.shift();if(r.nested&&r.nested[n]){if(!((r=r.nested[n])instanceof f))throw Error("path conflicts with non-namespace objects")}else r.add(r=new f(n))}return t&&r.addJSON(t),r},f.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof f?e[t++].resolveAll():e[t++].resolve();return this.resolve()},f.prototype.lookup=function(e,t,r){if("boolean"==typeof t?(r=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),c.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;if(""===e[0])return this.root.lookup(e.slice(1),t);var n=this.get(e[0]);if(n){if(1===e.length){if(!t||t.indexOf(n.constructor)>-1)return n}else if(n instanceof f&&(n=n.lookup(e.slice(1),t,!0)))return n}else for(var o=0;o<this.nestedArray.length;++o)if(this._nestedArray[o]instanceof f&&(n=this._nestedArray[o].lookup(e,t,!0)))return n;return null===this.parent||r?null:this.parent.lookup(e,t)},f.prototype.lookupType=function(e){var t=this.lookup(e,[o]);if(!t)throw Error("no such type: "+e);return t},f.prototype.lookupEnum=function(e){var t=this.lookup(e,[s]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},f.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[o,s]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t},f.prototype.lookupService=function(e){var t=this.lookup(e,[i]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},f._configure=function(e,t,r){o=e,i=t,s=r}},7209:(e,t,r)=>{e.exports=i,i.className="ReflectionObject";var n,o=r(3262);function i(e,t){if(!o.isString(e))throw TypeError("name must be a string");if(t&&!o.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(i.prototype,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),i.prototype.toJSON=function(){throw Error()},i.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof n&&t._handleAdd(this)},i.prototype.onRemove=function(e){var t=e.root;t instanceof n&&t._handleRemove(this),this.parent=null,this.resolved=!1},i.prototype.resolve=function(){return this.resolved||this.root instanceof n&&(this.resolved=!0),this},i.prototype.getOption=function(e){if(this.options)return this.options[e]},i.prototype.setOption=function(e,t,r){return r&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},i.prototype.setParsedOption=function(e,t,r){this.parsedOptions||(this.parsedOptions=[]);var n=this.parsedOptions;if(r){var i=n.find((function(t){return Object.prototype.hasOwnProperty.call(t,e)}));if(i){var s=i[e];o.setProperty(s,r,t)}else(i={})[e]=o.setProperty({},r,t),n.push(i)}else{var a={};a[e]=t,n.push(a)}return this},i.prototype.setOptions=function(e,t){if(e)for(var r=Object.keys(e),n=0;n<r.length;++n)this.setOption(r[n],e[r[n]],t);return this},i.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},i._configure=function(e){n=e}},1457:(e,t,r)=>{e.exports=s;var n=r(7209);((s.prototype=Object.create(n.prototype)).constructor=s).className="OneOf";var o=r(1344),i=r(3262);function s(e,t,r,o){if(Array.isArray(t)||(r=t,t=void 0),n.call(this,e,r),void 0!==t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=o}function a(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}s.fromJSON=function(e,t){return new s(e,t.oneof,t.options,t.comment)},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])},s.prototype.add=function(e){if(!(e instanceof o))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,a(this),this},s.prototype.remove=function(e){if(!(e instanceof o))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),(t=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(t,1),e.partOf=null,this},s.prototype.onAdd=function(e){n.prototype.onAdd.call(this,e);for(var t=0;t<this.oneof.length;++t){var r=e.get(this.oneof[t]);r&&!r.partOf&&(r.partOf=this,this.fieldsArray.push(r))}a(this)},s.prototype.onRemove=function(e){for(var t,r=0;r<this.fieldsArray.length;++r)(t=this.fieldsArray[r]).parent&&t.parent.remove(t);n.prototype.onRemove.call(this,e)},s.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,r){i.decorateType(t.constructor).add(new s(r,e)),Object.defineProperty(t,r,{get:i.oneOfGetter(e),set:i.oneOfSetter(e)})}}},4863:(e,t,r)=>{e.exports=O,O.filename=null,O.defaults={keepCase:!1};var n=r(527),o=r(5330),i=r(7882),s=r(1344),a=r(8252),c=r(1457),l=r(5643),u=r(9687),f=r(8811),p=r(361),h=r(3262),d=/^[1-9][0-9]*$/,y=/^-?[1-9][0-9]*$/,m=/^0[x][0-9a-fA-F]+$/,g=/^-?0[x][0-9a-fA-F]+$/,v=/^0[0-7]+$/,b=/^-?0[0-7]+$/,w=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,k=/^[a-zA-Z_][a-zA-Z_0-9]*$/,_=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,S=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;function O(e,t,r){t instanceof o||(r=t,t=new o),r||(r=O.defaults);var x,j,T,E,A,N=r.preferTrailingComment||!1,P=n(e,r.alternateCommentMode||!1),M=P.next,D=P.push,C=P.peek,$=P.skip,B=P.cmnt,F=!0,z=!1,I=t,L=r.keepCase?function(e){return e}:h.camelCase;function R(e,t,r){var n=O.filename;return r||(O.filename=null),Error("illegal "+(t||"token")+" '"+e+"' ("+(n?n+", ":"")+"line "+P.line+")")}function J(){var e,t=[];do{if('"'!==(e=M())&&"'"!==e)throw R(e);t.push(M()),$(e),e=C()}while('"'===e||"'"===e);return t.join("")}function U(e){var t=M();switch(t){case"'":case'"':return D(t),J();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return function(e,t){var r=1;"-"===e.charAt(0)&&(r=-1,e=e.substring(1));switch(e){case"inf":case"INF":case"Inf":return r*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(d.test(e))return r*parseInt(e,10);if(m.test(e))return r*parseInt(e,16);if(v.test(e))return r*parseInt(e,8);if(w.test(e))return r*parseFloat(e);throw R(e,"number",t)}(t,!0)}catch(r){if(e&&_.test(t))return t;throw R(t,"value")}}function q(e,t){var r,n;do{!t||'"'!==(r=C())&&"'"!==r?e.push([n=V(M()),$("to",!0)?V(M()):n]):e.push(J())}while($(",",!0));var o={options:void 0,setOption:function(e,t){void 0===this.options&&(this.options={}),this.options[e]=t}};X(o,(function(e){if("option"!==e)throw R(e);ee(o,e),$(";")}),(function(){ne(o)}))}function V(e,t){switch(e){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!t&&"-"===e.charAt(0))throw R(e,"id");if(y.test(e))return parseInt(e,10);if(g.test(e))return parseInt(e,16);if(b.test(e))return parseInt(e,8);throw R(e,"id")}function W(){if(void 0!==x)throw R("package");if(x=M(),!_.test(x))throw R(x,"name");I=I.define(x),$(";")}function G(){var e,t=C();switch(t){case"weak":e=T||(T=[]),M();break;case"public":M();default:e=j||(j=[])}t=J(),$(";"),e.push(t)}function H(){if($("="),E=J(),!(z="proto3"===E)&&"proto2"!==E)throw R(E,"syntax");$(";")}function K(e,t){switch(t){case"option":return ee(e,t),$(";"),!0;case"message":return Z(e,t),!0;case"enum":return Y(e,t),!0;case"service":return function(e,t){if(!k.test(t=M()))throw R(t,"service name");var r=new u(t);X(r,(function(e){if(!K(r,e)){if("rpc"!==e)throw R(e);!function(e,t){var r=B(),n=t;if(!k.test(t=M()))throw R(t,"name");var o,i,s,a,c=t;$("("),$("stream",!0)&&(i=!0);if(!_.test(t=M()))throw R(t);o=t,$(")"),$("returns"),$("("),$("stream",!0)&&(a=!0);if(!_.test(t=M()))throw R(t);s=t,$(")");var l=new f(c,n,o,s,i,a);l.comment=r,X(l,(function(e){if("option"!==e)throw R(e);ee(l,e),$(";")})),e.add(l)}(r,e)}})),e.add(r)}(e,t),!0;case"extend":return function(e,t){if(!_.test(t=M()))throw R(t,"reference");var r=t;X(null,(function(t){switch(t){case"required":case"repeated":Q(e,t,r);break;case"optional":Q(e,z?"proto3_optional":"optional",r);break;default:if(!z||!_.test(t))throw R(t);D(t),Q(e,"optional",r)}}))}(e,t),!0}return!1}function X(e,t,r){var n=P.line;if(e&&("string"!=typeof e.comment&&(e.comment=B()),e.filename=O.filename),$("{",!0)){for(var o;"}"!==(o=M());)t(o);$(";",!0)}else r&&r(),$(";"),e&&("string"!=typeof e.comment||N)&&(e.comment=B(n)||e.comment)}function Z(e,t){if(!k.test(t=M()))throw R(t,"type name");var r=new i(t);X(r,(function(e){if(!K(r,e))switch(e){case"map":!function(e){$("<");var t=M();if(void 0===p.mapKey[t])throw R(t,"type");$(",");var r=M();if(!_.test(r))throw R(r,"type");$(">");var n=M();if(!k.test(n))throw R(n,"name");$("=");var o=new a(L(n),V(M()),t,r);X(o,(function(e){if("option"!==e)throw R(e);ee(o,e),$(";")}),(function(){ne(o)})),e.add(o)}(r);break;case"required":case"repeated":Q(r,e);break;case"optional":Q(r,z?"proto3_optional":"optional");break;case"oneof":!function(e,t){if(!k.test(t=M()))throw R(t,"name");var r=new c(L(t));X(r,(function(e){"option"===e?(ee(r,e),$(";")):(D(e),Q(r,"optional"))})),e.add(r)}(r,e);break;case"extensions":q(r.extensions||(r.extensions=[]));break;case"reserved":q(r.reserved||(r.reserved=[]),!0);break;default:if(!z||!_.test(e))throw R(e);D(e),Q(r,"optional")}})),e.add(r)}function Q(e,t,r){var n=M();if("group"!==n){for(;n.endsWith(".")||C().startsWith(".");)n+=M();if(!_.test(n))throw R(n,"type");var o=M();if(!k.test(o))throw R(o,"name");o=L(o),$("=");var a=new s(o,V(M()),n,t,r);if(X(a,(function(e){if("option"!==e)throw R(e);ee(a,e),$(";")}),(function(){ne(a)})),"proto3_optional"===t){var l=new c("_"+o);a.setOption("proto3_optional",!0),l.add(a),e.add(l)}else e.add(a);z||!a.repeated||void 0===p.packed[n]&&void 0!==p.basic[n]||a.setOption("packed",!1,!0)}else!function(e,t){var r=M();if(!k.test(r))throw R(r,"name");var n=h.lcFirst(r);r===n&&(r=h.ucFirst(r));$("=");var o=V(M()),a=new i(r);a.group=!0;var c=new s(n,o,r,t);c.filename=O.filename,X(a,(function(e){switch(e){case"option":ee(a,e),$(";");break;case"required":case"repeated":Q(a,e);break;case"optional":Q(a,z?"proto3_optional":"optional");break;case"message":Z(a,e);break;case"enum":Y(a,e);break;default:throw R(e)}})),e.add(a).add(c)}(e,t)}function Y(e,t){if(!k.test(t=M()))throw R(t,"name");var r=new l(t);X(r,(function(e){switch(e){case"option":ee(r,e),$(";");break;case"reserved":q(r.reserved||(r.reserved=[]),!0);break;default:!function(e,t){if(!k.test(t))throw R(t,"name");$("=");var r=V(M(),!0),n={options:void 0,setOption:function(e,t){void 0===this.options&&(this.options={}),this.options[e]=t}};X(n,(function(e){if("option"!==e)throw R(e);ee(n,e),$(";")}),(function(){ne(n)})),e.add(t,r,n.comment,n.options)}(r,e)}})),e.add(r)}function ee(e,t){var r=$("(",!0);if(!_.test(t=M()))throw R(t,"name");var n,o=t,i=o;r&&($(")"),i=o="("+o+")",t=C(),S.test(t)&&(n=t.slice(1),o+=t,M())),$("="),function(e,t,r,n){e.setParsedOption&&e.setParsedOption(t,r,n)}(e,i,te(e,o),n)}function te(e,t){if($("{",!0)){for(var r={};!$("}",!0);){if(!k.test(A=M()))throw R(A,"name");if(null===A)throw R(A,"end of input");var n,o=A;if($(":",!0),"{"===C())n=te(e,t+"."+A);else if("["===C()){var i;if(n=[],$("[",!0)){do{i=U(!0),n.push(i)}while($(",",!0));$("]"),void 0!==i&&re(e,t+"."+A,i)}}else n=U(!0),re(e,t+"."+A,n);var s=r[o];s&&(n=[].concat(s).concat(n)),r[o]=n,$(",",!0),$(";",!0)}return r}var a=U(!0);return re(e,t,a),a}function re(e,t,r){e.setOption&&e.setOption(t,r)}function ne(e){if($("[",!0)){do{ee(e,"option")}while($(",",!0));$("]")}return e}for(;null!==(A=M());)switch(A){case"package":if(!F)throw R(A);W();break;case"import":if(!F)throw R(A);G();break;case"syntax":if(!F)throw R(A);H();break;case"option":ee(I,A),$(";");break;default:if(K(I,A)){F=!1;continue}throw R(A)}return O.filename=null,{package:x,imports:j,weakImports:T,syntax:E,root:t}}},6237:(e,t,r)=>{e.exports=c;var n,o=r(3610),i=o.LongBits,s=o.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function c(e){this.buf=e,this.pos=0,this.len=e.length}var l,u="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new c(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new c(e);throw Error("illegal buffer")},f=function(){return o.Buffer?function(e){return(c.create=function(e){return o.Buffer.isBuffer(e)?new n(e):u(e)})(e)}:u};function p(){var e=new i(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw a(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw a(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function h(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw a(this,8);return new i(h(this.buf,this.pos+=4),h(this.buf,this.pos+=4))}c.create=f(),c.prototype._slice=o.Array.prototype.subarray||o.Array.prototype.slice,c.prototype.uint32=(l=4294967295,function(){if(l=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return l;if(l=(l|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return l;if(l=(l|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return l;if(l=(l|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return l;if(l=(l|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return l;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return l}),c.prototype.int32=function(){return 0|this.uint32()},c.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},c.prototype.bool=function(){return 0!==this.uint32()},c.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return h(this.buf,this.pos+=4)},c.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|h(this.buf,this.pos+=4)},c.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=o.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},c.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=o.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},c.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw a(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(t,r);if(t===r){var n=o.Buffer;return n?n.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,r)},c.prototype.string=function(){var e=this.bytes();return s.read(e,0,e.length)},c.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},c.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},c._configure=function(e){n=e,c.create=f(),n._configure();var t=o.Long?"toLong":"toNumber";o.merge(c.prototype,{int64:function(){return p.call(this)[t](!1)},uint64:function(){return p.call(this)[t](!0)},sint64:function(){return p.call(this).zzDecode()[t](!1)},fixed64:function(){return d.call(this)[t](!0)},sfixed64:function(){return d.call(this)[t](!1)}})}},3158:(e,t,r)=>{e.exports=i;var n=r(6237);(i.prototype=Object.create(n.prototype)).constructor=i;var o=r(3610);function i(e){n.call(this,e)}i._configure=function(){o.Buffer&&(i.prototype._slice=o.Buffer.prototype.slice)},i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},i._configure()},5330:(e,t,r)=>{e.exports=f;var n=r(8923);((f.prototype=Object.create(n.prototype)).constructor=f).className="Root";var o,i,s,a=r(1344),c=r(5643),l=r(1457),u=r(3262);function f(e){n.call(this,"",e),this.deferred=[],this.files=[]}function p(){}f.fromJSON=function(e,t){return t||(t=new f),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},f.prototype.resolvePath=u.path.resolve,f.prototype.fetch=u.fetch,f.prototype.load=function e(t,r,n){"function"==typeof r&&(n=r,r=void 0);var o=this;if(!n)return u.asPromise(e,o,t,r);var a=n===p;function c(e,t){if(n){if(a)throw e;var r=n;n=null,r(e,t)}}function l(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var r=e.substring(t);if(r in s)return r}return null}function f(e,t){try{if(u.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),u.isString(t)){i.filename=e;var n,s=i(t,o,r),f=0;if(s.imports)for(;f<s.imports.length;++f)(n=l(s.imports[f])||o.resolvePath(e,s.imports[f]))&&h(n);if(s.weakImports)for(f=0;f<s.weakImports.length;++f)(n=l(s.weakImports[f])||o.resolvePath(e,s.weakImports[f]))&&h(n,!0)}else o.setOptions(t.options).addJSON(t.nested)}catch(e){c(e)}a||d||c(null,o)}function h(e,t){if(e=l(e)||e,!(o.files.indexOf(e)>-1))if(o.files.push(e),e in s)a?f(e,s[e]):(++d,setTimeout((function(){--d,f(e,s[e])})));else if(a){var r;try{r=u.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||c(e))}f(e,r)}else++d,o.fetch(e,(function(r,i){--d,n&&(r?t?d||c(null,o):c(r):f(e,i))}))}var d=0;u.isString(t)&&(t=[t]);for(var y,m=0;m<t.length;++m)(y=o.resolvePath("",t[m]))&&h(y);if(a)return o;d||c(null,o)},f.prototype.loadSync=function(e,t){if(!u.isNode)throw Error("not supported");return this.load(e,t,p)},f.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(e){return"'extend "+e.extend+"' in "+e.parent.fullName})).join(", "));return n.prototype.resolveAll.call(this)};var h=/^[A-Z]/;function d(e,t){var r=t.parent.lookup(t.extend);if(r){var n=new a(t.fullName,t.id,t.type,t.rule,void 0,t.options);return r.get(n.name)||(n.declaringField=t,t.extensionField=n,r.add(n)),!0}return!1}f.prototype._handleAdd=function(e){if(e instanceof a)void 0===e.extend||e.extensionField||d(0,e)||this.deferred.push(e);else if(e instanceof c)h.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof l)){if(e instanceof o)for(var t=0;t<this.deferred.length;)d(0,this.deferred[t])?this.deferred.splice(t,1):++t;for(var r=0;r<e.nestedArray.length;++r)this._handleAdd(e._nestedArray[r]);h.test(e.name)&&(e.parent[e.name]=e)}},f.prototype._handleRemove=function(e){if(e instanceof a){if(void 0!==e.extend)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}}else if(e instanceof c)h.test(e.name)&&delete e.parent[e.name];else if(e instanceof n){for(var r=0;r<e.nestedArray.length;++r)this._handleRemove(e._nestedArray[r]);h.test(e.name)&&delete e.parent[e.name]}},f._configure=function(e,t,r){o=e,i=t,s=r}},4529:e=>{e.exports={}},5047:(e,t,r)=>{t.Service=r(7595)},7595:(e,t,r)=>{e.exports=o;var n=r(3610);function o(e,t,r){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(r)}(o.prototype=Object.create(n.EventEmitter.prototype)).constructor=o,o.prototype.rpcCall=function e(t,r,o,i,s){if(!i)throw TypeError("request must be specified");var a=this;if(!s)return n.asPromise(e,a,t,r,o,i);if(a.rpcImpl)try{return a.rpcImpl(t,r[a.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(e,r){if(e)return a.emit("error",e,t),s(e);if(null!==r){if(!(r instanceof o))try{r=o[a.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return a.emit("error",e,t),s(e)}return a.emit("data",r,t),s(null,r)}a.end(!0)}))}catch(e){return a.emit("error",e,t),void setTimeout((function(){s(e)}),0)}else setTimeout((function(){s(Error("already ended"))}),0)},o.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},9687:(e,t,r)=>{e.exports=a;var n=r(8923);((a.prototype=Object.create(n.prototype)).constructor=a).className="Service";var o=r(8811),i=r(3262),s=r(5047);function a(e,t){n.call(this,e,t),this.methods={},this._methodsArray=null}function c(e){return e._methodsArray=null,e}a.fromJSON=function(e,t){var r=new a(e,t.options);if(t.methods)for(var n=Object.keys(t.methods),i=0;i<n.length;++i)r.add(o.fromJSON(n[i],t.methods[n[i]]));return t.nested&&r.addJSON(t.nested),r.comment=t.comment,r},a.prototype.toJSON=function(e){var t=n.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return i.toObject(["options",t&&t.options||void 0,"methods",n.arrayToJSON(this.methodsArray,e)||{},"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},Object.defineProperty(a.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=i.toArray(this.methods))}}),a.prototype.get=function(e){return this.methods[e]||n.prototype.get.call(this,e)},a.prototype.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return n.prototype.resolve.call(this)},a.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof o?(this.methods[e.name]=e,e.parent=this,c(this)):n.prototype.add.call(this,e)},a.prototype.remove=function(e){if(e instanceof o){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,c(this)}return n.prototype.remove.call(this,e)},a.prototype.create=function(e,t,r){for(var n,o=new s.Service(e,t,r),a=0;a<this.methodsArray.length;++a){var c=i.lcFirst((n=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"");o[c]=i.codegen(["r","c"],i.isReserved(c)?c+"_":c)("return this.rpcCall(m,q,s,r,c)")({m:n,q:n.resolvedRequestType.ctor,s:n.resolvedResponseType.ctor})}return o}},527:e=>{e.exports=f;var t=/[\s{}=;:[\],'"()<>]/g,r=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,n=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,o=/^ *[*/]+ */,i=/^\s*\*?\/*/,s=/\n/g,a=/\s/,c=/\\(.?)/g,l={0:"\0",r:"\r",n:"\n",t:"\t"};function u(e){return e.replace(c,(function(e,t){switch(t){case"\\":case"":return t;default:return l[t]||""}}))}function f(e,c){e=e.toString();var l=0,f=e.length,p=1,h=0,d={},y=[],m=null;function g(e){return Error("illegal "+e+" (line "+p+")")}function v(t){return e.charAt(t)}function b(t,r,n){var a,l={type:e.charAt(t++),lineEmpty:!1,leading:n},u=t-(c?2:3);do{if(--u<0||"\n"===(a=e.charAt(u))){l.lineEmpty=!0;break}}while(" "===a||"\t"===a);for(var f=e.substring(t,r).split(s),y=0;y<f.length;++y)f[y]=f[y].replace(c?i:o,"").trim();l.text=f.join("\n").trim(),d[p]=l,h=p}function w(t){var r=k(t),n=e.substring(t,r);return/^\s*\/\//.test(n)}function k(e){for(var t=e;t<f&&"\n"!==v(t);)t++;return t}function _(){if(y.length>0)return y.shift();if(m)return function(){var t="'"===m?n:r;t.lastIndex=l-1;var o=t.exec(e);if(!o)throw g("string");return l=t.lastIndex,S(m),m=null,u(o[1])}();var o,i,s,h,d,_=0===l;do{if(l===f)return null;for(o=!1;a.test(s=v(l));)if("\n"===s&&(_=!0,++p),++l===f)return null;if("/"===v(l)){if(++l===f)throw g("comment");if("/"===v(l))if(c){if(h=l,d=!1,w(l-1)){d=!0;do{if((l=k(l))===f)break;if(l++,!_)break}while(w(l))}else l=Math.min(f,k(l)+1);d&&(b(h,l,_),_=!0),p++,o=!0}else{for(d="/"===v(h=l+1);"\n"!==v(++l);)if(l===f)return null;++l,d&&(b(h,l-1,_),_=!0),++p,o=!0}else{if("*"!==(s=v(l)))return"/";h=l+1,d=c||"*"===v(h);do{if("\n"===s&&++p,++l===f)throw g("comment");i=s,s=v(l)}while("*"!==i||"/"!==s);++l,d&&(b(h,l-2,_),_=!0),o=!0}}}while(o);var O=l;if(t.lastIndex=0,!t.test(v(O++)))for(;O<f&&!t.test(v(O));)++O;var x=e.substring(l,l=O);return'"'!==x&&"'"!==x||(m=x),x}function S(e){y.push(e)}function O(){if(!y.length){var e=_();if(null===e)return null;S(e)}return y[0]}return Object.defineProperty({next:_,peek:O,push:S,skip:function(e,t){var r=O();if(r===e)return _(),!0;if(!t)throw g("token '"+r+"', '"+e+"' expected");return!1},cmnt:function(e){var t,r=null;return void 0===e?(t=d[p-1],delete d[p-1],t&&(c||"*"===t.type||t.lineEmpty)&&(r=t.leading?t.text:null)):(h<e&&O(),t=d[e],delete d[e],!t||t.lineEmpty||!c&&"/"!==t.type||(r=t.leading?null:t.text)),r}},"line",{get:function(){return p}})}f.unescape=u},7882:(e,t,r)=>{e.exports=v;var n=r(8923);((v.prototype=Object.create(n.prototype)).constructor=v).className="Type";var o=r(5643),i=r(1457),s=r(1344),a=r(8252),c=r(9687),l=r(2551),u=r(6237),f=r(3449),p=r(3262),h=r(1080),d=r(7728),y=r(420),m=r(744),g=r(6434);function v(e,t){n.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function b(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(v.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var r=this.fields[e[t]],n=r.id;if(this._fieldsById[n])throw Error("duplicate id "+n+" in "+this);this._fieldsById[n]=r}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=p.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=p.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=v.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof l||((e.prototype=new l).constructor=e,p.merge(e.prototype,t)),e.$type=e.prototype.$type=this,p.merge(e,l,!0),this._ctor=e;for(var r=0;r<this.fieldsArray.length;++r)this._fieldsArray[r].resolve();var n={};for(r=0;r<this.oneofsArray.length;++r)n[this._oneofsArray[r].resolve().name]={get:p.oneOfGetter(this._oneofsArray[r].oneof),set:p.oneOfSetter(this._oneofsArray[r].oneof)};r&&Object.defineProperties(e.prototype,n)}}}),v.generateConstructor=function(e){for(var t,r=p.codegen(["p"],e.name),n=0;n<e.fieldsArray.length;++n)(t=e._fieldsArray[n]).map?r("this%s={}",p.safeProp(t.name)):t.repeated&&r("this%s=[]",p.safeProp(t.name));return r("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},v.fromJSON=function(e,t){var r=new v(e,t.options);r.extensions=t.extensions,r.reserved=t.reserved;for(var l=Object.keys(t.fields),u=0;u<l.length;++u)r.add((void 0!==t.fields[l[u]].keyType?a.fromJSON:s.fromJSON)(l[u],t.fields[l[u]]));if(t.oneofs)for(l=Object.keys(t.oneofs),u=0;u<l.length;++u)r.add(i.fromJSON(l[u],t.oneofs[l[u]]));if(t.nested)for(l=Object.keys(t.nested),u=0;u<l.length;++u){var f=t.nested[l[u]];r.add((void 0!==f.id?s.fromJSON:void 0!==f.fields?v.fromJSON:void 0!==f.values?o.fromJSON:void 0!==f.methods?c.fromJSON:n.fromJSON)(l[u],f))}return t.extensions&&t.extensions.length&&(r.extensions=t.extensions),t.reserved&&t.reserved.length&&(r.reserved=t.reserved),t.group&&(r.group=!0),t.comment&&(r.comment=t.comment),r},v.prototype.toJSON=function(e){var t=n.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return p.toObject(["options",t&&t.options||void 0,"oneofs",n.arrayToJSON(this.oneofsArray,e),"fields",n.arrayToJSON(this.fieldsArray.filter((function(e){return!e.declaringField})),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},v.prototype.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var r=this.oneofsArray;for(t=0;t<r.length;)r[t++].resolve();return n.prototype.resolveAll.call(this)},v.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},v.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof s&&void 0===e.extend){if(this._fieldsById?this._fieldsById[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);if(this.isReservedName(e.name))throw Error("name '"+e.name+"' is reserved in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),b(this)}return e instanceof i?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),b(this)):n.prototype.add.call(this,e)},v.prototype.remove=function(e){if(e instanceof s&&void 0===e.extend){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),b(this)}if(e instanceof i){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),b(this)}return n.prototype.remove.call(this,e)},v.prototype.isReservedId=function(e){return n.isReservedId(this.reserved,e)},v.prototype.isReservedName=function(e){return n.isReservedName(this.reserved,e)},v.prototype.create=function(e){return new this.ctor(e)},v.prototype.setup=function(){for(var e=this.fullName,t=[],r=0;r<this.fieldsArray.length;++r)t.push(this._fieldsArray[r].resolve().resolvedType);this.encode=h(this)({Writer:f,types:t,util:p}),this.decode=d(this)({Reader:u,types:t,util:p}),this.verify=y(this)({types:t,util:p}),this.fromObject=m.fromObject(this)({types:t,util:p}),this.toObject=m.toObject(this)({types:t,util:p});var n=g[e];if(n){var o=Object.create(this);o.fromObject=this.fromObject,this.fromObject=n.fromObject.bind(o),o.toObject=this.toObject,this.toObject=n.toObject.bind(o)}return this},v.prototype.encode=function(e,t){return this.setup().encode(e,t)},v.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},v.prototype.decode=function(e,t){return this.setup().decode(e,t)},v.prototype.decodeDelimited=function(e){return e instanceof u||(e=u.create(e)),this.decode(e,e.uint32())},v.prototype.verify=function(e){return this.setup().verify(e)},v.prototype.fromObject=function(e){return this.setup().fromObject(e)},v.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},v.d=function(e){return function(t){p.decorateType(t,e)}}},361:(e,t,r)=>{var n=t,o=r(3262),i=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function s(e,t){var r=0,n={};for(t|=0;r<e.length;)n[i[r+t]]=e[r++];return n}n.basic=s([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),n.defaults=s([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",o.emptyArray,null]),n.long=s([0,0,0,1,1],7),n.mapKey=s([0,0,0,5,5,0,0,0,1,1,0,2],2),n.packed=s([1,5,0,0,0,5,5,0,0,0,1,1,0])},3262:(e,t,r)=>{var n,o,i=e.exports=r(3610),s=r(4529);i.codegen=r(8561),i.fetch=r(5212),i.path=r(9207),i.fs=i.inquire("fs"),i.toArray=function(e){if(e){for(var t=Object.keys(e),r=new Array(t.length),n=0;n<t.length;)r[n]=e[t[n++]];return r}return[]},i.toObject=function(e){for(var t={},r=0;r<e.length;){var n=e[r++],o=e[r++];void 0!==o&&(t[n]=o)}return t};var a=/\\/g,c=/"/g;i.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)},i.safeProp=function(e){return!/^[$\w_]+$/.test(e)||i.isReserved(e)?'["'+e.replace(a,"\\\\").replace(c,'\\"')+'"]':"."+e},i.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var l=/_([a-z])/g;i.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(l,(function(e,t){return t.toUpperCase()}))},i.compareFieldsById=function(e,t){return e.id-t.id},i.decorateType=function(e,t){if(e.$type)return t&&e.$type.name!==t&&(i.decorateRoot.remove(e.$type),e.$type.name=t,i.decorateRoot.add(e.$type)),e.$type;n||(n=r(7882));var o=new n(t||e.name);return i.decorateRoot.add(o),o.ctor=e,Object.defineProperty(e,"$type",{value:o,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:o,enumerable:!1}),o};var u=0;i.decorateEnum=function(e){if(e.$type)return e.$type;o||(o=r(5643));var t=new o("Enum"+u++,e);return i.decorateRoot.add(t),Object.defineProperty(e,"$type",{value:t,enumerable:!1}),t},i.setProperty=function(e,t,r){if("object"!=typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return function e(t,r,n){var o=r.shift();if("__proto__"===o||"prototype"===o)return t;if(r.length>0)t[o]=e(t[o]||{},r,n);else{var i=t[o];i&&(n=[].concat(i).concat(n)),t[o]=n}return t}(e,t=t.split("."),r)},Object.defineProperty(i,"decorateRoot",{get:function(){return s.decorated||(s.decorated=new(r(5330)))}})},2239:(e,t,r)=>{e.exports=o;var n=r(3610);function o(e,t){this.lo=e>>>0,this.hi=t>>>0}var i=o.zero=new o(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var s=o.zeroHash="\0\0\0\0\0\0\0\0";o.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var r=e>>>0,n=(e-r)/4294967296>>>0;return t&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new o(r,n)},o.from=function(e){if("number"==typeof e)return o.fromNumber(e);if(n.isString(e)){if(!n.Long)return o.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new o(e.low>>>0,e.high>>>0):i},o.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},o.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;o.fromHash=function(e){return e===s?i:new o((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},o.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)},o.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},o.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},o.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},3610:function(e,t,r){var n=t;function o(e,t,r){for(var n=Object.keys(t),o=0;o<n.length;++o)void 0!==e[n[o]]&&r||(e[n[o]]=t[n[o]]);return e}function i(e){function t(e,r){if(!(this instanceof t))return new t(e,r);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),r&&o(this,r)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}n.asPromise=r(8045),n.base64=r(8839),n.EventEmitter=r(4358),n.float=r(9410),n.inquire=r(4153),n.utf8=r(1447),n.pool=r(9390),n.LongBits=r(2239),n.isNode=Boolean(void 0!==r.g&&r.g&&r.g.process&&r.g.process.versions&&r.g.process.versions.node),n.global=n.isNode&&r.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isObject=function(e){return e&&"object"==typeof e},n.isset=n.isSet=function(e,t){var r=e[t];return!(null==r||!e.hasOwnProperty(t))&&("object"!=typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"==typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},n.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},n.merge=o,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=i,n.ProtocolError=i("ProtocolError"),n.oneOfGetter=function(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=1;return function(){for(var e=Object.keys(this),r=e.length-1;r>-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},n.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},n.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},n._configure=function(){var e=n.Buffer;e?(n._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,r){return new e(t,r)},n._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):n._Buffer_from=n._Buffer_allocUnsafe=null}},420:(e,t,r)=>{e.exports=function(e){var t=o.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),r=e.oneofsArray,n={};r.length&&t("var p={}");for(var c=0;c<e.fieldsArray.length;++c){var l=e._fieldsArray[c].resolve(),u="m"+o.safeProp(l.name);if(l.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",u,l.name),l.map)t("if(!util.isObject(%s))",u)("return%j",i(l,"object"))("var k=Object.keys(%s)",u)("for(var i=0;i<k.length;++i){"),a(t,l,"k[i]"),s(t,l,c,u+"[k[i]]")("}");else if(l.repeated)t("if(!Array.isArray(%s))",u)("return%j",i(l,"array"))("for(var i=0;i<%s.length;++i){",u),s(t,l,c,u+"[i]")("}");else{if(l.partOf){var f=o.safeProp(l.partOf.name);1===n[l.partOf.name]&&t("if(p%s===1)",f)("return%j",l.partOf.name+": multiple values"),n[l.partOf.name]=1,t("p%s=1",f)}s(t,l,c,u)}l.optional&&t("}")}return t("return null")};var n=r(5643),o=r(3262);function i(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function s(e,t,r,o){if(t.resolvedType)if(t.resolvedType instanceof n){e("switch(%s){",o)("default:")("return%j",i(t,"enum value"));for(var s=Object.keys(t.resolvedType.values),a=0;a<s.length;++a)e("case %i:",t.resolvedType.values[s[a]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s);",r,o)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",o)("return%j",i(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",o,o,o,o)("return%j",i(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',o)("return%j",i(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',o)("return%j",i(t,"boolean"));break;case"string":e("if(!util.isString(%s))",o)("return%j",i(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',o,o,o)("return%j",i(t,"buffer"))}return e}function a(e,t,r){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",r)("return%j",i(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",r)("return%j",i(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",r)("return%j",i(t,"boolean key"))}return e}},6434:(e,t,r)=>{var n=t,o=r(2551);n[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),r=this.lookup(t);if(r){var n="."===e["@type"].charAt(0)?e["@type"].slice(1):e["@type"];return-1===n.indexOf("/")&&(n="/"+n),this.create({type_url:n,value:r.encode(r.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var r="",n="";if(t&&t.json&&e.type_url&&e.value){n=e.type_url.substring(e.type_url.lastIndexOf("/")+1),r=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var i=this.lookup(n);i&&(e=i.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof o){var s=e.$type.toObject(e,t);return""===r&&(r="type.googleapis.com/"),n=r+("."===e.$type.fullName[0]?e.$type.fullName.slice(1):e.$type.fullName),s["@type"]=n,s}return this.toObject(e,t)}}},3449:(e,t,r)=>{e.exports=f;var n,o=r(3610),i=o.LongBits,s=o.base64,a=o.utf8;function c(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function l(){}function u(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function f(){this.len=0,this.head=new c(l,0,0),this.tail=this.head,this.states=null}var p=function(){return o.Buffer?function(){return(f.create=function(){return new n})()}:function(){return new f}};function h(e,t,r){t[r]=255&e}function d(e,t){this.len=e,this.next=void 0,this.val=t}function y(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function m(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}f.create=p(),f.alloc=function(e){return new o.Array(e)},o.Array!==Array&&(f.alloc=o.pool(f.alloc,o.Array.prototype.subarray)),f.prototype._push=function(e,t,r){return this.tail=this.tail.next=new c(e,t,r),this.len+=t,this},d.prototype=Object.create(c.prototype),d.prototype.fn=function(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e},f.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new d((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},f.prototype.int32=function(e){return e<0?this._push(y,10,i.fromNumber(e)):this.uint32(e)},f.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},f.prototype.uint64=function(e){var t=i.from(e);return this._push(y,t.length(),t)},f.prototype.int64=f.prototype.uint64,f.prototype.sint64=function(e){var t=i.from(e).zzEncode();return this._push(y,t.length(),t)},f.prototype.bool=function(e){return this._push(h,1,e?1:0)},f.prototype.fixed32=function(e){return this._push(m,4,e>>>0)},f.prototype.sfixed32=f.prototype.fixed32,f.prototype.fixed64=function(e){var t=i.from(e);return this._push(m,4,t.lo)._push(m,4,t.hi)},f.prototype.sfixed64=f.prototype.fixed64,f.prototype.float=function(e){return this._push(o.float.writeFloatLE,4,e)},f.prototype.double=function(e){return this._push(o.float.writeDoubleLE,8,e)};var g=o.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};f.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(h,1,0);if(o.isString(e)){var r=f.alloc(t=s.length(e));s.decode(e,r,0),e=r}return this.uint32(t)._push(g,t,e)},f.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(h,1,0)},f.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new c(l,0,0),this.len=0,this},f.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 c(l,0,0),this.len=0),this},f.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},f.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},f._configure=function(e){n=e,f.create=p(),n._configure()}},818:(e,t,r)=>{e.exports=i;var n=r(3449);(i.prototype=Object.create(n.prototype)).constructor=i;var o=r(3610);function i(){n.call(this)}function s(e,t,r){e.length<40?o.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}i._configure=function(){i.alloc=o._Buffer_allocUnsafe,i.writeBytesBuffer=o.Buffer&&o.Buffer.prototype instanceof Uint8Array&&"set"===o.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n<e.length;)t[r++]=e[n++]}},i.prototype.bytes=function(e){o.isString(e)&&(e=o._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this},i.prototype.string=function(e){var t=o.Buffer.byteLength(e);return this.uint32(t),t&&this._push(s,t,e),this},i._configure()},2747:e=>{e.exports={stdout:!1,stderr:!1}},1236:(e,t)=>{t.fromCallback=function(e){return Object.defineProperty((function(...t){if("function"!=typeof t[t.length-1])return new Promise(((r,n)=>{t.push(((e,t)=>null!=e?n(e):r(t))),e.apply(this,t)}));e.apply(this,t)}),"name",{value:e.name})},t.fromPromise=function(e){return Object.defineProperty((function(...t){const r=t[t.length-1];if("function"!=typeof r)return e.apply(this,t);t.pop(),e.apply(this,t).then((e=>r(null,e)),r)}),"name",{value:e.name})}},9439:()=>{},4641:()=>{},1853:()=>{},1420:()=>{},7356:()=>{},2336:()=>{},8463:()=>{},5542:()=>{},3217:()=>{},8124:()=>{},6876:()=>{},9007:()=>{},7091:()=>{},8485:()=>{},1006:()=>{},1290:()=>{}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.c=__webpack_module_cache__,__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__=__webpack_require__(__webpack_require__.s=4727),__webpack_exports__ProtobufSerializer=__webpack_exports__.Q;export{__webpack_exports__ProtobufSerializer as ProtobufSerializer};
|
|
1
|
+
/*! For license information please see openhps-protobuf.es.min.js.LICENSE.txt */
|
|
2
|
+
import{ConcreteTypeDescriptor as e,DataSerializer as t,DataSerializerUtils as r,Deserializer as i,NumberType as n,SerializationUtils as o,Serializer as s,TypedJSON as a,UUID as u}from"./openhps-core.es.min.js";var l={6464(e,t,r){e=r.nmd(e);const i=(e,t)=>(...r)=>`[${e(...r)+t}m`,n=(e,t)=>(...r)=>{const i=e(...r);return`[${38+t};5;${i}m`},o=(e,t)=>(...r)=>{const i=e(...r);return`[${38+t};2;${i[0]};${i[1]};${i[2]}m`},s=e=>e,a=(e,t,r)=>[e,t,r],u=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{const i=r();return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0}),i},enumerable:!0,configurable:!0})};let l;const c=(e,t,i,n)=>{void 0===l&&(l=r(734));const o=n?10:0,s={};for(const[r,n]of Object.entries(l)){const a="ansi16"===r?"ansi":r;r===t?s[a]=e(i,o):"object"==typeof n&&(s[a]=e(n[t],o))}return s};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.gray=t.color.blackBright,t.bgColor.bgGray=t.bgColor.bgBlackBright,t.color.grey=t.color.blackBright,t.bgColor.bgGrey=t.bgColor.bgBlackBright;for(const[r,i]of Object.entries(t)){for(const[r,n]of Object.entries(i))t[r]={open:`[${n[0]}m`,close:`[${n[1]}m`},i[r]=t[r],e.set(n[0],n[1]);Object.defineProperty(t,r,{value:i,enumerable:!1})}return Object.defineProperty(t,"codes",{value:e,enumerable:!1}),t.color.close="[39m",t.bgColor.close="[49m",u(t.color,"ansi",()=>c(i,"ansi16",s,!1)),u(t.color,"ansi256",()=>c(n,"ansi256",s,!1)),u(t.color,"ansi16m",()=>c(o,"rgb",a,!1)),u(t.bgColor,"ansi",()=>c(i,"ansi16",s,!0)),u(t.bgColor,"ansi256",()=>c(n,"ansi256",s,!0)),u(t.bgColor,"ansi16m",()=>c(o,"rgb",a,!0)),t}})},2991(e){const t=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,r=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,i=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,n=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,o=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function s(e){const t="u"===e[0],r="{"===e[1];return t&&!r&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):t&&r?String.fromCodePoint(parseInt(e.slice(2,-1),16)):o.get(e)||e}function a(e,t){const r=[],o=t.trim().split(/\s*,\s*/g);let a;for(const t of o){const o=Number(t);if(Number.isNaN(o)){if(!(a=t.match(i)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);r.push(a[2].replace(n,(e,t,r)=>t?s(t):r))}else r.push(o)}return r}function u(e){r.lastIndex=0;const t=[];let i;for(;null!==(i=r.exec(e));){const e=i[1];if(i[2]){const r=a(e,i[2]);t.push([e].concat(r))}else t.push([e])}return t}function l(e,t){const r={};for(const e of t)for(const t of e.styles)r[t[0]]=e.inverse?null:t.slice(1);let i=e;for(const[e,t]of Object.entries(r))if(Array.isArray(t)){if(!(e in i))throw new Error(`Unknown Chalk style: ${e}`);i=t.length>0?i[e](...t):i[e]}return i}e.exports=(e,r)=>{const i=[],n=[];let o=[];if(r.replace(t,(t,r,a,c,f,h)=>{if(r)o.push(s(r));else if(c){const t=o.join("");o=[],n.push(0===i.length?t:l(e,i)(t)),i.push({inverse:a,styles:u(c)})}else if(f){if(0===i.length)throw new Error("Found extraneous } in Chalk template literal");n.push(l(e,i)(o.join(""))),o=[],i.pop()}else o.push(h)}),n.push(o.join("")),i.length>0){const e=`Chalk template literal is missing ${i.length} closing bracket${1===i.length?"":"s"} (\`}\`)`;throw new Error(e)}return n.join("")}},5659(e,t,r){const i=r(8156),n={};for(const e of Object.keys(i))n[i[e]]=e;const o={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=o;for(const e of Object.keys(o)){if(!("channels"in o[e]))throw new Error("missing channels property: "+e);if(!("labels"in o[e]))throw new Error("missing channel labels property: "+e);if(o[e].labels.length!==o[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=o[e];delete o[e].channels,delete o[e].labels,Object.defineProperty(o[e],"channels",{value:t}),Object.defineProperty(o[e],"labels",{value:r})}function s(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}o.rgb.hsl=function(e){const t=e[0]/255,r=e[1]/255,i=e[2]/255,n=Math.min(t,r,i),o=Math.max(t,r,i),s=o-n;let a,u;o===n?a=0:t===o?a=(r-i)/s:r===o?a=2+(i-t)/s:i===o&&(a=4+(t-r)/s),a=Math.min(60*a,360),a<0&&(a+=360);const l=(n+o)/2;return u=o===n?0:l<=.5?s/(o+n):s/(2-o-n),[a,100*u,100*l]},o.rgb.hsv=function(e){let t,r,i,n,o;const s=e[0]/255,a=e[1]/255,u=e[2]/255,l=Math.max(s,a,u),c=l-Math.min(s,a,u),f=function(e){return(l-e)/6/c+.5};return 0===c?(n=0,o=0):(o=c/l,t=f(s),r=f(a),i=f(u),s===l?n=i-r:a===l?n=1/3+t-i:u===l&&(n=2/3+r-t),n<0?n+=1:n>1&&(n-=1)),[360*n,100*o,100*l]},o.rgb.hwb=function(e){const t=e[0],r=e[1];let i=e[2];const n=o.rgb.hsl(e)[0],s=1/255*Math.min(t,Math.min(r,i));return i=1-1/255*Math.max(t,Math.max(r,i)),[n,100*s,100*i]},o.rgb.cmyk=function(e){const t=e[0]/255,r=e[1]/255,i=e[2]/255,n=Math.min(1-t,1-r,1-i);return[100*((1-t-n)/(1-n)||0),100*((1-r-n)/(1-n)||0),100*((1-i-n)/(1-n)||0),100*n]},o.rgb.keyword=function(e){const t=n[e];if(t)return t;let r,o=1/0;for(const t of Object.keys(i)){const n=s(e,i[t]);n<o&&(o=n,r=t)}return r},o.keyword.rgb=function(e){return i[e]},o.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,i=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92;return[100*(.4124*t+.3576*r+.1805*i),100*(.2126*t+.7152*r+.0722*i),100*(.0193*t+.1192*r+.9505*i)]},o.rgb.lab=function(e){const t=o.rgb.xyz(e);let r=t[0],i=t[1],n=t[2];r/=95.047,i/=100,n/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;return[116*i-16,500*(r-i),200*(i-n)]},o.hsl.rgb=function(e){const t=e[0]/360,r=e[1]/100,i=e[2]/100;let n,o,s;if(0===r)return s=255*i,[s,s,s];n=i<.5?i*(1+r):i+r-i*r;const a=2*i-n,u=[0,0,0];for(let e=0;e<3;e++)o=t+1/3*-(e-1),o<0&&o++,o>1&&o--,s=6*o<1?a+6*(n-a)*o:2*o<1?n:3*o<2?a+(n-a)*(2/3-o)*6:a,u[e]=255*s;return u},o.hsl.hsv=function(e){const t=e[0];let r=e[1]/100,i=e[2]/100,n=r;const o=Math.max(i,.01);i*=2,r*=i<=1?i:2-i,n*=o<=1?o:2-o;return[t,100*(0===i?2*n/(o+n):2*r/(i+r)),100*((i+r)/2)]},o.hsv.rgb=function(e){const t=e[0]/60,r=e[1]/100;let i=e[2]/100;const n=Math.floor(t)%6,o=t-Math.floor(t),s=255*i*(1-r),a=255*i*(1-r*o),u=255*i*(1-r*(1-o));switch(i*=255,n){case 0:return[i,u,s];case 1:return[a,i,s];case 2:return[s,i,u];case 3:return[s,a,i];case 4:return[u,s,i];case 5:return[i,s,a]}},o.hsv.hsl=function(e){const t=e[0],r=e[1]/100,i=e[2]/100,n=Math.max(i,.01);let o,s;s=(2-r)*i;const a=(2-r)*n;return o=r*n,o/=a<=1?a:2-a,o=o||0,s/=2,[t,100*o,100*s]},o.hwb.rgb=function(e){const t=e[0]/360;let r=e[1]/100,i=e[2]/100;const n=r+i;let o;n>1&&(r/=n,i/=n);const s=Math.floor(6*t),a=1-i;o=6*t-s,1&s&&(o=1-o);const u=r+o*(a-r);let l,c,f;switch(s){default:case 6:case 0:l=a,c=u,f=r;break;case 1:l=u,c=a,f=r;break;case 2:l=r,c=a,f=u;break;case 3:l=r,c=u,f=a;break;case 4:l=u,c=r,f=a;break;case 5:l=a,c=r,f=u}return[255*l,255*c,255*f]},o.cmyk.rgb=function(e){const t=e[0]/100,r=e[1]/100,i=e[2]/100,n=e[3]/100;return[255*(1-Math.min(1,t*(1-n)+n)),255*(1-Math.min(1,r*(1-n)+n)),255*(1-Math.min(1,i*(1-n)+n))]},o.xyz.rgb=function(e){const t=e[0]/100,r=e[1]/100,i=e[2]/100;let n,o,s;return n=3.2406*t+-1.5372*r+-.4986*i,o=-.9689*t+1.8758*r+.0415*i,s=.0557*t+-.204*r+1.057*i,n=n>.0031308?1.055*n**(1/2.4)-.055:12.92*n,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,n=Math.min(Math.max(0,n),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[255*n,255*o,255*s]},o.xyz.lab=function(e){let t=e[0],r=e[1],i=e[2];t/=95.047,r/=100,i/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*r-16,500*(t-r),200*(r-i)]},o.lab.xyz=function(e){let t,r,i;r=(e[0]+16)/116,t=e[1]/500+r,i=r-e[2]/200;const n=r**3,o=t**3,s=i**3;return r=n>.008856?n:(r-16/116)/7.787,t=o>.008856?o:(t-16/116)/7.787,i=s>.008856?s:(i-16/116)/7.787,t*=95.047,r*=100,i*=108.883,[t,r,i]},o.lab.lch=function(e){const t=e[0],r=e[1],i=e[2];let n;n=360*Math.atan2(i,r)/2/Math.PI,n<0&&(n+=360);return[t,Math.sqrt(r*r+i*i),n]},o.lch.lab=function(e){const t=e[0],r=e[1],i=e[2]/360*2*Math.PI;return[t,r*Math.cos(i),r*Math.sin(i)]},o.rgb.ansi16=function(e,t=null){const[r,i,n]=e;let s=null===t?o.rgb.hsv(e)[2]:t;if(s=Math.round(s/50),0===s)return 30;let a=30+(Math.round(n/255)<<2|Math.round(i/255)<<1|Math.round(r/255));return 2===s&&(a+=60),a},o.hsv.ansi16=function(e){return o.rgb.ansi16(o.hsv.rgb(e),e[2])},o.rgb.ansi256=function(e){const t=e[0],r=e[1],i=e[2];if(t===r&&r===i)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5)},o.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},o.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},o.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},o.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];3===t[0].length&&(r=r.split("").map(e=>e+e).join(""));const i=parseInt(r,16);return[i>>16&255,i>>8&255,255&i]},o.rgb.hcg=function(e){const t=e[0]/255,r=e[1]/255,i=e[2]/255,n=Math.max(Math.max(t,r),i),o=Math.min(Math.min(t,r),i),s=n-o;let a,u;return a=s<1?o/(1-s):0,u=s<=0?0:n===t?(r-i)/s%6:n===r?2+(i-t)/s:4+(t-r)/s,u/=6,u%=1,[360*u,100*s,100*a]},o.hsl.hcg=function(e){const t=e[1]/100,r=e[2]/100,i=r<.5?2*t*r:2*t*(1-r);let n=0;return i<1&&(n=(r-.5*i)/(1-i)),[e[0],100*i,100*n]},o.hsv.hcg=function(e){const t=e[1]/100,r=e[2]/100,i=t*r;let n=0;return i<1&&(n=(r-i)/(1-i)),[e[0],100*i,100*n]},o.hcg.rgb=function(e){const t=e[0]/360,r=e[1]/100,i=e[2]/100;if(0===r)return[255*i,255*i,255*i];const n=[0,0,0],o=t%1*6,s=o%1,a=1-s;let u=0;switch(Math.floor(o)){case 0:n[0]=1,n[1]=s,n[2]=0;break;case 1:n[0]=a,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=s;break;case 3:n[0]=0,n[1]=a,n[2]=1;break;case 4:n[0]=s,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=a}return u=(1-r)*i,[255*(r*n[0]+u),255*(r*n[1]+u),255*(r*n[2]+u)]},o.hcg.hsv=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);let i=0;return r>0&&(i=t/r),[e[0],100*i,100*r]},o.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let i=0;return r>0&&r<.5?i=t/(2*r):r>=.5&&r<1&&(i=t/(2*(1-r))),[e[0],100*i,100*r]},o.hcg.hwb=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},o.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,i=r-t;let n=0;return i<1&&(n=(r-i)/(1-i)),[e[0],100*i,100*n]},o.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},o.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},o.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},o.gray.hsl=function(e){return[0,0,e[0]]},o.gray.hsv=o.gray.hsl,o.gray.hwb=function(e){return[0,100,e[0]]},o.gray.cmyk=function(e){return[0,0,0,e[0]]},o.gray.lab=function(e){return[e[0],0,0]},o.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},o.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},734(e,t,r){const i=r(5659),n=r(8507),o={};Object.keys(i).forEach(e=>{o[e]={},Object.defineProperty(o[e],"channels",{value:i[e].channels}),Object.defineProperty(o[e],"labels",{value:i[e].labels});const t=n(e);Object.keys(t).forEach(r=>{const i=t[r];o[e][r]=function(e){const t=function(...t){const r=t[0];if(null==r)return r;r.length>1&&(t=r);const i=e(t);if("object"==typeof i)for(let e=i.length,t=0;t<e;t++)i[t]=Math.round(i[t]);return i};return"conversion"in e&&(t.conversion=e.conversion),t}(i),o[e][r].raw=function(e){const t=function(...t){const r=t[0];return null==r?r:(r.length>1&&(t=r),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(i)})}),e.exports=o},8507(e,t,r){const i=r(5659);function n(e){const t=function(){const e={},t=Object.keys(i);for(let r=t.length,i=0;i<r;i++)e[t[i]]={distance:-1,parent:null};return e}(),r=[e];for(t[e].distance=0;r.length;){const e=r.pop(),n=Object.keys(i[e]);for(let i=n.length,o=0;o<i;o++){const i=n[o],s=t[i];-1===s.distance&&(s.distance=t[e].distance+1,s.parent=e,r.unshift(i))}}return t}function o(e,t){return function(r){return t(e(r))}}function s(e,t){const r=[t[e].parent,e];let n=i[t[e].parent][e],s=t[e].parent;for(;t[s].parent;)r.unshift(t[s].parent),n=o(i[t[s].parent][s],n),s=t[s].parent;return n.conversion=r,n}e.exports=function(e){const t=n(e),r={},i=Object.keys(t);for(let e=i.length,n=0;n<e;n++){const e=i[n];null!==t[e].parent&&(r[e]=s(e,t))}return r}},8156(e){e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},3876(e,t,r){const i=r(1420),n=r(7356),o=r(3798).mkdirsSync,s=r(7211).n,a=r(6462);function u(e,t,r,o){const s=(o.dereference?i.statSync:i.lstatSync)(t);if(s.isDirectory())return function(e,t,r,n,o){return t?f(r,n,o):function(e,t,r,n){return i.mkdirSync(r),f(t,r,n),c(r,e)}(e.mode,r,n,o)}(s,e,t,r,o);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return function(e,t,r,n,o){return t?function(e,t,r,n){if(n.overwrite)return i.unlinkSync(r),l(e,t,r,n);if(n.errorOnExist)throw new Error(`'${r}' already exists`)}(e,r,n,o):l(e,r,n,o)}(s,e,t,r,o);if(s.isSymbolicLink())return function(e,t,r,o){let s=i.readlinkSync(t);o.dereference&&(s=n.resolve(process.cwd(),s));if(e){let e;try{e=i.readlinkSync(r)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return i.symlinkSync(s,r);throw e}if(o.dereference&&(e=n.resolve(process.cwd(),e)),s!==e){if(a.isSrcSubdir(s,e))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${e}'.`);if(a.isSrcSubdir(e,s))throw new Error(`Cannot overwrite '${e}' with '${s}'.`)}return function(e,t){return i.unlinkSync(t),i.symlinkSync(e,t)}(s,r)}return i.symlinkSync(s,r)}(e,t,r,o);if(s.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);if(s.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}function l(e,t,r,n){return i.copyFileSync(t,r),n.preserveTimestamps&&function(e,t,r){(function(e){return!(128&e)})(e)&&function(e,t){c(e,128|t)}(r,e);(function(e,t){const r=i.statSync(e);s(t,r.atime,r.mtime)})(t,r)}(e.mode,t,r),c(r,e.mode)}function c(e,t){return i.chmodSync(e,t)}function f(e,t,r){const n=i.opendirSync(e);try{let i;for(;null!==(i=n.readSync());)h(i.name,e,t,r)}finally{n.closeSync()}}function h(e,t,r,i){const o=n.join(t,e),s=n.join(r,e);if(i.filter&&!i.filter(o,s))return;const{destStat:l}=a.checkPathsSync(o,s,"copy",i);return u(l,o,s,i)}e.exports=function(e,t,r){"function"==typeof r&&(r={filter:r}),(r=r||{}).clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0002");const{srcStat:s,destStat:l}=a.checkPathsSync(e,t,"copy",r);if(a.checkParentPathsSync(e,s,t,"copy"),r.filter&&!r.filter(e,t))return;const c=n.dirname(t);return i.existsSync(c)||o(c),u(l,e,t,r)}},4994(e,t,r){const i=r(8737),n=r(7356),{mkdirs:o}=r(3798),{pathExists:s}=r(9288),{utimesMillis:a}=r(7211),u=r(6462),{asyncIteratorConcurrentProcess:l}=r(6322);async function c(e,t,r){return!r.filter||r.filter(e,t)}async function f(e,t,r,o){const s=o.dereference?i.stat:i.lstat,a=await s(t);if(a.isDirectory())return async function(e,t,r,o,s){t||await i.mkdir(o);await l(await i.opendir(r),async e=>{const t=n.join(r,e.name),i=n.join(o,e.name);if(await c(t,i,s)){const{destStat:e}=await u.checkPaths(t,i,"copy",s);await f(e,t,i,s)}}),t||await i.chmod(o,e.mode)}(a,e,t,r,o);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return async function(e,t,r,n,o){if(!t)return h(e,r,n,o);if(o.overwrite)return await i.unlink(n),h(e,r,n,o);if(o.errorOnExist)throw new Error(`'${n}' already exists`)}(a,e,t,r,o);if(a.isSymbolicLink())return async function(e,t,r,o){let s=await i.readlink(t);o.dereference&&(s=n.resolve(process.cwd(),s));if(!e)return i.symlink(s,r);let a=null;try{a=await i.readlink(r)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return i.symlink(s,r);throw e}o.dereference&&(a=n.resolve(process.cwd(),a));if(s!==a){if(u.isSrcSubdir(s,a))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${a}'.`);if(u.isSrcSubdir(a,s))throw new Error(`Cannot overwrite '${a}' with '${s}'.`)}return await i.unlink(r),i.symlink(s,r)}(e,t,r,o);if(a.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);if(a.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}async function h(e,t,r,n){if(await i.copyFile(t,r),n.preserveTimestamps){128&e.mode||await function(e,t){return i.chmod(e,128|t)}(r,e.mode);const n=await i.stat(t);await a(r,n.atime,n.mtime)}return i.chmod(r,e.mode)}e.exports=async function(e,t,r={}){"function"==typeof r&&(r={filter:r}),r.clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0001");const{srcStat:i,destStat:a}=await u.checkPaths(e,t,"copy",r);if(await u.checkParentPaths(e,i,t,"copy"),!await c(e,t,r))return;const l=n.dirname(t);await s(l)||await o(l),await f(a,e,t,r)}},4423(e,t,r){const i=r(1236).fromPromise;e.exports={copy:i(r(4994)),copySync:r(3876)}},2591(e,t,r){const i=r(1236).fromPromise,n=r(8737),o=r(2336),s=r(3798),a=r(5422),u=i(async function(e){let t;try{t=await n.readdir(e)}catch(t){if("ENOENT"!==t.code)throw t;return s.mkdirs(e)}return Promise.all(t.map(t=>a.remove(o.join(e,t))))});function l(e){let t;try{t=n.readdirSync(e)}catch(t){if("ENOENT"!==t.code)throw t;return s.mkdirsSync(e)}t.forEach(t=>{t=o.join(e,t),a.removeSync(t)})}e.exports={emptyDirSync:l,emptydirSync:l,emptyDir:u,emptydir:u}},9616(e,t,r){const i=r(1236).fromPromise,n=r(8463),o=r(8737),s=r(3798);e.exports={createFile:i(async function(e){let t;try{t=await o.stat(e)}catch{}if(t&&t.isFile())return;const r=n.dirname(e);let i=null;try{i=await o.stat(r)}catch(t){if("ENOENT"===t.code)return await s.mkdirs(r),void await o.writeFile(e,"");throw t}i.isDirectory()?await o.writeFile(e,""):await o.readdir(r)}),createFileSync:function(e){let t;try{t=o.statSync(e)}catch{}if(t&&t.isFile())return;const r=n.dirname(e);try{o.statSync(r).isDirectory()||o.readdirSync(r)}catch(e){if(!e||"ENOENT"!==e.code)throw e;s.mkdirsSync(r)}o.writeFileSync(e,"")}}},6288(e,t,r){const{createFile:i,createFileSync:n}=r(9616),{createLink:o,createLinkSync:s}=r(1522),{createSymlink:a,createSymlinkSync:u}=r(5291);e.exports={createFile:i,createFileSync:n,ensureFile:i,ensureFileSync:n,createLink:o,createLinkSync:s,ensureLink:o,ensureLinkSync:s,createSymlink:a,createSymlinkSync:u,ensureSymlink:a,ensureSymlinkSync:u}},1522(e,t,r){const i=r(1236).fromPromise,n=r(8463),o=r(8737),s=r(3798),{pathExists:a}=r(9288),{areIdentical:u}=r(6462);e.exports={createLink:i(async function(e,t){let r,i;try{r=await o.lstat(t,{bigint:!0})}catch{}try{i=await o.lstat(e,{bigint:!0})}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}if(r&&u(i,r))return;const l=n.dirname(t);await a(l)||await s.mkdirs(l),await o.link(e,t)}),createLinkSync:function(e,t){let r;try{r=o.lstatSync(t,{bigint:!0})}catch{}try{const t=o.lstatSync(e,{bigint:!0});if(r&&u(t,r))return}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}const i=n.dirname(t);return o.existsSync(i)||s.mkdirsSync(i),o.linkSync(e,t)}}},3838(e,t,r){const i=r(8463),n=r(8737),{pathExists:o}=r(9288),s=r(1236).fromPromise;e.exports={symlinkPaths:s(async function(e,t){if(i.isAbsolute(e)){try{await n.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureSymlink"),e}return{toCwd:e,toDst:e}}const r=i.dirname(t),s=i.join(r,e);if(await o(s))return{toCwd:s,toDst:e};try{await n.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureSymlink"),e}return{toCwd:e,toDst:i.relative(r,e)}}),symlinkPathsSync:function(e,t){if(i.isAbsolute(e)){if(!n.existsSync(e))throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}const r=i.dirname(t),o=i.join(r,e);if(n.existsSync(o))return{toCwd:o,toDst:e};if(!n.existsSync(e))throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:i.relative(r,e)}}}},7064(e,t,r){const i=r(8737),n=r(1236).fromPromise;e.exports={symlinkType:n(async function(e,t){if(t)return t;let r;try{r=await i.lstat(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}),symlinkTypeSync:function(e,t){if(t)return t;let r;try{r=i.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}}},5291(e,t,r){const i=r(1236).fromPromise,n=r(8463),o=r(8737),{mkdirs:s,mkdirsSync:a}=r(3798),{symlinkPaths:u,symlinkPathsSync:l}=r(3838),{symlinkType:c,symlinkTypeSync:f}=r(7064),{pathExists:h}=r(9288),{areIdentical:p}=r(6462);e.exports={createSymlink:i(async function(e,t,r){let i;try{i=await o.lstat(t)}catch{}if(i&&i.isSymbolicLink()){let r,i;if(n.isAbsolute(e))r=await o.stat(e,{bigint:!0});else{const i=n.dirname(t),s=n.join(i,e);try{r=await o.stat(s,{bigint:!0})}catch{r=await o.stat(e,{bigint:!0})}}try{i=await o.stat(t,{bigint:!0})}catch(e){if("ENOENT"!==e.code)throw e}if(i&&p(r,i))return}const a=await u(e,t);e=a.toDst;const l=await c(a.toCwd,r),f=n.dirname(t);return await h(f)||await s(f),o.symlink(e,t,l)}),createSymlinkSync:function(e,t,r){let i;try{i=o.lstatSync(t)}catch{}if(i&&i.isSymbolicLink()){let r,i;if(n.isAbsolute(e))r=o.statSync(e,{bigint:!0});else{const i=n.dirname(t),s=n.join(i,e);try{r=o.statSync(s,{bigint:!0})}catch{r=o.statSync(e,{bigint:!0})}}try{i=o.statSync(t,{bigint:!0})}catch(e){if("ENOENT"!==e.code)throw e}if(i&&p(r,i))return}const s=l(e,t);e=s.toDst,r=f(s.toCwd,r);const u=n.dirname(t);return o.existsSync(u)||a(u),o.symlinkSync(e,t,r)}}},8737(e,t,r){const i=r(1236).fromCallback,n=r(5542),o=["access","appendFile","chmod","chown","close","copyFile","cp","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","glob","lchmod","lchown","lutimes","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","statfs","symlink","truncate","unlink","utimes","writeFile"].filter(e=>"function"==typeof n[e]);Object.assign(t,n),o.forEach(e=>{t[e]=i(n[e])}),t.exists=function(e,t){return"function"==typeof t?n.exists(e,t):new Promise(t=>n.exists(e,t))},t.read=function(e,t,r,i,o,s){return"function"==typeof s?n.read(e,t,r,i,o,s):new Promise((s,a)=>{n.read(e,t,r,i,o,(e,t,r)=>{if(e)return a(e);s({bytesRead:t,buffer:r})})})},t.write=function(e,t,...r){return"function"==typeof r[r.length-1]?n.write(e,t,...r):new Promise((i,o)=>{n.write(e,t,...r,(e,t,r)=>{if(e)return o(e);i({bytesWritten:t,buffer:r})})})},t.readv=function(e,t,...r){return"function"==typeof r[r.length-1]?n.readv(e,t,...r):new Promise((i,o)=>{n.readv(e,t,...r,(e,t,r)=>{if(e)return o(e);i({bytesRead:t,buffers:r})})})},t.writev=function(e,t,...r){return"function"==typeof r[r.length-1]?n.writev(e,t,...r):new Promise((i,o)=>{n.writev(e,t,...r,(e,t,r)=>{if(e)return o(e);i({bytesWritten:t,buffers:r})})})},"function"==typeof n.realpath.native?t.realpath.native=i(n.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")},3376(e,t,r){const i=r(1236).fromPromise,n=r(2934);n.outputJson=i(r(6426)),n.outputJsonSync=r(2188),n.outputJSON=n.outputJson,n.outputJSONSync=n.outputJsonSync,n.writeJSON=n.writeJson,n.writeJSONSync=n.writeJsonSync,n.readJSON=n.readJson,n.readJSONSync=n.readJsonSync,e.exports=n},2934(e,t,r){const i=r(2909);e.exports={readJson:i.readFile,readJsonSync:i.readFileSync,writeJson:i.writeFile,writeJsonSync:i.writeFileSync}},2188(e,t,r){const{stringify:i}=r(1144),{outputFileSync:n}=r(7024);e.exports=function(e,t,r){const o=i(t,r);n(e,o,r)}},6426(e,t,r){const{stringify:i}=r(1144),{outputFile:n}=r(7024);e.exports=async function(e,t,r={}){const o=i(t,r);await n(e,o,r)}},3798(e,t,r){const i=r(1236).fromPromise,{makeDir:n,makeDirSync:o}=r(8916),s=i(n);e.exports={mkdirs:s,mkdirsSync:o,mkdirp:s,mkdirpSync:o,ensureDir:s,ensureDirSync:o}},8916(e,t,r){const i=r(8737),{checkPath:n}=r(7111),o=e=>"number"==typeof e?e:{mode:511,...e}.mode;e.exports.makeDir=async(e,t)=>(n(e),i.mkdir(e,{mode:o(t),recursive:!0})),e.exports.makeDirSync=(e,t)=>(n(e),i.mkdirSync(e,{mode:o(t),recursive:!0}))},7111(e,t,r){const i=r(3217);e.exports.checkPath=function(e){if("win32"===process.platform){if(/[<>:"|?*]/.test(e.replace(i.parse(e).root,""))){const t=new Error(`Path contains invalid characters: ${e}`);throw t.code="EINVAL",t}}}},2455(e,t,r){const i=r(1236).fromPromise;e.exports={move:i(r(3314)),moveSync:r(6244)}},6244(e,t,r){const i=r(8124),n=r(6876),o=r(4423).copySync,s=r(5422).removeSync,a=r(3798).mkdirpSync,u=r(6462);function l(e,t,r){try{i.renameSync(e,t)}catch(i){if("EXDEV"!==i.code)throw i;return function(e,t,r){const i={overwrite:r,errorOnExist:!0,preserveTimestamps:!0};return o(e,t,i),s(e)}(e,t,r)}}e.exports=function(e,t,r){const o=(r=r||{}).overwrite||r.clobber||!1,{srcStat:c,isChangingCase:f=!1}=u.checkPathsSync(e,t,"move",r);return u.checkParentPathsSync(e,c,t,"move"),function(e){const t=n.dirname(e);return n.parse(t).root===t}(t)||a(n.dirname(t)),function(e,t,r,n){if(n)return l(e,t,r);if(r)return s(t),l(e,t,r);if(i.existsSync(t))throw new Error("dest already exists.");return l(e,t,r)}(e,t,o,f)}},3314(e,t,r){const i=r(8737),n=r(6876),{copy:o}=r(4423),{remove:s}=r(5422),{mkdirp:a}=r(3798),{pathExists:u}=r(9288),l=r(6462);e.exports=async function(e,t,r={}){const c=r.overwrite||r.clobber||!1,{srcStat:f,isChangingCase:h=!1}=await l.checkPaths(e,t,"move",r);await l.checkParentPaths(e,f,t,"move");const p=n.dirname(t);return n.parse(p).root!==p&&await a(p),async function(e,t,r,n){if(!n)if(r)await s(t);else if(await u(t))throw new Error("dest already exists.");try{await i.rename(e,t)}catch(i){if("EXDEV"!==i.code)throw i;await async function(e,t,r){const i={overwrite:r,errorOnExist:!0,preserveTimestamps:!0};return await o(e,t,i),s(e)}(e,t,r)}}(e,t,c,h)}},7024(e,t,r){const i=r(1236).fromPromise,n=r(8737),o=r(9007),s=r(3798),a=r(9288).pathExists;e.exports={outputFile:i(async function(e,t,r="utf-8"){const i=o.dirname(e);return await a(i)||await s.mkdirs(i),n.writeFile(e,t,r)}),outputFileSync:function(e,...t){const r=o.dirname(e);n.existsSync(r)||s.mkdirsSync(r),n.writeFileSync(e,...t)}}},9288(e,t,r){const i=r(1236).fromPromise,n=r(8737);e.exports={pathExists:i(function(e){return n.access(e).then(()=>!0).catch(()=>!1)}),pathExistsSync:n.existsSync}},5422(e,t,r){const i=r(7091),n=r(1236).fromCallback;e.exports={remove:n(function(e,t){i.rm(e,{recursive:!0,force:!0},t)}),removeSync:function(e){i.rmSync(e,{recursive:!0,force:!0})}}},6322(e){e.exports={asyncIteratorConcurrentProcess:async function(e,t){const r=[];for await(const i of e)r.push(t(i).then(()=>null,e=>e??new Error("unknown error")));await Promise.all(r.map(e=>e.then(e=>{if(null!==e)throw e})))}}},6462(e,t,r){const i=r(8737),n=r(8485),o=r(1236).fromPromise;function s(e,t){return e.toLowerCase().normalize("NFC")===t.toLowerCase().normalize("NFC")}function a(e,t){return void 0!==t.ino&&void 0!==t.dev&&t.ino===e.ino&&t.dev===e.dev}function u(e,t){const r=n.resolve(e).split(n.sep).filter(e=>e),i=n.resolve(t).split(n.sep).filter(e=>e);return r.every((e,t)=>i[t]===e)}function l(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}e.exports={checkPaths:o(async function(e,t,r,o){const{srcStat:c,destStat:f}=await function(e,t,r){const n=r.dereference?e=>i.stat(e,{bigint:!0}):e=>i.lstat(e,{bigint:!0});return Promise.all([n(e),n(t).catch(e=>{if("ENOENT"===e.code)return null;throw e})]).then(([e,t])=>({srcStat:e,destStat:t}))}(e,t,o);if(f){if(a(c,f)){const i=n.basename(e),o=n.basename(t);if("move"===r&&i!==o&&s(i,o))return{srcStat:c,destStat:f,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(c.isDirectory()&&!f.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!c.isDirectory()&&f.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(c.isDirectory()&&u(e,t))throw new Error(l(e,t,r));return{srcStat:c,destStat:f}}),checkPathsSync:function(e,t,r,o){const{srcStat:c,destStat:f}=function(e,t,r){let n;const o=r.dereference?e=>i.statSync(e,{bigint:!0}):e=>i.lstatSync(e,{bigint:!0}),s=o(e);try{n=o(t)}catch(e){if("ENOENT"===e.code)return{srcStat:s,destStat:null};throw e}return{srcStat:s,destStat:n}}(e,t,o);if(f){if(a(c,f)){const i=n.basename(e),o=n.basename(t);if("move"===r&&i!==o&&s(i,o))return{srcStat:c,destStat:f,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(c.isDirectory()&&!f.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!c.isDirectory()&&f.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(c.isDirectory()&&u(e,t))throw new Error(l(e,t,r));return{srcStat:c,destStat:f}},checkParentPaths:o(async function e(t,r,o,s){const u=n.resolve(n.dirname(t)),c=n.resolve(n.dirname(o));if(c===u||c===n.parse(c).root)return;let f;try{f=await i.stat(c,{bigint:!0})}catch(i){if("ENOENT"===i.code)return e(t,r,c,s);throw i}if(a(r,f))throw new Error(l(t,o,s));return e(t,r,c,s)}),checkParentPathsSync:function e(t,r,o,s){const u=n.resolve(n.dirname(t)),c=n.resolve(n.dirname(o));if(c===u||c===n.parse(c).root)return;let f;try{f=i.statSync(c,{bigint:!0})}catch(i){if("ENOENT"===i.code)return e(t,r,c,s);throw i}if(a(r,f))throw new Error(l(t,o,s));return e(t,r,c,s)},isSrcSubdir:u,areIdentical:a}},7211(e,t,r){const i=r(8737),n=r(1236).fromPromise;e.exports={utimesMillis:n(async function(e,t,r){const n=await i.open(e,"r+");let o=null;try{await i.futimes(n,t,r)}catch(e){o=e}finally{try{await i.close(n)}catch(e){o||(o=e)}}if(o)throw o}),n:function(e,t,r){const n=i.openSync(e,"r+");let o=null;try{i.futimesSync(n,t,r)}catch(e){o=e}finally{try{i.closeSync(n)}catch(e){o||(o=e)}}if(o)throw o}}},2909(e,t,r){let i;try{i=r(1290)}catch(e){i=r(1006)}const n=r(1236),{stringify:o,stripBom:s}=r(1144);const a=n.fromPromise(async function(e,t={}){"string"==typeof t&&(t={encoding:t});const r=t.fs||i,o=!("throws"in t)||t.throws;let a,u=await n.fromCallback(r.readFile)(e,t);u=s(u);try{a=JSON.parse(u,t?t.reviver:null)}catch(t){if(o)throw t.message=`${e}: ${t.message}`,t;return null}return a});const u=n.fromPromise(async function(e,t,r={}){const s=r.fs||i,a=o(t,r);await n.fromCallback(s.writeFile)(e,a,r)});e.exports={readFile:a,readFileSync:function(e,t={}){"string"==typeof t&&(t={encoding:t});const r=t.fs||i,n=!("throws"in t)||t.throws;try{let i=r.readFileSync(e,t);return i=s(i),JSON.parse(i,t.reviver)}catch(t){if(n)throw t.message=`${e}: ${t.message}`,t;return null}},writeFile:u,writeFileSync:function(e,t,r={}){const n=r.fs||i,s=o(t,r);return n.writeFileSync(e,s,r)}}},1144(e){e.exports={stringify:function(e,{EOL:t="\n",finalEOL:r=!0,replacer:i=null,spaces:n}={}){const o=r?t:"",s=JSON.stringify(e,i,n);if(void 0===s)throw new TypeError(`Converting ${typeof e} value to JSON is not supported`);return s.replace(/\n/g,t)+o},stripBom:function(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}}},1236(e,t){t.fromCallback=function(e){return Object.defineProperty(function(...t){if("function"!=typeof t[t.length-1])return new Promise((r,i)=>{t.push((e,t)=>null!=e?i(e):r(t)),e.apply(this,t)});e.apply(this,t)},"name",{value:e.name})},t.fromPromise=function(e){return Object.defineProperty(function(...t){const r=t[t.length-1];if("function"!=typeof r)return e.apply(this,t);t.pop(),e.apply(this,t).then(e=>r(null,e),r)},"name",{value:e.name})}},9439(){},4641(){},1853(){},1420(){},7356(){},2336(){},8463(){},5542(){},3217(){},8124(){},6876(){},9007(){},7091(){},8485(){},1006(){},1290(){},3454(){},5017(e,t){var r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=function(){var e={};return function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function r(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}function i(e){return!0===(e&&e.__isLong__)}function n(e){var t=Math.clz32(e&-e);return e?31-t:t}r.prototype.__isLong__,Object.defineProperty(r.prototype,"__isLong__",{value:!0}),r.isLong=i;var o={},s={};function a(e,t){var r,i,n;return t?(n=0<=(e>>>=0)&&e<256)&&(i=s[e])?i:(r=l(e,0,!0),n&&(s[e]=r),r):(n=-128<=(e|=0)&&e<128)&&(i=o[e])?i:(r=l(e,e<0?-1:0,!1),n&&(o[e]=r),r)}function u(e,t){if(isNaN(e))return t?b:v;if(t){if(e<0)return b;if(e>=y)return j}else{if(e<=-m)return E;if(e+1>=m)return _}return e<0?u(-e,t).neg():l(e%d|0,e/d|0,t)}function l(e,t,i){return new r(e,t,i)}r.fromInt=a,r.fromNumber=u,r.fromBits=l;var c=Math.pow;function f(e,t,r){if(0===e.length)throw Error("empty string");if("number"==typeof t?(r=t,t=!1):t=!!t,"NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return t?b:v;if((r=r||10)<2||36<r)throw RangeError("radix");var i;if((i=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return f(e.substring(1),t,r).neg();for(var n=u(c(r,8)),o=v,s=0;s<e.length;s+=8){var a=Math.min(8,e.length-s),l=parseInt(e.substring(s,s+a),r);if(a<8){var h=u(c(r,a));o=o.mul(h).add(u(l))}else o=(o=o.mul(n)).add(u(l))}return o.unsigned=t,o}function h(e,t){return"number"==typeof e?u(e,t):"string"==typeof e?f(e,t):l(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}r.fromString=f,r.fromValue=h;var p=65536,d=p*p,y=d*d,m=y/2,g=a(1<<24),v=a(0);r.ZERO=v;var b=a(0,!0);r.UZERO=b;var w=a(1);r.ONE=w;var O=a(1,!0);r.UONE=O;var k=a(-1);r.NEG_ONE=k;var _=l(-1,2147483647,!1);r.MAX_VALUE=_;var j=l(-1,-1,!0);r.MAX_UNSIGNED_VALUE=j;var E=l(0,-2147483648,!1);r.MIN_VALUE=E;var S=r.prototype;S.toInt=function(){return this.unsigned?this.low>>>0:this.low},S.toNumber=function(){return this.unsigned?(this.high>>>0)*d+(this.low>>>0):this.high*d+(this.low>>>0)},S.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(E)){var t=u(e),r=this.div(t),i=r.mul(t).sub(this);return r.toString(e)+i.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var n=u(c(e,6),this.unsigned),o=this,s="";;){var a=o.div(n),l=(o.sub(a.mul(n)).toInt()>>>0).toString(e);if((o=a).isZero())return l+s;for(;l.length<6;)l="0"+l;s=""+l+s}},S.getHighBits=function(){return this.high},S.getHighBitsUnsigned=function(){return this.high>>>0},S.getLowBits=function(){return this.low},S.getLowBitsUnsigned=function(){return this.low>>>0},S.getNumBitsAbs=function(){if(this.isNegative())return this.eq(E)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&!(e&1<<t);t--);return 0!=this.high?t+33:t+1},S.isSafeInteger=function(){var e=this.high>>21;return!e||!this.unsigned&&-1===e&&!(0===this.low&&-2097152===this.high)},S.isZero=function(){return 0===this.high&&0===this.low},S.eqz=S.isZero,S.isNegative=function(){return!this.unsigned&&this.high<0},S.isPositive=function(){return this.unsigned||this.high>=0},S.isOdd=function(){return!(1&~this.low)},S.isEven=function(){return!(1&this.low)},S.equals=function(e){return i(e)||(e=h(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},S.eq=S.equals,S.notEquals=function(e){return!this.eq(e)},S.neq=S.notEquals,S.ne=S.notEquals,S.lessThan=function(e){return this.comp(e)<0},S.lt=S.lessThan,S.lessThanOrEqual=function(e){return this.comp(e)<=0},S.lte=S.lessThanOrEqual,S.le=S.lessThanOrEqual,S.greaterThan=function(e){return this.comp(e)>0},S.gt=S.greaterThan,S.greaterThanOrEqual=function(e){return this.comp(e)>=0},S.gte=S.greaterThanOrEqual,S.ge=S.greaterThanOrEqual,S.compare=function(e){if(i(e)||(e=h(e)),this.eq(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r?-1:!t&&r?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},S.comp=S.compare,S.negate=function(){return!this.unsigned&&this.eq(E)?E:this.not().add(w)},S.neg=S.negate,S.add=function(e){i(e)||(e=h(e));var t=this.high>>>16,r=65535&this.high,n=this.low>>>16,o=65535&this.low,s=e.high>>>16,a=65535&e.high,u=e.low>>>16,c=0,f=0,p=0,d=0;return p+=(d+=o+(65535&e.low))>>>16,f+=(p+=n+u)>>>16,c+=(f+=r+a)>>>16,c+=t+s,l((p&=65535)<<16|(d&=65535),(c&=65535)<<16|(f&=65535),this.unsigned)},S.subtract=function(e){return i(e)||(e=h(e)),this.add(e.neg())},S.sub=S.subtract,S.multiply=function(e){if(this.isZero())return this;if(i(e)||(e=h(e)),t)return l(t.mul(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned);if(e.isZero())return this.unsigned?b:v;if(this.eq(E))return e.isOdd()?E:v;if(e.eq(E))return this.isOdd()?E:v;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(g)&&e.lt(g))return u(this.toNumber()*e.toNumber(),this.unsigned);var r=this.high>>>16,n=65535&this.high,o=this.low>>>16,s=65535&this.low,a=e.high>>>16,c=65535&e.high,f=e.low>>>16,p=65535&e.low,d=0,y=0,m=0,w=0;return m+=(w+=s*p)>>>16,y+=(m+=o*p)>>>16,m&=65535,y+=(m+=s*f)>>>16,d+=(y+=n*p)>>>16,y&=65535,d+=(y+=o*f)>>>16,y&=65535,d+=(y+=s*c)>>>16,d+=r*p+n*f+o*c+s*a,l((m&=65535)<<16|(w&=65535),(d&=65535)<<16|(y&=65535),this.unsigned)},S.mul=S.multiply,S.divide=function(e){if(i(e)||(e=h(e)),e.isZero())throw Error("division by zero");var r,n,o;if(t)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?l((this.unsigned?t.div_u:t.div_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?b:v;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return b;if(e.gt(this.shru(1)))return O;o=b}else{if(this.eq(E))return e.eq(w)||e.eq(k)?E:e.eq(E)?w:(r=this.shr(1).div(e).shl(1)).eq(v)?e.isNegative()?w:k:(n=this.sub(e.mul(r)),o=r.add(n.div(e)));if(e.eq(E))return this.unsigned?b:v;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();o=v}for(n=this;n.gte(e);){r=Math.max(1,Math.floor(n.toNumber()/e.toNumber()));for(var s=Math.ceil(Math.log(r)/Math.LN2),a=s<=48?1:c(2,s-48),f=u(r),p=f.mul(e);p.isNegative()||p.gt(n);)p=(f=u(r-=a,this.unsigned)).mul(e);f.isZero()&&(f=w),o=o.add(f),n=n.sub(p)}return o},S.div=S.divide,S.modulo=function(e){return i(e)||(e=h(e)),t?l((this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,e.low,e.high),t.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},S.mod=S.modulo,S.rem=S.modulo,S.not=function(){return l(~this.low,~this.high,this.unsigned)},S.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},S.clz=S.countLeadingZeros,S.countTrailingZeros=function(){return this.low?n(this.low):n(this.high)+32},S.ctz=S.countTrailingZeros,S.and=function(e){return i(e)||(e=h(e)),l(this.low&e.low,this.high&e.high,this.unsigned)},S.or=function(e){return i(e)||(e=h(e)),l(this.low|e.low,this.high|e.high,this.unsigned)},S.xor=function(e){return i(e)||(e=h(e)),l(this.low^e.low,this.high^e.high,this.unsigned)},S.shiftLeft=function(e){return i(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?l(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):l(0,this.low<<e-32,this.unsigned)},S.shl=S.shiftLeft,S.shiftRight=function(e){return i(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?l(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):l(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},S.shr=S.shiftRight,S.shiftRightUnsigned=function(e){return i(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?l(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):l(32===e?this.high:this.high>>>e-32,0,this.unsigned)},S.shru=S.shiftRightUnsigned,S.shr_u=S.shiftRightUnsigned,S.rotateLeft=function(e){var t;return i(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?l(this.high,this.low,this.unsigned):e<32?(t=32-e,l(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned)):(t=32-(e-=32),l(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned))},S.rotl=S.rotateLeft,S.rotateRight=function(e){var t;return i(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?l(this.high,this.low,this.unsigned):e<32?(t=32-e,l(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned)):(t=32-(e-=32),l(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned))},S.rotr=S.rotateRight,S.toSigned=function(){return this.unsigned?l(this.low,this.high,!1):this},S.toUnsigned=function(){return this.unsigned?this:l(this.low,this.high,!0)},S.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},S.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},S.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},r.fromBytes=function(e,t,i){return i?r.fromBytesLE(e,t):r.fromBytesBE(e,t)},r.fromBytesLE=function(e,t){return new r(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},r.fromBytesBE=function(e,t){return new r(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)},"function"==typeof BigInt&&(r.fromBigInt=function(e,t){return l(Number(BigInt.asIntN(32,e)),Number(BigInt.asIntN(32,e>>BigInt(32))),t)},r.fromValue=function(e,t){return"bigint"==typeof e?r.fromBigInt(e,t):h(e,t)},S.toBigInt=function(){var e=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|e}),e.default=r}(e),function(e){return e.default||e}(e)}.apply(t,[]),void 0===r||(e.exports=r)},6994(e){e.exports=i;var t,r=/\/|\./;function i(e,t){r.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),i[e]=t}i("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}}),i("duration",{Duration:t={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),i("timestamp",{Timestamp:t}),i("empty",{Empty:{fields:{}}}),i("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,protoName:"null_value"},numberValue:{type:"double",id:2,protoName:"number_value"},stringValue:{type:"string",id:3,protoName:"string_value"},boolValue:{type:"bool",id:4,protoName:"bool_value"},structValue:{type:"Struct",id:5,protoName:"struct_value"},listValue:{type:"ListValue",id:6,protoName:"list_value"}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),i("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}}}}),i("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),i.get=function(e){return i[e]||null}},2235(e,t,r){var i=t,n=r(3990),o=r(9082),s=r(4595);function a(e,t,r,i,o){if(t.resolvedType)if(t.resolvedType instanceof n){var s=o?"m"+o+"[m"+o+".length]":"m"+i;e("switch(d%s){",i);for(var a=t.resolvedType.values,u=Object.keys(a),l=0;l<u.length;++l)e("case%j:",u[l])("case %i:",a[u[l]])("%s=%j",s,a[u[l]])("break");e("default:"),"CLOSED"!==t.resolvedType._features.enum_type&&e('if(typeof d%s==="number"&&(d%s|0)===d%s)',i,i,i)("%s=d%s",s,i),e("}")}else e("if(!util.isObject(d%s))",i)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s,q+1)",i,r,i);else{var c=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",i,i);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",i,i);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",i,i);break;case"uint64":case"fixed64":c=!0;case"int64":case"sint64":case"sfixed64":e("if(util.Long)")("m%s=util.Long.fromValue(d%s,%j)",i,i,c)('else if(typeof d%s==="string")',i)("m%s=parseInt(d%s,10)",i,i)('else if(typeof d%s==="number")',i)("m%s=d%s",i,i)('else if(typeof d%s==="object")',i)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",i,i,i,c?"true":"");break;case"bytes":e('if(typeof d%s==="string")',i)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",i,i,i)("else if(d%s.length>=0)",i)("m%s=d%s",i,i);break;case"string":e("m%s=String(d%s)",i,i);break;case"bool":e("m%s=Boolean(d%s)",i,i)}}return e}function u(e,t,r,i,o){if(o||(o=i),t.resolvedType)t.resolvedType instanceof n?e("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",i,r,o,o,r,o,o):e("d%s=types[%i].toObject(m%s,o,q+1)",i,r,o);else{var s=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",i,o,o,o);break;case"uint64":case"fixed64":s=!0;case"int64":case"sint64":case"sfixed64":e('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()',i,o,o,o,o,s)('else if(typeof m%s==="number")',o)("d%s=o.longs===String?String(m%s):m%s",i,o,o)("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",i,o,o,o,s?"true":"",o);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",i,o,o,o,o);break;default:e("d%s=m%s",i,o)}}return e}i.fromObject=function(e){var t=e.fieldsArray,r=s.codegen(["d","q"])("if(d instanceof C)")("return d")("if(!util.isObject(d))")("throw TypeError(%j)",e.fullName+": object expected")("if(q===undefined)q=0")("if(q>util.recursionLimit)")('throw Error("max depth exceeded")');if(!t.length)return r("return new C");r("var m=new C");for(var i=0;i<t.length;++i){var u=t[i].resolve(),l=s.safeProp(u.name),c=!u.hasPresence&&!u.repeated&&!u.map&&(u.resolvedType instanceof n||void 0!==o.basic[u.type]);u.map?(r("if(d%s){",l)("if(!util.isObject(d%s))",l)("throw TypeError(%j)",u.fullName+": object expected")("m%s={}",l)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",l),r('if(ks[i]==="__proto__")')("util.makeProp(m%s,ks[i])",l),a(r,u,i,l+"[ks[i]]")("}")("}")):u.repeated?(r("if(d%s){",l)("if(!Array.isArray(d%s))",l)("throw TypeError(%j)",u.fullName+": array expected"),u.resolvedType instanceof n?r("m%s=[]",l):r("m%s=Array(d%s.length)",l,l),r("for(var i=0;i<d%s.length;++i){",l),a(r,u,i,l+"[i]",u.resolvedType instanceof n?l:void 0)("}")("}")):(u.resolvedType instanceof n||r("if(d%s!=null){",l),c&&(u.resolvedType instanceof n?r('if(d%s!==%j&&(typeof d%s!=="string"||types[%i].values[d%s]!==%j)){',l,u.typeDefault,l,i,l,u.typeDefault):"string"===u.type?r('if(typeof d%s!=="string"||d%s.length){',l,l):"bytes"===u.type?r("if(d%s.length){",l):"bool"===u.type?r("if(d%s){",l):"double"===u.type||"float"===u.type?r("if(!Object.is(Number(d%s),0)){",l):void 0!==o.long[u.type]?r('if(typeof d%s==="object"?d%s.low||d%s.high:Number(d%s)!==0){',l,l,l,l):r("if(Number(d%s)!==0){",l)),a(r,u,i,l),c&&r("}"),u.resolvedType instanceof n||r("}"))}return r("return m")},i.toObject=function(e){var t=e.fieldsArray.slice().sort(s.compareFieldsById);if(!t.length)return s.codegen()("return {}");for(var r=s.codegen(["m","o","q"])("if(!o)")("o={}")("if(q===undefined)q=0")("if(q>util.recursionLimit)")('throw Error("max depth exceeded")')("var d={}"),i=[],a=[],l=[],c=0;c<t.length;++c)t[c].partOf||(t[c].resolve().repeated?i:t[c].map?a:l).push(t[c]);if(i.length){for(r("if(o.arrays||o.defaults){"),c=0;c<i.length;++c)r("d%s=[]",s.safeProp(i[c].name));r("}")}if(a.length){for(r("if(o.objects||o.defaults){"),c=0;c<a.length;++c)r("d%s={}",s.safeProp(a[c].name));r("}")}if(l.length){for(r("if(o.defaults){"),c=0;c<l.length;++c){var f=l[c],h=s.safeProp(f.name);if(f.resolvedType instanceof n)r("d%s=o.enums===String?%j:%j",h,f.resolvedType.valuesById[f.typeDefault],f.typeDefault);else if(f.long)r("if(util.Long){")("var n=new util.Long(%i,%i,%j)",f.typeDefault.low,f.typeDefault.high,f.typeDefault.unsigned)('d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():typeof BigInt!=="undefined"&&o.longs===BigInt?n.toBigInt():n',h)("}else")('d%s=o.longs===String?%j:typeof BigInt!=="undefined"&&o.longs===BigInt?BigInt(%j):%i',h,f.typeDefault.toString(),f.typeDefault.toString(),f.typeDefault.toNumber());else if(f.bytes){var p=Array.prototype.slice.call(f.typeDefault);r("if(o.bytes===String)d%s=%j",h,s.base64.encode(f.typeDefault,0,f.typeDefault.length))("else{")("d%s=%j",h,p)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",h,h)("}")}else"double"!==f.type&&"float"!==f.type||"number"!=typeof f.typeDefault||isFinite(f.typeDefault)&&!Object.is(f.typeDefault,-0)?r("d%s=%j",h,f.typeDefault):r("d%s=%f",h,f.typeDefault)("if(o.json&&!isFinite(d%s))d%s=String(d%s)",h,h,h)}r("}")}var d=!1;for(c=0;c<t.length;++c){f=t[c];var y=e._fieldsArray.indexOf(f);h=s.safeProp(f.name);if(f.map){d||(d=!0,r("var ks2")),r("if(m%s&&(ks2=Object.keys(m%s)).length){",h,h)("d%s={}",h);var m=void 0!==o.long[f.keyType],g=h+"[ks2[j]]";r("for(var j=0;j<ks2.length;++j){"),m&&r("var k2=util.longFromKey(ks2[j],%j).toString()","uint64"===f.keyType||"fixed64"===f.keyType),r('if(ks2[j]==="__proto__")')("util.makeProp(d%s,ks2[j])",h),u(r,f,y,m?h+"[k2]":g,g)("}")}else f.repeated?(r("if(m%s&&m%s.length){",h,h)("d%s=Array(m%s.length)",h,h)("for(var j=0;j<m%s.length;++j){",h),u(r,f,y,h+"[j]")("}")):(r("if(m%s!=null&&Object.hasOwnProperty.call(m,%j)){",h,f.name),u(r,f,y,h),f.partOf&&!f.partOf.isProto3Optional&&r("if(o.oneofs)")("d%s=%j",s.safeProp(f.partOf.name),f.name));r("}")}return r("return d")}},2759(e,t,r){e.exports=function(e){for(var t=!1,r=!1,l=0;l<e.fieldsArray.length;++l){var c=e._fieldsArray[l];c.map&&(t=!0),(c.resolvedType instanceof i||!c.repeated&&!c.map&&!c.hasPresence)&&(r=!0)}var f=o.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,m"+(t?",k,v":r?",v":""))("if(l===undefined)")("c=r.len")("else{")("c=r.pos+l")("if(c>r.len)")('throw RangeError("index out of range")')("l=r.len")("r.len=c")("}")("m=g||new C")("while(r.pos<c){")("var s=r.pos")("var t=r.tag()")("if(t===z){")("z=undefined")("break")("}");e.fieldsArray.length&&f("var u=t&7")("switch(t>>>=3){");for(l=0;l<e.fieldsArray.length;++l){var h=e._fieldsArray[l].resolve(),p=h.resolvedType instanceof i?"int32":h.type,d="m"+o.safeProp(h.name),y=h.resolvedType instanceof i&&"CLOSED"===h.resolvedType._features.enum_type;if(h.map){f("case %i:{",h.id)("if(u!==2)")("break"),y||f("if(%s===util.emptyObject)",d)("%s={}",d),f("var c2=r.size()+r.pos")("if(c2>r.len)")('throw RangeError("index out of range")')("r.len=c2"),void 0!==n.defaults[h.keyType]?f("k=%j",n.defaults[h.keyType]):f("k=null"),void 0!==n.long[p]?f("v=util.Long?util.Long.fromNumber(0,%j):0","uint64"===p||"fixed64"===p):void 0!==n.defaults[p]?f("v=%j",n.defaults[p]):f("v=null"),f("while(r.pos<c2){")("var t2=r.tag()")("u=t2&7")("switch(t2>>>=3){")("case 1:")("if(u!==%i)",n.mapKey[h.keyType])("break")("k=r.%s()","string"===h.keyType?a(h):h.keyType)("continue")("case 2:")("if(u!==%i)",void 0===n.basic[p]?2:n.basic[p])("break"),void 0===n.basic[p]?f("v=types[%i].decode(r,r.size(),undefined,q+1,v)",l):f("v=r.%s()","string"===p?a(h):p),f("continue")("}")("r.skipType(u,q,t2)")("}"),f("if(r.pos!==c2)")('throw RangeError("index out of range")')("r.len=c"),y&&(f("if(types[%i].valuesById[v]===undefined){",l),u(f,"r.raw(s,r.pos)")("continue")("}")("if(%s===util.emptyObject)",d)("%s={}",d));var m=void 0===n.basic[p]?"v||new types["+l+"].ctor":"v";void 0!==n.long[h.keyType]?f('%s[typeof k==="object"?util.longToHash(k):k]=%s',d,m):("string"===h.keyType&&f('if(k==="__proto__")')("util.makeProp(%s,k)",d),f("%s[k]=%s",d,m))}else h.repeated?(f("case %i:",h.id)("{"),void 0!==n.packed[p]&&(f("if(u===2){"),y?(f("var c2=r.size()+r.pos")("if(c2>r.len)")('throw RangeError("index out of range")')("r.len=c2")("while(r.pos<c2){")("s=r.pos")("v=r.%s()",p)("if(types[%i].valuesById[v]!==undefined){",l)("if(!(%s&&%s.length))",d,d)("%s=[]",d)("%s.push(v)",d)("}else"),u(f,"util.rawField("+h.id+",0,r.raw(s,r.pos))")("}"),f("if(r.pos!==c2)")('throw RangeError("index out of range")')("r.len=c")):f("if(!(%s&&%s.length))",d,d)("%s=[]",d)("r.%ss(%s)",p,d),f("continue")("}")),f("if(u!==%i)",void 0===n.basic[p]?h.delimited?3:2:n.basic[p])("break"),y||f("if(!(%s&&%s.length))",d,d)("%s=[]",d),void 0===n.basic[p]?h.delimited?f("%s.push(types[%i].decode(r,undefined,%i,q+1))",d,l,8*h.id+4):f("%s.push(types[%i].decode(r,r.size(),undefined,q+1))",d,l):y?(f("v=r.%s()",p)("if(types[%i].valuesById[v]!==undefined){",l)("if(!(%s&&%s.length))",d,d)("%s=[]",d)("%s.push(v)",d)("}else"),u(f,"r.raw(s,r.pos)")):f("%s.push(r.%s())",d,"string"===p?a(h):p)):void 0===n.basic[p]?(f("case %i:{",h.id)("if(u!==%i)",h.delimited?3:2)("break"),h.delimited?f("%s=types[%i].decode(r,undefined,%i,q+1,%s)",d,l,8*h.id+4,d):f("%s=types[%i].decode(r,r.size(),undefined,q+1,%s)",d,l,d)):h.hasPresence?(f("case %i:{",h.id)("if(u!==%i)",n.basic[p])("break"),y?(f("v=r.%s()",p)("if(types[%i].valuesById[v]!==undefined){",l)("%s=v",d),h.partOf&&f("m%s=%j",o.safeProp(h.partOf.name),h.name),f("}else"),u(f,"r.raw(s,r.pos)")):f("%s=r.%s()",d,"string"===p?a(h):p)):(f("case %i:{",h.id)("if(u!==%i)",n.basic[p])("break"),y?(f("v=r.%s()",p)("if(types[%i].valuesById[v]!==undefined){",l)("if(v!==%j)",h.typeDefault)("%s=v",d)("else")("delete %s",d)("}else{"),u(f,"r.raw(s,r.pos)")("}")):(h.resolvedType instanceof i&&0!==h.typeDefault?f("if((v=r.%s())!==%j)",p,h.typeDefault):"string"===p?f("if((v=r.%s()).length)",a(h)):"bytes"===p?f("if((v=r.%s()).length)",p):void 0!==n.long[p]?f('if(typeof(v=r.%s())==="object"?v.low||v.high:v!==0)',p):f("double"===p||"float"===p?"if(!Object.is(v=r.%s(),0))":"if(v=r.%s())",p),f("%s=v",d)("else")("delete %s",d)));h.partOf&&!y&&f("m%s=%j",o.safeProp(h.partOf.name),h.name),f("continue")("}")}l&&f("}");for(f("r.skipType(%s,q,t)",l?"u":"t&7"),u(f,"r.raw(s,r.pos)")("}")("if(l!==undefined){")("if(r.pos!==c)")('throw RangeError("index out of range")')("r.len=l")("}")("if(z!==undefined)")('throw Error("missing end group")'),l=0;l<e._fieldsArray.length;++l){var g=e._fieldsArray[l];g.required&&f("if(!Object.hasOwnProperty.call(m,%j))",g.name)("throw util.ProtocolError(%j,{instance:m})",s(g))}return f("return m")};var i=r(3990),n=r(9082),o=r(4595);function s(e){return"missing required '"+e.name+"'"}function a(e){return"VERIFY"===e._features.utf8_validation?"stringVerify":"string"}function u(e,t){return e("if(!r.discardUnknown){")('util.makeProp(m,"$unknowns",false);')("(m.$unknowns||(m.$unknowns=[])).push(%s)",t)("}")}},5775(e,t,r){e.exports=function(e){for(var t,r=o.codegen(["m","w","q"])("if(!w)")("w=Writer.create()")("if(q===undefined)q=0")("if(q>util.recursionLimit)")('throw Error("max depth exceeded")'),a=e.fieldsArray.slice().sort(o.compareFieldsById),u=0;u<a.length;++u){var l=a[u].resolve(),c=e._fieldsArray.indexOf(l),f=l.resolvedType instanceof i?"int32":l.type,h=n.basic[f];t="m"+o.safeProp(l.name),l.map?(r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",t,l.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",t),"bool"===l.keyType?r("w.uint32(%i).fork().uint32(%i).bool(util.boolFromKey(ks[i]))",(l.id<<3|2)>>>0,8|n.mapKey[l.keyType]):void 0!==n.long[l.keyType]?r("w.uint32(%i).fork().uint32(%i).%s(util.longFromKey(ks[i],%j))",(l.id<<3|2)>>>0,8|n.mapKey[l.keyType],l.keyType,"uint64"===l.keyType||"fixed64"===l.keyType):r("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(l.id<<3|2)>>>0,8|n.mapKey[l.keyType],l.keyType),void 0===h?r("types[%i].encode(%s[ks[i]],w.uint32(18).fork(),q+1).ldelim().ldelim()",c,t):r(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|h,f,t),r("}")("}")):l.repeated?(r("if(%s!=null&&%s.length){",t,t),l.packed&&void 0!==n.packed[f]?r("w.uint32(%i).%ss(%s)",(l.id<<3|2)>>>0,f,t):(r("for(var i=0;i<%s.length;++i)",t),void 0===h?s(r,l,c,t+"[i]"):r("w.uint32(%i).%s(%s[i])",(l.id<<3|h)>>>0,f,t)),r("}")):(l.required||(l.hasPresence||!(l.resolvedType instanceof i||void 0!==n.basic[f])?r("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,l.name):l.resolvedType instanceof i?r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&%s!==%j)",t,l.name,t,l.typeDefault):"bool"===f?r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&%s!==false)",t,l.name,t):"string"===f?r('if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&%s!=="")',t,l.name,t):"bytes"===f?r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&%s.length)",t,l.name,t):"double"===f||"float"===f?r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&!Object.is(%s,0))",t,l.name,t):void 0!==n.long[f]?r('if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&(typeof %s==="object"?%s.low||%s.high:%s!==0))',t,l.name,t,t,t,t):r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)&&%s!==0)",t,l.name,t)),void 0===h?s(r,l,c,t):r("w.uint32(%i).%s(%s)",(l.id<<3|h)>>>0,f,t))}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 i=r(3990),n=r(9082),o=r(4595);function s(e,t,r,i){return t.delimited?e("types[%i].encode(%s,w.uint32(%i),q+1).uint32(%i)",r,i,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork(),q+1).ldelim()",r,i,(t.id<<3|2)>>>0)}},3990(e,t,r){e.exports=s;var i=r(5156);s.prototype=Object.create(i.prototype,{constructor:{value:s,writable:!0,enumerable:!1,configurable:!0}}),s.className="Enum";var n=r(364),o=r(4595);function s(e,t,r,n,o,s){if(i.call(this,e,r),t&&"object"!=typeof t)throw TypeError("values must be an object");if(this.valuesById=Object.create(null),this.values=Object.create(this.valuesById),this.comment=n,this.comments=o||{},this.valuesOptions=s,this._valuesFeatures={},this.reserved=void 0,this.visibility=void 0,t)for(var a=Object.keys(t),u=0;u<a.length;++u)"__proto__"!==a[u]&&"number"==typeof t[a[u]]&&(this.values[a[u]]=t[a[u]],void 0===this.valuesById[t[a[u]]]&&(this.valuesById[t[a[u]]]=a[u]))}s.prototype._resolveFeatures=function(e){return e=this._edition||e,i.prototype._resolveFeatures.call(this,e),Object.keys(this.values).forEach(e=>{var t=o.merge({},this._features);this._valuesFeatures[e]=o.merge(t,this.valuesOptions&&this.valuesOptions[e]&&this.valuesOptions[e].features||{})}),this},s.fromJSON=function(e,t){var r=new s(e,t.values,t.options,t.comment,t.comments,t.valuesOptions);return r.reserved=t.reserved,t.visibility&&(r.visibility=t.visibility),t.edition&&(r._edition=t.edition),r._defaultEdition="proto3",r},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["edition",this._editionToJSON(),"options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"visibility",this.visibility,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},s.prototype.add=function(e,t,r,i){if(!o.isString(e))throw TypeError("name must be a string");if(!o.isInteger(t))throw TypeError("id must be an integer");if("__proto__"===e)return this;if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return i&&(void 0===this.valuesOptions&&(this.valuesOptions={}),this.valuesOptions[e]=i||null),this.comments[e]=r||null,this},s.prototype.remove=function(e){if(!o.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this.valuesOptions&&delete this.valuesOptions[e],this},s.prototype.isReservedId=function(e){return n.isReservedId(this.reserved,e)},s.prototype.isReservedName=function(e){return n.isReservedName(this.reserved,e)}},4083(e,t,r){e.exports=l;var i=r(5156);l.prototype=Object.create(i.prototype,{constructor:{value:l,writable:!0,enumerable:!1,configurable:!0}}),l.className="Field";var n,o=r(3990),s=r(9082),a=r(4595),u=/^(?:required|optional|repeated)$/;function l(e,t,r,n,o,l,c){if(a.isObject(n)?(c=o,l=n,n=o=void 0):a.isObject(o)&&(c=l,l=o,o=void 0),i.call(this,e,l),!a.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!a.isString(r))throw TypeError("type must be a string");if(void 0!==n&&!u.test(n=n.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==o&&!a.isString(o))throw TypeError("extend must be a string");this.rule=n&&"optional"!==n?n:void 0,this.type=r,this.id=t,this.extend=o||void 0,this.repeated="repeated"===n,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!a.Long&&void 0!==s.long[r],this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.comment=c,this.protoName=void 0,this.jsonName=void 0}l.fromJSON=function(e,t){var r=new l(e,t.id,t.type,t.rule,t.extend,t.options,t.comment);return t.edition&&(r._edition=t.edition),t.protoName&&(r.protoName=t.protoName),void 0!==t.jsonName?r.jsonName=t.jsonName:t.options&&void 0!==t.options.json_name&&(r.jsonName=t.options.json_name),r._defaultEdition="proto3",r},Object.defineProperty(l.prototype,"required",{get:function(){return"LEGACY_REQUIRED"===this._features.field_presence}}),Object.defineProperty(l.prototype,"optional",{get:function(){return!this.required}}),Object.defineProperty(l.prototype,"delimited",{get:function(){return this.resolvedType instanceof n&&"DELIMITED"===this._features.message_encoding}}),Object.defineProperty(l.prototype,"packed",{get:function(){return"PACKED"===this._features.repeated_field_encoding}}),Object.defineProperty(l.prototype,"hasPresence",{get:function(){return!this.repeated&&!this.map&&(this.partOf||this.declaringField||this.extensionField||"IMPLICIT"!==this._features.field_presence)}}),l.prototype.setOption=function(e,t,r){return i.prototype.setOption.call(this,e,t,r)},l.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return a.toObject(["edition",this._editionToJSON(),"rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"protoName",this.protoName!==this.name?this.protoName:void 0,"jsonName",this.jsonName!==a.jsonName(this.protoName||this.name)?this.jsonName:void 0,"options",this.options,"comment",t?this.comment:void 0])},l.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=s.defaults[this.type])?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof n?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof o&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof o||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long){var e="uint64"===this.type||"fixed64"===this.type;this.typeDefault="string"==typeof this.typeDefault?a.Long.fromString(this.typeDefault,e):a.Long.fromNumber(this.typeDefault,e),Object.freeze&&Object.freeze(this.typeDefault)}else if(void 0!==s.long[this.type]&&"string"==typeof this.typeDefault)this.typeDefault=parseInt(this.typeDefault,10);else if(this.bytes&&"string"==typeof this.typeDefault){var t;a.base64.test(this.typeDefault)?a.base64.decode(this.typeDefault,t=a.newBuffer(a.base64.length(this.typeDefault)),0):a.utf8.write(this.typeDefault,t=a.newBuffer(a.utf8.length(this.typeDefault)),0),this.typeDefault=t}return this.map?this.defaultValue=a.emptyObject:this.repeated?this.defaultValue=a.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof n&&this.parent._ctor&&(this.parent._ctor.prototype[this.name]=this.defaultValue),void 0===this.protoName&&(this.protoName=this.name),void 0===this.jsonName&&(this.jsonName=a.jsonName(this.protoName)),i.prototype.resolve.call(this)},l.prototype._inferLegacyProtoFeatures=function(e){if("proto2"!==e&&"proto3"!==e)return{};var t={};if("required"===this.rule&&(t.field_presence="LEGACY_REQUIRED"),this.parent&&void 0===s.defaults[this.type]){var r=this.parent.get(this.type.split(".").pop());r&&r instanceof n&&r.group&&(t.message_encoding="DELIMITED")}return!0===this.getOption("packed")?t.repeated_field_encoding="PACKED":!1===this.getOption("packed")&&(t.repeated_field_encoding="EXPANDED"),t},l.prototype._resolveFeatures=function(e){return i.prototype._resolveFeatures.call(this,this._edition||e)},l.d=function(e,t,r,i){return"function"==typeof t?t=a.decorateType(t).name:t&&"object"==typeof t&&(t=a.decorateEnum(t).name),function(n,o){a.decorateType(n.constructor).add(new l(o,e,t,r,{default:i}))}},l._configure=function(e){n=e}},5558(e,t,r){(t=e.exports=r(5873)).build="light",t.load=function(e,r,i){return"function"==typeof r?(i=r,r=new t.Root):r||(r=new t.Root),r.load(e,i)},t.loadSync=function(e,r){return r||(r=new t.Root),r.loadSync(e)},t.encoder=r(5775),t.decoder=r(2759),t.verifier=r(8273),t.converter=r(2235),t.ReflectionObject=r(5156),t.Namespace=r(364),t.Root=r(3079),t.Enum=r(3990),t.Type=r(7183),t.Field=r(4083),t.OneOf=r(654),t.MapField=r(2485),t.Service=r(8368),t.Method=r(4426),t.Message=r(7652),t.wrappers=r(5855),t.types=r(9082),t.util=r(4595),t.ReflectionObject._configure(t.Root),t.Namespace._configure(t.Type,t.Service,t.Enum),t.Root._configure(t.Type,void 0,{}),t.Field._configure(t.Type)},5873(e,t,r){function i(){t.util.LongBits._configure(t.util.Long),t.Writer._configure(t.BufferWriter),t.Reader._configure(t.BufferReader)}t.build="minimal",t.Writer=r(6804),t.BufferWriter=r(2453),t.Reader=r(3688),t.BufferReader=r(9049),t.util=r(3499),t.rpc=r(8296),t.roots=r(8226),t.configure=i,i()},2485(e,t,r){e.exports=s;var i=r(4083);s.prototype=Object.create(i.prototype,{constructor:{value:s,writable:!0,enumerable:!1,configurable:!0}}),s.className="MapField";var n=r(9082),o=r(4595);function s(e,t,r,n,s,a){if(i.call(this,e,t,n,void 0,void 0,s,a),!o.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}s.fromJSON=function(e,t){var r=new s(e,t.id,t.keyType,t.type,t.options,t.comment);return t.protoName&&(r.protoName=t.protoName),void 0!==t.jsonName?r.jsonName=t.jsonName:t.options&&void 0!==t.options.json_name&&(r.jsonName=t.options.json_name),r},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"protoName",this.protoName!==this.name?this.protoName:void 0,"jsonName",this.jsonName!==o.jsonName(this.protoName||this.name)?this.jsonName:void 0,"options",this.options,"comment",t?this.comment:void 0])},s.prototype.resolve=function(){if(this.resolved)return this;if(void 0===n.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return i.prototype.resolve.call(this)},s.d=function(e,t,r){return"function"==typeof r?r=o.decorateType(r).name:r&&"object"==typeof r&&(r=o.decorateEnum(r).name),function(i,n){o.decorateType(i.constructor).add(new s(n,e,t,r))}}},7652(e,t,r){e.exports=n;var i=r(3499);function n(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}n.create=function(e){return this.$type.create(e)},n.encode=function(e,t){return this.$type.encode(e,t)},n.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},n.decode=function(e){return this.$type.decode(e)},n.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},n.verify=function(e){return this.$type.verify(e)},n.fromObject=function(e){return this.$type.fromObject(e)},n.toObject=function(e,t){return this.$type.toObject(e,t)},n.prototype.toJSON=function(){return this.$type.toObject(this,i.toJSONOptions)}},4426(e,t,r){e.exports=o;var i=r(5156);o.prototype=Object.create(i.prototype,{constructor:{value:o,writable:!0,enumerable:!1,configurable:!0}}),o.className="Method";var n=r(4595);function o(e,t,r,o,s,a,u,l,c){if(n.isObject(s)?(u=s,s=a=void 0):n.isObject(a)&&(u=a,a=void 0),void 0!==t&&!n.isString(t))throw TypeError("type must be a string");if(!n.isString(r))throw TypeError("requestType must be a string");if(!n.isString(o))throw TypeError("responseType must be a string");i.call(this,e,u),this.type=t||"rpc",this.requestType=r,this.requestStream=!!s||void 0,this.responseType=o,this.responseStream=!!a||void 0,this.path="/"+this.name,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=l,this.parsedOptions=c}o.fromJSON=function(e,t){return new o(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},o.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return n.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])},o.prototype.resolve=function(){if(this.resolved)return this;if(this.parent){var e=this.parent.fullName;"."===e.charAt(0)&&(e=e.substring(1)),this.path="/"+e+"/"+this.name}else this.path="/"+this.name;return this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),i.prototype.resolve.call(this)}},364(e,t,r){e.exports=f;var i=r(5156);f.prototype=Object.create(i.prototype,{constructor:{value:f,writable:!0,enumerable:!1,configurable:!0}}),f.className="Namespace";var n,o,s,a=r(4083),u=r(4595),l=r(654);function c(e,t){if(e&&e.length){for(var r={},i=0;i<e.length;++i)r[e[i].name]=e[i].toJSON(t);return r}}function f(e,t){i.call(this,e,t),this.nested=void 0,this._nestedArray=null,this._lookupCache=Object.create(null),this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0}function h(e){e._nestedArray=null,e._lookupCache=Object.create(null);for(var t=e;t=t.parent;)t._lookupCache=Object.create(null);return e}f.fromJSON=function(e,t,r){if(void 0===r&&(r=0),r>u.recursionLimit)throw Error("max depth exceeded");return new f(e,t.options).addJSON(t.nested,r)},f.arrayToJSON=c,f.isReservedId=function(e,t){if(e)for(var r=0;r<e.length;++r)if("string"!=typeof e[r]&&e[r][0]<=t&&e[r][1]>=t)return!0;return!1},f.isReservedName=function(e,t){if(e)for(var r=0;r<e.length;++r)if(e[r]===t)return!0;return!1},Object.defineProperty(f.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=u.toArray(this.nested))}}),f.prototype.toJSON=function(e){return u.toObject(["options",this.options,"nested",c(this.nestedArray,e)])},f.prototype.addJSON=function(e,t){if(void 0===t&&(t=0),t>u.recursionLimit)throw Error("max depth exceeded");if(e)for(var r,i=Object.keys(e),l=0;l<i.length;++l)r=e[i[l]],this.add((void 0!==r.fields?n.fromJSON:void 0!==r.values?s.fromJSON:void 0!==r.methods?o.fromJSON:void 0!==r.id?a.fromJSON:f.fromJSON)(i[l],r,t+1));return this},f.prototype.get=function(e){return this.nested&&Object.prototype.hasOwnProperty.call(this.nested,e)?this.nested[e]:null},f.prototype.getEnum=function(e){if(this.nested&&Object.prototype.hasOwnProperty.call(this.nested,e)&&this.nested[e]instanceof s)return this.nested[e].values;throw Error("no such enum: "+e)},f.prototype.add=function(e){if(!(e instanceof a&&void 0!==e.extend||e instanceof n||e instanceof l||e instanceof s||e instanceof o||e instanceof f))throw TypeError("object must be a valid nested object");if("__proto__"===e.name)return this;if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof f&&e instanceof f)||t instanceof n||t instanceof o)throw Error("duplicate name '"+e.name+"' in "+this);for(var r=t.nestedArray,i=0;i<r.length;++i)e.add(r[i]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};this.nested[e.name]=e,this instanceof n||this instanceof o||this instanceof s||this instanceof a||e._edition||(e._edition=e._defaultEdition),this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0;for(var u=this;u=u.parent;)u._needsRecursiveFeatureResolution=!0,u._needsRecursiveResolve=!0;return e.onAdd(this),h(this)},f.prototype.remove=function(e){if(!(e instanceof i))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);if(!u.remove(this.nested,e,e.name))throw Error(e+" is not a member of "+this);return Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),h(this)},f.prototype.define=function(e,t){if(u.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");if(e.length>u.recursionLimit)throw Error("max depth exceeded");for(var r=this;e.length>0;){var i=e.shift();if(r.nested&&r.nested[i]){if(!((r=r.nested[i])instanceof f))throw Error("path conflicts with non-namespace objects")}else r.add(r=new f(i))}return t&&r.addJSON(t),r},f.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;this._needsRecursiveFeatureResolution&&this._resolveFeaturesRecursive(this._edition);var e=this.nestedArray,t=0;for(this.resolve();t<e.length;)e[t]instanceof f?e[t++].resolveAll():e[t++].resolve();return this._needsRecursiveResolve=!1,this},f.prototype._resolveFeaturesRecursive=function(e){return this._needsRecursiveFeatureResolution?(this._needsRecursiveFeatureResolution=!1,e=this._edition||e,i.prototype._resolveFeaturesRecursive.call(this,e),this.nestedArray.forEach(t=>{t._resolveFeaturesRecursive(e)}),this):this},f.prototype.lookup=function(e,t,r){if("boolean"==typeof t?(r=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),u.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;var i=e.join(".");if(""===e[0])return this.root.lookup(e.slice(1),t);var n=this._lookupImpl(e,i);if(n&&(!t||t.indexOf(n.constructor)>-1))return n;if((n=this.root._fullyQualifiedObjects&&this.root._fullyQualifiedObjects["."+i])&&(!t||t.indexOf(n.constructor)>-1))return n;if(r)return null;for(var o=this;o.parent;){if((n=o.parent._lookupImpl(e,i))&&(!t||t.indexOf(n.constructor)>-1))return n;o=o.parent}return null},f.prototype._lookupImpl=function(e,t){if(Object.prototype.hasOwnProperty.call(this._lookupCache,t))return this._lookupCache[t];var r=this.get(e[0]),i=null;if(r)1===e.length?i=r:r instanceof f&&(e=e.slice(1),i=r._lookupImpl(e,e.join(".")));else for(var n=0;n<this.nestedArray.length;++n)if(this._nestedArray[n]instanceof f&&(r=this._nestedArray[n]._lookupImpl(e,t))){i=r;break}return this._lookupCache[t]=i,i},f.prototype.lookupType=function(e){var t=this.lookup(e,[n]);if(!t)throw Error("no such type: "+e);return t},f.prototype.lookupEnum=function(e){var t=this.lookup(e,[s]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},f.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[n,s]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t},f.prototype.lookupService=function(e){var t=this.lookup(e,[o]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},f._configure=function(e,t,r){n=e,o=t,s=r}},5156(e,t,r){e.exports=f,f.className="ReflectionObject";const i=r(654);var n,o=r(4595),s={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"},a={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"},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"},l={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"},c={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY",enforce_naming_style:"STYLE2026",default_symbol_visibility:"STRICT",enforce_proto_limits:"PROTO_LIMITS2026"};function f(e,t){if(!o.isString(e))throw TypeError("name must be a string");if(t&&!o.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this._edition=null,this._defaultEdition="proto2",this._features={},this._featuresResolved=!1,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(f.prototype,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),f.prototype.toJSON=function(){throw Error()},f.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof n&&t._handleAdd(this)},f.prototype.onRemove=function(e){var t=e.root;t instanceof n&&t._handleRemove(this),this.parent=null,this.resolved=!1},f.prototype.resolve=function(){return this.resolved||this.root instanceof n&&(this.resolved=!0),this},f.prototype._resolveFeaturesRecursive=function(e){return this._resolveFeatures(this._edition||e)},f.prototype._resolveFeatures=function(e){if(!this._featuresResolved){var t={};if(!e)throw new Error("Unknown edition for "+this.fullName);var r=o.merge({},this.options&&this.options.features,this._inferLegacyProtoFeatures(e));if(this._edition){if("proto2"===e)t=Object.assign({},s);else if("proto3"===e)t=Object.assign({},a);else if("2023"===e)t=Object.assign({},u);else if("2024"===e)t=Object.assign({},l);else{if("2026"!==e)throw new Error("Unknown edition: "+e);t=Object.assign({},c)}this._features=o.merge(t,r)}else if(this.partOf instanceof i){var n=o.merge({},this.partOf._features);this._features=o.merge(n,r)}else if(this.declaringField);else{if(!this.parent)throw new Error("Unable to find a parent for "+this.fullName);var f=o.merge({},this.parent._features);this._features=o.merge(f,r)}this.extensionField&&(this.extensionField._features=this._features),this._featuresResolved=!0}},f.prototype._inferLegacyProtoFeatures=function(){return{}},f.prototype.getOption=function(e){if(this.options&&Object.prototype.hasOwnProperty.call(this.options,e))return this.options[e]},f.prototype.setOption=function(e,t,r){if("__proto__"===e)return this;if(this.options||(this.options={}),/^features\./.test(e))o.setProperty(this.options,e,t,r);else{var i=this.getOption(e);r&&void 0!==i||(i!==t&&(this.resolved=!1),this.options[e]=t)}return this},f.prototype.setParsedOption=function(e,t,r){if("__proto__"===e)return this;this.parsedOptions||(this.parsedOptions=[]);var i=this.parsedOptions;if(r){var n=i.find(function(t){return Object.prototype.hasOwnProperty.call(t,e)});if(n){var s=n[e];o.setProperty(s,r,t)}else(n={})[e]=o.setProperty({},r,t),i.push(n)}else{var a={};a[e]=t,i.push(a)}return this},f.prototype.setOptions=function(e,t){if(e)for(var r=Object.keys(e),i=0;i<r.length;++i)this.setOption(r[i],e[r[i]],t);return this},Object.defineProperty(f.prototype,"toString",{value:function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},writable:!0,enumerable:!1,configurable:!0}),f.prototype._editionToJSON=function(){if(this._edition&&"proto3"!==this._edition)return this._edition},f._configure=function(e){n=e}},654(e,t,r){e.exports=s;var i=r(5156);s.prototype=Object.create(i.prototype,{constructor:{value:s,writable:!0,enumerable:!1,configurable:!0}}),s.className="OneOf";var n=r(4083),o=r(4595);function s(e,t,r,n){if(Array.isArray(t)||(r=t,t=void 0),i.call(this,e,r),void 0!==t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=n}function a(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}s.fromJSON=function(e,t){return new s(e,t.oneof,t.options,t.comment)},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])},s.prototype.add=function(e){if(!(e instanceof n))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,a(this),this},s.prototype.remove=function(e){if(!(e instanceof n))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),(t=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(t,1),e.partOf=null,this},s.prototype.onAdd=function(e){i.prototype.onAdd.call(this,e);for(var t=0;t<this.oneof.length;++t){var r=e.get(this.oneof[t]);r&&!r.partOf&&(r.partOf=this,this.fieldsArray.push(r))}a(this)},s.prototype.onRemove=function(e){for(var t,r=0;r<this.fieldsArray.length;++r)(t=this.fieldsArray[r]).parent&&t.parent.remove(t);i.prototype.onRemove.call(this,e)},Object.defineProperty(s.prototype,"isProto3Optional",{get:function(){if(null==this.fieldsArray||1!==this.fieldsArray.length)return!1;var e=this.fieldsArray[0];return null!=e.options&&!0===e.options.proto3_optional}}),s.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,r){o.decorateType(t.constructor).add(new s(r,e)),Object.defineProperty(t,r,{get:o.oneOfGetter(e),set:o.oneOfSetter(e)})}}},7828(e,t,r){e.exports=S,S.filename=null,S.defaults={keepCase:!1};var i=r(4846),n=r(3079),o=r(7183),s=r(4083),a=r(2485),u=r(654),l=r(3990),c=r(8368),f=r(4426),h=r(5156),p=r(9082),d=r(4595),y=/^[1-9][0-9]*$/,m=/^-?[1-9][0-9]*$/,g=/^0[x][0-9a-fA-F]+$/,v=/^-?0[x][0-9a-fA-F]+$/,b=/^0[0-7]+$/,w=/^-?0[0-7]+$/,O=/^(?:u?int|sint|s?fixed)(?:32|64)$/,k=/^(?:uint|fixed)(?:32|64)$/,_=d.patterns.numberRe,j=/^[a-zA-Z_][a-zA-Z_0-9]*$/,E=d.patterns.typeRefRe;function S(e,t,r){t instanceof n||(r=t,t=new n),r||(r=S.defaults);var x,T,N,A,P=r.preferTrailingComment||!1,F=i(e,r.alternateCommentMode||!1),I=F.next,R=F.push,L=F.peek,M=F.skip,C=F.cmnt,B=!0,D="proto2",$=t,z=[],q={},J=r.keepCase?function(e){return e}:d.camelCase;function U(e,t,r){var i=S.filename;return r||(S.filename=null),Error("illegal "+(t||"token")+" '"+e+"' ("+(i?i+", ":"")+"line "+F.line+")")}function V(){var e,t=[];do{if('"'!==(e=I())&&"'"!==e)throw U(e);t.push(I()),M(e),e=L()}while('"'===e||"'"===e);return t.join("")}function W(e){var t=I();switch(t){case"'":case'"':return R(t),V();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return function(e,t){var r=1;"-"===e.charAt(0)&&(r=-1,e=e.substring(1));switch(e){case"inf":case"INF":case"Inf":return r*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0*r}if(y.test(e))return r*parseInt(e,10);if(g.test(e))return r*parseInt(e,16);if(b.test(e))return r*parseInt(e,8);if(_.test(e))return r*parseFloat(e);throw U(e,"number",t)}(t,!0)}catch(r){if(e&&E.test(t))return t;throw U(t,"value")}}function G(e,t,r,i){var n,o;do{if(!t||'"'!==(n=L())&&"'"!==n)try{e.push([o=H(I(),i,r),M("to",!0)?H(I(),i,r):o])}catch(r){if(!(t&&E.test(n)&&D>=2023))throw r;e.push(n)}else{var s=V();if(e.push(s),D>=2023)throw U(s,"id")}}while(M(",",!0));var a={options:void 0,setOption:function(e,t){void 0===this.options&&(this.options={}),this.options[e]=t}};te(a,function(e){if("option"!==e)throw U(e);se(a,e),M(";")},function(){le(a)})}function Z(e,t,r){if(null===e)throw U(e,"end of input");if(!t&&"-"===e.charAt(0))throw U(e,r||"integer");if("0"===e||"-0"===e)return 0;var i;if(m.test(e))i=parseInt(e,10);else if(v.test(e))i=parseInt(e,16);else{if(!w.test(e))throw U(e,r||"integer");i=parseInt(e,8)}return i||0}function H(e,t,r){switch(e){case"max":case"MAX":case"Max":return r||536870911}return Z(e,t,"id")}function X(){if(void 0!==x)throw U("package");if(null===(x=I())||!E.test(x))throw U(x,"name");$=$.define(x),M(";")}function K(){var e,t=L();switch(t){case"option":if(D<"2024")throw U("option");return I(),V(),void M(";");case"weak":e=N||(N=[]),I();break;case"public":I();default:e=T||(T=[])}t=V(),M(";"),e.push(t)}function Y(){if(M("="),(D=V())<2023)throw U(D,"syntax");M(";")}function Q(){M("="),D=V();if(!["2023","2024","2026"].includes(D))throw U(D,"edition");M(";")}function ee(e,t,r){switch(void 0===r&&(r=0),t){case"option":return se(e,t),M(";"),!0;case"message":return re(e,t,r+1),!0;case"enum":return oe(e,t),!0;case"export":case"local":if(D<"2024")return!1;var i=t;return"export"!==(t=I())&&"local"!==t&&(("message"===t||"enum"===t)&&(("message"===t?re(e,t,r+1):oe(e,t)).visibility=i,!0));case"service":return function(e,t,r){void 0===r&&(r=0);if(r>d.recursionLimit)throw Error("max depth exceeded");if(null===(t=I())||!j.test(t))throw U(t,"service name");var i=new c(t);te(i,function(e){if(!ee(i,e,r)&&";"!==e){if("rpc"!==e)throw U(e);!function(e,t){var r=C(),i=t;if(!j.test(t=I()))throw U(t,"name");var n,o,s,a,u=t;M("("),M("stream",!0)&&(o=!0);if(!E.test(t=I()))throw U(t);n=t,M(")"),M("returns"),M("("),M("stream",!0)&&(a=!0);if(!E.test(t=I()))throw U(t);s=t,M(")");var l=new f(u,i,n,s,o,a);l.comment=r,te(l,function(e){if(";"!==e){if("option"!==e)throw U(e);se(l,e),M(";")}}),e.add(l)}(i,e)}}),e.add(i),e===$&&z.push(i)}(e,t,r+1),!0;case"extend":return function(e,t,r){if(null===(t=I())||!E.test(t))throw U(t,"reference");var i=t;te(null,function(t){switch(t){case"required":case"repeated":ie(e,t,i,r+1);break;case"optional":ie(e,"proto3"===D?"proto3_optional":"optional",i,r+1);break;default:if("proto2"===D||!E.test(t))throw U(t);R(t),ie(e,"optional",i,r+1)}})}(e,t,r),!0}return!1}function te(e,t,r){var i=F.line;if(e&&("string"!=typeof e.comment&&(e.comment=C()),e.filename=S.filename),M("{",!0)){for(var n;"}"!==(n=I());)t(n);M(";",!0)}else r&&r(),M(";"),e&&("string"!=typeof e.comment||P)&&(e.comment=C(i)||e.comment)}function re(e,t,r){if(void 0===r&&(r=0),r>d.nestingLimit)throw Error("max depth exceeded");if(null===(t=I())||!j.test(t))throw U(t,"type name");var i=new o(t);return te(i,function(e){if(!ee(i,e,r))switch(e){case";":break;case"map":ne(i);break;case"required":if("proto2"!==D)throw U(e);case"repeated":ie(i,e,void 0,r+1);break;case"optional":if("proto3"===D)ie(i,"proto3_optional",void 0,r+1);else{if("proto2"!==D)throw U(e);ie(i,"optional",void 0,r+1)}break;case"oneof":!function(e,t,r){if(null===(t=I())||!j.test(t))throw U(t,"name");var i=new u(J(t));te(i,function(e){"option"===e?(se(i,e),M(";")):(R(e),ie(i,"optional",void 0,r))}),e.add(i)}(i,e,r+1);break;case"extensions":G(i.extensions||(i.extensions=[]));break;case"reserved":G(i.reserved||(i.reserved=[]),!0);break;default:if("proto2"===D||!E.test(e))throw U(e);R(e),ie(i,"optional",void 0,r+1)}}),e.add(i),e===$&&z.push(i),i}function ie(e,t,r,i){var n=I();if(null===n)throw U(n,"end of input");if("group"!==n){for(;n.endsWith(".")||(L()||"").startsWith(".");){var a=I();if(null===a)throw U(a,"end of input");n+=a}if(!E.test(n))throw U(n,"type");var l=I();if(null===l)throw U(l,"end of input");if(!j.test(l))throw U(l,"name");var c=l;l=J(l),M("=");var f=new s(l,H(I()),n,"proto3_optional"===t?"optional":t,r);if(c!==l&&(f.protoName=c),te(f,function(e){if("option"!==e)throw U(e);se(f,e),M(";")},function(){le(f)}),"proto3_optional"===t){var h=new u("_"+l);f.setOption("proto3_optional",!0),h.add(f),e.add(h)}else e.add(f);e===$&&z.push(f)}else!function(e,t,r,i){void 0===i&&(i=0);if(i>d.nestingLimit)throw Error("max depth exceeded");if(D>=2023)throw U("group");var n=I();if(null===n||!j.test(n))throw U(n,"name");var a=d.lcFirst(n);n===a&&(n=d.ucFirst(n));M("=");var u=H(I()),l=new o(n);l.group=!0;var c=new s(a,u,n,t,r);c.filename=S.filename,te(l,function(e){switch(e){case";":break;case"map":ne(l);break;case"option":se(l,e),M(";");break;case"required":case"repeated":ie(l,e,void 0,i+1);break;case"optional":ie(l,"proto3"===D?"proto3_optional":"optional",void 0,i+1);break;case"message":re(l,e,i+1);break;case"enum":oe(l,e);break;case"reserved":G(l.reserved||(l.reserved=[]),!0);break;case"export":case"local":if(D<"2024")throw U(e);switch(e=I()){case"message":case"enum":re(l,e,i+1);break;default:throw U(e)}break;default:throw U(e)}}),e.add(l).add(c),e===$&&(z.push(l),z.push(c))}(e,t,r,i)}function ne(e){M("<");var t=I();if(void 0===p.mapKey[t])throw U(t,"type");M(",");var r=I();if(!E.test(r))throw U(r,"type");M(">");var i=I();if(null===i||!j.test(i))throw U(i,"name");M("=");var n=i;i=J(i);var o=new a(i,H(I()),t,r);n!==i&&(o.protoName=n),te(o,function(e){if("option"!==e)throw U(e);se(o,e),M(";")},function(){le(o)}),e.add(o)}function oe(e,t){if(null===(t=I())||!j.test(t))throw U(t,"name");var r=new l(t),i=[];te(r,function(e){switch(e){case";":break;case"option":se(r,e),M(";");break;case"reserved":G(r.reserved||(r.reserved=[]),!0,2147483647,!0),void 0===r.reserved&&(r.reserved=[]);break;default:i.push(function(e){if(!j.test(e))throw U(e,"name");M("=");var t=H(I(),!0),r={options:void 0,getOption:function(e){return this.options[e]}};return r.setOption=function(e,t){h.prototype.setOption.call(r,e,t)},r.setParsedOption=function(){},te(r,function(e){if("option"!==e)throw U(e);se(r,e),M(";")},function(){le(r)}),{name:e,id:t,comment:r.comment,options:r.parsedOptions||r.options}}(e))}});for(var n=0;n<i.length;++n)r.add(i[n].name,i[n].id,i[n].comment,i[n].options);return e.add(r),e===$&&z.push(r),r}function se(e,t){var r,i,n=!0;for("option"===t&&(t=I());"="!==t;){if(null===t)throw U(t,"end of input");if("("===t){var o=I();M(")"),t="("+o+")"}if(n){if(n=!1,t.includes(".")&&!t.includes("(")){var s=t.split(".");r=s[0]+".",t=s[1];continue}r=t}else i=i?i+=t:t;t=I()}var a=ae(e,i?r.concat(i):r);i=i&&"."===i[0]?i.slice(1):i,function(e,t,r,i){e.setParsedOption&&e.setParsedOption(t,r,i)}(e,r=r&&"."===r[r.length-1]?r.slice(0,-1):r,a,i)}function ae(e,t,r){if(void 0===r&&(r=0),r>d.recursionLimit)throw Error("max depth exceeded");if(M("{",!0)){for(var i={};!M("}",!0);){var n,o;if(null===(A=I()))throw U(A,"end of input");if("["===A){var a=null===(A=I())?-1:A.lastIndexOf("/");if(null===A||!E.test(a<0?A:A.slice(a+1)))throw U(A,"name");n="["+A+"]",M("]")}else{if(!j.test(A))throw U(A,"name");n=A}if(M(":",!0),"{"===L())o=ae(e,t+"."+n,r+1);else if("["===L()){var u,l;if(o=[],M("[",!0)&&!M("]",!0)){do{u=(l="{"===L())?ae(e,t+"."+n,r+1):W(!0),o.push(u)}while(M(",",!0));M("]"),void 0!==u&&(l||ue(e,t+"."+n,u))}}else ue(e,t+"."+n,o=W(!0));var c=Object.prototype.hasOwnProperty.call(i,n)?i[n]:void 0;c&&(o=[].concat(c).concat(o)),"__proto__"!==n&&(i[n]=o),M(",",!0),M(";",!0)}return i}var f="default"===t&&e instanceof s&&O.test(e.type)?Z(I(),!k.test(e.type)):W(!0);return ue(e,t,f),f}function ue(e,t,r){$===e&&/^features\./.test(t)?q[t]=r:("json_name"===t&&e instanceof s&&(e.jsonName=r),e.setOption&&e.setOption(t,r))}function le(e){if(M("[",!0)){do{se(e,"option")}while(M(",",!0));M("]")}return e}for(;null!==(A=I());)switch(A){case";":break;case"package":if(!B)throw U(A);X();break;case"import":K();break;case"syntax":if(!B)throw U(A);Y();break;case"edition":if(!B)throw U(A);Q();break;case"option":se($,A),M(";",!0);break;default:if(ee($,A,0)){B=!1;continue}throw U(A)}return z.forEach(e=>{e._edition=D,Object.keys(q).forEach(t=>{void 0===e.getOption(t)&&e.setOption(t,q[t],!0)})}),S.filename=null,{package:x,imports:T,weakImports:N,root:t}}},3688(e,t,r){e.exports=u;var i,n=r(3499),o=n.LongBits,s=n.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function u(e){this.buf=e,this.pos=0,this.len=e.length,this.view=null,this.discardUnknown=u.discardUnknown}function l(e){if(Array.isArray(e)&&(e=new Uint8Array(e)),e instanceof Uint8Array)return new u(e);throw Error("illegal buffer")}var c=function(){return n.Buffer?function(e){return(u.create=function(e){return n.Buffer.isBuffer(e)?new i(e):l(e)})(e)}:l};function f(e){for(var t=0,r=0;r<4;++r){if(e.pos>=e.len)throw a(e);var i=e.buf[e.pos++];if(t=(t|(127&i)<<7*r)>>>0,i<128)return t}throw a(e)}function h(){var e=new o(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<4;++t){if(this.pos>=this.len)throw a(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}throw a(this)}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw a(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function p(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw a(this,8);return new o(p(this.buf,this.pos+=4),p(this.buf,this.pos+=4))}u.create=c(),u.prototype.raw=function(e,t){return this.buf.subarray(e,t)},u.prototype.uint32=function(){if(this.len-this.pos<5){if(this.pos>=this.len)throw a(this);if(this.buf[this.pos]>=128)return f(this)}var e=this.buf,t=this.pos,r=(127&e[t])>>>0;if(e[t++]<128)return this.pos=t,r;if(r=(r|(127&e[t])<<7)>>>0,e[t++]<128)return this.pos=t,r;if(r=(r|(127&e[t])<<14)>>>0,e[t++]<128)return this.pos=t,r;if(r=(r|(127&e[t])<<21)>>>0,e[t++]<128)return this.pos=t,r;if(r=(r|(15&e[t])<<28)>>>0,e[t++]<128)return this.pos=t,r;for(var i=0;i<5;++i){if(t>=this.len)throw this.pos=t,a(this);if(e[t++]<128)return this.pos=t,r}throw this.pos=t,Error("invalid varint encoding")},u.prototype.tag=function(){if(this.len-this.pos<5){if(this.pos>=this.len)throw a(this);if(this.buf[this.pos]>=128)return f(this)}var e=this.buf,t=this.pos,r=(127&e[t])>>>0;if(e[t++]<128)return this.pos=t,r;if(r=(r|(127&e[t])<<7)>>>0,e[t++]<128)return this.pos=t,r;if(r=(r|(127&e[t])<<14)>>>0,e[t++]<128)return this.pos=t,r;if(r=(r|(127&e[t])<<21)>>>0,e[t++]<128)return this.pos=t,r;if(r=(r|(15&e[t])<<28)>>>0,e[t]<128&&!(112&e[t]))return this.pos=t+1,r;throw this.pos=t+1,Error("invalid tag encoding")},u.prototype.size=function(){if(this.len-this.pos<5){if(this.pos>=this.len)throw a(this);if(this.buf[this.pos]>=128)return f(this)}var e=this.buf,t=this.pos,r=(127&e[t])>>>0;if(e[t++]<128)return this.pos=t,r;if(r=(r|(127&e[t])<<7)>>>0,e[t++]<128)return this.pos=t,r;if(r=(r|(127&e[t])<<14)>>>0,e[t++]<128)return this.pos=t,r;if(r=(r|(127&e[t])<<21)>>>0,e[t++]<128)return this.pos=t,r;if(this.pos=t+1,e[t]>7)throw Error("invalid length encoding");return(r|e[t]<<28)>>>0},u.prototype.int32=function(){return 0|this.uint32()},u.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},u.prototype.bool=function(){for(var e,t=!1,r=0;r<10;++r){if(this.pos>=this.len)throw a(this);if(127&(e=this.buf[this.pos++])&&(t=!0),e<128)return t}throw Error("invalid varint encoding")},u.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return p(this.buf,this.pos+=4)},u.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|p(this.buf,this.pos+=4)},u.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=n.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},u.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=n.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},u.prototype.uint32s=function(e){void 0===e&&(e=[]);var t,r=this.size()+this.pos,i=this.len,n=this.buf,o=this.pos;if(r>i)throw a(this,r-this.pos);for(this.len=r;o<r;)(t=n[o++])<128?e.push(t):(this.pos=o-1,e.push(this.uint32()),o=this.pos);if(this.pos=o,o!==r)throw RangeError("index out of range");return this.len=i,e},u.prototype.int32s=function(e){void 0===e&&(e=[]);var t,r=this.size()+this.pos,i=this.len,n=this.buf,o=this.pos;if(r>i)throw a(this,r-this.pos);for(this.len=r;o<r;)(t=n[o++])<128?e.push(t):(this.pos=o-1,e.push(this.int32()),o=this.pos);if(this.pos=o,o!==r)throw RangeError("index out of range");return this.len=i,e},u.prototype.sint32s=function(e){void 0===e&&(e=[]);var t=this.size()+this.pos,r=this.len;if(t>r)throw a(this,t-this.pos);for(this.len=t;this.pos<t;)e.push(this.sint32());if(this.pos!==t)throw RangeError("index out of range");return this.len=r,e},u.prototype.bools=function(e){void 0===e&&(e=[]);var t,r=this.size()+this.pos,i=this.len,n=this.buf,o=this.pos;if(r>i)throw a(this,r-this.pos);for(this.len=r;o<r;)(t=n[o++])<128?e.push(0!==t):(this.pos=o-1,e.push(this.bool()),o=this.pos);if(this.pos=o,o!==r)throw RangeError("index out of range");return this.len=i,e};function y(e,t,r){var i=e.view;if(i||t<r)return i;var n=e.buf;return e.view=new DataView(n.buffer,n.byteOffset,n.byteLength)}u.prototype.fixed32s=function(e){void 0===e&&(e=[]);var t=this.size(),r=this.pos+t;if(r>this.len)throw a(this,t);var i=t>>>2,n=e.length,o=this.pos;e.length=n+i;var s=y(this,i,128);if(s)for(var u=0;u<i;++u,o+=4)e[n++]=s.getUint32(o,!0);else for(var l=this.buf,c=0;c<i;++c,o+=4)e[n++]=p(l,o+4);if(this.pos=o,o!==r)throw a(this,4);return e},u.prototype.sfixed32s=function(e){void 0===e&&(e=[]);var t=this.size(),r=this.pos+t;if(r>this.len)throw a(this,t);var i=t>>>2,n=e.length,o=this.pos;e.length=n+i;var s=y(this,i,128);if(s)for(var u=0;u<i;++u,o+=4)e[n++]=s.getInt32(o,!0);else for(var l=this.buf,c=0;c<i;++c,o+=4)e[n++]=0|p(l,o+4);if(this.pos=o,o!==r)throw a(this,4);return e},u.prototype.floats=function(e){void 0===e&&(e=[]);var t=this.size(),r=this.pos+t;if(r>this.len)throw a(this,t);var i=t>>>2,o=e.length,s=this.pos;e.length=o+i;var u=y(this,i,8);if(u)for(var l=0;l<i;++l,s+=4)e[o++]=u.getFloat32(s,!0);else for(var c=this.buf,f=0;f<i;++f,s+=4)e[o++]=n.float.readFloatLE(c,s);if(this.pos=s,s!==r)throw a(this,4);return e},u.prototype.doubles=function(e){void 0===e&&(e=[]);var t=this.size(),r=this.pos+t;if(r>this.len)throw a(this,t);var i=t>>>3,o=e.length,s=this.pos;e.length=o+i;var u=y(this,i,8);if(u)for(var l=0;l<i;++l,s+=8)e[o++]=u.getFloat64(s,!0);else for(var c=this.buf,f=0;f<i;++f,s+=8)e[o++]=n.float.readDoubleLE(c,s);if(this.pos=s,s!==r)throw a(this,8);return e},u.prototype.uint64s=function(e){void 0===e&&(e=[]);var t=this.size()+this.pos,r=this.len;if(t>r)throw a(this,t-this.pos);for(this.len=t;this.pos<t;)e.push(this.uint64());if(this.pos!==t)throw RangeError("index out of range");return this.len=r,e},u.prototype.int64s=function(e){void 0===e&&(e=[]);var t=this.size()+this.pos,r=this.len;if(t>r)throw a(this,t-this.pos);for(this.len=t;this.pos<t;)e.push(this.int64());if(this.pos!==t)throw RangeError("index out of range");return this.len=r,e},u.prototype.sint64s=function(e){void 0===e&&(e=[]);var t=this.size()+this.pos,r=this.len;if(t>r)throw a(this,t-this.pos);for(this.len=t;this.pos<t;)e.push(this.sint64());if(this.pos!==t)throw RangeError("index out of range");return this.len=r,e},u.prototype.fixed64s=function(e){void 0===e&&(e=[]);var t=this.size(),r=this.pos+t,i=e.length;if(r>this.len)throw a(this,t);var n=t>>>3;e.length=i+n;for(var o=0;o<n;++o)e[i++]=this.fixed64();if(this.pos!==r)throw a(this,8);return e},u.prototype.sfixed64s=function(e){void 0===e&&(e=[]);var t=this.size(),r=this.pos+t,i=e.length;if(r>this.len)throw a(this,t);var n=t>>>3;e.length=i+n;for(var o=0;o<n;++o)e[i++]=this.sfixed64();if(this.pos!==r)throw a(this,8);return e},u.prototype.bytes=function(){var e=this.size(),t=this.pos,r=this.pos+e;if(r>this.len)throw a(this,e);return this.pos=r,this.raw(t,r)},u.prototype.string=function(){var e=this.size(),t=this.pos,r=this.pos+e;if(r>this.len)throw a(this,e);return this.pos=r,s.read(this.buf,t,r)},u.prototype.stringVerify=function(){var e=this.size(),t=this.pos,r=this.pos+e;if(r>this.len)throw a(this,e);return this.pos=r,s.readStrict(this.buf,t,r)},u.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},u.recursionLimit=n.recursionLimit,u.discardUnknown=!0,u.prototype.skipType=function(e,t,r){if(void 0===t&&(t=0),t>u.recursionLimit)throw Error("max depth exceeded");if(0===r)throw Error("illegal tag: field number 0");switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.size());break;case 3:for(;;){var i=this.tag(),n=i>>>3;if(e=7&i,!n)throw Error("illegal tag: field number 0");if(4===e){if(void 0!==r&&n!==r)throw Error("invalid end group tag");break}this.skipType(e,t+1,n)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},u._configure=function(e){i=e,u.create=c(),i._configure();var t=n.Long?"toLong":"toNumber";n.merge(u.prototype,{int64:function(){return h.call(this)[t](!1)},uint64:function(){return h.call(this)[t](!0)},sint64:function(){return h.call(this).zzDecode()[t](!1)},fixed64:function(){return d.call(this)[t](!0)},sfixed64:function(){return d.call(this)[t](!1)}})}},9049(e,t,r){e.exports=o;var i=r(3688);o.prototype=Object.create(i.prototype,{constructor:{value:o,writable:!0,enumerable:!1,configurable:!0}});var n=r(3499);function o(e){i.call(this,e)}o._configure=function(){n.Buffer&&(o.prototype._slice=n.Buffer.prototype.slice)},o.prototype.raw=function(e,t){return this._slice.call(this.buf,e,t)},o.prototype.string=function(){var e=this.size(),t=this.pos,r=this.pos+e;if(r>this.len)throw RangeError("index out of range: "+this.pos+" + "+e+" > "+this.len);return this.pos=r,this.buf.utf8Slice?this.buf.utf8Slice(t,r):this.buf.toString("utf-8",t,r)},o._configure()},3079(e,t,r){e.exports=f;var i=r(364);f.prototype=Object.create(i.prototype,{constructor:{value:f,writable:!0,enumerable:!1,configurable:!0}}),f.className="Root";var n,o,s,a=r(4083),u=r(3990),l=r(654),c=r(4595);function f(e){i.call(this,"",e),this.deferred=[],this.files=[],this._edition="proto2",this._fullyQualifiedObjects={}}function h(){}f.fromJSON=function(e,t,r){if(void 0===r&&(r=0),r>c.recursionLimit)throw Error("max depth exceeded");return t||(t=new f),e.options&&t.setOptions(e.options),t.addJSON(e.nested,r).resolveAll()},f.prototype.resolvePath=c.path.resolve,f.prototype.fetch=c.fetch,f.prototype.load=function e(t,r,i){"function"==typeof r&&(i=r,r=void 0);var n=this;if(!i)return c.asPromise(e,n,t,r);var a=i===h;function u(e,t){if(i){if(a)throw e;t&&t.resolveAll();var r=i;i=null,r(e,t)}}function l(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var r=e.substring(t);if(Object.prototype.hasOwnProperty.call(s,r))return r}return Object.prototype.hasOwnProperty.call(s,e)?e:null}function f(e,t,i){void 0===i&&(i=0);try{if(i>c.recursionLimit)throw Error("max depth exceeded");if(c.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),c.isString(t)){o.filename=e;var s,f=o(t,n,r),h=0;if(f.imports)for(;h<f.imports.length;++h)(s=l(f.imports[h])||n.resolvePath(e,f.imports[h]))&&p(s,!1,i+1);if(f.weakImports)for(h=0;h<f.weakImports.length;++h)(s=l(f.weakImports[h])||n.resolvePath(e,f.weakImports[h]))&&p(s,!0,i+1)}else n.setOptions(t.options).addJSON(t.nested)}catch(e){u(e)}a||d||u(null,n)}function p(e,t,r){if(void 0===r&&(r=0),e=l(e)||e,!(n.files.indexOf(e)>-1))if(n.files.push(e),Object.prototype.hasOwnProperty.call(s,e))a?f(e,s[e],r):(++d,setTimeout(function(){--d,f(e,s[e],r)}));else if(a){var o;try{o=c.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||u(e))}f(e,o,r)}else++d,n.fetch(e,function(o,s){--d,i&&(o?t?d||u(null,n):u(o):f(e,s,r))})}var d=0;c.isString(t)&&(t=[t]);for(var y,m=0;m<t.length;++m)(y=n.resolvePath("",t[m]))&&p(y);return a?(n.resolveAll(),n):(d||u(null,n),n)},f.prototype.loadSync=function(e,t){if(!c.isNode)throw Error("not supported");return this.load(e,t,h)},f.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(e){return"'extend "+e.extend+"' in "+e.parent.fullName}).join(", "));return i.prototype.resolveAll.call(this)};var p=/^[A-Z]/;function d(e,t){var r=t.parent.lookup(t.extend);if(r){var i=new a(t.fullName,t.id,t.type,t.rule,void 0,t.options);return r.get(i.name)||(i.declaringField=t,t.extensionField=i,r.add(i)),!0}return!1}f.prototype._handleAdd=function(e){if(e instanceof a)void 0===e.extend||e.extensionField||d(0,e)||this.deferred.push(e);else if(e instanceof u)p.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof l)){if(e instanceof n)for(var t=0;t<this.deferred.length;)d(0,this.deferred[t])?this.deferred.splice(t,1):++t;for(var r=0;r<e.nestedArray.length;++r)this._handleAdd(e._nestedArray[r]);p.test(e.name)&&(e.parent[e.name]=e)}(e instanceof n||e instanceof u||e instanceof a)&&(this._fullyQualifiedObjects[e.fullName]=e)},f.prototype._handleRemove=function(e){if(e instanceof a){if(void 0!==e.extend)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}}else if(e instanceof u)p.test(e.name)&&delete e.parent[e.name];else if(e instanceof i){for(var r=0;r<e.nestedArray.length;++r)this._handleRemove(e._nestedArray[r]);p.test(e.name)&&delete e.parent[e.name]}delete this._fullyQualifiedObjects[e.fullName]},f._configure=function(e,t,r){n=e,o=t,s=r}},8226(e){e.exports=Object.create(null)},8296(e,t,r){t.Service=r(2756)},2756(e,t,r){e.exports=n;var i=r(3499);function n(e,t,r){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");i.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(r)}n.prototype=Object.create(i.EventEmitter.prototype,{constructor:{value:n,writable:!0,enumerable:!1,configurable:!0}}),n.prototype.rpcCall=function e(t,r,n,o,s){if(!o)throw TypeError("request must be specified");var a=this;if(!s)return i.asPromise(e,a,t,r,n,o);if(a.rpcImpl)try{return a.rpcImpl(t,r[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(e,r){if(e)return a.emit("error",e,t),s(e);if(null!==r){if(!(r instanceof n))try{r=n[a.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return a.emit("error",e,t),s(e)}return a.emit("data",r,t),s(null,r)}a.end(!0)})}catch(e){return a.emit("error",e,t),void setTimeout(function(){s(e)},0)}else setTimeout(function(){s(Error("already ended"))},0)},n.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},8368(e,t,r){e.exports=a;var i=r(364);a.prototype=Object.create(i.prototype,{constructor:{value:a,writable:!0,enumerable:!1,configurable:!0}}),a.className="Service";var n=r(4426),o=r(4595),s=r(8296);function a(e,t){i.call(this,e,t),this.methods={},this._methodsArray=null}function u(e){return e._methodsArray=null,e}a.fromJSON=function(e,t,r){if(void 0===r&&(r=0),r>o.recursionLimit)throw Error("max depth exceeded");var i=new a(e,t.options);if(t.methods)for(var s=Object.keys(t.methods),u=0;u<s.length;++u)i.add(n.fromJSON(s[u],t.methods[s[u]]));return t.nested&&i.addJSON(t.nested,r),t.edition&&(i._edition=t.edition),i.comment=t.comment,i._defaultEdition="proto3",i},a.prototype.toJSON=function(e){var t=i.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return o.toObject(["edition",this._editionToJSON(),"options",t&&t.options||void 0,"methods",i.arrayToJSON(this.methodsArray,e)||{},"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},Object.defineProperty(a.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=o.toArray(this.methods))}}),a.prototype.get=function(e){return Object.prototype.hasOwnProperty.call(this.methods,e)?this.methods[e]:i.prototype.get.call(this,e)},a.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;i.prototype.resolve.call(this);for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return this},a.prototype._resolveFeaturesRecursive=function(e){return this._needsRecursiveFeatureResolution?(e=this._edition||e,i.prototype._resolveFeaturesRecursive.call(this,e),this.methodsArray.forEach(t=>{t._resolveFeaturesRecursive(e)}),this):this},a.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof n?"__proto__"===e.name?this:(this.methods[e.name]=e,e.parent=this,u(this)):i.prototype.add.call(this,e)},a.prototype.remove=function(e){if(e instanceof n){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,u(this)}return i.prototype.remove.call(this,e)},a.prototype.create=function(e,t,r){for(var i,n=new s.Service(e,t,r),a=0;a<this.methodsArray.length;++a){n[o.lcFirst((i=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"")]=function(e,t,r){return function(i,n){return s.Service.prototype.rpcCall.call(this,e,t,r,i,n)}}(i,i.resolvedRequestType.ctor,i.resolvedResponseType.ctor)}return n}},4846(e){e.exports=f;var t=/[\s{}=;:[\],'"()<>]/g,r=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,i=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,n=/^ *[*/]+ */,o=/^\s*\*?\/*/,s=/\n/g,a=/\s/,u=/\\([0-7]{1,3}|[xX][0-9a-fA-F]{1,2}|.?)/g,l={a:"",b:"\b",f:"\f",r:"\r",n:"\n",t:"\t",v:"\v","?":"?","'":"'",'"':'"'};function c(e){return e.replace(u,function(e,t){var r=t.charAt(0);if(r>="0"&&r<="7")return String.fromCharCode(255&parseInt(t,8));if("x"===r||"X"===r)return String.fromCharCode(parseInt(t.substring(1),16));switch(t){case"\\":case"":return t;default:return l[t]||""}})}function f(e,u){e=e.toString();var l=0,f=e.length,h=1,p=0,d={},y=[],m=null;function g(e){return Error("illegal "+e+" (line "+h+")")}function v(t){return e.charAt(t)}function b(t,r,i){var a,l={type:e.charAt(t++),lineEmpty:!1,leading:i},c=t-(u?2:3);do{if(--c<0||"\n"===(a=e.charAt(c))){l.lineEmpty=!0;break}}while(" "===a||"\t"===a);for(var f=e.substring(t,r).split(s),y=0;y<f.length;++y)f[y]=f[y].replace(u?o:n,"").trim();l.text=f.join("\n").trim(),d[h]=l,p=h}function w(t){var r=O(t),i=e.substring(t,r);return/^\s*\/\//.test(i)}function O(e){for(var t=e;t<f&&"\n"!==v(t);)t++;return t}function k(){if(y.length>0)return y.shift();if(m)return function(){var t="'"===m?i:r;t.lastIndex=l-1;var n=t.exec(e);if(!n)throw g("string");return l=t.lastIndex,_(m),m=null,c(n[1])}();var n,o,s,p,d,k,j=0===l;do{if(l===f)return null;for(n=!1;a.test(s=v(l));)if("\n"===s&&(j=!0,++h),++l===f)return null;if("/"===v(l)){if(++l===f)throw g("comment");if("/"===v(l))if(u){if(p=l,d=!1,w(l-1)){d=!0;do{if((l=O(l))===f)break;if(l++,!j)break;(k=w(l))&&h++}while(k)}else l=Math.min(f,O(l)+1);d&&(b(p,l,j),j=!0),h++,n=!0}else{for(d="/"===v(p=l+1);"\n"!==v(++l);)if(l===f)return null;++l,d&&(b(p,l-1,j),j=!0),++h,n=!0}else{if("*"!==(s=v(l)))return"/";p=l+1,d=u||"*"===v(p);do{if("\n"===s&&++h,++l===f)throw g("comment");o=s,s=v(l)}while("*"!==o||"/"!==s);++l,d&&(b(p,l-2,j),j=!0),n=!0}}}while(n);var E=l;if(t.lastIndex=0,!t.test(v(E++)))for(;E<f&&!t.test(v(E));)++E;var S=e.substring(l,l=E);return'"'!==S&&"'"!==S||(m=S),S}function _(e){y.push(e)}function j(){if(!y.length){var e=k();if(null===e)return null;_(e)}return y[0]}return Object.defineProperty({next:k,peek:j,push:_,skip:function(e,t){var r=j();if(r===e)return k(),!0;if(!t)throw g("token '"+r+"', '"+e+"' expected");return!1},cmnt:function(e){var t,r=null;return void 0===e?(t=d[h-1],delete d[h-1],t&&(u||"*"===t.type||t.lineEmpty)&&(r=t.leading?t.text:null)):(p<e&&j(),t=d[e],delete d[e],!t||t.lineEmpty||!u&&"/"!==t.type||(r=t.leading?null:t.text)),r}},"line",{get:function(){return h}})}f.unescape=c},7183(e,t,r){e.exports=v;var i=r(364);v.prototype=Object.create(i.prototype,{constructor:{value:v,writable:!0,enumerable:!1,configurable:!0}}),v.className="Type";var n=r(3990),o=r(654),s=r(4083),a=r(2485),u=r(8368),l=r(7652),c=r(3688),f=r(6804),h=r(4595),p=r(5775),d=r(2759),y=r(8273),m=r(2235),g=r(5855);function v(e,t){e=e.replace(/\W/g,""),i.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this.visibility=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null,this._fieldsByJsonName=null}function b(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=e._fieldsByJsonName=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(v.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var r=this.fields[e[t]],i=r.id;if(this._fieldsById[i])throw Error("duplicate id "+i+" in "+this);this._fieldsById[i]=r}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=h.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=h.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=v.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof l||(e.prototype=new l,Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),h.merge(e.prototype,t)),e.$type=e.prototype.$type=this,h.merge(e,l,!0),this._ctor=e,delete this.decode,delete this.fromObject;for(var r,i=0;i<this.fieldsArray.length;++i)r=this._fieldsArray[i].resolve(),e.prototype[r.name]=r.defaultValue;var n={};for(i=0;i<this.oneofsArray.length;++i)n[this._oneofsArray[i].resolve().name]={get:h.oneOfGetter(this._oneofsArray[i].oneof),set:h.oneOfSetter(this._oneofsArray[i].oneof)};i&&Object.defineProperties(e.prototype,n)}}}),v.generateConstructor=function(e){for(var t,r=h.codegen(["p"]),i=0;i<e.fieldsArray.length;++i)(t=e._fieldsArray[i]).map?r("this%s={}",h.safeProp(t.name)):t.repeated&&r("this%s=[]",h.safeProp(t.name));return r('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]]")},v.fromJSON=function(e,t,r){if(void 0===r&&(r=0),r>h.nestingLimit)throw Error("max depth exceeded");var l=new v(e,t.options);l.extensions=t.extensions,l.reserved=t.reserved;for(var c=Object.keys(t.fields),f=0;f<c.length;++f)l.add((void 0!==t.fields[c[f]].keyType?a.fromJSON:s.fromJSON)(c[f],t.fields[c[f]]));if(t.oneofs)for(c=Object.keys(t.oneofs),f=0;f<c.length;++f)l.add(o.fromJSON(c[f],t.oneofs[c[f]]));if(t.nested)for(c=Object.keys(t.nested),f=0;f<c.length;++f){var p=t.nested[c[f]];l.add((void 0!==p.id?s.fromJSON:void 0!==p.fields?v.fromJSON:void 0!==p.values?n.fromJSON:void 0!==p.methods?u.fromJSON:i.fromJSON)(c[f],p,r+1))}return t.extensions&&t.extensions.length&&(l.extensions=t.extensions),t.reserved&&t.reserved.length&&(l.reserved=t.reserved),t.group&&(l.group=!0),t.visibility&&(l.visibility=t.visibility),t.comment&&(l.comment=t.comment),t.edition&&(l._edition=t.edition),l._defaultEdition="proto3",l},v.prototype.toJSON=function(e){var t=i.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return h.toObject(["edition",this._editionToJSON(),"options",t&&t.options||void 0,"oneofs",i.arrayToJSON(this.oneofsArray,e),"fields",i.arrayToJSON(this.fieldsArray.filter(function(e){return!e.declaringField}),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"visibility",this.visibility,"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},v.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;i.prototype.resolveAll.call(this);var e=this.oneofsArray;for(r=0;r<e.length;)e[r++].resolve();for(var t=this.fieldsArray,r=0;r<t.length;)t[r++].resolve();return this},v.prototype._resolveFeaturesRecursive=function(e){return this._needsRecursiveFeatureResolution?(e=this._edition||e,i.prototype._resolveFeaturesRecursive.call(this,e),this.oneofsArray.forEach(t=>{t._resolveFeatures(e)}),this.fieldsArray.forEach(t=>{t._resolveFeatures(e)}),this):this},v.prototype.get=function(e){return Object.prototype.hasOwnProperty.call(this.fields,e)?this.fields[e]:this.oneofs&&Object.prototype.hasOwnProperty.call(this.oneofs,e)?this.oneofs[e]:this.nested&&Object.prototype.hasOwnProperty.call(this.nested,e)?this.nested[e]:null},v.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof s&&void 0===e.extend){if(this._fieldsById?this._fieldsById[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);if(this.isReservedName(e.name)||"$"===e.name.charAt(0))throw Error("name '"+e.name+"' is reserved in "+this);return"__proto__"===e.name?this:(e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),b(this))}if(e instanceof o){if("$"===e.name.charAt(0))throw Error("name '"+e.name+"' is reserved in "+this);return"__proto__"===e.name?this:(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),b(this))}return i.prototype.add.call(this,e)},v.prototype.remove=function(e){if(e instanceof s&&void 0===e.extend){if(!h.remove(this.fields,e,e.name))throw Error(e+" is not a member of "+this);return e.parent=null,e.onRemove(this),b(this)}if(e instanceof o){if(!h.remove(this.oneofs,e,e.name))throw Error(e+" is not a member of "+this);return e.parent=null,e.onRemove(this),b(this)}return i.prototype.remove.call(this,e)},v.prototype.isReservedId=function(e){return i.isReservedId(this.reserved,e)},v.prototype.isReservedName=function(e){return i.isReservedName(this.reserved,e)},v.prototype.create=function(e){return new this.ctor(e)},v.prototype.setup=function(){var e=this.root;if(e&&e._needsRecursiveFeatureResolution){var t=e._edition||this._edition;t&&e._resolveFeaturesRecursive(t)}for(var r=this.fullName,i=[],n=0;n<this.fieldsArray.length;++n)i.push(this._fieldsArray[n].resolve().resolvedType);this.encode=p(this)({Writer:f,types:i,util:h}),this.decode=d(this)({Reader:c,types:i,util:h,C:this.ctor}),this.verify=y(this)({types:i,util:h}),this.fromObject=m.fromObject(this)({types:i,util:h,C:this.ctor}),this.toObject=m.toObject(this)({types:i,util:h});var o=g[r];if(o){var s=Object.create(this);s._ctor=this.ctor,s.fromObject=this.fromObject,this.fromObject=o.fromObject.bind(s),s.toObject=this.toObject,this.toObject=o.toObject.bind(s)}return this},v.prototype.encode=function(e,t){return this.setup().encode.apply(this,arguments)},v.prototype.encodeDelimited=function(e,t){return this.encode(e,(t||f.create()).fork()).ldelim()},v.prototype.decode=function(e,t){return this.setup().decode.apply(this,arguments)},v.prototype.decodeDelimited=function(e){return e instanceof c||(e=c.create(e)),this.decode(e,e.size())},v.prototype.verify=function(e){return this.setup().verify.apply(this,arguments)},v.prototype.fromObject=function(e){return this.setup().fromObject.apply(this,arguments)},v.prototype.toObject=function(e,t){return this.setup().toObject.apply(this,arguments)},v.prototype.getTypeUrl=function(e){void 0===e&&(e="type.googleapis.com");var t=this.fullName;return e+"/"+("."===t.charAt(0)?t.substring(1):t)},v.d=function(e){return function(t){h.decorateType(t,e)}}},9082(e,t,r){var i=t,n=r(4595),o=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function s(e,t){var r=0,i=Object.create(null);for(t|=0;r<e.length;)i[o[r+t]]=e[r++];return i}i.basic=s([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),i.defaults=s([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",n.emptyArray,null]),i.long=s([0,0,0,1,1],7),i.mapKey=s([0,0,0,5,5,0,0,0,1,1,0,2],2),i.packed=s([1,5,0,0,0,5,5,0,0,0,1,1,0])},4595(e,t,r){var i,n,o=e.exports=r(3499),s=r(8226);o.codegen=r(3829),o.fetch=r(3460),o.path=r(4013),o.patterns=r(1717);var a=o.patterns.reservedRe;o.fs=r(7765),o.toArray=function(e){if(e){for(var t=Object.keys(e),r=new Array(t.length),i=0;i<t.length;)r[i]=e[t[i++]];return r}return[]},o.toObject=function(e){for(var t={},r=0;r<e.length;){var i=e[r++],n=e[r++];void 0!==n&&(t[i]=n)}return t},o.remove=function(e,t,r){if(!e)return!1;if(void 0!==r&&Object.prototype.hasOwnProperty.call(e,r)&&e[r]===t)return delete e[r],!0;for(var i=Object.keys(e),n=0;n<i.length;++n)if(e[i[n]]===t)return delete e[i[n]],!0;return!1},o.isReserved=function(e){return a.test(e)},o.safeProp=function(e){return!/^[$\w_]+$/.test(e)||a.test(e)?"["+JSON.stringify(e)+"]":"."+e},o.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var u=/_([a-z])/g;o.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(u,function(e,t){return t.toUpperCase()})},o.jsonName=function(e){for(var t="",r=!1,i=0;i<e.length;++i){var n=e.charAt(i);"_"===n?r=!0:r?(t+=n.toUpperCase(),r=!1):t+=n}return t},o.compareFieldsById=function(e,t){return e.id-t.id},o.decorateType=function(e,t){if(e.$type)return t&&e.$type.name!==t&&(o.decorateRoot.remove(e.$type),e.$type.name=t,o.decorateRoot.add(e.$type)),e.$type;i||(i=r(7183));var n=new i(t||e.name);return o.decorateRoot.add(n),n.ctor=e,Object.defineProperty(e,"$type",{value:n,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:n,enumerable:!1}),n};var l=0;o.decorateEnum=function(e){if(e.$type)return e.$type;n||(n=r(3990));var t=new n("Enum"+l++,e);return o.decorateRoot.add(t),Object.defineProperty(e,"$type",{value:t,enumerable:!1}),t},o.setProperty=function(e,t,r,i){if("object"!=typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");if((t=t.split(".")).length>o.recursionLimit)throw Error("max depth exceeded");return function e(t,r,n){var s=r.shift();if(o.isUnsafeProperty(s))return t;if(r.length>0)t[s]=e(t[s]||{},r,n);else{var a=t[s];if(a&&i)return t;a&&(n=[].concat(a).concat(n)),t[s]=n}return t}(e,t,r)},Object.defineProperty(o,"decorateRoot",{get:function(){return s.decorated||(s.decorated=new(r(3079)))}})},2233(e){e.exports=function(e,t){var r=new Array(arguments.length-1),i=0,n=2,o=!0;for(;n<arguments.length;)r[i++]=arguments[n++];return new Promise(function(n,s){r[i]=function(e){if(o)if(o=!1,e)s(e);else{for(var t=new Array(arguments.length-1),r=0;r<t.length;)t[r++]=arguments[r];n.apply(null,t)}};try{e.apply(t||null,r)}catch(e){o&&(o=!1,s(e))}})}},1209(e,t){var r=t;r.length=function(e){var t=e.length;if(!t)return 0;for(;t>0&&"="===e.charAt(t-1);)--t;return Math.floor(3*t/4)};for(var i=new Array(64),n=new Array(123),o=0;o<64;)n[i[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;n[45]=62,n[95]=63,r.encode=function(e,t,r){for(var n,o=null,s=[],a=0,u=0;t<r;){var l=e[t++];switch(u){case 0:s[a++]=i[l>>2],n=(3&l)<<4,u=1;break;case 1:s[a++]=i[n|l>>4],n=(15&l)<<2,u=2;break;case 2:s[a++]=i[n|l>>6],s[a++]=i[63&l],u=0}a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),a=0)}return u&&(s[a++]=i[n],s[a++]=61,1===u&&(s[a++]=61)),o?(a&&o.push(String.fromCharCode.apply(String,s.slice(0,a))),o.join("")):String.fromCharCode.apply(String,s.slice(0,a))};var s="invalid encoding";r.decode=function(e,t,r){for(var i,o=r,a=0,u=0;u<e.length;){var l=e.charCodeAt(u++);if(61===l&&a>1)break;if(void 0===(l=n[l]))throw Error(s);switch(a){case 0:i=l,a=1;break;case 1:t[r++]=i<<2|(48&l)>>4,i=l,a=2;break;case 2:t[r++]=(15&i)<<4|(60&l)>>2,i=l,a=3;break;case 3:t[r++]=(3&i)<<6|l,a=0}}if(1===a)throw Error(s);return r-o};var a=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,u=/[-_]/,l=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2}(?:==)?|[A-Za-z0-9_-]{3}=?)?$/;r.test=function(e){return a.test(e)||u.test(e)&&l.test(e)}},3829(e,t,r){e.exports=n;var i=r(1717).reservedRe;function n(e,t){"string"==typeof e&&(t=e,e=void 0);var r=[];function o(e){if("string"!=typeof e){var t=s();if(n.verbose&&console.log("codegen: "+t),t="return "+t,e){for(var i=Object.keys(e),a=new Array(i.length+1),u=new Array(i.length),l=0;l<i.length;)a[l]=i[l],u[l]=e[i[l++]];return a[l]=t,Function.apply(null,a).apply(null,u)}return Function(t)()}for(var c=new Array(arguments.length-1),f=0;f<c.length;)c[f]=arguments[++f];if(f=0,e=e.replace(/%([%dfijs])/g,function(e,t){var r=c[f++];switch(t){case"d":case"f":return r=Number(r),Object.is(r,-0)?"-0":String(r);case"i":return String(Math.floor(r));case"j":return JSON.stringify(r);case"s":return String(r)}return"%"}),f!==c.length)throw Error("parameter count mismatch");return r.push(e),o}function s(n){return"function "+function(e){if(!e)return"";if(!(e=String(e).replace(/[^\w$]/g,"")))return"";/^\d/.test(e)&&(e="_"+e);return i.test(e)?e+"_":e}(n||t)+"("+(e&&e.join(",")||"")+"){\n "+r.join("\n ")+"\n}"}return Object.defineProperty(o,"toString",{value:s,writable:!0,enumerable:!0,configurable:!0}),o}n.verbose=!1},5096(e){function t(){this._listeners=Object.create(null)}e.exports=t,t.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners=Object.create(null);else if(void 0===t)this._listeners[e]=[];else{var r=this._listeners[e];if(!r)return this;for(var i=0;i<r.length;)r[i].fn===t?r.splice(i,1):++i}return this},t.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var r=[],i=1;i<arguments.length;)r.push(arguments[i++]);for(i=0;i<t.length;)t[i].fn.apply(t[i++].ctx,r)}return this}},3460(e,t,r){e.exports=o;var i=r(2233),n=r(7765);function o(e,t,r){return"function"==typeof t?(r=t,t={}):t||(t={}),r?!t.xhr&&n&&n.readFile?n.readFile(e,function(i,n){return i&&"undefined"!=typeof XMLHttpRequest?o.xhr(e,t,r):i?r(i):r(null,t.binary?n:n.toString("utf8"))}):o.xhr(e,t,r):i(o,this,e,t)}o.xhr=function(e,t,r){var i=new XMLHttpRequest;i.onreadystatechange=function(){if(4===i.readyState){if(0!==i.status&&200!==i.status)return r(Error("status "+i.status));if(t.binary){var e=i.response;if(!e){e=[];for(var n=0;n<i.responseText.length;++n)e.push(255&i.responseText.charCodeAt(n))}return r(null,"undefined"!=typeof Uint8Array?new Uint8Array(e):e)}return r(null,i.responseText)}},t.binary&&("overrideMimeType"in i&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.responseType="arraybuffer"),i.open("GET",e),i.send()}},7378(e){function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),i=128===r[3];function n(e,i,n){t[0]=e,i[n]=r[0],i[n+1]=r[1],i[n+2]=r[2],i[n+3]=r[3]}function o(e,i,n){t[0]=e,i[n]=r[3],i[n+1]=r[2],i[n+2]=r[1],i[n+3]=r[0]}function s(e,i){return r[0]=e[i],r[1]=e[i+1],r[2]=e[i+2],r[3]=e[i+3],t[0]}function a(e,i){return r[3]=e[i],r[2]=e[i+1],r[1]=e[i+2],r[0]=e[i+3],t[0]}e.writeFloatLE=i?n:o,e.writeFloatBE=i?o:n,e.readFloatLE=i?s:a,e.readFloatBE=i?a:s}():function(){function t(e,t,r,i){var n=t<0?1:0;if(n&&(t=-t),0===t)e(1/t>0?0:2147483648,r,i);else if(isNaN(t))e(2143289344,r,i);else if(t>34028234663852886e22)e((n<<31|2139095040)>>>0,r,i);else if(t<11754943508222875e-54)e((n<<31|Math.round(t/1401298464324817e-60))>>>0,r,i);else{var o=Math.floor(Math.log(t)/Math.LN2);e((n<<31|o+127<<23|8388607&Math.round(t*Math.pow(2,-o)*8388608))>>>0,r,i)}}function s(e,t,r){var i=e(t,r),n=2*(i>>31)+1,o=i>>>23&255,s=8388607&i;return 255===o?s?NaN:n*(1/0):0===o?1401298464324817e-60*n*s:n*Math.pow(2,o-150)*(s+8388608)}e.writeFloatLE=t.bind(null,r),e.writeFloatBE=t.bind(null,i),e.readFloatLE=s.bind(null,n),e.readFloatBE=s.bind(null,o)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),i=128===r[7];function n(e,i,n){t[0]=e,i[n]=r[0],i[n+1]=r[1],i[n+2]=r[2],i[n+3]=r[3],i[n+4]=r[4],i[n+5]=r[5],i[n+6]=r[6],i[n+7]=r[7]}function o(e,i,n){t[0]=e,i[n]=r[7],i[n+1]=r[6],i[n+2]=r[5],i[n+3]=r[4],i[n+4]=r[3],i[n+5]=r[2],i[n+6]=r[1],i[n+7]=r[0]}function s(e,i){return r[0]=e[i],r[1]=e[i+1],r[2]=e[i+2],r[3]=e[i+3],r[4]=e[i+4],r[5]=e[i+5],r[6]=e[i+6],r[7]=e[i+7],t[0]}function a(e,i){return r[7]=e[i],r[6]=e[i+1],r[5]=e[i+2],r[4]=e[i+3],r[3]=e[i+4],r[2]=e[i+5],r[1]=e[i+6],r[0]=e[i+7],t[0]}e.writeDoubleLE=i?n:o,e.writeDoubleBE=i?o:n,e.readDoubleLE=i?s:a,e.readDoubleBE=i?a:s}():function(){function t(e,t,r,i,n,o){var s=i<0?1:0;if(s&&(i=-i),0===i)e(0,n,o+t),e(1/i>0?0:2147483648,n,o+r);else if(isNaN(i))e(0,n,o+t),e(2146959360,n,o+r);else if(i>17976931348623157e292)e(0,n,o+t),e((s<<31|2146435072)>>>0,n,o+r);else{var a;if(i<22250738585072014e-324)e((a=i/5e-324)>>>0,n,o+t),e((s<<31|a/4294967296)>>>0,n,o+r);else{var u=Math.floor(Math.log(i)/Math.LN2);1024===u&&(u=1023),e(4503599627370496*(a=i*Math.pow(2,-u))>>>0,n,o+t),e((s<<31|u+1023<<20|1048576*a&1048575)>>>0,n,o+r)}}}function s(e,t,r,i,n){var o=e(i,n+t),s=e(i,n+r),a=2*(s>>31)+1,u=s>>>20&2047,l=4294967296*(1048575&s)+o;return 2047===u?l?NaN:a*(1/0):0===u?5e-324*a*l:a*Math.pow(2,u-1075)*(l+4503599627370496)}e.writeDoubleLE=t.bind(null,r,0,4),e.writeDoubleBE=t.bind(null,i,4,0),e.readDoubleLE=s.bind(null,n,0,4),e.readDoubleBE=s.bind(null,o,4,0)}(),e}function r(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function i(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function n(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function o(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},7765(e,t,r){var i=null;try{(i=r(3454))&&i.readFile&&i.readFileSync||(i=null)}catch(e){}e.exports=i},2176(e){var t;function r(e,t){this.lo=e>>>0,this.hi=t>>>0}e.exports=r;var i=r.zero=new r(0,0);i.toNumber=function(){return 0},i.zzEncode=i.zzDecode=function(){return this},i.length=function(){return 1};var n=r.zeroHash="\0\0\0\0\0\0\0\0";r.fromNumber=function(e){if(0===e)return i;var t=e<0;t&&(e=-e);var n=e>>>0,o=(e-n)/4294967296>>>0;return t&&(o=~o>>>0,n=~n>>>0,++n>4294967295&&(n=0,++o>4294967295&&(o=0))),new r(n,o)},r.from=function(e){if("number"==typeof e)return r.fromNumber(e);if("string"==typeof e||e instanceof String){if(!t)return r.fromNumber(parseInt(e,10));e=t.fromString(e)}return e.low||e.high?new r(e.low>>>0,e.high>>>0):i},r.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},r.prototype.toLong=function(e){return t?new t(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var o=String.prototype.charCodeAt;r.fromHash=function(e){return e===n?i:new r((o.call(e,0)|o.call(e,1)<<8|o.call(e,2)<<16|o.call(e,3)<<24)>>>0,(o.call(e,4)|o.call(e,5)<<8|o.call(e,6)<<16|o.call(e,7)<<24)>>>0)},r.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},r.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},r.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},r.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10},r._configure=function(e){t=e}},3499(e,t,r){var i=t;function n(e){return"__proto__"===e||"prototype"===e||"constructor"===e}function o(e){var t="boolean"==typeof arguments[arguments.length-1],r=t?arguments.length-1:arguments.length;t=t&&arguments[arguments.length-1];for(var i=1;i<r;++i){var o=arguments[i];if(o)for(var s=Object.keys(o),a=0;a<s.length;++a)n(s[a])||t&&Object.prototype.hasOwnProperty.call(e,s[a])&&void 0!==e[s[a]]||(e[s[a]]=o[s[a]])}return e}function s(e){function t(e,r){if(!(this instanceof t))return new t(e,r);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),r&&o(this,r)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}i.asPromise=r(2233),i.base64=r(1209),i.EventEmitter=r(5096),i.float=r(7378),i.utf8=r(3025),i.pool=r(6612),i.LongBits=r(2176),i.isUnsafeProperty=n,i.isNode=Boolean(void 0!==r.g&&r.g&&r.g.process&&r.g.process.versions&&r.g.process.versions.node),i.global=i.isNode&&r.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||"undefined"!=typeof globalThis&&globalThis||this,i.emptyArray=Object.freeze?Object.freeze([]):[],i.emptyObject=Object.freeze?Object.freeze({}):{},i.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},i.isString=function(e){return"string"==typeof e||e instanceof String},i.isObject=function(e){return e&&"object"==typeof e},i.isset=i.isSet=function(e,t){var r=e[t];return!(null==r||!Object.hasOwnProperty.call(e,t))&&("object"!=typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},i.Buffer=function(){try{var e=i.global.Buffer;return e.prototype.utf8Write||i.isNode?e:null}catch(e){return null}}(),i.newBuffer=function(e){var t=i.Buffer;return"number"==typeof e?t?t.allocUnsafe(e):new Uint8Array(e):t?t.from(e):new Uint8Array(e)},i.rawField=function(e,t,r){var n=[],o=e<<3|t;for(o>>>=0;o>127;)n.push(127&o|128),o>>>=7;n.push(o);for(var s=0;s<r.length;++s)n.push(r[s]);return i.newBuffer(n)},i.Array=Uint8Array,i.Long=i.global.dcodeIO&&i.global.dcodeIO.Long||i.global.Long||function(){try{var e=r(5017);return e&&e.isLong?e:null}catch(e){return null}}(),i.key2Re=/^(?:true|false|0|1)$/,i.key32Re=/^-?(?:0|[1-9][0-9]*)$/,i.key64Re=/^(?:[\x00-\xff]{8}|-?(?:0|[1-9][0-9]*))$/,i.longToHash=function(e){return e?i.LongBits.from(e).toHash():i.LongBits.zeroHash},i.longFromHash=function(e,t){var r=i.LongBits.fromHash(e);return i.Long?i.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},i.longFromKey=function(e,t){return i.key64Re.test(e)&&!i.key32Re.test(e)?i.longFromHash(e,t):e},i.boolFromKey=function(e){return"true"===e||"1"===e},i.merge=o,i.nestingLimit=32,i.recursionLimit=100,i.makeProp=function(e,t,r){Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:void 0===r||r,configurable:!0,writable:!0})},i.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},i.newError=s,i.ProtocolError=s("ProtocolError"),i.oneOfGetter=function(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=1;return function(){for(var e=Object.keys(this),r=e.length-1;r>-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},i.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},i.toJSONOptions={longs:String,enums:String,bytes:String,json:!0}},4013(e,t){var r=t,i=/^[a-zA-Z][a-zA-Z0-9+.-]+:\/\//;var n=r.isAbsolute=function(e){return/^(?:\/|\w+:|\\\\\w+)/.test(e)},o=r.normalize=function(e){var t=function(e){if("undefined"==typeof URL||!i.test(e))return null;try{return new URL(e).href}catch(e){return null}}(e);if(t)return t;var r=e.substring(0,2),o="";"\\\\"===r&&(o=r,e=e.substring(2));var s=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),a=n(e),u="";a&&(u=s.shift()+"/");for(var l=0;l<s.length;)".."===s[l]?l>0&&".."!==s[l-1]?s.splice(--l,2):a?s.splice(l,1):++l:"."===s[l]?s.splice(l,1):++l;return o+u+s.join("/")};r.resolve=function(e,t,r){var s=function(e,t){if("undefined"==typeof URL||!i.test(e)||i.test(t))return null;try{return new URL(t,e).href}catch(e){return null}}(e,t);return s||(r||(t=o(t)),n(t)?t:(r||(e=o(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?o(e+"/"+t):t))}},1717(e,t){var r=t;r.numberRe=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,r.typeRefRe=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,r.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)$/},6612(e){e.exports=function(e,t,r){var i=r||8192,n=i>>>1,o=null,s=i;return function(r){if(r<1||r>n)return e(r);s+r>i&&(o=e(i),s=0);var a=t.call(o,s,s+=r);return 7&s&&(s=1+(7|s)),a}}},3025(e,t){var r,i=t,n=new TextDecoder("utf-8",{ignoreBOM:!0});try{r=new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0})}catch(e){r=n}function o(e,t,r,i){var n=0===r&&i===t.length?t:t.subarray(r,i);return e.decode(n)}i.length=function(e){for(var t=0,r=0,i=0;i<e.length;++i)(r=e.charCodeAt(i))<128?t+=1:r<2048?t+=2:55296==(64512&r)&&56320==(64512&e.charCodeAt(i+1))?(++i,t+=4):t+=3;return t},i.read=function(e,t,r){if(r-t<1)return"";if(r-t>=64)return o(n,e,t,r);for(var i,s,a,u,l,c,f,h,p="",d=t;d+7<r;d+=8){if(128&((i=e[d])|(s=e[d+1])|(a=e[d+2])|(u=e[d+3])|(l=e[d+4])|(c=e[d+5])|(f=e[d+6])|(h=e[d+7])))return p+o(n,e,d,r);p+=String.fromCharCode(i,s,a,u,l,c,f,h)}for(;d<r;++d){if(128&(i=e[d]))return p+o(n,e,d,r);p+=String.fromCharCode(i)}return p},i.readStrict=function(e,t,i){if(i-t<1)return"";if(i-t>=64)return o(r,e,t,i);for(var n,s,a,u,l,c,f,h,p="",d=t;d+7<i;d+=8){if(128&((n=e[d])|(s=e[d+1])|(a=e[d+2])|(u=e[d+3])|(l=e[d+4])|(c=e[d+5])|(f=e[d+6])|(h=e[d+7])))return p+o(r,e,d,i);p+=String.fromCharCode(n,s,a,u,l,c,f,h)}for(;d<i;++d){if(128&(n=e[d]))return p+o(r,e,d,i);p+=String.fromCharCode(n)}return p},i.write=function(e,t,r){for(var i,n,o=r,s=0;s<e.length;++s)(i=e.charCodeAt(s))<128?t[r++]=i:i<2048?(t[r++]=i>>6|192,t[r++]=63&i|128):55296==(64512&i)&&56320==(64512&(n=e.charCodeAt(s+1)))?(i=65536+((1023&i)<<10)+(1023&n),++s,t[r++]=i>>18|240,t[r++]=i>>12&63|128,t[r++]=i>>6&63|128,t[r++]=63&i|128):(t[r++]=i>>12|224,t[r++]=i>>6&63|128,t[r++]=63&i|128);return r-o}},8273(e,t,r){e.exports=function(e){var t=n.codegen(["m","q"])('if(typeof m!=="object"||m===null)')("return%j","object expected")("if(q===undefined)q=0")("if(q>util.recursionLimit)")("return%j","max depth exceeded"),r=e.oneofsArray,i={};r.length&&t("var p={}");for(var u=0;u<e.fieldsArray.length;++u){var l=e._fieldsArray[u].resolve(),c="m"+n.safeProp(l.name);if(l.optional&&t("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",c,l.name),l.map)t("if(!util.isObject(%s))",c)("return%j",o(l,"object"))("var k=Object.keys(%s)",c)("for(var i=0;i<k.length;++i){"),a(t,l,"k[i]"),s(t,l,u,c+"[k[i]]")("}");else if(l.repeated)t("if(!Array.isArray(%s))",c)("return%j",o(l,"array"))("for(var i=0;i<%s.length;++i){",c),s(t,l,u,c+"[i]")("}");else{if(l.partOf){var f=n.safeProp(l.partOf.name);1===i[l.partOf.name]&&t("if(p%s===1)",f)("return%j",l.partOf.name+": multiple values"),i[l.partOf.name]=1,t("p%s=1",f)}s(t,l,u,c)}l.optional&&t("}")}return t("return null")};var i=r(3990),n=r(4595);function o(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function s(e,t,r,n){var s=t.resolvedType;if(s)if(s instanceof i)if("CLOSED"===s._features.enum_type){e("switch(%s){",n)("default:")("return%j",o(t,"enum value"));for(var a=Object.keys(s.values),u=0;u<a.length;++u)e("case %i:",s.values[a[u]]);e("break")("}")}else e('if(typeof %s!=="number"||(%s|0)!==%s)',n,n,n)("return%j",o(t,"enum value"));else e("{")("var e=types[%i].verify(%s,q+1);",r,n)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",n)("return%j",o(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",n,n,n,n)("return%j",o(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',n)("return%j",o(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',n)("return%j",o(t,"boolean"));break;case"string":e("if(!util.isString(%s))",n)("return%j",o(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',n,n,n)("return%j",o(t,"buffer"))}return e}function a(e,t,r){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",r)("return%j",o(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",r)("return%j",o(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",r)("return%j",o(t,"boolean key"))}return e}},5855(e,t,r){var i=t,n=r(7652),o=r(3499);i[".google.protobuf.Any"]={fromObject:function(e,t){if(void 0===t&&(t=0),t>o.recursionLimit)throw Error("max depth exceeded");if(e&&e["@type"]){var r=e["@type"].substring(e["@type"].lastIndexOf("/")+1),i=this.lookup(r,[this.constructor]);if(i){var n="."===e["@type"].charAt(0)?e["@type"].slice(1):e["@type"];return-1===n.indexOf("/")&&(n="/"+n),this.create({type_url:n,value:i.encode(i.fromObject(e,t+1)).finish()})}}return this.fromObject(e,t)},toObject:function(e,t,r){if(void 0===r&&(r=0),r>o.recursionLimit)throw Error("max depth exceeded");var i="",s="";if(t&&t.json&&e.type_url&&e.value){s=e.type_url.substring(e.type_url.lastIndexOf("/")+1),i=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var a=this.lookup(s,[this.constructor]);a&&(e=a.decode(e.value,void 0,void 0,r+1))}if(!(e instanceof this.ctor)&&e instanceof n){var u=e.$type.toObject(e,t,r+1);return""===i&&(i="type.googleapis.com/"),s=i+("."===e.$type.fullName[0]?e.$type.fullName.slice(1):e.$type.fullName),u["@type"]=s,u}return this.toObject(e,t,r)}}},6804(e,t,r){e.exports=u;var i,n=r(3499),o=n.LongBits,s=n.base64,a=n.utf8;function u(){this.pos=0,this.buf=this.constructor.alloc(u.initialBufferSize),this.view=null,this.states=null}u.initialBufferSize=128,Object.defineProperty(u.prototype,"len",{configurable:!0,enumerable:!0,get:function(){return this.pos}});var l=function(){return n.Buffer?function(){return(u.create=function(){return new i})()}:function(){return new u}};function c(e){return e<128?1:e<16384?2:e<2097152?3:e<268435456?4:5}function f(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;return t[r]=e,r+1}function h(e,t,r){for(var i=e.lo,n=e.hi;n;)t[r++]=127&i|128,i=(i>>>7|n<<25)>>>0,n>>>=7;for(;i>127;)t[r++]=127&i|128,i>>>=7;return t[r]=i,r+1}function p(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}u.create=l(),u.alloc=function(e){return new Uint8Array(e)},u.alloc=n.pool(u.alloc,Uint8Array.prototype.subarray),u.prototype._reserve=function(e){var t=this.pos+e;if(t>this.buf.length){var r=this.buf.length<<1;r<t&&(r=t);var i=this.constructor.alloc(r);i.set(this.buf.subarray(0,this.pos),0),this.buf=i,this.view=null}},u.prototype.uint32=function(e){e>>>=0,this._reserve(5);var t=this.pos;return this.pos=f(e,this.buf,t),this},u.prototype.int32=function(e){return(e|=0)<0?(this._reserve(10),h(o.fromNumber(e),this.buf,this.pos),this.pos+=10,this):this.uint32(e)},u.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},u.prototype.uint64=function(e){var t=o.from(e);this._reserve(10);var r=this.pos;return this.pos=h(t,this.buf,r),this},u.prototype.int64=u.prototype.uint64,u.prototype.sint64=function(e){var t=o.from(e).zzEncode();this._reserve(10);var r=this.pos;return this.pos=h(t,this.buf,r),this},u.prototype.bool=function(e){return this._reserve(1),this.buf[this.pos++]=e?1:0,this},u.prototype.fixed32=function(e){return this._reserve(4),p(e>>>0,this.buf,this.pos),this.pos+=4,this},u.prototype.sfixed32=u.prototype.fixed32,u.prototype.fixed64=function(e){var t=o.from(e);return this._reserve(8),p(t.lo,this.buf,this.pos),p(t.hi,this.buf,this.pos+4),this.pos+=8,this},u.prototype.sfixed64=u.prototype.fixed64,u.prototype.float=function(e){return this._reserve(4),n.float.writeFloatLE(e,this.buf,this.pos),this.pos+=4,this},u.prototype.double=function(e){return this._reserve(8),n.float.writeDoubleLE(e,this.buf,this.pos),this.pos+=8,this},u.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._reserve(1),this.buf[this.pos++]=0,this;if(n.isString(e)){var r=u.alloc(t=s.length(e));s.decode(e,r,0),e=r}return this.uint32(t),this._reserve(t),this.buf.set(e,this.pos),this.pos+=t,this},u.prototype.raw=function(e){var t=e.length>>>0;return t?(this._reserve(t),this.buf.set(e,this.pos),this.pos+=t,this):this},u.prototype._delim=function(e,t){var r=c(t);return r>1&&this.buf.copyWithin(e+r,e+1,e+1+t),f(t,this.buf,e),this.pos=e+r+t,this},u.prototype.string=function(e){var t=e.length;if(!t)return this._reserve(1),this.buf[this.pos++]=0,this;if(t<128){this._reserve(3*t+5);var r=this.pos;return this._delim(r,a.write(e,this.buf,r+1))}var i=a.length(e);return this.uint32(i),this._reserve(i),i===e.length?function(e,t,r){for(var i=0;i<e.length;)t[r++]=e.charCodeAt(i++)}(e,this.buf,this.pos):a.write(e,this.buf,this.pos),this.pos+=i,this},u.prototype.uint32s=function(e){var t=e.length;this._reserve(5*t+5);for(var r=this.buf,i=this.pos,n=i+1,o=0;o<t;++o)n=f(e[o]>>>0,r,n);return this._delim(i,n-i-1)},u.prototype.int32s=function(e){var t=e.length;this._reserve(10*t+5);for(var r,i=this.buf,n=this.pos,s=n+1,a=0;a<t;++a)s=(r=0|e[a])<0?h(o.fromNumber(r),i,s):f(r,i,s);return this._delim(n,s-n-1)},u.prototype.sint32s=function(e){var t=e.length;this._reserve(5*t+5);for(var r=this.buf,i=this.pos,n=i+1,o=0;o<t;++o)n=f((e[o]<<1^e[o]>>31)>>>0,r,n);return this._delim(i,n-i-1)},u.prototype.uint64s=function(e){var t=e.length;this._reserve(10*t+5);for(var r=this.buf,i=this.pos,n=i+1,s=0;s<t;++s)n=h(o.from(e[s]),r,n);return this._delim(i,n-i-1)},u.prototype.int64s=u.prototype.uint64s,u.prototype.sint64s=function(e){var t=e.length;this._reserve(10*t+5);for(var r=this.buf,i=this.pos,n=i+1,s=0;s<t;++s)n=h(o.from(e[s]).zzEncode(),r,n);return this._delim(i,n-i-1)},u.prototype.bools=function(e){var t=e.length;this.uint32(t),this._reserve(t);for(var r=this.buf,i=this.pos,n=0;n<t;++n)r[i++]=e[n]?1:0;return this.pos+=t,this};function d(e,t,r){var i=e.view;if(i||t<r)return i;var n=e.buf;return e.view=new DataView(n.buffer,n.byteOffset,n.byteLength)}u.prototype.fixed32s=function(e){var t=e.length,r=4*t;this.uint32(r),this._reserve(r);var i,n=this.pos,o=d(this,t,128);if(o)for(i=0;i<t;++i)o.setUint32(n,e[i]>>>0,!0),n+=4;else{var s=this.buf;for(i=0;i<t;++i)p(e[i]>>>0,s,n),n+=4}return this.pos+=r,this},u.prototype.sfixed32s=u.prototype.fixed32s,u.prototype.fixed64s=function(e){var t=e.length,r=8*t;this.uint32(r),this._reserve(r);var i,n,s=this.pos,a=d(this,t,128);if(a)for(i=0;i<t;++i)n=o.from(e[i]),a.setUint32(s,n.lo,!0),a.setUint32(s+4,n.hi,!0),s+=8;else{var u=this.buf;for(i=0;i<t;++i)p((n=o.from(e[i])).lo,u,s),p(n.hi,u,s+4),s+=8}return this.pos+=r,this},u.prototype.sfixed64s=u.prototype.fixed64s,u.prototype.floats=function(e){var t=e.length,r=4*t;this.uint32(r),this._reserve(r);var i,o=this.pos,s=d(this,t,16);if(s)for(i=0;i<t;++i)s.setFloat32(o,e[i],!0),o+=4;else{var a=this.buf;for(i=0;i<t;++i)n.float.writeFloatLE(e[i],a,o),o+=4}return this.pos+=r,this},u.prototype.doubles=function(e){var t=e.length,r=8*t;this.uint32(r),this._reserve(r);var i,o=this.pos,s=d(this,t,16);if(s)for(i=0;i<t;++i)s.setFloat64(o,e[i],!0),o+=8;else{var a=this.buf;for(i=0;i<t;++i)n.float.writeDoubleLE(e[i],a,o),o+=8}return this.pos+=r,this},u.prototype.fork=function(){return this._reserve(1),(this.states||(this.states=[])).push(this.pos),this.pos+=1,this},u.prototype.reset=function(){var e=this.states;return e&&e.length?this.pos=e.pop():this.pos=0,this},u.prototype.ldelim=function(){var e,t,r=this.states;if(r&&r.length){var i=r.pop();(t=c(e=this.pos-i-1))>1?(this._reserve(t-1),this.buf.copyWithin(i+t,i+1,i+1+e),this.pos+=t-1,f(e,this.buf,i)):this.buf[i]=e}else t=c(e=this.pos),this._reserve(t),this.buf.copyWithin(t,0,e),f(e,this.buf,0),this.pos+=t;return this},u.prototype.finish=function(e){if(e)return this.buf.subarray(0,this.pos);var t=this.constructor.alloc(this.pos);return t.set(this.buf.subarray(0,this.pos),0),t},u.prototype.finishInto=function(e,t){return void 0===t&&(t=0),e.set(this.buf.subarray(0,this.pos),t),e},u._configure=function(e){i=e,u.create=l(),i._configure()}},2453(e,t,r){e.exports=s;var i=r(6804);s.prototype=Object.create(i.prototype,{constructor:{value:s,writable:!0,enumerable:!1,configurable:!0}});var n,o=r(3499);function s(){i.call(this)}s._configure=function(){s.alloc=o.Buffer&&o.Buffer.allocUnsafe,n=o.Buffer&&o.Buffer.prototype.utf8Write?function(e,t,r){return t.utf8Write(e,r)}:function(e,t,r){return t.write(e,r)}},s.prototype.bytes=function(e){o.isString(e)&&(e=o.Buffer.from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&(this._reserve(t),this.buf.set(e,this.pos),this.pos+=t),this},s.prototype.string=function(e){var t=e.length;if(!t)return this._reserve(1),this.buf[this.pos++]=0,this;if(t<128){this._reserve(3*t+5);var r=this.pos,i=this.buf;return this._delim(r,t<40?o.utf8.write(e,i,r+1):n(e,i,r+1))}var s=o.Buffer.byteLength(e);return this.uint32(s),this._reserve(s),n(e,this.buf,this.pos),this.pos+=s,this},s._configure()}};const c={};function f(e){const t=c[e];if(void 0!==t)return t.exports;const r=c[e]={id:e,loaded:!1,exports:{}};return l[e].call(r.exports,r,r.exports,f),r.loaded=!0,r.exports}f.cw=e=>{var t;return()=>{if(e){var r=e;e=0,t={exports:{}},r.call(t.exports,t,t.exports)}return t.exports}},f.d=(e,t)=>{for(var r in t)f.o(t,r)&&!f.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),f.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var h=f.cw(e=>{const t=f(6464),{stdout:r,stderr:i}=k(),{stringReplaceAll:n,stringEncaseCRLFWithFirstIndex:o}=d(),{isArray:s}=Array,a=["ansi","ansi","ansi256","ansi16m"],u=Object.create(null);class ChalkClass{constructor(e){return l(e)}}const l=e=>{const t={};return((e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const i=r?r.level:0;e.level=void 0===t.level?i:t.level})(t,e),t.template=(...e)=>w(t.template,...e),Object.setPrototypeOf(t,c.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},t.template.Instance=ChalkClass,t.template};function c(e){return l(e)}for(const[e,r]of Object.entries(t))u[e]={get(){const t=g(this,m(r.open,r.close,this._styler),this._isEmpty);return Object.defineProperty(this,e,{value:t}),t}};u.visible={get(){const e=g(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};const h=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const e of h)u[e]={get(){const{level:r}=this;return function(...i){const n=m(t.color[a[r]][e](...i),t.color.close,this._styler);return g(this,n,this._isEmpty)}}};for(const e of h){u["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const{level:r}=this;return function(...i){const n=m(t.bgColor[a[r]][e](...i),t.bgColor.close,this._styler);return g(this,n,this._isEmpty)}}}}const y=Object.defineProperties(()=>{},{...u,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),m=(e,t,r)=>{let i,n;return void 0===r?(i=e,n=t):(i=r.openAll+e,n=t+r.closeAll),{open:e,close:t,openAll:i,closeAll:n,parent:r}},g=(e,t,r)=>{const i=(...e)=>s(e[0])&&s(e[0].raw)?v(i,w(i,...e)):v(i,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(i,y),i._generator=e,i._styler=t,i._isEmpty=r,i},v=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let r=e._styler;if(void 0===r)return t;const{openAll:i,closeAll:s}=r;if(-1!==t.indexOf(""))for(;void 0!==r;)t=n(t,r.close,r.open),r=r.parent;const a=t.indexOf("\n");return-1!==a&&(t=o(t,s,i,a)),i+t+s};let b;const w=(e,...t)=>{const[r]=t;if(!s(r)||!s(r.raw))return t.join(" ");const i=t.slice(1),n=[r.raw[0]];for(let e=1;e<r.length;e++)n.push(String(i[e-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[e]));return void 0===b&&(b=p()),b(e,n.join(""))};Object.defineProperties(c.prototype,u);const O=c();O.supportsColor=r,O.stderr=c({level:i?i.level:0}),O.stderr.supportsColor=i,e.exports=O}),p=()=>f(2991),d=f.cw(e=>{e.exports={stringReplaceAll:(e,t,r)=>{let i=e.indexOf(t);if(-1===i)return e;const n=t.length;let o=0,s="";do{s+=e.substr(o,i-o)+t+r,o=i+n,i=e.indexOf(t,o)}while(-1!==i);return s+=e.substr(o),s},stringEncaseCRLFWithFirstIndex:(e,t,r,i)=>{let n=0,o="";do{const s="\r"===e[i-1];o+=e.substr(n,(s?i-1:i)-n)+t+(s?"\r\n":"\n")+r,n=i+1,i=e.indexOf("\n",n)}while(-1!==i);return o+=e.substr(n),o}}}),y=f.cw(e=>{e.exports={...f(8737),...f(4423),...f(2591),...f(6288),...m(),...g(),...v(),...b(),...w(),...O()}}),m=()=>f(3376),g=()=>f(3798),v=()=>f(2455),b=()=>f(7024),w=()=>f(9288),O=()=>f(5422),k=f.cw(e=>{e.exports={stdout:!1,stderr:!1}}),_=f.cw(e=>{e.exports=j()}),j=f.cw((e,t)=>{(t=e.exports=f(5558)).build="full",t.tokenize=S(),t.parse=E(),t.common=f(6994),t.Root._configure(t.Type,t.parse,t.common)}),E=()=>f(7828),S=()=>f(4846),x=f(1853);_();var T=f(4641);h();var N=function(e,t){return N=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},N(e,t)};function A(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}N(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function P(e,t,r,i){return new(r||(r=Promise))(function(n,o){function s(e){try{u(i.next(e))}catch(e){o(e)}}function a(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((i=i.apply(e,t||[])).next())})}Object.create;Object.create;var F=function(){function e(e){this.ctor=e}return e.prototype.getTypes=function(){return[this.ctor]},e.prototype.hasFriendlyName=function(){return"Object"!==this.ctor.name},e}(),I=function(e){function t(t){return e.call(this,t)||this}return A(t,e),t}(F),R=function(e){function t(t){return e.call(this,t)||this}return A(t,e),t}(F);!function(e){function t(t){var r=e.call(this,Array)||this;return r.elementType=t,r}A(t,e),t.prototype.getTypes=function(){return e.prototype.getTypes.call(this).concat(this.elementType.getTypes())}}(R);!function(e){function t(t){var r=e.call(this,Set)||this;return r.elementType=t,r}A(t,e),t.prototype.getTypes=function(){return e.prototype.getTypes.call(this).concat(this.elementType.getTypes())}}(R);!function(e){function t(t,r,i){var n=e.call(this,Map)||this;return n.keyType=t,n.valueType=r,n.options=i,n}A(t,e),t.prototype.getTypes=function(){return e.prototype.getTypes.call(this).concat(this.keyType.getTypes(),this.valueType.getTypes())},t.prototype.getCompleteOptions=function(){var e,t;return{shape:null!==(t=null===(e=this.options)||void 0===e?void 0:e.shape)&&void 0!==t?t:0}}}(R);var L=new I(function(){});const M="/**\n * OpenHPS Protocol Buffer \n * This file was automatically generated with @openhps/protobuf\n * \n * (c) 2019-2026 Maxim Van de Wynckel & Vrije Universiteit Brussel\n **/\n\n",C=M+'syntax = "proto3";\nimport "google/protobuf/descriptor.proto";\n\nextend google.protobuf.EnumValueOptions {\n\toptional string className = 50001;\n\toptional string packageName = 50002;\n}\n';class ProtobufGenerator{constructor(e){this.logger=()=>{},this.options=e}static getNumberType(e){switch(e){case n.DECIMAL:case n.DOUBLE:return"double";case n.FLOAT:return"float";case n.LONG:return"int64";case n.INTEGER:case n.SHORT:return"int32";default:return"string"}}}class ObjectGenerator extends ProtobufGenerator{processObject(e,t){throw new Error("Method not implemented.")}generate(e,t){throw new Error("Method not implemented.")}static typeMapping(e,t,i,n){switch(t.ctor){case String:case Date:return{syntax:"string"};case Number:{const t=i.options,r=t?this.getNumberType(t.numberType):"int32";return"string"===r&&n.logLevel>1&&console.warn(h().yellow(`${e.classType.name}[${i.name}] defines a number without specifing a type. This will affect performance.`)),{syntax:r}}case Boolean:return{syntax:"bool"};case Array:{const r=this.typeMapping(e,t.elementType,i,n);if(void 0===r)return;return{syntax:`repeated ${r.syntax}`,types:[r]}}case Map:{const r=this.typeMapping(e,t.keyType,i,n),o=this.typeMapping(e,t.valueType,i,n);if(void 0===r||void 0===o)return;return{syntax:`map<${r.syntax},${o.syntax}>`,types:[o,r]}}case Set:case Object:case Function:return;case Buffer:case Uint8Array:return{syntax:"bytes"};default:{const o=r.getOwnMetadata(t.ctor);if(o){if(o.knownTypes.size>1&&o.protobuf.generator.type&&o.protobuf.generator.type!==e.classType)return this.typeMapping(r.getOwnMetadata(o.protobuf.generator.type),t,i,n);if(o.knownTypes.size>1&&!o.protobuf.generator.type&&i&&(n.useAnyType||!o.protobuf.generator.allowOverride))return{syntax:"google.protobuf.Any"};{const e=t.ctor.prototype._module?t.ctor.prototype._module:"@openhps/core";return{syntax:t.ctor.name,package:e}}}return{syntax:"google.protobuf.Any"}}}}static processObject(e,t){var i,n,s;e.protobuf=null!==(i=e.protobuf)&&void 0!==i?i:{},e.protobuf.generator=null!==(n=e.protobuf.generator)&&void 0!==n?n:{subModules:new Set,subTypes:[],allowOverride:!0};const a=e.dataMembers;if(e.knownTypes.size>1){const i=[],n=new Set,u=o.cloneDeep(a);e.knownTypes.forEach(t=>{const s=r.getOwnMetadata(t).dataMembers;n.add(t.prototype._module),t!==e.classType&&t.prototype instanceof e.classType&&i.push(t),s.forEach((t,r)=>{var i,n,s,l,c,f,h;if(t.options=null!==(i=t.options)&&void 0!==i?i:{},t.options.protobuf=null!==(n=t.options.protobuf)&&void 0!==n?n:{},a.has(r)){if(a.get(r).type().ctor!==t.type().ctor){const r=u.get(t.key);e.protobuf.generator.allowOverride=!1,r.options=null!==(s=r.options)&&void 0!==s?s:{},r.options.protobuf=null!==(l=r.options.protobuf)&&void 0!==l?l:{subMembers:new Map};const i=null!==(c=r.options.protobuf.subMembers)&&void 0!==c?c:new Map,n=t.name+"_"+t.type().ctor.name.toLowerCase();i.set(n,t),t.options=null!==(f=t.options)&&void 0!==f?f:{},t.options.protobuf=null!==(h=t.options.protobuf)&&void 0!==h?h:{},t.options.protobuf.name=n}}else{const e=o.cloneDeep(t);e.options.protobuf={optional:!0,subMembers:new Map},u.set(r,e)}})}),e.protobuf.generator.subTypes=i,e.protobuf.generator.subModules=n,i.length>0&&(1===n.size||!t.useAnyType)&&(e.protobuf.generator.dataMembers=u,e.protobuf.generator.type=null!==(s=e.protobuf.generator.type)&&void 0!==s?s:e.classType,i.forEach(t=>{var i,n;const o=r.getOwnMetadata(t);o.protobuf=null!==(i=o.protobuf)&&void 0!==i?i:{},o.protobuf.generator=null!==(n=o.protobuf.generator)&&void 0!==n?n:{},o.protobuf.generator.type=e.classType}))}}static createProtoMessage(t,i){var n;const o=r.getRootMetadata(t.classType),s=null!==(n=t.protobuf.generator.dataMembers)&&void 0!==n?n:t.dataMembers,a=t.classType.prototype._module?t.classType.prototype._module:"@openhps/core",u=[];let l;if(t.knownTypes.size>1&&t.protobuf.generator.subTypes.length>0&&(1===t.protobuf.generator.subModules.size||!i.useAnyType)&&(u.push('import "../../common.proto";'),l=`\nenum ${t.classType.name}Type {\n\tUNSPECIFIED = 0;\n`+[t.classType,...t.protobuf.generator.subTypes].map(e=>`\t${e.name.replace(/(?:^|\.?)(([A-Z0-9][a-z0-9]|$)|([0-9]+[A-Z]))/g,(e,t)=>"_"+t).replace(/(^_)|(_$)/g,"").toUpperCase()} = ${Array.from(o.knownTypes.values()).indexOf(e)+1} [\n\t\t(className) = "${e.name}",\n\t\t(packageName) = "${e.prototype._module}"\n\t]`).join(";\n")+";\n}\n"),o.classType!==t.classType){const t=this.typeMapping(o,new e(o.classType),void 0,i);t.package&&t.package===a?u.push(`import "${t.syntax}.proto";`):t.package&&u.push(`import "../../${t.package}/${t.syntax}.proto";`)}let c=1;const f=Array.from(s.values()).map(e=>{var r;const n=e.options&&e.options.protobuf?e.options.protobuf:{};let o;const s=null!==(r=n.name)&&void 0!==r?r:e.name;if("uid"===s)o={syntax:"oneof",types:[{syntax:"string",name:"uid_string"},{syntax:"bytes",name:"uid_bytes"}]};else if(e.type()===L)o=n.subMembers&&n.subMembers.size>0?{syntax:"oneof",types:[...Array.from(n.subMembers.keys()).map(e=>{const r=n.subMembers.get(e),o=this.typeMapping(t,r.type(),r,i);return o.name=e,o}),{syntax:"google.protobuf.Any",name:s+"_any"}]}:{syntax:"google.protobuf.Any"};else{if(e.serializer&&void 0===e.type)return;o=this.typeMapping(t,e.type(),e,i)}if(o)return o.package&&o.package===a?u.push(`import "${o.syntax}.proto";`):o.package?u.push(`import "../../${o.package}/${o.syntax}.proto";`):"google.protobuf.Any"===o.syntax&&u.push('import "google/protobuf/any.proto";'),o.types&&o.types.forEach(e=>{e.package&&e.package===a?u.push(`import "${e.syntax}.proto";`):e.package?u.push(`import "../../${e.package}/${e.syntax}.proto";`):"google.protobuf.Any"===e.syntax&&u.push('import "google/protobuf/any.proto";')}),"oneof"===o.syntax?`\toneof ${s} {\n`+o.types.map(e=>`\t\t${e.syntax} ${e.name} = ${c++}`).join(";\n")+";\n\t}":`\t${!n.optional||o.syntax.includes("<")||o.syntax.includes("repeated")?"":"optional "}${o.syntax} ${s} = ${c++};`}).filter(e=>void 0!==e);return[a,M+`package ${a.replace(/[@/-]/g,"")};\nsyntax = "proto3";\n`+u.filter((e,t)=>u.indexOf(e)===t).join("\n")+"\n"+(l||"")+`\nmessage ${t.classType.name} {\n`+(o.protobuf.generator.type?`\t${o.protobuf.generator.type.name}Type _type = 0;\n`:"")+f.join("\n")+"\n}\n"]}}var B=f(9439);class ProjectGenerator extends t{static findAllModules(e){var t;const r=B.resolve(B.join(e,"package.json")),i=null===(t=require.main)||void 0===t?void 0:t.path;if(void 0!==i&&r===B.resolve(i))return[];if(y().existsSync(r)){const e=JSON.parse(y().readFileSync(r,{encoding:"utf-8"})),t=e.dependencies,i=e.devDependencies,n=Object.assign(Object.assign({},t),i);return Object.keys(n).map(e=>{try{return require(e),require.cache[require.resolve(e)]}catch(e){return null}}).filter(Boolean)}}static findModule(e){const t=B.resolve(e),r=B.join(t,"package.json");if(y().existsSync(r)){return JSON.parse(y().readFileSync(r,{encoding:"utf-8"})).name}{const r=B.dirname(t);if(r===t)throw new Error(`Unable to find a package.json above '${e}'`);return this.findModule(r)}}static loadModules(e,t=require.main){void 0!==t?(this._modules.add(t.id),t.exports&&Object.keys(t.exports).forEach(r=>{const i=t.exports[r];e.includes(i)&&(i.prototype._module=this.findModule(B.dirname(require.resolve(t.id))),this._packages.add(i.prototype._module))}),Array.isArray(t.children)&&t.children.forEach(t=>{void 0===t||this._modules.has(t.id)||this.loadModules(e,t)})):Object.values(require.cache).filter(e=>void 0!==e&&Array.isArray(e.children)).forEach(t=>this.loadModules(e,t))}static getPackages(){return 0===this._packages.size&&this.loadClasses(),Array.from(this._packages.values())}static loadClasses(){const e=[];return this._modules=new Set,this._packages=new Set,this.findAllModules("./"),this.knownTypes.forEach(t=>{const i=r.getOwnMetadata(t);i&&e.push(i)}),this.loadModules(e.map(e=>e.classType)),e}static generateProtoMessages(e){return new Promise(t=>{const r=new Map,i=this.loadClasses();i.forEach(t=>{ObjectGenerator.processObject(t,e)}),i.forEach(t=>{e.logLevel>2&&console.log(h().italic(`Generating ${t.classType.name}`,t.classType.prototype._module?`of module ${t.classType.prototype._module}`:""));const i=ObjectGenerator.createProtoMessage(t,e);r.set(t.classType.name,i)}),t(r)})}static buildProject(e,t={}){return new Promise((r,i)=>{(()=>P(this,void 0,void 0,function*(){const i=B.resolve(e);if(i===B.parse(i).root||i===process.cwd()||process.cwd().startsWith(i+B.sep))throw new Error(`Refusing to use '${i}': it is the current working directory, a parent of it, or the filesystem root.`);(yield y().pathExists(i))&&(yield y().promises.rm(i,{recursive:!0})),yield y().promises.mkdir(i,{recursive:!0}),t.logLevel>0&&(console.log("Generating protocol buffer messages ..."),console.log("Use of any types = ",t.useAnyType));const n=yield ProjectGenerator.generateProtoMessages(t);t.logLevel>0&&console.log("Saving generating protocol buffer messages ...");for(const[e,t]of n){const r=B.join(i,...t[0].split("."));yield y().ensureDir(r),yield y().promises.writeFile(B.join(r,e+".proto"),t[1],{encoding:"utf-8"})}yield y().promises.writeFile(B.join(i,"common.proto"),C,{encoding:"utf-8"}),r(n.size)}))().catch(i)})}}ProjectGenerator._modules=new Set,ProjectGenerator._packages=new Set;"object"==typeof Reflect&&Reflect.getMetadata;function D(e){return"string"==typeof e.name?e.name:"undefined"}var $="__typedJsonJsonObjectMetadataInformation__",z=function(){function e(e){this.dataMembers=new Map,this.knownTypes=new Set,this.knownTypesDeferred=[],this.isExplicitlyMarked=!1,this.isHandledWithoutAnnotation=!1,this.classType=e}return e.getJsonObjectName=function(t){var r=e.getFromConstructor(t);return D(void 0===r?t:r.classType)},e.getFromConstructor=function(t){var r=t.prototype;if(null!=r){var i;if(Object.prototype.hasOwnProperty.call(r,$)&&(i=r[$]),!0===(null==i?void 0:i.isExplicitlyMarked))return i;if(e.doesHandleWithoutAnnotation(t)){var n=new e(t);return n.isExplicitlyMarked=!0,n}}},e.ensurePresentInPrototype=function(t){if(Object.prototype.hasOwnProperty.call(t,$))return t[$];var r=new e(t.constructor),i=t[$];return void 0!==i&&(i.dataMembers.forEach(function(e,t){r.dataMembers.set(t,e)}),i.knownTypes.forEach(function(e){r.knownTypes.add(e)}),r.typeResolver=i.typeResolver,r.typeHintEmitter=i.typeHintEmitter),Object.defineProperty(t,$,{enumerable:!1,configurable:!1,writable:!1,value:r}),r},e.getKnownTypeNameFromType=function(t){var r=e.getFromConstructor(t);return D(void 0===r?t:r.classType)},e.doesHandleWithoutAnnotation=function(e){return-1!==[Date,Number,String,Boolean].indexOf(e)||function(e){return-1!==[Float32Array,Float64Array,Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array].indexOf(e)}(e)||e===DataView||e===ArrayBuffer},e.prototype.processDeferredKnownTypes=function(){var e=this;this.knownTypesDeferred.forEach(function(t){t().getTypes().forEach(function(t){return e.knownTypes.add(t)})}),this.knownTypesDeferred=[]},e}();const q=new(j().Type)("PrimitiveWrapperMessage");q.add(new(j().Field)("value",1,"string"));class ProtobufSerializer extends t{static getFiles(e,t=[]){if(!T.statSync(e).isDirectory())return[];const r=T.readdirSync(x.normalize(e));for(const i of r){const r=`${e}/${i}`;T.statSync(r).isDirectory()?this.getFiles(r,t):r.endsWith(".proto")&&t.push(x.normalize(r))}return t}static initialize(e){return new Promise((t,i)=>{ProtobufSerializer.root=new(j().Root);const n=new Map,o=x.dirname(require.resolve("protobufjs/package.json")),s=ProtobufSerializer.root.resolvePath.bind(ProtobufSerializer.root);ProtobufSerializer.root.resolvePath=(e,t)=>t.startsWith("google/protobuf/")?x.join(o,t):s(e,t),Promise.resolve(e?Promise.resolve():ProjectGenerator.buildProject(x.resolve("tmp"))).then(()=>{const t=this.getFiles(x.resolve(null!=e?e:"tmp")),o=new Promise(e=>{ProtobufSerializer.root.load(t,{keepCase:!0}).then(()=>{t.forEach(e=>{const t=x.parse(e).name;if(this.knownTypes.get(t)){const e=r.getOwnMetadata(this.knownTypes.get(t)),i=r.getRootMetadata(this.knownTypes.get(t)),o=ProtobufSerializer.root.lookupType(t);let s;const a=new Map;try{const e=ProtobufSerializer.root.lookupEnum(`${i.classType.name}Type`);Object.keys(e.values).forEach((r,i)=>{if(0===i)return;e.valuesOptions[r]["(className)"]===t&&(s=e.values[r]),a.set(e.values[r],e.valuesOptions[r]["(className)"])})}catch(e){}e.protobuf={messageType:o,messageTypeEnum:s,enumMapping:a},n.set(t,o)}}),this.options.types=n,e()}).catch(e=>i(e))});return this.wrapperRoot=new(j().Root),this.wrapperMessage=new(j().Type)("WrapperMessage"),this.wrapperMessage.add(new(j().Field)("data",1,"google.protobuf.Any")),this.wrapperMessage.addJSON(j().common["google/protobuf/any.proto"].nested),this.wrapperRoot.add(this.wrapperMessage),o}).then(()=>{t()}).catch(i)})}static serialize(e,t){const r=super.serialize(e,Object.assign(Object.assign({},this.options),t)),i=this.options.types.get(e.constructor.name),n=i.fromObject(r),o=this.wrapperMessage.create({data:{type_url:e.constructor.name,value:i.encode(n).finish()}});return this.wrapperMessage.encode(o).finish()}static deserialize(e,i,n){const o=this.wrapperMessage.decode(e),s=o.data.type_url,a=this.options.types.get(s);if(void 0===a)throw new Error(`Unknown protobuf type '${s}'`);const u=a.decode(o.data.value),l=null!=i?i:this.knownTypes.get(s);return this.options.deserializer.convertSingleValue(u,r.ensureTypeDescriptor(l),t.knownTypes,void 0,void 0,Object.assign(Object.assign({},n),this.options))}}ProtobufSerializer.options={serializer:new class InternalProtobufSerializer extends s{constructor(){super(),this.setSerializationStrategy(Map,this.convertAsMap.bind(this))}convertSingleValue(e,t,r,i,n){if(!a.utils.isValueDefined(e))return;if(!a.utils.isInstanceOf(e,t.ctor)){const i=a.utils.nameof(t.ctor),n=a.utils.nameof(e.constructor);return void this.errorHandler(new TypeError(`Could not serialize '${r}': expected '${i}', got '${n}'.`))}const o=this.serializationStrategy.get(t.ctor);if(void 0!==o)return o(e,t,r,this,i,n);if("object"==typeof e)return this.convertAsObject(e,t,r,this,i,n);let s=`Could not serialize '${r}'; don't know how to serialize type`;t.hasFriendlyName()&&(s+=` '${t.ctor.name}'`),this.errorHandler(new TypeError(`${s}.`))}convertAsObject(e,t,r,i,n,o){const s=z.getFromConstructor(t.ctor);let l,c=z.getFromConstructor(e.constructor);c||(c=s);const f=c;l={};const h=a.options.mergeOptions(i.options,f.options);f.dataMembers.forEach(t=>{var r;const i=a.options.mergeOptions(h,t.options);let n,s=null!==(r=i&&i.protobuf?i.protobuf.name:t.name)&&void 0!==r?r:t.name;if(void 0!==e[t.key]){if(null==t.type)throw new TypeError(`Could not serialize ${t.name}, there is no constructor nor serialization function to use.`);if("uid"===t.name){const r=u.fromString(e[t.key]);r?(n=r.toBuffer(),s+="_bytes"):(n=e[t.key],s+="_string")}else{const r=c.protobuf.messageType.get(s);n=this.convertSingleValue(e[t.key],t.type(),`${a.utils.nameof(f.classType)}.${t.key}`,i,Object.assign(Object.assign({},o),{field:r}))}if(a.utils.isValueDefined(n)){if(t.type()===L){const r=o.types.get(e[t.key].constructor.name);if(r){const i=r.create(n);n={type_url:e[t.key].constructor.name,value:r.encode(i).finish()}}else{const r=q.create({value:String(e[t.key])});n={type_url:e[t.key].constructor.name,value:q.encode(r).finish()}}}l[s]=n}}});const p=o.field&&"google.protobuf.Any"===o.field.type;if(!p&&s.knownTypes.size>1){const e=c.protobuf.messageType.create(Object.assign(Object.assign({},l),{_type:c.protobuf.messageTypeEnum}));l=e}else if(p){const t=c.protobuf.messageType,r=t.create(l);l={type_url:e.constructor.name,value:t.encode(r).finish()}}return l}convertAsMap(e,t,r,i,n,o){const s={};return e.forEach((e,a)=>{s[a]=i.convertSingleValue(e,t.valueType,r,n,o)}),s}},deserializer:new class InternalProtobufDeserializer extends i{constructor(){super(),this.setDeserializationStrategy(Number,e=>"number"==typeof e?e:"string"==typeof e?Number(e):e.toNumber?e.toNumber():e),this.setDeserializationStrategy(Map,(e,t,r,i,n,o,s)=>{const a=new Map;return Object.keys(e).forEach(u=>{a.set(u,n.convertSingleValue(e[u],t.valueType,r,i,o,s))}),a})}convertSingleValue(e,t,r,i,n,o){if(this.retrievePreserveNull(n)&&null===e)return null;if(!a.utils.isValueDefined(e))return;const s=this.deserializationStrategy.get(t.ctor);if(void 0!==s)return s(e,t,r,i,this,n,o);if("object"==typeof e)return this.convertAsObject(e,t,r,i,this,n,o);let u=`Could not deserialize '${i}'; don't know how to deserialize type`;t.hasFriendlyName()&&(u+=` '${t.ctor.name}'`),this.errorHandler(new TypeError(`${u}.`))}convertAsObject(t,r,i,n,o,s,l){let c=r.ctor,f=z.getFromConstructor(c);if(Object.prototype.hasOwnProperty.call(t,"_type")&&0!==t._type){const e=f.protobuf.enumMapping.get(t._type);if(e){const t=i.get(e);t!==c&&(c=t,f=z.getFromConstructor(c))}}else if(t.type_url&&t.value){const r=l.types.get(t.type_url);if(r){const a=r.decode(t.value);return this.convertAsObject(a,new e(i.get(t.type_url)),i,n,o,s,l)}const a=q.decode(t.value);switch(t.type_url){case"Boolean":return"true"===a.value;case"Number":return Number(a.value);default:return a.value}}const h=f,p={};h.dataMembers.forEach((r,n)=>{var s;const c=`${a.utils.nameof(h.classType)}.${n}`,f=a.options.mergeOptions(h.options,r.options),d=null!==(s=f&&f.protobuf?f.protobuf.name:r.name)&&void 0!==s?s:r.name,y=t[d];let m;if("uid"===r.name)if(Object.prototype.hasOwnProperty.call(t,"uid_bytes")&&t.uid_bytes.byteLength>0)m=u.fromBuffer(t.uid_bytes).toString();else{if(!Object.prototype.hasOwnProperty.call(t,"uid_string"))return;m=t.uid_string}else{if(!Object.prototype.hasOwnProperty.call(t,d)||null==y)return;if(r.type()===L&&y.type_url){const r=l.types.get(t[d].type_url);if(r){const t=i.get(y.type_url);if(void 0!==t){const n=r.decode(y.value);m=o.convertSingleValue(n,new e(t),i,c,f,l)}}else if(y.value){const e=q.decode(y.value);switch(y.type_url){case"Boolean":m="true"===e.value;break;case"Number":m=Number(e.value);break;default:m=e.value}}}else m=o.convertSingleValue(y,r.type(),i,c,f,l)}a.utils.isValueDefined(m)&&(p[r.key]=m)});const d=o.instantiateType(c);Object.assign(d,p);const y=f.onDeserializedMethodName;return null!=y&&("function"==typeof d[y]?d[y]():"function"==typeof d.constructor[y]?d.constructor[y]():o.getErrorHandler()(new TypeError(`onDeserialized callback'${a.utils.nameof(f.classType)}.${y}' is not a method.`))),d}},types:new Map};export{ProtobufSerializer};
|
|
2
3
|
//# sourceMappingURL=openhps-protobuf.es.min.js.map
|