UNPKG

borc

Version:

Encode and parse data in the Concise Binary Object Representation (CBOR) data format (RFC7049).

2 lines 75.9 kB
(function (root, factory) {(typeof module === 'object' && module.exports) ? module.exports = factory() : root.Borc = factory()}(typeof self !== 'undefined' ? self : this, function () { var Borc=(()=>{var ce=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var $t=ce(ft=>{"use strict";ft.byteLength=Jr;ft.toByteArray=Zr;ft.fromByteArray=Qr;var Te=[],Ie=[],jr=typeof Uint8Array!="undefined"?Uint8Array:Array,wt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var qe=0,en=wt.length;qe<en;++qe)Te[qe]=wt[qe],Ie[wt.charCodeAt(qe)]=qe;Ie["-".charCodeAt(0)]=62;Ie["_".charCodeAt(0)]=63;function bt(r){var e=r.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=r.indexOf("=");t===-1&&(t=e);var n=t===e?0:4-t%4;return[t,n]}function Jr(r){var e=bt(r),t=e[0],n=e[1];return(t+n)*3/4-n}function tn(r,e,t){return(e+t)*3/4-t}function Zr(r){var e,t=bt(r),n=t[0],i=t[1],h=new jr(tn(r,n,i)),a=0,m=i>0?n-4:n,B;for(B=0;B<m;B+=4)e=Ie[r.charCodeAt(B)]<<18|Ie[r.charCodeAt(B+1)]<<12|Ie[r.charCodeAt(B+2)]<<6|Ie[r.charCodeAt(B+3)],h[a++]=e>>16&255,h[a++]=e>>8&255,h[a++]=e&255;return i===2&&(e=Ie[r.charCodeAt(B)]<<2|Ie[r.charCodeAt(B+1)]>>4,h[a++]=e&255),i===1&&(e=Ie[r.charCodeAt(B)]<<10|Ie[r.charCodeAt(B+1)]<<4|Ie[r.charCodeAt(B+2)]>>2,h[a++]=e>>8&255,h[a++]=e&255),h}function rn(r){return Te[r>>18&63]+Te[r>>12&63]+Te[r>>6&63]+Te[r&63]}function nn(r,e,t){for(var n,i=[],h=e;h<t;h+=3)n=(r[h]<<16&16711680)+(r[h+1]<<8&65280)+(r[h+2]&255),i.push(rn(n));return i.join("")}function Qr(r){for(var e,t=r.length,n=t%3,i=[],h=16383,a=0,m=t-n;a<m;a+=h)i.push(nn(r,a,a+h>m?m:a+h));return n===1?(e=r[t-1],i.push(Te[e>>2]+Te[e<<4&63]+"==")):n===2&&(e=(r[t-2]<<8)+r[t-1],i.push(Te[e>>10]+Te[e>>4&63]+Te[e<<2&63]+"=")),i.join("")}});var _t=ce(yt=>{yt.read=function(r,e,t,n,i){var h,a,m=i*8-n-1,B=(1<<m)-1,O=B>>1,U=-7,F=t?i-1:0,q=t?-1:1,le=r[e+F];for(F+=q,h=le&(1<<-U)-1,le>>=-U,U+=m;U>0;h=h*256+r[e+F],F+=q,U-=8);for(a=h&(1<<-U)-1,h>>=-U,U+=n;U>0;a=a*256+r[e+F],F+=q,U-=8);if(h===0)h=1-O;else{if(h===B)return a?NaN:(le?-1:1)*Infinity;a=a+Math.pow(2,n),h=h-O}return(le?-1:1)*a*Math.pow(2,h-n)};yt.write=function(r,e,t,n,i,h){var a,m,B,O=h*8-i-1,U=(1<<O)-1,F=U>>1,q=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,le=n?0:h-1,ie=n?1:-1,fe=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===Infinity?(m=isNaN(e)?1:0,a=U):(a=Math.floor(Math.log(e)/Math.LN2),e*(B=Math.pow(2,-a))<1&&(a--,B*=2),a+F>=1?e+=q/B:e+=q*Math.pow(2,1-F),e*B>=2&&(a++,B/=2),a+F>=U?(m=0,a=U):a+F>=1?(m=(e*B-1)*Math.pow(2,i),a=a+F):(m=e*Math.pow(2,F-1)*Math.pow(2,i),a=0));i>=8;r[t+le]=m&255,le+=ie,m/=256,i-=8);for(a=a<<i|m,O+=i;O>0;r[t+le]=a&255,le+=ie,a/=256,O-=8);r[t+le-ie]|=fe*128}});var tt=ce(Ye=>{"use strict";var It=$t(),He=_t(),vt=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ye.Buffer=I;Ye.SlowBuffer=sn;Ye.INSPECT_MAX_BYTES=50;var at=2147483647;Ye.kMaxLength=at;I.TYPED_ARRAY_SUPPORT=un();!I.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function un(){try{let r=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(r,e),r.foo()===42}catch(r){return!1}}Object.defineProperty(I.prototype,"parent",{enumerable:!0,get:function(){if(!!I.isBuffer(this))return this.buffer}});Object.defineProperty(I.prototype,"offset",{enumerable:!0,get:function(){if(!!I.isBuffer(this))return this.byteOffset}});function Re(r){if(r>at)throw new RangeError('The value "'+r+'" is invalid for option "size"');let e=new Uint8Array(r);return Object.setPrototypeOf(e,I.prototype),e}function I(r,e,t){if(typeof r=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Bt(r)}return qt(r,e,t)}I.poolSize=8192;function qt(r,e,t){if(typeof r=="string")return hn(r,e);if(ArrayBuffer.isView(r))return on(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(Fe(r,ArrayBuffer)||r&&Fe(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Fe(r,SharedArrayBuffer)||r&&Fe(r.buffer,SharedArrayBuffer)))return At(r,e,t);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=r.valueOf&&r.valueOf();if(n!=null&&n!==r)return I.from(n,e,t);let i=fn(r);if(i)return i;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return I.from(r[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}I.from=function(r,e,t){return qt(r,e,t)};Object.setPrototypeOf(I.prototype,Uint8Array.prototype);Object.setPrototypeOf(I,Uint8Array);function Yt(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function an(r,e,t){return Yt(r),r<=0?Re(r):e!==void 0?typeof t=="string"?Re(r).fill(e,t):Re(r).fill(e):Re(r)}I.alloc=function(r,e,t){return an(r,e,t)};function Bt(r){return Yt(r),Re(r<0?0:mt(r)|0)}I.allocUnsafe=function(r){return Bt(r)};I.allocUnsafeSlow=function(r){return Bt(r)};function hn(r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!I.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let t=Ht(r,e)|0,n=Re(t),i=n.write(r,e);return i!==t&&(n=n.slice(0,i)),n}function Nt(r){let e=r.length<0?0:mt(r.length)|0,t=Re(e);for(let n=0;n<e;n+=1)t[n]=r[n]&255;return t}function on(r){if(Fe(r,Uint8Array)){let e=new Uint8Array(r);return At(e.buffer,e.byteOffset,e.byteLength)}return Nt(r)}function At(r,e,t){if(e<0||r.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(r.byteLength<e+(t||0))throw new RangeError('"length" is outside of buffer bounds');let n;return e===void 0&&t===void 0?n=new Uint8Array(r):t===void 0?n=new Uint8Array(r,e):n=new Uint8Array(r,e,t),Object.setPrototypeOf(n,I.prototype),n}function fn(r){if(I.isBuffer(r)){let e=mt(r.length)|0,t=Re(e);return t.length===0||r.copy(t,0,0,e),t}if(r.length!==void 0)return typeof r.length!="number"||St(r.length)?Re(0):Nt(r);if(r.type==="Buffer"&&Array.isArray(r.data))return Nt(r.data)}function mt(r){if(r>=at)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+at.toString(16)+" bytes");return r|0}function sn(r){return+r!=r&&(r=0),I.alloc(+r)}I.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==I.prototype};I.compare=function(e,t){if(Fe(e,Uint8Array)&&(e=I.from(e,e.offset,e.byteLength)),Fe(t,Uint8Array)&&(t=I.from(t,t.offset,t.byteLength)),!I.isBuffer(e)||!I.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,i=t.length;for(let h=0,a=Math.min(n,i);h<a;++h)if(e[h]!==t[h]){n=e[h],i=t[h];break}return n<i?-1:i<n?1:0};I.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};I.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return I.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;let i=I.allocUnsafe(t),h=0;for(n=0;n<e.length;++n){let a=e[n];if(Fe(a,Uint8Array))h+a.length>i.length?(I.isBuffer(a)||(a=I.from(a)),a.copy(i,h)):Uint8Array.prototype.set.call(i,a,h);else if(I.isBuffer(a))a.copy(i,h);else throw new TypeError('"list" argument must be an Array of Buffers');h+=a.length}return i};function Ht(r,e){if(I.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||Fe(r,ArrayBuffer))return r.byteLength;if(typeof r!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);let t=r.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&t===0)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return xt(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Wt(r).length;default:if(i)return n?-1:xt(r).length;e=(""+e).toLowerCase(),i=!0}}I.byteLength=Ht;function En(r,e,t){let n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(r||(r="utf8");;)switch(r){case"hex":return gn(this,e,t);case"utf8":case"utf-8":return zt(this,e,t);case"ascii":return ln(this,e,t);case"latin1":case"binary":return pn(this,e,t);case"base64":return cn(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return dn(this,e,t);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}I.prototype._isBuffer=!0;function Ge(r,e,t){let n=r[e];r[e]=r[t],r[t]=n}I.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)Ge(this,t,t+1);return this};I.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)Ge(this,t,t+3),Ge(this,t+1,t+2);return this};I.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)Ge(this,t,t+7),Ge(this,t+1,t+6),Ge(this,t+2,t+5),Ge(this,t+3,t+4);return this};I.prototype.toString=function(){let e=this.length;return e===0?"":arguments.length===0?zt(this,0,e):En.apply(this,arguments)};I.prototype.toLocaleString=I.prototype.toString;I.prototype.equals=function(e){if(!I.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:I.compare(this,e)===0};I.prototype.inspect=function(){let e="",t=Ye.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"};vt&&(I.prototype[vt]=I.prototype.inspect);I.prototype.compare=function(e,t,n,i,h){if(Fe(e,Uint8Array)&&(e=I.from(e,e.offset,e.byteLength)),!I.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),h===void 0&&(h=this.length),t<0||n>e.length||i<0||h>this.length)throw new RangeError("out of range index");if(i>=h&&t>=n)return 0;if(i>=h)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,h>>>=0,this===e)return 0;let a=h-i,m=n-t,B=Math.min(a,m),O=this.slice(i,h),U=e.slice(t,n);for(let F=0;F<B;++F)if(O[F]!==U[F]){a=O[F],m=U[F];break}return a<m?-1:m<a?1:0};function Xt(r,e,t,n,i){if(r.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,St(t)&&(t=i?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(i)return-1;t=r.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof e=="string"&&(e=I.from(e,n)),I.isBuffer(e))return e.length===0?-1:Kt(r,e,t,n,i);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):Kt(r,[e],t,n,i);throw new TypeError("val must be string, number or Buffer")}function Kt(r,e,t,n,i){let h=1,a=r.length,m=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||e.length<2)return-1;h=2,a/=2,m/=2,t/=2}function B(U,F){return h===1?U[F]:U.readUInt16BE(F*h)}let O;if(i){let U=-1;for(O=t;O<a;O++)if(B(r,O)===B(e,U===-1?0:O-U)){if(U===-1&&(U=O),O-U+1===m)return U*h}else U!==-1&&(O-=O-U),U=-1}else for(t+m>a&&(t=a-m),O=t;O>=0;O--){let U=!0;for(let F=0;F<m;F++)if(B(r,O+F)!==B(e,F)){U=!1;break}if(U)return O}return-1}I.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1};I.prototype.indexOf=function(e,t,n){return Xt(this,e,t,n,!0)};I.prototype.lastIndexOf=function(e,t,n){return Xt(this,e,t,n,!1)};function wn(r,e,t,n){t=Number(t)||0;let i=r.length-t;n?(n=Number(n),n>i&&(n=i)):n=i;let h=e.length;n>h/2&&(n=h/2);let a;for(a=0;a<n;++a){let m=parseInt(e.substr(a*2,2),16);if(St(m))return a;r[t+a]=m}return a}function yn(r,e,t,n){return ct(xt(e,r.length-t),r,t,n)}function In(r,e,t,n){return ct(_n(e),r,t,n)}function Bn(r,e,t,n){return ct(Wt(e),r,t,n)}function mn(r,e,t,n){return ct(An(e,r.length-t),r,t,n)}I.prototype.write=function(e,t,n,i){if(t===void 0)i="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")i=t,n=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(n)?(n=n>>>0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let h=this.length-t;if((n===void 0||n>h)&&(n=h),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let a=!1;for(;;)switch(i){case"hex":return wn(this,e,t,n);case"utf8":case"utf-8":return yn(this,e,t,n);case"ascii":case"latin1":case"binary":return In(this,e,t,n);case"base64":return Bn(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return mn(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}};I.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function cn(r,e,t){return e===0&&t===r.length?It.fromByteArray(r):It.fromByteArray(r.slice(e,t))}function zt(r,e,t){t=Math.min(r.length,t);let n=[],i=e;for(;i<t;){let h=r[i],a=null,m=h>239?4:h>223?3:h>191?2:1;if(i+m<=t){let B,O,U,F;switch(m){case 1:h<128&&(a=h);break;case 2:B=r[i+1],(B&192)==128&&(F=(h&31)<<6|B&63,F>127&&(a=F));break;case 3:B=r[i+1],O=r[i+2],(B&192)==128&&(O&192)==128&&(F=(h&15)<<12|(B&63)<<6|O&63,F>2047&&(F<55296||F>57343)&&(a=F));break;case 4:B=r[i+1],O=r[i+2],U=r[i+3],(B&192)==128&&(O&192)==128&&(U&192)==128&&(F=(h&15)<<18|(B&63)<<12|(O&63)<<6|U&63,F>65535&&F<1114112&&(a=F))}}a===null?(a=65533,m=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|a&1023),n.push(a),i+=m}return Nn(n)}var Vt=4096;function Nn(r){let e=r.length;if(e<=Vt)return String.fromCharCode.apply(String,r);let t="",n=0;for(;n<e;)t+=String.fromCharCode.apply(String,r.slice(n,n+=Vt));return t}function ln(r,e,t){let n="";t=Math.min(r.length,t);for(let i=e;i<t;++i)n+=String.fromCharCode(r[i]&127);return n}function pn(r,e,t){let n="";t=Math.min(r.length,t);for(let i=e;i<t;++i)n+=String.fromCharCode(r[i]);return n}function gn(r,e,t){let n=r.length;(!e||e<0)&&(e=0),(!t||t<0||t>n)&&(t=n);let i="";for(let h=e;h<t;++h)i+=Sn[r[h]];return i}function dn(r,e,t){let n=r.slice(e,t),i="";for(let h=0;h<n.length-1;h+=2)i+=String.fromCharCode(n[h]+n[h+1]*256);return i}I.prototype.slice=function(e,t){let n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);let i=this.subarray(e,t);return Object.setPrototypeOf(i,I.prototype),i};function ue(r,e,t){if(r%1!=0||r<0)throw new RangeError("offset is not uint");if(r+e>t)throw new RangeError("Trying to access beyond buffer length")}I.prototype.readUintLE=I.prototype.readUIntLE=function(e,t,n){e=e>>>0,t=t>>>0,n||ue(e,t,this.length);let i=this[e],h=1,a=0;for(;++a<t&&(h*=256);)i+=this[e+a]*h;return i};I.prototype.readUintBE=I.prototype.readUIntBE=function(e,t,n){e=e>>>0,t=t>>>0,n||ue(e,t,this.length);let i=this[e+--t],h=1;for(;t>0&&(h*=256);)i+=this[e+--t]*h;return i};I.prototype.readUint8=I.prototype.readUInt8=function(e,t){return e=e>>>0,t||ue(e,1,this.length),this[e]};I.prototype.readUint16LE=I.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||ue(e,2,this.length),this[e]|this[e+1]<<8};I.prototype.readUint16BE=I.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||ue(e,2,this.length),this[e]<<8|this[e+1]};I.prototype.readUint32LE=I.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||ue(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};I.prototype.readUint32BE=I.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||ue(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};I.prototype.readBigUInt64LE=Le(function(e){e=e>>>0,We(e,"offset");let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&et(e,this.length-8);let i=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,h=this[++e]+this[++e]*2**8+this[++e]*2**16+n*2**24;return BigInt(i)+(BigInt(h)<<BigInt(32))});I.prototype.readBigUInt64BE=Le(function(e){e=e>>>0,We(e,"offset");let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&et(e,this.length-8);let i=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],h=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n;return(BigInt(i)<<BigInt(32))+BigInt(h)});I.prototype.readIntLE=function(e,t,n){e=e>>>0,t=t>>>0,n||ue(e,t,this.length);let i=this[e],h=1,a=0;for(;++a<t&&(h*=256);)i+=this[e+a]*h;return h*=128,i>=h&&(i-=Math.pow(2,8*t)),i};I.prototype.readIntBE=function(e,t,n){e=e>>>0,t=t>>>0,n||ue(e,t,this.length);let i=t,h=1,a=this[e+--i];for(;i>0&&(h*=256);)a+=this[e+--i]*h;return h*=128,a>=h&&(a-=Math.pow(2,8*t)),a};I.prototype.readInt8=function(e,t){return e=e>>>0,t||ue(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};I.prototype.readInt16LE=function(e,t){e=e>>>0,t||ue(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n};I.prototype.readInt16BE=function(e,t){e=e>>>0,t||ue(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n};I.prototype.readInt32LE=function(e,t){return e=e>>>0,t||ue(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};I.prototype.readInt32BE=function(e,t){return e=e>>>0,t||ue(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};I.prototype.readBigInt64LE=Le(function(e){e=e>>>0,We(e,"offset");let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&et(e,this.length-8);let i=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)});I.prototype.readBigInt64BE=Le(function(e){e=e>>>0,We(e,"offset");let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&et(e,this.length-8);let i=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(i)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+n)});I.prototype.readFloatLE=function(e,t){return e=e>>>0,t||ue(e,4,this.length),He.read(this,e,!0,23,4)};I.prototype.readFloatBE=function(e,t){return e=e>>>0,t||ue(e,4,this.length),He.read(this,e,!1,23,4)};I.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||ue(e,8,this.length),He.read(this,e,!0,52,8)};I.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||ue(e,8,this.length),He.read(this,e,!1,52,8)};function de(r,e,t,n,i,h){if(!I.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<h)throw new RangeError('"value" argument is out of bounds');if(t+n>r.length)throw new RangeError("Index out of range")}I.prototype.writeUintLE=I.prototype.writeUIntLE=function(e,t,n,i){if(e=+e,t=t>>>0,n=n>>>0,!i){let m=Math.pow(2,8*n)-1;de(this,e,t,n,m,0)}let h=1,a=0;for(this[t]=e&255;++a<n&&(h*=256);)this[t+a]=e/h&255;return t+n};I.prototype.writeUintBE=I.prototype.writeUIntBE=function(e,t,n,i){if(e=+e,t=t>>>0,n=n>>>0,!i){let m=Math.pow(2,8*n)-1;de(this,e,t,n,m,0)}let h=n-1,a=1;for(this[t+h]=e&255;--h>=0&&(a*=256);)this[t+h]=e/a&255;return t+n};I.prototype.writeUint8=I.prototype.writeUInt8=function(e,t,n){return e=+e,t=t>>>0,n||de(this,e,t,1,255,0),this[t]=e&255,t+1};I.prototype.writeUint16LE=I.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=t>>>0,n||de(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};I.prototype.writeUint16BE=I.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t>>>0,n||de(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};I.prototype.writeUint32LE=I.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=t>>>0,n||de(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};I.prototype.writeUint32BE=I.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t>>>0,n||de(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function Zt(r,e,t,n,i){Jt(e,n,i,r,t,7);let h=Number(e&BigInt(4294967295));r[t++]=h,h=h>>8,r[t++]=h,h=h>>8,r[t++]=h,h=h>>8,r[t++]=h;let a=Number(e>>BigInt(32)&BigInt(4294967295));return r[t++]=a,a=a>>8,r[t++]=a,a=a>>8,r[t++]=a,a=a>>8,r[t++]=a,t}function Qt(r,e,t,n,i){Jt(e,n,i,r,t,7);let h=Number(e&BigInt(4294967295));r[t+7]=h,h=h>>8,r[t+6]=h,h=h>>8,r[t+5]=h,h=h>>8,r[t+4]=h;let a=Number(e>>BigInt(32)&BigInt(4294967295));return r[t+3]=a,a=a>>8,r[t+2]=a,a=a>>8,r[t+1]=a,a=a>>8,r[t]=a,t+8}I.prototype.writeBigUInt64LE=Le(function(e,t=0){return Zt(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});I.prototype.writeBigUInt64BE=Le(function(e,t=0){return Qt(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});I.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t=t>>>0,!i){let B=Math.pow(2,8*n-1);de(this,e,t,n,B-1,-B)}let h=0,a=1,m=0;for(this[t]=e&255;++h<n&&(a*=256);)e<0&&m===0&&this[t+h-1]!==0&&(m=1),this[t+h]=(e/a>>0)-m&255;return t+n};I.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t=t>>>0,!i){let B=Math.pow(2,8*n-1);de(this,e,t,n,B-1,-B)}let h=n-1,a=1,m=0;for(this[t+h]=e&255;--h>=0&&(a*=256);)e<0&&m===0&&this[t+h+1]!==0&&(m=1),this[t+h]=(e/a>>0)-m&255;return t+n};I.prototype.writeInt8=function(e,t,n){return e=+e,t=t>>>0,n||de(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};I.prototype.writeInt16LE=function(e,t,n){return e=+e,t=t>>>0,n||de(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};I.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t>>>0,n||de(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};I.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t>>>0,n||de(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};I.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t>>>0,n||de(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};I.prototype.writeBigInt64LE=Le(function(e,t=0){return Zt(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});I.prototype.writeBigInt64BE=Le(function(e,t=0){return Qt(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function jt(r,e,t,n,i,h){if(t+n>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function er(r,e,t,n,i){return e=+e,t=t>>>0,i||jt(r,e,t,4,34028234663852886e22,-34028234663852886e22),He.write(r,e,t,n,23,4),t+4}I.prototype.writeFloatLE=function(e,t,n){return er(this,e,t,!0,n)};I.prototype.writeFloatBE=function(e,t,n){return er(this,e,t,!1,n)};function tr(r,e,t,n,i){return e=+e,t=t>>>0,i||jt(r,e,t,8,17976931348623157e292,-17976931348623157e292),He.write(r,e,t,n,52,8),t+8}I.prototype.writeDoubleLE=function(e,t,n){return tr(this,e,t,!0,n)};I.prototype.writeDoubleBE=function(e,t,n){return tr(this,e,t,!1,n)};I.prototype.copy=function(e,t,n,i){if(!I.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&i!==0&&(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);let h=i-n;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,n,i):Uint8Array.prototype.set.call(e,this.subarray(n,i),t),h};I.prototype.fill=function(e,t,n,i){if(typeof e=="string"){if(typeof t=="string"?(i=t,t=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!I.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(e.length===1){let a=e.charCodeAt(0);(i==="utf8"&&a<128||i==="latin1")&&(e=a)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);let h;if(typeof e=="number")for(h=t;h<n;++h)this[h]=e;else{let a=I.isBuffer(e)?e:I.from(e,i),m=a.length;if(m===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(h=0;h<n-t;++h)this[h+t]=a[h%m]}return this};var ze={};function Tt(r,e,t){ze[r]=class extends t{constructor(){super();Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${r}]`,this.stack,delete this.name}get code(){return r}set code(i){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:i,writable:!0})}toString(){return`${this.name} [${r}]: ${this.message}`}}}Tt("ERR_BUFFER_OUT_OF_BOUNDS",function(r){return r?`${r} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);Tt("ERR_INVALID_ARG_TYPE",function(r,e){return`The "${r}" argument must be of type number. Received type ${typeof e}`},TypeError);Tt("ERR_OUT_OF_RANGE",function(r,e,t){let n=`The value of "${r}" is out of range.`,i=t;return Number.isInteger(t)&&Math.abs(t)>2**32?i=rr(String(t)):typeof t=="bigint"&&(i=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(i=rr(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n},RangeError);function rr(r){let e="",t=r.length,n=r[0]==="-"?1:0;for(;t>=n+4;t-=3)e=`_${r.slice(t-3,t)}${e}`;return`${r.slice(0,t)}${e}`}function xn(r,e,t){We(e,"offset"),(r[e]===void 0||r[e+t]===void 0)&&et(e,r.length-(t+1))}function Jt(r,e,t,n,i,h){if(r>t||r<e){let a=typeof e=="bigint"?"n":"",m;throw h>3?e===0||e===BigInt(0)?m=`>= 0${a} and < 2${a} ** ${(h+1)*8}${a}`:m=`>= -(2${a} ** ${(h+1)*8-1}${a}) and < 2 ** ${(h+1)*8-1}${a}`:m=`>= ${e}${a} and <= ${t}${a}`,new ze.ERR_OUT_OF_RANGE("value",m,r)}xn(n,i,h)}function We(r,e){if(typeof r!="number")throw new ze.ERR_INVALID_ARG_TYPE(e,"number",r)}function et(r,e,t){throw Math.floor(r)!==r?(We(r,t),new ze.ERR_OUT_OF_RANGE(t||"offset","an integer",r)):e<0?new ze.ERR_BUFFER_OUT_OF_BOUNDS:new ze.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${e}`,r)}var Tn=/[^+/0-9A-Za-z-_]/g;function Fn(r){if(r=r.split("=")[0],r=r.trim().replace(Tn,""),r.length<2)return"";for(;r.length%4!=0;)r=r+"=";return r}function xt(r,e){e=e||Infinity;let t,n=r.length,i=null,h=[];for(let a=0;a<n;++a){if(t=r.charCodeAt(a),t>55295&&t<57344){if(!i){if(t>56319){(e-=3)>-1&&h.push(239,191,189);continue}else if(a+1===n){(e-=3)>-1&&h.push(239,191,189);continue}i=t;continue}if(t<56320){(e-=3)>-1&&h.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(e-=3)>-1&&h.push(239,191,189);if(i=null,t<128){if((e-=1)<0)break;h.push(t)}else if(t<2048){if((e-=2)<0)break;h.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;h.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;h.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return h}function _n(r){let e=[];for(let t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function An(r,e){let t,n,i,h=[];for(let a=0;a<r.length&&!((e-=2)<0);++a)t=r.charCodeAt(a),n=t>>8,i=t%256,h.push(i),h.push(n);return h}function Wt(r){return It.toByteArray(Fn(r))}function ct(r,e,t,n){let i;for(i=0;i<n&&!(i+t>=e.length||i>=r.length);++i)e[i+t]=r[i];return i}function Fe(r,e){return r instanceof e||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===e.name}function St(r){return r!==r}var Sn=function(){let r="0123456789abcdef",e=new Array(256);for(let t=0;t<16;++t){let n=t*16;for(let i=0;i<16;++i)e[n+i]=r[t]+r[i]}return e}();function Le(r){return typeof BigInt=="undefined"?Un:r}function Un(){throw new Error("BigInt not supported")}});var rt=ce((nr,lt)=>{(function(r){"use strict";var e,t=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,n=Math.ceil,i=Math.floor,h="[BigNumber Error] ",a=h+"Number primitive has more than 15 significant digits: ",m=1e14,B=14,O=9007199254740991,U=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],F=1e7,q=1e9;function le(M){var R,z,Z,x=N.prototype={constructor:N,toString:null,valueOf:null},Q=new N(1),H=20,K=4,te=-7,pe=21,ye=-1e7,Ee=1e7,Se=!1,he=1,xe=0,Ve={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},Me="0123456789abcdefghijklmnopqrstuvwxyz";function N(s,u){var o,d,g,E,_,p,c,y,w=this;if(!(w instanceof N))return new N(s,u);if(u==null){if(s&&s._isBigNumber===!0){w.s=s.s,!s.c||s.e>Ee?w.c=w.e=null:s.e<ye?w.c=[w.e=0]:(w.e=s.e,w.c=s.c.slice());return}if((p=typeof s=="number")&&s*0==0){if(w.s=1/s<0?(s=-s,-1):1,s===~~s){for(E=0,_=s;_>=10;_/=10,E++);E>Ee?w.c=w.e=null:(w.e=E,w.c=[s]);return}y=String(s)}else{if(!t.test(y=String(s)))return Z(w,y,p);w.s=y.charCodeAt(0)==45?(y=y.slice(1),-1):1}(E=y.indexOf("."))>-1&&(y=y.replace(".","")),(_=y.search(/e/i))>0?(E<0&&(E=_),E+=+y.slice(_+1),y=y.substring(0,_)):E<0&&(E=y.length)}else{if(W(u,2,Me.length,"Base"),u==10)return w=new N(s),ae(w,H+w.e+1,K);if(y=String(s),p=typeof s=="number"){if(s*0!=0)return Z(w,y,p,u);if(w.s=1/s<0?(y=y.slice(1),-1):1,N.DEBUG&&y.replace(/^0\.0*|\./,"").length>15)throw Error(a+s)}else w.s=y.charCodeAt(0)===45?(y=y.slice(1),-1):1;for(o=Me.slice(0,u),E=_=0,c=y.length;_<c;_++)if(o.indexOf(d=y.charAt(_))<0){if(d=="."){if(_>E){E=c;continue}}else if(!g&&(y==y.toUpperCase()&&(y=y.toLowerCase())||y==y.toLowerCase()&&(y=y.toUpperCase()))){g=!0,_=-1,E=0;continue}return Z(w,String(s),p,u)}p=!1,y=z(y,u,10,w.s),(E=y.indexOf("."))>-1?y=y.replace(".",""):E=y.length}for(_=0;y.charCodeAt(_)===48;_++);for(c=y.length;y.charCodeAt(--c)===48;);if(y=y.slice(_,++c)){if(c-=_,p&&N.DEBUG&&c>15&&(s>O||s!==i(s)))throw Error(a+w.s*s);if((E=E-_-1)>Ee)w.c=w.e=null;else if(E<ye)w.c=[w.e=0];else{if(w.e=E,w.c=[],_=(E+1)%B,E<0&&(_+=B),_<c){for(_&&w.c.push(+y.slice(0,_)),c-=B;_<c;)w.c.push(+y.slice(_,_+=B));_=B-(y=y.slice(_)).length}else _-=c;for(;_--;y+="0");w.c.push(+y)}}else w.c=[w.e=0]}N.clone=le,N.ROUND_UP=0,N.ROUND_DOWN=1,N.ROUND_CEIL=2,N.ROUND_FLOOR=3,N.ROUND_HALF_UP=4,N.ROUND_HALF_DOWN=5,N.ROUND_HALF_EVEN=6,N.ROUND_HALF_CEIL=7,N.ROUND_HALF_FLOOR=8,N.EUCLID=9,N.config=N.set=function(s){var u,o;if(s!=null)if(typeof s=="object"){if(s.hasOwnProperty(u="DECIMAL_PLACES")&&(o=s[u],W(o,0,q,u),H=o),s.hasOwnProperty(u="ROUNDING_MODE")&&(o=s[u],W(o,0,8,u),K=o),s.hasOwnProperty(u="EXPONENTIAL_AT")&&(o=s[u],o&&o.pop?(W(o[0],-q,0,u),W(o[1],0,q,u),te=o[0],pe=o[1]):(W(o,-q,q,u),te=-(pe=o<0?-o:o))),s.hasOwnProperty(u="RANGE"))if(o=s[u],o&&o.pop)W(o[0],-q,-1,u),W(o[1],1,q,u),ye=o[0],Ee=o[1];else if(W(o,-q,q,u),o)ye=-(Ee=o<0?-o:o);else throw Error(h+u+" cannot be zero: "+o);if(s.hasOwnProperty(u="CRYPTO"))if(o=s[u],o===!!o)if(o)if(typeof crypto!="undefined"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))Se=o;else throw Se=!o,Error(h+"crypto unavailable");else Se=o;else throw Error(h+u+" not true or false: "+o);if(s.hasOwnProperty(u="MODULO_MODE")&&(o=s[u],W(o,0,9,u),he=o),s.hasOwnProperty(u="POW_PRECISION")&&(o=s[u],W(o,0,q,u),xe=o),s.hasOwnProperty(u="FORMAT"))if(o=s[u],typeof o=="object")Ve=o;else throw Error(h+u+" not an object: "+o);if(s.hasOwnProperty(u="ALPHABET"))if(o=s[u],typeof o=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(o))Me=o;else throw Error(h+u+" invalid: "+o)}else throw Error(h+"Object expected: "+s);return{DECIMAL_PLACES:H,ROUNDING_MODE:K,EXPONENTIAL_AT:[te,pe],RANGE:[ye,Ee],CRYPTO:Se,MODULO_MODE:he,POW_PRECISION:xe,FORMAT:Ve,ALPHABET:Me}},N.isBigNumber=function(s){if(!s||s._isBigNumber!==!0)return!1;if(!N.DEBUG)return!0;var u,o,d=s.c,g=s.e,E=s.s;e:if({}.toString.call(d)=="[object Array]"){if((E===1||E===-1)&&g>=-q&&g<=q&&g===i(g)){if(d[0]===0){if(g===0&&d.length===1)return!0;break e}if(u=(g+1)%B,u<1&&(u+=B),String(d[0]).length==u){for(u=0;u<d.length;u++)if(o=d[u],o<0||o>=m||o!==i(o))break e;if(o!==0)return!0}}}else if(d===null&&g===null&&(E===null||E===1||E===-1))return!0;throw Error(h+"Invalid BigNumber: "+s)},N.maximum=N.max=function(){return l(arguments,x.lt)},N.minimum=N.min=function(){return l(arguments,x.gt)},N.random=function(){var s=9007199254740992,u=Math.random()*s&2097151?function(){return i(Math.random()*s)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(o){var d,g,E,_,p,c=0,y=[],w=new N(Q);if(o==null?o=H:W(o,0,q),_=n(o/B),Se)if(crypto.getRandomValues){for(d=crypto.getRandomValues(new Uint32Array(_*=2));c<_;)p=d[c]*131072+(d[c+1]>>>11),p>=9e15?(g=crypto.getRandomValues(new Uint32Array(2)),d[c]=g[0],d[c+1]=g[1]):(y.push(p%1e14),c+=2);c=_/2}else if(crypto.randomBytes){for(d=crypto.randomBytes(_*=7);c<_;)p=(d[c]&31)*281474976710656+d[c+1]*1099511627776+d[c+2]*4294967296+d[c+3]*16777216+(d[c+4]<<16)+(d[c+5]<<8)+d[c+6],p>=9e15?crypto.randomBytes(7).copy(d,c):(y.push(p%1e14),c+=7);c=_/7}else throw Se=!1,Error(h+"crypto unavailable");if(!Se)for(;c<_;)p=u(),p<9e15&&(y[c++]=p%1e14);for(_=y[--c],o%=B,_&&o&&(p=U[B-o],y[c]=i(_/p)*p);y[c]===0;y.pop(),c--);if(c<0)y=[E=0];else{for(E=-1;y[0]===0;y.splice(0,1),E-=B);for(c=1,p=y[0];p>=10;p/=10,c++);c<B&&(E-=B-c)}return w.e=E,w.c=y,w}}(),N.sum=function(){for(var s=1,u=arguments,o=new N(u[0]);s<u.length;)o=o.plus(u[s++]);return o},z=function(){var s="0123456789";function u(o,d,g,E){for(var _,p=[0],c,y=0,w=o.length;y<w;){for(c=p.length;c--;p[c]*=d);for(p[0]+=E.indexOf(o.charAt(y++)),_=0;_<p.length;_++)p[_]>g-1&&(p[_+1]==null&&(p[_+1]=0),p[_+1]+=p[_]/g|0,p[_]%=g)}return p.reverse()}return function(o,d,g,E,_){var p,c,y,w,A,T,S,k,X=o.indexOf("."),j=H,G=K;for(X>=0&&(w=xe,xe=0,o=o.replace(".",""),k=new N(d),T=k.pow(o.length-X),xe=w,k.c=u(Ae(fe(T.c),T.e,"0"),10,g,s),k.e=k.c.length),S=u(o,d,g,_?(p=Me,s):(p=s,Me)),y=w=S.length;S[--w]==0;S.pop());if(!S[0])return p.charAt(0);if(X<0?--y:(T.c=S,T.e=y,T.s=E,T=R(T,k,j,G,g),S=T.c,A=T.r,y=T.e),c=y+j+1,X=S[c],w=g/2,A=A||c<0||S[c+1]!=null,A=G<4?(X!=null||A)&&(G==0||G==(T.s<0?3:2)):X>w||X==w&&(G==4||A||G==6&&S[c-1]&1||G==(T.s<0?8:7)),c<1||!S[0])o=A?Ae(p.charAt(1),-j,p.charAt(0)):p.charAt(0);else{if(S.length=c,A)for(--g;++S[--c]>g;)S[c]=0,c||(++y,S=[1].concat(S));for(w=S.length;!S[--w];);for(X=0,o="";X<=w;o+=p.charAt(S[X++]));o=Ae(o,y,p.charAt(0))}return o}}(),R=function(){function s(d,g,E){var _,p,c,y,w=0,A=d.length,T=g%F,S=g/F|0;for(d=d.slice();A--;)c=d[A]%F,y=d[A]/F|0,_=S*c+y*T,p=T*c+_%F*F+w,w=(p/E|0)+(_/F|0)+S*y,d[A]=p%E;return w&&(d=[w].concat(d)),d}function u(d,g,E,_){var p,c;if(E!=_)c=E>_?1:-1;else for(p=c=0;p<E;p++)if(d[p]!=g[p]){c=d[p]>g[p]?1:-1;break}return c}function o(d,g,E,_){for(var p=0;E--;)d[E]-=p,p=d[E]<g[E]?1:0,d[E]=p*_+d[E]-g[E];for(;!d[0]&&d.length>1;d.splice(0,1));}return function(d,g,E,_,p){var c,y,w,A,T,S,k,X,j,G,$,L,$e,Ze,Qe,_e,De,P=d.s==g.s?1:-1,oe=d.c,V=g.c;if(!oe||!oe[0]||!V||!V[0])return new N(!d.s||!g.s||(oe?V&&oe[0]==V[0]:!V)?NaN:oe&&oe[0]==0||!V?P*0:P/0);for(X=new N(P),j=X.c=[],y=d.e-g.e,P=E+y+1,p||(p=m,y=ie(d.e/B)-ie(g.e/B),P=P/B|0),w=0;V[w]==(oe[w]||0);w++);if(V[w]>(oe[w]||0)&&y--,P<0)j.push(1),A=!0;else{for(Ze=oe.length,_e=V.length,w=0,P+=2,T=i(p/(V[0]+1)),T>1&&(V=s(V,T,p),oe=s(oe,T,p),_e=V.length,Ze=oe.length),$e=_e,G=oe.slice(0,_e),$=G.length;$<_e;G[$++]=0);De=V.slice(),De=[0].concat(De),Qe=V[0],V[1]>=p/2&&Qe++;do{if(T=0,c=u(V,G,_e,$),c<0){if(L=G[0],_e!=$&&(L=L*p+(G[1]||0)),T=i(L/Qe),T>1)for(T>=p&&(T=p-1),S=s(V,T,p),k=S.length,$=G.length;u(S,G,k,$)==1;)T--,o(S,_e<k?De:V,k,p),k=S.length,c=1;else T==0&&(c=T=1),S=V.slice(),k=S.length;if(k<$&&(S=[0].concat(S)),o(G,S,$,p),$=G.length,c==-1)for(;u(V,G,_e,$)<1;)T++,o(G,_e<$?De:V,$,p),$=G.length}else c===0&&(T++,G=[0]);j[w++]=T,G[0]?G[$++]=oe[$e]||0:(G=[oe[$e]],$=1)}while(($e++<Ze||G[0]!=null)&&P--);A=G[0]!=null,j[0]||j.splice(0,1)}if(p==m){for(w=1,P=j[0];P>=10;P/=10,w++);ae(X,E+(X.e=w+y*B-1)+1,_,A)}else X.e=y,X.r=+A;return X}}();function Je(s,u,o,d){var g,E,_,p,c;if(o==null?o=K:W(o,0,8),!s.c)return s.toString();if(g=s.c[0],_=s.e,u==null)c=fe(s.c),c=d==1||d==2&&(_<=te||_>=pe)?be(c,_):Ae(c,_,"0");else if(s=ae(new N(s),u,o),E=s.e,c=fe(s.c),p=c.length,d==1||d==2&&(u<=E||E<=te)){for(;p<u;c+="0",p++);c=be(c,E)}else if(u-=_,c=Ae(c,E,"0"),E+1>p){if(--u>0)for(c+=".";u--;c+="0");}else if(u+=E-p,u>0)for(E+1==p&&(c+=".");u--;c+="0");return s.s<0&&g?"-"+c:c}function l(s,u){for(var o,d=1,g=new N(s[0]);d<s.length;d++)if(o=new N(s[d]),o.s)u.call(g,o)&&(g=o);else{g=o;break}return g}function Pe(s,u,o){for(var d=1,g=u.length;!u[--g];u.pop());for(g=u[0];g>=10;g/=10,d++);return(o=d+o*B-1)>Ee?s.c=s.e=null:o<ye?s.c=[s.e=0]:(s.e=o,s.c=u),s}Z=function(){var s=/^(-?)0([xbo])(?=\w[\w.]*$)/i,u=/^([^.]+)\.$/,o=/^\.([^.]+)$/,d=/^-?(Infinity|NaN)$/,g=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(E,_,p,c){var y,w=p?_:_.replace(g,"");if(d.test(w))E.s=isNaN(w)?null:w<0?-1:1;else{if(!p&&(w=w.replace(s,function(A,T,S){return y=(S=S.toLowerCase())=="x"?16:S=="b"?2:8,!c||c==y?T:A}),c&&(y=c,w=w.replace(u,"$1").replace(o,"0.$1")),_!=w))return new N(w,y);if(N.DEBUG)throw Error(h+"Not a"+(c?" base "+c:"")+" number: "+_);E.s=null}E.c=E.e=null}}();function ae(s,u,o,d){var g,E,_,p,c,y,w,A=s.c,T=U;if(A){e:{for(g=1,p=A[0];p>=10;p/=10,g++);if(E=u-g,E<0)E+=B,_=u,c=A[y=0],w=c/T[g-_-1]%10|0;else if(y=n((E+1)/B),y>=A.length)if(d){for(;A.length<=y;A.push(0));c=w=0,g=1,E%=B,_=E-B+1}else break e;else{for(c=p=A[y],g=1;p>=10;p/=10,g++);E%=B,_=E-B+g,w=_<0?0:c/T[g-_-1]%10|0}if(d=d||u<0||A[y+1]!=null||(_<0?c:c%T[g-_-1]),d=o<4?(w||d)&&(o==0||o==(s.s<0?3:2)):w>5||w==5&&(o==4||d||o==6&&(E>0?_>0?c/T[g-_]:0:A[y-1])%10&1||o==(s.s<0?8:7)),u<1||!A[0])return A.length=0,d?(u-=s.e+1,A[0]=T[(B-u%B)%B],s.e=-u||0):A[0]=s.e=0,s;if(E==0?(A.length=y,p=1,y--):(A.length=y+1,p=T[B-E],A[y]=_>0?i(c/T[g-_]%T[_])*p:0),d)for(;;)if(y==0){for(E=1,_=A[0];_>=10;_/=10,E++);for(_=A[0]+=p,p=1;_>=10;_/=10,p++);E!=p&&(s.e++,A[0]==m&&(A[0]=1));break}else{if(A[y]+=p,A[y]!=m)break;A[y--]=0,p=1}for(E=A.length;A[--E]===0;A.pop());}s.e>Ee?s.c=s.e=null:s.e<ye&&(s.c=[s.e=0])}return s}function me(s){var u,o=s.e;return o===null?s.toString():(u=fe(s.c),u=o<=te||o>=pe?be(u,o):Ae(u,o,"0"),s.s<0?"-"+u:u)}return x.absoluteValue=x.abs=function(){var s=new N(this);return s.s<0&&(s.s=1),s},x.comparedTo=function(s,u){return Oe(this,new N(s,u))},x.decimalPlaces=x.dp=function(s,u){var o,d,g,E=this;if(s!=null)return W(s,0,q),u==null?u=K:W(u,0,8),ae(new N(E),s+E.e+1,u);if(!(o=E.c))return null;if(d=((g=o.length-1)-ie(this.e/B))*B,g=o[g])for(;g%10==0;g/=10,d--);return d<0&&(d=0),d},x.dividedBy=x.div=function(s,u){return R(this,new N(s,u),H,K)},x.dividedToIntegerBy=x.idiv=function(s,u){return R(this,new N(s,u),0,1)},x.exponentiatedBy=x.pow=function(s,u){var o,d,g,E,_,p,c,y,w,A=this;if(s=new N(s),s.c&&!s.isInteger())throw Error(h+"Exponent not an integer: "+me(s));if(u!=null&&(u=new N(u)),p=s.e>14,!A.c||!A.c[0]||A.c[0]==1&&!A.e&&A.c.length==1||!s.c||!s.c[0])return w=new N(Math.pow(+me(A),p?2-ke(s):+me(s))),u?w.mod(u):w;if(c=s.s<0,u){if(u.c?!u.c[0]:!u.s)return new N(NaN);d=!c&&A.isInteger()&&u.isInteger(),d&&(A=A.mod(u))}else{if(s.e>9&&(A.e>0||A.e<-1||(A.e==0?A.c[0]>1||p&&A.c[1]>=24e7:A.c[0]<8e13||p&&A.c[0]<=9999975e7)))return E=(A.s<0&&ke(s),-0),A.e>-1&&(E=1/E),new N(c?1/E:E);xe&&(E=n(xe/B+2))}for(p?(o=new N(.5),c&&(s.s=1),y=ke(s)):(g=Math.abs(+me(s)),y=g%2),w=new N(Q);;){if(y){if(w=w.times(A),!w.c)break;E?w.c.length>E&&(w.c.length=E):d&&(w=w.mod(u))}if(g){if(g=i(g/2),g===0)break;y=g%2}else if(s=s.times(o),ae(s,s.e+1,1),s.e>14)y=ke(s);else{if(g=+me(s),g===0)break;y=g%2}A=A.times(A),E?A.c&&A.c.length>E&&(A.c.length=E):d&&(A=A.mod(u))}return d?w:(c&&(w=Q.div(w)),u?w.mod(u):E?ae(w,xe,K,_):w)},x.integerValue=function(s){var u=new N(this);return s==null?s=K:W(s,0,8),ae(u,u.e+1,s)},x.isEqualTo=x.eq=function(s,u){return Oe(this,new N(s,u))===0},x.isFinite=function(){return!!this.c},x.isGreaterThan=x.gt=function(s,u){return Oe(this,new N(s,u))>0},x.isGreaterThanOrEqualTo=x.gte=function(s,u){return(u=Oe(this,new N(s,u)))===1||u===0},x.isInteger=function(){return!!this.c&&ie(this.e/B)>this.c.length-2},x.isLessThan=x.lt=function(s,u){return Oe(this,new N(s,u))<0},x.isLessThanOrEqualTo=x.lte=function(s,u){return(u=Oe(this,new N(s,u)))===-1||u===0},x.isNaN=function(){return!this.s},x.isNegative=function(){return this.s<0},x.isPositive=function(){return this.s>0},x.isZero=function(){return!!this.c&&this.c[0]==0},x.minus=function(s,u){var o,d,g,E,_=this,p=_.s;if(s=new N(s,u),u=s.s,!p||!u)return new N(NaN);if(p!=u)return s.s=-u,_.plus(s);var c=_.e/B,y=s.e/B,w=_.c,A=s.c;if(!c||!y){if(!w||!A)return w?(s.s=-u,s):new N(A?_:NaN);if(!w[0]||!A[0])return A[0]?(s.s=-u,s):new N(w[0]?_:(K==3,-0))}if(c=ie(c),y=ie(y),w=w.slice(),p=c-y){for((E=p<0)?(p=-p,g=w):(y=c,g=A),g.reverse(),u=p;u--;g.push(0));g.reverse()}else for(d=(E=(p=w.length)<(u=A.length))?p:u,p=u=0;u<d;u++)if(w[u]!=A[u]){E=w[u]<A[u];break}if(E&&(g=w,w=A,A=g,s.s=-s.s),u=(d=A.length)-(o=w.length),u>0)for(;u--;w[o++]=0);for(u=m-1;d>p;){if(w[--d]<A[d]){for(o=d;o&&!w[--o];w[o]=u);--w[o],w[d]+=m}w[d]-=A[d]}for(;w[0]==0;w.splice(0,1),--y);return w[0]?Pe(s,w,y):(s.s=K==3?-1:1,s.c=[s.e=0],s)},x.modulo=x.mod=function(s,u){var o,d,g=this;return s=new N(s,u),!g.c||!s.s||s.c&&!s.c[0]?new N(NaN):!s.c||g.c&&!g.c[0]?new N(g):(he==9?(d=s.s,s.s=1,o=R(g,s,0,3),s.s=d,o.s*=d):o=R(g,s,0,he),s=g.minus(o.times(s)),!s.c[0]&&he==1&&(s.s=g.s),s)},x.multipliedBy=x.times=function(s,u){var o,d,g,E,_,p,c,y,w,A,T,S,k,X,j,G=this,$=G.c,L=(s=new N(s,u)).c;if(!$||!L||!$[0]||!L[0])return!G.s||!s.s||$&&!$[0]&&!L||L&&!L[0]&&!$?s.c=s.e=s.s=null:(s.s*=G.s,!$||!L?s.c=s.e=null:(s.c=[0],s.e=0)),s;for(d=ie(G.e/B)+ie(s.e/B),s.s*=G.s,c=$.length,A=L.length,c<A&&(k=$,$=L,L=k,g=c,c=A,A=g),g=c+A,k=[];g--;k.push(0));for(X=m,j=F,g=A;--g>=0;){for(o=0,T=L[g]%j,S=L[g]/j|0,_=c,E=g+_;E>g;)y=$[--_]%j,w=$[_]/j|0,p=S*y+w*T,y=T*y+p%j*j+k[E]+o,o=(y/X|0)+(p/j|0)+S*w,k[E--]=y%X;k[E]=o}return o?++d:k.splice(0,1),Pe(s,k,d)},x.negated=function(){var s=new N(this);return s.s=-s.s||null,s},x.plus=function(s,u){var o,d=this,g=d.s;if(s=new N(s,u),u=s.s,!g||!u)return new N(NaN);if(g!=u)return s.s=-u,d.minus(s);var E=d.e/B,_=s.e/B,p=d.c,c=s.c;if(!E||!_){if(!p||!c)return new N(g/0);if(!p[0]||!c[0])return c[0]?s:new N(p[0]?d:g*0)}if(E=ie(E),_=ie(_),p=p.slice(),g=E-_){for(g>0?(_=E,o=c):(g=-g,o=p),o.reverse();g--;o.push(0));o.reverse()}for(g=p.length,u=c.length,g-u<0&&(o=c,c=p,p=o,u=g),g=0;u;)g=(p[--u]=p[u]+c[u]+g)/m|0,p[u]=m===p[u]?0:p[u]%m;return g&&(p=[g].concat(p),++_),Pe(s,p,_)},x.precision=x.sd=function(s,u){var o,d,g,E=this;if(s!=null&&s!==!!s)return W(s,1,q),u==null?u=K:W(u,0,8),ae(new N(E),s,u);if(!(o=E.c))return null;if(g=o.length-1,d=g*B+1,g=o[g]){for(;g%10==0;g/=10,d--);for(g=o[0];g>=10;g/=10,d++);}return s&&E.e+1>d&&(d=E.e+1),d},x.shiftedBy=function(s){return W(s,-O,O),this.times("1e"+s)},x.squareRoot=x.sqrt=function(){var s,u,o,d,g,E=this,_=E.c,p=E.s,c=E.e,y=H+4,w=new N("0.5");if(p!==1||!_||!_[0])return new N(!p||p<0&&(!_||_[0])?NaN:_?E:1/0);if(p=Math.sqrt(+me(E)),p==0||p==1/0?(u=fe(_),(u.length+c)%2==0&&(u+="0"),p=Math.sqrt(+u),c=ie((c+1)/2)-(c<0||c%2),p==1/0?u="5e"+c:(u=p.toExponential(),u=u.slice(0,u.indexOf("e")+1)+c),o=new N(u)):o=new N(p+""),o.c[0]){for(c=o.e,p=c+y,p<3&&(p=0);;)if(g=o,o=w.times(g.plus(R(E,g,y,1))),fe(g.c).slice(0,p)===(u=fe(o.c)).slice(0,p))if(o.e<c&&--p,u=u.slice(p-3,p+1),u=="9999"||!d&&u=="4999"){if(!d&&(ae(g,g.e+H+2,0),g.times(g).eq(E))){o=g;break}y+=4,p+=4,d=1}else{(!+u||!+u.slice(1)&&u.charAt(0)=="5")&&(ae(o,o.e+H+2,1),s=!o.times(o).eq(E));break}}return ae(o,o.e+H+1,K,s)},x.toExponential=function(s,u){return s!=null&&(W(s,0,q),s++),Je(this,s,u,1)},x.toFixed=function(s,u){return s!=null&&(W(s,0,q),s=s+this.e+1),Je(this,s,u)},x.toFormat=function(s,u,o){var d,g=this;if(o==null)s!=null&&u&&typeof u=="object"?(o=u,u=null):s&&typeof s=="object"?(o=s,s=u=null):o=Ve;else if(typeof o!="object")throw Error(h+"Argument not an object: "+o);if(d=g.toFixed(s,u),g.c){var E,_=d.split("."),p=+o.groupSize,c=+o.secondaryGroupSize,y=o.groupSeparator||"",w=_[0],A=_[1],T=g.s<0,S=T?w.slice(1):w,k=S.length;if(c&&(E=p,p=c,c=E,k-=E),p>0&&k>0){for(E=k%p||p,w=S.substr(0,E);E<k;E+=p)w+=y+S.substr(E,p);c>0&&(w+=y+S.slice(E)),T&&(w="-"+w)}d=A?w+(o.decimalSeparator||"")+((c=+o.fractionGroupSize)?A.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(o.fractionGroupSeparator||"")):A):w}return(o.prefix||"")+d+(o.suffix||"")},x.toFraction=function(s){var u,o,d,g,E,_,p,c,y,w,A,T,S=this,k=S.c;if(s!=null&&(p=new N(s),!p.isInteger()&&(p.c||p.s!==1)||p.lt(Q)))throw Error(h+"Argument "+(p.isInteger()?"out of range: ":"not an integer: ")+me(p));if(!k)return new N(S);for(u=new N(Q),y=o=new N(Q),d=c=new N(Q),T=fe(k),E=u.e=T.length-S.e-1,u.c[0]=U[(_=E%B)<0?B+_:_],s=!s||p.comparedTo(u)>0?E>0?u:y:p,_=Ee,Ee=1/0,p=new N(T),c.c[0]=0;w=R(p,u,0,1),g=o.plus(w.times(d)),g.comparedTo(s)!=1;)o=d,d=g,y=c.plus(w.times(g=y)),c=g,u=p.minus(w.times(g=u)),p=g;return g=R(s.minus(o),d,0,1),c=c.plus(g.times(y)),o=o.plus(g.times(d)),c.s=y.s=S.s,E=E*2,A=R(y,d,E,K).minus(S).abs().comparedTo(R(c,o,E,K).minus(S).abs())<1?[y,d]:[c,o],Ee=_,A},x.toNumber=function(){return+me(this)},x.toPrecision=function(s,u){return s!=null&&W(s,1,q),Je(this,s,u,2)},x.toString=function(s){var u,o=this,d=o.s,g=o.e;return g===null?d?(u="Infinity",d<0&&(u="-"+u)):u="NaN":(s==null?u=g<=te||g>=pe?be(fe(o.c),g):Ae(fe(o.c),g,"0"):s===10?(o=ae(new N(o),H+g+1,K),u=Ae(fe(o.c),o.e,"0")):(W(s,2,Me.length,"Base"),u=z(Ae(fe(o.c),g,"0"),10,s,d,!0)),d<0&&o.c[0]&&(u="-"+u)),u},x.valueOf=x.toJSON=function(){return me(this)},x._isBigNumber=!0,M!=null&&N.set(M),N}function ie(M){var R=M|0;return M>0||M===R?R:R-1}function fe(M){for(var R,z,Z=1,x=M.length,Q=M[0]+"";Z<x;){for(R=M[Z++]+"",z=B-R.length;z--;R="0"+R);Q+=R}for(x=Q.length;Q.charCodeAt(--x)===48;);return Q.slice(0,x+1||1)}function Oe(M,R){var z,Z,x=M.c,Q=R.c,H=M.s,K=R.s,te=M.e,pe=R.e;if(!H||!K)return null;if(z=x&&!x[0],Z=Q&&!Q[0],z||Z)return z?Z?0:-K:H;if(H!=K)return H;if(z=H<0,Z=te==pe,!x||!Q)return Z?0:!x^z?1:-1;if(!Z)return te>pe^z?1:-1;for(K=(te=x.length)<(pe=Q.length)?te:pe,H=0;H<K;H++)if(x[H]!=Q[H])return x[H]>Q[H]^z?1:-1;return te==pe?0:te>pe^z?1:-1}function W(M,R,z,Z){if(M<R||M>z||M!==i(M))throw Error(h+(Z||"Argument")+(typeof M=="number"?M<R||M>z?" out of range: ":" not an integer: ":" not a primitive number: ")+String(M))}function ke(M){var R=M.c.length-1;return ie(M.e/B)==R&&M.c[R]%2!=0}function be(M,R){return(M.length>1?M.charAt(0)+"."+M.slice(1):M)+(R<0?"e":"e+")+R}function Ae(M,R,z){var Z,x;if(R<0){for(x=z+".";++R;x+=z);M=x+M}else if(Z=M.length,++R>Z){for(x=z,R-=Z;--R;x+=z);M+=x}else R<Z&&(M=M.slice(0,R)+"."+M.slice(R));return M}e=le(),e.default=e.BigNumber=e,typeof define=="function"&&define.amd?define(function(){return e}):typeof lt!="undefined"&&lt.exports?lt.exports=e:(r||(r=typeof self!="undefined"&&self?self:window),r.BigNumber=e)})(nr)});var sr=ce((mi,ir)=>{ir.exports=function(e,t,n){var i=new e.Uint8Array(n),h=t.pushInt,a=t.pushInt32,m=t.pushInt32Neg,B=t.pushInt64,O=t.pushInt64Neg,U=t.pushFloat,F=t.pushFloatSingle,q=t.pushFloatDouble,le=t.pushTrue,ie=t.pushFalse,fe=t.pushUndefined,Oe=t.pushNull,W=t.pushInfinity,ke=t.pushInfinityNeg,be=t.pushNaN,Ae=t.pushNaNNeg,M=t.pushArrayStart,R=t.pushArrayStartFixed,z=t.pushArrayStartFixed32,Z=t.pushArrayStartFixed64,x=t.pushObjectStart,Q=t.pushObjectStartFixed,H=t.pushObjectStartFixed32,K=t.pushObjectStartFixed64,te=t.pushByteString,pe=t.pushByteStringStart,ye=t.pushUtf8String,Ee=t.pushUtf8StringStart,Se=t.pushSimpleUnassigned,he=t.pushTagStart,xe=t.pushTagStart4,Ve=t.pushTagStart8,Me=t.pushTagUnassigned,N=t.pushBreak,Je=e.Math.pow,l=0,Pe=0,ae=0;function me(f){for(f=f|0,l=0,Pe=f;(l|0)<(Pe|0)&&(ae=Vr[i[l]&255](i[l]|0)|0,!((ae|0)>0)););return ae|0}function s(f){return f=f|0,((l|0)+(f|0)|0)<(Pe|0)?0:1}function u(f){return f=f|0,i[f|0]<<8|i[f+1|0]|0}function o(f){return f=f|0,i[f|0]<<24|i[f+1|0]<<16|i[f+2|0]<<8|i[f+3|0]|0}function d(f){return f=f|0,h(f|0),l=l+1|0,0}function g(f){return f=f|0,s(1)|0?1:(h(i[l+1|0]|0),l=l+2|0,0)}function E(f){return f=f|0,s(2)|0?1:(h(u(l+1|0)|0),l=l+3|0,0)}function _(f){return f=f|0,s(4)|0?1:(a(u(l+1|0)|0,u(l+3|0)|0),l=l+5|0,0)}function p(f){return f=f|0,s(8)|0?1:(B(u(l+1|0)|0,u(l+3|0)|0,u(l+5|0)|0,u(l+7|0)|0),l=l+9|0,0)}function c(f){return f=f|0,h(-1-(f-32|0)|0),l=l+1|0,0}function y(f){return f=f|0,s(1)|0?1:(h(-1-(i[l+1|0]|0)|0),l=l+2|0,0)}function w(f){f=f|0;var C=0;return s(2)|0?1:(C=u(l+1|0)|0,h(-1-(C|0)|0),l=l+3|0,0)}function A(f){return f=f|0,s(4)|0?1:(m(u(l+1|0)|0,u(l+3|0)|0),l=l+5|0,0)}function T(f){return f=f|0,s(8)|0?1:(O(u(l+1|0)|0,u(l+3|0)|0,u(l+5|0)|0,u(l+7|0)|0),l=l+9|0,0)}function S(f){f=f|0;var C=0,b=0,D=0;return D=f-64|0,s(D|0)|0?1:(C=l+1|0,b=(l+1|0)+(D|0)|0,te(C|0,b|0),l=b|0,0)}function k(f){f=f|0;var C=0,b=0,D=0;return s(1)|0||(D=i[l+1|0]|0,C=l+2|0,b=(l+2|0)+(D|0)|0,s(D+1|0)|0)?1:(te(C|0,b|0),l=b|0,0)}function X(f){f=f|0;var C=0,b=0,D=0;return s(2)|0||(D=u(l+1|0)|0,C=l+3|0,b=(l+3|0)+(D|0)|0,s(D+2|0)|0)?1:(te(C|0,b|0),l=b|0,0)}function j(f){f=f|0;var C=0,b=0,D=0;return s(4)|0||(D=o(l+1|0)|0,C=l+5|0,b=(l+5|0)+(D|0)|0,s(D+4|0)|0)?1:(te(C|0,b|0),l=b|0,0)}function G(f){return f=f|0,1}function $(f){return f=f|0,pe(),l=l+1|0,0}function L(f){f=f|0;var C=0,b=0,D=0;return D=f-96|0,s(D|0)|0?1:(C=l+1|0,b=(l+1|0)+(D|0)|0,ye(C|0,b|0),l=b|0,0)}function $e(f){f=f|0;var C=0,b=0,D=0;return s(1)|0||(D=i[l+1|0]|0,C=l+2|0,b=(l+2|0)+(D|0)|0,s(D+1|0)|0)?1:(ye(C|0,b|0),l=b|0,0)}function Ze(f){f=f|0;var C=0,b=0,D=0;return s(2)|0||(D=u(l+1|0)|0,C=l+3|0,b=(l+3|0)+(D|0)|0,s(D+2|0)|0)?1:(ye(C|0,b|0),l=b|0,0)}function Qe(f){f=f|0;var C=0,b=0,D=0;return s(4)|0||(D=o(l+1|0)|0,C=l+5|0,b=(l+5|0)+(D|0)|0,s(D+4|0)|0)?1:(ye(C|0,b|0),l=b|0,0)}function _e(f){return f=f|0,1}function De(f){return f=f|0,Ee(),l=l+1|0,0}function P(f){return f=f|0,R(f-128|0),l=l+1|0,0}function oe(f){return f=f|0,s(1)|0?1:(R(i[l+1|0]|0),l=l+2|0,0)}function V(f){return f=f|0,s(2)|0?1:(R(u(l+1|0)|0),l=l+3|0,0)}function Fr(f){return f=f|0,s(4)|0?1:(z(u(l+1|0)|0,u(l+3