apiuikit 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apiuikit.cjs.js +1 -1
- package/dist/apiuikit.css +1 -1
- package/dist/apiuikit.es.js +16 -9
- package/dist/components/Bindings.d.ts +3 -1
- package/dist/components/Navigation.d.ts +11 -4
- package/dist/components/SearchPanel.d.ts +9 -0
- package/dist/components/schema/SchemaNode.d.ts +10 -1
- package/dist/components/schema/SchemaTab.d.ts +3 -1
- package/dist/components/schema/SchemaTree.d.ts +5 -1
- package/dist/components/schema/SchemaTreeRow.d.ts +2 -1
- package/dist/config/config.d.ts +1 -0
- package/dist/containers/AsyncAPI/AsyncAPIDocumentProvider.d.ts +12 -0
- package/dist/containers/AsyncAPI/tests/searchHighlight.test.d.ts +1 -0
- package/dist/containers/Messages/MessageDetails.d.ts +3 -1
- package/dist/containers/Messages/Messages.d.ts +3 -1
- package/dist/containers/Operation/Operation.d.ts +3 -1
- package/dist/containers/Operation/Operations.d.ts +3 -1
- package/dist/containers/Schema/Schemas.d.ts +6 -1
- package/dist/containers/Server/Server.d.ts +8 -1
- package/dist/containers/Server/Servers.d.ts +7 -3
- package/dist/helpers/protobuf/lazyProtoToJsonSchema.d.ts +14 -0
- package/dist/helpers/schemaFormat.d.ts +3 -0
- package/dist/helpers/searchIndex.d.ts +18 -0
- package/dist/helpers/textHighlight.d.ts +2 -0
- package/dist/hooks/useSpecSearch.d.ts +13 -0
- package/dist/icons/Server.d.ts +4 -3
- package/dist/index-Bad1aEIj.js +11352 -0
- package/dist/{index-yG3rYT_D.js → index-CzcxQGxP.js} +1 -1
- package/dist/{index-DqcOEYz_.cjs → index-D7GelPk0.cjs} +1 -1
- package/dist/index-gn5KpvCL.cjs +73 -0
- package/dist/index.d.ts +2 -0
- package/dist/protoToJsonSchema-8Mm10CIx.cjs +83 -0
- package/dist/protoToJsonSchema-BJpwl2Am.js +6174 -0
- package/dist/protobufSchemaParser-Cj2WOp05.js +55 -0
- package/dist/protobufSchemaParser-D_2rEsD4.cjs +1 -0
- package/dist/public/sections.d.ts +42 -0
- package/dist/public/tests/sections.test.d.ts +1 -0
- package/dist/stories/Authorization.stories.d.ts +13 -0
- package/dist/stories/Bindings.stories.d.ts +12 -0
- package/dist/stories/ChannelAddress.stories.d.ts +13 -0
- package/dist/stories/CodeBlock.stories.d.ts +11 -0
- package/dist/stories/Examples.stories.d.ts +11 -0
- package/dist/stories/Information.stories.d.ts +1 -0
- package/dist/stories/Message.stories.d.ts +11 -0
- package/dist/stories/Messages.stories.d.ts +10 -0
- package/dist/stories/Operation.stories.d.ts +10 -0
- package/dist/stories/Operations.stories.d.ts +10 -0
- package/dist/stories/SchemaTab.stories.d.ts +11 -0
- package/dist/stories/SearchPanel.stories.d.ts +16 -0
- package/dist/stories/Server.stories.d.ts +3 -1
- package/dist/stories/TabToggle.stories.d.ts +10 -0
- package/dist/stories/Tabs.stories.d.ts +11 -0
- package/dist/stories/documentContextDecorator.d.ts +25 -0
- package/package.json +2 -3
- package/dist/index-BYmrdiVi.cjs +0 -155
- package/dist/index-DfH4J5EL.js +0 -15436
- package/dist/stories/Button.d.ts +0 -14
- package/dist/stories/Button.stories.d.ts +0 -23
package/dist/index.d.ts
CHANGED
|
@@ -8,3 +8,5 @@ export { SchemaTree, SchemaTab } from './components/schema';
|
|
|
8
8
|
export type { SchemaTreeProps } from './components/schema';
|
|
9
9
|
export { parseAndRender } from './helpers/parser';
|
|
10
10
|
export { AsyncAPIRenderer } from './containers/AsyncAPI/AsyncAPIRenderer';
|
|
11
|
+
export { AsyncAPIProvider, Servers, Operations, Messages, Schemas, Info, } from './public/sections';
|
|
12
|
+
export type { SectionProps } from './public/sections';
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";var fi=Object.defineProperty;var li=(p,t,u)=>t in p?fi(p,t,{enumerable:!0,configurable:!0,writable:!0,value:u}):p[t]=u;var le=(p,t,u)=>li(p,typeof t!="symbol"?t+"":t,u);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("./index-gn5KpvCL.cjs");var Fe={exports:{}},Le={exports:{}},Me={},Te={},qe,Ct;function Br(){if(Ct)return qe;Ct=1,qe=p;function p(t,u){for(var f=new Array(arguments.length-1),a=0,o=2,e=!0;o<arguments.length;)f[a++]=arguments[o++];return new Promise(function(r,s){f[a]=function(n){if(e)if(e=!1,n)s(n);else{for(var l=new Array(arguments.length-1),c=0;c<l.length;)l[c++]=arguments[c];r.apply(null,l)}};try{t.apply(u||null,f)}catch(h){e&&(e=!1,s(h))}})}return qe}var De={},Pt;function ci(){return Pt||(Pt=1,(function(p){var t=p;t.length=function(i){var r=i.length;if(!r)return 0;for(var s=0;--r%4>1&&i.charAt(r)==="=";)++s;return Math.ceil(i.length*3)/4-s};for(var u=new Array(64),f=new Array(123),a=0;a<64;)f[u[a]=a<26?a+65:a<52?a+71:a<62?a-4:a-59|43]=a++;t.encode=function(i,r,s){for(var h=null,n=[],l=0,c=0,m;r<s;){var g=i[r++];switch(c){case 0:n[l++]=u[g>>2],m=(g&3)<<4,c=1;break;case 1:n[l++]=u[m|g>>4],m=(g&15)<<2,c=2;break;case 2:n[l++]=u[m|g>>6],n[l++]=u[g&63],c=0;break}l>8191&&((h||(h=[])).push(String.fromCharCode.apply(String,n)),l=0)}return c&&(n[l++]=u[m],n[l++]=61,c===1&&(n[l++]=61)),h?(l&&h.push(String.fromCharCode.apply(String,n.slice(0,l))),h.join("")):String.fromCharCode.apply(String,n.slice(0,l))};var o="invalid encoding";t.decode=function(i,r,s){for(var h=s,n=0,l,c=0;c<i.length;){var m=i.charCodeAt(c++);if(m===61&&n>1)break;if((m=f[m])===void 0)throw Error(o);switch(n){case 0:l=m,n=1;break;case 1:r[s++]=l<<2|(m&48)>>4,l=m,n=2;break;case 2:r[s++]=(l&15)<<4|(m&60)>>2,l=m,n=3;break;case 3:r[s++]=(l&3)<<6|m,n=0;break}}if(n===1)throw Error(o);return s-h},t.test=function(i){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(i)}})(De)),De}var Ce,Bt;function hi(){if(Bt)return Ce;Bt=1,Ce=p;function p(){this._listeners=Object.create(null)}return p.prototype.on=function(u,f,a){return(this._listeners[u]||(this._listeners[u]=[])).push({fn:f,ctx:a||this}),this},p.prototype.off=function(u,f){if(u===void 0)this._listeners=Object.create(null);else if(f===void 0)this._listeners[u]=[];else{var a=this._listeners[u];if(!a)return this;for(var o=0;o<a.length;)a[o].fn===f?a.splice(o,1):++o}return this},p.prototype.emit=function(u){var f=this._listeners[u];if(f){for(var a=[],o=1;o<arguments.length;)a.push(arguments[o++]);for(o=0;o<f.length;)f[o].fn.apply(f[o++].ctx,a)}return this},Ce}var Pe,jt;function di(){if(jt)return Pe;jt=1,Pe=p(p);function p(o){return typeof Float32Array<"u"?(function(){var e=new Float32Array([-0]),i=new Uint8Array(e.buffer),r=i[3]===128;function s(c,m,g){e[0]=c,m[g]=i[0],m[g+1]=i[1],m[g+2]=i[2],m[g+3]=i[3]}function h(c,m,g){e[0]=c,m[g]=i[3],m[g+1]=i[2],m[g+2]=i[1],m[g+3]=i[0]}o.writeFloatLE=r?s:h,o.writeFloatBE=r?h:s;function n(c,m){return i[0]=c[m],i[1]=c[m+1],i[2]=c[m+2],i[3]=c[m+3],e[0]}function l(c,m){return i[3]=c[m],i[2]=c[m+1],i[1]=c[m+2],i[0]=c[m+3],e[0]}o.readFloatLE=r?n:l,o.readFloatBE=r?l:n})():(function(){function e(r,s,h,n){var l=s<0?1:0;if(l&&(s=-s),s===0)r(1/s>0?0:2147483648,h,n);else if(isNaN(s))r(2143289344,h,n);else if(s>34028234663852886e22)r((l<<31|2139095040)>>>0,h,n);else if(s<11754943508222875e-54)r((l<<31|Math.round(s/1401298464324817e-60))>>>0,h,n);else{var c=Math.floor(Math.log(s)/Math.LN2),m=Math.round(s*Math.pow(2,-c)*8388608)&8388607;r((l<<31|c+127<<23|m)>>>0,h,n)}}o.writeFloatLE=e.bind(null,t),o.writeFloatBE=e.bind(null,u);function i(r,s,h){var n=r(s,h),l=(n>>31)*2+1,c=n>>>23&255,m=n&8388607;return c===255?m?NaN:l*(1/0):c===0?l*1401298464324817e-60*m:l*Math.pow(2,c-150)*(m+8388608)}o.readFloatLE=i.bind(null,f),o.readFloatBE=i.bind(null,a)})(),typeof Float64Array<"u"?(function(){var e=new Float64Array([-0]),i=new Uint8Array(e.buffer),r=i[7]===128;function s(c,m,g){e[0]=c,m[g]=i[0],m[g+1]=i[1],m[g+2]=i[2],m[g+3]=i[3],m[g+4]=i[4],m[g+5]=i[5],m[g+6]=i[6],m[g+7]=i[7]}function h(c,m,g){e[0]=c,m[g]=i[7],m[g+1]=i[6],m[g+2]=i[5],m[g+3]=i[4],m[g+4]=i[3],m[g+5]=i[2],m[g+6]=i[1],m[g+7]=i[0]}o.writeDoubleLE=r?s:h,o.writeDoubleBE=r?h:s;function n(c,m){return i[0]=c[m],i[1]=c[m+1],i[2]=c[m+2],i[3]=c[m+3],i[4]=c[m+4],i[5]=c[m+5],i[6]=c[m+6],i[7]=c[m+7],e[0]}function l(c,m){return i[7]=c[m],i[6]=c[m+1],i[5]=c[m+2],i[4]=c[m+3],i[3]=c[m+4],i[2]=c[m+5],i[1]=c[m+6],i[0]=c[m+7],e[0]}o.readDoubleLE=r?n:l,o.readDoubleBE=r?l:n})():(function(){function e(r,s,h,n,l,c){var m=n<0?1:0;if(m&&(n=-n),n===0)r(0,l,c+s),r(1/n>0?0:2147483648,l,c+h);else if(isNaN(n))r(0,l,c+s),r(2146959360,l,c+h);else if(n>17976931348623157e292)r(0,l,c+s),r((m<<31|2146435072)>>>0,l,c+h);else{var g;if(n<22250738585072014e-324)g=n/5e-324,r(g>>>0,l,c+s),r((m<<31|g/4294967296)>>>0,l,c+h);else{var E=Math.floor(Math.log(n)/Math.LN2);E===1024&&(E=1023),g=n*Math.pow(2,-E),r(g*4503599627370496>>>0,l,c+s),r((m<<31|E+1023<<20|g*1048576&1048575)>>>0,l,c+h)}}}o.writeDoubleLE=e.bind(null,t,0,4),o.writeDoubleBE=e.bind(null,u,4,0);function i(r,s,h,n,l){var c=r(n,l+s),m=r(n,l+h),g=(m>>31)*2+1,E=m>>>20&2047,_=4294967296*(m&1048575)+c;return E===2047?_?NaN:g*(1/0):E===0?g*5e-324*_:g*Math.pow(2,E-1075)*(_+4503599627370496)}o.readDoubleLE=i.bind(null,f,0,4),o.readDoubleBE=i.bind(null,a,4,0)})(),o}function t(o,e,i){e[i]=o&255,e[i+1]=o>>>8&255,e[i+2]=o>>>16&255,e[i+3]=o>>>24}function u(o,e,i){e[i]=o>>>24,e[i+1]=o>>>16&255,e[i+2]=o>>>8&255,e[i+3]=o&255}function f(o,e){return(o[e]|o[e+1]<<8|o[e+2]<<16|o[e+3]<<24)>>>0}function a(o,e){return(o[e]<<24|o[e+1]<<16|o[e+2]<<8|o[e+3])>>>0}return Pe}var Be={},$t;function pi(){return $t||($t=1,(function(p){var t=p,u=65533;t.length=function(a){for(var o=0,e=0,i=0;i<a.length;++i)e=a.charCodeAt(i),e<128?o+=1:e<2048?o+=2:(e&64512)===55296&&(a.charCodeAt(i+1)&64512)===56320?(++i,o+=4):o+=3;return o},t.read=function(a,o,e){if(e-o<1)return"";for(var i=null,r=[],s=0,h,n,l,c;o<e;)h=a[o++],h<=127?r[s++]=h:h>=192&&h<224?(l=(h&31)<<6|a[o++]&63,r[s++]=l>=128?l:u):h>=224&&h<240?(c=(h&15)<<12|(a[o++]&63)<<6|a[o++]&63,r[s++]=c>=2048?c:u):h>=240&&(n=(h&7)<<18|(a[o++]&63)<<12|(a[o++]&63)<<6|a[o++]&63,n<65536||n>1114111?r[s++]=u:(n-=65536,r[s++]=55296+(n>>10),r[s++]=56320+(n&1023))),s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,r.slice(0,s))),s=0);return i?(s&&i.push(String.fromCharCode.apply(String,r.slice(0,s))),i.join("")):String.fromCharCode.apply(String,r.slice(0,s))},t.write=function(a,o,e){for(var i=e,r,s,h=0;h<a.length;++h)r=a.charCodeAt(h),r<128?o[e++]=r:r<2048?(o[e++]=r>>6|192,o[e++]=r&63|128):(r&64512)===55296&&((s=a.charCodeAt(h+1))&64512)===56320?(r=65536+((r&1023)<<10)+(s&1023),++h,o[e++]=r>>18|240,o[e++]=r>>12&63|128,o[e++]=r>>6&63|128,o[e++]=r&63|128):(o[e++]=r>>12|224,o[e++]=r>>6&63|128,o[e++]=r&63|128);return e-i}})(Be)),Be}var je,Ut;function mi(){if(Ut)return je;Ut=1,je=p;function p(t,u,f){var a=f||8192,o=a>>>1,e=null,i=a;return function(s){if(s<1||s>o)return t(s);i+s>a&&(e=t(a),i=0);var h=u.call(e,i,i+=s);return i&7&&(i=(i|7)+1),h}}return je}var $e,Vt;function gi(){if(Vt)return $e;Vt=1,$e=t;var p=ue();function t(o,e){this.lo=o>>>0,this.hi=e>>>0}var u=t.zero=new t(0,0);u.toNumber=function(){return 0},u.zzEncode=u.zzDecode=function(){return this},u.length=function(){return 1};var f=t.zeroHash="\0\0\0\0\0\0\0\0";t.fromNumber=function(e){if(e===0)return u;var i=e<0;i&&(e=-e);var r=e>>>0,s=(e-r)/4294967296>>>0;return i&&(s=~s>>>0,r=~r>>>0,++r>4294967295&&(r=0,++s>4294967295&&(s=0))),new t(r,s)},t.from=function(e){if(typeof e=="number")return t.fromNumber(e);if(p.isString(e))if(p.Long)e=p.Long.fromString(e);else return t.fromNumber(parseInt(e,10));return e.low||e.high?new t(e.low>>>0,e.high>>>0):u},t.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var i=~this.lo+1>>>0,r=~this.hi>>>0;return i||(r=r+1>>>0),-(i+r*4294967296)}return this.lo+this.hi*4294967296},t.prototype.toLong=function(e){return p.Long?new p.Long(this.lo|0,this.hi|0,!!e):{low:this.lo|0,high:this.hi|0,unsigned:!!e}};var a=String.prototype.charCodeAt;return t.fromHash=function(e){return e===f?u:new t((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)},t.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},t.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},t.prototype.zzDecode=function(){var e=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},t.prototype.length=function(){var e=this.lo,i=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return r===0?i===0?e<16384?e<128?1:2:e<2097152?3:4:i<16384?i<128?5:6:i<2097152?7:8:r<128?9:10},$e}var be={exports:{}},yi=be.exports,Jt;function vi(){return Jt||(Jt=1,(function(p,t){(function(u,f){function a(o){return o.default||o}f(t),p.exports=a(t)})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:yi,function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.default=void 0;/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2009 The Closure Library Authors
|
|
4
|
+
* Copyright 2020 Daniel Wirtz / The long.js Authors.
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
19
|
+
*/var f=null;try{f=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 a(v,d,A){this.low=v|0,this.high=d|0,this.unsigned=!!A}a.prototype.__isLong__,Object.defineProperty(a.prototype,"__isLong__",{value:!0});function o(v){return(v&&v.__isLong__)===!0}function e(v){var d=Math.clz32(v&-v);return v?31-d:d}a.isLong=o;var i={},r={};function s(v,d){var A,N,C;return d?(v>>>=0,(C=0<=v&&v<256)&&(N=r[v],N)?N:(A=n(v,0,!0),C&&(r[v]=A),A)):(v|=0,(C=-128<=v&&v<128)&&(N=i[v],N)?N:(A=n(v,v<0?-1:0,!1),C&&(i[v]=A),A))}a.fromInt=s;function h(v,d){if(isNaN(v))return d?M:L;if(d){if(v<0)return M;if(v>=y)return S}else{if(v<=-w)return $;if(v+1>=w)return J}return v<0?h(-v,d).neg():n(v%_|0,v/_|0,d)}a.fromNumber=h;function n(v,d,A){return new a(v,d,A)}a.fromBits=n;var l=Math.pow;function c(v,d,A){if(v.length===0)throw Error("empty string");if(typeof d=="number"?(A=d,d=!1):d=!!d,v==="NaN"||v==="Infinity"||v==="+Infinity"||v==="-Infinity")return d?M:L;if(A=A||10,A<2||36<A)throw RangeError("radix");var N;if((N=v.indexOf("-"))>0)throw Error("interior hyphen");if(N===0)return c(v.substring(1),d,A).neg();for(var C=h(l(A,8)),P=L,q=0;q<v.length;q+=8){var V=Math.min(8,v.length-q),W=parseInt(v.substring(q,q+V),A);if(V<8){var z=h(l(A,V));P=P.mul(z).add(h(W))}else P=P.mul(C),P=P.add(h(W))}return P.unsigned=d,P}a.fromString=c;function m(v,d){return typeof v=="number"?h(v,d):typeof v=="string"?c(v,d):n(v.low,v.high,typeof d=="boolean"?d:v.unsigned)}a.fromValue=m;var g=65536,E=1<<24,_=g*g,y=_*_,w=y/2,k=s(E),L=s(0);a.ZERO=L;var M=s(0,!0);a.UZERO=M;var j=s(1);a.ONE=j;var G=s(1,!0);a.UONE=G;var U=s(-1);a.NEG_ONE=U;var J=n(-1,2147483647,!1);a.MAX_VALUE=J;var S=n(-1,-1,!0);a.MAX_UNSIGNED_VALUE=S;var $=n(0,-2147483648,!1);a.MIN_VALUE=$;var b=a.prototype;b.toInt=function(){return this.unsigned?this.low>>>0:this.low},b.toNumber=function(){return this.unsigned?(this.high>>>0)*_+(this.low>>>0):this.high*_+(this.low>>>0)},b.toString=function(d){if(d=d||10,d<2||36<d)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq($)){var A=h(d),N=this.div(A),C=N.mul(A).sub(this);return N.toString(d)+C.toInt().toString(d)}else return"-"+this.neg().toString(d);for(var P=h(l(d,6),this.unsigned),q=this,V="";;){var W=q.div(P),z=q.sub(W.mul(P)).toInt()>>>0,H=z.toString(d);if(q=W,q.isZero())return H+V;for(;H.length<6;)H="0"+H;V=""+H+V}},b.getHighBits=function(){return this.high},b.getHighBitsUnsigned=function(){return this.high>>>0},b.getLowBits=function(){return this.low},b.getLowBitsUnsigned=function(){return this.low>>>0},b.getNumBitsAbs=function(){if(this.isNegative())return this.eq($)?64:this.neg().getNumBitsAbs();for(var d=this.high!=0?this.high:this.low,A=31;A>0&&(d&1<<A)==0;A--);return this.high!=0?A+33:A+1},b.isSafeInteger=function(){var d=this.high>>21;return d?this.unsigned?!1:d===-1&&!(this.low===0&&this.high===-2097152):!0},b.isZero=function(){return this.high===0&&this.low===0},b.eqz=b.isZero,b.isNegative=function(){return!this.unsigned&&this.high<0},b.isPositive=function(){return this.unsigned||this.high>=0},b.isOdd=function(){return(this.low&1)===1},b.isEven=function(){return(this.low&1)===0},b.equals=function(d){return o(d)||(d=m(d)),this.unsigned!==d.unsigned&&this.high>>>31===1&&d.high>>>31===1?!1:this.high===d.high&&this.low===d.low},b.eq=b.equals,b.notEquals=function(d){return!this.eq(d)},b.neq=b.notEquals,b.ne=b.notEquals,b.lessThan=function(d){return this.comp(d)<0},b.lt=b.lessThan,b.lessThanOrEqual=function(d){return this.comp(d)<=0},b.lte=b.lessThanOrEqual,b.le=b.lessThanOrEqual,b.greaterThan=function(d){return this.comp(d)>0},b.gt=b.greaterThan,b.greaterThanOrEqual=function(d){return this.comp(d)>=0},b.gte=b.greaterThanOrEqual,b.ge=b.greaterThanOrEqual,b.compare=function(d){if(o(d)||(d=m(d)),this.eq(d))return 0;var A=this.isNegative(),N=d.isNegative();return A&&!N?-1:!A&&N?1:this.unsigned?d.high>>>0>this.high>>>0||d.high===this.high&&d.low>>>0>this.low>>>0?-1:1:this.sub(d).isNegative()?-1:1},b.comp=b.compare,b.negate=function(){return!this.unsigned&&this.eq($)?$:this.not().add(j)},b.neg=b.negate,b.add=function(d){o(d)||(d=m(d));var A=this.high>>>16,N=this.high&65535,C=this.low>>>16,P=this.low&65535,q=d.high>>>16,V=d.high&65535,W=d.low>>>16,z=d.low&65535,H=0,re=0,I=0,Y=0;return Y+=P+z,I+=Y>>>16,Y&=65535,I+=C+W,re+=I>>>16,I&=65535,re+=N+V,H+=re>>>16,re&=65535,H+=A+q,H&=65535,n(I<<16|Y,H<<16|re,this.unsigned)},b.subtract=function(d){return o(d)||(d=m(d)),this.add(d.neg())},b.sub=b.subtract,b.multiply=function(d){if(this.isZero())return this;if(o(d)||(d=m(d)),f){var A=f.mul(this.low,this.high,d.low,d.high);return n(A,f.get_high(),this.unsigned)}if(d.isZero())return this.unsigned?M:L;if(this.eq($))return d.isOdd()?$:L;if(d.eq($))return this.isOdd()?$:L;if(this.isNegative())return d.isNegative()?this.neg().mul(d.neg()):this.neg().mul(d).neg();if(d.isNegative())return this.mul(d.neg()).neg();if(this.lt(k)&&d.lt(k))return h(this.toNumber()*d.toNumber(),this.unsigned);var N=this.high>>>16,C=this.high&65535,P=this.low>>>16,q=this.low&65535,V=d.high>>>16,W=d.high&65535,z=d.low>>>16,H=d.low&65535,re=0,I=0,Y=0,ce=0;return ce+=q*H,Y+=ce>>>16,ce&=65535,Y+=P*H,I+=Y>>>16,Y&=65535,Y+=q*z,I+=Y>>>16,Y&=65535,I+=C*H,re+=I>>>16,I&=65535,I+=P*z,re+=I>>>16,I&=65535,I+=q*W,re+=I>>>16,I&=65535,re+=N*H+C*z+P*W+q*V,re&=65535,n(Y<<16|ce,re<<16|I,this.unsigned)},b.mul=b.multiply,b.divide=function(d){if(o(d)||(d=m(d)),d.isZero())throw Error("division by zero");if(f){if(!this.unsigned&&this.high===-2147483648&&d.low===-1&&d.high===-1)return this;var A=(this.unsigned?f.div_u:f.div_s)(this.low,this.high,d.low,d.high);return n(A,f.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?M:L;var N,C,P;if(this.unsigned){if(d.unsigned||(d=d.toUnsigned()),d.gt(this))return M;if(d.gt(this.shru(1)))return G;P=M}else{if(this.eq($)){if(d.eq(j)||d.eq(U))return $;if(d.eq($))return j;var q=this.shr(1);return N=q.div(d).shl(1),N.eq(L)?d.isNegative()?j:U:(C=this.sub(d.mul(N)),P=N.add(C.div(d)),P)}else if(d.eq($))return this.unsigned?M:L;if(this.isNegative())return d.isNegative()?this.neg().div(d.neg()):this.neg().div(d).neg();if(d.isNegative())return this.div(d.neg()).neg();P=L}for(C=this;C.gte(d);){N=Math.max(1,Math.floor(C.toNumber()/d.toNumber()));for(var V=Math.ceil(Math.log(N)/Math.LN2),W=V<=48?1:l(2,V-48),z=h(N),H=z.mul(d);H.isNegative()||H.gt(C);)N-=W,z=h(N,this.unsigned),H=z.mul(d);z.isZero()&&(z=j),P=P.add(z),C=C.sub(H)}return P},b.div=b.divide,b.modulo=function(d){if(o(d)||(d=m(d)),f){var A=(this.unsigned?f.rem_u:f.rem_s)(this.low,this.high,d.low,d.high);return n(A,f.get_high(),this.unsigned)}return this.sub(this.div(d).mul(d))},b.mod=b.modulo,b.rem=b.modulo,b.not=function(){return n(~this.low,~this.high,this.unsigned)},b.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},b.clz=b.countLeadingZeros,b.countTrailingZeros=function(){return this.low?e(this.low):e(this.high)+32},b.ctz=b.countTrailingZeros,b.and=function(d){return o(d)||(d=m(d)),n(this.low&d.low,this.high&d.high,this.unsigned)},b.or=function(d){return o(d)||(d=m(d)),n(this.low|d.low,this.high|d.high,this.unsigned)},b.xor=function(d){return o(d)||(d=m(d)),n(this.low^d.low,this.high^d.high,this.unsigned)},b.shiftLeft=function(d){return o(d)&&(d=d.toInt()),(d&=63)===0?this:d<32?n(this.low<<d,this.high<<d|this.low>>>32-d,this.unsigned):n(0,this.low<<d-32,this.unsigned)},b.shl=b.shiftLeft,b.shiftRight=function(d){return o(d)&&(d=d.toInt()),(d&=63)===0?this:d<32?n(this.low>>>d|this.high<<32-d,this.high>>d,this.unsigned):n(this.high>>d-32,this.high>=0?0:-1,this.unsigned)},b.shr=b.shiftRight,b.shiftRightUnsigned=function(d){return o(d)&&(d=d.toInt()),(d&=63)===0?this:d<32?n(this.low>>>d|this.high<<32-d,this.high>>>d,this.unsigned):d===32?n(this.high,0,this.unsigned):n(this.high>>>d-32,0,this.unsigned)},b.shru=b.shiftRightUnsigned,b.shr_u=b.shiftRightUnsigned,b.rotateLeft=function(d){var A;return o(d)&&(d=d.toInt()),(d&=63)===0?this:d===32?n(this.high,this.low,this.unsigned):d<32?(A=32-d,n(this.low<<d|this.high>>>A,this.high<<d|this.low>>>A,this.unsigned)):(d-=32,A=32-d,n(this.high<<d|this.low>>>A,this.low<<d|this.high>>>A,this.unsigned))},b.rotl=b.rotateLeft,b.rotateRight=function(d){var A;return o(d)&&(d=d.toInt()),(d&=63)===0?this:d===32?n(this.high,this.low,this.unsigned):d<32?(A=32-d,n(this.high<<A|this.low>>>d,this.low<<A|this.high>>>d,this.unsigned)):(d-=32,A=32-d,n(this.low<<A|this.high>>>d,this.high<<A|this.low>>>d,this.unsigned))},b.rotr=b.rotateRight,b.toSigned=function(){return this.unsigned?n(this.low,this.high,!1):this},b.toUnsigned=function(){return this.unsigned?this:n(this.low,this.high,!0)},b.toBytes=function(d){return d?this.toBytesLE():this.toBytesBE()},b.toBytesLE=function(){var d=this.high,A=this.low;return[A&255,A>>>8&255,A>>>16&255,A>>>24,d&255,d>>>8&255,d>>>16&255,d>>>24]},b.toBytesBE=function(){var d=this.high,A=this.low;return[d>>>24,d>>>16&255,d>>>8&255,d&255,A>>>24,A>>>16&255,A>>>8&255,A&255]},a.fromBytes=function(d,A,N){return N?a.fromBytesLE(d,A):a.fromBytesBE(d,A)},a.fromBytesLE=function(d,A){return new a(d[0]|d[1]<<8|d[2]<<16|d[3]<<24,d[4]|d[5]<<8|d[6]<<16|d[7]<<24,A)},a.fromBytesBE=function(d,A){return new a(d[4]<<24|d[5]<<16|d[6]<<8|d[7],d[0]<<24|d[1]<<16|d[2]<<8|d[3],A)},typeof BigInt=="function"&&(a.fromBigInt=function(d,A){var N=Number(BigInt.asIntN(32,d)),C=Number(BigInt.asIntN(32,d>>BigInt(32)));return n(N,C,A)},a.fromValue=function(d,A){return typeof d=="bigint"?a.fromBigInt(d,A):m(d,A)},b.toBigInt=function(){var d=BigInt(this.low>>>0),A=BigInt(this.unsigned?this.high>>>0:this.high);return A<<BigInt(32)|d}),u.default=a})})(be,be.exports)),be.exports}var zt;function ue(){return zt||(zt=1,(function(p){var t=p;t.asPromise=Br(),t.base64=ci(),t.EventEmitter=hi(),t.float=di(),t.utf8=pi(),t.pool=mi(),t.LongBits=gi();function u(o){return o==="__proto__"||o==="prototype"||o==="constructor"}t.isUnsafeProperty=u,t.isNode=!!(typeof he.commonjsGlobal<"u"&&he.commonjsGlobal&&he.commonjsGlobal.process&&he.commonjsGlobal.process.versions&&he.commonjsGlobal.process.versions.node),t.global=t.isNode&&he.commonjsGlobal||typeof window<"u"&&window||typeof self<"u"&&self||Te,t.emptyArray=Object.freeze?Object.freeze([]):[],t.emptyObject=Object.freeze?Object.freeze({}):{},t.isInteger=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e},t.isString=function(e){return typeof e=="string"||e instanceof String},t.isObject=function(e){return e&&typeof e=="object"},t.isset=t.isSet=function(e,i){var r=e[i];return r!=null&&Object.hasOwnProperty.call(e,i)?typeof r!="object"||(Array.isArray(r)?r.length:Object.keys(r).length)>0:!1},t.Buffer=(function(){try{var o=t.global.Buffer;return o.prototype.utf8Write?o:null}catch{return null}})(),t._Buffer_from=null,t._Buffer_allocUnsafe=null,t.newBuffer=function(e){return typeof e=="number"?t.Buffer?t._Buffer_allocUnsafe(e):new t.Array(e):t.Buffer?t._Buffer_from(e):typeof Uint8Array>"u"?e:new Uint8Array(e)},t.Array=typeof Uint8Array<"u"?Uint8Array:Array,t.Long=t.global.dcodeIO&&t.global.dcodeIO.Long||t.global.Long||(function(){try{var o=vi();return o&&o.isLong?o:null}catch{return null}})(),t.key2Re=/^true|false|0|1$/,t.key32Re=/^-?(?:0|[1-9][0-9]*)$/,t.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,t.longToHash=function(e){return e?t.LongBits.from(e).toHash():t.LongBits.zeroHash},t.longFromHash=function(e,i){var r=t.LongBits.fromHash(e);return t.Long?t.Long.fromBits(r.lo,r.hi,i):r.toNumber(!!i)};function f(o){var e=typeof arguments[arguments.length-1]=="boolean",i=e?arguments.length-1:arguments.length;e=e&&arguments[arguments.length-1];for(var r=1;r<i;++r){var s=arguments[r];if(s)for(var h=Object.keys(s),n=0;n<h.length;++n)!u(h[n])&&(o[h[n]]===void 0||!e)&&(o[h[n]]=s[h[n]])}return o}t.merge=f,t.nestingLimit=32,t.recursionLimit=100,t.makeProp=function(e,i){Object.defineProperty(e,i,{enumerable:!0,configurable:!0,writable:!0})},t.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)};function a(o){function e(i,r){if(!(this instanceof e))return new e(i,r);Object.defineProperty(this,"message",{get:function(){return i}}),Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:new Error().stack||""}),r&&f(this,r)}return e.prototype=Object.create(Error.prototype,{constructor:{value:e,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return o},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),e}t.newError=a,t.ProtocolError=a("ProtocolError"),t.oneOfGetter=function(e){for(var i={},r=0;r<e.length;++r)i[e[r]]=1;return function(){for(var s=Object.keys(this),h=s.length-1;h>-1;--h)if(i[s[h]]===1&&this[s[h]]!==void 0&&this[s[h]]!==null)return s[h]}},t.oneOfSetter=function(e){return function(i){for(var r=0;r<e.length;++r)e[r]!==i&&delete this[e[r]]}},t.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},t._configure=function(){var o=t.Buffer;if(!o){t._Buffer_from=t._Buffer_allocUnsafe=null;return}t._Buffer_from=o.from!==Uint8Array.from&&o.from||function(i,r){return new o(i,r)},t._Buffer_allocUnsafe=o.allocUnsafe||function(i){return new o(i)}}})(Te)),Te}var Ue,Wt;function Et(){if(Wt)return Ue;Wt=1,Ue=r;var p=ue(),t,u=p.LongBits,f=p.base64,a=p.utf8;function o(E,_,y){this.fn=E,this.len=_,this.next=void 0,this.val=y}function e(){}function i(E){this.head=E.head,this.tail=E.tail,this.len=E.len,this.next=E.states}function r(){this.len=0,this.head=new o(e,0,0),this.tail=this.head,this.states=null}var s=function(){return p.Buffer?function(){return(r.create=function(){return new t})()}:function(){return new r}};r.create=s(),r.alloc=function(_){return new p.Array(_)},p.Array!==Array&&(r.alloc=p.pool(r.alloc,p.Array.prototype.subarray)),r.prototype._push=function(_,y,w){return this.tail=this.tail.next=new o(_,y,w),this.len+=y,this};function h(E,_,y){_[y]=E&255}function n(E,_,y){for(;E>127;)_[y++]=E&127|128,E>>>=7;_[y]=E}function l(E,_){this.len=E,this.next=void 0,this.val=_}l.prototype=Object.create(o.prototype),l.prototype.fn=n,r.prototype.uint32=function(_){return this.len+=(this.tail=this.tail.next=new l((_=_>>>0)<128?1:_<16384?2:_<2097152?3:_<268435456?4:5,_)).len,this},r.prototype.int32=function(_){return(_|=0)<0?this._push(c,10,u.fromNumber(_)):this.uint32(_)},r.prototype.sint32=function(_){return this.uint32((_<<1^_>>31)>>>0)};function c(E,_,y){for(var w=E.lo,k=E.hi;k;)_[y++]=w&127|128,w=(w>>>7|k<<25)>>>0,k>>>=7;for(;w>127;)_[y++]=w&127|128,w=w>>>7;_[y++]=w}r.prototype.uint64=function(_){var y=u.from(_);return this._push(c,y.length(),y)},r.prototype.int64=r.prototype.uint64,r.prototype.sint64=function(_){var y=u.from(_).zzEncode();return this._push(c,y.length(),y)},r.prototype.bool=function(_){return this._push(h,1,_?1:0)};function m(E,_,y){_[y]=E&255,_[y+1]=E>>>8&255,_[y+2]=E>>>16&255,_[y+3]=E>>>24}r.prototype.fixed32=function(_){return this._push(m,4,_>>>0)},r.prototype.sfixed32=r.prototype.fixed32,r.prototype.fixed64=function(_){var y=u.from(_);return this._push(m,4,y.lo)._push(m,4,y.hi)},r.prototype.sfixed64=r.prototype.fixed64,r.prototype.float=function(_){return this._push(p.float.writeFloatLE,4,_)},r.prototype.double=function(_){return this._push(p.float.writeDoubleLE,8,_)};var g=p.Array.prototype.set?function(_,y,w){y.set(_,w)}:function(_,y,w){for(var k=0;k<_.length;++k)y[w+k]=_[k]};return r.prototype.bytes=function(_){var y=_.length>>>0;if(!y)return this._push(h,1,0);if(p.isString(_)){var w=r.alloc(y=f.length(_));f.decode(_,w,0),_=w}return this.uint32(y)._push(g,y,_)},r.prototype.string=function(_){var y=a.length(_);return y?this.uint32(y)._push(a.write,y,_):this._push(h,1,0)},r.prototype.fork=function(){return this.states=new i(this),this.head=this.tail=new o(e,0,0),this.len=0,this},r.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new o(e,0,0),this.len=0),this},r.prototype.ldelim=function(){var _=this.head,y=this.tail,w=this.len;return this.reset().uint32(w),w&&(this.tail.next=_.next,this.tail=y,this.len+=w),this},r.prototype.finish=function(){for(var _=this.head.next,y=this.constructor.alloc(this.len),w=0;_;)_.fn(_.val,y,w),w+=_.len,_=_.next;return y},r._configure=function(E){t=E,r.create=s(),t._configure()},Ue}var Ve,Ht;function _i(){if(Ht)return Ve;Ht=1,Ve=u;var p=Et();(u.prototype=Object.create(p.prototype)).constructor=u;var t=ue();function u(){p.call(this)}u._configure=function(){u.alloc=t._Buffer_allocUnsafe,u.writeBytesBuffer=t.Buffer&&t.Buffer.prototype instanceof Uint8Array&&t.Buffer.prototype.set.name==="set"?function(o,e,i){e.set(o,i)}:function(o,e,i){if(o.copy)o.copy(e,i,0,o.length);else for(var r=0;r<o.length;)e[i++]=o[r++]}},u.prototype.bytes=function(o){t.isString(o)&&(o=t._Buffer_from(o,"base64"));var e=o.length>>>0;return this.uint32(e),e&&this._push(u.writeBytesBuffer,e,o),this};function f(a,o,e){a.length<40?t.utf8.write(a,o,e):o.utf8Write?o.utf8Write(a,e):o.write(a,e)}return u.prototype.string=function(o){var e=t.Buffer.byteLength(o);return this.uint32(e),e&&this._push(f,e,o),this},u._configure(),Ve}var Je,Zt;function At(){if(Zt)return Je;Zt=1,Je=o;var p=ue(),t,u=p.LongBits,f=p.utf8;function a(n,l){return RangeError("index out of range: "+n.pos+" + "+(l||1)+" > "+n.len)}function o(n){this.buf=n,this.pos=0,this.len=n.length}var e=typeof Uint8Array<"u"?function(l){if(l instanceof Uint8Array||Array.isArray(l))return new o(l);throw Error("illegal buffer")}:function(l){if(Array.isArray(l))return new o(l);throw Error("illegal buffer")},i=function(){return p.Buffer?function(c){return(o.create=function(g){return p.Buffer.isBuffer(g)?new t(g):e(g)})(c)}:e};o.create=i(),o.prototype._slice=p.Array.prototype.subarray||p.Array.prototype.slice,o.prototype.uint32=(function(){var l=4294967295;return function(){if(l=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(l=(l|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(l=(l|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(l=(l|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(l=(l|(this.buf[this.pos]&15)<<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}})(),o.prototype.int32=function(){return this.uint32()|0},o.prototype.sint32=function(){var l=this.uint32();return l>>>1^-(l&1)|0};function r(){var n=new u(0,0),l=0;if(this.len-this.pos>4){for(;l<4;++l)if(n.lo=(n.lo|(this.buf[this.pos]&127)<<l*7)>>>0,this.buf[this.pos++]<128)return n;if(n.lo=(n.lo|(this.buf[this.pos]&127)<<28)>>>0,n.hi=(n.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return n;l=0}else{for(;l<3;++l){if(this.pos>=this.len)throw a(this);if(n.lo=(n.lo|(this.buf[this.pos]&127)<<l*7)>>>0,this.buf[this.pos++]<128)return n}return n.lo=(n.lo|(this.buf[this.pos++]&127)<<l*7)>>>0,n}if(this.len-this.pos>4){for(;l<5;++l)if(n.hi=(n.hi|(this.buf[this.pos]&127)<<l*7+3)>>>0,this.buf[this.pos++]<128)return n}else for(;l<5;++l){if(this.pos>=this.len)throw a(this);if(n.hi=(n.hi|(this.buf[this.pos]&127)<<l*7+3)>>>0,this.buf[this.pos++]<128)return n}throw Error("invalid varint encoding")}o.prototype.bool=function(){return this.uint32()!==0};function s(n,l){return(n[l-4]|n[l-3]<<8|n[l-2]<<16|n[l-1]<<24)>>>0}o.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return s(this.buf,this.pos+=4)},o.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return s(this.buf,this.pos+=4)|0};function h(){if(this.pos+8>this.len)throw a(this,8);return new u(s(this.buf,this.pos+=4),s(this.buf,this.pos+=4))}return o.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var l=p.float.readFloatLE(this.buf,this.pos);return this.pos+=4,l},o.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var l=p.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,l},o.prototype.bytes=function(){var l=this.uint32(),c=this.pos,m=this.pos+l;if(m>this.len)throw a(this,l);if(this.pos+=l,Array.isArray(this.buf))return this.buf.slice(c,m);if(c===m){var g=p.Buffer;return g?g.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,c,m)},o.prototype.string=function(){var l=this.bytes();return f.read(l,0,l.length)},o.prototype.skip=function(l){if(typeof l=="number"){if(this.pos+l>this.len)throw a(this,l);this.pos+=l}else do if(this.pos>=this.len)throw a(this);while(this.buf[this.pos++]&128);return this},o.recursionLimit=p.recursionLimit,o.prototype.skipType=function(n,l){if(l===void 0&&(l=0),l>o.recursionLimit)throw Error("maximum nesting depth exceeded");switch(n){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(n=this.uint32()&7)!==4;)this.skipType(n,l+1);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+n+" at offset "+this.pos)}return this},o._configure=function(n){t=n,o.create=i(),t._configure();var l=p.Long?"toLong":"toNumber";p.merge(o.prototype,{int64:function(){return r.call(this)[l](!1)},uint64:function(){return r.call(this)[l](!0)},sint64:function(){return r.call(this).zzDecode()[l](!1)},fixed64:function(){return h.call(this)[l](!0)},sfixed64:function(){return h.call(this)[l](!1)}})},Je}var ze,Gt;function wi(){if(Gt)return ze;Gt=1,ze=u;var p=At();(u.prototype=Object.create(p.prototype)).constructor=u;var t=ue();function u(f){p.call(this,f)}return u._configure=function(){t.Buffer&&(u.prototype._slice=t.Buffer.prototype.slice)},u.prototype.string=function(){var a=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+a,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+a,this.len))},u._configure(),ze}var We={},He,Yt;function bi(){if(Yt)return He;Yt=1,He=t;var p=ue();(t.prototype=Object.create(p.EventEmitter.prototype)).constructor=t;function t(u,f,a){if(typeof u!="function")throw TypeError("rpcImpl must be a function");p.EventEmitter.call(this),this.rpcImpl=u,this.requestDelimited=!!f,this.responseDelimited=!!a}return t.prototype.rpcCall=function u(f,a,o,e,i){if(!e)throw TypeError("request must be specified");var r=this;if(!i)return p.asPromise(u,r,f,a,o,e);if(!r.rpcImpl){setTimeout(function(){i(Error("already ended"))},0);return}try{return r.rpcImpl(f,a[r.requestDelimited?"encodeDelimited":"encode"](e).finish(),function(h,n){if(h)return r.emit("error",h,f),i(h);if(n===null){r.end(!0);return}if(!(n instanceof o))try{n=o[r.responseDelimited?"decodeDelimited":"decode"](n)}catch(l){return r.emit("error",l,f),i(l)}return r.emit("data",n,f),i(null,n)})}catch(s){r.emit("error",s,f),setTimeout(function(){i(s)},0);return}},t.prototype.end=function(f){return this.rpcImpl&&(f||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this},He}var Xt;function jr(){return Xt||(Xt=1,(function(p){var t=p;t.Service=bi()})(We)),We}var Ze,Kt;function $r(){return Kt||(Kt=1,Ze=Object.create(null)),Ze}var Qt;function Oi(){return Qt||(Qt=1,(function(p){var t=p;t.build="minimal",t.Writer=Et(),t.BufferWriter=_i(),t.Reader=At(),t.BufferReader=wi(),t.util=ue(),t.rpc=jr(),t.roots=$r(),t.configure=u;function u(){t.util._configure(),t.Writer._configure(t.BufferWriter),t.Reader._configure(t.BufferReader)}u()})(Me)),Me}var Ge={},Ye={exports:{}},Xe,er;function xi(){if(er)return Xe;er=1,Xe=t;var p=/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/;function t(f,a){typeof f=="string"&&(a=f,f=void 0);var o=[];function e(r){if(typeof r!="string"){var s=i();if(t.verbose&&console.log("codegen: "+s),s="return "+s,r){for(var h=Object.keys(r),n=new Array(h.length+1),l=new Array(h.length),c=0;c<h.length;)n[c]=h[c],l[c]=r[h[c++]];return n[c]=s,Function.apply(null,n).apply(null,l)}return Function(s)()}for(var m=new Array(arguments.length-1),g=0;g<m.length;)m[g]=arguments[++g];if(g=0,r=r.replace(/%([%dfijs])/g,function(_,y){var w=m[g++];switch(y){case"d":case"f":return String(Number(w));case"i":return String(Math.floor(w));case"j":return JSON.stringify(w);case"s":return String(w)}return"%"}),g!==m.length)throw Error("parameter count mismatch");return o.push(r),e}function i(r){return"function "+u(r||a)+"("+(f&&f.join(",")||"")+`){
|
|
20
|
+
`+o.join(`
|
|
21
|
+
`)+`
|
|
22
|
+
}`}return e.toString=i,e}t.verbose=!1;function u(f){return!f||(f=String(f).replace(/[^\w$]/g,""),!f)?"":(/^\d/.test(f)&&(f="_"+f),p.test(f)?f+"_":f)}return Xe}const Ei={},Ai=Object.freeze(Object.defineProperty({__proto__:null,default:Ei},Symbol.toStringTag,{value:"Module"})),Ur=he.getAugmentedNamespace(Ai);var Ke,tr;function Ri(){if(tr)return Ke;tr=1;var p=null;try{p=Ur,(!p||!p.readFile||!p.readFileSync)&&(p=null)}catch{}return Ke=p,Ke}var Qe,rr;function Ti(){if(rr)return Qe;rr=1,Qe=u;var p=Br(),t=Ri();function u(f,a,o){return typeof a=="function"?(o=a,a={}):a||(a={}),o?!a.xhr&&t&&t.readFile?t.readFile(f,function(i,r){return i&&typeof XMLHttpRequest<"u"?u.xhr(f,a,o):i?o(i):o(null,a.binary?r:r.toString("utf8"))}):u.xhr(f,a,o):p(u,this,f,a)}return u.xhr=function(a,o,e){var i=new XMLHttpRequest;i.onreadystatechange=function(){if(i.readyState===4){if(i.status!==0&&i.status!==200)return e(Error("status "+i.status));if(o.binary){var s=i.response;if(!s){s=[];for(var h=0;h<i.responseText.length;++h)s.push(i.responseText.charCodeAt(h)&255)}return e(null,typeof Uint8Array<"u"?new Uint8Array(s):s)}return e(null,i.responseText)}},o.binary&&("overrideMimeType"in i&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.responseType="arraybuffer"),i.open("GET",a),i.send()},Qe}var et={},ir;function Ni(){return ir||(ir=1,(function(p){var t=p,u=t.isAbsolute=function(o){return/^(?:\/|\w+:)/.test(o)},f=t.normalize=function(o){o=o.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var e=o.split("/"),i=u(o),r="";i&&(r=e.shift()+"/");for(var s=0;s<e.length;)e[s]===".."?s>0&&e[s-1]!==".."?e.splice(--s,2):i?e.splice(s,1):++s:e[s]==="."?e.splice(s,1):++s;return r+e.join("/")};t.resolve=function(o,e,i){return i||(e=f(e)),u(e)?e:(i||(o=f(o)),(o=o.replace(/(?:\/|^)[^/]+$/,"")).length?f(o+"/"+e):e)}})(et)),et}var tt={},nr;function ki(){return nr||(nr=1,(function(p){var t=p;t.numberRe=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,t.typeRefRe=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,t.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)$/})(tt)),tt}var rt,sr;function Ii(){if(sr)return rt;sr=1;var p=null;try{p=Ur,(!p||!p.readFile||!p.readFileSync)&&(p=null)}catch{}return rt=p,rt}var it,or;function Ee(){if(or)return it;or=1,it=r;var p=me();((r.prototype=Object.create(p.prototype)).constructor=r).className="Namespace";var t=pe(),u=ee(),f=we(),a,o,e;r.fromJSON=function(n,l,c){return c=u.checkDepth(c),new r(n,l.options).addJSON(l.nested,c)};function i(h,n){if(h&&h.length){for(var l={},c=0;c<h.length;++c)l[h[c].name]=h[c].toJSON(n);return l}}r.arrayToJSON=i,r.isReservedId=function(n,l){if(n){for(var c=0;c<n.length;++c)if(typeof n[c]!="string"&&n[c][0]<=l&&n[c][1]>l)return!0}return!1},r.isReservedName=function(n,l){if(n){for(var c=0;c<n.length;++c)if(n[c]===l)return!0}return!1};function r(h,n){p.call(this,h,n),this.nested=void 0,this._nestedArray=null,this._lookupCache=Object.create(null),this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0}function s(h){h._nestedArray=null,h._lookupCache=Object.create(null);for(var n=h;n=n.parent;)n._lookupCache=Object.create(null);return h}return Object.defineProperty(r.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=u.toArray(this.nested))}}),r.prototype.toJSON=function(n){return u.toObject(["options",this.options,"nested",i(this.nestedArray,n)])},r.prototype.addJSON=function(n,l){l=u.checkDepth(l);var c=this;if(n)for(var m=Object.keys(n),g=0,E;g<m.length;++g)E=n[m[g]],c.add((E.fields!==void 0?a.fromJSON:E.values!==void 0?e.fromJSON:E.methods!==void 0?o.fromJSON:E.id!==void 0?t.fromJSON:r.fromJSON)(m[g],E,l+1));return this},r.prototype.get=function(n){return this.nested&&Object.prototype.hasOwnProperty.call(this.nested,n)?this.nested[n]:null},r.prototype.getEnum=function(n){if(this.nested&&Object.prototype.hasOwnProperty.call(this.nested,n)&&this.nested[n]instanceof e)return this.nested[n].values;throw Error("no such enum: "+n)},r.prototype.add=function(n){if(!(n instanceof t&&n.extend!==void 0||n instanceof a||n instanceof f||n instanceof e||n instanceof o||n instanceof r))throw TypeError("object must be a valid nested object");if(n.name==="__proto__")return this;if(!this.nested)this.nested={};else{var l=this.get(n.name);if(l)if(l instanceof r&&n instanceof r&&!(l instanceof a||l instanceof o)){for(var c=l.nestedArray,m=0;m<c.length;++m)n.add(c[m]);this.remove(l),this.nested||(this.nested={}),n.setOptions(l.options,!0)}else throw Error("duplicate name '"+n.name+"' in "+this)}this.nested[n.name]=n,this instanceof a||this instanceof o||this instanceof e||this instanceof t||n._edition||(n._edition=n._defaultEdition),this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0;for(var g=this;g=g.parent;)g._needsRecursiveFeatureResolution=!0,g._needsRecursiveResolve=!0;return n.onAdd(this),s(this)},r.prototype.remove=function(n){if(!(n instanceof p))throw TypeError("object must be a ReflectionObject");if(n.parent!==this)throw Error(n+" is not a member of "+this);return delete this.nested[n.name],Object.keys(this.nested).length||(this.nested=void 0),n.onRemove(this),s(this)},r.prototype.define=function(n,l){if(u.isString(n))n=n.split(".");else if(!Array.isArray(n))throw TypeError("illegal path");if(n&&n.length&&n[0]==="")throw Error("path must be relative");if(n.length>u.recursionLimit)throw Error("max depth exceeded");for(var c=this;n.length>0;){var m=n.shift();if(c.nested&&c.nested[m]){if(c=c.nested[m],!(c instanceof r))throw Error("path conflicts with non-namespace objects")}else c.add(c=new r(m))}return l&&c.addJSON(l),c},r.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;this._resolveFeaturesRecursive(this._edition);var n=this.nestedArray,l=0;for(this.resolve();l<n.length;)n[l]instanceof r?n[l++].resolveAll():n[l++].resolve();return this._needsRecursiveResolve=!1,this},r.prototype._resolveFeaturesRecursive=function(n){return this._needsRecursiveFeatureResolution?(this._needsRecursiveFeatureResolution=!1,n=this._edition||n,p.prototype._resolveFeaturesRecursive.call(this,n),this.nestedArray.forEach(l=>{l._resolveFeaturesRecursive(n)}),this):this},r.prototype.lookup=function(n,l,c){if(typeof l=="boolean"?(c=l,l=void 0):l&&!Array.isArray(l)&&(l=[l]),u.isString(n)&&n.length){if(n===".")return this.root;n=n.split(".")}else if(!n.length)return this;var m=n.join(".");if(n[0]==="")return this.root.lookup(n.slice(1),l);var g=this.root._fullyQualifiedObjects&&this.root._fullyQualifiedObjects["."+m];if(g&&(!l||l.indexOf(g.constructor)>-1)||(g=this._lookupImpl(n,m),g&&(!l||l.indexOf(g.constructor)>-1)))return g;if(c)return null;for(var E=this;E.parent;){if(g=E.parent._lookupImpl(n,m),g&&(!l||l.indexOf(g.constructor)>-1))return g;E=E.parent}return null},r.prototype._lookupImpl=function(n,l){if(Object.prototype.hasOwnProperty.call(this._lookupCache,l))return this._lookupCache[l];var c=this.get(n[0]),m=null;if(c)n.length===1?m=c:c instanceof r&&(n=n.slice(1),m=c._lookupImpl(n,n.join(".")));else for(var g=0;g<this.nestedArray.length;++g)if(this._nestedArray[g]instanceof r&&(c=this._nestedArray[g]._lookupImpl(n,l))){m=c;break}return this._lookupCache[l]=m,m},r.prototype.lookupType=function(n){var l=this.lookup(n,[a]);if(!l)throw Error("no such type: "+n);return l},r.prototype.lookupEnum=function(n){var l=this.lookup(n,[e]);if(!l)throw Error("no such Enum '"+n+"' in "+this);return l},r.prototype.lookupTypeOrEnum=function(n){var l=this.lookup(n,[a,e]);if(!l)throw Error("no such Type or Enum '"+n+"' in "+this);return l},r.prototype.lookupService=function(n){var l=this.lookup(n,[o]);if(!l)throw Error("no such Service '"+n+"' in "+this);return l},r._configure=function(h,n,l){a=h,o=n,e=l},it}var nt,ar;function Rt(){if(ar)return nt;ar=1,nt=f;var p=pe();((f.prototype=Object.create(p.prototype)).constructor=f).className="MapField";var t=_e(),u=ee();function f(a,o,e,i,r,s){if(p.call(this,a,o,i,void 0,void 0,r,s),!u.isString(e))throw TypeError("keyType must be a string");this.keyType=e,this.resolvedKeyType=null,this.map=!0}return f.fromJSON=function(o,e){return new f(o,e.id,e.keyType,e.type,e.options,e.comment)},f.prototype.toJSON=function(o){var e=o?!!o.keepComments:!1;return u.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",e?this.comment:void 0])},f.prototype.resolve=function(){if(this.resolved)return this;if(t.mapKey[this.keyType]===void 0)throw Error("invalid key type: "+this.keyType);return p.prototype.resolve.call(this)},f.d=function(o,e,i){return typeof i=="function"?i=u.decorateType(i).name:i&&typeof i=="object"&&(i=u.decorateEnum(i).name),function(s,h){u.decorateType(s.constructor).add(new f(h,o,e,i))}},nt}var st,ur;function Tt(){if(ur)return st;ur=1,st=u;var p=me();((u.prototype=Object.create(p.prototype)).constructor=u).className="Method";var t=ee();function u(f,a,o,e,i,r,s,h,n){if(t.isObject(i)?(s=i,i=r=void 0):t.isObject(r)&&(s=r,r=void 0),!(a===void 0||t.isString(a)))throw TypeError("type must be a string");if(!t.isString(o))throw TypeError("requestType must be a string");if(!t.isString(e))throw TypeError("responseType must be a string");p.call(this,f,s),this.type=a||"rpc",this.requestType=o,this.requestStream=i?!0:void 0,this.responseType=e,this.responseStream=r?!0:void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=h,this.parsedOptions=n}return u.fromJSON=function(a,o){return new u(a,o.type,o.requestType,o.responseType,o.requestStream,o.responseStream,o.options,o.comment,o.parsedOptions)},u.prototype.toJSON=function(a){var o=a?!!a.keepComments:!1;return t.toObject(["type",this.type!=="rpc"&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",o?this.comment:void 0,"parsedOptions",this.parsedOptions])},u.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),p.prototype.resolve.call(this))},st}var ot,fr;function Nt(){if(fr)return ot;fr=1,ot=a;var p=Ee();((a.prototype=Object.create(p.prototype)).constructor=a).className="Service";var t=Tt(),u=ee(),f=jr();function a(e,i){p.call(this,e,i),this.methods={},this._methodsArray=null}a.fromJSON=function(i,r,s){s=u.checkDepth(s);var h=new a(i,r.options);if(r.methods)for(var n=Object.keys(r.methods),l=0;l<n.length;++l)h.add(t.fromJSON(n[l],r.methods[n[l]]));return r.nested&&h.addJSON(r.nested,s),r.edition&&(h._edition=r.edition),h.comment=r.comment,h._defaultEdition="proto3",h},a.prototype.toJSON=function(i){var r=p.prototype.toJSON.call(this,i),s=i?!!i.keepComments:!1;return u.toObject(["edition",this._editionToJSON(),"options",r&&r.options||void 0,"methods",p.arrayToJSON(this.methodsArray,i)||{},"nested",r&&r.nested||void 0,"comment",s?this.comment:void 0])},Object.defineProperty(a.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=u.toArray(this.methods))}});function o(e){return e._methodsArray=null,e}return a.prototype.get=function(i){return Object.prototype.hasOwnProperty.call(this.methods,i)?this.methods[i]:p.prototype.get.call(this,i)},a.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;p.prototype.resolve.call(this);for(var i=this.methodsArray,r=0;r<i.length;++r)i[r].resolve();return this},a.prototype._resolveFeaturesRecursive=function(i){return this._needsRecursiveFeatureResolution?(i=this._edition||i,p.prototype._resolveFeaturesRecursive.call(this,i),this.methodsArray.forEach(r=>{r._resolveFeaturesRecursive(i)}),this):this},a.prototype.add=function(i){if(this.get(i.name))throw Error("duplicate name '"+i.name+"' in "+this);return i instanceof t?i.name==="__proto__"?this:(this.methods[i.name]=i,i.parent=this,o(this)):p.prototype.add.call(this,i)},a.prototype.remove=function(i){if(i instanceof t){if(this.methods[i.name]!==i)throw Error(i+" is not a member of "+this);return delete this.methods[i.name],i.parent=null,o(this)}return p.prototype.remove.call(this,i)},a.prototype.create=function(i,r,s){for(var h=new f.Service(i,r,s),n=0,l;n<this.methodsArray.length;++n){var c=u.lcFirst((l=this._methodsArray[n]).resolve().name).replace(/[^$\w_]/g,"");h[c]=(function(m,g,E){return function(y,w){return f.Service.prototype.rpcCall.call(this,m,g,E,y,w)}})(l,l.resolvedRequestType.ctor,l.resolvedResponseType.ctor)}return h},ot}var at,lr;function kt(){if(lr)return at;lr=1,at=t;var p=ue();function t(u){if(u)for(var f=Object.keys(u),a=0;a<f.length;++a){var o=f[a];o!=="__proto__"&&(this[o]=u[o])}}return t.create=function(f){return this.$type.create(f)},t.encode=function(f,a){return this.$type.encode(f,a)},t.encodeDelimited=function(f,a){return this.$type.encodeDelimited(f,a)},t.decode=function(f){return this.$type.decode(f)},t.decodeDelimited=function(f){return this.$type.decodeDelimited(f)},t.verify=function(f){return this.$type.verify(f)},t.fromObject=function(f){return this.$type.fromObject(f)},t.toObject=function(f,a){return this.$type.toObject(f,a)},t.prototype.toJSON=function(){return this.$type.toObject(this,p.toJSONOptions)},at}var ut,cr;function Vr(){if(cr)return ut;cr=1,ut=a;var p=fe(),t=_e(),u=ee();function f(o){return"missing required '"+o.name+"'"}function a(o){for(var e=u.codegen(["r","l","e","n"],o.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("if(n===undefined)n=0")("if(n>Reader.recursionLimit)")('throw Error("maximum nesting depth exceeded")')("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(o.fieldsArray.filter(function(l){return l.map}).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()")("if(t===e)")("break")("switch(t>>>3){"),i=0;i<o.fieldsArray.length;++i){var r=o._fieldsArray[i].resolve(),s=r.resolvedType instanceof p?"int32":r.type,h="m"+u.safeProp(r.name);e("case %i: {",r.id),r.map?(e("if(%s===util.emptyObject)",h)("%s={}",h)("var c2 = r.uint32()+r.pos"),t.defaults[r.keyType]!==void 0?e("k=%j",t.defaults[r.keyType]):e("k=null"),t.defaults[s]!==void 0?e("value=%j",t.defaults[s]):e("value=null"),e("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",r.keyType)("case 2:"),t.basic[s]===void 0?e("value=types[%i].decode(r,r.uint32(),undefined,n+1)",i):e("value=r.%s()",s),e("break")("default:")("r.skipType(tag2&7,n)")("break")("}")("}"),t.long[r.keyType]!==void 0?e('%s[typeof k==="object"?util.longToHash(k):k]=value',h):(r.keyType==="string"&&e('if(k==="__proto__")')("util.makeProp(%s,k)",h),e("%s[k]=value",h))):r.repeated?(e("if(!(%s&&%s.length))",h,h)("%s=[]",h),t.packed[s]!==void 0&&e("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",h,s)("}else"),t.basic[s]===void 0?e(r.delimited?"%s.push(types[%i].decode(r,undefined,((t&~7)|4),n+1))":"%s.push(types[%i].decode(r,r.uint32(),undefined,n+1))",h,i):e("%s.push(r.%s())",h,s)):t.basic[s]===void 0?e(r.delimited?"%s=types[%i].decode(r,undefined,((t&~7)|4),n+1)":"%s=types[%i].decode(r,r.uint32(),undefined,n+1)",h,i):e("%s=r.%s()",h,s),e("break")("}")}for(e("default:")("r.skipType(t&7,n)")("break")("}")("}"),i=0;i<o._fieldsArray.length;++i){var n=o._fieldsArray[i];n.required&&e("if(!Object.hasOwnProperty.call(m,%j))",n.name)("throw util.ProtocolError(%j,{instance:m})",f(n))}return e("return m")}return ut}var ft,hr;function Jr(){if(hr)return ft;hr=1,ft=o;var p=fe(),t=ee();function u(e,i){return e.name+": "+i+(e.repeated&&i!=="array"?"[]":e.map&&i!=="object"?"{k:"+e.keyType+"}":"")+" expected"}function f(e,i,r,s){if(i.resolvedType)if(i.resolvedType instanceof p){e("switch(%s){",s)("default:")("return%j",u(i,"enum value"));for(var h=Object.keys(i.resolvedType.values),n=0;n<h.length;++n)e("case %i:",i.resolvedType.values[h[n]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s,n+1);",r,s)("if(e)")("return%j+e",i.name+".")("}");else switch(i.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",s)("return%j",u(i,"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)))",s,s,s,s)("return%j",u(i,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',s)("return%j",u(i,"number"));break;case"bool":e('if(typeof %s!=="boolean")',s)("return%j",u(i,"boolean"));break;case"string":e("if(!util.isString(%s))",s)("return%j",u(i,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',s,s,s)("return%j",u(i,"buffer"));break}return e}function a(e,i,r){switch(i.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",r)("return%j",u(i,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",r)("return%j",u(i,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",r)("return%j",u(i,"boolean key"));break}return e}function o(e){var i=t.codegen(["m","n"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected")("if(n===undefined)n=0")("if(n>util.recursionLimit)")("return%j","maximum nesting depth exceeded"),r=e.oneofsArray,s={};r.length&&i("var p={}");for(var h=0;h<e.fieldsArray.length;++h){var n=e._fieldsArray[h].resolve(),l="m"+t.safeProp(n.name);if(n.optional&&i("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",l,n.name),n.map)i("if(!util.isObject(%s))",l)("return%j",u(n,"object"))("var k=Object.keys(%s)",l)("for(var i=0;i<k.length;++i){"),a(i,n,"k[i]"),f(i,n,h,l+"[k[i]]")("}");else if(n.repeated)i("if(!Array.isArray(%s))",l)("return%j",u(n,"array"))("for(var i=0;i<%s.length;++i){",l),f(i,n,h,l+"[i]")("}");else{if(n.partOf){var c=t.safeProp(n.partOf.name);s[n.partOf.name]===1&&i("if(p%s===1)",c)("return%j",n.partOf.name+": multiple values"),s[n.partOf.name]=1,i("p%s=1",c)}f(i,n,h,l)}n.optional&&i("}")}return i("return null")}return ft}var lt={},dr;function zr(){return dr||(dr=1,(function(p){var t=p,u=fe(),f=ee();function a(e,i,r,s){var h=!1;if(i.resolvedType)if(i.resolvedType instanceof u){e("switch(d%s){",s);for(var n=i.resolvedType.values,l=Object.keys(n),c=0;c<l.length;++c)n[l[c]]===i.typeDefault&&!h&&(e("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',s,s,s),i.repeated||e("break"),h=!0),e("case%j:",l[c])("case %i:",n[l[c]])("m%s=%j",s,n[l[c]])("break");e("}")}else e("if(!util.isObject(d%s))",s)("throw TypeError(%j)",i.fullName+": object expected")("m%s=types[%i].fromObject(d%s,n+1)",s,r,s);else{var m=!1;switch(i.type){case"double":case"float":e("m%s=Number(d%s)",s,s);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",s,s);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",s,s);break;case"uint64":case"fixed64":m=!0;case"int64":case"sint64":case"sfixed64":e("if(util.Long)")("m%s=util.Long.fromValue(d%s,%j)",s,s,m)('else if(typeof d%s==="string")',s)("m%s=parseInt(d%s,10)",s,s)('else if(typeof d%s==="number")',s)("m%s=d%s",s,s)('else if(typeof d%s==="object")',s)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",s,s,s,m?"true":"");break;case"bytes":e('if(typeof d%s==="string")',s)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",s,s,s)("else if(d%s.length >= 0)",s)("m%s=d%s",s,s);break;case"string":e("m%s=String(d%s)",s,s);break;case"bool":e("m%s=Boolean(d%s)",s,s);break}}return e}t.fromObject=function(i){var r=i.fieldsArray,s=f.codegen(["d","n"],i.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!r.length)return s("return new this.ctor");s("if(!util.isObject(d))")("throw TypeError(%j)",i.fullName+": object expected")("if(n===undefined)n=0")("if(n>util.recursionLimit)")('throw Error("maximum nesting depth exceeded")'),s("var m=new this.ctor");for(var h=0;h<r.length;++h){var n=r[h].resolve(),l=f.safeProp(n.name);n.map?(s("if(d%s){",l)("if(!util.isObject(d%s))",l)("throw TypeError(%j)",n.fullName+": object expected")("m%s={}",l)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",l),s('if(ks[i]==="__proto__")')("util.makeProp(m%s,ks[i])",l),a(s,n,h,l+"[ks[i]]")("}")("}")):n.repeated?(s("if(d%s){",l)("if(!Array.isArray(d%s))",l)("throw TypeError(%j)",n.fullName+": array expected")("m%s=[]",l)("for(var i=0;i<d%s.length;++i){",l),a(s,n,h,l+"[i]")("}")("}")):(n.resolvedType instanceof u||s("if(d%s!=null){",l),a(s,n,h,l),n.resolvedType instanceof u||s("}"))}return s("return m")};function o(e,i,r,s){if(i.resolvedType)i.resolvedType instanceof u?e("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",s,r,s,s,r,s,s):e("d%s=types[%i].toObject(m%s,o,q+1)",s,r,s);else{var h=!1;switch(i.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",s,s,s,s);break;case"uint64":case"fixed64":h=!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()',s,s,s,s,s,h)('else if(typeof m%s==="number")',s)("d%s=o.longs===String?String(m%s):m%s",s,s,s)("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",s,s,s,s,h?"true":"",s);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",s,s,s,s,s);break;default:e("d%s=m%s",s,s);break}}return e}t.toObject=function(i){var r=i.fieldsArray.slice().sort(f.compareFieldsById);if(!r.length)return f.codegen()("return {}");for(var s=f.codegen(["m","o","q"],i.name+"$toObject")("if(!o)")("o={}")("if(q===undefined)q=0")("if(q>util.recursionLimit)")('throw Error("max depth exceeded")')("var d={}"),h=[],n=[],l=[],c=0;c<r.length;++c)r[c].partOf||(r[c].resolve().repeated?h:r[c].map?n:l).push(r[c]);if(h.length){for(s("if(o.arrays||o.defaults){"),c=0;c<h.length;++c)s("d%s=[]",f.safeProp(h[c].name));s("}")}if(n.length){for(s("if(o.objects||o.defaults){"),c=0;c<n.length;++c)s("d%s={}",f.safeProp(n[c].name));s("}")}if(l.length){for(s("if(o.defaults){"),c=0;c<l.length;++c){var m=l[c],g=f.safeProp(m.name);if(m.resolvedType instanceof u)s("d%s=o.enums===String?%j:%j",g,m.resolvedType.valuesById[m.typeDefault],m.typeDefault);else if(m.long)s("if(util.Long){")("var n=new util.Long(%i,%i,%j)",m.typeDefault.low,m.typeDefault.high,m.typeDefault.unsigned)('d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():typeof BigInt!=="undefined"&&o.longs===BigInt?n.toBigInt():n',g)("}else")('d%s=o.longs===String?%j:typeof BigInt!=="undefined"&&o.longs===BigInt?BigInt(%j):%i',g,m.typeDefault.toString(),m.typeDefault.toString(),m.typeDefault.toNumber());else if(m.bytes){var E=Array.prototype.slice.call(m.typeDefault);s("if(o.bytes===String)d%s=%j",g,String.fromCharCode.apply(String,m.typeDefault))("else{")("d%s=%j",g,E)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",g,g)("}")}else s("d%s=%j",g,m.typeDefault)}s("}")}var _=!1;for(c=0;c<r.length;++c){var m=r[c],y=i._fieldsArray.indexOf(m),g=f.safeProp(m.name);m.map?(_||(_=!0,s("var ks2")),s("if(m%s&&(ks2=Object.keys(m%s)).length){",g,g)("d%s={}",g)("for(var j=0;j<ks2.length;++j){"),s('if(ks2[j]==="__proto__")')("util.makeProp(d%s,ks2[j])",g),o(s,m,y,g+"[ks2[j]]")("}")):m.repeated?(s("if(m%s&&m%s.length){",g,g)("d%s=[]",g)("for(var j=0;j<m%s.length;++j){",g),o(s,m,y,g+"[j]")("}")):(s("if(m%s!=null&&Object.hasOwnProperty.call(m,%j)){",g,m.name),o(s,m,y,g),m.partOf&&s("if(o.oneofs)")("d%s=%j",f.safeProp(m.partOf.name),m.name)),s("}")}return s("return d")}})(lt)),lt}var ct={},pr;function Wr(){return pr||(pr=1,(function(p){var t=p,u=kt(),f=ue();t[".google.protobuf.Any"]={fromObject:function(a,o){if(a&&a["@type"]){var e=a["@type"].substring(a["@type"].lastIndexOf("/")+1),i=this.lookup(e);if(i){var r=a["@type"].charAt(0)==="."?a["@type"].slice(1):a["@type"];return r.indexOf("/")===-1&&(r="/"+r),this.create({type_url:r,value:i.encode(i.fromObject(a,o===void 0?1:o+1)).finish()})}}return this.fromObject(a,o)},toObject:function(a,o,e){if(e===void 0&&(e=0),e>f.recursionLimit)throw Error("max depth exceeded");var i="type.googleapis.com/",r="",s="";if(o&&o.json&&a.type_url&&a.value){s=a.type_url.substring(a.type_url.lastIndexOf("/")+1),r=a.type_url.substring(0,a.type_url.lastIndexOf("/")+1);var h=this.lookup(s);h&&(a=h.decode(a.value,void 0,void 0,e+1))}if(!(a instanceof this.ctor)&&a instanceof u){var n=a.$type.toObject(a,o,e+1),l=a.$type.fullName[0]==="."?a.$type.fullName.slice(1):a.$type.fullName;return r===""&&(r=i),s=r+l,n["@type"]=s,n}return this.toObject(a,o,e)}}})(ct)),ct}var ht,mr;function It(){if(mr)return ht;mr=1,ht=g;var p=Ee();((g.prototype=Object.create(p.prototype)).constructor=g).className="Type";var t=fe(),u=we(),f=pe(),a=Rt(),o=Nt(),e=kt(),i=At(),r=Et(),s=ee(),h=Hr(),n=Vr(),l=Jr(),c=zr(),m=Wr();function g(_,y){_=_.replace(/\W/g,""),p.call(this,_,y),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}Object.defineProperties(g.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var _=Object.keys(this.fields),y=0;y<_.length;++y){var w=this.fields[_[y]],k=w.id;if(this._fieldsById[k])throw Error("duplicate id "+k+" in "+this);this._fieldsById[k]=w}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=s.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=s.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=g.generateConstructor(this)())},set:function(_){var y=_.prototype;y instanceof e||((_.prototype=new e).constructor=_,s.merge(_.prototype,y)),_.$type=_.prototype.$type=this,s.merge(_,e,!0),this._ctor=_;for(var w=0;w<this.fieldsArray.length;++w)this._fieldsArray[w].resolve();var k={};for(w=0;w<this.oneofsArray.length;++w)k[this._oneofsArray[w].resolve().name]={get:s.oneOfGetter(this._oneofsArray[w].oneof),set:s.oneOfSetter(this._oneofsArray[w].oneof)};w&&Object.defineProperties(_.prototype,k)}}}),g.generateConstructor=function(y){for(var w=s.codegen(["p"],y.name),k=0,L;k<y.fieldsArray.length;++k)(L=y._fieldsArray[k]).map?w("this%s={}",s.safeProp(L.name)):L.repeated&&w("this%s=[]",s.safeProp(L.name));return w('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]]")};function E(_){return _._fieldsById=_._fieldsArray=_._oneofsArray=null,delete _.encode,delete _.decode,delete _.verify,_}return g.fromJSON=function(y,w,k){if(k===void 0&&(k=0),k>s.nestingLimit)throw Error("max depth exceeded");var L=new g(y,w.options);L.extensions=w.extensions,L.reserved=w.reserved;for(var M=Object.keys(w.fields),j=0;j<M.length;++j)L.add((typeof w.fields[M[j]].keyType<"u"?a.fromJSON:f.fromJSON)(M[j],w.fields[M[j]]));if(w.oneofs)for(M=Object.keys(w.oneofs),j=0;j<M.length;++j)L.add(u.fromJSON(M[j],w.oneofs[M[j]]));if(w.nested)for(M=Object.keys(w.nested),j=0;j<M.length;++j){var G=w.nested[M[j]];L.add((G.id!==void 0?f.fromJSON:G.fields!==void 0?g.fromJSON:G.values!==void 0?t.fromJSON:G.methods!==void 0?o.fromJSON:p.fromJSON)(M[j],G,k+1))}return w.extensions&&w.extensions.length&&(L.extensions=w.extensions),w.reserved&&w.reserved.length&&(L.reserved=w.reserved),w.group&&(L.group=!0),w.comment&&(L.comment=w.comment),w.edition&&(L._edition=w.edition),L._defaultEdition="proto3",L},g.prototype.toJSON=function(y){var w=p.prototype.toJSON.call(this,y),k=y?!!y.keepComments:!1;return s.toObject(["edition",this._editionToJSON(),"options",w&&w.options||void 0,"oneofs",p.arrayToJSON(this.oneofsArray,y),"fields",p.arrayToJSON(this.fieldsArray.filter(function(L){return!L.declaringField}),y)||{},"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",w&&w.nested||void 0,"comment",k?this.comment:void 0])},g.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;p.prototype.resolveAll.call(this);var y=this.oneofsArray;for(k=0;k<y.length;)y[k++].resolve();for(var w=this.fieldsArray,k=0;k<w.length;)w[k++].resolve();return this},g.prototype._resolveFeaturesRecursive=function(y){return this._needsRecursiveFeatureResolution?(y=this._edition||y,p.prototype._resolveFeaturesRecursive.call(this,y),this.oneofsArray.forEach(w=>{w._resolveFeatures(y)}),this.fieldsArray.forEach(w=>{w._resolveFeatures(y)}),this):this},g.prototype.get=function(y){return Object.prototype.hasOwnProperty.call(this.fields,y)?this.fields[y]:this.oneofs&&Object.prototype.hasOwnProperty.call(this.oneofs,y)?this.oneofs[y]:this.nested&&Object.prototype.hasOwnProperty.call(this.nested,y)?this.nested[y]:null},g.prototype.add=function(y){if(this.get(y.name))throw Error("duplicate name '"+y.name+"' in "+this);if(y instanceof f&&y.extend===void 0){if(this._fieldsById?this._fieldsById[y.id]:this.fieldsById[y.id])throw Error("duplicate id "+y.id+" in "+this);if(this.isReservedId(y.id))throw Error("id "+y.id+" is reserved in "+this);if(this.isReservedName(y.name)||y.name.charAt(0)==="$")throw Error("name '"+y.name+"' is reserved in "+this);return y.name==="__proto__"?this:(y.parent&&y.parent.remove(y),this.fields[y.name]=y,y.message=this,y.onAdd(this),E(this))}if(y instanceof u){if(y.name.charAt(0)==="$")throw Error("name '"+y.name+"' is reserved in "+this);return y.name==="__proto__"?this:(this.oneofs||(this.oneofs={}),this.oneofs[y.name]=y,y.onAdd(this),E(this))}return p.prototype.add.call(this,y)},g.prototype.remove=function(y){if(y instanceof f&&y.extend===void 0){if(!this.fields||this.fields[y.name]!==y)throw Error(y+" is not a member of "+this);return delete this.fields[y.name],y.parent=null,y.onRemove(this),E(this)}if(y instanceof u){if(!this.oneofs||this.oneofs[y.name]!==y)throw Error(y+" is not a member of "+this);return delete this.oneofs[y.name],y.parent=null,y.onRemove(this),E(this)}return p.prototype.remove.call(this,y)},g.prototype.isReservedId=function(y){return p.isReservedId(this.reserved,y)},g.prototype.isReservedName=function(y){return p.isReservedName(this.reserved,y)},g.prototype.create=function(y){return new this.ctor(y)},g.prototype.setup=function(){for(var y=this.fullName,w=[],k=0;k<this.fieldsArray.length;++k)w.push(this._fieldsArray[k].resolve().resolvedType);this.encode=h(this)({Writer:r,types:w,util:s}),this.decode=n(this)({Reader:i,types:w,util:s}),this.verify=l(this)({types:w,util:s}),this.fromObject=c.fromObject(this)({types:w,util:s}),this.toObject=c.toObject(this)({types:w,util:s});var L=m[y];if(L){var M=Object.create(this);M.fromObject=this.fromObject,this.fromObject=L.fromObject.bind(M),M.toObject=this.toObject,this.toObject=L.toObject.bind(M)}return this},g.prototype.encode=function(y,w){return this.setup().encode.apply(this,arguments)},g.prototype.encodeDelimited=function(y,w){return this.encode(y,w&&w.len?w.fork():w).ldelim()},g.prototype.decode=function(y,w,k,L){return this.setup().decode(y,w,k,L)},g.prototype.decodeDelimited=function(y){return y instanceof i||(y=i.create(y)),this.decode(y,y.uint32())},g.prototype.verify=function(y,w){return this.setup().verify(y,w)},g.prototype.fromObject=function(y,w){return this.setup().fromObject(y,w)},g.prototype.toObject=function(y,w){return this.setup().toObject.apply(this,arguments)},g.d=function(y){return function(k){s.decorateType(k,y)}},ht}var dt,gr;function St(){if(gr)return dt;gr=1,dt=r;var p=Ee();((r.prototype=Object.create(p.prototype)).constructor=r).className="Root";var t=pe(),u=fe(),f=we(),a=ee(),o,e,i;function r(l){p.call(this,"",l),this.deferred=[],this.files=[],this._edition="proto2",this._fullyQualifiedObjects={}}r.fromJSON=function(c,m,g){return g=a.checkDepth(g),m||(m=new r),c.options&&m.setOptions(c.options),m.addJSON(c.nested,g).resolveAll()},r.prototype.resolvePath=a.path.resolve,r.prototype.fetch=a.fetch;function s(){}r.prototype.load=function l(c,m,g){typeof m=="function"&&(g=m,m=void 0);var E=this;if(!g)return a.asPromise(l,E,c,m);var _=g===s;function y(U,J){if(g){if(_)throw U;J&&J.resolveAll();var S=g;g=null,S(U,J)}}function w(U){var J=U.lastIndexOf("google/protobuf/");if(J>-1){var S=U.substring(J);if(S in i)return S}return null}function k(U,J,S){S===void 0&&(S=0);try{if(S>a.recursionLimit)throw Error("max depth exceeded");if(a.isString(J)&&J.charAt(0)==="{"&&(J=JSON.parse(J)),!a.isString(J))E.setOptions(J.options).addJSON(J.nested);else{e.filename=U;var $=e(J,E,m),b,v=0;if($.imports)for(;v<$.imports.length;++v)(b=w($.imports[v])||E.resolvePath(U,$.imports[v]))&&L(b,!1,S+1);if($.weakImports)for(v=0;v<$.weakImports.length;++v)(b=w($.weakImports[v])||E.resolvePath(U,$.weakImports[v]))&&L(b,!0,S+1)}}catch(d){y(d)}!_&&!M&&y(null,E)}function L(U,J,S){if(S===void 0&&(S=0),U=w(U)||U,!(E.files.indexOf(U)>-1)){if(E.files.push(U),U in i){_?k(U,i[U],S):(++M,setTimeout(function(){--M,k(U,i[U],S)}));return}if(_){var $;try{$=a.fs.readFileSync(U).toString("utf8")}catch(b){J||y(b);return}k(U,$,S)}else++M,E.fetch(U,function(b,v){if(--M,!!g){if(b){J?M||y(null,E):y(b);return}k(U,v,S)}})}}var M=0;a.isString(c)&&(c=[c]);for(var j=0,G;j<c.length;++j)(G=E.resolvePath("",c[j]))&&L(G);return _?(E.resolveAll(),E):(M||y(null,E),E)},r.prototype.loadSync=function(c,m){if(!a.isNode)throw Error("not supported");return this.load(c,m,s)},r.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(c){return"'extend "+c.extend+"' in "+c.parent.fullName}).join(", "));return p.prototype.resolveAll.call(this)};var h=/^[A-Z]/;function n(l,c){var m=c.parent.lookup(c.extend);if(m){var g=new t(c.fullName,c.id,c.type,c.rule,void 0,c.options);return m.get(g.name)||(g.declaringField=c,c.extensionField=g,m.add(g)),!0}return!1}return r.prototype._handleAdd=function(c){if(c instanceof t)c.extend!==void 0&&!c.extensionField&&(n(this,c)||this.deferred.push(c));else if(c instanceof u)h.test(c.name)&&(c.parent[c.name]=c.values);else if(!(c instanceof f)){if(c instanceof o)for(var m=0;m<this.deferred.length;)n(this,this.deferred[m])?this.deferred.splice(m,1):++m;for(var g=0;g<c.nestedArray.length;++g)this._handleAdd(c._nestedArray[g]);h.test(c.name)&&(c.parent[c.name]=c)}(c instanceof o||c instanceof u||c instanceof t)&&(this._fullyQualifiedObjects[c.fullName]=c)},r.prototype._handleRemove=function(c){if(c instanceof t){if(c.extend!==void 0)if(c.extensionField)c.extensionField.parent.remove(c.extensionField),c.extensionField=null;else{var m=this.deferred.indexOf(c);m>-1&&this.deferred.splice(m,1)}}else if(c instanceof u)h.test(c.name)&&delete c.parent[c.name];else if(c instanceof p){for(var g=0;g<c.nestedArray.length;++g)this._handleRemove(c._nestedArray[g]);h.test(c.name)&&delete c.parent[c.name]}delete this._fullyQualifiedObjects[c.fullName]},r._configure=function(l,c,m){o=l,e=c,i=m},dt}var yr;function ee(){if(yr)return Ye.exports;yr=1;var p=Ye.exports=ue(),t=$r(),u,f;p.codegen=xi(),p.fetch=Ti(),p.path=Ni(),p.patterns=ki();var a=p.patterns.reservedRe;p.fs=Ii(),p.checkDepth=function(r){if(r===void 0&&(r=0),r>p.recursionLimit)throw Error("max depth exceeded");return r},p.toArray=function(r){if(r){for(var s=Object.keys(r),h=new Array(s.length),n=0;n<s.length;)h[n]=r[s[n++]];return h}return[]},p.toObject=function(r){for(var s={},h=0;h<r.length;){var n=r[h++],l=r[h++];l!==void 0&&(s[n]=l)}return s},p.isReserved=function(r){return a.test(r)},p.safeProp=function(r){return!/^[$\w_]+$/.test(r)||a.test(r)?"["+JSON.stringify(r)+"]":"."+r},p.ucFirst=function(r){return r.charAt(0).toUpperCase()+r.substring(1)};var o=/_([a-z])/g;p.camelCase=function(r){return r.substring(0,1)+r.substring(1).replace(o,function(s,h){return h.toUpperCase()})},p.compareFieldsById=function(r,s){return r.id-s.id},p.decorateType=function(r,s){if(r.$type)return s&&r.$type.name!==s&&(p.decorateRoot.remove(r.$type),r.$type.name=s,p.decorateRoot.add(r.$type)),r.$type;u||(u=It());var h=new u(s||r.name);return p.decorateRoot.add(h),h.ctor=r,Object.defineProperty(r,"$type",{value:h,enumerable:!1}),Object.defineProperty(r.prototype,"$type",{value:h,enumerable:!1}),h};var e=0;return p.decorateEnum=function(r){if(r.$type)return r.$type;f||(f=fe());var s=new f("Enum"+e++,r);return p.decorateRoot.add(s),Object.defineProperty(r,"$type",{value:s,enumerable:!1}),s},p.setProperty=function(r,s,h,n){function l(c,m,g){var E=m.shift();if(p.isUnsafeProperty(E))return c;if(m.length>0)c[E]=l(c[E]||{},m,g);else{var _=c[E];if(_&&n)return c;_&&(g=[].concat(_).concat(g)),c[E]=g}return c}if(typeof r!="object")throw TypeError("dst must be an object");if(!s)throw TypeError("path must be specified");if(s=s.split("."),s.length>p.recursionLimit)throw Error("max depth exceeded");return l(r,s,h)},Object.defineProperty(p,"decorateRoot",{get:function(){return t.decorated||(t.decorated=new(St()))}}),Ye.exports}var vr;function _e(){return vr||(vr=1,(function(p){var t=p,u=ee(),f=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function a(o,e){var i=0,r=Object.create(null);for(e|=0;i<o.length;)r[f[i+e]]=o[i++];return r}t.basic=a([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),t.defaults=a([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",u.emptyArray,null]),t.long=a([0,0,0,1,1],7),t.mapKey=a([0,0,0,5,5,0,0,0,1,1,0,2],2),t.packed=a([1,5,0,0,0,5,5,0,0,0,1,1,0])})(Ge)),Ge}var pt,_r;function pe(){if(_r)return pt;_r=1,pt=e;var p=me();((e.prototype=Object.create(p.prototype)).constructor=e).className="Field";var t=fe(),u=_e(),f=ee(),a,o=/^required|optional|repeated$/;e.fromJSON=function(r,s){var h=new e(r,s.id,s.type,s.rule,s.extend,s.options,s.comment);return s.edition&&(h._edition=s.edition),h._defaultEdition="proto3",h};function e(i,r,s,h,n,l,c){if(f.isObject(h)?(c=n,l=h,h=n=void 0):f.isObject(n)&&(c=l,l=n,n=void 0),p.call(this,i,l),!f.isInteger(r)||r<0)throw TypeError("id must be a non-negative integer");if(!f.isString(s))throw TypeError("type must be a string");if(h!==void 0&&!o.test(h=h.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(n!==void 0&&!f.isString(n))throw TypeError("extend must be a string");h==="proto3_optional"&&(h="optional"),this.rule=h&&h!=="optional"?h:void 0,this.type=s,this.id=r,this.extend=n||void 0,this.repeated=h==="repeated",this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=f.Long?u.long[s]!==void 0:!1,this.bytes=s==="bytes",this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.comment=c}return Object.defineProperty(e.prototype,"required",{get:function(){return this._features.field_presence==="LEGACY_REQUIRED"}}),Object.defineProperty(e.prototype,"optional",{get:function(){return!this.required}}),Object.defineProperty(e.prototype,"delimited",{get:function(){return this.resolvedType instanceof a&&this._features.message_encoding==="DELIMITED"}}),Object.defineProperty(e.prototype,"packed",{get:function(){return this._features.repeated_field_encoding==="PACKED"}}),Object.defineProperty(e.prototype,"hasPresence",{get:function(){return this.repeated||this.map?!1:this.partOf||this.declaringField||this.extensionField||this._features.field_presence!=="IMPLICIT"}}),e.prototype.setOption=function(r,s,h){return p.prototype.setOption.call(this,r,s,h)},e.prototype.toJSON=function(r){var s=r?!!r.keepComments:!1;return f.toObject(["edition",this._editionToJSON(),"rule",this.rule!=="optional"&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",s?this.comment:void 0])},e.prototype.resolve=function(){if(this.resolved)return this;if((this.typeDefault=u.defaults[this.type])===void 0?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof a?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&&this.options.default!=null&&(this.typeDefault=this.options.default,this.resolvedType instanceof t&&typeof this.typeDefault=="string"&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(this.options.packed!==void 0&&this.resolvedType&&!(this.resolvedType instanceof t)&&delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=f.Long.fromNumber(this.typeDefault,this.type==="uint64"||this.type==="fixed64"),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&typeof this.typeDefault=="string"){var r;f.base64.test(this.typeDefault)?f.base64.decode(this.typeDefault,r=f.newBuffer(f.base64.length(this.typeDefault)),0):f.utf8.write(this.typeDefault,r=f.newBuffer(f.utf8.length(this.typeDefault)),0),this.typeDefault=r}return this.map?this.defaultValue=f.emptyObject:this.repeated?this.defaultValue=f.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof a&&(this.parent.ctor.prototype[this.name]=this.defaultValue),p.prototype.resolve.call(this)},e.prototype._inferLegacyProtoFeatures=function(r){if(r!=="proto2"&&r!=="proto3")return{};var s={};if(this.rule==="required"&&(s.field_presence="LEGACY_REQUIRED"),this.parent&&u.defaults[this.type]===void 0){var h=this.parent.get(this.type.split(".").pop());h&&h instanceof a&&h.group&&(s.message_encoding="DELIMITED")}return this.getOption("packed")===!0?s.repeated_field_encoding="PACKED":this.getOption("packed")===!1&&(s.repeated_field_encoding="EXPANDED"),s},e.prototype._resolveFeatures=function(r){return p.prototype._resolveFeatures.call(this,this._edition||r)},e.d=function(r,s,h,n){return typeof s=="function"?s=f.decorateType(s).name:s&&typeof s=="object"&&(s=f.decorateEnum(s).name),function(c,m){f.decorateType(c.constructor).add(new e(m,r,s,h,{default:n}))}},e._configure=function(r){a=r},pt}var mt,wr;function we(){if(wr)return mt;wr=1,mt=f;var p=me();((f.prototype=Object.create(p.prototype)).constructor=f).className="OneOf";var t=pe(),u=ee();function f(o,e,i,r){if(Array.isArray(e)||(i=e,e=void 0),p.call(this,o,i),!(e===void 0||Array.isArray(e)))throw TypeError("fieldNames must be an Array");this.oneof=e||[],this.fieldsArray=[],this.comment=r}f.fromJSON=function(e,i){return new f(e,i.oneof,i.options,i.comment)},f.prototype.toJSON=function(e){var i=e?!!e.keepComments:!1;return u.toObject(["options",this.options,"oneof",this.oneof,"comment",i?this.comment:void 0])};function a(o){if(o.parent)for(var e=0;e<o.fieldsArray.length;++e)o.fieldsArray[e].parent||o.parent.add(o.fieldsArray[e])}return f.prototype.add=function(e){if(!(e instanceof t))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,a(this),this},f.prototype.remove=function(e){if(!(e instanceof t))throw TypeError("field must be a Field");var i=this.fieldsArray.indexOf(e);if(i<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(i,1),i=this.oneof.indexOf(e.name),i>-1&&this.oneof.splice(i,1),e.partOf=null,this},f.prototype.onAdd=function(e){p.prototype.onAdd.call(this,e);for(var i=this,r=0;r<this.oneof.length;++r){var s=e.get(this.oneof[r]);s&&!s.partOf&&(s.partOf=i,i.fieldsArray.push(s))}a(this)},f.prototype.onRemove=function(e){for(var i=0,r;i<this.fieldsArray.length;++i)(r=this.fieldsArray[i]).parent&&r.parent.remove(r);p.prototype.onRemove.call(this,e)},Object.defineProperty(f.prototype,"isProto3Optional",{get:function(){if(this.fieldsArray==null||this.fieldsArray.length!==1)return!1;var o=this.fieldsArray[0];return o.options!=null&&o.options.proto3_optional===!0}}),f.d=function(){for(var e=new Array(arguments.length),i=0;i<arguments.length;)e[i]=arguments[i++];return function(s,h){u.decorateType(s.constructor).add(new f(h,e)),Object.defineProperty(s,h,{get:u.oneOfGetter(e),set:u.oneOfSetter(e)})}},mt}var gt,br;function me(){if(br)return gt;br=1,gt=e,e.className="ReflectionObject";const p=we();var t=ee(),u,f={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY"},a={enum_type:"CLOSED",field_presence:"EXPLICIT",json_format:"LEGACY_BEST_EFFORT",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"EXPANDED",utf8_validation:"NONE"},o={enum_type:"OPEN",field_presence:"IMPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY"};function e(i,r){if(!t.isString(i))throw TypeError("name must be a string");if(r&&!t.isObject(r))throw TypeError("options must be an object");this.options=r,this.parsedOptions=null,this.name=i,this._edition=null,this._defaultEdition="proto2",this._features={},this._featuresResolved=!1,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}return Object.defineProperties(e.prototype,{root:{get:function(){for(var i=this;i.parent!==null;)i=i.parent;return i}},fullName:{get:function(){for(var i=[this.name],r=this.parent;r;)i.unshift(r.name),r=r.parent;return i.join(".")}}}),e.prototype.toJSON=function(){throw Error()},e.prototype.onAdd=function(r){this.parent&&this.parent!==r&&this.parent.remove(this),this.parent=r,this.resolved=!1;var s=r.root;s instanceof u&&s._handleAdd(this)},e.prototype.onRemove=function(r){var s=r.root;s instanceof u&&s._handleRemove(this),this.parent=null,this.resolved=!1},e.prototype.resolve=function(){return this.resolved?this:(this.root instanceof u&&(this.resolved=!0),this)},e.prototype._resolveFeaturesRecursive=function(r){return this._resolveFeatures(this._edition||r)},e.prototype._resolveFeatures=function(r){if(!this._featuresResolved){var s={};if(!r)throw new Error("Unknown edition for "+this.fullName);var h=t.merge({},this.options&&this.options.features,this._inferLegacyProtoFeatures(r));if(this._edition){if(r==="proto2")s=Object.assign({},a);else if(r==="proto3")s=Object.assign({},o);else if(r==="2023")s=Object.assign({},f);else throw new Error("Unknown edition: "+r);this._features=t.merge(s,h),this._featuresResolved=!0;return}if(this.partOf instanceof p){var n=t.merge({},this.partOf._features);this._features=t.merge(n,h)}else if(!this.declaringField)if(this.parent){var l=t.merge({},this.parent._features);this._features=t.merge(l,h)}else throw new Error("Unable to find a parent for "+this.fullName);this.extensionField&&(this.extensionField._features=this._features),this._featuresResolved=!0}},e.prototype._inferLegacyProtoFeatures=function(){return{}},e.prototype.getOption=function(r){if(this.options)return this.options[r]},e.prototype.setOption=function(r,s,h){return r==="__proto__"?this:(this.options||(this.options={}),/^features\./.test(r)?t.setProperty(this.options,r,s,h):(!h||this.options[r]===void 0)&&(this.getOption(r)!==s&&(this.resolved=!1),this.options[r]=s),this)},e.prototype.setParsedOption=function(r,s,h){if(r==="__proto__")return this;this.parsedOptions||(this.parsedOptions=[]);var n=this.parsedOptions;if(h){var l=n.find(function(g){return Object.prototype.hasOwnProperty.call(g,r)});if(l){var c=l[r];t.setProperty(c,h,s)}else l={},l[r]=t.setProperty({},h,s),n.push(l)}else{var m={};m[r]=s,n.push(m)}return this},e.prototype.setOptions=function(r,s){if(r)for(var h=Object.keys(r),n=0;n<h.length;++n)this.setOption(h[n],r[h[n]],s);return this},e.prototype.toString=function(){var r=this.constructor.className,s=this.fullName;return s.length?r+" "+s:r},e.prototype._editionToJSON=function(){if(!(!this._edition||this._edition==="proto3"))return this._edition},e._configure=function(i){u=i},gt}var yt,Or;function fe(){if(Or)return yt;Or=1,yt=f;var p=me();((f.prototype=Object.create(p.prototype)).constructor=f).className="Enum";var t=Ee(),u=ee();function f(a,o,e,i,r,s){if(p.call(this,a,e),o&&typeof o!="object")throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=i,this.comments=r||{},this.valuesOptions=s,this._valuesFeatures={},this.reserved=void 0,o)for(var h=Object.keys(o),n=0;n<h.length;++n)h[n]!=="__proto__"&&typeof o[h[n]]=="number"&&(this.valuesById[this.values[h[n]]=o[h[n]]]=h[n])}return f.prototype._resolveFeatures=function(o){return o=this._edition||o,p.prototype._resolveFeatures.call(this,o),Object.keys(this.values).forEach(e=>{var i=u.merge({},this._features);this._valuesFeatures[e]=u.merge(i,this.valuesOptions&&this.valuesOptions[e]&&this.valuesOptions[e].features||{})}),this},f.fromJSON=function(o,e){var i=new f(o,e.values,e.options,e.comment,e.comments);return i.reserved=e.reserved,e.edition&&(i._edition=e.edition),i._defaultEdition="proto3",i},f.prototype.toJSON=function(o){var e=o?!!o.keepComments:!1;return u.toObject(["edition",this._editionToJSON(),"options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",e?this.comment:void 0,"comments",e?this.comments:void 0])},f.prototype.add=function(o,e,i,r){if(!u.isString(o))throw TypeError("name must be a string");if(!u.isInteger(e))throw TypeError("id must be an integer");if(o==="__proto__")return this;if(this.values[o]!==void 0)throw Error("duplicate name '"+o+"' in "+this);if(this.isReservedId(e))throw Error("id "+e+" is reserved in "+this);if(this.isReservedName(o))throw Error("name '"+o+"' is reserved in "+this);if(this.valuesById[e]!==void 0){if(!(this.options&&this.options.allow_alias))throw Error("duplicate id "+e+" in "+this);this.values[o]=e}else this.valuesById[this.values[o]=e]=o;return r&&(this.valuesOptions===void 0&&(this.valuesOptions={}),this.valuesOptions[o]=r||null),this.comments[o]=i||null,this},f.prototype.remove=function(o){if(!u.isString(o))throw TypeError("name must be a string");var e=this.values[o];if(e==null)throw Error("name '"+o+"' does not exist in "+this);return delete this.valuesById[e],delete this.values[o],delete this.comments[o],this.valuesOptions&&delete this.valuesOptions[o],this},f.prototype.isReservedId=function(o){return t.isReservedId(this.reserved,o)},f.prototype.isReservedName=function(o){return t.isReservedName(this.reserved,o)},yt}var vt,xr;function Hr(){if(xr)return vt;xr=1,vt=a;var p=fe(),t=_e(),u=ee();function f(o,e,i,r){return e.delimited?o("types[%i].encode(%s,w.uint32(%i),q+1).uint32(%i)",i,r,(e.id<<3|3)>>>0,(e.id<<3|4)>>>0):o("types[%i].encode(%s,w.uint32(%i).fork(),q+1).ldelim()",i,r,(e.id<<3|2)>>>0)}function a(o){for(var e=u.codegen(["m","w","q"],o.name+"$encode")("if(!w)")("w=Writer.create()")("if(q===undefined)q=0")("if(q>util.recursionLimit)")('throw Error("max depth exceeded")'),i,r,s=o.fieldsArray.slice().sort(u.compareFieldsById),i=0;i<s.length;++i){var h=s[i].resolve(),n=o._fieldsArray.indexOf(h),l=h.resolvedType instanceof p?"int32":h.type,c=t.basic[l];r="m"+u.safeProp(h.name),h.map?(e("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",r,h.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",r)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(h.id<<3|2)>>>0,8|t.mapKey[h.keyType],h.keyType),c===void 0?e("types[%i].encode(%s[ks[i]],w.uint32(18).fork(),q+1).ldelim().ldelim()",n,r):e(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|c,l,r),e("}")("}")):h.repeated?(e("if(%s!=null&&%s.length){",r,r),h.packed&&t.packed[l]!==void 0?e("w.uint32(%i).fork()",(h.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",r)("w.%s(%s[i])",l,r)("w.ldelim()"):(e("for(var i=0;i<%s.length;++i)",r),c===void 0?f(e,h,n,r+"[i]"):e("w.uint32(%i).%s(%s[i])",(h.id<<3|c)>>>0,l,r)),e("}")):(h.optional&&e("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",r,h.name),c===void 0?f(e,h,n,r):e("w.uint32(%i).%s(%s)",(h.id<<3|c)>>>0,l,r))}return e("return w")}return vt}var Er;function Si(){if(Er)return Le.exports;Er=1;var p=Le.exports=Oi();p.build="light";function t(f,a,o){return typeof a=="function"?(o=a,a=new p.Root):a||(a=new p.Root),a.load(f,o)}p.load=t;function u(f,a){return a||(a=new p.Root),a.loadSync(f)}return p.loadSync=u,p.encoder=Hr(),p.decoder=Vr(),p.verifier=Jr(),p.converter=zr(),p.ReflectionObject=me(),p.Namespace=Ee(),p.Root=St(),p.Enum=fe(),p.Type=It(),p.Field=pe(),p.OneOf=we(),p.MapField=Rt(),p.Service=Nt(),p.Method=Tt(),p.Message=kt(),p.wrappers=Wr(),p.types=_e(),p.util=ee(),p.ReflectionObject._configure(p.Root),p.Namespace._configure(p.Type,p.Service,p.Enum),p.Root._configure(p.Type),p.Field._configure(p.Type),Le.exports}var _t,Ar;function Zr(){if(Ar)return _t;Ar=1,_t=h;var p=/[\s{}=;:[\],'"()<>]/g,t=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,u=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,f=/^ *[*/]+ */,a=/^\s*\*?\/*/,o=/\n/g,e=/\s/,i=/\\(.?)/g,r={0:"\0",r:"\r",n:`
|
|
23
|
+
`,t:" "};function s(n){return n.replace(i,function(l,c){switch(c){case"\\":case"":return c;default:return r[c]||""}})}h.unescape=s;function h(n,l){n=n.toString();var c=0,m=n.length,g=1,E=0,_={},y=[],w=null;function k(d){return Error("illegal "+d+" (line "+g+")")}function L(){var d=w==="'"?u:t;d.lastIndex=c-1;var A=d.exec(n);if(!A)throw k("string");return c=d.lastIndex,S(w),w=null,s(A[1])}function M(d){return n.charAt(d)}function j(d,A,N){var C={type:n.charAt(d++),lineEmpty:!1,leading:N},P;l?P=2:P=3;var q=d-P,V;do if(--q<0||(V=n.charAt(q))===`
|
|
24
|
+
`){C.lineEmpty=!0;break}while(V===" "||V===" ");for(var W=n.substring(d,A).split(o),z=0;z<W.length;++z)W[z]=W[z].replace(l?a:f,"").trim();C.text=W.join(`
|
|
25
|
+
`).trim(),_[g]=C,E=g}function G(d){var A=U(d),N=n.substring(d,A),C=/^\s*\/\//.test(N);return C}function U(d){for(var A=d;A<m&&M(A)!==`
|
|
26
|
+
`;)A++;return A}function J(){if(y.length>0)return y.shift();if(w)return L();var d,A,N,C,P,q=c===0;do{if(c===m)return null;for(d=!1;e.test(N=M(c));)if(N===`
|
|
27
|
+
`&&(q=!0,++g),++c===m)return null;if(M(c)==="/"){if(++c===m)throw k("comment");if(M(c)==="/")if(l){if(C=c,P=!1,G(c-1)){P=!0;do if(c=U(c),c===m||(c++,!q))break;while(G(c))}else c=Math.min(m,U(c)+1);P&&(j(C,c,q),q=!0),g++,d=!0}else{for(P=M(C=c+1)==="/";M(++c)!==`
|
|
28
|
+
`;)if(c===m)return null;++c,P&&(j(C,c-1,q),q=!0),++g,d=!0}else if((N=M(c))==="*"){C=c+1,P=l||M(C)==="*";do{if(N===`
|
|
29
|
+
`&&++g,++c===m)throw k("comment");A=N,N=M(c)}while(A!=="*"||N!=="/");++c,P&&(j(C,c-2,q),q=!0),d=!0}else return"/"}}while(d);var V=c;p.lastIndex=0;var W=p.test(M(V++));if(!W)for(;V<m&&!p.test(M(V));)++V;var z=n.substring(c,c=V);return(z==='"'||z==="'")&&(w=z),z}function S(d){y.push(d)}function $(){if(!y.length){var d=J();if(d===null)return null;S(d)}return y[0]}function b(d,A){var N=$(),C=N===d;if(C)return J(),!0;if(!A)throw k("token '"+N+"', '"+d+"' expected");return!1}function v(d){var A=null,N;return d===void 0?(N=_[g-1],delete _[g-1],N&&(l||N.type==="*"||N.lineEmpty)&&(A=N.leading?N.text:null)):(E<d&&$(),N=_[d],delete _[d],N&&!N.lineEmpty&&(l||N.type==="/")&&(A=N.leading?null:N.text)),A}return Object.defineProperty({next:J,peek:$,push:S,skip:b,cmnt:v},"line",{get:function(){return g}})}return _t}var wt,Rr;function Fi(){if(Rr)return wt;Rr=1,wt=L,L.filename=null,L.defaults={keepCase:!1};var p=Zr(),t=St(),u=It(),f=pe(),a=Rt(),o=we(),e=fe(),i=Nt(),r=Tt(),s=me(),h=_e(),n=ee(),l=/^[1-9][0-9]*$/,c=/^-?[1-9][0-9]*$/,m=/^0[x][0-9a-fA-F]+$/,g=/^-?0[x][0-9a-fA-F]+$/,E=/^0[0-7]+$/,_=/^-?0[0-7]+$/,y=n.patterns.numberRe,w=/^[a-zA-Z_][a-zA-Z_0-9]*$/,k=n.patterns.typeRefRe;function L(M,j,G){j instanceof t||(G=j,j=new t),G||(G=L.defaults);var U=G.preferTrailingComment||!1,J=p(M,G.alternateCommentMode||!1),S=J.next,$=J.push,b=J.peek,v=J.skip,d=J.cmnt,A=!0,N,C,P,q="proto2",V=j,W=[],z={},H=G.keepCase?function(x){return x}:n.camelCase;function re(){W.forEach(x=>{x._edition=q,Object.keys(z).forEach(O=>{x.getOption(O)===void 0&&x.setOption(O,z[O],!0)})})}function I(x,O,R){var T=L.filename;return R||(L.filename=null),Error("illegal "+(O||"token")+" '"+x+"' ("+(T?T+", ":"")+"line "+J.line+")")}function Y(){var x=[],O;do{if((O=S())!=='"'&&O!=="'")throw I(O);x.push(S()),v(O),O=b()}while(O==='"'||O==="'");return x.join("")}function ce(x){var O=S();switch(O){case"'":case'"':return $(O),Y();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return Yr(O,!0)}catch{if(k.test(O))return O;throw I(O,"value")}}function Ae(x,O){var R,T;do if(O&&((R=b())==='"'||R==="'")){var D=Y();if(x.push(D),q>=2023)throw I(D,"id")}else try{x.push([T=ge(S()),v("to",!0)?ge(S()):T])}catch(B){if(O&&k.test(R)&&q>=2023)x.push(R);else throw B}while(v(",",!0));var F={options:void 0};F.setOption=function(B,X){this.options===void 0&&(this.options={}),this.options[B]=X},se(F,function(X){if(X==="option")oe(F,X),v(";");else throw I(X)},function(){Re(F)})}function Yr(x,O){var R=1;switch(x.charAt(0)==="-"&&(R=-1,x=x.substring(1)),x){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(l.test(x))return R*parseInt(x,10);if(m.test(x))return R*parseInt(x,16);if(E.test(x))return R*parseInt(x,8);if(y.test(x))return R*parseFloat(x);throw I(x,"number",O)}function ge(x,O){switch(x){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!O&&x.charAt(0)==="-")throw I(x,"id");if(c.test(x))return parseInt(x,10);if(g.test(x))return parseInt(x,16);if(_.test(x))return parseInt(x,8);throw I(x,"id")}function Xr(){if(N!==void 0)throw I("package");if(N=S(),!k.test(N))throw I(N,"name");V=V.define(N),v(";")}function Kr(){var x=b(),O;switch(x){case"weak":O=P||(P=[]),S();break;case"public":S();default:O=C||(C=[]);break}x=Y(),v(";"),O.push(x)}function Qr(){if(v("="),q=Y(),q<2023)throw I(q,"syntax");v(";")}function ei(){if(v("="),q=Y(),!["2023"].includes(q))throw I(q,"edition");v(";")}function ke(x,O,R){switch(R===void 0&&(R=0),O){case"option":return oe(x,O),v(";"),!0;case"message":return Mt(x,O,R+1),!0;case"enum":return qt(x,O),!0;case"service":return oi(x,O,R+1),!0;case"extend":return ui(x,O,R),!0}return!1}function se(x,O,R){var T=J.line;if(x&&(typeof x.comment!="string"&&(x.comment=d()),x.filename=L.filename),v("{",!0)){for(var D;(D=S())!=="}";)O(D);v(";",!0)}else R&&R(),v(";"),x&&(typeof x.comment!="string"||U)&&(x.comment=d(T)||x.comment)}function Mt(x,O,R){if(R===void 0&&(R=0),R>n.nestingLimit)throw Error("max depth exceeded");if(!w.test(O=S()))throw I(O,"type name");var T=new u(O);se(T,function(F){if(!ke(T,F,R))switch(F){case"map":ri(T);break;case"required":if(q!=="proto2")throw I(F);case"repeated":ne(T,F,void 0,R+1);break;case"optional":if(q==="proto3")ne(T,"proto3_optional",void 0,R+1);else{if(q!=="proto2")throw I(F);ne(T,"optional",void 0,R+1)}break;case"oneof":ii(T,F,R+1);break;case"extensions":Ae(T.extensions||(T.extensions=[]));break;case"reserved":Ae(T.reserved||(T.reserved=[]),!0);break;default:if(q==="proto2"||!k.test(F))throw I(F);$(F),ne(T,"optional",void 0,R+1);break}}),x.add(T),x===V&&W.push(T)}function ne(x,O,R,T){var D=S();if(D==="group"){ti(x,O,T);return}for(;D.endsWith(".")||b().startsWith(".");)D+=S();if(!k.test(D))throw I(D,"type");var F=S();if(!w.test(F))throw I(F,"name");F=H(F),v("=");var B=new f(F,ge(S()),D,O,R);if(se(B,function(te){if(te==="option")oe(B,te),v(";");else throw I(te)},function(){Re(B)}),O==="proto3_optional"){var X=new o("_"+F);B.setOption("proto3_optional",!0),X.add(B),x.add(X)}else x.add(B);x===V&&W.push(B)}function ti(x,O,R){if(R===void 0&&(R=0),R>n.nestingLimit)throw Error("max depth exceeded");if(q>=2023)throw I("group");var T=S();if(!w.test(T))throw I(T,"name");var D=n.lcFirst(T);T===D&&(T=n.ucFirst(T)),v("=");var F=ge(S()),B=new u(T);B.group=!0;var X=new f(D,F,T,O);X.filename=L.filename,se(B,function(te){switch(te){case"option":oe(B,te),v(";");break;case"required":case"repeated":ne(B,te,void 0,R+1);break;case"optional":q==="proto3"?ne(B,"proto3_optional",void 0,R+1):ne(B,"optional",void 0,R+1);break;case"message":Mt(B,te,R+1);break;case"enum":qt(B,te);break;case"reserved":Ae(B.reserved||(B.reserved=[]),!0);break;default:throw I(te)}}),x.add(B).add(X)}function ri(x){v("<");var O=S();if(h.mapKey[O]===void 0)throw I(O,"type");v(",");var R=S();if(!k.test(R))throw I(R,"type");v(">");var T=S();if(!w.test(T))throw I(T,"name");v("=");var D=new a(H(T),ge(S()),O,R);se(D,function(B){if(B==="option")oe(D,B),v(";");else throw I(B)},function(){Re(D)}),x.add(D)}function ii(x,O,R){if(!w.test(O=S()))throw I(O,"name");var T=new o(H(O));se(T,function(F){F==="option"?(oe(T,F),v(";")):($(F),ne(T,"optional",void 0,R))}),x.add(T)}function qt(x,O){if(!w.test(O=S()))throw I(O,"name");var R=new e(O);se(R,function(D){switch(D){case"option":oe(R,D),v(";");break;case"reserved":Ae(R.reserved||(R.reserved=[]),!0),R.reserved===void 0&&(R.reserved=[]);break;default:ni(R,D)}}),x.add(R),x===V&&W.push(R)}function ni(x,O){if(!w.test(O))throw I(O,"name");v("=");var R=ge(S(),!0),T={options:void 0};T.getOption=function(D){return this.options[D]},T.setOption=function(D,F){s.prototype.setOption.call(T,D,F)},T.setParsedOption=function(){},se(T,function(F){if(F==="option")oe(T,F),v(";");else throw I(F)},function(){Re(T)}),x.add(O,R,T.comment,T.parsedOptions||T.options)}function oe(x,O){var R,T,D=!0;for(O==="option"&&(O=S());O!=="=";){if(O===null)throw I(O,"end of input");if(O==="("){var F=S();v(")"),O="("+F+")"}if(D){if(D=!1,O.includes(".")&&!O.includes("(")){var B=O.split(".");R=B[0]+".",O=B[1];continue}R=O}else T=T?T+=O:O;O=S()}var X=T?R.concat(T):R,ae=Dt(x,X);T=T&&T[0]==="."?T.slice(1):T,R=R&&R[R.length-1]==="."?R.slice(0,-1):R,si(x,R,ae,T)}function Dt(x,O,R){if(R===void 0&&(R=0),R>n.recursionLimit)throw Error("max depth exceeded");if(v("{",!0)){for(var T={};!v("}",!0);){if(!w.test(K=S()))throw I(K,"name");if(K===null)throw I(K,"end of input");var D,F=K;if(v(":",!0),b()==="{")D=Dt(x,O+"."+K,R+1);else if(b()==="["){D=[];var B;if(v("[",!0)){do B=ce(),D.push(B);while(v(",",!0));v("]"),typeof B<"u"&&Ie(x,O+"."+K,B)}}else D=ce(),Ie(x,O+"."+K,D);var X=T[F];X&&(D=[].concat(X).concat(D)),F!=="__proto__"&&(T[F]=D),v(",",!0),v(";",!0)}return T}var ae=ce();return Ie(x,O,ae),ae}function Ie(x,O,R){if(V===x&&/^features\./.test(O)){z[O]=R;return}x.setOption&&x.setOption(O,R)}function si(x,O,R,T){x.setParsedOption&&x.setParsedOption(O,R,T)}function Re(x){if(v("[",!0)){do oe(x,"option");while(v(",",!0));v("]")}return x}function oi(x,O,R){if(R===void 0&&(R=0),R>n.recursionLimit)throw Error("max depth exceeded");if(!w.test(O=S()))throw I(O,"service name");var T=new i(O);se(T,function(F){if(!ke(T,F,R))if(F==="rpc")ai(T,F);else throw I(F)}),x.add(T),x===V&&W.push(T)}function ai(x,O){var R=d(),T=O;if(!w.test(O=S()))throw I(O,"name");var D=O,F,B,X,ae;if(v("("),v("stream",!0)&&(B=!0),!k.test(O=S())||(F=O,v(")"),v("returns"),v("("),v("stream",!0)&&(ae=!0),!k.test(O=S())))throw I(O);X=O,v(")");var te=new r(D,T,F,X,B,ae);te.comment=R,se(te,function(Se){if(Se==="option")oe(te,Se),v(";");else throw I(Se)}),x.add(te)}function ui(x,O,R){if(!k.test(O=S()))throw I(O,"reference");var T=O;se(null,function(F){switch(F){case"required":case"repeated":ne(x,F,T,R+1);break;case"optional":q==="proto3"?ne(x,"proto3_optional",T,R+1):ne(x,"optional",T,R+1);break;default:if(q==="proto2"||!k.test(F))throw I(F);$(F),ne(x,"optional",T,R+1);break}})}for(var K;(K=S())!==null;)switch(K){case"package":if(!A)throw I(K);Xr();break;case"import":if(!A)throw I(K);Kr();break;case"syntax":if(!A)throw I(K);Qr();break;case"edition":if(!A)throw I(K);ei();break;case"option":oe(V,K),v(";",!0);break;default:if(ke(V,K,0)){A=!1;continue}throw I(K)}return re(),L.filename=null,{package:N,imports:C,weakImports:P,root:j}}return wt}var bt,Tr;function Li(){if(Tr)return bt;Tr=1,bt=t;var p=/\/|\./;function t(f,a){p.test(f)||(f="google/protobuf/"+f+".proto",a={nested:{google:{nested:{protobuf:{nested:a}}}}}),t[f]=a}t("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var u;return t("duration",{Duration:u={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),t("timestamp",{Timestamp:u}),t("empty",{Empty:{fields:{}}}),t("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}}}}),t("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}}}}),t("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),t.get=function(a){return t[a]||null},bt}var Nr;function Mi(){if(Nr)return Fe.exports;Nr=1;var p=Fe.exports=Si();return p.build="full",p.tokenize=Zr(),p.parse=Fi(),p.common=Li(),p.Root._configure(p.Type,p.parse,p.common),Fe.exports}var Ot,kr;function qi(){return kr||(kr=1,Ot=Mi()),Ot}var ye=qi();const Q="com.google.type",xt={"google/type/calendar_period.proto":{nested:{google:{nested:{type:{options:{go_package:"google.golang.org/genproto/googleapis/type/calendarperiod;calendarperiod",java_multiple_files:!0,java_outer_classname:"CalendarPeriodProto",java_package:Q,objc_class_prefix:"GTP"},nested:{CalendarPeriod:{values:{CALENDAR_PERIOD_UNSPECIFIED:0,DAY:1,WEEK:2,FORTNIGHT:3,MONTH:4,QUARTER:5,HALF:6,YEAR:7}}},comment:'A `CalendarPeriod` represents the abstract concept of a time period that has a canonical start. Grammatically, "the start of the current `CalendarPeriod`." All calendar times begin at midnight UTC.'}}}}},"google/type/color.proto":{nested:{google:{nested:{protobufNested:{nested:{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}}}}},type:{options:{cc_enable_arenas:!0,go_package:"google.golang.org/genproto/googleapis/type/color;color",java_multiple_files:!0,java_outer_classname:"ColorProto",java_package:Q,objc_class_prefix:"GTP"},nested:{Color:{fields:{red:{type:"float",comment:`The amount of red in the color as a value in the interval.
|
|
30
|
+
@Min 0
|
|
31
|
+
@Max 1`,id:1},green:{type:"float",comment:`The amount of green in the color as a value in the interval.
|
|
32
|
+
@Min 0
|
|
33
|
+
@Max 1`,id:2},blue:{type:"float",comment:`The amount of blue in the color as a value in the interval.
|
|
34
|
+
@Min 0
|
|
35
|
+
@Max 1`,id:3},alpha:{type:"google.protobufNested.FloatValue",comment:`This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color.
|
|
36
|
+
@Min 0
|
|
37
|
+
@Max 1`,id:4}}}}}}}}},"google/type/date.proto":{nested:{google:{nested:{type:{options:{cc_enable_arenas:!0,go_package:"google.golang.org/genproto/googleapis/type/date;date",java_multiple_files:!0,java_outer_classname:"DateProto",java_package:Q,objc_class_prefix:"GTP"},nested:{Date:{fields:{year:{type:"int32",comment:`Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year
|
|
38
|
+
@Min 0
|
|
39
|
+
@Max 9999`,id:1},month:{type:"int32",comment:`Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
|
|
40
|
+
@Min 0
|
|
41
|
+
@Max 12`,id:2},day:{type:"int32",comment:`Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
|
|
42
|
+
@Min 0
|
|
43
|
+
@Max 31`,id:3}}}}}}}}},"google/type/datetime.proto":{nested:{google:{nested:{protobufNested:{nested:{Duration:{fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}},type:{options:{cc_enable_arenas:!0,go_package:"google.golang.org/genproto/googleapis/type/datetime;datetime",java_multiple_files:!0,java_outer_classname:"DateTimeProto",java_package:Q,objc_class_prefix:"GTP"},nested:{DateTime:{oneofs:{timeOffset:{oneof:["utcOffset","timeZone"]}},fields:{year:{type:"int32",comment:`Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year
|
|
44
|
+
@Min 0
|
|
45
|
+
@Max 9999`,id:1},month:{type:"int32",comment:`Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
|
|
46
|
+
@Min 0
|
|
47
|
+
@Max 12`,id:2},day:{type:"int32",comment:`Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
|
|
48
|
+
@Min 0
|
|
49
|
+
@Max 31`,id:3},hours:{type:"int32",comment:`Hours of day in 24 hour format.
|
|
50
|
+
@Min 0
|
|
51
|
+
@Max 23`,id:4},minutes:{type:"int32",comment:`Minutes of hour of day.
|
|
52
|
+
@Min 0
|
|
53
|
+
@Max 59`,id:5},seconds:{type:"int32",comment:`Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.
|
|
54
|
+
@Min 0
|
|
55
|
+
@Max 60`,id:6},nanos:{type:"int32",comment:`Fractions of seconds in nanoseconds.
|
|
56
|
+
@Min 0
|
|
57
|
+
@Max 999999999`,id:7},utcOffset:{type:"google.protobufNested.Duration",id:8},timeZone:{type:"TimeZone",id:9}}},TimeZone:{fields:{id:{type:"string",comment:"IANA Time Zone Database time zone. @Example: America/New_York",id:1},version:{type:"string",comment:"IANA Time Zone Database version number. @Example: 2019a",id:2}}}}}}}}},"google/type/dayofweek.proto":{nested:{google:{nested:{type:{options:{go_package:"google.golang.org/genproto/googleapis/type/dayofweek;dayofweek",java_multiple_files:!0,java_outer_classname:"DayOfWeekProto",java_package:Q,objc_class_prefix:"GTP"},nested:{DayOfWeek:{values:{DAY_OF_WEEK_UNSPECIFIED:0,MONDAY:1,TUESDAY:2,WEDNESDAY:3,THURSDAY:4,FRIDAY:5,SATURDAY:6,SUNDAY:7}}}}}}}},"google/type/decimal.proto":{nested:{google:{nested:{type:{options:{cc_enable_arenas:!0,go_package:"google.golang.org/genproto/googleapis/type/decimal;decimal",java_multiple_files:!0,java_outer_classname:"DecimalProto",java_package:Q,objc_class_prefix:"GTP"},nested:{Decimal:{fields:{value:{type:"string",comment:"A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's [BigDecimal][] or Python's [decimal.Decimal][].\n\nThe string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits (\"the integer\"), optionally followed by a fraction, optionally followed by an exponent.\n\nThe fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand.\n\nServices **should** normalize decimal values before storing them by:\n- Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`).\n- Replacing a zero-length integer value with `0` (`.5` -> `0.5`).\n- Coercing the exponent character to lower-case (`2.5E8` -> `2.5e8`).\n- Removing an explicitly-provided zero exponent (`2.5e0` -> `2.5`).\n@Example 2.5e8\n@Example -2.5e8\n@Example 2.5",id:1}}}}}}}}},"google/type/expr.proto":{nested:{google:{nested:{type:{options:{go_package:"google.golang.org/genproto/googleapis/type/expr;expr",java_multiple_files:!0,java_outer_classname:"ExprProto",java_package:Q,objc_class_prefix:"GTP"},nested:{Expr:{fields:{expression:{type:"string",comment:`Textual representation of an expression in Common Expression Language syntax
|
|
58
|
+
@Example 'New message received at ' + string(document.create_time)
|
|
59
|
+
@Example document.type != 'private' && document.type != 'internal'`,id:1},title:{type:"string",comment:`Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression
|
|
60
|
+
@Example Notification string
|
|
61
|
+
@Example Public documents`,id:2},description:{type:"string",comment:`Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
|
|
62
|
+
@Example Determine whether the document should be publicly visible
|
|
63
|
+
@Example Create a notification string with a timestamp.`,id:3},location:{type:"string",comment:"String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.",id:4}},comment:"Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec."}}}}}}},"google/type/fraction.proto":{nested:{google:{nested:{type:{options:{go_package:"google.golang.org/genproto/googleapis/type/fraction;fraction",java_multiple_files:!0,java_outer_classname:"FractionProto",java_package:Q,objc_class_prefix:"GTP"},nested:{Fraction:{fields:{numerator:{type:"int64",comment:"The numerator in the fraction, e.g. 2 in 2/3.",id:1},denominator:{type:"int64",comment:"The value by which the numerator is divided, e.g. 3 in 2/3.",id:2}}}}}}}}},"google/type/interval.proto":{nested:{google:{nested:{protobufNested:{nested:{Timestamp:{fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}},type:{options:{cc_enable_arenas:!0,go_package:"google.golang.org/genproto/googleapis/type/interval;interval",java_multiple_files:!0,java_outer_classname:"IntervalProto",java_package:Q,objc_class_prefix:"GTP"},nested:{Interval:{fields:{startTime:{type:"google.protobufNested.Timestamp",comment:"If specified, a Timestamp matching this interval will have to be the same or after the start.",id:1},endTime:{type:"google.protobufNested.Timestamp",comment:"If specified, a Timestamp matching this interval will have to be before the end.",id:2}}}}}}}}},"google/type/latlng.proto":{nested:{google:{nested:{type:{options:{cc_enable_arenas:!0,go_package:"google.golang.org/genproto/googleapis/type/latlng;latlng",java_multiple_files:!0,java_outer_classname:"LatLngProto",java_package:Q,objc_class_prefix:"GTP"},nested:{LatLng:{fields:{latitude:{type:"double",comment:`The latitude in degrees.
|
|
64
|
+
@Min -90
|
|
65
|
+
@Max +90`,id:1},longitude:{type:"double",comment:`The longitude in degrees.
|
|
66
|
+
@Min -180
|
|
67
|
+
@Max +180`,id:2}},comment:'An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this must conform to the <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84 standard</a>. Values must be within normalized ranges.'}}}}}}},"google/type/localized_text.proto":{nested:{google:{nested:{type:{options:{cc_enable_arenas:!0,go_package:"google.golang.org/genproto/googleapis/type/localized_text;localized_text",java_multiple_files:!0,java_outer_classname:"LocalizedTextProto",java_package:Q,objc_class_prefix:"GTP"},nested:{LocalizedText:{fields:{text:{type:"string",comment:"Localized string in the language corresponding to 'language_code'",id:1},languageCode:{type:"string",comment:`The text's BCP-47 language code, such as "en-US" or "sr-Latn".
|
|
68
|
+
@Example en-US
|
|
69
|
+
@Example sr-Latn`,id:2}},comment:"Localized variant of a text in a particular language."}}}}}}},"google/type/money.proto":{nested:{google:{nested:{type:{options:{cc_enable_arenas:!0,go_package:"google.golang.org/genproto/googleapis/type/money;money",java_multiple_files:!0,java_outer_classname:"MoneyProto",java_package:Q,objc_class_prefix:"GTP"},nested:{Money:{fields:{currencyCode:{type:"string",comment:`The three-letter currency code defined in ISO 4217.
|
|
70
|
+
@Example USD
|
|
71
|
+
@Example EUR`,id:1},units:{type:"int64",comment:"The whole units of the amount.",id:2},nanos:{type:"int32",comment:"Number of nano (10^-9) units of the amount",id:3}},comment:"Represents an amount of money with its currency type."}}}}}}},"google/type/month.proto":{nested:{google:{nested:{type:{options:{go_package:"google.golang.org/genproto/googleapis/type/month;month",java_multiple_files:!0,java_outer_classname:"MonthProto",java_package:Q,objc_class_prefix:"GTP"},nested:{Month:{values:{MONTH_UNSPECIFIED:0,JANUARY:1,FEBRUARY:2,MARCH:3,APRIL:4,MAY:5,JUNE:6,JULY:7,AUGUST:8,SEPTEMBER:9,OCTOBER:10,NOVEMBER:11,DECEMBER:12}}}}}}}},"google/type/phone_number.proto":{nested:{google:{nested:{type:{options:{cc_enable_arenas:!0,go_package:"google.golang.org/genproto/googleapis/type/phone_number;phone_number",java_multiple_files:!0,java_outer_classname:"PhoneNumberProto",java_package:Q,objc_class_prefix:"GTP"},nested:{PhoneNumber:{oneofs:{kind:{oneof:["e164Number","shortCode"]}},fields:{e164Number:{type:"string",id:1},shortCode:{type:"ShortCode",id:2},extension:{type:"string",id:3}},nested:{ShortCode:{fields:{regionCode:{type:"string",id:1},number:{type:"string",id:2}}}}}}}}}}},"google/type/postal_address.proto":{nested:{google:{nested:{type:{options:{cc_enable_arenas:!0,go_package:"google.golang.org/genproto/googleapis/type/postaladdress;postaladdress",java_multiple_files:!0,java_outer_classname:"PostalAddressProto",java_package:Q,objc_class_prefix:"GTP"},nested:{PostalAddress:{fields:{revision:{type:"int32",comment:`The schema revision of the \`PostalAddress\`. This must be set to 0, which is the latest revision.
|
|
72
|
+
@Min 0
|
|
73
|
+
@Max 0
|
|
74
|
+
@Default 0`,id:1},regionCode:{type:"string",comment:`CLDR region code of the country/region of the address. This is never inferred and it is up to the user to ensure the value is correct. See http://cldr.unicode.org/ and http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details.
|
|
75
|
+
@Example CH`,id:2},languageCode:{type:"string",comment:`BCP-47 language code of the contents of this address (if known). This is often the UI language of the input form or is expected to match one of the languages used in the address country/region, or their transliterated equivalents. This can affect formatting in certain countries, but is not critical to the correctness of the data and will never affect any validation or other non-formatting related operations.
|
|
76
|
+
@Example zh-Hant
|
|
77
|
+
@Example ja
|
|
78
|
+
@Example ja-Latn
|
|
79
|
+
@Example en`,id:3},postalCode:{type:"string",comment:`Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (e.g. state/zip validation in the U.S.A.).
|
|
80
|
+
@Example 3600`,id:4},sortingCode:{type:"string",comment:`Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number alone, representing the "sector code" (Jamaica), "delivery area indicator" (Malawi) or "post office indicator" (e.g. Côte d'Ivoire).
|
|
81
|
+
@Example CEDEX 7`,id:5},administrativeArea:{type:"string",comment:`Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community (e.g. "Barcelona" and not "Catalonia"). Many countries don't use an administrative area in postal addresses. E.g. in Switzerland this should be left unpopulated.`,id:6},locality:{type:"string",comment:"Generally refers to the city/town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world where localities are not well defined or do not fit into this structure well, leave locality empty and use address_lines.",id:7},sublocality:{type:"string",comment:"Sublocality of the address. For example, this can be neighborhoods, boroughs, districts.",id:8},addressLines:{rule:"repeated",type:"string",comment:'Unstructured address lines describing the lower levels of an address. Because values in address_lines do not have type information and may sometimes contain multiple values in a single field (e.g. "Austin, TX")',id:9},recipients:{rule:"repeated",type:"string",comment:'The recipient at the address. This field may, under certain circumstances, contain multiline information. For example, it might contain "care of" information.',id:10},organization:{type:"string",comment:"The name of the organization at the address.",id:11}},comment:"Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains)."}}}}}}},"google/type/quaternion.proto":{nested:{google:{nested:{type:{options:{cc_enable_arenas:!0,go_package:"google.golang.org/genproto/googleapis/type/quaternion;quaternion",java_multiple_files:!0,java_outer_classname:"QuaternionProto",java_package:Q,objc_class_prefix:"GTP"},nested:{Quaternion:{fields:{x:{type:"double",id:1},y:{type:"double",id:2},z:{type:"double",id:3},w:{type:"double",id:4}}}},comment:"A quaternion is defined as the quotient of two directed lines in a three-dimensional space or equivalently as the quotient of two Euclidean vectors (https://en.wikipedia.org/wiki/Quaternion)."}}}}},"google/type/timeofday.proto":{nested:{google:{nested:{type:{options:{cc_enable_arenas:!0,go_package:"google.golang.org/genproto/googleapis/type/timeofday;timeofday",java_multiple_files:!0,java_outer_classname:"TimeOfDayProto",java_package:Q,objc_class_prefix:"GTP"},nested:{TimeOfDay:{fields:{hours:{type:"int32",id:1},minutes:{type:"int32",id:2},seconds:{type:"int32",id:3},nanos:{type:"int32",id:4}}}}}}}}},"validate/validate.proto":{},"buf/validate/validate.proto":{}};class Di{static isAbsolute(t){return/^(?:\/|\w+:|\\\\\w+)/.test(t)}static normalize(t){const u=t.substring(0,2);let f="";u==="\\\\"&&(f=u,t=t.substring(2)),t=t.replace(/\\/g,"/").replace(/\/{2,}/g,"/");const a=t.split("/"),o=this.isAbsolute(t);let e="";o&&(e=`${a.shift()}/`);for(let i=0;i<a.length;)a[i]===".."?i>0&&a[i-1]!==".."?a.splice(--i,2):o?a.splice(i,1):++i:a[i]==="."?a.splice(i,1):++i;return f+e+a.join("/")}static resolve(t,u,f=!1){return f||(u=this.normalize(u)),this.isAbsolute(u)?u:(f||(t=this.normalize(t)),(t=t.replace(/(?:\/|^)[^/]+$/,"")).length?this.normalize(`${t}/${u}`):u)}}const ie=class ie{static withoutRangeLimits(t){const u={};for(const f of Object.keys(t)){const a={...t[f]};delete a.minimum,delete a.maximum,u[f]=a}return u}};le(ie,"MAX_SAFE_INTEGER",Math.pow(2,53)-1),le(ie,"MIN_SAFE_INTEGER",-ie.MAX_SAFE_INTEGER),le(ie,"PRIMITIVE_TYPES_WITH_LIMITS",{bytes:{type:"string",format:"bytes","x-primitive":"bytes"},string:{type:"string","x-primitive":"string"},bool:{type:"boolean","x-primitive":"bool"},int32:{type:"integer",format:"int32",minimum:-2147483648,maximum:2147483647,"x-primitive":"int32"},sint32:{type:"integer",format:"sint32",minimum:-2147483648,maximum:2147483647,"x-primitive":"sint32"},uint32:{type:"integer",format:"uint32",minimum:0,maximum:4294967295,"x-primitive":"uint32"},int64:{type:"integer",format:"int64",minimum:ie.MIN_SAFE_INTEGER,maximum:ie.MAX_SAFE_INTEGER,"x-primitive":"int64"},sint64:{type:"integer",format:"sint64",minimum:ie.MIN_SAFE_INTEGER,maximum:ie.MAX_SAFE_INTEGER,"x-primitive":"sint64"},uint64:{type:"integer",format:"uint64",minimum:0,maximum:ie.MAX_SAFE_INTEGER,"x-primitive":"uint64"},fixed32:{type:"number",format:"fixed32","x-primitive":"fixed32"},fixed64:{type:"number",format:"fixed64","x-primitive":"fixed64"},sfixed32:{type:"number",format:"sfixed32","x-primitive":"sfixed32"},sfixed64:{type:"number",format:"sfixed64","x-primitive":"sfixed64"},float:{type:"number",format:"float","x-primitive":"float"},double:{type:"number",format:"double","x-primitive":"double"}}),le(ie,"PRIMITIVE_TYPES_MINIMAL",ie.withoutRangeLimits(ie.PRIMITIVE_TYPES_WITH_LIMITS));let Oe=ie;const Gr="(buf.validate.field)",Ir=p=>typeof p=="object"&&p!==null&&!Array.isArray(p);function Sr(p,t){const u=Ft(t,Gr);u!==null&&Lt(u,p)}function Ft(p,t){const u=p.parsedOptions;if(u&&!Array.isArray(u)&&u[t])return u[t];if(u&&Array.isArray(u)){for(const f of u)if(f[t])return f[t]}return null}function Lt(p,t){for(const[u,f]of Object.entries(p))switch(u){case"float":case"double":case"int32":case"int64":case"uint32":case"uint64":case"sint32":case"sint64":case"fixed32":case"fixed64":case"sfixed32":case"sfixed64":ve.handle(t,f);break;case"bool":Ci.handle(t,f);break;case"string":case"bytes":Z.handle(t,f);break;case"repeated":xe.handle(t,f);break}}class ve{static handle(t,u){for(const[f,a]of Object.entries(u))switch(f){case"const":de.constValue(t,a);break;case"lt":ve.lessThan(t,a);break;case"lte":ve.lessEqualThan(t,a);break;case"gt":ve.greaterThan(t,a);break;case"gte":ve.greaterEqualThan(t,a);break;case"ignore_empty":break;case"in":de.inArray(t,a);break;case"not_in":de.notInArray(t,a);break}}static lessThan(t,u){delete t.maximum,t.exclusiveMaximum=u}static lessEqualThan(t,u){t.maximum=u}static greaterThan(t,u){delete t.minimum,t.exclusiveMinimum=u}static greaterEqualThan(t,u){t.minimum=u}}class Ci{static handle(t,u){for(const[f,a]of Object.entries(u))switch(f){case"const":de.constValue(t,a);break}}}class Z{static handle(t,u){for(const[f,a]of Object.entries(u))switch(f){case"const":de.constValue(t,a);break;case"in":de.inArray(t,a);break;case"not_in":de.notInArray(t,a);break;case"len":Z.len(t,a);break;case"min_len":Z.minLen(t,a);break;case"max_len":Z.maxLen(t,a);break;case"len_bytes":Z.len(t,a);break;case"min_bytes":Z.minLen(t,a);break;case"max_bytes":Z.maxLen(t,a);break;case"pattern":Z.pattern(t,a);break;case"prefix":Z.prefix(t,a);break;case"contains":Z.contains(t,a);break;case"not_contains":Z.notContains(t,a);break;case"suffix":Z.suffix(t,a);break;case"email":a&&Z.email(t);break;case"address":a&&Z.address(t);break;case"hostname":a&&Z.hostname(t);break;case"ip":a&&Z.ip(t);break;case"ipv4":a&&Z.ipv4(t);break;case"ipv6":a&&Z.ipv6(t);break;case"uri":a&&Z.uri(t);break;case"uri_ref":a&&Z.uriRef(t);break;case"uuid":a&&Z.uuid(t);break;case"well_known_regex":Z.wellKnownRegex(t,a);break}}static len(t,u){t.minLength=u,t.maxLength=u}static minLen(t,u){t.minLength=u}static maxLen(t,u){t.maxLength=u}static pattern(t,u){t.pattern=u}static prefix(t,u){t.pattern=`^${Ne(u)}.*`}static contains(t,u){t.pattern=`.*${Ne(u)}.*`}static notContains(t,u){t.pattern=`^((?!${Ne(u)}).)*$`}static suffix(t,u){t.pattern=`.*${Ne(u)}$`}static email(t){t.format="email"}static hostname(t){t.format="hostname"}static address(t){t.anyOf=[{format:"hostname"},{format:"ipv4"},{format:"ipv6"}]}static ip(t){t.anyOf=[{format:"ipv4"},{format:"ipv6"}]}static ipv4(t){t.format="ipv4"}static ipv6(t){t.format="ipv6"}static uri(t){t.format="uri"}static uriRef(t){t.format="uri-reference"}static uuid(t){t.format="uuid"}static wellKnownRegex(t,u){switch(u){case"HTTP_HEADER_NAME":t.pattern="^:?[0-9a-zA-Z!#$%&'*+-.^_|~`]+$";break;case"HTTP_HEADER_VALUE":t.pattern="^[^\\u0000-\\u0008\\u000A-\\u001F\\u007F]*$";break}}}class xe{static handle(t,u){for(const[f,a]of Object.entries(u))switch(f){case"min_items":xe.minLen(t,a);break;case"max_items":xe.maxLen(t,a);break;case"unique":a&&xe.unique(t);break;case"items":t.items&&Lt(a,t.items);break}}static minLen(t,u){t.minItems=u}static maxLen(t,u){t.maxItems=u}static unique(t){t.uniqueItems=!0}}class de{static constValue(t,u){t.const=u,delete t.maximum,delete t.minimum}static inArray(t,u){if(!Array.isArray(u))throw new Error(`Expect value to be an array: ${u}`);t.oneOf=u.map(f=>({const:f}))}static notInArray(t,u){if(!Array.isArray(u))throw new Error(`Expect value to be an array: ${u}`);t.not={oneOf:u.map(f=>({const:f}))}}}function Pi(p){const t=Ft(p,Gr);if(t!==null){for(const[u,f]of Object.entries(t))if(Ir(f)){if(u==="repeated"){if(Ir(f.items)){for(const[a,o]of Object.entries(f.items))if(a==="ignore_empty"&&o)return!0}}else for(const[a,o]of Object.entries(f))if(a==="ignore_empty"&&o)return!0}}return!1}function Ne(p){return p.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const Bi="(validate.rules)";function Fr(p,t){const u=Ft(t,Bi);u!==null&&Lt(u,p)}const Lr="root",Mr="@RootNode",ji="@Option",qr="@Example",Dr="@Default",Cr=ye.common;class $i{constructor(t){le(this,"root",new ye.Root);le(this,"proto3");le(this,"protoParseOptions",{keepCase:!0,alternateCommentMode:!0});le(this,"mapperOptions",{primitiveTypesWithLimits:!0});this.proto3=/syntax\s*=\s*['"]proto3['"]/.test(t),this.parseOptionsAnnotation(t),this.process(Lr,t)}parseOptionsAnnotation(t){const u=/(\/\/|\*)\s*@Option\s+(?<key>\w{1,50})\s+(?<value>\S[^\r\n]{0,199})/g;let f;for(;(f=u.exec(t))!==null&&(f.index===u.lastIndex&&u.lastIndex++,f.groups!==void 0);)f.groups.value==="true"?this.mapperOptions[f.groups.key]=!0:f.groups.value==="false"?this.mapperOptions[f.groups.key]=!1:this.mapperOptions[f.groups.key]=f.groups.value}process(t,u){if(typeof u!="string")this.root.setOptions(u.options),this.root.addJSON(u.nested);else{ye.parse.filename=t;const f=ye.parse(u,this.root,this.protoParseOptions);let a=0;if(f.imports)for(;a<f.imports.length;++a)this.fetch(f.imports[a],t,!1);if(f.weakImports)for(a=0;a<f.weakImports.length;++a)this.fetch(f.weakImports[a],t,!0)}}getBundledFileName(t){if(t==="validate/validate.proto"||t==="/validate/validate.proto")return"validate/validate.proto";if(t==="buf/validate/validate.proto"||t==="/buf/validate/validate.proto")return"buf/validate/validate.proto";let u=t.lastIndexOf("google/protobuf/");if(u>-1){const f=t.substring(u);if(f in Cr)return f}if(u=t.lastIndexOf("google/type/"),u>-1){const f=t.substring(u);if(f in xt)return f}return null}fetch(t,u,f){const a=this.getBundledFileName(t)||t;if(this.root.files.indexOf(a)>-1)return;this.root.files.push(a);const o=Cr[a];if(o!==void 0){this.process(a,o);return}if(a in xt){this.process(a,xt[a]);return}const e=Di.resolve(u,a);if(!f)throw new Error(`Imports are currently not implemented. Can not load: ${e} defined in as ${t} in ${u}`)}compile(){this.root.resolveAll();const t=this.resolveByFilename(Lr,this.root.nested),u=this.findRootItem(t);return this.compileMessage(u,[])}resolveByFilename(t,u){const f=[];for(const a in u){const o=u[a];o.filename===t&&o instanceof ye.Type&&f.push(o);const e=o.nested;e&&f.push(...this.resolveByFilename(t,e))}return f}findRootItem(t){var o;const u=new Map;for(const e of t)for(const i in e.fields)u.has(e.fields[i].type)?(o=u.get(e.fields[i].type))==null||o.add(e.name):u.set(e.fields[i].type,new Set([e.name]));const f=[];for(const e of t){const i=u.get(e.name);i&&((i==null?void 0:i.size)>1||!i.has(e.name))||f.push(e)}if(f.length<1)throw new Error("Not found a root proto messages");if(f.length===1)return f[0];for(const e of f)if(e.comment&&e.comment.indexOf(Mr)!==-1)return e;const a=f.map(e=>e.name).join(", ");throw new Error(`Found more than one root proto messages: ${a}`)}isProto3(){return this.proto3}isProto3Required(t){var u;return Pi(t)?!1:((u=t.options)==null?void 0:u.proto3_optional)!==!0&&this.isProto3()}hasRequiredAnnotation(t){return t!==null&&/@Required\b/i.test(t)}compileMessage(t,u){var i,r;const f={},a={title:t.name,type:"object",required:[],properties:f},o=this.extractDescription(t.comment);if(o!==null&&o.length>0&&(a.description=o),u.filter(s=>s===t.name).length>=2)return a;u.push(t.name);for(const s in t.fields){const h=t.fields[s];if(!(h.partOf&&h.partOf.oneof.length>1))if((h.required||this.isProto3Required(h)||this.hasRequiredAnnotation(h.comment))&&((i=a.required)==null||i.push(s)),h.repeated){f[h.name]={type:"array",items:this.compileField(h,t,u.slice())};const n=this.extractDescription(h.comment);if(n!==null&&n.length>0&&(f[h.name].description=n),h.comment){const l=/@MinItems\s(\d+)/i,c=/@MaxItems\s(\d+)/i;let m;(m=l.exec(h.comment))!==null&&(f[h.name].minItems=Number.parseInt(m[1],10)),(m=c.exec(h.comment))!==null&&(f[h.name].maxItems=Number.parseInt(m[1],10))}Fr(f[h.name],h),Sr(f[h.name],h)}else f[h.name]=this.compileField(h,t,u.slice())}for(const s of t.oneofsArray){if(s.fieldsArray.length<2)continue;f[s.name]||(f[s.name]={oneOf:[]});const h=f[s.name].oneOf;for(const n of s.oneof){const l=this.compileField(t.fields[n],t,u.slice());l["x-oneof-item"]=n,h.push(l)}}return(((r=a.required)==null?void 0:r.length)??0)<1&&delete a.required,a}compileEnum(t){const u={};for(const a of Object.keys(t.values))u[a]=t.values[a];const f={title:t.name,type:"string",enum:Object.keys(t.values),"x-enum-mapping":u};return this.addDefaultFromCommentAnnotations(f,t.comment),f}compileField(t,u,f){let a={};if(Oe.PRIMITIVE_TYPES_WITH_LIMITS[t.type.toLowerCase()])a=this.mapperOptions.primitiveTypesWithLimits?Object.assign(a,Oe.PRIMITIVE_TYPES_WITH_LIMITS[t.type.toLowerCase()]):Object.assign(a,Oe.PRIMITIVE_TYPES_MINIMAL[t.type.toLowerCase()]),a["x-primitive"]=t.type;else{const i=u.lookupTypeOrEnum(t.type);if(!i)throw new Error(`Unable to resolve type "${t.type}" @ ${u.fullName}`);i instanceof ye.Enum?a=Object.assign(a,this.compileEnum(i)):a=Object.assign(a,this.compileMessage(i,f)),t.type&&(a["x-type"]=t.type)}this.addValidatorFromCommentAnnotations(a,t.comment),this.addDefaultFromCommentAnnotations(a,t.comment),t.repeated||(Fr(a,t),Sr(a,t));const o=this.extractDescription(t.comment);o!==null&&o.length>0&&(a.description?a.description=`${o}
|
|
82
|
+
${a.description}`.trim():a.description=o);const e=this.extractExamples(t.comment);return e!==null&&(a.examples=e),a}extractDescription(t){return!t||(t==null?void 0:t.length)<1||(t=t.replace(new RegExp(`\\s{0,15}${qr}\\s{0,15}(.+)`,"ig"),"").replace(new RegExp(`\\s{0,15}${Dr}\\s{0,15}(.+)`,"ig"),"").replace(new RegExp(`\\s{0,15}${ji}\\s{0,15}(.+)`,"ig"),"").replace(new RegExp(`\\s{0,15}${Mr}`,"ig"),"").replace(/\s{0,15}@Required/gi,"").replace(/\s{0,15}@Pattern\s{0,15}[^\r\n]{1,200}/gi,"").replace(/\s{0,15}@(Min|Max|Minimum|Maximum|ExclusiveMinimum|ExclusiveMaximum|MultipleOf|MaxLength|MinLength|MaxItems|MinItems)\s{0,15}[\d.]{1,20}/gi,"").trim(),t.length<1)?null:t}extractExamples(t){if(!t)return null;const u=[];let f;const a=new RegExp(`\\s*${qr}\\s(.+)$`,"i");for(const o of t.split(`
|
|
83
|
+
`))(f=a.exec(o))!==null&&u.push(Pr(f[1].trim()));return u.length<1?null:u}addValidatorFromCommentAnnotations(t,u){if(u===null||(u==null?void 0:u.length)<1)return;const f=/@Min\s([+-]?\d+(\.\d+)?)/i,a=/@Max\s([+-]?\d+(\.\d+)?)/i,o=/@Pattern\s([^\n]+)/i,e=new Map([["minimum",/@Minimum\s([+-]?\d+(\.\d+)?)/i],["maximum",/@Maximum\s([+-]?\d+(\.\d+)?)/i],["exclusiveMinimum",/@ExclusiveMinimum\s([+-]?\d+(\.\d+)?)/i],["exclusiveMaximum",/@ExclusiveMaximum\s([+-]?\d+(\.\d+)?)/i],["multipleOf",/@MultipleOf\s(\d+(\.\d+)?)/i],["maxLength",/@MaxLength\s(\d+)/i],["minLength",/@MinLength\s(\d+)/i]]);let i;(i=f.exec(u))!==null&&(t.minimum=parseFloat(i[1])),(i=a.exec(u))!==null&&(t.maximum=parseFloat(i[1])),(i=o.exec(u))!==null&&(t.pattern=i[1].trim());for(const r of e.entries())(i=r[1].exec(u))!==null&&(t[r[0]]=parseFloat(i[1]))}addDefaultFromCommentAnnotations(t,u){if(u===null||(u==null?void 0:u.length)<1)return;const f=new RegExp(`\\s*${Dr}\\s(.+)$`,"i");let a;(a=f.exec(u))!==null&&(t.default=Pr(a[1]))}}function Ui(p){return new $i(p).compile()}function Pr(p){if(p.charAt(0)==="{")try{const t=JSON.parse(p);if(t)return t}catch{}return p}exports.protoToJsonSchema=Ui;
|