easemob-websdk 5.0.1 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/im-sdk-web.iife.js +1 -1
- package/chat-client.d.ts +25 -12
- package/chunks/chat-manager-DCqgMxLm.js +2 -0
- package/chunks/chat-manager-D_KF5qM1.cjs +1 -0
- package/chunks/{common-BW2KLpvb.js → common-D_DfwSd3.js} +1 -1
- package/chunks/{group-user-info-resolver-Diqjmjyj.js → group-user-info-resolver-lEtRdWli.js} +1 -1
- package/chunks/index-BmwQgZ3E.js +1 -0
- package/chunks/index-BsIqq7LU.cjs +1 -0
- package/chunks/index-CFMcR5a_.js +1 -0
- package/chunks/index-Dvvh1nf6.cjs +1 -0
- package/chunks/light-Dg9A1Xmd.js +1 -0
- package/chunks/light-dJjIln5b.cjs +1 -0
- package/chunks/reflection-proto-codec-BerStgkC.cjs +1 -0
- package/chunks/reflection-proto-codec-CjRraw85.js +1 -0
- package/chunks/{session-list-query-DtoToipt.js → session-list-query-rynxSxtv.js} +1 -1
- package/chunks/{user-info-22jZtcSi.js → user-info-DfbCp80h.js} +1 -1
- package/index.cjs +1 -1
- package/index.js +2 -2
- package/managers/chat/index.cjs +1 -1
- package/managers/chat/index.js +1 -1
- package/managers/chat-manager.d.ts +3 -2
- package/managers/chat-thread/index.js +1 -1
- package/managers/chat-thread-manager.d.ts +3 -2
- package/managers/chatroom/index.js +1 -1
- package/managers/contact/index.cjs +1 -1
- package/managers/contact/index.js +1 -1
- package/managers/group/index.cjs +1 -1
- package/managers/group/index.js +1 -1
- package/managers/presence/index.js +1 -1
- package/managers/push/index.js +1 -1
- package/managers/user-info/index.js +1 -1
- package/package.json +1 -1
- package/rest/dns-config.d.ts +10 -2
- package/types/chat-client.d.ts +28 -3
- package/validators/chat-client.d.ts +13 -5
- package/chunks/chat-manager-5wHx7UeW.cjs +0 -1
- package/chunks/chat-manager-DdAnJpcH.js +0 -2
- package/chunks/index-BItCF8E7.cjs +0 -1
- package/chunks/index-DKksD5YM.js +0 -1
- package/chunks/index-DKmdsV1-.cjs +0 -1
- package/chunks/index-VEUtqiDw.js +0 -1
- package/chunks/reflection-proto-codec-64ocOTHU.js +0 -1
- package/chunks/reflection-proto-codec-BnQFQdZC.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e,t,r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i={exports:{}},n={},o={};function s(){if(t)return e;return t=1,e=function(e,t){var r=new Array(arguments.length-1),i=0,n=2,o=!0;for(;n<arguments.length;)r[i++]=arguments[n++];return new Promise(function(n,s){r[i]=function(e){if(o)if(o=!1,e)s(e);else{for(var t=new Array(arguments.length-1),r=0;r<t.length;)t[r++]=arguments[r];n.apply(null,t)}};try{e.apply(t||null,r)}catch(a){o&&(o=!1,s(a))}})},e}var a,u,f,l,h,p,c,d={};function y(){return c?p:(c=1,p=function(){return null})}var v,m,g,b,O,_,w,j,A,k,E,S,T,N,x={};function R(){return _||(_=1,function(){var e,t=o;function i(e,t,r){for(var i=Object.keys(t),n=0;n<i.length;++n)void 0!==e[i[n]]&&r||(e[i[n]]=t[i[n]]);return e}function n(e){function t(e,r){if(!(this instanceof t))return new t(e,r);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),r&&i(this,r)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}t.asPromise=s(),t.base64=(a||(a=1,function(){var e=d;e.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var t=new Array(64),r=new Array(123),i=0;i<64;)r[t[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;e.encode=function(e,r,i){for(var n,o=null,s=[],a=0,u=0;r<i;){var f=e[r++];switch(u){case 0:s[a++]=t[f>>2],n=(3&f)<<4,u=1;break;case 1:s[a++]=t[n|f>>4],n=(15&f)<<2,u=2;break;case 2:s[a++]=t[n|f>>6],s[a++]=t[63&f],u=0}a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),a=0)}return u&&(s[a++]=t[n],s[a++]=61,1===u&&(s[a++]=61)),o?(a&&o.push(String.fromCharCode.apply(String,s.slice(0,a))),o.join("")):String.fromCharCode.apply(String,s.slice(0,a))};var n="invalid encoding";e.decode=function(e,t,i){for(var o,s=i,a=0,u=0;u<e.length;){var f=e.charCodeAt(u++);if(61===f&&a>1)break;if(void 0===(f=r[f]))throw Error(n);switch(a){case 0:o=f,a=1;break;case 1:t[i++]=o<<2|(48&f)>>4,o=f,a=2;break;case 2:t[i++]=(15&o)<<4|(60&f)>>2,o=f,a=3;break;case 3:t[i++]=(3&o)<<6|f,a=0}}if(1===a)throw Error(n);return i-s},e.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}}()),d),t.EventEmitter=function(){if(f)return u;function e(){this._listeners={}}return f=1,u=e,e.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},e.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],i=0;i<r.length;)r[i].fn===t?r.splice(i,1):++i;return this},e.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var r=[],i=1;i<arguments.length;)r.push(arguments[i++]);for(i=0;i<t.length;)t[i].fn.apply(t[i++].ctx,r)}return this},u}(),t.float=function(){if(h)return l;function e(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),i=128===r[3];function n(e,i,n){t[0]=e,i[n]=r[0],i[n+1]=r[1],i[n+2]=r[2],i[n+3]=r[3]}function o(e,i,n){t[0]=e,i[n]=r[3],i[n+1]=r[2],i[n+2]=r[1],i[n+3]=r[0]}function s(e,i){return r[0]=e[i],r[1]=e[i+1],r[2]=e[i+2],r[3]=e[i+3],t[0]}function a(e,i){return r[3]=e[i],r[2]=e[i+1],r[1]=e[i+2],r[0]=e[i+3],t[0]}e.writeFloatLE=i?n:o,e.writeFloatBE=i?o:n,e.readFloatLE=i?s:a,e.readFloatBE=i?a:s}():function(){function o(e,t,r,i){var n=t<0?1:0;if(n&&(t=-t),0===t)e(1/t>0?0:2147483648,r,i);else if(isNaN(t))e(2143289344,r,i);else if(t>34028234663852886e22)e((n<<31|2139095040)>>>0,r,i);else if(t<11754943508222875e-54)e((n<<31|Math.round(t/1401298464324817e-60))>>>0,r,i);else{var o=Math.floor(Math.log(t)/Math.LN2);e((n<<31|o+127<<23|8388607&Math.round(t*Math.pow(2,-o)*8388608))>>>0,r,i)}}function s(e,t,r){var i=e(t,r),n=2*(i>>31)+1,o=i>>>23&255,s=8388607&i;return 255===o?s?NaN:n*(1/0):0===o?1401298464324817e-60*n*s:n*Math.pow(2,o-150)*(s+8388608)}e.writeFloatLE=o.bind(null,t),e.writeFloatBE=o.bind(null,r),e.readFloatLE=s.bind(null,i),e.readFloatBE=s.bind(null,n)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),i=128===r[7];function n(e,i,n){t[0]=e,i[n]=r[0],i[n+1]=r[1],i[n+2]=r[2],i[n+3]=r[3],i[n+4]=r[4],i[n+5]=r[5],i[n+6]=r[6],i[n+7]=r[7]}function o(e,i,n){t[0]=e,i[n]=r[7],i[n+1]=r[6],i[n+2]=r[5],i[n+3]=r[4],i[n+4]=r[3],i[n+5]=r[2],i[n+6]=r[1],i[n+7]=r[0]}function s(e,i){return r[0]=e[i],r[1]=e[i+1],r[2]=e[i+2],r[3]=e[i+3],r[4]=e[i+4],r[5]=e[i+5],r[6]=e[i+6],r[7]=e[i+7],t[0]}function a(e,i){return r[7]=e[i],r[6]=e[i+1],r[5]=e[i+2],r[4]=e[i+3],r[3]=e[i+4],r[2]=e[i+5],r[1]=e[i+6],r[0]=e[i+7],t[0]}e.writeDoubleLE=i?n:o,e.writeDoubleBE=i?o:n,e.readDoubleLE=i?s:a,e.readDoubleBE=i?a:s}():function(){function o(e,t,r,i,n,o){var s=i<0?1:0;if(s&&(i=-i),0===i)e(0,n,o+t),e(1/i>0?0:2147483648,n,o+r);else if(isNaN(i))e(0,n,o+t),e(2146959360,n,o+r);else if(i>17976931348623157e292)e(0,n,o+t),e((s<<31|2146435072)>>>0,n,o+r);else{var a;if(i<22250738585072014e-324)e((a=i/5e-324)>>>0,n,o+t),e((s<<31|a/4294967296)>>>0,n,o+r);else{var u=Math.floor(Math.log(i)/Math.LN2);1024===u&&(u=1023),e(4503599627370496*(a=i*Math.pow(2,-u))>>>0,n,o+t),e((s<<31|u+1023<<20|1048576*a&1048575)>>>0,n,o+r)}}}function s(e,t,r,i,n){var o=e(i,n+t),s=e(i,n+r),a=2*(s>>31)+1,u=s>>>20&2047,f=4294967296*(1048575&s)+o;return 2047===u?f?NaN:a*(1/0):0===u?5e-324*a*f:a*Math.pow(2,u-1075)*(f+4503599627370496)}e.writeDoubleLE=o.bind(null,t,0,4),e.writeDoubleBE=o.bind(null,r,4,0),e.readDoubleLE=s.bind(null,i,0,4),e.readDoubleBE=s.bind(null,n,4,0)}(),e}function t(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function r(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function i(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function n(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}return h=1,l=e(e)}(),t.inquire=y(),t.utf8=(v||(v=1,(e=x).length=function(e){for(var t=0,r=0,i=0;i<e.length;++i)(r=e.charCodeAt(i))<128?t+=1:r<2048?t+=2:55296==(64512&r)&&56320==(64512&e.charCodeAt(i+1))?(++i,t+=4):t+=3;return t},e.read=function(e,t,r){if(r-t<1)return"";for(var i,n=null,o=[],s=0;t<r;)(i=e[t++])<128?o[s++]=i:i>191&&i<224?o[s++]=(31&i)<<6|63&e[t++]:i>239&&i<365?(i=((7&i)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[s++]=55296+(i>>10),o[s++]=56320+(1023&i)):o[s++]=(15&i)<<12|(63&e[t++])<<6|63&e[t++],s>8191&&((n||(n=[])).push(String.fromCharCode.apply(String,o)),s=0);return n?(s&&n.push(String.fromCharCode.apply(String,o.slice(0,s))),n.join("")):String.fromCharCode.apply(String,o.slice(0,s))},e.write=function(e,t,r){for(var i,n,o=r,s=0;s<e.length;++s)(i=e.charCodeAt(s))<128?t[r++]=i:i<2048?(t[r++]=i>>6|192,t[r++]=63&i|128):55296==(64512&i)&&56320==(64512&(n=e.charCodeAt(s+1)))?(i=65536+((1023&i)<<10)+(1023&n),++s,t[r++]=i>>18|240,t[r++]=i>>12&63|128,t[r++]=i>>6&63|128,t[r++]=63&i|128):(t[r++]=i>>12|224,t[r++]=i>>6&63|128,t[r++]=63&i|128);return r-o}),x),t.pool=g?m:(g=1,m=function(e,t,r){var i=r||8192,n=i>>>1,o=null,s=i;return function(r){if(r<1||r>n)return e(r);s+r>i&&(o=e(i),s=0);var a=t.call(o,s,s+=r);return 7&s&&(s=1+(7|s)),a}}),t.LongBits=function(){if(O)return b;O=1,b=t;var e=R();function t(e,t){this.lo=e>>>0,this.hi=t>>>0}var r=t.zero=new t(0,0);r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1};var i=t.zeroHash="\0\0\0\0\0\0\0\0";t.fromNumber=function(e){if(0===e)return r;var i=e<0;i&&(e=-e);var n=e>>>0,o=(e-n)/4294967296>>>0;return i&&(o=~o>>>0,n=~n>>>0,++n>4294967295&&(n=0,++o>4294967295&&(o=0))),new t(n,o)},t.from=function(i){if("number"==typeof i)return t.fromNumber(i);if(e.isString(i)){if(!e.Long)return t.fromNumber(parseInt(i,10));i=e.Long.fromString(i)}return i.low||i.high?new t(i.low>>>0,i.high>>>0):r},t.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},t.prototype.toLong=function(t){return e.Long?new e.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var n=String.prototype.charCodeAt;return t.fromHash=function(e){return e===i?r:new t((n.call(e,0)|n.call(e,1)<<8|n.call(e,2)<<16|n.call(e,3)<<24)>>>0,(n.call(e,4)|n.call(e,5)<<8|n.call(e,6)<<16|n.call(e,7)<<24)>>>0)},t.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},t.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},t.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},t.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10},b}(),t.isNode=Boolean(void 0!==r&&r&&r.process&&r.process.versions&&r.process.versions.node),t.global=t.isNode&&r||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||o,t.emptyArray=Object.freeze?Object.freeze([]):[],t.emptyObject=Object.freeze?Object.freeze({}):{},t.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},t.isString=function(e){return"string"==typeof e||e instanceof String},t.isObject=function(e){return e&&"object"==typeof e},t.isset=t.isSet=function(e,t){var r=e[t];return!(null==r||!e.hasOwnProperty(t))&&("object"!=typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},t.Buffer=function(){try{var e=t.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(r){return null}}(),t._Buffer_from=null,t._Buffer_allocUnsafe=null,t.newBuffer=function(e){return"number"==typeof e?t.Buffer?t._Buffer_allocUnsafe(e):new t.Array(e):t.Buffer?t._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},t.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,t.Long=t.global.dcodeIO&&t.global.dcodeIO.Long||t.global.Long||t.inquire("long"),t.key2Re=/^true|false|0|1$/,t.key32Re=/^-?(?:0|[1-9][0-9]*)$/,t.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,t.longToHash=function(e){return e?t.LongBits.from(e).toHash():t.LongBits.zeroHash},t.longFromHash=function(e,r){var i=t.LongBits.fromHash(e);return t.Long?t.Long.fromBits(i.lo,i.hi,r):i.toNumber(Boolean(r))},t.merge=i,t.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},t.newError=n,t.ProtocolError=n("ProtocolError"),t.oneOfGetter=function(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=1;return function(){for(var e=Object.keys(this),r=e.length-1;r>-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},t.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},t.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},t._configure=function(){var e=t.Buffer;e?(t._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,r){return new e(t,r)},t._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):t._Buffer_from=t._Buffer_allocUnsafe=null}}()),o}function B(){if(j)return w;j=1,w=u;var e,t=R(),r=t.LongBits,i=t.base64,n=t.utf8;function o(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function s(){}function a(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function u(){this.len=0,this.head=new o(s,0,0),this.tail=this.head,this.states=null}var f=function(){return t.Buffer?function(){return(u.create=function(){return new e})()}:function(){return new u}};function l(e,t,r){t[r]=255&e}function h(e,t){this.len=e,this.next=void 0,this.val=t}function p(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function c(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}u.create=f(),u.alloc=function(e){return new t.Array(e)},t.Array!==Array&&(u.alloc=t.pool(u.alloc,t.Array.prototype.subarray)),u.prototype._push=function(e,t,r){return this.tail=this.tail.next=new o(e,t,r),this.len+=t,this},h.prototype=Object.create(o.prototype),h.prototype.fn=function(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e},u.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new h((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},u.prototype.int32=function(e){return e<0?this._push(p,10,r.fromNumber(e)):this.uint32(e)},u.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},u.prototype.uint64=function(e){var t=r.from(e);return this._push(p,t.length(),t)},u.prototype.int64=u.prototype.uint64,u.prototype.sint64=function(e){var t=r.from(e).zzEncode();return this._push(p,t.length(),t)},u.prototype.bool=function(e){return this._push(l,1,e?1:0)},u.prototype.fixed32=function(e){return this._push(c,4,e>>>0)},u.prototype.sfixed32=u.prototype.fixed32,u.prototype.fixed64=function(e){var t=r.from(e);return this._push(c,4,t.lo)._push(c,4,t.hi)},u.prototype.sfixed64=u.prototype.fixed64,u.prototype.float=function(e){return this._push(t.float.writeFloatLE,4,e)},u.prototype.double=function(e){return this._push(t.float.writeDoubleLE,8,e)};var d=t.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var i=0;i<e.length;++i)t[r+i]=e[i]};return u.prototype.bytes=function(e){var r=e.length>>>0;if(!r)return this._push(l,1,0);if(t.isString(e)){var n=u.alloc(r=i.length(e));i.decode(e,n,0),e=n}return this.uint32(r)._push(d,r,e)},u.prototype.string=function(e){var t=n.length(e);return t?this.uint32(t)._push(n.write,t,e):this._push(l,1,0)},u.prototype.fork=function(){return this.states=new a(this),this.head=this.tail=new o(s,0,0),this.len=0,this},u.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new o(s,0,0),this.len=0),this},u.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},u.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},u._configure=function(t){e=t,u.create=f(),e._configure()},w}function F(){if(S)return E;S=1,E=o;var e,t=R(),r=t.LongBits,i=t.utf8;function n(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function o(e){this.buf=e,this.pos=0,this.len=e.length}var s="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new o(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new o(e);throw Error("illegal buffer")},a=function(){return t.Buffer?function(r){return(o.create=function(r){return t.Buffer.isBuffer(r)?new e(r):s(r)})(r)}:s};function u(){var e=new r(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw n(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw n(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function f(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function l(){if(this.pos+8>this.len)throw n(this,8);return new r(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}return o.create=a(),o.prototype._slice=t.Array.prototype.subarray||t.Array.prototype.slice,o.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,n(this,10);return e}}(),o.prototype.int32=function(){return 0|this.uint32()},o.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},o.prototype.bool=function(){return 0!==this.uint32()},o.prototype.fixed32=function(){if(this.pos+4>this.len)throw n(this,4);return f(this.buf,this.pos+=4)},o.prototype.sfixed32=function(){if(this.pos+4>this.len)throw n(this,4);return 0|f(this.buf,this.pos+=4)},o.prototype.float=function(){if(this.pos+4>this.len)throw n(this,4);var e=t.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},o.prototype.double=function(){if(this.pos+8>this.len)throw n(this,4);var e=t.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},o.prototype.bytes=function(){var e=this.uint32(),r=this.pos,i=this.pos+e;if(i>this.len)throw n(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(r,i);if(r===i){var o=t.Buffer;return o?o.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,r,i)},o.prototype.string=function(){var e=this.bytes();return i.read(e,0,e.length)},o.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw n(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw n(this)}while(128&this.buf[this.pos++]);return this},o.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},o._configure=function(r){e=r,o.create=a(),e._configure();var i=t.Long?"toLong":"toNumber";t.merge(o.prototype,{int64:function(){return u.call(this)[i](!1)},uint64:function(){return u.call(this)[i](!0)},sint64:function(){return u.call(this).zzDecode()[i](!1)},fixed64:function(){return l.call(this)[i](!0)},sfixed64:function(){return l.call(this)[i](!1)}})},E}var I,P,D,L,C,J,$={};function q(){return D||(D=1,$.Service=function(){if(P)return I;P=1,I=t;var e=R();function t(t,r,i){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");e.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(r),this.responseDelimited=Boolean(i)}return(t.prototype=Object.create(e.EventEmitter.prototype)).constructor=t,t.prototype.rpcCall=function t(r,i,n,o,s){if(!o)throw TypeError("request must be specified");var a=this;if(!s)return e.asPromise(t,a,r,i,n,o);if(a.rpcImpl)try{return a.rpcImpl(r,i[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(e,t){if(e)return a.emit("error",e,r),s(e);if(null!==t){if(!(t instanceof n))try{t=n[a.responseDelimited?"decodeDelimited":"decode"](t)}catch(i){return a.emit("error",i,r),s(i)}return a.emit("data",t,r),s(null,t)}a.end(!0)})}catch(u){return a.emit("error",u,r),void setTimeout(function(){s(u)},0)}else setTimeout(function(){s(Error("already ended"))},0)},t.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this},I}()),$}function M(){return C?L:(C=1,L={})}function z(){return J||(J=1,function(){var e=n;function t(){e.util._configure(),e.Writer._configure(e.BufferWriter),e.Reader._configure(e.BufferReader)}e.build="minimal",e.Writer=B(),e.BufferWriter=function(){if(k)return A;k=1,A=r;var e=B();(r.prototype=Object.create(e.prototype)).constructor=r;var t=R();function r(){e.call(this)}function i(e,r,i){e.length<40?t.utf8.write(e,r,i):r.utf8Write?r.utf8Write(e,i):r.write(e,i)}return r._configure=function(){r.alloc=t._Buffer_allocUnsafe,r.writeBytesBuffer=t.Buffer&&t.Buffer.prototype instanceof Uint8Array&&"set"===t.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var i=0;i<e.length;)t[r++]=e[i++]}},r.prototype.bytes=function(e){t.isString(e)&&(e=t._Buffer_from(e,"base64"));var i=e.length>>>0;return this.uint32(i),i&&this._push(r.writeBytesBuffer,i,e),this},r.prototype.string=function(e){var r=t.Buffer.byteLength(e);return this.uint32(r),r&&this._push(i,r,e),this},r._configure(),A}(),e.Reader=F(),e.BufferReader=function(){if(N)return T;N=1,T=r;var e=F();(r.prototype=Object.create(e.prototype)).constructor=r;var t=R();function r(t){e.call(this,t)}return r._configure=function(){t.Buffer&&(r.prototype._slice=t.Buffer.prototype.slice)},r.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},r._configure(),T}(),e.util=R(),e.rpc=q(),e.roots=M(),e.configure=t,t()}()),n}var U,H,W,G,X={},K={exports:{}};var V,Q,Y,Z,ee,te,re,ie,ne,oe,se,ae,ue,fe,le,he={};function pe(){if(Y)return Q;Y=1,Q=u;var e=Ve();((u.prototype=Object.create(e.prototype)).constructor=u).className="Namespace";var t,r,i,n=Xe(),o=We(),s=Ke();function a(e,t){if(e&&e.length){for(var r={},i=0;i<e.length;++i)r[e[i].name]=e[i].toJSON(t);return r}}function u(t,r){e.call(this,t,r),this.nested=void 0,this._nestedArray=null,this._lookupCache={},this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0}function f(e){e._nestedArray=null,e._lookupCache={};for(var t=e;t=t.parent;)t._lookupCache={};return e}return u.fromJSON=function(e,t){return new u(e,t.options).addJSON(t.nested)},u.arrayToJSON=a,u.isReservedId=function(e,t){if(e)for(var r=0;r<e.length;++r)if("string"!=typeof e[r]&&e[r][0]<=t&&e[r][1]>t)return!0;return!1},u.isReservedName=function(e,t){if(e)for(var r=0;r<e.length;++r)if(e[r]===t)return!0;return!1},Object.defineProperty(u.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=o.toArray(this.nested))}}),u.prototype.toJSON=function(e){return o.toObject(["options",this.options,"nested",a(this.nestedArray,e)])},u.prototype.addJSON=function(e){if(e)for(var o,s=Object.keys(e),a=0;a<s.length;++a)o=e[s[a]],this.add((void 0!==o.fields?t.fromJSON:void 0!==o.values?i.fromJSON:void 0!==o.methods?r.fromJSON:void 0!==o.id?n.fromJSON:u.fromJSON)(s[a],o));return this},u.prototype.get=function(e){return this.nested&&this.nested[e]||null},u.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof i)return this.nested[e].values;throw Error("no such enum: "+e)},u.prototype.add=function(e){if(!(e instanceof n&&void 0!==e.extend||e instanceof t||e instanceof s||e instanceof i||e instanceof r||e instanceof u))throw TypeError("object must be a valid nested object");if(this.nested){var o=this.get(e.name);if(o){if(!(o instanceof u&&e instanceof u)||o instanceof t||o instanceof r)throw Error("duplicate name '"+e.name+"' in "+this);for(var a=o.nestedArray,l=0;l<a.length;++l)e.add(a[l]);this.remove(o),this.nested||(this.nested={}),e.setOptions(o.options,!0)}}else this.nested={};this.nested[e.name]=e,this instanceof t||this instanceof r||this instanceof i||this instanceof n||e._edition||(e._edition=e._defaultEdition),this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0;for(var h=this;h=h.parent;)h._needsRecursiveFeatureResolution=!0,h._needsRecursiveResolve=!0;return e.onAdd(this),f(this)},u.prototype.remove=function(t){if(!(t instanceof e))throw TypeError("object must be a ReflectionObject");if(t.parent!==this)throw Error(t+" is not a member of "+this);return delete this.nested[t.name],Object.keys(this.nested).length||(this.nested=void 0),t.onRemove(this),f(this)},u.prototype.define=function(e,t){if(o.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var r=this;e.length>0;){var i=e.shift();if(r.nested&&r.nested[i]){if(!((r=r.nested[i])instanceof u))throw Error("path conflicts with non-namespace objects")}else r.add(r=new u(i))}return t&&r.addJSON(t),r},u.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;this._resolveFeaturesRecursive(this._edition);var e=this.nestedArray,t=0;for(this.resolve();t<e.length;)e[t]instanceof u?e[t++].resolveAll():e[t++].resolve();return this._needsRecursiveResolve=!1,this},u.prototype._resolveFeaturesRecursive=function(t){return this._needsRecursiveFeatureResolution?(this._needsRecursiveFeatureResolution=!1,t=this._edition||t,e.prototype._resolveFeaturesRecursive.call(this,t),this.nestedArray.forEach(e=>{e._resolveFeaturesRecursive(t)}),this):this},u.prototype.lookup=function(e,t,r){if("boolean"==typeof t?(r=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),o.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;var i=e.join(".");if(""===e[0])return this.root.lookup(e.slice(1),t);var n=this.root._fullyQualifiedObjects&&this.root._fullyQualifiedObjects["."+i];if(n&&(!t||t.indexOf(n.constructor)>-1))return n;if((n=this._lookupImpl(e,i))&&(!t||t.indexOf(n.constructor)>-1))return n;if(r)return null;for(var s=this;s.parent;){if((n=s.parent._lookupImpl(e,i))&&(!t||t.indexOf(n.constructor)>-1))return n;s=s.parent}return null},u.prototype._lookupImpl=function(e,t){if(Object.prototype.hasOwnProperty.call(this._lookupCache,t))return this._lookupCache[t];var r=this.get(e[0]),i=null;if(r)1===e.length?i=r:r instanceof u&&(e=e.slice(1),i=r._lookupImpl(e,e.join(".")));else for(var n=0;n<this.nestedArray.length;++n)this._nestedArray[n]instanceof u&&(r=this._nestedArray[n]._lookupImpl(e,t))&&(i=r);return this._lookupCache[t]=i,i},u.prototype.lookupType=function(e){var r=this.lookup(e,[t]);if(!r)throw Error("no such type: "+e);return r},u.prototype.lookupEnum=function(e){var t=this.lookup(e,[i]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},u.prototype.lookupTypeOrEnum=function(e){var r=this.lookup(e,[t,i]);if(!r)throw Error("no such Type or Enum '"+e+"' in "+this);return r},u.prototype.lookupService=function(e){var t=this.lookup(e,[r]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},u._configure=function(e,n,o){t=e,r=n,i=o},Q}function ce(){if(ee)return Z;ee=1,Z=i;var e=Xe();((i.prototype=Object.create(e.prototype)).constructor=i).className="MapField";var t=Ge(),r=We();function i(t,i,n,o,s,a){if(e.call(this,t,i,o,void 0,void 0,s,a),!r.isString(n))throw TypeError("keyType must be a string");this.keyType=n,this.resolvedKeyType=null,this.map=!0}return i.fromJSON=function(e,t){return new i(e,t.id,t.keyType,t.type,t.options,t.comment)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return r.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},i.prototype.resolve=function(){if(this.resolved)return this;if(void 0===t.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return e.prototype.resolve.call(this)},i.d=function(e,t,n){return"function"==typeof n?n=r.decorateType(n).name:n&&"object"==typeof n&&(n=r.decorateEnum(n).name),function(o,s){r.decorateType(o.constructor).add(new i(s,e,t,n))}},Z}function de(){if(re)return te;re=1,te=r;var e=Ve();((r.prototype=Object.create(e.prototype)).constructor=r).className="Method";var t=We();function r(r,i,n,o,s,a,u,f,l){if(t.isObject(s)?(u=s,s=a=void 0):t.isObject(a)&&(u=a,a=void 0),void 0!==i&&!t.isString(i))throw TypeError("type must be a string");if(!t.isString(n))throw TypeError("requestType must be a string");if(!t.isString(o))throw TypeError("responseType must be a string");e.call(this,r,u),this.type=i||"rpc",this.requestType=n,this.requestStream=!!s||void 0,this.responseType=o,this.responseStream=!!a||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=f,this.parsedOptions=l}return r.fromJSON=function(e,t){return new r(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},r.prototype.toJSON=function(e){var r=!!e&&Boolean(e.keepComments);return t.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",r?this.comment:void 0,"parsedOptions",this.parsedOptions])},r.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),e.prototype.resolve.call(this))},te}function ye(){if(ne)return ie;ne=1,ie=n;var e=pe();((n.prototype=Object.create(e.prototype)).constructor=n).className="Service";var t=de(),r=We(),i=q();function n(t,r){e.call(this,t,r),this.methods={},this._methodsArray=null}function o(e){return e._methodsArray=null,e}return n.fromJSON=function(e,r){var i=new n(e,r.options);if(r.methods)for(var o=Object.keys(r.methods),s=0;s<o.length;++s)i.add(t.fromJSON(o[s],r.methods[o[s]]));return r.nested&&i.addJSON(r.nested),r.edition&&(i._edition=r.edition),i.comment=r.comment,i._defaultEdition="proto3",i},n.prototype.toJSON=function(t){var i=e.prototype.toJSON.call(this,t),n=!!t&&Boolean(t.keepComments);return r.toObject(["edition",this._editionToJSON(),"options",i&&i.options||void 0,"methods",e.arrayToJSON(this.methodsArray,t)||{},"nested",i&&i.nested||void 0,"comment",n?this.comment:void 0])},Object.defineProperty(n.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=r.toArray(this.methods))}}),n.prototype.get=function(t){return this.methods[t]||e.prototype.get.call(this,t)},n.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;e.prototype.resolve.call(this);for(var t=this.methodsArray,r=0;r<t.length;++r)t[r].resolve();return this},n.prototype._resolveFeaturesRecursive=function(t){return this._needsRecursiveFeatureResolution?(t=this._edition||t,e.prototype._resolveFeaturesRecursive.call(this,t),this.methodsArray.forEach(e=>{e._resolveFeaturesRecursive(t)}),this):this},n.prototype.add=function(r){if(this.get(r.name))throw Error("duplicate name '"+r.name+"' in "+this);return r instanceof t?(this.methods[r.name]=r,r.parent=this,o(this)):e.prototype.add.call(this,r)},n.prototype.remove=function(r){if(r instanceof t){if(this.methods[r.name]!==r)throw Error(r+" is not a member of "+this);return delete this.methods[r.name],r.parent=null,o(this)}return e.prototype.remove.call(this,r)},n.prototype.create=function(e,t,n){for(var o,s=new i.Service(e,t,n),a=0;a<this.methodsArray.length;++a){var u=r.lcFirst((o=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"");s[u]=r.codegen(["r","c"],r.isReserved(u)?u+"_":u)("return this.rpcCall(m,q,s,r,c)")({m:o,q:o.resolvedRequestType.ctor,s:o.resolvedResponseType.ctor})}return s},ie}function ve(){if(se)return oe;se=1,oe=t;var e=R();function t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}return t.create=function(e){return this.$type.create(e)},t.encode=function(e,t){return this.$type.encode(e,t)},t.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},t.decode=function(e){return this.$type.decode(e)},t.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},t.verify=function(e){return this.$type.verify(e)},t.fromObject=function(e){return this.$type.fromObject(e)},t.toObject=function(e,t){return this.$type.toObject(e,t)},t.prototype.toJSON=function(){return this.$type.toObject(this,e.toJSONOptions)},oe}function me(){if(ue)return ae;ue=1,ae=function(n){for(var o=r.codegen(["r","l","e"],n.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(n.fieldsArray.filter(function(e){return e.map}).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()")("if(t===e)")("break")("switch(t>>>3){"),s=0;s<n.fieldsArray.length;++s){var a=n._fieldsArray[s].resolve(),u=a.resolvedType instanceof e?"int32":a.type,f="m"+r.safeProp(a.name);o("case %i: {",a.id),a.map?(o("if(%s===util.emptyObject)",f)("%s={}",f)("var c2 = r.uint32()+r.pos"),void 0!==t.defaults[a.keyType]?o("k=%j",t.defaults[a.keyType]):o("k=null"),void 0!==t.defaults[u]?o("value=%j",t.defaults[u]):o("value=null"),o("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",a.keyType)("case 2:"),void 0===t.basic[u]?o("value=types[%i].decode(r,r.uint32())",s):o("value=r.%s()",u),o("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==t.long[a.keyType]?o('%s[typeof k==="object"?util.longToHash(k):k]=value',f):o("%s[k]=value",f)):a.repeated?(o("if(!(%s&&%s.length))",f,f)("%s=[]",f),void 0!==t.packed[u]&&o("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",f,u)("}else"),void 0===t.basic[u]?o(a.delimited?"%s.push(types[%i].decode(r,undefined,((t&~7)|4)))":"%s.push(types[%i].decode(r,r.uint32()))",f,s):o("%s.push(r.%s())",f,u)):void 0===t.basic[u]?o(a.delimited?"%s=types[%i].decode(r,undefined,((t&~7)|4))":"%s=types[%i].decode(r,r.uint32())",f,s):o("%s=r.%s()",f,u),o("break")("}")}for(o("default:")("r.skipType(t&7)")("break")("}")("}"),s=0;s<n._fieldsArray.length;++s){var l=n._fieldsArray[s];l.required&&o("if(!m.hasOwnProperty(%j))",l.name)("throw util.ProtocolError(%j,{instance:m})",i(l))}return o("return m")};var e=Qe(),t=Ge(),r=We();function i(e){return"missing required '"+e.name+"'"}return ae}function ge(){if(le)return fe;le=1,fe=function(e){var o=t.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),s=e.oneofsArray,a={};s.length&&o("var p={}");for(var u=0;u<e.fieldsArray.length;++u){var f=e._fieldsArray[u].resolve(),l="m"+t.safeProp(f.name);if(f.optional&&o("if(%s!=null&&m.hasOwnProperty(%j)){",l,f.name),f.map)o("if(!util.isObject(%s))",l)("return%j",r(f,"object"))("var k=Object.keys(%s)",l)("for(var i=0;i<k.length;++i){"),n(o,f,"k[i]"),i(o,f,u,l+"[k[i]]")("}");else if(f.repeated)o("if(!Array.isArray(%s))",l)("return%j",r(f,"array"))("for(var i=0;i<%s.length;++i){",l),i(o,f,u,l+"[i]")("}");else{if(f.partOf){var h=t.safeProp(f.partOf.name);1===a[f.partOf.name]&&o("if(p%s===1)",h)("return%j",f.partOf.name+": multiple values"),a[f.partOf.name]=1,o("p%s=1",h)}i(o,f,u,l)}f.optional&&o("}")}return o("return null")};var e=Qe(),t=We();function r(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function i(t,i,n,o){if(i.resolvedType)if(i.resolvedType instanceof e){t("switch(%s){",o)("default:")("return%j",r(i,"enum value"));for(var s=Object.keys(i.resolvedType.values),a=0;a<s.length;++a)t("case %i:",i.resolvedType.values[s[a]]);t("break")("}")}else t("{")("var e=types[%i].verify(%s);",n,o)("if(e)")("return%j+e",i.name+".")("}");else switch(i.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.isInteger(%s))",o)("return%j",r(i,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",o,o,o,o)("return%j",r(i,"integer|Long"));break;case"float":case"double":t('if(typeof %s!=="number")',o)("return%j",r(i,"number"));break;case"bool":t('if(typeof %s!=="boolean")',o)("return%j",r(i,"boolean"));break;case"string":t("if(!util.isString(%s))",o)("return%j",r(i,"string"));break;case"bytes":t('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',o,o,o)("return%j",r(i,"buffer"))}return t}function n(e,t,i){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",i)("return%j",r(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",i)("return%j",r(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",i)("return%j",r(t,"boolean key"))}return e}return fe}var be,Oe={};function _e(){return be||(be=1,function(){var e=Oe,t=Qe(),r=We();function i(e,r,i,n){var o=!1;if(r.resolvedType)if(r.resolvedType instanceof t){e("switch(d%s){",n);for(var s=r.resolvedType.values,a=Object.keys(s),u=0;u<a.length;++u)s[a[u]]!==r.typeDefault||o||(e("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',n,n,n),r.repeated||e("break"),o=!0),e("case%j:",a[u])("case %i:",s[a[u]])("m%s=%j",n,s[a[u]])("break");e("}")}else e('if(typeof d%s!=="object")',n)("throw TypeError(%j)",r.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",n,i,n);else{var f=!1;switch(r.type){case"double":case"float":e("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",n,n);break;case"uint64":f=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,f)('else if(typeof d%s==="string")',n)("m%s=parseInt(d%s,10)",n,n)('else if(typeof d%s==="number")',n)("m%s=d%s",n,n)('else if(typeof d%s==="object")',n)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",n,n,n,f?"true":"");break;case"bytes":e('if(typeof d%s==="string")',n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",n,n,n)("else if(d%s.length >= 0)",n)("m%s=d%s",n,n);break;case"string":e("m%s=String(d%s)",n,n);break;case"bool":e("m%s=Boolean(d%s)",n,n)}}return e}function n(e,r,i,n){if(r.resolvedType)r.resolvedType instanceof t?e("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",n,i,n,n,i,n,n):e("d%s=types[%i].toObject(m%s,o)",n,i,n);else{var o=!1;switch(r.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",n,n,n,n);break;case"uint64":o=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',n)("d%s=o.longs===String?String(m%s):m%s",n,n,n)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",n,n,n,n,o?"true":"",n);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",n,n,n,n,n);break;default:e("d%s=m%s",n,n)}}return e}e.fromObject=function(e){var n=e.fieldsArray,o=r.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!n.length)return o("return new this.ctor");o("var m=new this.ctor");for(var s=0;s<n.length;++s){var a=n[s].resolve(),u=r.safeProp(a.name);a.map?(o("if(d%s){",u)('if(typeof d%s!=="object")',u)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",u)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",u),i(o,a,s,u+"[ks[i]]")("}")("}")):a.repeated?(o("if(d%s){",u)("if(!Array.isArray(d%s))",u)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",u)("for(var i=0;i<d%s.length;++i){",u),i(o,a,s,u+"[i]")("}")("}")):(a.resolvedType instanceof t||o("if(d%s!=null){",u),i(o,a,s,u),a.resolvedType instanceof t||o("}"))}return o("return m")},e.toObject=function(e){var i=e.fieldsArray.slice().sort(r.compareFieldsById);if(!i.length)return r.codegen()("return {}");for(var o=r.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),s=[],a=[],u=[],f=0;f<i.length;++f)i[f].partOf||(i[f].resolve().repeated?s:i[f].map?a:u).push(i[f]);if(s.length){for(o("if(o.arrays||o.defaults){"),f=0;f<s.length;++f)o("d%s=[]",r.safeProp(s[f].name));o("}")}if(a.length){for(o("if(o.objects||o.defaults){"),f=0;f<a.length;++f)o("d%s={}",r.safeProp(a[f].name));o("}")}if(u.length){for(o("if(o.defaults){"),f=0;f<u.length;++f){var l=u[f],h=r.safeProp(l.name);if(l.resolvedType instanceof t)o("d%s=o.enums===String?%j:%j",h,l.resolvedType.valuesById[l.typeDefault],l.typeDefault);else if(l.long)o("if(util.Long){")("var n=new util.Long(%i,%i,%j)",l.typeDefault.low,l.typeDefault.high,l.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",h)("}else")("d%s=o.longs===String?%j:%i",h,l.typeDefault.toString(),l.typeDefault.toNumber());else if(l.bytes){var p="["+Array.prototype.slice.call(l.typeDefault).join(",")+"]";o("if(o.bytes===String)d%s=%j",h,String.fromCharCode.apply(String,l.typeDefault))("else{")("d%s=%s",h,p)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",h,h)("}")}else o("d%s=%j",h,l.typeDefault)}o("}")}var c=!1;for(f=0;f<i.length;++f){l=i[f];var d=e._fieldsArray.indexOf(l);h=r.safeProp(l.name);l.map?(c||(c=!0,o("var ks2")),o("if(m%s&&(ks2=Object.keys(m%s)).length){",h,h)("d%s={}",h)("for(var j=0;j<ks2.length;++j){"),n(o,l,d,h+"[ks2[j]]")("}")):l.repeated?(o("if(m%s&&m%s.length){",h,h)("d%s=[]",h)("for(var j=0;j<m%s.length;++j){",h),n(o,l,d,h+"[j]")("}")):(o("if(m%s!=null&&m.hasOwnProperty(%j)){",h,l.name),n(o,l,d,h),l.partOf&&o("if(o.oneofs)")("d%s=%j",r.safeProp(l.partOf.name),l.name)),o("}")}return o("return d")}}()),Oe}var we,je,Ae,ke,Ee,Se,Te,Ne,xe,Re,Be,Fe,Ie,Pe,De,Le,Ce,Je,$e,qe,Me={};function ze(){return we||(we=1,e=Me,t=ve(),e[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),r=this.lookup(t);if(r){var i="."===e["@type"].charAt(0)?e["@type"].slice(1):e["@type"];return-1===i.indexOf("/")&&(i="/"+i),this.create({type_url:i,value:r.encode(r.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,r){var i="",n="";if(r&&r.json&&e.type_url&&e.value){n=e.type_url.substring(e.type_url.lastIndexOf("/")+1),i=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var o=this.lookup(n);o&&(e=o.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof t){var s=e.$type.toObject(e,r);return""===i&&(i="type.googleapis.com/"),n=i+("."===e.$type.fullName[0]?e.$type.fullName.slice(1):e.$type.fullName),s["@type"]=n,s}return this.toObject(e,r)}}),Me;var e,t}function Ue(){if(Ae)return je;Ae=1,je=y;var e=pe();((y.prototype=Object.create(e.prototype)).constructor=y).className="Type";var t=Qe(),r=Ke(),i=Xe(),n=ce(),o=ye(),s=ve(),a=F(),u=B(),f=We(),l=Ye(),h=me(),p=ge(),c=_e(),d=ze();function y(t,r){e.call(this,t,r),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function v(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}return Object.defineProperties(y.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var r=this.fields[e[t]],i=r.id;if(this._fieldsById[i])throw Error("duplicate id "+i+" in "+this);this._fieldsById[i]=r}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=f.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=f.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=y.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof s||((e.prototype=new s).constructor=e,f.merge(e.prototype,t)),e.$type=e.prototype.$type=this,f.merge(e,s,!0),this._ctor=e;for(var r=0;r<this.fieldsArray.length;++r)this._fieldsArray[r].resolve();var i={};for(r=0;r<this.oneofsArray.length;++r)i[this._oneofsArray[r].resolve().name]={get:f.oneOfGetter(this._oneofsArray[r].oneof),set:f.oneOfSetter(this._oneofsArray[r].oneof)};r&&Object.defineProperties(e.prototype,i)}}}),y.generateConstructor=function(e){for(var t,r=f.codegen(["p"],e.name),i=0;i<e.fieldsArray.length;++i)(t=e._fieldsArray[i]).map?r("this%s={}",f.safeProp(t.name)):t.repeated&&r("this%s=[]",f.safeProp(t.name));return r("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},y.fromJSON=function(s,a){var u=new y(s,a.options);u.extensions=a.extensions,u.reserved=a.reserved;for(var f=Object.keys(a.fields),l=0;l<f.length;++l)u.add((void 0!==a.fields[f[l]].keyType?n.fromJSON:i.fromJSON)(f[l],a.fields[f[l]]));if(a.oneofs)for(f=Object.keys(a.oneofs),l=0;l<f.length;++l)u.add(r.fromJSON(f[l],a.oneofs[f[l]]));if(a.nested)for(f=Object.keys(a.nested),l=0;l<f.length;++l){var h=a.nested[f[l]];u.add((void 0!==h.id?i.fromJSON:void 0!==h.fields?y.fromJSON:void 0!==h.values?t.fromJSON:void 0!==h.methods?o.fromJSON:e.fromJSON)(f[l],h))}return a.extensions&&a.extensions.length&&(u.extensions=a.extensions),a.reserved&&a.reserved.length&&(u.reserved=a.reserved),a.group&&(u.group=!0),a.comment&&(u.comment=a.comment),a.edition&&(u._edition=a.edition),u._defaultEdition="proto3",u},y.prototype.toJSON=function(t){var r=e.prototype.toJSON.call(this,t),i=!!t&&Boolean(t.keepComments);return f.toObject(["edition",this._editionToJSON(),"options",r&&r.options||void 0,"oneofs",e.arrayToJSON(this.oneofsArray,t),"fields",e.arrayToJSON(this.fieldsArray.filter(function(e){return!e.declaringField}),t)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",r&&r.nested||void 0,"comment",i?this.comment:void 0])},y.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;e.prototype.resolveAll.call(this);var t=this.oneofsArray;for(i=0;i<t.length;)t[i++].resolve();for(var r=this.fieldsArray,i=0;i<r.length;)r[i++].resolve();return this},y.prototype._resolveFeaturesRecursive=function(t){return this._needsRecursiveFeatureResolution?(t=this._edition||t,e.prototype._resolveFeaturesRecursive.call(this,t),this.oneofsArray.forEach(e=>{e._resolveFeatures(t)}),this.fieldsArray.forEach(e=>{e._resolveFeatures(t)}),this):this},y.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},y.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);if(t instanceof i&&void 0===t.extend){if(this._fieldsById?this._fieldsById[t.id]:this.fieldsById[t.id])throw Error("duplicate id "+t.id+" in "+this);if(this.isReservedId(t.id))throw Error("id "+t.id+" is reserved in "+this);if(this.isReservedName(t.name))throw Error("name '"+t.name+"' is reserved in "+this);return t.parent&&t.parent.remove(t),this.fields[t.name]=t,t.message=this,t.onAdd(this),v(this)}return t instanceof r?(this.oneofs||(this.oneofs={}),this.oneofs[t.name]=t,t.onAdd(this),v(this)):e.prototype.add.call(this,t)},y.prototype.remove=function(t){if(t instanceof i&&void 0===t.extend){if(!this.fields||this.fields[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.fields[t.name],t.parent=null,t.onRemove(this),v(this)}if(t instanceof r){if(!this.oneofs||this.oneofs[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.oneofs[t.name],t.parent=null,t.onRemove(this),v(this)}return e.prototype.remove.call(this,t)},y.prototype.isReservedId=function(t){return e.isReservedId(this.reserved,t)},y.prototype.isReservedName=function(t){return e.isReservedName(this.reserved,t)},y.prototype.create=function(e){return new this.ctor(e)},y.prototype.setup=function(){for(var e=this.fullName,t=[],r=0;r<this.fieldsArray.length;++r)t.push(this._fieldsArray[r].resolve().resolvedType);this.encode=l(this)({Writer:u,types:t,util:f}),this.decode=h(this)({Reader:a,types:t,util:f}),this.verify=p(this)({types:t,util:f}),this.fromObject=c.fromObject(this)({types:t,util:f}),this.toObject=c.toObject(this)({types:t,util:f});var i=d[e];if(i){var n=Object.create(this);n.fromObject=this.fromObject,this.fromObject=i.fromObject.bind(n),n.toObject=this.toObject,this.toObject=i.toObject.bind(n)}return this},y.prototype.encode=function(e,t){return this.setup().encode(e,t)},y.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},y.prototype.decode=function(e,t){return this.setup().decode(e,t)},y.prototype.decodeDelimited=function(e){return e instanceof a||(e=a.create(e)),this.decode(e,e.uint32())},y.prototype.verify=function(e){return this.setup().verify(e)},y.prototype.fromObject=function(e){return this.setup().fromObject(e)},y.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},y.d=function(e){return function(t){f.decorateType(t,e)}},je}function He(){if(Ee)return ke;Ee=1,ke=u;var e=pe();((u.prototype=Object.create(e.prototype)).constructor=u).className="Root";var t,r,i,n=Xe(),o=Qe(),s=Ke(),a=We();function u(t){e.call(this,"",t),this.deferred=[],this.files=[],this._edition="proto2",this._fullyQualifiedObjects={}}function f(){}u.fromJSON=function(e,t){return t||(t=new u),e.options&&t.setOptions(e.options),t.addJSON(e.nested).resolveAll()},u.prototype.resolvePath=a.path.resolve,u.prototype.fetch=a.fetch,u.prototype.load=function e(t,n,o){"function"==typeof n&&(o=n,n=void 0);var s=this;if(!o)return a.asPromise(e,s,t,n);var u=o===f;function l(e,t){if(o){if(u)throw e;t&&t.resolveAll();var r=o;o=null,r(e,t)}}function h(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var r=e.substring(t);if(r in i)return r}return null}function p(e,t){try{if(a.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),a.isString(t)){r.filename=e;var i,o=r(t,s,n),f=0;if(o.imports)for(;f<o.imports.length;++f)(i=h(o.imports[f])||s.resolvePath(e,o.imports[f]))&&c(i);if(o.weakImports)for(f=0;f<o.weakImports.length;++f)(i=h(o.weakImports[f])||s.resolvePath(e,o.weakImports[f]))&&c(i,!0)}else s.setOptions(t.options).addJSON(t.nested)}catch(p){l(p)}u||d||l(null,s)}function c(e,t){if(e=h(e)||e,!(s.files.indexOf(e)>-1))if(s.files.push(e),e in i)u?p(e,i[e]):(++d,setTimeout(function(){--d,p(e,i[e])}));else if(u){var r;try{r=a.fs.readFileSync(e).toString("utf8")}catch(n){return void(t||l(n))}p(e,r)}else++d,s.fetch(e,function(r,i){--d,o&&(r?t?d||l(null,s):l(r):p(e,i))})}var d=0;a.isString(t)&&(t=[t]);for(var y,v=0;v<t.length;++v)(y=s.resolvePath("",t[v]))&&c(y);return u?(s.resolveAll(),s):(d||l(null,s),s)},u.prototype.loadSync=function(e,t){if(!a.isNode)throw Error("not supported");return this.load(e,t,f)},u.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(e){return"'extend "+e.extend+"' in "+e.parent.fullName}).join(", "));return e.prototype.resolveAll.call(this)};var l=/^[A-Z]/;function h(e,t){var r=t.parent.lookup(t.extend);if(r){var i=new n(t.fullName,t.id,t.type,t.rule,void 0,t.options);return r.get(i.name)||(i.declaringField=t,t.extensionField=i,r.add(i)),!0}return!1}return u.prototype._handleAdd=function(e){if(e instanceof n)void 0===e.extend||e.extensionField||h(0,e)||this.deferred.push(e);else if(e instanceof o)l.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof s)){if(e instanceof t)for(var r=0;r<this.deferred.length;)h(0,this.deferred[r])?this.deferred.splice(r,1):++r;for(var i=0;i<e.nestedArray.length;++i)this._handleAdd(e._nestedArray[i]);l.test(e.name)&&(e.parent[e.name]=e)}(e instanceof t||e instanceof o||e instanceof n)&&(this._fullyQualifiedObjects[e.fullName]=e)},u.prototype._handleRemove=function(t){if(t instanceof n){if(void 0!==t.extend)if(t.extensionField)t.extensionField.parent.remove(t.extensionField),t.extensionField=null;else{var r=this.deferred.indexOf(t);r>-1&&this.deferred.splice(r,1)}}else if(t instanceof o)l.test(t.name)&&delete t.parent[t.name];else if(t instanceof e){for(var i=0;i<t.nestedArray.length;++i)this._handleRemove(t._nestedArray[i]);l.test(t.name)&&delete t.parent[t.name]}delete this._fullyQualifiedObjects[t.fullName]},u._configure=function(e,n,o){t=e,r=n,i=o},ke}function We(){if(Se)return K.exports;Se=1;var e,t,r,i,n,o=K.exports=R(),a=M();o.codegen=function(){if(H)return U;function e(t,r){"string"==typeof t&&(r=t,t=void 0);var i=[];function n(t){if("string"!=typeof t){var r=o();if(e.verbose&&console.log("codegen: "+r),r="return "+r,t){for(var s=Object.keys(t),a=new Array(s.length+1),u=new Array(s.length),f=0;f<s.length;)a[f]=s[f],u[f]=t[s[f++]];return a[f]=r,Function.apply(null,a).apply(null,u)}return Function(r)()}for(var l=new Array(arguments.length-1),h=0;h<l.length;)l[h]=arguments[++h];if(h=0,t=t.replace(/%([%dfijs])/g,function(e,t){var r=l[h++];switch(t){case"d":case"f":return String(Number(r));case"i":return String(Math.floor(r));case"j":return JSON.stringify(r);case"s":return String(r)}return"%"}),h!==l.length)throw Error("parameter count mismatch");return i.push(t),n}function o(e){return"function "+(e||r||"")+"("+(t&&t.join(",")||"")+"){\n "+i.join("\n ")+"\n}"}return n.toString=o,n}return H=1,U=e,e.verbose=!1,U}(),o.fetch=function(){if(G)return W;G=1,W=r;var e=s(),t=y()("fs");function r(i,n,o){return"function"==typeof n?(o=n,n={}):n||(n={}),o?!n.xhr&&t&&t.readFile?t.readFile(i,function(e,t){return e&&"undefined"!=typeof XMLHttpRequest?r.xhr(i,n,o):e?o(e):o(null,n.binary?t:t.toString("utf8"))}):r.xhr(i,n,o):e(r,this,i,n)}return r.xhr=function(e,t,r){var i=new XMLHttpRequest;i.onreadystatechange=function(){if(4===i.readyState){if(0!==i.status&&200!==i.status)return r(Error("status "+i.status));if(t.binary){var e=i.response;if(!e){e=[];for(var n=0;n<i.responseText.length;++n)e.push(255&i.responseText.charCodeAt(n))}return r(null,"undefined"!=typeof Uint8Array?new Uint8Array(e):e)}return r(null,i.responseText)}},t.binary&&("overrideMimeType"in i&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.responseType="arraybuffer"),i.open("GET",e),i.send()},W}(),o.path=(V||(V=1,i=(r=he).isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},n=r.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),r=i(e),n="";r&&(n=t.shift()+"/");for(var o=0;o<t.length;)".."===t[o]?o>0&&".."!==t[o-1]?t.splice(--o,2):r?t.splice(o,1):++o:"."===t[o]?t.splice(o,1):++o;return n+t.join("/")},r.resolve=function(e,t,r){return r||(t=n(t)),i(t)?t:(r||(e=n(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?n(e+"/"+t):t)}),he),o.fs=o.inquire("fs"),o.toArray=function(e){if(e){for(var t=Object.keys(e),r=new Array(t.length),i=0;i<t.length;)r[i]=e[t[i++]];return r}return[]},o.toObject=function(e){for(var t={},r=0;r<e.length;){var i=e[r++],n=e[r++];void 0!==n&&(t[i]=n)}return t};var u=/\\/g,f=/"/g;o.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)},o.safeProp=function(e){return!/^[$\w_]+$/.test(e)||o.isReserved(e)?'["'+e.replace(u,"\\\\").replace(f,'\\"')+'"]':"."+e},o.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var l=/_([a-z])/g;o.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(l,function(e,t){return t.toUpperCase()})},o.compareFieldsById=function(e,t){return e.id-t.id},o.decorateType=function(t,r){if(t.$type)return r&&t.$type.name!==r&&(o.decorateRoot.remove(t.$type),t.$type.name=r,o.decorateRoot.add(t.$type)),t.$type;e||(e=Ue());var i=new e(r||t.name);return o.decorateRoot.add(i),i.ctor=t,Object.defineProperty(t,"$type",{value:i,enumerable:!1}),Object.defineProperty(t.prototype,"$type",{value:i,enumerable:!1}),i};var h=0;return o.decorateEnum=function(e){if(e.$type)return e.$type;t||(t=Qe());var r=new t("Enum"+h++,e);return o.decorateRoot.add(r),Object.defineProperty(e,"$type",{value:r,enumerable:!1}),r},o.setProperty=function(e,t,r,i){if("object"!=typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return function e(t,r,n){var o=r.shift();if("__proto__"===o||"prototype"===o)return t;if(r.length>0)t[o]=e(t[o]||{},r,n);else{var s=t[o];if(s&&i)return t;s&&(n=[].concat(s).concat(n)),t[o]=n}return t}(e,t=t.split("."),r)},Object.defineProperty(o,"decorateRoot",{get:function(){return a.decorated||(a.decorated=new(He()))}}),K.exports}function Ge(){return Te||(Te=1,function(){var e=X,t=We(),r=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function i(e,t){var i=0,n={};for(t|=0;i<e.length;)n[r[i+t]]=e[i++];return n}e.basic=i([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),e.defaults=i([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",t.emptyArray,null]),e.long=i([0,0,0,1,1],7),e.mapKey=i([0,0,0,5,5,0,0,0,1,1,0,2],2),e.packed=i([1,5,0,0,0,5,5,0,0,0,1,1,0])}()),X}function Xe(){if(xe)return Ne;xe=1,Ne=s;var e=Ve();((s.prototype=Object.create(e.prototype)).constructor=s).className="Field";var t,r=Qe(),i=Ge(),n=We(),o=/^required|optional|repeated$/;function s(t,r,s,a,u,f,l){if(n.isObject(a)?(l=u,f=a,a=u=void 0):n.isObject(u)&&(l=f,f=u,u=void 0),e.call(this,t,f),!n.isInteger(r)||r<0)throw TypeError("id must be a non-negative integer");if(!n.isString(s))throw TypeError("type must be a string");if(void 0!==a&&!o.test(a=a.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==u&&!n.isString(u))throw TypeError("extend must be a string");"proto3_optional"===a&&(a="optional"),this.rule=a&&"optional"!==a?a:void 0,this.type=s,this.id=r,this.extend=u||void 0,this.repeated="repeated"===a,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!n.Long&&void 0!==i.long[s],this.bytes="bytes"===s,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.comment=l}return s.fromJSON=function(e,t){var r=new s(e,t.id,t.type,t.rule,t.extend,t.options,t.comment);return t.edition&&(r._edition=t.edition),r._defaultEdition="proto3",r},Object.defineProperty(s.prototype,"required",{get:function(){return"LEGACY_REQUIRED"===this._features.field_presence}}),Object.defineProperty(s.prototype,"optional",{get:function(){return!this.required}}),Object.defineProperty(s.prototype,"delimited",{get:function(){return this.resolvedType instanceof t&&"DELIMITED"===this._features.message_encoding}}),Object.defineProperty(s.prototype,"packed",{get:function(){return"PACKED"===this._features.repeated_field_encoding}}),Object.defineProperty(s.prototype,"hasPresence",{get:function(){return!this.repeated&&!this.map&&(this.partOf||this.declaringField||this.extensionField||"IMPLICIT"!==this._features.field_presence)}}),s.prototype.setOption=function(t,r,i){return e.prototype.setOption.call(this,t,r,i)},s.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return n.toObject(["edition",this._editionToJSON(),"rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},s.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=i.defaults[this.type])?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof t?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof r&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof r||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=n.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var o;n.base64.test(this.typeDefault)?n.base64.decode(this.typeDefault,o=n.newBuffer(n.base64.length(this.typeDefault)),0):n.utf8.write(this.typeDefault,o=n.newBuffer(n.utf8.length(this.typeDefault)),0),this.typeDefault=o}return this.map?this.defaultValue=n.emptyObject:this.repeated?this.defaultValue=n.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof t&&(this.parent.ctor.prototype[this.name]=this.defaultValue),e.prototype.resolve.call(this)},s.prototype._inferLegacyProtoFeatures=function(e){if("proto2"!==e&&"proto3"!==e)return{};var r={};if("required"===this.rule&&(r.field_presence="LEGACY_REQUIRED"),this.parent&&void 0===i.defaults[this.type]){var n=this.parent.get(this.type.split(".").pop());n&&n instanceof t&&n.group&&(r.message_encoding="DELIMITED")}return!0===this.getOption("packed")?r.repeated_field_encoding="PACKED":!1===this.getOption("packed")&&(r.repeated_field_encoding="EXPANDED"),r},s.prototype._resolveFeatures=function(t){return e.prototype._resolveFeatures.call(this,this._edition||t)},s.d=function(e,t,r,i){return"function"==typeof t?t=n.decorateType(t).name:t&&"object"==typeof t&&(t=n.decorateEnum(t).name),function(o,a){n.decorateType(o.constructor).add(new s(a,e,t,r,{default:i}))}},s._configure=function(e){t=e},Ne}function Ke(){if(Be)return Re;Be=1,Re=i;var e=Ve();((i.prototype=Object.create(e.prototype)).constructor=i).className="OneOf";var t=Xe(),r=We();function i(t,r,i,n){if(Array.isArray(r)||(i=r,r=void 0),e.call(this,t,i),void 0!==r&&!Array.isArray(r))throw TypeError("fieldNames must be an Array");this.oneof=r||[],this.fieldsArray=[],this.comment=n}function n(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}return i.fromJSON=function(e,t){return new i(e,t.oneof,t.options,t.comment)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return r.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])},i.prototype.add=function(e){if(!(e instanceof t))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,n(this),this},i.prototype.remove=function(e){if(!(e instanceof t))throw TypeError("field must be a Field");var r=this.fieldsArray.indexOf(e);if(r<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(r,1),(r=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(r,1),e.partOf=null,this},i.prototype.onAdd=function(t){e.prototype.onAdd.call(this,t);for(var r=0;r<this.oneof.length;++r){var i=t.get(this.oneof[r]);i&&!i.partOf&&(i.partOf=this,this.fieldsArray.push(i))}n(this)},i.prototype.onRemove=function(t){for(var r,i=0;i<this.fieldsArray.length;++i)(r=this.fieldsArray[i]).parent&&r.parent.remove(r);e.prototype.onRemove.call(this,t)},Object.defineProperty(i.prototype,"isProto3Optional",{get:function(){if(null==this.fieldsArray||1!==this.fieldsArray.length)return!1;var e=this.fieldsArray[0];return null!=e.options&&!0===e.options.proto3_optional}}),i.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,n){r.decorateType(t.constructor).add(new i(n,e)),Object.defineProperty(t,n,{get:r.oneOfGetter(e),set:r.oneOfSetter(e)})}},Re}function Ve(){if(Ie)return Fe;Ie=1,Fe=s,s.className="ReflectionObject";const e=Ke();var t,r=We(),i={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY"},n={enum_type:"CLOSED",field_presence:"EXPLICIT",json_format:"LEGACY_BEST_EFFORT",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"EXPANDED",utf8_validation:"NONE"},o={enum_type:"OPEN",field_presence:"IMPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY"};function s(e,t){if(!r.isString(e))throw TypeError("name must be a string");if(t&&!r.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this._edition=null,this._defaultEdition="proto2",this._features={},this._featuresResolved=!1,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}return Object.defineProperties(s.prototype,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),s.prototype.toJSON=function(){throw Error()},s.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var r=e.root;r instanceof t&&r._handleAdd(this)},s.prototype.onRemove=function(e){var r=e.root;r instanceof t&&r._handleRemove(this),this.parent=null,this.resolved=!1},s.prototype.resolve=function(){return this.resolved||this.root instanceof t&&(this.resolved=!0),this},s.prototype._resolveFeaturesRecursive=function(e){return this._resolveFeatures(this._edition||e)},s.prototype._resolveFeatures=function(t){if(!this._featuresResolved){var r={};if(!t)throw new Error("Unknown edition for "+this.fullName);var s=Object.assign(this.options?Object.assign({},this.options.features):{},this._inferLegacyProtoFeatures(t));if(this._edition){if("proto2"===t)r=Object.assign({},n);else if("proto3"===t)r=Object.assign({},o);else{if("2023"!==t)throw new Error("Unknown edition: "+t);r=Object.assign({},i)}return this._features=Object.assign(r,s||{}),void(this._featuresResolved=!0)}if(this.partOf instanceof e){var a=Object.assign({},this.partOf._features);this._features=Object.assign(a,s||{})}else if(this.declaringField);else{if(!this.parent)throw new Error("Unable to find a parent for "+this.fullName);var u=Object.assign({},this.parent._features);this._features=Object.assign(u,s||{})}this.extensionField&&(this.extensionField._features=this._features),this._featuresResolved=!0}},s.prototype._inferLegacyProtoFeatures=function(){return{}},s.prototype.getOption=function(e){if(this.options)return this.options[e]},s.prototype.setOption=function(e,t,i){return this.options||(this.options={}),/^features\./.test(e)?r.setProperty(this.options,e,t,i):i&&void 0!==this.options[e]||(this.getOption(e)!==t&&(this.resolved=!1),this.options[e]=t),this},s.prototype.setParsedOption=function(e,t,i){this.parsedOptions||(this.parsedOptions=[]);var n=this.parsedOptions;if(i){var o=n.find(function(t){return Object.prototype.hasOwnProperty.call(t,e)});if(o){var s=o[e];r.setProperty(s,i,t)}else(o={})[e]=r.setProperty({},i,t),n.push(o)}else{var a={};a[e]=t,n.push(a)}return this},s.prototype.setOptions=function(e,t){if(e)for(var r=Object.keys(e),i=0;i<r.length;++i)this.setOption(r[i],e[r[i]],t);return this},s.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},s.prototype._editionToJSON=function(){if(this._edition&&"proto3"!==this._edition)return this._edition},s._configure=function(e){t=e},Fe}function Qe(){if(De)return Pe;De=1,Pe=i;var e=Ve();((i.prototype=Object.create(e.prototype)).constructor=i).className="Enum";var t=pe(),r=We();function i(t,r,i,n,o,s){if(e.call(this,t,i),r&&"object"!=typeof r)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=n,this.comments=o||{},this.valuesOptions=s,this._valuesFeatures={},this.reserved=void 0,r)for(var a=Object.keys(r),u=0;u<a.length;++u)"number"==typeof r[a[u]]&&(this.valuesById[this.values[a[u]]=r[a[u]]]=a[u])}return i.prototype._resolveFeatures=function(t){return t=this._edition||t,e.prototype._resolveFeatures.call(this,t),Object.keys(this.values).forEach(e=>{var t=Object.assign({},this._features);this._valuesFeatures[e]=Object.assign(t,this.valuesOptions&&this.valuesOptions[e]&&this.valuesOptions[e].features)}),this},i.fromJSON=function(e,t){var r=new i(e,t.values,t.options,t.comment,t.comments);return r.reserved=t.reserved,t.edition&&(r._edition=t.edition),r._defaultEdition="proto3",r},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return r.toObject(["edition",this._editionToJSON(),"options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},i.prototype.add=function(e,t,i,n){if(!r.isString(e))throw TypeError("name must be a string");if(!r.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return n&&(void 0===this.valuesOptions&&(this.valuesOptions={}),this.valuesOptions[e]=n||null),this.comments[e]=i||null,this},i.prototype.remove=function(e){if(!r.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this.valuesOptions&&delete this.valuesOptions[e],this},i.prototype.isReservedId=function(e){return t.isReservedId(this.reserved,e)},i.prototype.isReservedName=function(e){return t.isReservedName(this.reserved,e)},Pe}function Ye(){if(Ce)return Le;Ce=1,Le=function(n){for(var o,s=r.codegen(["m","w"],n.name+"$encode")("if(!w)")("w=Writer.create()"),a=n.fieldsArray.slice().sort(r.compareFieldsById),u=0;u<a.length;++u){var f=a[u].resolve(),l=n._fieldsArray.indexOf(f),h=f.resolvedType instanceof e?"int32":f.type,p=t.basic[h];o="m"+r.safeProp(f.name),f.map?(s("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",o,f.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",o)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(f.id<<3|2)>>>0,8|t.mapKey[f.keyType],f.keyType),void 0===p?s("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",l,o):s(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|p,h,o),s("}")("}")):f.repeated?(s("if(%s!=null&&%s.length){",o,o),f.packed&&void 0!==t.packed[h]?s("w.uint32(%i).fork()",(f.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",o)("w.%s(%s[i])",h,o)("w.ldelim()"):(s("for(var i=0;i<%s.length;++i)",o),void 0===p?i(s,f,l,o+"[i]"):s("w.uint32(%i).%s(%s[i])",(f.id<<3|p)>>>0,h,o)),s("}")):(f.optional&&s("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",o,f.name),void 0===p?i(s,f,l,o):s("w.uint32(%i).%s(%s)",(f.id<<3|p)>>>0,h,o))}return s("return w")};var e=Qe(),t=Ge(),r=We();function i(e,t,r,i){return t.delimited?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",r,i,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",r,i,(t.id<<3|2)>>>0)}return Le}var Ze=qe?$e:(qe=1,$e=function(){if(Je)return i.exports;Je=1;var e=i.exports=z();return e.build="light",e.load=function(t,r,i){return"function"==typeof r?(i=r,r=new e.Root):r||(r=new e.Root),r.load(t,i)},e.loadSync=function(t,r){return r||(r=new e.Root),r.loadSync(t)},e.encoder=Ye(),e.decoder=me(),e.verifier=ge(),e.converter=_e(),e.ReflectionObject=Ve(),e.Namespace=pe(),e.Root=He(),e.Enum=Qe(),e.Type=Ue(),e.Field=Xe(),e.OneOf=Ke(),e.MapField=ce(),e.Service=ye(),e.Method=de(),e.Message=ve(),e.wrappers=ze(),e.types=Ge(),e.util=We(),e.ReflectionObject._configure(e.Root),e.Namespace._configure(e.Type,e.Service,e.Enum),e.Root._configure(e.Type),e.Field._configure(e.Type),i.exports}());exports.lightExports=Ze;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("./light-dJjIln5b.cjs");var e=null;try{e=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 i(t,e,i){this.low=0|t,this.high=0|e,this.unsigned=!!i}function n(t){return!0===(t&&t.__isLong__)}function r(t){var e=Math.clz32(t&-t);return t?31-e:e}i.prototype.__isLong__,Object.defineProperty(i.prototype,"__isLong__",{value:!0}),i.isLong=n;var s={},o={};function h(t,e){var i,n,r;return e?(r=0<=(t>>>=0)&&t<256)&&(n=o[t])?n:(i=g(t,0,!0),r&&(o[t]=i),i):(r=-128<=(t|=0)&&t<128)&&(n=s[t])?n:(i=g(t,t<0?-1:0,!1),r&&(s[t]=i),i)}function u(t,e){if(isNaN(t))return e?w:m;if(e){if(t<0)return w;if(t>=d)return N}else{if(t<=-p)return T;if(t+1>=p)return x}return t<0?u(-t,e).neg():g(t%c|0,t/c|0,e)}function g(t,e,n){return new i(t,e,n)}i.fromInt=h,i.fromNumber=u,i.fromBits=g;var l=Math.pow;function a(t,e,i){if(0===t.length)throw Error("empty string");if("number"==typeof e?(i=e,e=!1):e=!!e,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e?w:m;if((i=i||10)<2||36<i)throw RangeError("radix");var n;if((n=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return a(t.substring(1),e,i).neg();for(var r=u(l(i,8)),s=m,o=0;o<t.length;o+=8){var h=Math.min(8,t.length-o),g=parseInt(t.substring(o,o+h),i);if(h<8){var f=u(l(i,h));s=s.mul(f).add(u(g))}else s=(s=s.mul(r)).add(u(g))}return s.unsigned=e,s}function f(t,e){return"number"==typeof t?u(t,e):"string"==typeof t?a(t,e):g(t.low,t.high,"boolean"==typeof e?e:t.unsigned)}i.fromString=a,i.fromValue=f;var c=4294967296,d=c*c,p=d/2,y=h(1<<24),m=h(0);i.ZERO=m;var w=h(0,!0);i.UZERO=w;var v=h(1);i.ONE=v;var b=h(1,!0);i.UONE=b;var E=h(-1);i.NEG_ONE=E;var x=g(-1,2147483647,!1);i.MAX_VALUE=x;var N=g(-1,-1,!0);i.MAX_UNSIGNED_VALUE=N;var T=g(0,-2147483648,!1);i.MIN_VALUE=T;var I=i.prototype;I.toInt=function(){return this.unsigned?this.low>>>0:this.low},I.toNumber=function(){return this.unsigned?(this.high>>>0)*c+(this.low>>>0):this.high*c+(this.low>>>0)},I.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(T)){var e=u(t),i=this.div(e),n=i.mul(e).sub(this);return i.toString(t)+n.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var r=u(l(t,6),this.unsigned),s=this,o="";;){var h=s.div(r),g=(s.sub(h.mul(r)).toInt()>>>0).toString(t);if((s=h).isZero())return g+o;for(;g.length<6;)g="0"+g;o=""+g+o}},I.getHighBits=function(){return this.high},I.getHighBitsUnsigned=function(){return this.high>>>0},I.getLowBits=function(){return this.low},I.getLowBitsUnsigned=function(){return this.low>>>0},I.getNumBitsAbs=function(){if(this.isNegative())return this.eq(T)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&!(t&1<<e);e--);return 0!=this.high?e+33:e+1},I.isSafeInteger=function(){var t=this.high>>21;return!t||!this.unsigned&&(-1===t&&!(0===this.low&&-2097152===this.high))},I.isZero=function(){return 0===this.high&&0===this.low},I.eqz=I.isZero,I.isNegative=function(){return!this.unsigned&&this.high<0},I.isPositive=function(){return this.unsigned||this.high>=0},I.isOdd=function(){return!(1&~this.low)},I.isEven=function(){return!(1&this.low)},I.equals=function(t){return n(t)||(t=f(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},I.eq=I.equals,I.notEquals=function(t){return!this.eq(t)},I.neq=I.notEquals,I.ne=I.notEquals,I.lessThan=function(t){return this.comp(t)<0},I.lt=I.lessThan,I.lessThanOrEqual=function(t){return this.comp(t)<=0},I.lte=I.lessThanOrEqual,I.le=I.lessThanOrEqual,I.greaterThan=function(t){return this.comp(t)>0},I.gt=I.greaterThan,I.greaterThanOrEqual=function(t){return this.comp(t)>=0},I.gte=I.greaterThanOrEqual,I.ge=I.greaterThanOrEqual,I.compare=function(t){if(n(t)||(t=f(t)),this.eq(t))return 0;var e=this.isNegative(),i=t.isNegative();return e&&!i?-1:!e&&i?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},I.comp=I.compare,I.negate=function(){return!this.unsigned&&this.eq(T)?T:this.not().add(v)},I.neg=I.negate,I.add=function(t){n(t)||(t=f(t));var e=this.high>>>16,i=65535&this.high,r=this.low>>>16,s=65535&this.low,o=t.high>>>16,h=65535&t.high,u=t.low>>>16,l=0,a=0,c=0,d=0;return c+=(d+=s+(65535&t.low))>>>16,a+=(c+=r+u)>>>16,l+=(a+=i+h)>>>16,l+=e+o,g((c&=65535)<<16|(d&=65535),(l&=65535)<<16|(a&=65535),this.unsigned)},I.subtract=function(t){return n(t)||(t=f(t)),this.add(t.neg())},I.sub=I.subtract,I.multiply=function(t){if(this.isZero())return this;if(n(t)||(t=f(t)),e)return g(e.mul(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned);if(t.isZero())return this.unsigned?w:m;if(this.eq(T))return t.isOdd()?T:m;if(t.eq(T))return this.isOdd()?T:m;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(y)&&t.lt(y))return u(this.toNumber()*t.toNumber(),this.unsigned);var i=this.high>>>16,r=65535&this.high,s=this.low>>>16,o=65535&this.low,h=t.high>>>16,l=65535&t.high,a=t.low>>>16,c=65535&t.low,d=0,p=0,v=0,b=0;return v+=(b+=o*c)>>>16,p+=(v+=s*c)>>>16,v&=65535,p+=(v+=o*a)>>>16,d+=(p+=r*c)>>>16,p&=65535,d+=(p+=s*a)>>>16,p&=65535,d+=(p+=o*l)>>>16,d+=i*c+r*a+s*l+o*h,g((v&=65535)<<16|(b&=65535),(d&=65535)<<16|(p&=65535),this.unsigned)},I.mul=I.multiply,I.divide=function(t){if(n(t)||(t=f(t)),t.isZero())throw Error("division by zero");var i,r,s;if(e)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?g((this.unsigned?e.div_u:e.div_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?w:m;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return w;if(t.gt(this.shru(1)))return b;s=w}else{if(this.eq(T))return t.eq(v)||t.eq(E)?T:t.eq(T)?v:(i=this.shr(1).div(t).shl(1)).eq(m)?t.isNegative()?v:E:(r=this.sub(t.mul(i)),s=i.add(r.div(t)));if(t.eq(T))return this.unsigned?w:m;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();s=m}for(r=this;r.gte(t);){i=Math.max(1,Math.floor(r.toNumber()/t.toNumber()));for(var o=Math.ceil(Math.log(i)/Math.LN2),h=o<=48?1:l(2,o-48),a=u(i),c=a.mul(t);c.isNegative()||c.gt(r);)c=(a=u(i-=h,this.unsigned)).mul(t);a.isZero()&&(a=v),s=s.add(a),r=r.sub(c)}return s},I.div=I.divide,I.modulo=function(t){return n(t)||(t=f(t)),e?g((this.unsigned?e.rem_u:e.rem_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},I.mod=I.modulo,I.rem=I.modulo,I.not=function(){return g(~this.low,~this.high,this.unsigned)},I.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},I.clz=I.countLeadingZeros,I.countTrailingZeros=function(){return this.low?r(this.low):r(this.high)+32},I.ctz=I.countTrailingZeros,I.and=function(t){return n(t)||(t=f(t)),g(this.low&t.low,this.high&t.high,this.unsigned)},I.or=function(t){return n(t)||(t=f(t)),g(this.low|t.low,this.high|t.high,this.unsigned)},I.xor=function(t){return n(t)||(t=f(t)),g(this.low^t.low,this.high^t.high,this.unsigned)},I.shiftLeft=function(t){return n(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?g(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):g(0,this.low<<t-32,this.unsigned)},I.shl=I.shiftLeft,I.shiftRight=function(t){return n(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?g(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):g(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},I.shr=I.shiftRight,I.shiftRightUnsigned=function(t){return n(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?g(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):g(32===t?this.high:this.high>>>t-32,0,this.unsigned)},I.shru=I.shiftRightUnsigned,I.shr_u=I.shiftRightUnsigned,I.rotateLeft=function(t){var e;return n(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?g(this.high,this.low,this.unsigned):t<32?(e=32-t,g(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned)):(e=32-(t-=32),g(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned))},I.rotl=I.rotateLeft,I.rotateRight=function(t){var e;return n(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?g(this.high,this.low,this.unsigned):t<32?(e=32-t,g(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned)):(e=32-(t-=32),g(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned))},I.rotr=I.rotateRight,I.toSigned=function(){return this.unsigned?g(this.low,this.high,!1):this},I.toUnsigned=function(){return this.unsigned?this:g(this.low,this.high,!0)},I.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},I.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},I.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]},i.fromBytes=function(t,e,n){return n?i.fromBytesLE(t,e):i.fromBytesBE(t,e)},i.fromBytesLE=function(t,e){return new i(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,e)},i.fromBytesBE=function(t,e){return new i(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],e)},"function"==typeof BigInt&&(i.fromBigInt=function(t,e){return g(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),e)},i.fromValue=function(t,e){return"bigint"==typeof t?i.fromBigInt(t,e):f(t,e)},I.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|t});const B=t=>"object"==typeof t&&null!==t&&!Array.isArray(t),A=e=>{class i extends t.lightExports.Message{constructor(t){super(),((t,e)=>{if(e)for(const i of Object.keys(e)){const n=e[i];null!=n&&(t[i]=n)}})(this,t)}}const n=i;return n.$type=e,n.prototype.$type=e,n},_=t=>i.isLong(t),q=t=>t instanceof Uint8Array||ArrayBuffer.isView(t)&&"number"==typeof t.byteLength,O=e=>Object.prototype.hasOwnProperty.call(t.lightExports.types.packed,e),R=e=>{const i=e.resolve();return i.resolvedType instanceof t.lightExports.Enum||O(i.type)},L=(t,e)=>e in t?t[e]:void 0,U=e=>{const i=e.resolve();return i.resolvedType instanceof t.lightExports.Enum?0:(n=i.type,Object.prototype.hasOwnProperty.call(t.lightExports.types.basic,n)?t.lightExports.types.basic[i.type]:2);var n},$=(t,e)=>_(t)||"number"==typeof t||"string"==typeof t?t:B(t)&&"number"==typeof t.low&&"number"==typeof t.high?new i(t.low,t.high,e):e?i.UZERO:i.ZERO,S=(t,e,i)=>{switch(e){case"double":return t.double(Number(i));case"float":return t.float(Number(i));case"int32":return t.int32(Number(i));case"uint32":return t.uint32(Number(i));case"sint32":return t.sint32(Number(i));case"fixed32":return t.fixed32(Number(i));case"sfixed32":return t.sfixed32(Number(i));case"int64":return t.int64($(i,!1));case"uint64":return t.uint64($(i,!0));case"sint64":return t.sint64($(i,!1));case"fixed64":return t.fixed64($(i,!0));case"sfixed64":return t.sfixed64($(i,!1));case"bool":return t.bool(Boolean(i));case"string":return t.string(String(i));case"bytes":return t.bytes((t=>"string"==typeof t?t:q(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)?Uint8Array.from(t.filter(t=>"number"==typeof t)):new Uint8Array)(i));default:throw new TypeError(`Unsupported protobuf field type: ${e}`)}},Z=(t,e,i)=>{if(e<0||t.pos+e>i)throw RangeError(`index out of range: ${t.pos} + ${e} > ${i}`)},M=(t,e)=>{const i=t.uint32();return Z(t,i,e),i},j=(t,e,i)=>{const n=t.len;t.len=i;try{switch(e){case 0:return void t.skip();case 1:return Z(t,8,i),void t.skip(8);case 2:{const e=M(t,i);return void t.skip(e)}case 5:return Z(t,4,i),void t.skip(4);default:throw new Error(`Unsupported protobuf wire type: ${String(e)}`)}}finally{t.len=n}},k=(e,i,n)=>{const r=i.resolve(),s=r.resolvedType;if(s instanceof t.lightExports.Type){const t=e.fork();return D(s,B(n)?n:{},t),t.ldelim(),e}return s instanceof t.lightExports.Enum?(e.int32("number"==typeof n?n:Number(n)),e):S(e,r.type,n)},z=(t,e,i)=>{if(0===i.length)return t;const n=e.resolve();if(O(n.type)&&e.packed){t.uint32(e.id<<3|2).fork();for(const n of i)k(t,e,n);return t.ldelim(),t}const r=U(e);for(const s of i)t.uint32(e.id<<3|r),k(t,e,s);return t},D=(e,i,n=t.lightExports.Writer.create())=>{const r=e.fieldsArray.slice().sort(t.lightExports.util.compareFieldsById);for(const t of r){const e=L(i,t.name);null!=e&&(t.repeated?z(n,t,Array.isArray(e)?e:[]):(n.uint32(t.id<<3|U(t)),k(n,t,e)))}return n},P=(e,i,n,r)=>{const s=i.resolve(),o=s.resolvedType;return o instanceof t.lightExports.Type?2!==n?void j(e,n,r):V(o,e,M(e,r)):o instanceof t.lightExports.Enum?e.int32():((t,e)=>{switch(e){case"double":return t.double();case"float":return t.float();case"int32":return t.int32();case"uint32":return t.uint32();case"sint32":return t.sint32();case"fixed32":return t.fixed32();case"sfixed32":return t.sfixed32();case"int64":return t.int64();case"uint64":return t.uint64();case"sint64":return t.sint64();case"fixed64":return t.fixed64();case"sfixed64":return t.sfixed64();case"bool":return t.bool();case"string":return t.string();case"bytes":return t.bytes();default:throw new TypeError(`Unsupported protobuf field type: ${e}`)}})(e,s.type)},V=(e,i,n)=>{const r=i instanceof t.lightExports.Reader?i:t.lightExports.Reader.create(i),s=void 0===n?r.len:r.pos+n,o=(t=>{const e={};for(const i of t.fieldsArray)i.repeated&&(e[i.name]=[]);return e})(e),h=e.fieldsById;for(;r.pos<s;){const t=r.pos,i=r.uint32(),n=h[i>>>3],g=7&i;try{if(!n){j(r,g,s);continue}if(n.repeated){const t=Array.isArray(o[n.name])?o[n.name]:[];if(R(n)&&2===g){const e=M(r,s)+r.pos;for(;r.pos<e;)t.push(P(r,n,0,e))}else{const e=P(r,n,g,s);void 0!==e&&t.push(e)}o[n.name]=t;continue}const t=P(r,n,g,s);void 0!==t&&(o[n.name]=t)}catch(u){if(u instanceof RangeError){const o=n?`${n.name}#${n.id}`:`unknown#${i>>>3}`;throw new RangeError(`${u.message}; protobufType=${e.fullName}; field=${o}; tag=${i}; wireType=${g}; tagPosition=${t}; readerPosition=${r.pos}; messageEnd=${s}`)}throw u}}return o},C=(t,e)=>e?.longs===String?t.toString():e?.longs===Number?t.toNumber():t,W=(e,i)=>{const n=e.resolve();if(n.resolvedType instanceof t.lightExports.Type)return null;if(n.resolvedType instanceof t.lightExports.Enum){if(i?.enums===String){return n.resolvedType.valuesById[n.typeDefault]??n.typeDefault}return n.typeDefault}return"bytes"===n.type?i?.bytes===String?"":i?.bytes===Array?[]:new Uint8Array:n.long&&_(n.typeDefault)?C(n.typeDefault,i):n.typeDefault},F=(e,i,n)=>{const r=e.resolve();if(void 0!==i)return r.resolvedType instanceof t.lightExports.Type?B(i)?G(r.resolvedType,i,n):i:r.resolvedType instanceof t.lightExports.Enum?n?.enums===String&&"number"==typeof i?r.resolvedType.valuesById[i]??i:i:r.long&&_(i)?C(i,n):"bytes"===r.type&&q(i)?((e,i)=>i?.bytes===String?t.lightExports.util.base64.encode(e,0,e.length):i?.bytes===Array?Array.prototype.slice.call(e):e)(i,n):i},G=(e,i,n)=>{const r={};for(const s of e.fieldsArray.slice().sort(t.lightExports.util.compareFieldsById)){const t=L(i,s.name);s.repeated?Array.isArray(t)?r[s.name]=t.map(t=>F(s,t,n)):(n?.arrays||n?.defaults)&&(r[s.name]=[]):null==t?n?.defaults&&(r[s.name]=W(s,n)):r[s.name]=F(s,t,n)}return r},H=t=>{const e=t;e.__reflectionCodecInstalled||(e.__reflectionCodecInstalled=!0,t.encode=(e,i)=>D(t,B(e)?e:{},i),t.decode=(e,i)=>V(t,e,i),t.fromObject=t=>B(t)?t:{},t.toObject=(e,i)=>G(t,B(e)?e:{},i),t.create=t=>t?{...t}:{},t.verify=()=>null)},X=e=>{H(e);for(const i of e.nestedArray)if(i instanceof t.lightExports.Type)X(i);else if(i instanceof t.lightExports.Namespace)for(const e of i.nestedArray)e instanceof t.lightExports.Type&&X(e)},J=e=>{for(const i of e.nestedArray)i instanceof t.lightExports.Type?X(i):i instanceof t.lightExports.Namespace&&J(i)};exports.Long=i,exports.encodeWithReflection=D,exports.installReflectionCodecInNamespace=J,exports.installReflectionCodecRecursive=X,exports.installReflectionRuntime=()=>{const e=t.lightExports.Type;e.__reflectionRuntimeInstalled||(e.generateConstructor=t=>()=>A(t),t.lightExports.Type.prototype.setup=function(){return H(this),this},t.lightExports.Type.prototype.create=function(t){return t?{...t}:{}},t.lightExports.Type.prototype.encode=function(t,e){return D(this,B(t)?t:{},e)},t.lightExports.Type.prototype.decode=function(t,e){return V(this,t,e)},t.lightExports.Type.prototype.fromObject=function(t){return B(t)?t:{}},t.lightExports.Type.prototype.toObject=function(t,e){return G(this,B(t)?t:{},e)},t.lightExports.Type.prototype.verify=function(){return null},e.__reflectionRuntimeInstalled=!0)};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as t}from"./light-Dg9A1Xmd.js";var e=null;try{e=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 i(t,e,i){this.low=0|t,this.high=0|e,this.unsigned=!!i}function n(t){return!0===(t&&t.__isLong__)}function r(t){var e=Math.clz32(t&-t);return t?31-e:e}i.prototype.__isLong__,Object.defineProperty(i.prototype,"__isLong__",{value:!0}),i.isLong=n;var s={},o={};function h(t,e){var i,n,r;return e?(r=0<=(t>>>=0)&&t<256)&&(n=o[t])?n:(i=a(t,0,!0),r&&(o[t]=i),i):(r=-128<=(t|=0)&&t<128)&&(n=s[t])?n:(i=a(t,t<0?-1:0,!1),r&&(s[t]=i),i)}function u(t,e){if(isNaN(t))return e?w:m;if(e){if(t<0)return w;if(t>=d)return T}else{if(t<=-y)return B;if(t+1>=y)return E}return t<0?u(-t,e).neg():a(t%c|0,t/c|0,e)}function a(t,e,n){return new i(t,e,n)}i.fromInt=h,i.fromNumber=u,i.fromBits=a;var f=Math.pow;function g(t,e,i){if(0===t.length)throw Error("empty string");if("number"==typeof e?(i=e,e=!1):e=!!e,"NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e?w:m;if((i=i||10)<2||36<i)throw RangeError("radix");var n;if((n=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return g(t.substring(1),e,i).neg();for(var r=u(f(i,8)),s=m,o=0;o<t.length;o+=8){var h=Math.min(8,t.length-o),a=parseInt(t.substring(o,o+h),i);if(h<8){var l=u(f(i,h));s=s.mul(l).add(u(a))}else s=(s=s.mul(r)).add(u(a))}return s.unsigned=e,s}function l(t,e){return"number"==typeof t?u(t,e):"string"==typeof t?g(t,e):a(t.low,t.high,"boolean"==typeof e?e:t.unsigned)}i.fromString=g,i.fromValue=l;var c=4294967296,d=c*c,y=d/2,p=h(1<<24),m=h(0);i.ZERO=m;var w=h(0,!0);i.UZERO=w;var v=h(1);i.ONE=v;var b=h(1,!0);i.UONE=b;var N=h(-1);i.NEG_ONE=N;var E=a(-1,2147483647,!1);i.MAX_VALUE=E;var T=a(-1,-1,!0);i.MAX_UNSIGNED_VALUE=T;var B=a(0,-2147483648,!1);i.MIN_VALUE=B;var I=i.prototype;I.toInt=function(){return this.unsigned?this.low>>>0:this.low},I.toNumber=function(){return this.unsigned?(this.high>>>0)*c+(this.low>>>0):this.high*c+(this.low>>>0)},I.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(B)){var e=u(t),i=this.div(e),n=i.mul(e).sub(this);return i.toString(t)+n.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var r=u(f(t,6),this.unsigned),s=this,o="";;){var h=s.div(r),a=(s.sub(h.mul(r)).toInt()>>>0).toString(t);if((s=h).isZero())return a+o;for(;a.length<6;)a="0"+a;o=""+a+o}},I.getHighBits=function(){return this.high},I.getHighBitsUnsigned=function(){return this.high>>>0},I.getLowBits=function(){return this.low},I.getLowBitsUnsigned=function(){return this.low>>>0},I.getNumBitsAbs=function(){if(this.isNegative())return this.eq(B)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&!(t&1<<e);e--);return 0!=this.high?e+33:e+1},I.isSafeInteger=function(){var t=this.high>>21;return!t||!this.unsigned&&(-1===t&&!(0===this.low&&-2097152===this.high))},I.isZero=function(){return 0===this.high&&0===this.low},I.eqz=I.isZero,I.isNegative=function(){return!this.unsigned&&this.high<0},I.isPositive=function(){return this.unsigned||this.high>=0},I.isOdd=function(){return!(1&~this.low)},I.isEven=function(){return!(1&this.low)},I.equals=function(t){return n(t)||(t=l(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},I.eq=I.equals,I.notEquals=function(t){return!this.eq(t)},I.neq=I.notEquals,I.ne=I.notEquals,I.lessThan=function(t){return this.comp(t)<0},I.lt=I.lessThan,I.lessThanOrEqual=function(t){return this.comp(t)<=0},I.lte=I.lessThanOrEqual,I.le=I.lessThanOrEqual,I.greaterThan=function(t){return this.comp(t)>0},I.gt=I.greaterThan,I.greaterThanOrEqual=function(t){return this.comp(t)>=0},I.gte=I.greaterThanOrEqual,I.ge=I.greaterThanOrEqual,I.compare=function(t){if(n(t)||(t=l(t)),this.eq(t))return 0;var e=this.isNegative(),i=t.isNegative();return e&&!i?-1:!e&&i?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},I.comp=I.compare,I.negate=function(){return!this.unsigned&&this.eq(B)?B:this.not().add(v)},I.neg=I.negate,I.add=function(t){n(t)||(t=l(t));var e=this.high>>>16,i=65535&this.high,r=this.low>>>16,s=65535&this.low,o=t.high>>>16,h=65535&t.high,u=t.low>>>16,f=0,g=0,c=0,d=0;return c+=(d+=s+(65535&t.low))>>>16,g+=(c+=r+u)>>>16,f+=(g+=i+h)>>>16,f+=e+o,a((c&=65535)<<16|(d&=65535),(f&=65535)<<16|(g&=65535),this.unsigned)},I.subtract=function(t){return n(t)||(t=l(t)),this.add(t.neg())},I.sub=I.subtract,I.multiply=function(t){if(this.isZero())return this;if(n(t)||(t=l(t)),e)return a(e.mul(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned);if(t.isZero())return this.unsigned?w:m;if(this.eq(B))return t.isOdd()?B:m;if(t.eq(B))return this.isOdd()?B:m;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(p)&&t.lt(p))return u(this.toNumber()*t.toNumber(),this.unsigned);var i=this.high>>>16,r=65535&this.high,s=this.low>>>16,o=65535&this.low,h=t.high>>>16,f=65535&t.high,g=t.low>>>16,c=65535&t.low,d=0,y=0,v=0,b=0;return v+=(b+=o*c)>>>16,y+=(v+=s*c)>>>16,v&=65535,y+=(v+=o*g)>>>16,d+=(y+=r*c)>>>16,y&=65535,d+=(y+=s*g)>>>16,y&=65535,d+=(y+=o*f)>>>16,d+=i*c+r*g+s*f+o*h,a((v&=65535)<<16|(b&=65535),(d&=65535)<<16|(y&=65535),this.unsigned)},I.mul=I.multiply,I.divide=function(t){if(n(t)||(t=l(t)),t.isZero())throw Error("division by zero");var i,r,s;if(e)return this.unsigned||-2147483648!==this.high||-1!==t.low||-1!==t.high?a((this.unsigned?e.div_u:e.div_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?w:m;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return w;if(t.gt(this.shru(1)))return b;s=w}else{if(this.eq(B))return t.eq(v)||t.eq(N)?B:t.eq(B)?v:(i=this.shr(1).div(t).shl(1)).eq(m)?t.isNegative()?v:N:(r=this.sub(t.mul(i)),s=i.add(r.div(t)));if(t.eq(B))return this.unsigned?w:m;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();s=m}for(r=this;r.gte(t);){i=Math.max(1,Math.floor(r.toNumber()/t.toNumber()));for(var o=Math.ceil(Math.log(i)/Math.LN2),h=o<=48?1:f(2,o-48),g=u(i),c=g.mul(t);c.isNegative()||c.gt(r);)c=(g=u(i-=h,this.unsigned)).mul(t);g.isZero()&&(g=v),s=s.add(g),r=r.sub(c)}return s},I.div=I.divide,I.modulo=function(t){return n(t)||(t=l(t)),e?a((this.unsigned?e.rem_u:e.rem_s)(this.low,this.high,t.low,t.high),e.get_high(),this.unsigned):this.sub(this.div(t).mul(t))},I.mod=I.modulo,I.rem=I.modulo,I.not=function(){return a(~this.low,~this.high,this.unsigned)},I.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},I.clz=I.countLeadingZeros,I.countTrailingZeros=function(){return this.low?r(this.low):r(this.high)+32},I.ctz=I.countTrailingZeros,I.and=function(t){return n(t)||(t=l(t)),a(this.low&t.low,this.high&t.high,this.unsigned)},I.or=function(t){return n(t)||(t=l(t)),a(this.low|t.low,this.high|t.high,this.unsigned)},I.xor=function(t){return n(t)||(t=l(t)),a(this.low^t.low,this.high^t.high,this.unsigned)},I.shiftLeft=function(t){return n(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?a(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):a(0,this.low<<t-32,this.unsigned)},I.shl=I.shiftLeft,I.shiftRight=function(t){return n(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?a(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):a(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},I.shr=I.shiftRight,I.shiftRightUnsigned=function(t){return n(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?a(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):a(32===t?this.high:this.high>>>t-32,0,this.unsigned)},I.shru=I.shiftRightUnsigned,I.shr_u=I.shiftRightUnsigned,I.rotateLeft=function(t){var e;return n(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?a(this.high,this.low,this.unsigned):t<32?(e=32-t,a(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned)):(e=32-(t-=32),a(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned))},I.rotl=I.rotateLeft,I.rotateRight=function(t){var e;return n(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?a(this.high,this.low,this.unsigned):t<32?(e=32-t,a(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned)):(e=32-(t-=32),a(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned))},I.rotr=I.rotateRight,I.toSigned=function(){return this.unsigned?a(this.low,this.high,!1):this},I.toUnsigned=function(){return this.unsigned?this:a(this.low,this.high,!0)},I.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},I.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},I.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]},i.fromBytes=function(t,e,n){return n?i.fromBytesLE(t,e):i.fromBytesBE(t,e)},i.fromBytesLE=function(t,e){return new i(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,e)},i.fromBytesBE=function(t,e){return new i(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],e)},"function"==typeof BigInt&&(i.fromBigInt=function(t,e){return a(Number(BigInt.asIntN(32,t)),Number(BigInt.asIntN(32,t>>BigInt(32))),e)},i.fromValue=function(t,e){return"bigint"==typeof t?i.fromBigInt(t,e):l(t,e)},I.toBigInt=function(){var t=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|t});const A=t=>"object"==typeof t&&null!==t&&!Array.isArray(t),_=e=>{class i extends t.Message{constructor(t){super(),((t,e)=>{if(e)for(const i of Object.keys(e)){const n=e[i];null!=n&&(t[i]=n)}})(this,t)}}const n=i;return n.$type=e,n.prototype.$type=e,n},O=t=>i.isLong(t),q=t=>t instanceof Uint8Array||ArrayBuffer.isView(t)&&"number"==typeof t.byteLength,x=e=>Object.prototype.hasOwnProperty.call(t.types.packed,e),L=e=>{const i=e.resolve();return i.resolvedType instanceof t.Enum||x(i.type)},U=(t,e)=>e in t?t[e]:void 0,R=e=>{const i=e.resolve();return i.resolvedType instanceof t.Enum?0:(n=i.type,Object.prototype.hasOwnProperty.call(t.types.basic,n)?t.types.basic[i.type]:2);var n},$=(t,e)=>O(t)||"number"==typeof t||"string"==typeof t?t:A(t)&&"number"==typeof t.low&&"number"==typeof t.high?new i(t.low,t.high,e):e?i.UZERO:i.ZERO,S=(t,e,i)=>{switch(e){case"double":return t.double(Number(i));case"float":return t.float(Number(i));case"int32":return t.int32(Number(i));case"uint32":return t.uint32(Number(i));case"sint32":return t.sint32(Number(i));case"fixed32":return t.fixed32(Number(i));case"sfixed32":return t.sfixed32(Number(i));case"int64":return t.int64($(i,!1));case"uint64":return t.uint64($(i,!0));case"sint64":return t.sint64($(i,!1));case"fixed64":return t.fixed64($(i,!0));case"sfixed64":return t.sfixed64($(i,!1));case"bool":return t.bool(Boolean(i));case"string":return t.string(String(i));case"bytes":return t.bytes((t=>"string"==typeof t?t:q(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)?Uint8Array.from(t.filter(t=>"number"==typeof t)):new Uint8Array)(i));default:throw new TypeError(`Unsupported protobuf field type: ${e}`)}},Z=(t,e,i)=>{if(e<0||t.pos+e>i)throw RangeError(`index out of range: ${t.pos} + ${e} > ${i}`)},M=(t,e)=>{const i=t.uint32();return Z(t,i,e),i},j=(t,e,i)=>{const n=t.len;t.len=i;try{switch(e){case 0:return void t.skip();case 1:return Z(t,8,i),void t.skip(8);case 2:{const e=M(t,i);return void t.skip(e)}case 5:return Z(t,4,i),void t.skip(4);default:throw new Error(`Unsupported protobuf wire type: ${String(e)}`)}}finally{t.len=n}},k=(e,i,n)=>{const r=i.resolve(),s=r.resolvedType;if(s instanceof t.Type){const t=e.fork();return D(s,A(n)?n:{},t),t.ldelim(),e}return s instanceof t.Enum?(e.int32("number"==typeof n?n:Number(n)),e):S(e,r.type,n)},z=(t,e,i)=>{if(0===i.length)return t;const n=e.resolve();if(x(n.type)&&e.packed){t.uint32(e.id<<3|2).fork();for(const n of i)k(t,e,n);return t.ldelim(),t}const r=R(e);for(const s of i)t.uint32(e.id<<3|r),k(t,e,s);return t},D=(e,i,n=t.Writer.create())=>{const r=e.fieldsArray.slice().sort(t.util.compareFieldsById);for(const t of r){const e=U(i,t.name);null!=e&&(t.repeated?z(n,t,Array.isArray(e)?e:[]):(n.uint32(t.id<<3|R(t)),k(n,t,e)))}return n},P=(e,i,n,r)=>{const s=i.resolve(),o=s.resolvedType;return o instanceof t.Type?2!==n?void j(e,n,r):V(o,e,M(e,r)):o instanceof t.Enum?e.int32():((t,e)=>{switch(e){case"double":return t.double();case"float":return t.float();case"int32":return t.int32();case"uint32":return t.uint32();case"sint32":return t.sint32();case"fixed32":return t.fixed32();case"sfixed32":return t.sfixed32();case"int64":return t.int64();case"uint64":return t.uint64();case"sint64":return t.sint64();case"fixed64":return t.fixed64();case"sfixed64":return t.sfixed64();case"bool":return t.bool();case"string":return t.string();case"bytes":return t.bytes();default:throw new TypeError(`Unsupported protobuf field type: ${e}`)}})(e,s.type)},V=(e,i,n)=>{const r=i instanceof t.Reader?i:t.Reader.create(i),s=void 0===n?r.len:r.pos+n,o=(t=>{const e={};for(const i of t.fieldsArray)i.repeated&&(e[i.name]=[]);return e})(e),h=e.fieldsById;for(;r.pos<s;){const t=r.pos,i=r.uint32(),n=h[i>>>3],a=7&i;try{if(!n){j(r,a,s);continue}if(n.repeated){const t=Array.isArray(o[n.name])?o[n.name]:[];if(L(n)&&2===a){const e=M(r,s)+r.pos;for(;r.pos<e;)t.push(P(r,n,0,e))}else{const e=P(r,n,a,s);void 0!==e&&t.push(e)}o[n.name]=t;continue}const t=P(r,n,a,s);void 0!==t&&(o[n.name]=t)}catch(u){if(u instanceof RangeError){const o=n?`${n.name}#${n.id}`:`unknown#${i>>>3}`;throw new RangeError(`${u.message}; protobufType=${e.fullName}; field=${o}; tag=${i}; wireType=${a}; tagPosition=${t}; readerPosition=${r.pos}; messageEnd=${s}`)}throw u}}return o},C=(t,e)=>e?.longs===String?t.toString():e?.longs===Number?t.toNumber():t,W=(e,i)=>{const n=e.resolve();if(n.resolvedType instanceof t.Type)return null;if(n.resolvedType instanceof t.Enum){if(i?.enums===String){return n.resolvedType.valuesById[n.typeDefault]??n.typeDefault}return n.typeDefault}return"bytes"===n.type?i?.bytes===String?"":i?.bytes===Array?[]:new Uint8Array:n.long&&O(n.typeDefault)?C(n.typeDefault,i):n.typeDefault},F=(e,i,n)=>{const r=e.resolve();if(void 0!==i)return r.resolvedType instanceof t.Type?A(i)?G(r.resolvedType,i,n):i:r.resolvedType instanceof t.Enum?n?.enums===String&&"number"==typeof i?r.resolvedType.valuesById[i]??i:i:r.long&&O(i)?C(i,n):"bytes"===r.type&&q(i)?((e,i)=>i?.bytes===String?t.util.base64.encode(e,0,e.length):i?.bytes===Array?Array.prototype.slice.call(e):e)(i,n):i},G=(e,i,n)=>{const r={};for(const s of e.fieldsArray.slice().sort(t.util.compareFieldsById)){const t=U(i,s.name);s.repeated?Array.isArray(t)?r[s.name]=t.map(t=>F(s,t,n)):(n?.arrays||n?.defaults)&&(r[s.name]=[]):null==t?n?.defaults&&(r[s.name]=W(s,n)):r[s.name]=F(s,t,n)}return r},H=t=>{const e=t;e.__reflectionCodecInstalled||(e.__reflectionCodecInstalled=!0,t.encode=(e,i)=>D(t,A(e)?e:{},i),t.decode=(e,i)=>V(t,e,i),t.fromObject=t=>A(t)?t:{},t.toObject=(e,i)=>G(t,A(e)?e:{},i),t.create=t=>t?{...t}:{},t.verify=()=>null)},X=e=>{H(e);for(const i of e.nestedArray)if(i instanceof t.Type)X(i);else if(i instanceof t.Namespace)for(const e of i.nestedArray)e instanceof t.Type&&X(e)},J=e=>{for(const i of e.nestedArray)i instanceof t.Type?X(i):i instanceof t.Namespace&&J(i)},K=()=>{const e=t.Type;e.__reflectionRuntimeInstalled||(e.generateConstructor=t=>()=>_(t),t.Type.prototype.setup=function(){return H(this),this},t.Type.prototype.create=function(t){return t?{...t}:{}},t.Type.prototype.encode=function(t,e){return D(this,A(t)?t:{},e)},t.Type.prototype.decode=function(t,e){return V(this,t,e)},t.Type.prototype.fromObject=function(t){return A(t)?t:{}},t.Type.prototype.toObject=function(t,e){return G(this,A(t)?t:{},e)},t.Type.prototype.verify=function(){return null},e.__reflectionRuntimeInstalled=!0)};export{i as L,K as a,J as b,D as e,X as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{V as e,E as s}from"./common-
|
|
1
|
+
import{V as e,E as s}from"./common-D_DfwSd3.js";const t=t=>new e(`${t} must be a local paging cursor returned by SDK`,{code:s.VALIDATION_INVALID_FORMAT,details:{fields:[{path:t,message:`${t} must be a local paging cursor returned by SDK`,rule:"invalid_format"}]}}),n=(e,s,t)=>{const n=e+s;return n<t?String(n):""},a=e=>({...e}),r=e=>{const s=(e=>e?{msgId:e.msgServerId,type:"string"==typeof e.body.type?e.body.type:"unknown",body:e.body,timestamp:e.timestamp,modifiedInfo:e.modifiedInfo,userInfoUpdateTime:e.userInfoUpdateTime,namecardUpdateTime:e.namecardUpdateTime}:null)(e.lastMessage),t=e.lastMessageAt??e.lastMessage?.timestamp??0;return{conversationId:e.conversationId,type:e.conversationType,lastMessage:s,unreadCount:e.unreadCount,isPinned:e.isPinned,pinnedTime:e.pinnedTimestamp,marks:e.marks,lastAccess:t,lastUpdate:t}},i=e=>"AT"===e||"NONE"===e||"ALL"===e?e:null,o=a=>{if(!Number.isInteger(a.pageSize)||a.pageSize<=0)throw new e("pageSize must be a positive integer",{code:s.VALIDATION_INVALID_FORMAT,details:{fields:[{path:"pageSize",message:"pageSize must be a positive integer",rule:"range"}]}});const r=((e,s)=>{if(void 0===e||""===e)return 0;if(!/^\d+$/.test(e))throw t(s);const n=Number.parseInt(e,10);if(!Number.isSafeInteger(n)||n<0)throw t(s);return n})(a.cursor,"cursor"),o=[];for(const e of a.items){if("chatRoom"===e.conversationType)continue;const s=i(e.remindType);s&&o.push({conversationId:e.conversationId,conversationType:e.conversationType,remindType:s})}return{conversations:o.slice(r,r+a.pageSize),cursor:n(r,a.pageSize,o.length)}},d=(e,s)=>e.marks.includes(s);export{r as a,d as h,o as q,a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./cache-utils-B99glc0H.js";import{p as r,V as t,E as a}from"./common-
|
|
1
|
+
import{i as e}from"./cache-utils-B99glc0H.js";import{p as r,V as t,E as a}from"./common-D_DfwSd3.js";const n={nickname:"nickname",avatarUrl:"avatarurl",mail:"mail",phone:"phone",gender:"gender",sign:"sign",birth:"birth",ext:"ext"},i=(e,r,n)=>new t(e,{code:"required"===n?a.VALIDATION_REQUIRED:a.VALIDATION_INVALID_FORMAT,details:{fields:[{path:r,message:e,rule:n}]}}),s=(e,r)=>{if("string"!=typeof e)throw i(`${r} must be a string`,r,"invalid_format");return e},o=(e,r)=>{if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return e;throw i(`${r} must be a string, number, or boolean`,r,"invalid_format")},p=(e,r="attribute")=>{const t=n[e];if(!t)throw i(`${r} is invalid`,r,"invalid_format");return t},m=(e,r="params.userIds")=>{if(!Array.isArray(e)||0===e.length)throw i(`${r} is required`,r,"required");const t=[],a=/* @__PURE__ */new Set;for(const[n,i]of e.entries()){const e=s(i,`${r}[${n}]`).trim();e&&(a.has(e)||(a.add(e),t.push(e)))}if(0===t.length)throw i(`${r} is required`,r,"required");return t},d=(e,r="params.attributes")=>{if(!Array.isArray(e)||0===e.length)throw i(`${r} is required`,r,"required");const t=[],a=/* @__PURE__ */new Set;for(const[o,p]of e.entries()){const e=s(p,`${r}[${o}]`);if(!(e in n))throw i(`${r}[${o}] is invalid`,`${r}[${o}]`,"invalid_format");a.has(e)||(a.add(e),t.push(e))}if(0===t.length)throw i(`${r} is required`,r,"required");return t},u=e=>{const{orgName:t,appName:a}=r(e.appKey);return`/${t}/${a}/metadata/user/get`},f=e=>{const{orgName:t,appName:a}=r(e.appKey);return`/${t}/${a}/metadata/user/${encodeURIComponent(e.userId)}`},l=e=>({targets:m(e)}),g=(e,r)=>({targets:m(e),properties:d(r).map(e=>p(e,"params.attributes"))}),c=r=>!!e(r)&&("nickname"in r||"avatarurl"in r||"avatarUrl"in r||"mail"in r||"phone"in r||"gender"in r||"sign"in r||"birth"in r||"ext"in r),h=(r,t)=>{if(Array.isArray(r))for(const a of r){if(!e(a))continue;const r="string"==typeof a.username?a.username:"";r&&t.set(r,a)}},b=(e,r)=>{const t={userId:e};return"string"==typeof r.nickname&&(t.nickname=r.nickname),"string"==typeof r.avatarurl?t.avatarUrl=r.avatarurl:"string"==typeof r.avatarUrl&&(t.avatarUrl=r.avatarUrl),"string"==typeof r.mail&&(t.mail=r.mail),"string"==typeof r.phone&&(t.phone=r.phone),"string"!=typeof r.gender&&"number"!=typeof r.gender&&"boolean"!=typeof r.gender||(t.gender=r.gender),"string"==typeof r.sign&&(t.sign=r.sign),"string"==typeof r.birth&&(t.birth=r.birth),"string"==typeof r.ext&&(t.ext=r.ext),t},y=(r,t)=>{const a=(r=>{const t=/* @__PURE__ */new Map,a=e(r)?r:null;if(a?.data&&e(a.data))for(const[e,n]of Object.entries(a.data))c(n)&&t.set(e,n);return h(a?.entities,t),h(a?.data&&e(a.data)?a.data.entities:void 0,t),t})(r),n=(r=>{const t=/* @__PURE__ */new Map,a=e(r)?r:null;if(!a?.lastModified||!e(a.lastModified))return t;for(const[e,n]of Object.entries(a.lastModified))"number"==typeof n&&t.set(e,n);return t})(r),i=[];for(const e of t){const r=a.get(e);r&&i.push({profile:b(e,r),lastModified:n.get(e)})}return i},v=(e,r)=>y(e,r).map(e=>e.profile),$=(e,r,t,a)=>{void 0!==t&&("gender"!==r?e.push([r,s(t,a)]):e.push([r,String(o(t,a))]))},w=e=>e.map(([e,r])=>`${encodeURIComponent(e)}=${encodeURIComponent(r)}`).join("&"),I=e=>{const r=[];if($(r,"nickname",e.nickname,"params.nickname"),$(r,"avatarurl",e.avatarUrl,"params.avatarUrl"),$(r,"mail",e.mail,"params.mail"),$(r,"phone",e.phone,"params.phone"),$(r,"gender",e.gender,"params.gender"),$(r,"sign",e.sign,"params.sign"),$(r,"birth",e.birth,"params.birth"),$(r,"ext",e.ext,"params.ext"),0===r.length)throw i("params must include at least one updatable field","params","required");return w(r)},A=(e,r)=>{const t=p(e,"attribute"),a=o(r,"value");if("gender"!==t&&"string"!=typeof a)throw i("value must be a string","value","invalid_format");return w([[t,String(a)]])};export{u as a,l as b,m as c,g as d,d as e,I as f,f as g,A as h,y as i,v as n};
|