diff --git a/node_modules/algosdk/dist/browser/algosdk.min.js b/node_modules/algosdk/dist/browser/algosdk.min.js index 0508cb6..66d8a62 100644 --- a/node_modules/algosdk/dist/browser/algosdk.min.js +++ b/node_modules/algosdk/dist/browser/algosdk.min.js @@ -1,3 +1,4 @@ /*! For license information please see algosdk.min.js.LICENSE.txt */ +globalThis.Buffer = require('buffer/').Buffer; !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.algosdk=t():e.algosdk=t()}(self,(function(){return(()=>{var __webpack_modules__={5406:function(e){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";r.r(t),r.d(t,"encode",(function(){return U})),r.d(t,"decode",(function(){return H})),r.d(t,"decodeAsync",(function(){return W})),r.d(t,"decodeArrayStream",(function(){return X})),r.d(t,"decodeStream",(function(){return Y})),r.d(t,"Decoder",(function(){return j})),r.d(t,"Encoder",(function(){return _})),r.d(t,"ExtensionCodec",(function(){return S})),r.d(t,"ExtData",(function(){return f})),r.d(t,"EXT_TIMESTAMP",(function(){return y})),r.d(t,"encodeDateToTimeSpec",(function(){return b})),r.d(t,"encodeTimeSpecToTimestamp",(function(){return m})),r.d(t,"decodeTimestampToTimeSpec",(function(){return w})),r.d(t,"encodeTimestampExtension",(function(){return A})),r.d(t,"decodeTimestampExtension",(function(){return v}));var n=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},o=function(){for(var e=[],t=0;t=55296&&o<=56319&&n65535&&(h-=65536,s.push(h>>>10&1023|55296),h=56320|1023&h),s.push(h)}else s.push(c);s.length>=4096&&(a+=String.fromCharCode.apply(String,o(s)),s.length=0)}return s.length>0&&(a+=String.fromCharCode.apply(String,o(s))),a}var h=i?new TextDecoder:null,p="undefined"!=typeof process?200:0,f=function(e,t){this.type=e,this.data=t};function d(e,t,r){var n=Math.floor(r/4294967296),o=r;e.setUint32(t,n),e.setUint32(t+4,o)}function g(e,t){var r=e.getInt32(t),n=e.getUint32(t+4),o=rMath.floor(Number.MAX_SAFE_INTEGER/4294967296);return o||i?BigInt(r)*BigInt(4294967296)+BigInt(n):4294967296*r+n}var y=-1;function m(e){var t,r=e.sec,n=e.nsec;if(r>=0&&n>=0&&r<=17179869183){if(0===n&&r<=4294967295){var o=new Uint8Array(4);return(t=new DataView(o.buffer)).setUint32(0,r),o}var i=r/4294967296,s=4294967295&r;return o=new Uint8Array(8),(t=new DataView(o.buffer)).setUint32(0,n<<2|3&i),t.setUint32(4,s),o}return o=new Uint8Array(12),(t=new DataView(o.buffer)).setUint32(0,n),d(t,4,r),o}function b(e){var t=e.getTime(),r=Math.floor(t/1e3),n=1e6*(t-1e3*r),o=Math.floor(n/1e9);return{sec:r+o,nsec:n-1e9*o}}function A(e){return e instanceof Date?m(b(e)):null}function w(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 4:return{sec:t.getUint32(0),nsec:0};case 8:var r=t.getUint32(0);return{sec:4294967296*(3&r)+t.getUint32(4),nsec:r>>>2};case 12:return{sec:g(t,4),nsec:t.getUint32(0)};default:throw new Error("Unrecognized data size for timestamp: "+e.length)}}function v(e){var t=w(e);return new Date(1e3*t.sec+t.nsec/1e6)}var x={type:y,encode:A,decode:v},S=function(){function e(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(x)}return e.prototype.register=function(e){var t=e.type,r=e.encode,n=e.decode;if(t>=0)this.encoders[t]=r,this.decoders[t]=n;else{var o=1+t;this.builtInEncoders[o]=r,this.builtInDecoders[o]=n}},e.prototype.tryToEncode=function(e,t){for(var r=0;r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},_=function(){function e(e,t,r,n,o,i,s,a){void 0===e&&(e=S.defaultCodec),void 0===t&&(t=void 0),void 0===r&&(r=100),void 0===n&&(n=2048),void 0===o&&(o=!1),void 0===i&&(i=!1),void 0===s&&(s=!1),void 0===a&&(a=!1),this.extensionCodec=e,this.context=t,this.maxDepth=r,this.initialBufferSize=n,this.sortKeys=o,this.forceFloat32=i,this.ignoreUndefined=s,this.forceIntegerToFloat=a,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}return e.prototype.getUint8Array=function(){return this.bytes.subarray(0,this.pos)},e.prototype.reinitializeState=function(){this.pos=0},e.prototype.encode=function(e){return this.reinitializeState(),this.doEncode(e,1),this.getUint8Array()},e.prototype.doEncode=function(e,t){if(t>this.maxDepth)throw new Error("Too deep objects in depth "+t);null==e?this.encodeNil():"boolean"==typeof e?this.encodeBoolean(e):"number"==typeof e?this.encodeNumber(e):"string"==typeof e?this.encodeString(e):"bigint"==typeof e?this.encodebigint(e):this.encodeObject(e,t)},e.prototype.ensureBufferSizeToWrite=function(e){var t=this.pos+e;this.view.byteLength=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):(this.writeU8(211),this.writeI64(e)):this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))},e.prototype.encodebigint=function(e){e>=BigInt(0)?e=BigInt(-32)?this.writeU8(224|Number(e)+32):e>=BigInt(-128)?(this.writeU8(208),this.writeI8(Number(e))):e>=BigInt(-32768)?(this.writeU8(209),this.writeI16(Number(e))):e>=BigInt(-2147483648)?(this.writeU8(210),this.writeI32(Number(e))):(this.writeU8(211),this.writeBig64(e))},e.prototype.writeStringHeader=function(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else{if(!(e<4294967296))throw new Error("Too long string: "+e+" bytes in UTF-8");this.writeU8(219),this.writeU32(e)}},e.prototype.encodeString=function(e){var t=e.length;if(i&&t>c){var r=s(e);this.ensureBufferSizeToWrite(5+r),this.writeStringHeader(r),u(e,this.bytes,this.pos),this.pos+=r}else r=s(e),this.ensureBufferSizeToWrite(5+r),this.writeStringHeader(r),function(e,t,r){for(var n=e.length,o=r,i=0;i>6&31|192;else{if(s>=55296&&s<=56319&&i>12&15|224,t[o++]=s>>6&63|128):(t[o++]=s>>18&7|240,t[o++]=s>>12&63|128,t[o++]=s>>6&63|128)}t[o++]=63&s|128}else t[o++]=s}}(e,this.bytes,this.pos),this.pos+=r},e.prototype.encodeObject=function(e,t){var r=this.extensionCodec.tryToEncode(e,this.context);if(null!=r)this.encodeExtension(r);else if(Array.isArray(e))this.encodeArray(e,t);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else{if("object"!=typeof e)throw new Error("Unrecognized object: "+Object.prototype.toString.apply(e));this.encodeMap(e,t)}},e.prototype.encodeBinary=function(e){var t=e.byteLength;if(t<256)this.writeU8(196),this.writeU8(t);else if(t<65536)this.writeU8(197),this.writeU16(t);else{if(!(t<4294967296))throw new Error("Too large binary: "+t);this.writeU8(198),this.writeU32(t)}var r=E(e);this.writeU8a(r)},e.prototype.encodeArray=function(e,t){var r,n,o=e.length;if(o<16)this.writeU8(144+o);else if(o<65536)this.writeU8(220),this.writeU16(o);else{if(!(o<4294967296))throw new Error("Too large array: "+o);this.writeU8(221),this.writeU32(o)}try{for(var i=T(e),s=i.next();!s.done;s=i.next()){var a=s.value;this.doEncode(a,t+1)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},e.prototype.countWithoutUndefined=function(e,t){var r,n,o=0;try{for(var i=T(t),s=i.next();!s.done;s=i.next())void 0!==e[s.value]&&o++}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return o},e.prototype.encodeMap=function(e,t){var r,n,o=Object.keys(e);this.sortKeys&&o.sort();var i=this.ignoreUndefined?this.countWithoutUndefined(e,o):o.length;if(i<16)this.writeU8(128+i);else if(i<65536)this.writeU8(222),this.writeU16(i);else{if(!(i<4294967296))throw new Error("Too large map object: "+i);this.writeU8(223),this.writeU32(i)}try{for(var s=T(o),a=s.next();!a.done;a=s.next()){var c=a.value,u=e[c];this.ignoreUndefined&&void 0===u||(this.encodeString(c),this.doEncode(u,t+1))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}},e.prototype.encodeExtension=function(e){var t=e.data.length;if(1===t)this.writeU8(212);else if(2===t)this.writeU8(213);else if(4===t)this.writeU8(214);else if(8===t)this.writeU8(215);else if(16===t)this.writeU8(216);else if(t<256)this.writeU8(199),this.writeU8(t);else if(t<65536)this.writeU8(200),this.writeU16(t);else{if(!(t<4294967296))throw new Error("Too large extension object: "+t);this.writeU8(201),this.writeU32(t)}this.writeI8(e.type),this.writeU8a(e.data)},e.prototype.writeU8=function(e){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,e),this.pos++},e.prototype.writeU8a=function(e){var t=e.length;this.ensureBufferSizeToWrite(t),this.bytes.set(e,this.pos),this.pos+=t},e.prototype.writeI8=function(e){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,e),this.pos++},e.prototype.writeU16=function(e){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,e),this.pos+=2},e.prototype.writeI16=function(e){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,e),this.pos+=2},e.prototype.writeU32=function(e){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,e),this.pos+=4},e.prototype.writeI32=function(e){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,e),this.pos+=4},e.prototype.writeF32=function(e){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,e),this.pos+=4},e.prototype.writeF64=function(e){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,e),this.pos+=8},e.prototype.writeU64=function(e){this.ensureBufferSizeToWrite(8),function(e,t,r){var n=r/4294967296,o=r;e.setUint32(t,n),e.setUint32(t+4,o)}(this.view,this.pos,e),this.pos+=8},e.prototype.writeI64=function(e){this.ensureBufferSizeToWrite(8),d(this.view,this.pos,e),this.pos+=8},e.prototype.writeBig64=function(e){this.ensureBufferSizeToWrite(8),function(e,t,r){var n=Number(r/BigInt(4294967296)),o=Number(r%BigInt(4294967296));n<0&&0!==o&&(n-=1),e.setUint32(t,n),e.setUint32(t+4,o)}(this.view,this.pos,e),this.pos+=8},e}(),B={};function U(e,t){return void 0===t&&(t=B),new _(t.extensionCodec,t.context,t.maxDepth,t.initialBufferSize,t.sortKeys,t.forceFloat32,t.ignoreUndefined,t.forceIntegerToFloat).encode(e)}function k(e){return(e<0?"-":"")+"0x"+Math.abs(e).toString(16).padStart(2,"0")}var I=function(){function e(e,t){void 0===e&&(e=16),void 0===t&&(t=16),this.maxKeyLength=e,this.maxLengthPerKey=t,this.hit=0,this.miss=0,this.caches=[];for(var r=0;r0&&e<=this.maxKeyLength},e.prototype.get=function(e,t,r){var n=this.caches[r-1],o=n.length;e:for(var i=0;i=this.maxLengthPerKey?r[Math.random()*r.length|0]=n:r.push(n)},e.prototype.decode=function(e,t,r){var n=this.get(e,t,r);if(null!=n)return this.hit++,n;this.miss++;var o=l(e,t,r),i=Uint8Array.prototype.slice.call(e,t,t+r);return this.store(i,o),o},e}(),C=function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]1||a(e,t)}))})}function a(e,t){try{(r=o[e](t)).value instanceof O?Promise.resolve(r.value.v).then(c,u):l(i[0][2],r)}catch(e){l(i[0][3],e)}var r}function c(e){a("next",e)}function u(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}},N=new DataView(new ArrayBuffer(0)),P=new Uint8Array(N.buffer),L=function(){try{N.getInt8(0)}catch(e){return e.constructor}throw new Error("never reached")}(),F=new L("Insufficient data"),z=new I,j=function(){function e(e,t,r,n,o,i,s,a){void 0===e&&(e=S.defaultCodec),void 0===t&&(t=void 0),void 0===r&&(r=4294967295),void 0===n&&(n=4294967295),void 0===o&&(o=4294967295),void 0===i&&(i=4294967295),void 0===s&&(s=4294967295),void 0===a&&(a=z),this.extensionCodec=e,this.context=t,this.maxStrLength=r,this.maxBinLength=n,this.maxArrayLength=o,this.maxMapLength=i,this.maxExtLength=s,this.keyDecoder=a,this.totalPos=0,this.pos=0,this.view=N,this.bytes=P,this.headByte=-1,this.stack=[]}return e.prototype.reinitializeState=function(){this.totalPos=0,this.headByte=-1},e.prototype.setBuffer=function(e){this.bytes=E(e),this.view=function(e){if(e instanceof ArrayBuffer)return new DataView(e);var t=E(e);return new DataView(t.buffer,t.byteOffset,t.byteLength)}(this.bytes),this.pos=0},e.prototype.appendBuffer=function(e){if(-1!==this.headByte||this.hasRemaining()){var t=this.bytes.subarray(this.pos),r=E(e),n=new Uint8Array(t.length+r.length);n.set(t),n.set(r,t.length),this.setBuffer(n)}else this.setBuffer(e)},e.prototype.hasRemaining=function(e){return void 0===e&&(e=1),this.view.byteLength-this.pos>=e},e.prototype.createNoExtraBytesError=function(e){var t=this.view,r=this.pos;return new RangeError("Extra "+(t.byteLength-r)+" of "+t.byteLength+" byte(s) found at buffer["+e+"]")},e.prototype.decode=function(e){return this.reinitializeState(),this.setBuffer(e),this.doDecodeSingleSync()},e.prototype.doDecodeSingleSync=function(){var e=this.doDecodeSync();if(this.hasRemaining())throw this.createNoExtraBytesError(this.pos);return e},e.prototype.decodeAsync=function(e){var t,r,n,o;return function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function(){var i,s,a,c,u,l,h,p;return C(this,(function(f){switch(f.label){case 0:i=!1,f.label=1;case 1:f.trys.push([1,6,7,12]),t=R(e),f.label=2;case 2:return[4,t.next()];case 3:if((r=f.sent()).done)return[3,5];if(a=r.value,i)throw this.createNoExtraBytesError(this.totalPos);this.appendBuffer(a);try{s=this.doDecodeSync(),i=!0}catch(e){if(!(e instanceof L))throw e}this.totalPos+=this.pos,f.label=4;case 4:return[3,2];case 5:return[3,12];case 6:return c=f.sent(),n={error:c},[3,12];case 7:return f.trys.push([7,,10,11]),r&&!r.done&&(o=t.return)?[4,o.call(t)]:[3,9];case 8:f.sent(),f.label=9;case 9:return[3,11];case 10:if(n)throw n.error;return[7];case 11:return[7];case 12:if(i){if(this.hasRemaining())throw this.createNoExtraBytesError(this.totalPos);return[2,s]}throw l=(u=this).headByte,h=u.pos,p=u.totalPos,new RangeError("Insufficient data in parcing "+k(l)+" at "+p+" ("+h+" in the current buffer)")}}))}))},e.prototype.decodeArrayStream=function(e){return this.decodeMultiAsync(e,!0)},e.prototype.decodeStream=function(e){return this.decodeMultiAsync(e,!1)},e.prototype.decodeMultiAsync=function(e,t){return D(this,arguments,(function(){var r,n,o,i,s,a,c,u,l;return C(this,(function(h){switch(h.label){case 0:r=t,n=-1,h.label=1;case 1:h.trys.push([1,13,14,19]),o=R(e),h.label=2;case 2:return[4,O(o.next())];case 3:if((i=h.sent()).done)return[3,12];if(s=i.value,t&&0===n)throw this.createNoExtraBytesError(this.totalPos);this.appendBuffer(s),r&&(n=this.readArraySize(),r=!1,this.complete()),h.label=4;case 4:h.trys.push([4,9,,10]),h.label=5;case 5:return[4,O(this.doDecodeSync())];case 6:return[4,h.sent()];case 7:return h.sent(),0==--n?[3,8]:[3,5];case 8:return[3,10];case 9:if(!((a=h.sent())instanceof L))throw a;return[3,10];case 10:this.totalPos+=this.pos,h.label=11;case 11:return[3,2];case 12:return[3,19];case 13:return c=h.sent(),u={error:c},[3,19];case 14:return h.trys.push([14,,17,18]),i&&!i.done&&(l=o.return)?[4,O(l.call(o))]:[3,16];case 15:h.sent(),h.label=16;case 16:return[3,18];case 17:if(u)throw u.error;return[7];case 18:return[7];case 19:return[2]}}))}))},e.prototype.doDecodeSync=function(){e:for(;;){var e=this.readHeadByte(),t=void 0;if(e>=224)t=e-256;else if(e<192)if(e<128)t=e;else if(e<144){if(0!=(n=e-128)){this.pushMapState(n),this.complete();continue e}t={}}else if(e<160){if(0!=(n=e-144)){this.pushArrayState(n),this.complete();continue e}t=[]}else{var r=e-160;t=this.decodeUtf8String(r,0)}else if(192===e)t=null;else if(194===e)t=!1;else if(195===e)t=!0;else if(202===e)t=this.readF32();else if(203===e)t=this.readF64();else if(204===e)t=this.readU8();else if(205===e)t=this.readU16();else if(206===e)t=this.readU32();else if(207===e)t=this.readU64();else if(208===e)t=this.readI8();else if(209===e)t=this.readI16();else if(210===e)t=this.readI32();else if(211===e)t=this.readI64();else if(217===e)r=this.lookU8(),t=this.decodeUtf8String(r,1);else if(218===e)r=this.lookU16(),t=this.decodeUtf8String(r,2);else if(219===e)r=this.lookU32(),t=this.decodeUtf8String(r,4);else if(220===e){if(0!==(n=this.readU16())){this.pushArrayState(n),this.complete();continue e}t=[]}else if(221===e){if(0!==(n=this.readU32())){this.pushArrayState(n),this.complete();continue e}t=[]}else if(222===e){if(0!==(n=this.readU16())){this.pushMapState(n),this.complete();continue e}t={}}else if(223===e){if(0!==(n=this.readU32())){this.pushMapState(n),this.complete();continue e}t={}}else if(196===e){var n=this.lookU8();t=this.decodeBinary(n,1)}else if(197===e)n=this.lookU16(),t=this.decodeBinary(n,2);else if(198===e)n=this.lookU32(),t=this.decodeBinary(n,4);else if(212===e)t=this.decodeExtension(1,0);else if(213===e)t=this.decodeExtension(2,0);else if(214===e)t=this.decodeExtension(4,0);else if(215===e)t=this.decodeExtension(8,0);else if(216===e)t=this.decodeExtension(16,0);else if(199===e)n=this.lookU8(),t=this.decodeExtension(n,1);else if(200===e)n=this.lookU16(),t=this.decodeExtension(n,2);else{if(201!==e)throw new Error("Unrecognized type byte: "+k(e));n=this.lookU32(),t=this.decodeExtension(n,4)}this.complete();for(var o=this.stack;o.length>0;){var i=o[o.length-1];if(0===i.type){if(i.array[i.position]=t,i.position++,i.position!==i.size)continue e;o.pop(),t=i.array}else{if(1===i.type){if(void 0,"string"!=(s=typeof t)&&"number"!==s)throw new Error("The type of key must be string or number but "+typeof t);i.key=t,i.type=2;continue e}if(i.map[i.key]=t,i.readCount++,i.readCount!==i.size){i.key=null,i.type=1;continue e}o.pop(),t=i.map}}return t}var s},e.prototype.readHeadByte=function(){return-1===this.headByte&&(this.headByte=this.readU8()),this.headByte},e.prototype.complete=function(){this.headByte=-1},e.prototype.readArraySize=function(){var e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:if(e<160)return e-144;throw new Error("Unrecognized array type byte: "+k(e))}},e.prototype.pushMapState=function(e){if(e>this.maxMapLength)throw new Error("Max length exceeded: map length ("+e+") > maxMapLengthLength ("+this.maxMapLength+")");this.stack.push({type:1,size:e,key:null,readCount:0,map:{}})},e.prototype.pushArrayState=function(e){if(e>this.maxArrayLength)throw new Error("Max length exceeded: array length ("+e+") > maxArrayLength ("+this.maxArrayLength+")");this.stack.push({type:0,size:e,array:new Array(e),position:0})},e.prototype.decodeUtf8String=function(e,t){var r;if(e>this.maxStrLength)throw new Error("Max length exceeded: UTF-8 byte length ("+e+") > maxStrLength ("+this.maxStrLength+")");if(this.bytes.byteLengthp?function(e,t,r){var n=e.subarray(t,t+r);return h.decode(n)}(this.bytes,o,e):l(this.bytes,o,e),this.pos+=t+e,n},e.prototype.stateIsMapKey=function(){return this.stack.length>0&&1===this.stack[this.stack.length-1].type},e.prototype.decodeBinary=function(e,t){if(e>this.maxBinLength)throw new Error("Max length exceeded: bin length ("+e+") > maxBinLength ("+this.maxBinLength+")");if(!this.hasRemaining(e+t))throw F;var r=this.pos+t,n=this.bytes.subarray(r,r+e);return this.pos+=t+e,n},e.prototype.decodeExtension=function(e,t){if(e>this.maxExtLength)throw new Error("Max length exceeded: ext length ("+e+") > maxExtLength ("+this.maxExtLength+")");var r=this.view.getInt8(this.pos+t),n=this.decodeBinary(e,t+1);return this.extensionCodec.decode(n,r,this.context)},e.prototype.lookU8=function(){return this.view.getUint8(this.pos)},e.prototype.lookU16=function(){return this.view.getUint16(this.pos)},e.prototype.lookU32=function(){return this.view.getUint32(this.pos)},e.prototype.readU8=function(){var e=this.view.getUint8(this.pos);return this.pos++,e},e.prototype.readI8=function(){var e=this.view.getInt8(this.pos);return this.pos++,e},e.prototype.readU16=function(){var e=this.view.getUint16(this.pos);return this.pos+=2,e},e.prototype.readI16=function(){var e=this.view.getInt16(this.pos);return this.pos+=2,e},e.prototype.readU32=function(){var e=this.view.getUint32(this.pos);return this.pos+=4,e},e.prototype.readI32=function(){var e=this.view.getInt32(this.pos);return this.pos+=4,e},e.prototype.readU64=function(){var e,t,r,n,o=(e=this.view,t=this.pos,r=e.getUint32(t),n=e.getUint32(t+4),r>Math.floor(Number.MAX_SAFE_INTEGER/4294967296)?BigInt(r)*BigInt(4294967296)+BigInt(n):4294967296*r+n);return this.pos+=8,o},e.prototype.readI64=function(){var e=g(this.view,this.pos);return this.pos+=8,e},e.prototype.readF32=function(){var e=this.view.getFloat32(this.pos);return this.pos+=4,e},e.prototype.readF64=function(){var e=this.view.getFloat64(this.pos);return this.pos+=8,e},e}(),M={};function H(e,t){return void 0===t&&(t=M),new j(t.extensionCodec,t.context,t.maxStrLength,t.maxBinLength,t.maxArrayLength,t.maxMapLength,t.maxExtLength).decode(e)}var G=function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]1||a(e,t)}))})}function a(e,t){try{(r=o[e](t)).value instanceof K?Promise.resolve(r.value.v).then(c,u):l(i[0][2],r)}catch(e){l(i[0][3],e)}var r}function c(e){a("next",e)}function u(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}};function V(e){if(null==e)throw new Error("Assertion Failure: value must not be null nor undefined")}function $(e){return null!=e[Symbol.asyncIterator]?e:function(e){return q(this,arguments,(function(){var t,r,n,o;return G(this,(function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,K(t.read())];case 3:return r=i.sent(),n=r.done,o=r.value,n?[4,K(void 0)]:[3,5];case 4:return[2,i.sent()];case 5:return V(o),[4,K(o)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}(e)}function W(e,t){return void 0===t&&(t=M),function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function(){var r;return function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=c(e),s=i[0],a=i[1],u=new o(function(e,t,r){return 3*(t+r)/4-r}(0,s,a)),l=0,h=a>0?s-4:s;for(r=0;r>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[l++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],s=16383,a=0,c=n-o;ac?c:a+s));return 1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=i.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var o,i,s=[],a=t;a>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},5117:function(e,t,r){var n;!function(o){"use strict";var i,s=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a=Math.ceil,c=Math.floor,u="[BigNumber Error] ",l=u+"Number primitive has more than 15 significant digits: ",h=1e14,p=14,f=9007199254740991,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7,y=1e9;function m(e){var t=0|e;return e>0||e===t?t:t-1}function b(e){for(var t,r,n=1,o=e.length,i=e[0]+"";nu^r?1:-1;for(a=(c=o.length)<(u=i.length)?c:u,s=0;si[s]^r?1:-1;return c==u?0:c>u^r?1:-1}function w(e,t,r,n){if(er||e!==c(e))throw Error(u+(n||"Argument")+("number"==typeof e?er?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function v(e){var t=e.c.length-1;return m(e.e/p)==t&&e.c[t]%2!=0}function x(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function S(e,t,r){var n,o;if(t<0){for(o=r+".";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else tL?m.c=m.e=null:e.e=10;h/=10,u++);return void(u>L?m.c=m.e=null:(m.e=u,m.c=[e]))}y=String(e)}else{if(!s.test(y=String(e)))return o(m,y,d);m.s=45==y.charCodeAt(0)?(y=y.slice(1),-1):1}(u=y.indexOf("."))>-1&&(y=y.replace(".","")),(h=y.search(/e/i))>0?(u<0&&(u=h),u+=+y.slice(h+1),y=y.substring(0,h)):u<0&&(u=y.length)}else{if(w(t,2,H.length,"Base"),10==t)return $(m=new G(e),R+m.e+1,O);if(y=String(e),d="number"==typeof e){if(0*e!=0)return o(m,y,d,t);if(m.s=1/e<0?(y=y.slice(1),-1):1,G.DEBUG&&y.replace(/^0\.0*|\./,"").length>15)throw Error(l+e)}else m.s=45===y.charCodeAt(0)?(y=y.slice(1),-1):1;for(r=H.slice(0,t),u=h=0,g=y.length;hu){u=g;continue}}else if(!a&&(y==y.toUpperCase()&&(y=y.toLowerCase())||y==y.toLowerCase()&&(y=y.toUpperCase()))){a=!0,h=-1,u=0;continue}return o(m,String(e),d,t)}d=!1,(u=(y=n(y,t,10,m.s)).indexOf("."))>-1?y=y.replace(".",""):u=y.length}for(h=0;48===y.charCodeAt(h);h++);for(g=y.length;48===y.charCodeAt(--g););if(y=y.slice(h,++g)){if(g-=h,d&&G.DEBUG&&g>15&&(e>f||e!==c(e)))throw Error(l+m.s*e);if((u=u-h-1)>L)m.c=m.e=null;else if(u=N)?x(c,s):S(c,s,"0");else if(i=(e=$(new G(e),t,r)).e,a=(c=b(e.c)).length,1==n||2==n&&(t<=i||i<=D)){for(;aa){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-a)>0)for(i+1==a&&(c+=".");t--;c+="0");return e.s<0&&o?"-"+c:c}function q(e,t){for(var r,n=1,o=new G(e[0]);n=10;o/=10,n++);return(r=n+r*p-1)>L?e.c=e.e=null:r=10;u/=10,o++);if((i=t-o)<0)i+=p,s=t,g=(l=y[f=0])/m[o-s-1]%10|0;else if((f=a((i+1)/p))>=y.length){if(!n)break e;for(;y.length<=f;y.push(0));l=g=0,o=1,s=(i%=p)-p+1}else{for(l=u=y[f],o=1;u>=10;u/=10,o++);g=(s=(i%=p)-p+o)<0?0:l/m[o-s-1]%10|0}if(n=n||t<0||null!=y[f+1]||(s<0?l:l%m[o-s-1]),n=r<4?(g||n)&&(0==r||r==(e.s<0?3:2)):g>5||5==g&&(4==r||n||6==r&&(i>0?s>0?l/m[o-s]:0:y[f-1])%10&1||r==(e.s<0?8:7)),t<1||!y[0])return y.length=0,n?(t-=e.e+1,y[0]=m[(p-t%p)%p],e.e=-t||0):y[0]=e.e=0,e;if(0==i?(y.length=f,u=1,f--):(y.length=f+1,u=m[p-i],y[f]=s>0?c(l/m[o-s]%m[s])*u:0),n)for(;;){if(0==f){for(i=1,s=y[0];s>=10;s/=10,i++);for(s=y[0]+=u,u=1;s>=10;s/=10,u++);i!=u&&(e.e++,y[0]==h&&(y[0]=1));break}if(y[f]+=u,y[f]!=h)break;y[f--]=0,u=1}for(i=y.length;0===y[--i];y.pop());}e.e>L?e.c=e.e=null:e.e=N?x(t,r):S(t,r,"0"),e.s<0?"-"+t:t)}return G.clone=e,G.ROUND_UP=0,G.ROUND_DOWN=1,G.ROUND_CEIL=2,G.ROUND_FLOOR=3,G.ROUND_HALF_UP=4,G.ROUND_HALF_DOWN=5,G.ROUND_HALF_EVEN=6,G.ROUND_HALF_CEIL=7,G.ROUND_HALF_FLOOR=8,G.EUCLID=9,G.config=G.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(u+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(w(r=e[t],0,y,t),R=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(w(r=e[t],0,8,t),O=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(w(r[0],-y,0,t),w(r[1],0,y,t),D=r[0],N=r[1]):(w(r,-y,y,t),D=-(N=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)w(r[0],-y,-1,t),w(r[1],1,y,t),P=r[0],L=r[1];else{if(w(r,-y,y,t),!r)throw Error(u+t+" cannot be zero: "+r);P=-(L=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(u+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw F=!r,Error(u+"crypto unavailable");F=r}else F=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(w(r=e[t],0,9,t),z=r),e.hasOwnProperty(t="POW_PRECISION")&&(w(r=e[t],0,y,t),j=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(u+t+" not an object: "+r);M=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(u+t+" invalid: "+r);H=r}}return{DECIMAL_PLACES:R,ROUNDING_MODE:O,EXPONENTIAL_AT:[D,N],RANGE:[P,L],CRYPTO:F,MODULO_MODE:z,POW_PRECISION:j,FORMAT:M,ALPHABET:H}},G.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!G.DEBUG)return!0;var t,r,n=e.c,o=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===i||-1===i)&&o>=-y&&o<=y&&o===c(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%p)<1&&(t+=p),String(n[0]).length==t){for(t=0;t=h||r!==c(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===i||1===i||-1===i))return!0;throw Error(u+"Invalid BigNumber: "+e)},G.maximum=G.max=function(){return q(arguments,I.lt)},G.minimum=G.min=function(){return q(arguments,I.gt)},G.random=(i=9007199254740992,E=Math.random()*i&2097151?function(){return c(Math.random()*i)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,o,i,s=0,l=[],h=new G(C);if(null==e?e=R:w(e,0,y),o=a(e/p),F)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));s>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(l.push(i%1e14),s+=2);s=o/2}else{if(!crypto.randomBytes)throw F=!1,Error(u+"crypto unavailable");for(t=crypto.randomBytes(o*=7);s=9e15?crypto.randomBytes(7).copy(t,s):(l.push(i%1e14),s+=7);s=o/7}if(!F)for(;s=10;i/=10,s++);sr-1&&(null==s[o+1]&&(s[o+1]=0),s[o+1]+=s[o]/r|0,s[o]%=r)}return s.reverse()}return function(n,o,i,s,a){var c,u,l,h,p,f,d,g,y=n.indexOf("."),m=R,A=O;for(y>=0&&(h=j,j=0,n=n.replace(".",""),f=(g=new G(o)).pow(n.length-y),j=h,g.c=t(S(b(f.c),f.e,"0"),10,i,e),g.e=g.c.length),l=h=(d=t(n,o,i,a?(c=H,e):(c=e,H))).length;0==d[--h];d.pop());if(!d[0])return c.charAt(0);if(y<0?--l:(f.c=d,f.e=l,f.s=s,d=(f=r(f,g,m,A,i)).c,p=f.r,l=f.e),y=d[u=l+m+1],h=i/2,p=p||u<0||null!=d[u+1],p=A<4?(null!=y||p)&&(0==A||A==(f.s<0?3:2)):y>h||y==h&&(4==A||p||6==A&&1&d[u-1]||A==(f.s<0?8:7)),u<1||!d[0])n=p?S(c.charAt(1),-m,c.charAt(0)):c.charAt(0);else{if(d.length=u,p)for(--i;++d[--u]>i;)d[u]=0,u||(++l,d=[1].concat(d));for(h=d.length;!d[--h];);for(y=0,n="";y<=h;n+=c.charAt(d[y++]));n=S(n,l,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,o,i,s,a=0,c=e.length,u=t%g,l=t/g|0;for(e=e.slice();c--;)a=((o=u*(i=e[c]%g)+(n=l*i+(s=e[c]/g|0)*u)%g*g+a)/r|0)+(n/g|0)+l*s,e[c]=o%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;ot[o]?1:-1;break}return i}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]1;e.splice(0,1));}return function(n,o,i,s,a){var u,l,f,d,g,y,b,A,w,v,x,S,E,T,_,B,U,k=n.s==o.s?1:-1,I=n.c,C=o.c;if(!(I&&I[0]&&C&&C[0]))return new G(n.s&&o.s&&(I?!C||I[0]!=C[0]:C)?I&&0==I[0]||!C?0*k:k/0:NaN);for(w=(A=new G(k)).c=[],k=i+(l=n.e-o.e)+1,a||(a=h,l=m(n.e/p)-m(o.e/p),k=k/p|0),f=0;C[f]==(I[f]||0);f++);if(C[f]>(I[f]||0)&&l--,k<0)w.push(1),d=!0;else{for(T=I.length,B=C.length,f=0,k+=2,(g=c(a/(C[0]+1)))>1&&(C=e(C,g,a),I=e(I,g,a),B=C.length,T=I.length),E=B,x=(v=I.slice(0,B)).length;x=a/2&&_++;do{if(g=0,(u=t(C,v,B,x))<0){if(S=v[0],B!=x&&(S=S*a+(v[1]||0)),(g=c(S/_))>1)for(g>=a&&(g=a-1),b=(y=e(C,g,a)).length,x=v.length;1==t(y,v,b,x);)g--,r(y,B=10;k/=10,f++);$(A,i+(A.e=f+l*p-1)+1,s,d)}else A.e=l,A.r=+d;return A}}(),T=/^(-?)0([xbo])(?=\w[\w.]*$)/i,_=/^([^.]+)\.$/,B=/^\.([^.]+)$/,U=/^-?(Infinity|NaN)$/,k=/^\s*\+(?=[\w.])|^\s+|\s+$/g,o=function(e,t,r,n){var o,i=r?t:t.replace(k,"");if(U.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(T,(function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t})),n&&(o=n,i=i.replace(_,"$1").replace(B,"0.$1")),t!=i))return new G(i,o);if(G.DEBUG)throw Error(u+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},I.absoluteValue=I.abs=function(){var e=new G(this);return e.s<0&&(e.s=1),e},I.comparedTo=function(e,t){return A(this,new G(e,t))},I.decimalPlaces=I.dp=function(e,t){var r,n,o,i=this;if(null!=e)return w(e,0,y),null==t?t=O:w(t,0,8),$(new G(i),e+i.e+1,t);if(!(r=i.c))return null;if(n=((o=r.length-1)-m(this.e/p))*p,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},I.dividedBy=I.div=function(e,t){return r(this,new G(e,t),R,O)},I.dividedToIntegerBy=I.idiv=function(e,t){return r(this,new G(e,t),0,1)},I.exponentiatedBy=I.pow=function(e,t){var r,n,o,i,s,l,h,f,d=this;if((e=new G(e)).c&&!e.isInteger())throw Error(u+"Exponent not an integer: "+W(e));if(null!=t&&(t=new G(t)),s=e.e>14,!d.c||!d.c[0]||1==d.c[0]&&!d.e&&1==d.c.length||!e.c||!e.c[0])return f=new G(Math.pow(+W(d),s?2-v(e):+W(e))),t?f.mod(t):f;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new G(NaN);(n=!l&&d.isInteger()&&t.isInteger())&&(d=d.mod(t))}else{if(e.e>9&&(d.e>0||d.e<-1||(0==d.e?d.c[0]>1||s&&d.c[1]>=24e7:d.c[0]<8e13||s&&d.c[0]<=9999975e7)))return i=d.s<0&&v(e)?-0:0,d.e>-1&&(i=1/i),new G(l?1/i:i);j&&(i=a(j/p+2))}for(s?(r=new G(.5),l&&(e.s=1),h=v(e)):h=(o=Math.abs(+W(e)))%2,f=new G(C);;){if(h){if(!(f=f.times(d)).c)break;i?f.c.length>i&&(f.c.length=i):n&&(f=f.mod(t))}if(o){if(0===(o=c(o/2)))break;h=o%2}else if($(e=e.times(r),e.e+1,1),e.e>14)h=v(e);else{if(0==(o=+W(e)))break;h=o%2}d=d.times(d),i?d.c&&d.c.length>i&&(d.c.length=i):n&&(d=d.mod(t))}return n?f:(l&&(f=C.div(f)),t?f.mod(t):i?$(f,j,O,void 0):f)},I.integerValue=function(e){var t=new G(this);return null==e?e=O:w(e,0,8),$(t,t.e+1,e)},I.isEqualTo=I.eq=function(e,t){return 0===A(this,new G(e,t))},I.isFinite=function(){return!!this.c},I.isGreaterThan=I.gt=function(e,t){return A(this,new G(e,t))>0},I.isGreaterThanOrEqualTo=I.gte=function(e,t){return 1===(t=A(this,new G(e,t)))||0===t},I.isInteger=function(){return!!this.c&&m(this.e/p)>this.c.length-2},I.isLessThan=I.lt=function(e,t){return A(this,new G(e,t))<0},I.isLessThanOrEqualTo=I.lte=function(e,t){return-1===(t=A(this,new G(e,t)))||0===t},I.isNaN=function(){return!this.s},I.isNegative=function(){return this.s<0},I.isPositive=function(){return this.s>0},I.isZero=function(){return!!this.c&&0==this.c[0]},I.minus=function(e,t){var r,n,o,i,s=this,a=s.s;if(t=(e=new G(e,t)).s,!a||!t)return new G(NaN);if(a!=t)return e.s=-t,s.plus(e);var c=s.e/p,u=e.e/p,l=s.c,f=e.c;if(!c||!u){if(!l||!f)return l?(e.s=-t,e):new G(f?s:NaN);if(!l[0]||!f[0])return f[0]?(e.s=-t,e):new G(l[0]?s:3==O?-0:0)}if(c=m(c),u=m(u),l=l.slice(),a=c-u){for((i=a<0)?(a=-a,o=l):(u=c,o=f),o.reverse(),t=a;t--;o.push(0));o.reverse()}else for(n=(i=(a=l.length)<(t=f.length))?a:t,a=t=0;t0)for(;t--;l[r++]=0);for(t=h-1;n>a;){if(l[--n]=0;){for(r=0,d=S[o]%w,y=S[o]/w|0,i=o+(s=c);i>o;)r=((u=d*(u=x[--s]%w)+(a=y*u+(l=x[s]/w|0)*d)%w*w+b[i]+r)/A|0)+(a/w|0)+y*l,b[i--]=u%A;b[i]=r}return r?++n:b.splice(0,1),V(e,b,n)},I.negated=function(){var e=new G(this);return e.s=-e.s||null,e},I.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new G(e,t)).s,!o||!t)return new G(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/p,s=e.e/p,a=n.c,c=e.c;if(!i||!s){if(!a||!c)return new G(o/0);if(!a[0]||!c[0])return c[0]?e:new G(a[0]?n:0*o)}if(i=m(i),s=m(s),a=a.slice(),o=i-s){for(o>0?(s=i,r=c):(o=-o,r=a),r.reverse();o--;r.push(0));r.reverse()}for((o=a.length)-(t=c.length)<0&&(r=c,c=a,a=r,t=o),o=0;t;)o=(a[--t]=a[t]+c[t]+o)/h|0,a[t]=h===a[t]?0:a[t]%h;return o&&(a=[o].concat(a),++s),V(e,a,s)},I.precision=I.sd=function(e,t){var r,n,o,i=this;if(null!=e&&e!==!!e)return w(e,1,y),null==t?t=O:w(t,0,8),$(new G(i),e,t);if(!(r=i.c))return null;if(n=(o=r.length-1)*p+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&i.e+1>n&&(n=i.e+1),n},I.shiftedBy=function(e){return w(e,-9007199254740991,f),this.times("1e"+e)},I.squareRoot=I.sqrt=function(){var e,t,n,o,i,s=this,a=s.c,c=s.s,u=s.e,l=R+4,h=new G("0.5");if(1!==c||!a||!a[0])return new G(!c||c<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(c=Math.sqrt(+W(s)))||c==1/0?(((t=b(a)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=m((u+1)/2)-(u<0||u%2),n=new G(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new G(c+""),n.c[0])for((c=(u=n.e)+l)<3&&(c=0);;)if(i=n,n=h.times(i.plus(r(s,i,l,1))),b(i.c).slice(0,c)===(t=b(n.c)).slice(0,c)){if(n.e0&&g>0){for(i=g%a||a,h=d.substr(0,i);i0&&(h+=l+d.slice(i)),f&&(h="-"+h)}n=p?h+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?p.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):p):h}return(r.prefix||"")+n+(r.suffix||"")},I.toFraction=function(e){var t,n,o,i,s,a,c,l,h,f,g,y,m=this,A=m.c;if(null!=e&&(!(c=new G(e)).isInteger()&&(c.c||1!==c.s)||c.lt(C)))throw Error(u+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+W(c));if(!A)return new G(m);for(t=new G(C),h=n=new G(C),o=l=new G(C),y=b(A),s=t.e=y.length-m.e-1,t.c[0]=d[(a=s%p)<0?p+a:a],e=!e||c.comparedTo(t)>0?s>0?t:h:c,a=L,L=1/0,c=new G(y),l.c[0]=0;f=r(c,t,0,1),1!=(i=n.plus(f.times(o))).comparedTo(e);)n=o,o=i,h=l.plus(f.times(i=h)),l=i,t=c.minus(f.times(i=t)),c=i;return i=r(e.minus(n),o,0,1),l=l.plus(i.times(h)),n=n.plus(i.times(o)),l.s=h.s=m.s,g=r(h,o,s*=2,O).minus(m).abs().comparedTo(r(l,n,s,O).minus(m).abs())<1?[h,o]:[l,n],L=a,g},I.toNumber=function(){return+W(this)},I.toPrecision=function(e,t){return null!=e&&w(e,1,y),K(this,e,t,2)},I.toString=function(e){var t,r=this,o=r.s,i=r.e;return null===i?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(null==e?t=i<=D||i>=N?x(b(r.c),i):S(b(r.c),i,"0"):10===e?t=S(b((r=$(new G(r),R+i+1,O)).c),r.e,"0"):(w(e,2,H.length,"Base"),t=n(S(b(r.c),i,"0"),10,e,o,!0)),o<0&&r.c[0]&&(t="-"+t)),t},I.valueOf=I.toJSON=function(){return W(this)},I._isBigNumber=!0,null!=t&&G.set(t),G}()).default=i.BigNumber=i,void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)}()},2486:(e,t,r)=>{"use strict";const n=r(5155),o=r(4525),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let n=a(r);const o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(X(e,Uint8Array)){const t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return p(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(X(e,ArrayBuffer)||e&&X(e.buffer,ArrayBuffer))return f(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(X(e,SharedArrayBuffer)||e&&X(e.buffer,SharedArrayBuffer)))return f(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const o=function(e){if(c.isBuffer(e)){const t=0|d(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Y(e.length)?a(0):p(e):"Buffer"===e.type&&Array.isArray(e.data)?p(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function h(e){return l(e),a(e<0?0:0|d(e))}function p(e){const t=e.length<0?0:0|d(e.length),r=a(t);for(let n=0;n=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function g(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||X(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return $(e).length;default:if(o)return n?-1:V(e).length;t=(""+t).toLowerCase(),o=!0}}function y(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r);case"utf8":case"utf-8":return _(this,t,r);case"ascii":return U(this,t,r);case"latin1":case"binary":return k(this,t,r);case"base64":return T(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:A(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):A(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function A(e,t,r,n,o){let i,s=1,a=e.length,c=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,r/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){let n=-1;for(i=r;ia&&(r=a-c),i=r;i>=0;i--){let r=!0;for(let n=0;no&&(n=o):n=o;const i=t.length;let s;for(n>i/2&&(n=i/2),s=0;s>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function T(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function _(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o239?4:t>223?3:t>191?2:1;if(o+s<=r){let r,n,a,c;switch(s){case 1:t<128&&(i=t);break;case 2:r=e[o+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(i=c));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:r=e[o+1],n=e[o+2],a=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,s=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=s}return function(e){const t=e.length;if(t<=B)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},c.byteLength=g,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},i&&(c.prototype[i]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,o){if(X(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(i,s),u=this.slice(n,o),l=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":case"latin1":case"binary":return x(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const B=4096;function U(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;on)&&(r=n);let o="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,r,n,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function D(e,t,r,n,o){H(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function N(e,t,r,n,o){H(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function P(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,i){return t=+t,r>>>=0,i||P(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,i){return t=+t,r>>>=0,i||P(e,0,r,8),o.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e],o=1,i=0;for(;++i>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Q((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e],o=1,i=0;for(;++i=o&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Q((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||K(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||R(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||O(this,e,t,r,Math.pow(2,8*r)-1,0);let o=1,i=0;for(this[t]=255&e;++i>>=0,r>>>=0,n||O(this,e,t,r,Math.pow(2,8*r)-1,0);let o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=Q((function(e,t=0){return D(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=Q((function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);O(this,e,t,r,n-1,-n)}let o=0,i=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);O(this,e,t,r,n-1,-n)}let o=r-1,i=1,s=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/i>>0)-s&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||O(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||O(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]=255&e,t+4},c.prototype.writeBigInt64LE=Q((function(e,t=0){return D(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=Q((function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function H(e,t,r,n,o,i){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new z.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){G(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||K(t,e.length-(r+1))}(n,o,i)}function G(e,t){if("number"!=typeof e)throw new z.ERR_INVALID_ARG_TYPE(t,"number",e)}function K(e,t,r){if(Math.floor(e)!==e)throw G(e,r),new z.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new z.ERR_BUFFER_OUT_OF_BOUNDS;throw new z.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}j("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),j("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),j("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=M(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=M(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n}),RangeError);const q=/[^+/0-9A-Za-z-_]/g;function V(e,t){let r;t=t||1/0;const n=e.length;let o=null;const i=[];for(let s=0;s55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function $(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,r,n){let o;for(o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function X(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const J=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function Q(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},7615:(e,t,r)=>{"use strict";var n=r(1801),o=r(2550),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},2550:(e,t,r)=>{"use strict";var n=r(1930),o=r(1801),i=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),a=o("%Reflect.apply%",!0)||n.call(s,i),c=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),l=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(e){u=null}e.exports=function(e){var t=a(n,s,arguments);if(c&&u){var r=c(t,"length");r.configurable&&u(t,"length",{value:1+l(0,e.length-(arguments.length-1))})}return t};var h=function(){return a(n,i,arguments)};u?u(e.exports,"apply",{value:h}):e.exports.apply=h},1069:e=>{function t(e){if(e)return function(e){for(var r in t.prototype)e[r]=t.prototype[r];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o{e.exports=n,n.default=n,n.stable=s,n.stableStringify=s;var t=[],r=[];function n(e,n,i){var s;for(o(e,"",[],void 0),s=0===r.length?JSON.stringify(e,n,i):JSON.stringify(e,c(n),i);0!==t.length;){var a=t.pop();4===a.length?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}return s}function o(e,n,i,s){var a;if("object"==typeof e&&null!==e){for(a=0;at?1:0}function s(e,n,o){var i,s=a(e,"",[],void 0)||e;for(i=0===r.length?JSON.stringify(s,n,o):JSON.stringify(s,c(n),o);0!==t.length;){var u=t.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}return i}function a(e,n,o,s){var c;if("object"==typeof e&&null!==e){for(c=0;c0)for(var o=0;o{"use strict";var t="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,n=Object.prototype.toString,o="[object Function]";e.exports=function(e){var i=this;if("function"!=typeof i||n.call(i)!==o)throw new TypeError(t+i);for(var s,a=r.call(arguments,1),c=function(){if(this instanceof s){var t=i.apply(this,a.concat(r.call(arguments)));return Object(t)===t?t:this}return i.apply(e,a.concat(r.call(arguments)))},u=Math.max(0,i.length-a.length),l=[],h=0;h{"use strict";var n=r(9930);e.exports=Function.prototype.bind||n},1801:(e,t,r)=>{"use strict";var n,o=SyntaxError,i=Function,s=TypeError,a=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(e){c=null}var u=function(){throw new s},l=c?function(){try{return u}catch(e){try{return c(arguments,"callee").get}catch(e){return u}}}():u,h=r(9905)(),p=Object.getPrototypeOf||function(e){return e.__proto__},f={},d="undefined"==typeof Uint8Array?n:p(Uint8Array),g={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":h?p([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":f,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":h?p(p([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&h?p((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&h?p((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":h?p(""[Symbol.iterator]()):n,"%Symbol%":h?Symbol:n,"%SyntaxError%":o,"%ThrowTypeError%":l,"%TypedArray%":d,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet},y=function e(t){var r;if("%AsyncFunction%"===t)r=a("async function () {}");else if("%GeneratorFunction%"===t)r=a("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=a("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(r=p(o.prototype))}return g[t]=r,r},m={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},b=r(1930),A=r(9284),w=b.call(Function.call,Array.prototype.concat),v=b.call(Function.apply,Array.prototype.splice),x=b.call(Function.call,String.prototype.replace),S=b.call(Function.call,String.prototype.slice),E=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,_=function(e){var t=S(e,0,1),r=S(e,-1);if("%"===t&&"%"!==r)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var n=[];return x(e,E,(function(e,t,r,o){n[n.length]=r?x(o,T,"$1"):t||e})),n},B=function(e,t){var r,n=e;if(A(m,n)&&(n="%"+(r=m[n])[0]+"%"),A(g,n)){var i=g[n];if(i===f&&(i=y(n)),void 0===i&&!t)throw new s("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new o("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');var r=_(e),n=r.length>0?r[0]:"",i=B("%"+n+"%",t),a=i.name,u=i.value,l=!1,h=i.alias;h&&(n=h[0],v(r,w([0,1],h)));for(var p=1,f=!0;p=r.length){var b=c(u,d);u=(f=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:u[d]}else f=A(u,d),u=u[d];f&&!l&&(g[a]=u)}}return u}},9905:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(5682);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},5682:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9284:(e,t,r)=>{"use strict";var n=r(1930);e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},7267:(e,t,r)=>{var n;!function(){"use strict";var t="object"==typeof window?window:{};!t.HI_BASE32_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node&&(t=r.g);var o=!t.HI_BASE32_NO_COMMON_JS&&e.exports,i=r.amdO,s="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".split(""),a={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,2:26,3:27,4:28,5:29,6:30,7:31},c=[0,0,0,0,0,0,0,0],u=function(e,t){t.length>10&&(t="..."+t.substr(-10));var r=new Error("Decoded data is not valid UTF-8. Maybe try base32.decode.asBytes()? Partial data after reading "+e+" bytes: "+t+" <-");throw r.position=e,r},l=function(e){if(""===e)return[];if(!/^[A-Z2-7=]+$/.test(e))throw new Error("Invalid base32 characters");for(var t,r,n,o,i,s,c,u,l=[],h=0,p=(e=e.replace(/=/g,"")).length,f=0,d=p>>3<<3;f>>2),l[h++]=255&(r<<6|n<<1|o>>>4),l[h++]=255&(o<<4|i>>>1),l[h++]=255&(i<<7|s<<2|c>>>3),l[h++]=255&(c<<5|u);var g=p-d;return 2===g?(t=a[e.charAt(f++)],r=a[e.charAt(f++)],l[h++]=255&(t<<3|r>>>2)):4===g?(t=a[e.charAt(f++)],r=a[e.charAt(f++)],n=a[e.charAt(f++)],o=a[e.charAt(f++)],l[h++]=255&(t<<3|r>>>2),l[h++]=255&(r<<6|n<<1|o>>>4)):5===g?(t=a[e.charAt(f++)],r=a[e.charAt(f++)],n=a[e.charAt(f++)],o=a[e.charAt(f++)],i=a[e.charAt(f++)],l[h++]=255&(t<<3|r>>>2),l[h++]=255&(r<<6|n<<1|o>>>4),l[h++]=255&(o<<4|i>>>1)):7===g&&(t=a[e.charAt(f++)],r=a[e.charAt(f++)],n=a[e.charAt(f++)],o=a[e.charAt(f++)],i=a[e.charAt(f++)],s=a[e.charAt(f++)],c=a[e.charAt(f++)],l[h++]=255&(t<<3|r>>>2),l[h++]=255&(r<<6|n<<1|o>>>4),l[h++]=255&(o<<4|i>>>1),l[h++]=255&(i<<7|s<<2|c>>>3)),l},h=function(e,t){if(!t)return function(e){for(var t,r,n="",o=e.length,i=0,s=0;i191&&t<=223?(r=31&t,s=1):t<=239?(r=15&t,s=2):t<=247?(r=7&t,s=3):u(i,n);for(var a=0;a191)&&u(i,n),r<<=6,r+=63&t;r>=55296&&r<=57343&&u(i,n),r>1114111&&u(i,n),r<=65535?n+=String.fromCharCode(r):(r-=65536,n+=String.fromCharCode(55296+(r>>10)),n+=String.fromCharCode(56320+(1023&r)))}return n}(l(e));if(""===e)return"";if(!/^[A-Z2-7=]+$/.test(e))throw new Error("Invalid base32 characters");var r,n,o,i,s,c,h,p,f="",d=e.indexOf("=");-1===d&&(d=e.length);for(var g=0,y=d>>3<<3;g>>2))+String.fromCharCode(255&(n<<6|o<<1|i>>>4))+String.fromCharCode(255&(i<<4|s>>>1))+String.fromCharCode(255&(s<<7|c<<2|h>>>3))+String.fromCharCode(255&(h<<5|p));var m=d-y;return 2===m?(r=a[e.charAt(g++)],n=a[e.charAt(g++)],f+=String.fromCharCode(255&(r<<3|n>>>2))):4===m?(r=a[e.charAt(g++)],n=a[e.charAt(g++)],o=a[e.charAt(g++)],i=a[e.charAt(g++)],f+=String.fromCharCode(255&(r<<3|n>>>2))+String.fromCharCode(255&(n<<6|o<<1|i>>>4))):5===m?(r=a[e.charAt(g++)],n=a[e.charAt(g++)],o=a[e.charAt(g++)],i=a[e.charAt(g++)],s=a[e.charAt(g++)],f+=String.fromCharCode(255&(r<<3|n>>>2))+String.fromCharCode(255&(n<<6|o<<1|i>>>4))+String.fromCharCode(255&(i<<4|s>>>1))):7===m&&(r=a[e.charAt(g++)],n=a[e.charAt(g++)],o=a[e.charAt(g++)],i=a[e.charAt(g++)],s=a[e.charAt(g++)],c=a[e.charAt(g++)],h=a[e.charAt(g++)],f+=String.fromCharCode(255&(r<<3|n>>>2))+String.fromCharCode(255&(n<<6|o<<1|i>>>4))+String.fromCharCode(255&(i<<4|s>>>1))+String.fromCharCode(255&(s<<7|c<<2|h>>>3))),f},p={encode:function(e,t){var r="string"!=typeof e;return r&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),r?function(e){for(var t,r,n,o,i,a="",c=e.length,u=0,l=5*parseInt(c/5);u>>3]+s[31&(t<<2|r>>>6)]+s[r>>>1&31]+s[31&(r<<4|n>>>4)]+s[31&(n<<1|o>>>7)]+s[o>>>2&31]+s[31&(o<<3|i>>>5)]+s[31&i];var h=c-l;return 1===h?(t=e[u],a+=s[t>>>3]+s[t<<2&31]+"======"):2===h?(t=e[u++],r=e[u],a+=s[t>>>3]+s[31&(t<<2|r>>>6)]+s[r>>>1&31]+s[r<<4&31]+"===="):3===h?(t=e[u++],r=e[u++],n=e[u],a+=s[t>>>3]+s[31&(t<<2|r>>>6)]+s[r>>>1&31]+s[31&(r<<4|n>>>4)]+s[n<<1&31]+"==="):4===h&&(t=e[u++],r=e[u++],n=e[u++],o=e[u],a+=s[t>>>3]+s[31&(t<<2|r>>>6)]+s[r>>>1&31]+s[31&(r<<4|n>>>4)]+s[31&(n<<1|o>>>7)]+s[o>>>2&31]+s[o<<3&31]+"="),a}(e):t?function(e){for(var t,r,n,o,i,a="",c=e.length,u=0,l=5*parseInt(c/5);u>>3]+s[31&(t<<2|r>>>6)]+s[r>>>1&31]+s[31&(r<<4|n>>>4)]+s[31&(n<<1|o>>>7)]+s[o>>>2&31]+s[31&(o<<3|i>>>5)]+s[31&i];var h=c-l;return 1===h?(t=e.charCodeAt(u),a+=s[t>>>3]+s[t<<2&31]+"======"):2===h?(t=e.charCodeAt(u++),r=e.charCodeAt(u),a+=s[t>>>3]+s[31&(t<<2|r>>>6)]+s[r>>>1&31]+s[r<<4&31]+"===="):3===h?(t=e.charCodeAt(u++),r=e.charCodeAt(u++),n=e.charCodeAt(u),a+=s[t>>>3]+s[31&(t<<2|r>>>6)]+s[r>>>1&31]+s[31&(r<<4|n>>>4)]+s[n<<1&31]+"==="):4===h&&(t=e.charCodeAt(u++),r=e.charCodeAt(u++),n=e.charCodeAt(u++),o=e.charCodeAt(u),a+=s[t>>>3]+s[31&(t<<2|r>>>6)]+s[r>>>1&31]+s[31&(r<<4|n>>>4)]+s[31&(n<<1|o>>>7)]+s[o>>>2&31]+s[o<<3&31]+"="),a}(e):function(e){var t,r,n,o,i,a,u,l=!1,h="",p=0,f=0,d=e.length;if(""===e)return h;do{for(c[0]=c[5],c[1]=c[6],c[2]=c[7],u=f;p>6,c[u++]=128|63&a):a<55296||a>=57344?(c[u++]=224|a>>12,c[u++]=128|a>>6&63,c[u++]=128|63&a):(a=65536+((1023&a)<<10|1023&e.charCodeAt(++p)),c[u++]=240|a>>18,c[u++]=128|a>>12&63,c[u++]=128|a>>6&63,c[u++]=128|63&a);f=u-5,p===d&&++p,p>d&&u<6&&(l=!0),t=c[0],u>4?(r=c[1],n=c[2],o=c[3],i=c[4],h+=s[t>>>3]+s[31&(t<<2|r>>>6)]+s[r>>>1&31]+s[31&(r<<4|n>>>4)]+s[31&(n<<1|o>>>7)]+s[o>>>2&31]+s[31&(o<<3|i>>>5)]+s[31&i]):1===u?h+=s[t>>>3]+s[t<<2&31]+"======":2===u?(r=c[1],h+=s[t>>>3]+s[31&(t<<2|r>>>6)]+s[r>>>1&31]+s[r<<4&31]+"===="):3===u?(r=c[1],n=c[2],h+=s[t>>>3]+s[31&(t<<2|r>>>6)]+s[r>>>1&31]+s[31&(r<<4|n>>>4)]+s[n<<1&31]+"==="):(r=c[1],n=c[2],o=c[3],h+=s[t>>>3]+s[31&(t<<2|r>>>6)]+s[r>>>1&31]+s[31&(r<<4|n>>>4)]+s[31&(n<<1|o>>>7)]+s[o>>>2&31]+s[o<<3&31]+"=")}while(!l);return h}(e)},decode:h};h.asBytes=l,o?e.exports=p:(t.base32=p,i&&(void 0===(n=function(){return p}.call(p,r,p,e))||(e.exports=n)))}()},4525:(e,t)=>{t.read=function(e,t,r,n,o){var i,s,a=8*o-n-1,c=(1<>1,l=-7,h=r?o-1:0,p=r?-1:1,f=e[t+h];for(h+=p,i=f&(1<<-l)-1,f>>=-l,l+=a;l>0;i=256*i+e[t+h],h+=p,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=n;l>0;s=256*s+e[t+h],h+=p,l-=8);if(0===i)i=1-u;else{if(i===c)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,n),i-=u}return(f?-1:1)*s*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var s,a,c,u=8*i-o-1,l=(1<>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:i-1,d=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+h>=1?p/c:p*Math.pow(2,1-h))*c>=2&&(s++,c/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(t*c-1)*Math.pow(2,o),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,o),s=0));o>=8;e[r+f]=255&a,f+=d,a/=256,o-=8);for(s=s<0;e[r+f]=255&s,f+=d,s/=256,u-=8);e[r+f-d]|=128*g}},3477:(module,exports,__webpack_require__)=>{var __WEBPACK_AMD_DEFINE_RESULT__;(function(){"use strict";var ERROR="input is invalid type",WINDOW="object"==typeof window,root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"==typeof self,NODE_JS=!root.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS?root=__webpack_require__.g:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&module.exports,AMD=__webpack_require__.amdO,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];!root.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!ARRAY_BUFFER||!root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e,t){return function(r){return new Sha256(t,!0).update(r)[e]()}},createMethod=function(e){var t=createOutputMethod("hex",e);NODE_JS&&(t=nodeWrap(t,e)),t.create=function(){return new Sha256(e)},t.update=function(e){return t.create().update(e)};for(var r=0;r>6,s[c++]=128|63&i):i<55296||i>=57344?(s[c++]=224|i>>12,s[c++]=128|i>>6&63,s[c++]=128|63&i):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++n)),s[c++]=240|i>>18,s[c++]=128|i>>12&63,s[c++]=128|i>>6&63,s[c++]=128|63&i);e=s}else{if("object"!==o)throw new Error(ERROR);if(null===e)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||ARRAY_BUFFER&&ArrayBuffer.isView(e)))throw new Error(ERROR)}e.length>64&&(e=new Sha256(t,!0).update(e).array());var u=[],l=[];for(n=0;n<64;++n){var h=e[n]||0;u[n]=92^h,l[n]=54^h}Sha256.call(this,t,r),this.update(l),this.oKeyPad=u,this.inner=!0,this.sharedMemory=r}Sha256.prototype.update=function(e){if(!this.finalized){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(ERROR);if(null===e)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||ARRAY_BUFFER&&ArrayBuffer.isView(e)))throw new Error(ERROR);t=!0}for(var n,o,i=0,s=e.length,a=this.blocks;i>2]|=e[i]<>2]|=n<>2]|=(192|n>>6)<>2]|=(128|63&n)<=57344?(a[o>>2]|=(224|n>>12)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<=64?(this.block=a[16],this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=EXTRA[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var e,t,r,n,o,i,s,a,c,u=this.h0,l=this.h1,h=this.h2,p=this.h3,f=this.h4,d=this.h5,g=this.h6,y=this.h7,m=this.blocks;for(e=16;e<64;++e)t=((o=m[e-15])>>>7|o<<25)^(o>>>18|o<<14)^o>>>3,r=((o=m[e-2])>>>17|o<<15)^(o>>>19|o<<13)^o>>>10,m[e]=m[e-16]+t+m[e-7]+r<<0;for(c=l&h,e=0;e<64;e+=4)this.first?(this.is224?(i=300032,y=(o=m[0]-1413257819)-150054599<<0,p=o+24177077<<0):(i=704751109,y=(o=m[0]-210244248)-1521486534<<0,p=o+143694565<<0),this.first=!1):(t=(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10),n=(i=u&l)^u&h^c,y=p+(o=y+(r=(f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7))+(f&d^~f&g)+K[e]+m[e])<<0,p=o+(t+n)<<0),t=(p>>>2|p<<30)^(p>>>13|p<<19)^(p>>>22|p<<10),n=(s=p&u)^p&l^i,g=h+(o=g+(r=(y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&f^~y&d)+K[e+1]+m[e+1])<<0,t=((h=o+(t+n)<<0)>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),n=(a=h&p)^h&u^s,d=l+(o=d+(r=(g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&y^~g&f)+K[e+2]+m[e+2])<<0,t=((l=o+(t+n)<<0)>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),n=(c=l&h)^l&p^a,f=u+(o=f+(r=(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(d&g^~d&y)+K[e+3]+m[e+3])<<0,u=o+(t+n)<<0;this.h0=this.h0+u<<0,this.h1=this.h1+l<<0,this.h2=this.h2+h<<0,this.h3=this.h3+p<<0,this.h4=this.h4+f<<0,this.h5=this.h5+d<<0,this.h6=this.h6+g<<0,this.h7=this.h7+y<<0},Sha256.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,o=this.h4,i=this.h5,s=this.h6,a=this.h7,c=HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[15&o]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i]+HEX_CHARS[s>>28&15]+HEX_CHARS[s>>24&15]+HEX_CHARS[s>>20&15]+HEX_CHARS[s>>16&15]+HEX_CHARS[s>>12&15]+HEX_CHARS[s>>8&15]+HEX_CHARS[s>>4&15]+HEX_CHARS[15&s];return this.is224||(c+=HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[15&a]),c},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3,o=this.h4,i=this.h5,s=this.h6,a=this.h7,c=[e>>24&255,e>>16&255,e>>8&255,255&e,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24&255,r>>16&255,r>>8&255,255&r,n>>24&255,n>>16&255,n>>8&255,255&n,o>>24&255,o>>16&255,o>>8&255,255&o,i>>24&255,i>>16&255,i>>8&255,255&i,s>>24&255,s>>16&255,s>>8&255,255&s];return this.is224||c.push(a>>24&255,a>>16&255,a>>8&255,255&a),c},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e},HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()},583:(e,t,r)=>{var n;!function(){"use strict";var o="input is invalid type",i="object"==typeof window,s=i?window:{};s.JS_SHA3_NO_WINDOW&&(i=!1);var a=!i&&"object"==typeof self;!s.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?s=r.g:a&&(s=self);var c=!s.JS_SHA3_NO_COMMON_JS&&e.exports,u=r.amdO,l=!s.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,h="0123456789abcdef".split(""),p=[4,1024,262144,67108864],f=[0,8,16,24],d=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],g=[224,256,384,512],y=[128,256],m=["hex","buffer","arrayBuffer","array","digest"],b={128:168,256:136};!s.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!l||!s.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var A=function(e,t,r){return function(n){return new D(e,t,e).update(n)[r]()}},w=function(e,t,r){return function(n,o){return new D(e,t,o).update(n)[r]()}},v=function(e,t,r){return function(t,n,o,i){return _["cshake"+e].update(t,n,o,i)[r]()}},x=function(e,t,r){return function(t,n,o,i){return _["kmac"+e].update(t,n,o,i)[r]()}},S=function(e,t,r,n){for(var o=0;o>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function N(e,t,r){D.call(this,e,t,r)}D.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||l&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}for(var n,i,s=this.blocks,a=this.byteCount,c=e.length,u=this.blockCount,h=0,p=this.s;h>2]|=e[h]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(s[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=a){for(this.start=n-a,this.block=s[u],n=0;n>=8);r>0;)o.unshift(r),r=255&(e>>=8),++n;return t?o.push(n):o.unshift(n),this.update(o),o.length},D.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||l&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}var n=0,i=e.length;if(t)n=i;else for(var s=0;s=57344?n+=3:(a=65536+((1023&a)<<10|1023&e.charCodeAt(++s)),n+=4)}return n+=this.encode(8*n),this.update(e),n},D.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+h[15&e]+h[e>>12&15]+h[e>>8&15]+h[e>>20&15]+h[e>>16&15]+h[e>>28&15]+h[e>>24&15];s%t==0&&(P(r),i=0)}return o&&(e=r[i],a+=h[e>>4&15]+h[15&e],o>1&&(a+=h[e>>12&15]+h[e>>8&15]),o>2&&(a+=h[e>>20&15]+h[e>>16&15])),a},D.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,o=this.extraBytes,i=0,s=0,a=this.outputBits>>3;e=o?new ArrayBuffer(n+1<<2):new ArrayBuffer(a);for(var c=new Uint32Array(e);s>8&255,c[e+2]=t>>16&255,c[e+3]=t>>24&255;a%r==0&&P(n)}return i&&(e=a<<2,t=n[s],c[e]=255&t,i>1&&(c[e+1]=t>>8&255),i>2&&(c[e+2]=t>>16&255)),c},N.prototype=new D,N.prototype.finalize=function(){return this.encode(this.outputBits,!0),D.prototype.finalize.call(this)};var P=function(e){var t,r,n,o,i,s,a,c,u,l,h,p,f,g,y,m,b,A,w,v,x,S,E,T,_,B,U,k,I,C,R,O,D,N,P,L,F,z,j,M,H,G,K,q,V,$,W,X,Y,J,Q,Z,ee,te,re,ne,oe,ie,se,ae,ce,ue,le;for(n=0;n<48;n+=2)o=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],h=e[7]^e[17]^e[27]^e[37]^e[47],t=(p=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|a>>>31),r=(f=e[9]^e[19]^e[29]^e[39]^e[49])^(a<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=o^(c<<1|u>>>31),r=i^(u<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(l<<1|h>>>31),r=a^(h<<1|l>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(p<<1|f>>>31),r=u^(f<<1|p>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=l^(o<<1|i>>>31),r=h^(i<<1|o>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,g=e[0],y=e[1],$=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,k=e[20]<<3|e[21]>>>29,I=e[21]<<3|e[20]>>>29,ae=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,G=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,N=e[2]<<1|e[3]>>>31,P=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,b=e[12]<<12|e[13]>>>20,X=e[22]<<10|e[23]>>>22,Y=e[23]<<10|e[22]>>>22,C=e[33]<<13|e[32]>>>19,R=e[32]<<13|e[33]>>>19,ue=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,F=e[15]<<6|e[14]>>>26,A=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,J=e[34]<<15|e[35]>>>17,Q=e[35]<<15|e[34]>>>17,O=e[45]<<29|e[44]>>>3,D=e[44]<<29|e[45]>>>3,T=e[6]<<28|e[7]>>>4,_=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,oe=e[16]<<23|e[17]>>>9,z=e[26]<<25|e[27]>>>7,j=e[27]<<25|e[26]>>>7,v=e[36]<<21|e[37]>>>11,x=e[37]<<21|e[36]>>>11,Z=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,q=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,B=e[18]<<20|e[19]>>>12,U=e[19]<<20|e[18]>>>12,ie=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,M=e[38]<<8|e[39]>>>24,H=e[39]<<8|e[38]>>>24,S=e[48]<<14|e[49]>>>18,E=e[49]<<14|e[48]>>>18,e[0]=g^~m&A,e[1]=y^~b&w,e[10]=T^~B&k,e[11]=_^~U&I,e[20]=N^~L&z,e[21]=P^~F&j,e[30]=q^~$&X,e[31]=V^~W&Y,e[40]=te^~ne&ie,e[41]=re^~oe&se,e[2]=m^~A&v,e[3]=b^~w&x,e[12]=B^~k&C,e[13]=U^~I&R,e[22]=L^~z&M,e[23]=F^~j&H,e[32]=$^~X&J,e[33]=W^~Y&Q,e[42]=ne^~ie&ae,e[43]=oe^~se&ce,e[4]=A^~v&S,e[5]=w^~x&E,e[14]=k^~C&O,e[15]=I^~R&D,e[24]=z^~M&G,e[25]=j^~H&K,e[34]=X^~J&Z,e[35]=Y^~Q&ee,e[44]=ie^~ae&ue,e[45]=se^~ce&le,e[6]=v^~S&g,e[7]=x^~E&y,e[16]=C^~O&T,e[17]=R^~D&_,e[26]=M^~G&N,e[27]=H^~K&P,e[36]=J^~Z&q,e[37]=Q^~ee&V,e[46]=ae^~ue&te,e[47]=ce^~le&re,e[8]=S^~g&m,e[9]=E^~y&b,e[18]=O^~T&B,e[19]=D^~_&U,e[28]=G^~N&L,e[29]=K^~P&F,e[38]=Z^~q&$,e[39]=ee^~V&W,e[48]=ue^~te&ne,e[49]=le^~re&oe,e[0]^=d[n],e[1]^=d[n+1]};if(c)e.exports=_;else{for(U=0;U{var n;!function(){"use strict";var t="input is invalid type",o="object"==typeof window,i=o?window:{};i.JS_SHA512_NO_WINDOW&&(o=!1);var s=!o&&"object"==typeof self;!i.JS_SHA512_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?i=r.g:s&&(i=self);var a=!i.JS_SHA512_NO_COMMON_JS&&e.exports,c=r.amdO,u=!i.JS_SHA512_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,l="0123456789abcdef".split(""),h=[-2147483648,8388608,32768,128],p=[24,16,8,0],f=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],d=["hex","array","digest","arrayBuffer"],g=[];!i.JS_SHA512_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!u||!i.JS_SHA512_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var y=function(e,t){return function(r){return new w(t,!0).update(r)[e]()}},m=function(e){var t=y("hex",e);t.create=function(){return new w(e)},t.update=function(e){return t.create().update(e)};for(var r=0;r>6,c[l++]=128|63&a):a<55296||a>=57344?(c[l++]=224|a>>12,c[l++]=128|a>>6&63,c[l++]=128|63&a):(a=65536+((1023&a)<<10|1023&e.charCodeAt(++h)),c[l++]=240|a>>18,c[l++]=128|a>>12&63,c[l++]=128|a>>6&63,c[l++]=128|63&a);e=c}e.length>128&&(e=new w(r,!0).update(e).array());var p=[],f=[];for(h=0;h<128;++h){var d=e[h]||0;p[h]=92^d,f[h]=54^d}w.call(this,r,n),this.update(f),this.oKeyPad=p,this.inner=!0,this.sharedMemory=n}w.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var r,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(t);if(null===e)throw new Error(t);if(u&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||u&&ArrayBuffer.isView(e)))throw new Error(t);r=!0}for(var o,i,s=0,a=e.length,c=this.blocks;s>2]|=e[s]<>2]|=o<>2]|=(192|o>>6)<>2]|=(128|63&o)<=57344?(c[i>>2]|=(224|o>>12)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<>2]|=(240|o>>18)<>2]|=(128|o>>12&63)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<=128?(this.block=c[32],this.start=i-128,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},w.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[32]=this.block,e[t>>2]|=h[3&t],this.block=e[32],t>=112&&(this.hashed||this.hash(),e[0]=this.block,e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=e[16]=e[17]=e[18]=e[19]=e[20]=e[21]=e[22]=e[23]=e[24]=e[25]=e[26]=e[27]=e[28]=e[29]=e[30]=e[31]=e[32]=0),e[30]=this.hBytes<<3|this.bytes>>>29,e[31]=this.bytes<<3,this.hash()}},w.prototype.hash=function(){var e,t,r,n,o,i,s,a,c,u,l,h,p,d,g,y,m,b,A,w,v,x,S,E,T,_=this.h0h,B=this.h0l,U=this.h1h,k=this.h1l,I=this.h2h,C=this.h2l,R=this.h3h,O=this.h3l,D=this.h4h,N=this.h4l,P=this.h5h,L=this.h5l,F=this.h6h,z=this.h6l,j=this.h7h,M=this.h7l,H=this.blocks;for(e=32;e<160;e+=2)t=((w=H[e-30])>>>1|(v=H[e-29])<<31)^(w>>>8|v<<24)^w>>>7,r=(v>>>1|w<<31)^(v>>>8|w<<24)^(v>>>7|w<<25),n=((w=H[e-4])>>>19|(v=H[e-3])<<13)^(v>>>29|w<<3)^w>>>6,o=(v>>>19|w<<13)^(w>>>29|v<<3)^(v>>>6|w<<26),w=H[e-32],v=H[e-31],c=((x=H[e-14])>>>16)+(w>>>16)+(t>>>16)+(n>>>16)+((a=(65535&x)+(65535&w)+(65535&t)+(65535&n)+((s=((S=H[e-13])>>>16)+(v>>>16)+(r>>>16)+(o>>>16)+((i=(65535&S)+(65535&v)+(65535&r)+(65535&o))>>>16))>>>16))>>>16),H[e]=c<<16|65535&a,H[e+1]=s<<16|65535&i;var G=_,K=B,q=U,V=k,$=I,W=C,X=R,Y=O,J=D,Q=N,Z=P,ee=L,te=F,re=z,ne=j,oe=M;for(y=q&$,m=V&W,e=0;e<160;e+=8)t=(G>>>28|K<<4)^(K>>>2|G<<30)^(K>>>7|G<<25),r=(K>>>28|G<<4)^(G>>>2|K<<30)^(G>>>7|K<<25),n=(J>>>14|Q<<18)^(J>>>18|Q<<14)^(Q>>>9|J<<23),o=(Q>>>14|J<<18)^(Q>>>18|J<<14)^(J>>>9|Q<<23),b=(u=G&q)^G&$^y,A=(l=K&V)^K&W^m,E=J&Z^~J&te,T=Q&ee^~Q&re,w=H[e],v=H[e+1],w=(c=((x=f[e])>>>16)+(w>>>16)+(E>>>16)+(n>>>16)+(ne>>>16)+((a=(65535&x)+(65535&w)+(65535&E)+(65535&n)+(65535&ne)+((s=((S=f[e+1])>>>16)+(v>>>16)+(T>>>16)+(o>>>16)+(oe>>>16)+((i=(65535&S)+(65535&v)+(65535&T)+(65535&o)+(65535&oe))>>>16))>>>16))>>>16))<<16|65535&a,v=s<<16|65535&i,x=(c=(b>>>16)+(t>>>16)+((a=(65535&b)+(65535&t)+((s=(A>>>16)+(r>>>16)+((i=(65535&A)+(65535&r))>>>16))>>>16))>>>16))<<16|65535&a,S=s<<16|65535&i,ne=(c=(X>>>16)+(w>>>16)+((a=(65535&X)+(65535&w)+((s=(Y>>>16)+(v>>>16)+((i=(65535&Y)+(65535&v))>>>16))>>>16))>>>16))<<16|65535&a,oe=s<<16|65535&i,t=((X=(c=(x>>>16)+(w>>>16)+((a=(65535&x)+(65535&w)+((s=(S>>>16)+(v>>>16)+((i=(65535&S)+(65535&v))>>>16))>>>16))>>>16))<<16|65535&a)>>>28|(Y=s<<16|65535&i)<<4)^(Y>>>2|X<<30)^(Y>>>7|X<<25),r=(Y>>>28|X<<4)^(X>>>2|Y<<30)^(X>>>7|Y<<25),n=(ne>>>14|oe<<18)^(ne>>>18|oe<<14)^(oe>>>9|ne<<23),o=(oe>>>14|ne<<18)^(oe>>>18|ne<<14)^(ne>>>9|oe<<23),b=(h=X&G)^X&q^u,A=(p=Y&K)^Y&V^l,E=ne&J^~ne&Z,T=oe&Q^~oe&ee,w=H[e+2],v=H[e+3],w=(c=((x=f[e+2])>>>16)+(w>>>16)+(E>>>16)+(n>>>16)+(te>>>16)+((a=(65535&x)+(65535&w)+(65535&E)+(65535&n)+(65535&te)+((s=((S=f[e+3])>>>16)+(v>>>16)+(T>>>16)+(o>>>16)+(re>>>16)+((i=(65535&S)+(65535&v)+(65535&T)+(65535&o)+(65535&re))>>>16))>>>16))>>>16))<<16|65535&a,v=s<<16|65535&i,x=(c=(b>>>16)+(t>>>16)+((a=(65535&b)+(65535&t)+((s=(A>>>16)+(r>>>16)+((i=(65535&A)+(65535&r))>>>16))>>>16))>>>16))<<16|65535&a,S=s<<16|65535&i,te=(c=($>>>16)+(w>>>16)+((a=(65535&$)+(65535&w)+((s=(W>>>16)+(v>>>16)+((i=(65535&W)+(65535&v))>>>16))>>>16))>>>16))<<16|65535&a,re=s<<16|65535&i,t=(($=(c=(x>>>16)+(w>>>16)+((a=(65535&x)+(65535&w)+((s=(S>>>16)+(v>>>16)+((i=(65535&S)+(65535&v))>>>16))>>>16))>>>16))<<16|65535&a)>>>28|(W=s<<16|65535&i)<<4)^(W>>>2|$<<30)^(W>>>7|$<<25),r=(W>>>28|$<<4)^($>>>2|W<<30)^($>>>7|W<<25),n=(te>>>14|re<<18)^(te>>>18|re<<14)^(re>>>9|te<<23),o=(re>>>14|te<<18)^(re>>>18|te<<14)^(te>>>9|re<<23),b=(d=$&X)^$&G^h,A=(g=W&Y)^W&K^p,E=te&ne^~te&J,T=re&oe^~re&Q,w=H[e+4],v=H[e+5],w=(c=((x=f[e+4])>>>16)+(w>>>16)+(E>>>16)+(n>>>16)+(Z>>>16)+((a=(65535&x)+(65535&w)+(65535&E)+(65535&n)+(65535&Z)+((s=((S=f[e+5])>>>16)+(v>>>16)+(T>>>16)+(o>>>16)+(ee>>>16)+((i=(65535&S)+(65535&v)+(65535&T)+(65535&o)+(65535&ee))>>>16))>>>16))>>>16))<<16|65535&a,v=s<<16|65535&i,x=(c=(b>>>16)+(t>>>16)+((a=(65535&b)+(65535&t)+((s=(A>>>16)+(r>>>16)+((i=(65535&A)+(65535&r))>>>16))>>>16))>>>16))<<16|65535&a,S=s<<16|65535&i,Z=(c=(q>>>16)+(w>>>16)+((a=(65535&q)+(65535&w)+((s=(V>>>16)+(v>>>16)+((i=(65535&V)+(65535&v))>>>16))>>>16))>>>16))<<16|65535&a,ee=s<<16|65535&i,t=((q=(c=(x>>>16)+(w>>>16)+((a=(65535&x)+(65535&w)+((s=(S>>>16)+(v>>>16)+((i=(65535&S)+(65535&v))>>>16))>>>16))>>>16))<<16|65535&a)>>>28|(V=s<<16|65535&i)<<4)^(V>>>2|q<<30)^(V>>>7|q<<25),r=(V>>>28|q<<4)^(q>>>2|V<<30)^(q>>>7|V<<25),n=(Z>>>14|ee<<18)^(Z>>>18|ee<<14)^(ee>>>9|Z<<23),o=(ee>>>14|Z<<18)^(ee>>>18|Z<<14)^(Z>>>9|ee<<23),b=(y=q&$)^q&X^d,A=(m=V&W)^V&Y^g,E=Z&te^~Z&ne,T=ee&re^~ee&oe,w=H[e+6],v=H[e+7],w=(c=((x=f[e+6])>>>16)+(w>>>16)+(E>>>16)+(n>>>16)+(J>>>16)+((a=(65535&x)+(65535&w)+(65535&E)+(65535&n)+(65535&J)+((s=((S=f[e+7])>>>16)+(v>>>16)+(T>>>16)+(o>>>16)+(Q>>>16)+((i=(65535&S)+(65535&v)+(65535&T)+(65535&o)+(65535&Q))>>>16))>>>16))>>>16))<<16|65535&a,v=s<<16|65535&i,x=(c=(b>>>16)+(t>>>16)+((a=(65535&b)+(65535&t)+((s=(A>>>16)+(r>>>16)+((i=(65535&A)+(65535&r))>>>16))>>>16))>>>16))<<16|65535&a,S=s<<16|65535&i,J=(c=(G>>>16)+(w>>>16)+((a=(65535&G)+(65535&w)+((s=(K>>>16)+(v>>>16)+((i=(65535&K)+(65535&v))>>>16))>>>16))>>>16))<<16|65535&a,Q=s<<16|65535&i,G=(c=(x>>>16)+(w>>>16)+((a=(65535&x)+(65535&w)+((s=(S>>>16)+(v>>>16)+((i=(65535&S)+(65535&v))>>>16))>>>16))>>>16))<<16|65535&a,K=s<<16|65535&i;c=(_>>>16)+(G>>>16)+((a=(65535&_)+(65535&G)+((s=(B>>>16)+(K>>>16)+((i=(65535&B)+(65535&K))>>>16))>>>16))>>>16),this.h0h=c<<16|65535&a,this.h0l=s<<16|65535&i,c=(U>>>16)+(q>>>16)+((a=(65535&U)+(65535&q)+((s=(k>>>16)+(V>>>16)+((i=(65535&k)+(65535&V))>>>16))>>>16))>>>16),this.h1h=c<<16|65535&a,this.h1l=s<<16|65535&i,c=(I>>>16)+($>>>16)+((a=(65535&I)+(65535&$)+((s=(C>>>16)+(W>>>16)+((i=(65535&C)+(65535&W))>>>16))>>>16))>>>16),this.h2h=c<<16|65535&a,this.h2l=s<<16|65535&i,c=(R>>>16)+(X>>>16)+((a=(65535&R)+(65535&X)+((s=(O>>>16)+(Y>>>16)+((i=(65535&O)+(65535&Y))>>>16))>>>16))>>>16),this.h3h=c<<16|65535&a,this.h3l=s<<16|65535&i,c=(D>>>16)+(J>>>16)+((a=(65535&D)+(65535&J)+((s=(N>>>16)+(Q>>>16)+((i=(65535&N)+(65535&Q))>>>16))>>>16))>>>16),this.h4h=c<<16|65535&a,this.h4l=s<<16|65535&i,c=(P>>>16)+(Z>>>16)+((a=(65535&P)+(65535&Z)+((s=(L>>>16)+(ee>>>16)+((i=(65535&L)+(65535&ee))>>>16))>>>16))>>>16),this.h5h=c<<16|65535&a,this.h5l=s<<16|65535&i,c=(F>>>16)+(te>>>16)+((a=(65535&F)+(65535&te)+((s=(z>>>16)+(re>>>16)+((i=(65535&z)+(65535&re))>>>16))>>>16))>>>16),this.h6h=c<<16|65535&a,this.h6l=s<<16|65535&i,c=(j>>>16)+(ne>>>16)+((a=(65535&j)+(65535&ne)+((s=(M>>>16)+(oe>>>16)+((i=(65535&M)+(65535&oe))>>>16))>>>16))>>>16),this.h7h=c<<16|65535&a,this.h7l=s<<16|65535&i},w.prototype.hex=function(){this.finalize();var e=this.h0h,t=this.h0l,r=this.h1h,n=this.h1l,o=this.h2h,i=this.h2l,s=this.h3h,a=this.h3l,c=this.h4h,u=this.h4l,h=this.h5h,p=this.h5l,f=this.h6h,d=this.h6l,g=this.h7h,y=this.h7l,m=this.bits,b=l[e>>28&15]+l[e>>24&15]+l[e>>20&15]+l[e>>16&15]+l[e>>12&15]+l[e>>8&15]+l[e>>4&15]+l[15&e]+l[t>>28&15]+l[t>>24&15]+l[t>>20&15]+l[t>>16&15]+l[t>>12&15]+l[t>>8&15]+l[t>>4&15]+l[15&t]+l[r>>28&15]+l[r>>24&15]+l[r>>20&15]+l[r>>16&15]+l[r>>12&15]+l[r>>8&15]+l[r>>4&15]+l[15&r]+l[n>>28&15]+l[n>>24&15]+l[n>>20&15]+l[n>>16&15]+l[n>>12&15]+l[n>>8&15]+l[n>>4&15]+l[15&n]+l[o>>28&15]+l[o>>24&15]+l[o>>20&15]+l[o>>16&15]+l[o>>12&15]+l[o>>8&15]+l[o>>4&15]+l[15&o]+l[i>>28&15]+l[i>>24&15]+l[i>>20&15]+l[i>>16&15]+l[i>>12&15]+l[i>>8&15]+l[i>>4&15]+l[15&i]+l[s>>28&15]+l[s>>24&15]+l[s>>20&15]+l[s>>16&15]+l[s>>12&15]+l[s>>8&15]+l[s>>4&15]+l[15&s];return m>=256&&(b+=l[a>>28&15]+l[a>>24&15]+l[a>>20&15]+l[a>>16&15]+l[a>>12&15]+l[a>>8&15]+l[a>>4&15]+l[15&a]),m>=384&&(b+=l[c>>28&15]+l[c>>24&15]+l[c>>20&15]+l[c>>16&15]+l[c>>12&15]+l[c>>8&15]+l[c>>4&15]+l[15&c]+l[u>>28&15]+l[u>>24&15]+l[u>>20&15]+l[u>>16&15]+l[u>>12&15]+l[u>>8&15]+l[u>>4&15]+l[15&u]+l[h>>28&15]+l[h>>24&15]+l[h>>20&15]+l[h>>16&15]+l[h>>12&15]+l[h>>8&15]+l[h>>4&15]+l[15&h]+l[p>>28&15]+l[p>>24&15]+l[p>>20&15]+l[p>>16&15]+l[p>>12&15]+l[p>>8&15]+l[p>>4&15]+l[15&p]),512==m&&(b+=l[f>>28&15]+l[f>>24&15]+l[f>>20&15]+l[f>>16&15]+l[f>>12&15]+l[f>>8&15]+l[f>>4&15]+l[15&f]+l[d>>28&15]+l[d>>24&15]+l[d>>20&15]+l[d>>16&15]+l[d>>12&15]+l[d>>8&15]+l[d>>4&15]+l[15&d]+l[g>>28&15]+l[g>>24&15]+l[g>>20&15]+l[g>>16&15]+l[g>>12&15]+l[g>>8&15]+l[g>>4&15]+l[15&g]+l[y>>28&15]+l[y>>24&15]+l[y>>20&15]+l[y>>16&15]+l[y>>12&15]+l[y>>8&15]+l[y>>4&15]+l[15&y]),b},w.prototype.toString=w.prototype.hex,w.prototype.digest=function(){this.finalize();var e=this.h0h,t=this.h0l,r=this.h1h,n=this.h1l,o=this.h2h,i=this.h2l,s=this.h3h,a=this.h3l,c=this.h4h,u=this.h4l,l=this.h5h,h=this.h5l,p=this.h6h,f=this.h6l,d=this.h7h,g=this.h7l,y=this.bits,m=[e>>24&255,e>>16&255,e>>8&255,255&e,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24&255,r>>16&255,r>>8&255,255&r,n>>24&255,n>>16&255,n>>8&255,255&n,o>>24&255,o>>16&255,o>>8&255,255&o,i>>24&255,i>>16&255,i>>8&255,255&i,s>>24&255,s>>16&255,s>>8&255,255&s];return y>=256&&m.push(a>>24&255,a>>16&255,a>>8&255,255&a),y>=384&&m.push(c>>24&255,c>>16&255,c>>8&255,255&c,u>>24&255,u>>16&255,u>>8&255,255&u,l>>24&255,l>>16&255,l>>8&255,255&l,h>>24&255,h>>16&255,h>>8&255,255&h),512==y&&m.push(p>>24&255,p>>16&255,p>>8&255,255&p,f>>24&255,f>>16&255,f>>8&255,255&f,d>>24&255,d>>16&255,d>>8&255,255&d,g>>24&255,g>>16&255,g>>8&255,255&g),m},w.prototype.array=w.prototype.digest,w.prototype.arrayBuffer=function(){this.finalize();var e=this.bits,t=new ArrayBuffer(e/8),r=new DataView(t);return r.setUint32(0,this.h0h),r.setUint32(4,this.h0l),r.setUint32(8,this.h1h),r.setUint32(12,this.h1l),r.setUint32(16,this.h2h),r.setUint32(20,this.h2l),r.setUint32(24,this.h3h),e>=256&&r.setUint32(28,this.h3l),e>=384&&(r.setUint32(32,this.h4h),r.setUint32(36,this.h4l),r.setUint32(40,this.h5h),r.setUint32(44,this.h5l)),512==e&&(r.setUint32(48,this.h6h),r.setUint32(52,this.h6l),r.setUint32(56,this.h7h),r.setUint32(60,this.h7l)),t},w.prototype.clone=function(){var e=new w(this.bits,!1);return this.copyTo(e),e},w.prototype.copyTo=function(e){var t=0,r=["h0h","h0l","h1h","h1l","h2h","h2l","h3h","h3l","h4h","h4l","h5h","h5l","h6h","h6l","h7h","h7l","start","bytes","hBytes","finalized","hashed","lastByteIndex"];for(t=0;t{var n=r(592).stringify,o=r(9385);e.exports=function(e){return{parse:o(e),stringify:n}},e.exports.parse=o(),e.exports.stringify=n},9385:(e,t,r)=>{var n=null;const o=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,i=/(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;e.exports=function(e){"use strict";var t={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(null!=e){if(!0===e.strict&&(t.strict=!0),!0===e.storeAsString&&(t.storeAsString=!0),t.alwaysParseAsBig=!0===e.alwaysParseAsBig&&e.alwaysParseAsBig,t.useNativeBigInt=!0===e.useNativeBigInt&&e.useNativeBigInt,void 0!==e.constructorAction){if("error"!==e.constructorAction&&"ignore"!==e.constructorAction&&"preserve"!==e.constructorAction)throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${e.constructorAction}`);t.constructorAction=e.constructorAction}if(void 0!==e.protoAction){if("error"!==e.protoAction&&"ignore"!==e.protoAction&&"preserve"!==e.protoAction)throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${e.protoAction}`);t.protoAction=e.protoAction}}var s,a,c,u,l={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},h=function(e){throw{name:"SyntaxError",message:e,at:s,text:c}},p=function(e){return e&&e!==a&&h("Expected '"+e+"' instead of '"+a+"'"),a=c.charAt(s),s+=1,a},f=function(){var e,o="";for("-"===a&&(o="-",p("-"));a>="0"&&a<="9";)o+=a,p();if("."===a)for(o+=".";p()&&a>="0"&&a<="9";)o+=a;if("e"===a||"E"===a)for(o+=a,p(),"-"!==a&&"+"!==a||(o+=a,p());a>="0"&&a<="9";)o+=a,p();if(e=+o,isFinite(e))return null==n&&(n=r(5117)),o.length>15?t.storeAsString?o:t.useNativeBigInt?BigInt(o):new n(o):t.alwaysParseAsBig?t.useNativeBigInt?BigInt(e):new n(e):e;h("Bad number")},d=function(){var e,t,r,n="";if('"'===a)for(var o=s;p();){if('"'===a)return s-1>o&&(n+=c.substring(o,s-1)),p(),n;if("\\"===a){if(s-1>o&&(n+=c.substring(o,s-1)),p(),"u"===a){for(r=0,t=0;t<4&&(e=parseInt(p(),16),isFinite(e));t+=1)r=16*r+e;n+=String.fromCharCode(r)}else{if("string"!=typeof l[a])break;n+=l[a]}o=s}}h("Bad string")},g=function(){for(;a&&a<=" ";)p()};return u=function(){switch(g(),a){case"{":return function(){var e,r=Object.create(null);if("{"===a){if(p("{"),g(),"}"===a)return p("}"),r;for(;a;){if(e=d(),g(),p(":"),!0===t.strict&&Object.hasOwnProperty.call(r,e)&&h('Duplicate key "'+e+'"'),!0===o.test(e)?"error"===t.protoAction?h("Object contains forbidden prototype property"):"ignore"===t.protoAction?u():r[e]=u():!0===i.test(e)?"error"===t.constructorAction?h("Object contains forbidden constructor property"):"ignore"===t.constructorAction?u():r[e]=u():r[e]=u(),g(),"}"===a)return p("}"),r;p(","),g()}}h("Bad object")}();case"[":return function(){var e=[];if("["===a){if(p("["),g(),"]"===a)return p("]"),e;for(;a;){if(e.push(u()),g(),"]"===a)return p("]"),e;p(","),g()}}h("Bad array")}();case'"':return d();case"-":return f();default:return a>="0"&&a<="9"?f():function(){switch(a){case"t":return p("t"),p("r"),p("u"),p("e"),!0;case"f":return p("f"),p("a"),p("l"),p("s"),p("e"),!1;case"n":return p("n"),p("u"),p("l"),p("l"),null}h("Unexpected '"+a+"'")}()}},function(e,t){var r;return c=e+"",s=0,a=" ",r=u(),g(),a&&h("Syntax error"),"function"==typeof t?function e(r,n){var o,i=r[n];return i&&"object"==typeof i&&Object.keys(i).forEach((function(t){void 0!==(o=e(i,t))?i[t]=o:delete i[t]})),t.call(r,n,i)}({"":r},""):r}}},592:(e,t,r)=>{var n=r(5117),o=e.exports;!function(){"use strict";var e,t,r,i=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function a(e){return i.lastIndex=0,i.test(e)?'"'+e.replace(i,(function(e){var t=s[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function c(o,i){var s,u,l,h,p,f=e,d=i[o],g=null!=d&&(d instanceof n||n.isBigNumber(d));switch(d&&"object"==typeof d&&"function"==typeof d.toJSON&&(d=d.toJSON(o)),"function"==typeof r&&(d=r.call(i,o,d)),typeof d){case"string":return g?d:a(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":case"bigint":return String(d);case"object":if(!d)return"null";if(e+=t,p=[],"[object Array]"===Object.prototype.toString.apply(d)){for(h=d.length,s=0;s{var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,s=n&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=a&&c&&"function"==typeof c.get?c.get:null,l=a&&Set.prototype.forEach,h="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=Boolean.prototype.valueOf,g=Object.prototype.toString,y=Function.prototype.toString,m=String.prototype.match,b="function"==typeof BigInt?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,v="function"==typeof Symbol&&"object"==typeof Symbol.iterator,x=Object.prototype.propertyIsEnumerable,S=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null),E=r(4654).custom,T=E&&I(E)?E:null,_="function"==typeof Symbol&&void 0!==Symbol.toStringTag?Symbol.toStringTag:null;function B(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function U(e){return String(e).replace(/"/g,""")}function k(e){return!("[object Array]"!==O(e)||_&&"object"==typeof e&&_ in e)}function I(e){if(v)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!w)return!1;try{return w.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,n,o){var a=r||{};if(R(a,"quoteStyle")&&"single"!==a.quoteStyle&&"double"!==a.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(R(a,"maxStringLength")&&("number"==typeof a.maxStringLength?a.maxStringLength<0&&a.maxStringLength!==1/0:null!==a.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!R(a,"customInspect")||a.customInspect;if("boolean"!=typeof c)throw new TypeError('option "customInspect", if provided, must be `true` or `false`');if(R(a,"indent")&&null!==a.indent&&"\t"!==a.indent&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return N(t,a);if("number"==typeof t)return 0===t?1/0/t>0?"0":"-0":String(t);if("bigint"==typeof t)return String(t)+"n";var g=void 0===a.depth?5:a.depth;if(void 0===n&&(n=0),n>=g&&g>0&&"object"==typeof t)return k(t)?"[Array]":"[Object]";var A,x=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=Array(e.indent+1).join(" ")}return{base:r,prev:Array(t+1).join(r)}}(a,n);if(void 0===o)o=[];else if(D(o,t)>=0)return"[Circular]";function E(t,r,i){if(r&&(o=o.slice()).push(r),i){var s={depth:a.depth};return R(a,"quoteStyle")&&(s.quoteStyle=a.quoteStyle),e(t,s,n+1,o)}return e(t,a,n+1,o)}if("function"==typeof t){var C=function(e){if(e.name)return e.name;var t=m.call(y.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),P=M(t,E);return"[Function"+(C?": "+C:" (anonymous)")+"]"+(P.length>0?" { "+P.join(", ")+" }":"")}if(I(t)){var H=v?String(t).replace(/^(Symbol\(.*\))_[^)]*$/,"$1"):w.call(t);return"object"!=typeof t||v?H:L(H)}if((A=t)&&"object"==typeof A&&("undefined"!=typeof HTMLElement&&A instanceof HTMLElement||"string"==typeof A.nodeName&&"function"==typeof A.getAttribute)){for(var G="<"+String(t.nodeName).toLowerCase(),K=t.attributes||[],q=0;q"}if(k(t)){if(0===t.length)return"[]";var V=M(t,E);return x&&!function(e){for(var t=0;t=0)return!1;return!0}(V)?"["+j(V,x)+"]":"[ "+V.join(", ")+" ]"}if(function(e){return!("[object Error]"!==O(e)||_&&"object"==typeof e&&_ in e)}(t)){var $=M(t,E);return 0===$.length?"["+String(t)+"]":"{ ["+String(t)+"] "+$.join(", ")+" }"}if("object"==typeof t&&c){if(T&&"function"==typeof t[T])return t[T]();if("function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{u.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var W=[];return s.call(t,(function(e,r){W.push(E(r,t,!0)+" => "+E(e,t))})),z("Map",i.call(t),W,x)}if(function(e){if(!u||!e||"object"!=typeof e)return!1;try{u.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var X=[];return l.call(t,(function(e){X.push(E(e,t))})),z("Set",u.call(t),X,x)}if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{h.call(e,h);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return F("WeakMap");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{h.call(e,h)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return F("WeakSet");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{return f.call(e),!0}catch(e){}return!1}(t))return F("WeakRef");if(function(e){return!("[object Number]"!==O(e)||_&&"object"==typeof e&&_ in e)}(t))return L(E(Number(t)));if(function(e){if(!e||"object"!=typeof e||!b)return!1;try{return b.call(e),!0}catch(e){}return!1}(t))return L(E(b.call(t)));if(function(e){return!("[object Boolean]"!==O(e)||_&&"object"==typeof e&&_ in e)}(t))return L(d.call(t));if(function(e){return!("[object String]"!==O(e)||_&&"object"==typeof e&&_ in e)}(t))return L(E(String(t)));if(!function(e){return!("[object Date]"!==O(e)||_&&"object"==typeof e&&_ in e)}(t)&&!function(e){return!("[object RegExp]"!==O(e)||_&&"object"==typeof e&&_ in e)}(t)){var Y=M(t,E),J=S?S(t)===Object.prototype:t instanceof Object||t.constructor===Object,Q=t instanceof Object?"":"null prototype",Z=!J&&_&&Object(t)===t&&_ in t?O(t).slice(8,-1):Q?"Object":"",ee=(J||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(Z||Q?"["+[].concat(Z||[],Q||[]).join(": ")+"] ":"");return 0===Y.length?ee+"{}":x?ee+"{"+j(Y,x)+"}":ee+"{ "+Y.join(", ")+" }"}return String(t)};var C=Object.prototype.hasOwnProperty||function(e){return e in this};function R(e,t){return C.call(e,t)}function O(e){return g.call(e)}function D(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;rt.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return N(e.slice(0,t.maxStringLength),t)+n}return B(e.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,P),"single",t)}function P(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+t.toString(16).toUpperCase()}function L(e){return"Object("+e+")"}function F(e){return e+" { ? }"}function z(e,t,r,n){return e+" ("+t+") {"+(n?j(r,n):r.join(", "))+"}"}function j(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+e.join(","+r)+"\n"+t.prev}function M(e,t){var r=k(e),n=[];if(r){n.length=e.length;for(var o=0;o{"use strict";function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var r,n="",o=0,i=-1,s=0,a=0;a<=e.length;++a){if(a2){var c=n.lastIndexOf("/");if(c!==n.length-1){-1===c?(n="",o=0):o=(n=n.slice(0,c)).length-1-n.lastIndexOf("/"),i=a,s=0;continue}}else if(2===n.length||1===n.length){n="",o=0,i=a,s=0;continue}t&&(n.length>0?n+="/..":n="..",o=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),o=a-i-1;i=a,s=0}else 46===r&&-1!==s?++s:s=-1}return n}var n={resolve:function(){for(var e,n="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var s;i>=0?s=arguments[i]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(n=s+"/"+n,o=47===s.charCodeAt(0))}return n=r(n,!o),o?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),o=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!n)).length||n||(e="."),e.length>0&&o&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,r=0;r0&&(void 0===e?e=o:e+="/"+o)}return void 0===e?".":n.normalize(e)},relative:function(e,r){if(t(e),t(r),e===r)return"";if((e=n.resolve(e))===(r=n.resolve(r)))return"";for(var o=1;ou){if(47===r.charCodeAt(a+h))return r.slice(a+h+1);if(0===h)return r.slice(a+h)}else s>u&&(47===e.charCodeAt(o+h)?l=h:0===h&&(l=0));break}var p=e.charCodeAt(o+h);if(p!==r.charCodeAt(a+h))break;47===p&&(l=h)}var f="";for(h=o+l+1;h<=i;++h)h!==i&&47!==e.charCodeAt(h)||(0===f.length?f+="..":f+="/..");return f.length>0?f+r.slice(a+l):(a+=l,47===r.charCodeAt(a)&&++a,r.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var r=e.charCodeAt(0),n=47===r,o=-1,i=!0,s=e.length-1;s>=1;--s)if(47===(r=e.charCodeAt(s))){if(!i){o=s;break}}else i=!1;return-1===o?n?"/":".":n&&1===o?"//":e.slice(0,o)},basename:function(e,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');t(e);var n,o=0,i=-1,s=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var a=r.length-1,c=-1;for(n=e.length-1;n>=0;--n){var u=e.charCodeAt(n);if(47===u){if(!s){o=n+1;break}}else-1===c&&(s=!1,c=n+1),a>=0&&(u===r.charCodeAt(a)?-1==--a&&(i=n):(a=-1,i=c))}return o===i?i=c:-1===i&&(i=e.length),e.slice(o,i)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!s){o=n+1;break}}else-1===i&&(s=!1,i=n+1);return-1===i?"":e.slice(o,i)},extname:function(e){t(e);for(var r=-1,n=0,o=-1,i=!0,s=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===o&&(i=!1,o=a+1),46===c?-1===r?r=a:1!==s&&(s=1):-1!==r&&(s=-1);else if(!i){n=a+1;break}}return-1===r||-1===o||0===s||1===s&&r===o-1&&r===n+1?"":e.slice(r,o)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+"/"+n:n}(0,e)},parse:function(e){t(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var n,o=e.charCodeAt(0),i=47===o;i?(r.root="/",n=1):n=0;for(var s=-1,a=0,c=-1,u=!0,l=e.length-1,h=0;l>=n;--l)if(47!==(o=e.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===o?-1===s?s=l:1!==h&&(h=1):-1!==s&&(h=-1);else if(!u){a=l+1;break}return-1===s||-1===c||0===h||1===h&&s===c-1&&s===a+1?-1!==c&&(r.base=r.name=0===a&&i?e.slice(1,c):e.slice(a,c)):(0===a&&i?(r.name=e.slice(1,s),r.base=e.slice(1,c)):(r.name=e.slice(a,s),r.base=e.slice(a,c)),r.ext=e.slice(s,c)),a>0?r.dir=e.slice(0,a-1):i&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n},9370:(e,t)=>{"use strict";var r=Object.prototype.hasOwnProperty;function n(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function o(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var n,i,s=[];for(i in"string"!=typeof t&&(t="?"),e)if(r.call(e,i)){if((n=e[i])||null!=n&&!isNaN(n)||(n=""),i=o(i),n=o(n),null===i||null===n)continue;s.push(i+"="+n)}return s.length?t+s.join("&"):""},t.parse=function(e){for(var t,r=/([^=?#&]+)=?([^&]*)/g,o={};t=r.exec(e);){var i=n(t[1]),s=n(t[2]);null===i||null===s||i in o||(o[i]=s)}return o}},1926:e=>{"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},3680:(e,t,r)=>{"use strict";var n=r(1801),o=r(7615),i=r(3126),s=n("%TypeError%"),a=n("%WeakMap%",!0),c=n("%Map%",!0),u=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),h=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),f=o("Map.prototype.set",!0),d=o("Map.prototype.has",!0),g=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r};e.exports=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new s("Side channel does not contain "+i(e))},get:function(n){if(a&&n&&("object"==typeof n||"function"==typeof n)){if(e)return u(e,n)}else if(c){if(t)return p(t,n)}else if(r)return function(e,t){var r=g(e,t);return r&&r.value}(r,n)},has:function(n){if(a&&n&&("object"==typeof n||"function"==typeof n)){if(e)return h(e,n)}else if(c){if(t)return d(t,n)}else if(r)return function(e,t){return!!g(e,t)}(r,n);return!1},set:function(n,o){a&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new a),l(e,n,o)):c?(t||(t=new c),f(t,n,o)):(r||(r={key:{},next:null}),function(e,t,r){var n=g(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,o))}};return n}},2858:e=>{"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o;"undefined"!=typeof window?o=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),o=void 0):o=self;var i=r(1069),s=r(5799),a=r(3065),c=r(4287),u=r(1960),l=r(969),h=r(2858);function p(){}e.exports=function(e,r){return"function"==typeof r?new t.Request("GET",e).end(r):1===arguments.length?new t.Request("GET",e):new t.Request(e,r)};var f=t=e.exports;t.Request=w,f.getXHR=function(){if(o.XMLHttpRequest&&(!o.location||"file:"!==o.location.protocol||!o.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw new Error("Browser-only version of superagent could not find XHR")};var d="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};function g(e){if(!u(e))return e;var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&y(t,r,e[r]);return t.join("&")}function y(e,t,r){if(void 0!==r)if(null!==r)if(Array.isArray(r))r.forEach((function(r){y(e,t,r)}));else if(u(r))for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&y(e,"".concat(t,"[").concat(n,"]"),r[n]);else e.push(encodeURI(t)+"="+encodeURIComponent(r));else e.push(encodeURI(t))}function m(e){for(var t,r,n={},o=e.split("&"),i=0,s=o.length;i0||e instanceof Object)?t(e):null)},A.prototype.toError=function(){var e=this.req,t=e.method,r=e.url,n="cannot ".concat(t," ").concat(r," (").concat(this.status,")"),o=new Error(n);return o.status=this.status,o.method=t,o.url=r,o},f.Response=A,i(w.prototype),c(w.prototype),w.prototype.type=function(e){return this.set("Content-Type",f.types[e]||e),this},w.prototype.accept=function(e){return this.set("Accept",f.types[e]||e),this},w.prototype.auth=function(e,t,r){1===arguments.length&&(t=""),"object"===n(t)&&null!==t&&(r=t,t=""),r||(r={type:"function"==typeof btoa?"basic":"auto"});var o=function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(e,t,r,o)},w.prototype.query=function(e){return"string"!=typeof e&&(e=g(e)),e&&this._query.push(e),this},w.prototype.attach=function(e,t,r){if(t){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,r||t.name)}return this},w.prototype._getFormData=function(){return this._formData||(this._formData=new o.FormData),this._formData},w.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var r=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),r(e,t)},w.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},w.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},w.prototype.ca=w.prototype.agent,w.prototype.buffer=w.prototype.ca,w.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},w.prototype.pipe=w.prototype.write,w.prototype._isHost=function(e){return e&&"object"===n(e)&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},w.prototype.end=function(e){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||p,this._finalizeQueryString(),this._end()},w.prototype._setUploadTimeout=function(){var e=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((function(){e._timeoutError("Upload timeout of ",e._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},w.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var e=this;this.xhr=f.getXHR();var t=this.xhr,r=this._formData||this._data;this._setTimeouts(),t.onreadystatechange=function(){var r=t.readyState;if(r>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4===r){var n;try{n=t.status}catch(e){n=0}if(!n){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var n=function(t,r){r.total>0&&(r.percent=r.loaded/r.total*100,100===r.percent&&clearTimeout(e._uploadTimeoutTimer)),r.direction=t,e.emit("progress",r)};if(this.hasListeners("progress"))try{t.addEventListener("progress",n.bind(null,"download")),t.upload&&t.upload.addEventListener("progress",n.bind(null,"upload"))}catch(e){}t.upload&&this._setUploadTimeout();try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof r&&!this._isHost(r)){var o=this._header["content-type"],i=this._serializer||f.serialize[o?o.split(";")[0]:""];!i&&b(o)&&(i=f.serialize["application/json"]),i&&(r=i(r))}for(var s in this.header)null!==this.header[s]&&Object.prototype.hasOwnProperty.call(this.header,s)&&t.setRequestHeader(s,this.header[s]);this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0===r?null:r)},f.agent=function(){return new h},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(e){h.prototype[e.toLowerCase()]=function(t,r){var n=new f.Request(e,t);return this._setDefaults(n),r&&n.end(r),n}})),h.prototype.del=h.prototype.delete,f.get=function(e,t,r){var n=f("GET",e);return"function"==typeof t&&(r=t,t=null),t&&n.query(t),r&&n.end(r),n},f.head=function(e,t,r){var n=f("HEAD",e);return"function"==typeof t&&(r=t,t=null),t&&n.query(t),r&&n.end(r),n},f.options=function(e,t,r){var n=f("OPTIONS",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},f.del=v,f.delete=v,f.patch=function(e,t,r){var n=f("PATCH",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},f.post=function(e,t,r){var n=f("POST",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n},f.put=function(e,t,r){var n=f("PUT",e);return"function"==typeof t&&(r=t,t=null),t&&n.send(t),r&&n.end(r),n}},1960:e=>{"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){return null!==e&&"object"===t(e)}},4287:(e,t,r)=>{"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=r(1960);function i(e){if(e)return function(e){for(var t in i.prototype)Object.prototype.hasOwnProperty.call(i.prototype,t)&&(e[t]=i.prototype[t]);return e}(e)}e.exports=i,i.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},i.prototype.parse=function(e){return this._parser=e,this},i.prototype.responseType=function(e){return this._responseType=e,this},i.prototype.serialize=function(e){return this._serializer=e,this},i.prototype.timeout=function(e){if(!e||"object"!==n(e))return this._timeout=e,this._responseTimeout=0,this._uploadTimeout=0,this;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;case"upload":this._uploadTimeout=e.upload;break;default:console.warn("Unknown timeout option",t)}return this},i.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var s=new Set(["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"]),a=new Set([408,413,429,500,502,503,504,521,522,524]);i.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var r=this._retryCallback(e,t);if(!0===r)return!0;if(!1===r)return!1}catch(e){console.error(e)}if(t&&t.status&&a.has(t.status))return!0;if(e){if(e.code&&s.has(e.code))return!0;if(e.timeout&&"ECONNABORTED"===e.code)return!0;if(e.crossDomain)return!0}return!1},i.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},i.prototype.then=function(e,t){var r=this;if(!this._fullfilledPromise){var n=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(e,t){n.on("abort",(function(){if(!(r._maxRetries&&r._maxRetries>r._retries))if(r.timedout&&r.timedoutError)t(r.timedoutError);else{var e=new Error("Aborted");e.code="ABORTED",e.status=r.status,e.method=r.method,e.url=r.url,t(e)}})),n.end((function(r,n){r?t(r):e(n)}))}))}return this._fullfilledPromise.then(e,t)},i.prototype.catch=function(e){return this.then(void 0,e)},i.prototype.use=function(e){return e(this),this},i.prototype.ok=function(e){if("function"!=typeof e)throw new Error("Callback required");return this._okCallback=e,this},i.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},i.prototype.get=function(e){return this._header[e.toLowerCase()]},i.prototype.getHeader=i.prototype.get,i.prototype.set=function(e,t){if(o(e)){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&this.set(r,e[r]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},i.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},i.prototype.field=function(e,t){if(null==e)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(o(e)){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&this.field(r,e[r]);return this}if(Array.isArray(t)){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&this.field(e,t[n]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=String(t)),this._getFormData().append(e,t),this},i.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},i.prototype._auth=function(e,t,r,n){switch(r.type){case"basic":this.set("Authorization","Basic ".concat(n("".concat(e,":").concat(t))));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer ".concat(e))}return this},i.prototype.withCredentials=function(e){return void 0===e&&(e=!0),this._withCredentials=e,this},i.prototype.redirects=function(e){return this._maxRedirects=e,this},i.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw new TypeError("Invalid argument");return this._maxResponseSize=e,this},i.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},i.prototype.send=function(e){var t=o(e),r=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(t&&o(this._data))for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(this._data[n]=e[n]);else"string"==typeof e?(r||this.type("form"),(r=this._header["content-type"])&&(r=r.toLowerCase().trim()),this._data="application/x-www-form-urlencoded"===r?this._data?"".concat(this._data,"&").concat(e):e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)||r||this.type("json"),this},i.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},i.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.includes("?")?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var r=this.url.slice(t+1).split("&");"function"==typeof this._sort?r.sort(this._sort):r.sort(),this.url=this.url.slice(0,t)+"?"+r.join("&")}}},i.prototype._appendQueryString=function(){console.warn("Unsupported")},i.prototype._timeoutError=function(e,t,r){if(!this._aborted){var n=new Error("".concat(e+t,"ms exceeded"));n.timeout=t,n.code="ECONNABORTED",n.errno=r,this.timedout=!0,this.timedoutError=n,this.abort(),this.callback(n)}},i.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))}},969:(e,t,r)=>{"use strict";var n=r(3094);function o(e){if(e)return function(e){for(var t in o.prototype)Object.prototype.hasOwnProperty.call(o.prototype,t)&&(e[t]=o.prototype[t]);return e}(e)}e.exports=o,o.prototype.get=function(e){return this.header[e.toLowerCase()]},o.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=n.type(t);var r=n.params(t);for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(this[o]=r[o]);this.links={};try{e.link&&(this.links=n.parseLinks(e.link))}catch(e){}},o.prototype._setStatusProperties=function(e){var t=e/100|0;this.statusCode=e,this.status=this.statusCode,this.statusType=t,this.info=1===t,this.ok=2===t,this.redirect=3===t,this.clientError=4===t,this.serverError=5===t,this.error=(4===t||5===t)&&this.toError(),this.created=201===e,this.accepted=202===e,this.noContent=204===e,this.badRequest=400===e,this.unauthorized=401===e,this.notAcceptable=406===e,this.forbidden=403===e,this.notFound=404===e,this.unprocessableEntity=422===e}},3094:(e,t)=>{"use strict";function r(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,c=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,s=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw s}}}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC3986";e.exports={default:n,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:n}},3065:(e,t,r)=>{"use strict";var n=r(4246),o=r(1688),i=r(5335);e.exports={formats:i,parse:o,stringify:n}},1688:(e,t,r)=>{"use strict";var n=r(4562),o=Object.prototype.hasOwnProperty,i=Array.isArray,s={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},c=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},u=function(e,t,r,n){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/g,a=r.depth>0&&/(\[[^[\]]*])/.exec(i),u=a?i.slice(0,a.index):i,l=[];if(u){if(!r.plainObjects&&o.call(Object.prototype,u)&&!r.allowPrototypes)return;l.push(u)}for(var h=0;r.depth>0&&null!==(a=s.exec(i))&&h=0;--i){var s,a=e[i];if("[]"===a&&r.parseArrays)s=[].concat(o);else{s=r.plainObjects?Object.create(null):{};var u="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,l=parseInt(u,10);r.parseArrays||""!==u?!isNaN(l)&&a!==u&&String(l)===u&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(s=[])[l]=o:s[u]=o:s={0:o}}o=s}return o}(l,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return s;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?s.charset:e.charset;return{allowDots:void 0===e.allowDots?s.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:s.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:s.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:s.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:s.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:s.comma,decoder:"function"==typeof e.decoder?e.decoder:s.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:s.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:s.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:s.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:s.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:s.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var l="string"==typeof e?function(e,t){var r,u={},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,h=t.parameterLimit===1/0?void 0:t.parameterLimit,p=l.split(t.delimiter,h),f=-1,d=t.charset;if(t.charsetSentinel)for(r=0;r-1&&(y=i(y)?[y]:y),o.call(u,g)?u[g]=n.combine(u[g],y):u[g]=y}return u}(e,r):e,h=r.plainObjects?Object.create(null):{},p=Object.keys(l),f=0;f{"use strict";var n=r(3680),o=r(4562),i=r(5335),s=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},c=Array.isArray,u=Array.prototype.push,l=function(e,t){u.apply(e,c(t)?t:[t])},h=Date.prototype.toISOString,p=i.default,f={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,format:p,formatter:i.formatters[p],indices:!1,serializeDate:function(e){return h.call(e)},skipNulls:!1,strictNullHandling:!1},d=function e(t,r,i,s,a,u,h,p,d,g,y,m,b,A,w){var v,x=t;if(w.has(t))throw new RangeError("Cyclic object value");if("function"==typeof h?x=h(r,x):x instanceof Date?x=g(x):"comma"===i&&c(x)&&(x=o.maybeMap(x,(function(e){return e instanceof Date?g(e):e}))),null===x){if(s)return u&&!b?u(r,f.encoder,A,"key",y):r;x=""}if("string"==typeof(v=x)||"number"==typeof v||"boolean"==typeof v||"symbol"==typeof v||"bigint"==typeof v||o.isBuffer(x))return u?[m(b?r:u(r,f.encoder,A,"key",y))+"="+m(u(x,f.encoder,A,"value",y))]:[m(r)+"="+m(String(x))];var S,E=[];if(void 0===x)return E;if("comma"===i&&c(x))S=[{value:x.length>0?x.join(",")||null:void 0}];else if(c(h))S=h;else{var T=Object.keys(x);S=p?T.sort(p):T}for(var _=0;_0?w+A:""}},4562:(e,t,r)=>{"use strict";var n=r(5335),o=Object.prototype.hasOwnProperty,i=Array.isArray,s=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n1;){var t=e.pop(),r=t.obj[t.prop];if(i(r)){for(var n=[],o=0;o=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||i===n.RFC1738&&(40===l||41===l)?c+=a.charAt(u):l<128?c+=s[l]:l<2048?c+=s[192|l>>6]+s[128|63&l]:l<55296||l>=57344?c+=s[224|l>>12]+s[128|l>>6&63]+s[128|63&l]:(u+=1,l=65536+((1023&l)<<10|1023&a.charCodeAt(u)),c+=s[240|l>>18]+s[128|l>>12&63]+s[128|l>>6&63]+s[128|63&l])}return c},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var r=[],n=0;n>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function d(e,t,r,n,o){var i,s=0;for(i=0;i>>8)-1}function g(e,t,r,n){return d(e,t,r,n,16)}function y(e,t,r,n){return d(e,t,r,n,32)}function m(e,t,r,n){!function(e,t,r,n){for(var o,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,h=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,p=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,f=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,m=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,A=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,v=i,x=s,S=a,E=c,T=u,_=l,B=h,U=p,k=f,I=d,C=g,R=y,O=m,D=b,N=A,P=w,L=0;L<20;L+=2)v^=(o=(O^=(o=(k^=(o=(T^=(o=v+O|0)<<7|o>>>25)+v|0)<<9|o>>>23)+T|0)<<13|o>>>19)+k|0)<<18|o>>>14,_^=(o=(x^=(o=(D^=(o=(I^=(o=_+x|0)<<7|o>>>25)+_|0)<<9|o>>>23)+I|0)<<13|o>>>19)+D|0)<<18|o>>>14,C^=(o=(B^=(o=(S^=(o=(N^=(o=C+B|0)<<7|o>>>25)+C|0)<<9|o>>>23)+N|0)<<13|o>>>19)+S|0)<<18|o>>>14,P^=(o=(R^=(o=(U^=(o=(E^=(o=P+R|0)<<7|o>>>25)+P|0)<<9|o>>>23)+E|0)<<13|o>>>19)+U|0)<<18|o>>>14,v^=(o=(E^=(o=(S^=(o=(x^=(o=v+E|0)<<7|o>>>25)+v|0)<<9|o>>>23)+x|0)<<13|o>>>19)+S|0)<<18|o>>>14,_^=(o=(T^=(o=(U^=(o=(B^=(o=_+T|0)<<7|o>>>25)+_|0)<<9|o>>>23)+B|0)<<13|o>>>19)+U|0)<<18|o>>>14,C^=(o=(I^=(o=(k^=(o=(R^=(o=C+I|0)<<7|o>>>25)+C|0)<<9|o>>>23)+R|0)<<13|o>>>19)+k|0)<<18|o>>>14,P^=(o=(N^=(o=(D^=(o=(O^=(o=P+N|0)<<7|o>>>25)+P|0)<<9|o>>>23)+O|0)<<13|o>>>19)+D|0)<<18|o>>>14;v=v+i|0,x=x+s|0,S=S+a|0,E=E+c|0,T=T+u|0,_=_+l|0,B=B+h|0,U=U+p|0,k=k+f|0,I=I+d|0,C=C+g|0,R=R+y|0,O=O+m|0,D=D+b|0,N=N+A|0,P=P+w|0,e[0]=v>>>0&255,e[1]=v>>>8&255,e[2]=v>>>16&255,e[3]=v>>>24&255,e[4]=x>>>0&255,e[5]=x>>>8&255,e[6]=x>>>16&255,e[7]=x>>>24&255,e[8]=S>>>0&255,e[9]=S>>>8&255,e[10]=S>>>16&255,e[11]=S>>>24&255,e[12]=E>>>0&255,e[13]=E>>>8&255,e[14]=E>>>16&255,e[15]=E>>>24&255,e[16]=T>>>0&255,e[17]=T>>>8&255,e[18]=T>>>16&255,e[19]=T>>>24&255,e[20]=_>>>0&255,e[21]=_>>>8&255,e[22]=_>>>16&255,e[23]=_>>>24&255,e[24]=B>>>0&255,e[25]=B>>>8&255,e[26]=B>>>16&255,e[27]=B>>>24&255,e[28]=U>>>0&255,e[29]=U>>>8&255,e[30]=U>>>16&255,e[31]=U>>>24&255,e[32]=k>>>0&255,e[33]=k>>>8&255,e[34]=k>>>16&255,e[35]=k>>>24&255,e[36]=I>>>0&255,e[37]=I>>>8&255,e[38]=I>>>16&255,e[39]=I>>>24&255,e[40]=C>>>0&255,e[41]=C>>>8&255,e[42]=C>>>16&255,e[43]=C>>>24&255,e[44]=R>>>0&255,e[45]=R>>>8&255,e[46]=R>>>16&255,e[47]=R>>>24&255,e[48]=O>>>0&255,e[49]=O>>>8&255,e[50]=O>>>16&255,e[51]=O>>>24&255,e[52]=D>>>0&255,e[53]=D>>>8&255,e[54]=D>>>16&255,e[55]=D>>>24&255,e[56]=N>>>0&255,e[57]=N>>>8&255,e[58]=N>>>16&255,e[59]=N>>>24&255,e[60]=P>>>0&255,e[61]=P>>>8&255,e[62]=P>>>16&255,e[63]=P>>>24&255}(e,t,r,n)}function b(e,t,r,n){!function(e,t,r,n){for(var o,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,h=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,p=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,f=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,m=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,A=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,v=0;v<20;v+=2)i^=(o=(m^=(o=(f^=(o=(u^=(o=i+m|0)<<7|o>>>25)+i|0)<<9|o>>>23)+u|0)<<13|o>>>19)+f|0)<<18|o>>>14,l^=(o=(s^=(o=(b^=(o=(d^=(o=l+s|0)<<7|o>>>25)+l|0)<<9|o>>>23)+d|0)<<13|o>>>19)+b|0)<<18|o>>>14,g^=(o=(h^=(o=(a^=(o=(A^=(o=g+h|0)<<7|o>>>25)+g|0)<<9|o>>>23)+A|0)<<13|o>>>19)+a|0)<<18|o>>>14,w^=(o=(y^=(o=(p^=(o=(c^=(o=w+y|0)<<7|o>>>25)+w|0)<<9|o>>>23)+c|0)<<13|o>>>19)+p|0)<<18|o>>>14,i^=(o=(c^=(o=(a^=(o=(s^=(o=i+c|0)<<7|o>>>25)+i|0)<<9|o>>>23)+s|0)<<13|o>>>19)+a|0)<<18|o>>>14,l^=(o=(u^=(o=(p^=(o=(h^=(o=l+u|0)<<7|o>>>25)+l|0)<<9|o>>>23)+h|0)<<13|o>>>19)+p|0)<<18|o>>>14,g^=(o=(d^=(o=(f^=(o=(y^=(o=g+d|0)<<7|o>>>25)+g|0)<<9|o>>>23)+y|0)<<13|o>>>19)+f|0)<<18|o>>>14,w^=(o=(A^=(o=(b^=(o=(m^=(o=w+A|0)<<7|o>>>25)+w|0)<<9|o>>>23)+m|0)<<13|o>>>19)+b|0)<<18|o>>>14;e[0]=i>>>0&255,e[1]=i>>>8&255,e[2]=i>>>16&255,e[3]=i>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=g>>>0&255,e[9]=g>>>8&255,e[10]=g>>>16&255,e[11]=g>>>24&255,e[12]=w>>>0&255,e[13]=w>>>8&255,e[14]=w>>>16&255,e[15]=w>>>24&255,e[16]=h>>>0&255,e[17]=h>>>8&255,e[18]=h>>>16&255,e[19]=h>>>24&255,e[20]=p>>>0&255,e[21]=p>>>8&255,e[22]=p>>>16&255,e[23]=p>>>24&255,e[24]=f>>>0&255,e[25]=f>>>8&255,e[26]=f>>>16&255,e[27]=f>>>24&255,e[28]=d>>>0&255,e[29]=d>>>8&255,e[30]=d>>>16&255,e[31]=d>>>24&255}(e,t,r,n)}var A=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function w(e,t,r,n,o,i,s){var a,c,u=new Uint8Array(16),l=new Uint8Array(64);for(c=0;c<16;c++)u[c]=0;for(c=0;c<8;c++)u[c]=i[c];for(;o>=64;){for(m(l,u,s,A),c=0;c<64;c++)e[t+c]=r[n+c]^l[c];for(a=1,c=8;c<16;c++)a=a+(255&u[c])|0,u[c]=255&a,a>>>=8;o-=64,t+=64,n+=64}if(o>0)for(m(l,u,s,A),c=0;c=64;){for(m(c,a,o,A),s=0;s<64;s++)e[t+s]=c[s];for(i=1,s=8;s<16;s++)i=i+(255&a[s])|0,a[s]=255&i,i>>>=8;r-=64,t+=64}if(r>0)for(m(c,a,o,A),s=0;s>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),o=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|o<<9),i=255&e[8]|(255&e[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,s=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(i>>>14|s<<2),a=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(s>>>11|a<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(a>>>8|c<<8),this.r[9]=c>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function T(e,t,r,n,o,i){var s=new E(i);return s.update(r,n,o),s.finish(e,t),0}function _(e,t,r,n,o,i){var s=new Uint8Array(16);return T(s,0,r,n,o,i),g(e,t,s,0)}function B(e,t,r,n,o){var i;if(r<32)return-1;for(S(e,0,t,0,r,n,o),T(e,16,e,32,r-32,e),i=0;i<16;i++)e[i]=0;return 0}function U(e,t,r,n,o){var i,s=new Uint8Array(32);if(r<32)return-1;if(x(s,0,32,n,o),0!==_(t,16,t,32,r-32,s))return-1;for(S(e,0,t,0,r,n,o),i=0;i<32;i++)e[i]=0;return 0}function k(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function I(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function C(e,t,r){for(var n,o=~(r-1),i=0;i<16;i++)n=o&(e[i]^t[i]),e[i]^=n,t[i]^=n}function R(e,r){var n,o,i,s=t(),a=t();for(n=0;n<16;n++)a[n]=r[n];for(I(a),I(a),I(a),o=0;o<2;o++){for(s[0]=a[0]-65517,n=1;n<15;n++)s[n]=a[n]-65535-(s[n-1]>>16&1),s[n-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),i=s[15]>>16&1,s[14]&=65535,C(a,s,1-i)}for(n=0;n<16;n++)e[2*n]=255&a[n],e[2*n+1]=a[n]>>8}function O(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return R(r,e),R(n,t),y(r,0,n,0)}function D(e){var t=new Uint8Array(32);return R(t,e),1&t[0]}function N(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function P(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function L(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function F(e,t,r){var n,o,i=0,s=0,a=0,c=0,u=0,l=0,h=0,p=0,f=0,d=0,g=0,y=0,m=0,b=0,A=0,w=0,v=0,x=0,S=0,E=0,T=0,_=0,B=0,U=0,k=0,I=0,C=0,R=0,O=0,D=0,N=0,P=r[0],L=r[1],F=r[2],z=r[3],j=r[4],M=r[5],H=r[6],G=r[7],K=r[8],q=r[9],V=r[10],$=r[11],W=r[12],X=r[13],Y=r[14],J=r[15];i+=(n=t[0])*P,s+=n*L,a+=n*F,c+=n*z,u+=n*j,l+=n*M,h+=n*H,p+=n*G,f+=n*K,d+=n*q,g+=n*V,y+=n*$,m+=n*W,b+=n*X,A+=n*Y,w+=n*J,s+=(n=t[1])*P,a+=n*L,c+=n*F,u+=n*z,l+=n*j,h+=n*M,p+=n*H,f+=n*G,d+=n*K,g+=n*q,y+=n*V,m+=n*$,b+=n*W,A+=n*X,w+=n*Y,v+=n*J,a+=(n=t[2])*P,c+=n*L,u+=n*F,l+=n*z,h+=n*j,p+=n*M,f+=n*H,d+=n*G,g+=n*K,y+=n*q,m+=n*V,b+=n*$,A+=n*W,w+=n*X,v+=n*Y,x+=n*J,c+=(n=t[3])*P,u+=n*L,l+=n*F,h+=n*z,p+=n*j,f+=n*M,d+=n*H,g+=n*G,y+=n*K,m+=n*q,b+=n*V,A+=n*$,w+=n*W,v+=n*X,x+=n*Y,S+=n*J,u+=(n=t[4])*P,l+=n*L,h+=n*F,p+=n*z,f+=n*j,d+=n*M,g+=n*H,y+=n*G,m+=n*K,b+=n*q,A+=n*V,w+=n*$,v+=n*W,x+=n*X,S+=n*Y,E+=n*J,l+=(n=t[5])*P,h+=n*L,p+=n*F,f+=n*z,d+=n*j,g+=n*M,y+=n*H,m+=n*G,b+=n*K,A+=n*q,w+=n*V,v+=n*$,x+=n*W,S+=n*X,E+=n*Y,T+=n*J,h+=(n=t[6])*P,p+=n*L,f+=n*F,d+=n*z,g+=n*j,y+=n*M,m+=n*H,b+=n*G,A+=n*K,w+=n*q,v+=n*V,x+=n*$,S+=n*W,E+=n*X,T+=n*Y,_+=n*J,p+=(n=t[7])*P,f+=n*L,d+=n*F,g+=n*z,y+=n*j,m+=n*M,b+=n*H,A+=n*G,w+=n*K,v+=n*q,x+=n*V,S+=n*$,E+=n*W,T+=n*X,_+=n*Y,B+=n*J,f+=(n=t[8])*P,d+=n*L,g+=n*F,y+=n*z,m+=n*j,b+=n*M,A+=n*H,w+=n*G,v+=n*K,x+=n*q,S+=n*V,E+=n*$,T+=n*W,_+=n*X,B+=n*Y,U+=n*J,d+=(n=t[9])*P,g+=n*L,y+=n*F,m+=n*z,b+=n*j,A+=n*M,w+=n*H,v+=n*G,x+=n*K,S+=n*q,E+=n*V,T+=n*$,_+=n*W,B+=n*X,U+=n*Y,k+=n*J,g+=(n=t[10])*P,y+=n*L,m+=n*F,b+=n*z,A+=n*j,w+=n*M,v+=n*H,x+=n*G,S+=n*K,E+=n*q,T+=n*V,_+=n*$,B+=n*W,U+=n*X,k+=n*Y,I+=n*J,y+=(n=t[11])*P,m+=n*L,b+=n*F,A+=n*z,w+=n*j,v+=n*M,x+=n*H,S+=n*G,E+=n*K,T+=n*q,_+=n*V,B+=n*$,U+=n*W,k+=n*X,I+=n*Y,C+=n*J,m+=(n=t[12])*P,b+=n*L,A+=n*F,w+=n*z,v+=n*j,x+=n*M,S+=n*H,E+=n*G,T+=n*K,_+=n*q,B+=n*V,U+=n*$,k+=n*W,I+=n*X,C+=n*Y,R+=n*J,b+=(n=t[13])*P,A+=n*L,w+=n*F,v+=n*z,x+=n*j,S+=n*M,E+=n*H,T+=n*G,_+=n*K,B+=n*q,U+=n*V,k+=n*$,I+=n*W,C+=n*X,R+=n*Y,O+=n*J,A+=(n=t[14])*P,w+=n*L,v+=n*F,x+=n*z,S+=n*j,E+=n*M,T+=n*H,_+=n*G,B+=n*K,U+=n*q,k+=n*V,I+=n*$,C+=n*W,R+=n*X,O+=n*Y,D+=n*J,w+=(n=t[15])*P,s+=38*(x+=n*F),a+=38*(S+=n*z),c+=38*(E+=n*j),u+=38*(T+=n*M),l+=38*(_+=n*H),h+=38*(B+=n*G),p+=38*(U+=n*K),f+=38*(k+=n*q),d+=38*(I+=n*V),g+=38*(C+=n*$),y+=38*(R+=n*W),m+=38*(O+=n*X),b+=38*(D+=n*Y),A+=38*(N+=n*J),i=(n=(i+=38*(v+=n*L))+(o=1)+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+o+65535)-65536*(o=Math.floor(n/65536)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),c=(n=c+o+65535)-65536*(o=Math.floor(n/65536)),u=(n=u+o+65535)-65536*(o=Math.floor(n/65536)),l=(n=l+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),f=(n=f+o+65535)-65536*(o=Math.floor(n/65536)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),g=(n=g+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),m=(n=m+o+65535)-65536*(o=Math.floor(n/65536)),b=(n=b+o+65535)-65536*(o=Math.floor(n/65536)),A=(n=A+o+65535)-65536*(o=Math.floor(n/65536)),w=(n=w+o+65535)-65536*(o=Math.floor(n/65536)),i=(n=(i+=o-1+37*(o-1))+(o=1)+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+o+65535)-65536*(o=Math.floor(n/65536)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),c=(n=c+o+65535)-65536*(o=Math.floor(n/65536)),u=(n=u+o+65535)-65536*(o=Math.floor(n/65536)),l=(n=l+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),f=(n=f+o+65535)-65536*(o=Math.floor(n/65536)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),g=(n=g+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),m=(n=m+o+65535)-65536*(o=Math.floor(n/65536)),b=(n=b+o+65535)-65536*(o=Math.floor(n/65536)),A=(n=A+o+65535)-65536*(o=Math.floor(n/65536)),w=(n=w+o+65535)-65536*(o=Math.floor(n/65536)),i+=o-1+37*(o-1),e[0]=i,e[1]=s,e[2]=a,e[3]=c,e[4]=u,e[5]=l,e[6]=h,e[7]=p,e[8]=f,e[9]=d,e[10]=g,e[11]=y,e[12]=m,e[13]=b,e[14]=A,e[15]=w}function z(e,t){F(e,t,t)}function j(e,r){var n,o=t();for(n=0;n<16;n++)o[n]=r[n];for(n=253;n>=0;n--)z(o,o),2!==n&&4!==n&&F(o,o,r);for(n=0;n<16;n++)e[n]=o[n]}function M(e,r){var n,o=t();for(n=0;n<16;n++)o[n]=r[n];for(n=250;n>=0;n--)z(o,o),1!==n&&F(o,o,r);for(n=0;n<16;n++)e[n]=o[n]}function H(e,r,n){var o,i,s=new Uint8Array(32),c=new Float64Array(80),u=t(),l=t(),h=t(),p=t(),f=t(),d=t();for(i=0;i<31;i++)s[i]=r[i];for(s[31]=127&r[31]|64,s[0]&=248,N(c,n),i=0;i<16;i++)l[i]=c[i],p[i]=u[i]=h[i]=0;for(u[0]=p[0]=1,i=254;i>=0;--i)C(u,l,o=s[i>>>3]>>>(7&i)&1),C(h,p,o),P(f,u,h),L(u,u,h),P(h,l,p),L(l,l,p),z(p,f),z(d,u),F(u,h,u),F(h,l,f),P(f,u,h),L(u,u,h),z(l,u),L(h,p,d),F(u,h,a),P(u,u,p),F(h,h,u),F(u,p,d),F(p,l,c),z(l,f),C(u,l,o),C(h,p,o);for(i=0;i<16;i++)c[i+16]=u[i],c[i+32]=h[i],c[i+48]=l[i],c[i+64]=p[i];var g=c.subarray(32),y=c.subarray(16);return j(g,g),F(y,y,g),R(e,y),0}function G(e,t){return H(e,t,o)}function K(e,t){return r(t,32),G(e,t)}function q(e,t,r){var o=new Uint8Array(32);return H(o,r,t),b(e,n,o,A)}E.prototype.blocks=function(e,t,r){for(var n,o,i,s,a,c,u,l,h,p,f,d,g,y,m,b,A,w,v,x=this.fin?0:2048,S=this.h[0],E=this.h[1],T=this.h[2],_=this.h[3],B=this.h[4],U=this.h[5],k=this.h[6],I=this.h[7],C=this.h[8],R=this.h[9],O=this.r[0],D=this.r[1],N=this.r[2],P=this.r[3],L=this.r[4],F=this.r[5],z=this.r[6],j=this.r[7],M=this.r[8],H=this.r[9];r>=16;)p=h=0,p+=(S+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*O,p+=(E+=8191&(n>>>13|(o=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*H),p+=(T+=8191&(o>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*M),p+=(_+=8191&(i>>>7|(s=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*j),h=(p+=(B+=8191&(s>>>4|(a=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*z))>>>13,p&=8191,p+=(U+=a>>>1&8191)*(5*F),p+=(k+=8191&(a>>>14|(c=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*L),p+=(I+=8191&(c>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*P),p+=(C+=8191&(u>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*N),f=h+=(p+=(R+=l>>>5|x)*(5*D))>>>13,f+=S*D,f+=E*O,f+=T*(5*H),f+=_*(5*M),h=(f+=B*(5*j))>>>13,f&=8191,f+=U*(5*z),f+=k*(5*F),f+=I*(5*L),f+=C*(5*P),h+=(f+=R*(5*N))>>>13,f&=8191,d=h,d+=S*N,d+=E*D,d+=T*O,d+=_*(5*H),h=(d+=B*(5*M))>>>13,d&=8191,d+=U*(5*j),d+=k*(5*z),d+=I*(5*F),d+=C*(5*L),g=h+=(d+=R*(5*P))>>>13,g+=S*P,g+=E*N,g+=T*D,g+=_*O,h=(g+=B*(5*H))>>>13,g&=8191,g+=U*(5*M),g+=k*(5*j),g+=I*(5*z),g+=C*(5*F),y=h+=(g+=R*(5*L))>>>13,y+=S*L,y+=E*P,y+=T*N,y+=_*D,h=(y+=B*O)>>>13,y&=8191,y+=U*(5*H),y+=k*(5*M),y+=I*(5*j),y+=C*(5*z),m=h+=(y+=R*(5*F))>>>13,m+=S*F,m+=E*L,m+=T*P,m+=_*N,h=(m+=B*D)>>>13,m&=8191,m+=U*O,m+=k*(5*H),m+=I*(5*M),m+=C*(5*j),b=h+=(m+=R*(5*z))>>>13,b+=S*z,b+=E*F,b+=T*L,b+=_*P,h=(b+=B*N)>>>13,b&=8191,b+=U*D,b+=k*O,b+=I*(5*H),b+=C*(5*M),A=h+=(b+=R*(5*j))>>>13,A+=S*j,A+=E*z,A+=T*F,A+=_*L,h=(A+=B*P)>>>13,A&=8191,A+=U*N,A+=k*D,A+=I*O,A+=C*(5*H),w=h+=(A+=R*(5*M))>>>13,w+=S*M,w+=E*j,w+=T*z,w+=_*F,h=(w+=B*L)>>>13,w&=8191,w+=U*P,w+=k*N,w+=I*D,w+=C*O,v=h+=(w+=R*(5*H))>>>13,v+=S*H,v+=E*M,v+=T*j,v+=_*z,h=(v+=B*F)>>>13,v&=8191,v+=U*L,v+=k*P,v+=I*N,v+=C*D,S=p=8191&(h=(h=((h+=(v+=R*O)>>>13)<<2)+h|0)+(p&=8191)|0),E=f+=h>>>=13,T=d&=8191,_=g&=8191,B=y&=8191,U=m&=8191,k=b&=8191,I=A&=8191,C=w&=8191,R=v&=8191,t+=16,r-=16;this.h[0]=S,this.h[1]=E,this.h[2]=T,this.h[3]=_,this.h[4]=B,this.h[5]=U,this.h[6]=k,this.h[7]=I,this.h[8]=C,this.h[9]=R},E.prototype.finish=function(e,t){var r,n,o,i,s=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=r,r=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,s[0]=this.h[0]+5,r=s[0]>>>13,s[0]&=8191,i=1;i<10;i++)s[i]=this.h[i]+r,r=s[i]>>>13,s[i]&=8191;for(s[9]-=8192,n=(1^r)-1,i=0;i<10;i++)s[i]&=n;for(n=~n,i=0;i<10;i++)this.h[i]=this.h[i]&n|s[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},E.prototype.update=function(e,t,r){var n,o;if(this.leftover){for((o=16-this.leftover)>r&&(o=r),n=0;n=16&&(o=r-r%16,this.blocks(e,t,o),t+=o,r-=o),r){for(n=0;n=128;){for(x=0;x<16;x++)S=8*x+X,I[x]=r[S+0]<<24|r[S+1]<<16|r[S+2]<<8|r[S+3],C[x]=r[S+4]<<24|r[S+5]<<16|r[S+6]<<8|r[S+7];for(x=0;x<80;x++)if(o=R,i=O,s=D,a=N,c=P,u=L,l=F,p=j,f=M,d=H,g=G,y=K,m=q,b=V,_=65535&(T=$),B=T>>>16,U=65535&(E=z),k=E>>>16,_+=65535&(T=(K>>>14|P<<18)^(K>>>18|P<<14)^(P>>>9|K<<23)),B+=T>>>16,U+=65535&(E=(P>>>14|K<<18)^(P>>>18|K<<14)^(K>>>9|P<<23)),k+=E>>>16,_+=65535&(T=K&q^~K&V),B+=T>>>16,U+=65535&(E=P&L^~P&F),k+=E>>>16,_+=65535&(T=W[2*x+1]),B+=T>>>16,U+=65535&(E=W[2*x]),k+=E>>>16,E=I[x%16],B+=(T=C[x%16])>>>16,U+=65535&E,k+=E>>>16,U+=(B+=(_+=65535&T)>>>16)>>>16,_=65535&(T=v=65535&_|B<<16),B=T>>>16,U=65535&(E=w=65535&U|(k+=U>>>16)<<16),k=E>>>16,_+=65535&(T=(j>>>28|R<<4)^(R>>>2|j<<30)^(R>>>7|j<<25)),B+=T>>>16,U+=65535&(E=(R>>>28|j<<4)^(j>>>2|R<<30)^(j>>>7|R<<25)),k+=E>>>16,B+=(T=j&M^j&H^M&H)>>>16,U+=65535&(E=R&O^R&D^O&D),k+=E>>>16,h=65535&(U+=(B+=(_+=65535&T)>>>16)>>>16)|(k+=U>>>16)<<16,A=65535&_|B<<16,_=65535&(T=g),B=T>>>16,U=65535&(E=a),k=E>>>16,B+=(T=v)>>>16,U+=65535&(E=w),k+=E>>>16,O=o,D=i,N=s,P=a=65535&(U+=(B+=(_+=65535&T)>>>16)>>>16)|(k+=U>>>16)<<16,L=c,F=u,z=l,R=h,M=p,H=f,G=d,K=g=65535&_|B<<16,q=y,V=m,$=b,j=A,x%16==15)for(S=0;S<16;S++)E=I[S],_=65535&(T=C[S]),B=T>>>16,U=65535&E,k=E>>>16,E=I[(S+9)%16],_+=65535&(T=C[(S+9)%16]),B+=T>>>16,U+=65535&E,k+=E>>>16,w=I[(S+1)%16],_+=65535&(T=((v=C[(S+1)%16])>>>1|w<<31)^(v>>>8|w<<24)^(v>>>7|w<<25)),B+=T>>>16,U+=65535&(E=(w>>>1|v<<31)^(w>>>8|v<<24)^w>>>7),k+=E>>>16,w=I[(S+14)%16],B+=(T=((v=C[(S+14)%16])>>>19|w<<13)^(w>>>29|v<<3)^(v>>>6|w<<26))>>>16,U+=65535&(E=(w>>>19|v<<13)^(v>>>29|w<<3)^w>>>6),k+=E>>>16,k+=(U+=(B+=(_+=65535&T)>>>16)>>>16)>>>16,I[S]=65535&U|k<<16,C[S]=65535&_|B<<16;_=65535&(T=j),B=T>>>16,U=65535&(E=R),k=E>>>16,E=e[0],B+=(T=t[0])>>>16,U+=65535&E,k+=E>>>16,k+=(U+=(B+=(_+=65535&T)>>>16)>>>16)>>>16,e[0]=R=65535&U|k<<16,t[0]=j=65535&_|B<<16,_=65535&(T=M),B=T>>>16,U=65535&(E=O),k=E>>>16,E=e[1],B+=(T=t[1])>>>16,U+=65535&E,k+=E>>>16,k+=(U+=(B+=(_+=65535&T)>>>16)>>>16)>>>16,e[1]=O=65535&U|k<<16,t[1]=M=65535&_|B<<16,_=65535&(T=H),B=T>>>16,U=65535&(E=D),k=E>>>16,E=e[2],B+=(T=t[2])>>>16,U+=65535&E,k+=E>>>16,k+=(U+=(B+=(_+=65535&T)>>>16)>>>16)>>>16,e[2]=D=65535&U|k<<16,t[2]=H=65535&_|B<<16,_=65535&(T=G),B=T>>>16,U=65535&(E=N),k=E>>>16,E=e[3],B+=(T=t[3])>>>16,U+=65535&E,k+=E>>>16,k+=(U+=(B+=(_+=65535&T)>>>16)>>>16)>>>16,e[3]=N=65535&U|k<<16,t[3]=G=65535&_|B<<16,_=65535&(T=K),B=T>>>16,U=65535&(E=P),k=E>>>16,E=e[4],B+=(T=t[4])>>>16,U+=65535&E,k+=E>>>16,k+=(U+=(B+=(_+=65535&T)>>>16)>>>16)>>>16,e[4]=P=65535&U|k<<16,t[4]=K=65535&_|B<<16,_=65535&(T=q),B=T>>>16,U=65535&(E=L),k=E>>>16,E=e[5],B+=(T=t[5])>>>16,U+=65535&E,k+=E>>>16,k+=(U+=(B+=(_+=65535&T)>>>16)>>>16)>>>16,e[5]=L=65535&U|k<<16,t[5]=q=65535&_|B<<16,_=65535&(T=V),B=T>>>16,U=65535&(E=F),k=E>>>16,E=e[6],B+=(T=t[6])>>>16,U+=65535&E,k+=E>>>16,k+=(U+=(B+=(_+=65535&T)>>>16)>>>16)>>>16,e[6]=F=65535&U|k<<16,t[6]=V=65535&_|B<<16,_=65535&(T=$),B=T>>>16,U=65535&(E=z),k=E>>>16,E=e[7],B+=(T=t[7])>>>16,U+=65535&E,k+=E>>>16,k+=(U+=(B+=(_+=65535&T)>>>16)>>>16)>>>16,e[7]=z=65535&U|k<<16,t[7]=$=65535&_|B<<16,X+=128,n-=128}return n}function Y(e,t,r){var n,o=new Int32Array(8),i=new Int32Array(8),s=new Uint8Array(256),a=r;for(o[0]=1779033703,o[1]=3144134277,o[2]=1013904242,o[3]=2773480762,o[4]=1359893119,o[5]=2600822924,o[6]=528734635,o[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,X(o,i,t,r),r%=128,n=0;n=0;--o)Q(e,t,n=r[o/8|0]>>(7&o)&1),J(t,e),J(e,e),Q(e,t,n)}function te(e,r){var n=[t(),t(),t(),t()];k(n[0],l),k(n[1],h),k(n[2],s),F(n[3],l,h),ee(e,n,r)}function re(e,n,o){var i,s=new Uint8Array(64),a=[t(),t(),t(),t()];for(o||r(n,32),Y(s,n,32),s[0]&=248,s[31]&=127,s[31]|=64,te(a,s),Z(e,a),i=0;i<32;i++)n[i+32]=e[i];return 0}var ne=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function oe(e,t){var r,n,o,i;for(n=63;n>=32;--n){for(r=0,o=n-32,i=n-12;o>4)*ne[o],r=t[o]>>8,t[o]&=255;for(o=0;o<32;o++)t[o]-=r*ne[o];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function ie(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;oe(e,r)}function se(e,r,n,o){var i,s,a=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),l=new Float64Array(64),h=[t(),t(),t(),t()];Y(a,o,32),a[0]&=248,a[31]&=127,a[31]|=64;var p=n+64;for(i=0;i>7&&L(e[0],i,e[0]),F(e[3],e[0],e[1]),0)}(f,o))return-1;for(a=0;a=0},e.sign.keyPair=function(){var e=new Uint8Array(ue),t=new Uint8Array(le);return re(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(pe(e),e.length!==le)throw new Error("bad secret key size");for(var t=new Uint8Array(ue),r=0;r{"use strict";var n=r(1926),o=r(9370),i=/[\n\r\t]/g,s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,a=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,c=/^[a-zA-Z]:/,u=/^[ \f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/;function l(e){return(e||"").toString().replace(u,"")}var h=[["#","hash"],["?","query"],function(e,t){return d(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],p={hash:1,query:1};function f(e){var t,n=("undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{}).location||{},o={},i=typeof(e=e||n);if("blob:"===e.protocol)o=new y(unescape(e.pathname),{});else if("string"===i)for(t in o=new y(e,{}),p)delete o[t];else if("object"===i){for(t in e)t in p||(o[t]=e[t]);void 0===o.slashes&&(o.slashes=s.test(e.href))}return o}function d(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function g(e,t){e=(e=l(e)).replace(i,""),t=t||{};var r,n=a.exec(e),o=n[1]?n[1].toLowerCase():"",s=!!n[2],c=!!n[3],u=0;return s?c?(r=n[2]+n[3]+n[4],u=n[2].length+n[3].length):(r=n[2]+n[4],u=n[2].length):c?(r=n[3]+n[4],u=n[3].length):r=n[4],"file:"===o?u>=2&&(r=r.slice(2)):d(o)?r=n[4]:o?s&&(r=r.slice(2)):u>=2&&d(t.protocol)&&(r=n[4]),{protocol:o,slashes:s||d(o),slashesCount:u,rest:r}}function y(e,t,r){if(e=(e=l(e)).replace(i,""),!(this instanceof y))return new y(e,t,r);var s,a,u,p,m,b,A=h.slice(),w=typeof t,v=this,x=0;for("object"!==w&&"string"!==w&&(r=t,t=null),r&&"function"!=typeof r&&(r=o.parse),s=!(a=g(e||"",t=f(t))).protocol&&!a.slashes,v.slashes=a.slashes||s&&t.slashes,v.protocol=a.protocol||t.protocol||"",e=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||c.test(e))||!a.slashes&&(a.protocol||a.slashesCount<2||!d(v.protocol)))&&(A[3]=[/(.*)/,"pathname"]);x{var n=r(2486).Buffer;const{default:o}=r(1113),{setSendTransactionHeaders:i}=r(5180);e.exports={Algod:function(e="",t="http://r2.algorand.network",r=4180,s={}){let a=e;"string"==typeof a&&(a={"X-Algo-API-Token":a});const c=new o(a,t,r,s);function u(e){return void 0!==e.noteb64&&null!==e.noteb64&&(e.note=n.from(e.noteb64,"base64")),e}this.status=async(e={})=>(await c.get("/v1/status",{},e)).body,this.healthCheck=async(e={})=>{const t=await c.get("/health",{},e);if(!t.ok)throw new Error(`Health response: ${t.status}`);return{}},this.statusAfterBlock=async(e,t={})=>{if(!Number.isInteger(e))throw Error("roundNumber should be an integer");return(await c.get(`/v1/status/wait-for-block-after/${e}`,{},t)).body},this.pendingTransactions=async(e,t={})=>{if(!Number.isInteger(e))throw Error("maxTxns should be an integer");const r=await c.get("/v1/transactions/pending",{max:e},t);if(200===r.statusCode&&void 0!==r.body.truncatedTxns.transactions)for(let e=0;e(await c.get("/versions",{},e)).body,this.ledgerSupply=async(e={})=>(await c.get("/v1/ledger/supply",{},e)).body,this.transactionByAddress=async(e,t=null,r=null,n=null,o={})=>{if(null!==t&&!Number.isInteger(t))throw Error("first round should be an integer");if(null!==r&&!Number.isInteger(r))throw Error("last round should be an integer");const i=await c.get(`/v1/account/${e}/transactions`,{firstRound:t,lastRound:r,max:n},o);if(200===i.statusCode&&void 0!==i.body.transactions)for(let e=0;e{const i=await c.get(`/v1/account/${e}/transactions`,{fromDate:t,toDate:r,max:n},o);if(200===i.statusCode&&void 0!==i.body.transactions)for(let e=0;e{const r=await c.get(`/v1/transaction/${e}`,{},t);return 200===r.statusCode&&(r.body=u(r.body)),r.body},this.transactionInformation=async(e,t,r={})=>{const n=await c.get(`/v1/account/${e}/transaction/${t}`,{},r);return 200===n.statusCode&&(n.body=u(n.body)),n.body},this.pendingTransactionInformation=async(e,t={})=>{const r=await c.get(`/v1/transactions/pending/${e}`,{},t);return 200===r.statusCode&&(r.body=u(r.body)),r.body},this.accountInformation=async(e,t={})=>(await c.get(`/v1/account/${e}`,{},t)).body,this.assetInformation=async(e,t={})=>(await c.get(`/v1/asset/${e}`,{},t)).body,this.suggestedFee=async(e={})=>(await c.get("/v1/transactions/fee",{},e)).body,this.sendRawTransaction=async(e,t={})=>{const r=i(t);return(await c.post("/v1/transactions",n.from(e),r)).body},this.sendRawTransactions=async(e,t={})=>{const r=i(t),o=Array.prototype.concat(...e.map((e=>Array.from(e))));return(await c.post("/v1/transactions",n.from(o),r)).body},this.getTransactionParams=async(e={})=>(await c.get("/v1/transactions/params",{},e)).body,this.suggestParams=async(e={})=>{const t=await this.getTransactionParams(e);return{flatFee:!1,fee:t.fee,firstRound:t.lastRound,lastRound:t.lastRound+1e3,genesisID:t.genesisID,genesisHash:t.genesishashb64}},this.block=async(e,t={})=>{if(!Number.isInteger(e))throw Error("roundNumber should be an integer");const r=await c.get(`/v1/block/${e}`,{},t);if(200===r.statusCode&&void 0!==r.body.txns.transactions)for(let e=0;e{var n=r(2486).Buffer;const o=r(7116),i=r(3033),s=r(1063),a=r(5583),c=r(8800),u=r(9404),l=r(2514),h=r(9417);e.exports={DynamicFee:class{constructor(e,t,r,i,s,a){if(!Number.isSafeInteger(t)||t<0)throw Error("amount must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(r)||r<0)throw Error("firstValid must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(i)||i<0)throw Error("lastValid must be a positive number and smaller than 2^53-1");if(void 0===s&&(s=o.ALGORAND_ZERO_ADDRESS_STRING),void 0===a){const e=u.randomBytes(32);a=n.from(e).toString("base64")}const h=n.from("ASAFAgEHBgUmAyD+vKC7FEpaTqe0OKRoGsgObKEFvLYH/FZTJclWlfaiEyDmmpYeby1feshmB5JlUr6YI17TM2PKiJGLuck4qRW2+SB/g7Flf/H8U7ktwYFIodZd/C1LH6PWdyhK3dIAEm2QaTIEIhIzABAjEhAzAAcxABIQMwAIMQESEDEWIxIQMRAjEhAxBygSEDEJKRIQMQgkEhAxAiUSEDEEIQQSEDEGKhIQ","base64"),p=[t,r,i,e,s,a],f=[l.valTypes.INT,l.valTypes.INT,l.valTypes.INT,l.valTypes.ADDRESS,l.valTypes.ADDRESS,l.valTypes.BASE64],d=l.inject(h,[5,6,7,11,44,76],p,f);this.programBytes=d;const g=new c.LogicSig(d,void 0);this.address=g.address()}getProgram(){return this.programBytes}getAddress(){return this.address}},getDynamicFeeTransactions:function(e,t,r,n){if(!t.verify(o.decodeAddress(e.from).publicKey))throw new Error("invalid signature");e.fee=n,e.fee{var n=r(2486).Buffer;const o=r(3477),{keccak256:i}=r(583),s=r(5583),a=r(8800),c=r(2514),u=r(9417);e.exports={HTLC:class{constructor(e,t,r,o,i,s){if(!Number.isSafeInteger(i)||i<0)throw Error("expiryRound must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(s)||s<0)throw Error("maxFee must be a positive number and smaller than 2^53-1");let u="";if("sha256"===r)u="ASAECAEACSYDIOaalh5vLV96yGYHkmVSvpgjXtMzY8qIkYu5yTipFbb5IH+DsWV/8fxTuS3BgUih1l38LUsfo9Z3KErd0gASbZBpIP68oLsUSlpOp7Q4pGgayA5soQW8tgf8VlMlyVaV9qITMQEiDjEQIxIQMQcyAxIQMQgkEhAxCSgSLQEpEhAxCSoSMQIlDRAREA==";else{if("keccak256"!==r)throw Error("hash function unrecognized");u="ASAECAEACSYDIOaalh5vLV96yGYHkmVSvpgjXtMzY8qIkYu5yTipFbb5IH+DsWV/8fxTuS3BgUih1l38LUsfo9Z3KErd0gASbZBpIP68oLsUSlpOp7Q4pGgayA5soQW8tgf8VlMlyVaV9qITMQEiDjEQIxIQMQcyAxIQMQgkEhAxCSgSLQIpEhAxCSoSMQIlDRAREA=="}if(32!==n.from(o,"base64").length)throw Error("hash image must be 32 bytes");const l=n.from(u,"base64"),h=[s,i,t,o,e],p=[c.valTypes.INT,c.valTypes.INT,c.valTypes.ADDRESS,c.valTypes.BASE64,c.valTypes.ADDRESS],f=c.inject(l,[3,6,10,42,76],h,p);this.programBytes=f;const d=new a.LogicSig(f,void 0);this.address=d.address()}getProgram(){return this.programBytes}getAddress(){return this.address}},signTransactionWithHTLCUnlock:function(e,t,r){const c=n.from(r,"base64"),l=s.readProgram(e,void 0),h=l[0],p=l[1][1],f=e[e.length-15];if(1===f){const e=o.create();if(e.update(c),!n.from(e.hex(),"hex").equals(p))throw new Error("sha256 hash of preimage did not match stored contract hash")}else{if(2!==f)throw new Error("hash function in contract unrecognized");{const e=i.create();if(e.update(c),!n.from(e.hex(),"hex").equals(p))throw new Error("keccak256 hash of preimage did not match stored contract hash")}}const d=[c],g=new a.LogicSig(e,d);delete t.to;const y=h[0],m=new u.Transaction(t);if(m.fee>y)throw new Error(`final fee of payment transaction${m.fee.toString()}greater than transaction max fee${y.toString()}`);return a.signLogicSigTransaction(t,g)}}},8886:(e,t,r)=>{const n=r(1834),o=r(1786),i=r(4748),s=r(3758),a=r(2200);e.exports={DynamicFee:n.DynamicFee,getDynamicFeeTransactions:n.getDynamicFeeTransactions,signDynamicFee:n.signDynamicFee,HTLC:o.HTLC,signTransactionWithHTLCUnlock:o.signTransactionWithHTLCUnlock,LimitOrder:i.LimitOrder,getSwapAssetsTransaction:i.getSwapAssetsTransaction,Split:s.Split,getSplitFundsTransaction:s.getSplitFundsTransaction,PeriodicPayment:a.PeriodicPayment,getPeriodicPaymentWithdrawalTransaction:a.getPeriodicPaymentWithdrawalTransaction}},4748:(e,t,r)=>{var n=r(2486).Buffer;const o=r(7116),i=r(1988),s=r(1063),a=r(5583),c=r(8800),u=r(9404),l=r(2514),h=r(413);e.exports={LimitOrder:class{constructor(e,t,r,o,i,s,a){if(!Number.isSafeInteger(t)||t<0)throw Error("assetid must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(r)||r<0)throw Error("ratn must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(o)||o<0)throw Error("ratd must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(i)||i<0)throw Error("expiryRound must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(s)||s<0)throw Error("minTrade must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(a)||a<0)throw Error("maxFee must be a positive number and smaller than 2^53-1");const u=n.from("ASAKAAEFAgYEBwgJCiYBIP68oLsUSlpOp7Q4pGgayA5soQW8tgf8VlMlyVaV9qITMRYiEjEQIxIQMQEkDhAyBCMSQABVMgQlEjEIIQQNEDEJMgMSEDMBECEFEhAzAREhBhIQMwEUKBIQMwETMgMSEDMBEiEHHTUCNQExCCEIHTUENQM0ATQDDUAAJDQBNAMSNAI0BA8QQAAWADEJKBIxAiEJDRAxBzIDEhAxCCISEBA=","base64"),h=[a,s,t,o,r,i,e],p=[l.valTypes.INT,l.valTypes.INT,l.valTypes.INT,l.valTypes.INT,l.valTypes.INT,l.valTypes.INT,l.valTypes.ADDRESS],f=l.inject(u,[5,7,9,10,11,12,16],h,p);this.programBytes=f;const d=new c.LogicSig(f,void 0);this.address=d.address(),this.owner=e,this.assetid=t}getProgram(){return this.programBytes}getAddress(){return this.address}},getSwapAssetsTransaction:function(e,t,r,n,l,p,f,d){const g=u.keyPairFromSecretKey(n),y=o.encodeAddress(g.publicKey),m=a.readProgram(e,void 0),b=m[0],A=m[1];let w;const v=b[6],x=o.encodeAddress(A[0]),S=c.makeLogicSig(e,void 0),E=S.address(),T=[i.makePaymentTxn(E,y,l,r,w,p,f,void 0,d,void 0),i.makeAssetTransferTxn(y,x,w,void 0,l,t,p,f,void 0,d,void 0,v)],_=s.assignGroupID(T),B=b[7],U=b[8];if(t*B= ${r.toString()}*${U.toString()}`);const k=b[4];if(rI)throw new Error(`final fee of payment transaction ${_[0].fee.toString()} greater than transaction max fee ${I.toString()}`);if(_[1].fee>I)throw new Error(`final fee of asset transaction ${_[1].fee.toString()} greater than transaction max fee ${I.toString()}`);const C=c.signLogicSigTransactionObject(_[0],S),R=_[1].signTxn(n);return h.concatArrays(C.blob,R)}}},2200:(e,t,r)=>{var n=r(2486).Buffer;const o=r(7116),i=r(1988),s=r(5583),a=r(8800),c=r(9404),u=r(2514);e.exports={PeriodicPayment:class{constructor(e,t,r,o,i,s,u){if(this.receiver=e,!Number.isSafeInteger(t)||t<0)throw Error("amount must be a positive number and smaller than 2^53-1");if(this.amount=t,!Number.isSafeInteger(r)||r<0)throw Error("withdrawalWindow must be a positive number and smaller than 2^53-1");if(this.withdrawalWindow=r,!Number.isSafeInteger(o)||o<0)throw Error("period must be a positive number and smaller than 2^53-1");if(this.period=o,!Number.isSafeInteger(i)||i<0)throw Error("expiryRound must be a positive number and smaller than 2^53-1");if(this.expiryRound=i,!Number.isSafeInteger(s)||s<0)throw Error("maxFee must be a positive number and smaller than 2^53-1");if(this.maxFee=s,void 0===u){const e=c.randomBytes(32);this.lease=n.from(e).toString("base64")}else this.lease=u;this.programBytes=this.getProgram();const l=new a.LogicSig(this.programBytes,void 0);this.address=l.address()}getProgram(){const e=n.from("ASAHAQYFAAQDByYCIAECAwQFBgcIAQIDBAUGBwgBAgMEBQYHCAECAwQFBgcIIJKvkYTkEzwJf2arzJOxERsSogG9nQzKPkpIoc4TzPTFMRAiEjEBIw4QMQIkGCUSEDEEIQQxAggSEDEGKBIQMQkyAxIxBykSEDEIIQUSEDEJKRIxBzIDEhAxAiEGDRAxCCUSEBEQ","base64"),t=[this.maxFee,this.period,this.withdrawalWindow,this.amount,this.expiryRound,this.lease,this.receiver],r=[u.valTypes.INT,u.valTypes.INT,u.valTypes.INT,u.valTypes.INT,u.valTypes.INT,u.valTypes.BASE64,u.valTypes.ADDRESS];return u.inject(e,[4,5,7,8,9,12,46],t,r)}getAddress(){return this.address}},getPeriodicPaymentWithdrawalTransaction:function(e,t,r,n){const c=s.readProgram(e,void 0),u=c[0],l=c[1],h=u[2],p=u[4],f=u[5];if(r%h!=0)throw new Error(`firstValid round ${r.toString()} was not a multiple of contract period ${h.toString()}`);const d=l[1],g=o.encodeAddress(d),y=l[0],m=new Uint8Array(y),b=r+p,A=g;let w,v;const x=a.makeLogicSig(e,void 0),S=x.address(),E={from:S,to:A,fee:t,amount:f,closeRemainderTo:w,firstRound:r,lastRound:b,note:v,genesisHash:n,genesisID:"",type:"pay",lease:m},T=i.makePaymentTxn(S,A,t,f,w,r,b,v,n,"");if(T.fee>u[1])throw new Error(`final fee of payment transaction${T.fee.toString()}greater than transaction max fee${u[1].toString()}`);return a.signLogicSigTransaction(E,x)}}},3758:(e,t,r)=>{var n=r(2486).Buffer;const o=r(7116),i=r(1988),s=r(1063),a=r(8800),c=r(5583),u=r(2514),l=r(413);e.exports={Split:class{constructor(e,t,r,o,i,s,c,l){if(!Number.isSafeInteger(i)||i<0)throw Error("rat2 must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(o)||o<0)throw Error("rat1 must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(s)||s<0)throw Error("expiryRound must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(c)||c<0)throw Error("minPay must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(l)||l<0)throw Error("maxFee must be a positive number and smaller than 2^53-1");const h=n.from("ASAIAQUCAAYHCAkmAyCztwQn0+DycN+vsk+vJWcsoz/b7NDS6i33HOkvTpf+YiC3qUpIgHGWE8/1LPh9SGCalSN7IaITeeWSXbfsS5wsXyC4kBQ38Z8zcwWVAym4S8vpFB/c0XC6R4mnPi9EBADsPDEQIhIxASMMEDIEJBJAABkxCSgSMQcyAxIQMQglEhAxAiEEDRAiQAAuMwAAMwEAEjEJMgMSEDMABykSEDMBByoSEDMACCEFCzMBCCEGCxIQMwAIIQcPEBA=","base64"),p=[l,s,i,o,c,e,t,r],f=[u.valTypes.INT,u.valTypes.INT,u.valTypes.INT,u.valTypes.INT,u.valTypes.INT,u.valTypes.ADDRESS,u.valTypes.ADDRESS,u.valTypes.ADDRESS],d=u.inject(h,[4,7,8,9,10,14,47,80],p,f);this.programBytes=d;const g=a.makeLogicSig(d,void 0);this.address=g.address()}getProgram(){return this.programBytes}getAddress(){return this.address}},getSplitFundsTransaction:function(e,t,r,n,u,h){const p=c.readProgram(e,void 0),f=p[0],d=p[1];let g=f[6],y=f[5],m=0;const b=(e,t)=>{if("number"!=typeof e||"number"!=typeof t)throw new Error("gcd operates only on positive integers");return t?b(t,e%t):e},A=b(g,y);g=Math.floor(g/A),y=Math.floor(y/A);const w=y/g;m=Math.round(t/(1+w));const v=t-m;if(y*m!=g*v)throw Error("could not split funds in a way that satisfied the contract ratio");const x=a.makeLogicSig(e,void 0).address(),S=o.encodeAddress(d[1]),E=o.encodeAddress(d[2]),T=[i.makePaymentTxn(x,S,u,m,void 0,r,n,void 0,h),i.makePaymentTxn(x,E,u,v,void 0,r,n,void 0,h)],_=s.assignGroupID(T).map((e=>a.signLogicSigTransactionObject(e,a).blob));return l.concatArrays(_[0],_[1])}}},2514:(e,t,r)=>{var n=r(2486).Buffer;const o=r(7116);function i(e,t){let r=0;for(;t>128;)e.push(255&t|128),t>>=7,r+=1;return e.push(255&t),r+1}const s={INT:1,ADDRESS:2,BASE64:3};e.exports={inject:function(e,t,r,a){if(t.length!==r.length||t.length!==a.length)throw new Error("Lengths do not match");let c=e;function u(e,t,r,o){const i=e.slice(0,r),s=e.slice(r+o,e.length),a=[i,n.from(t),s];return n.concat(a)}for(let e=0;e{"use strict";r.d(t,{JQ:()=>m,_4:()=>x,X3:()=>v,R0:()=>b,jD:()=>A,Yh:()=>O,bL:()=>D,Ls:()=>R,UV:()=>B,Ax:()=>w,A9:()=>_,w1:()=>S,NK:()=>d,RY:()=>y,Pu:()=>g,Vk:()=>c,nh:()=>h,kG:()=>a,qH:()=>l,JH:()=>u,vJ:()=>I,o5:()=>C,AE:()=>k});var n=r(7116),o=r(8922),i=r(413),s=r(2486).Buffer;const a=65535,c=32,u=1,l=1,h=2,p=/^([a-z\d[\](),]+)\[([1-9][\d]*)]$/,f=/^ufixed([1-9][\d]*)x([1-9][\d]*)$/;class d{static from(e){if(e.endsWith("[]")){const t=d.from(e.slice(0,e.length-2));return new x(t)}if(e.endsWith("]")){const t=e.match(p);if(3!==t.length)throw new Error(`malformed static array string: ${e}`);const r=t[2],n=parseInt(r,10);if(n>a)throw new Error(`array length exceeds limit ${a}`);const o=d.from(t[1]);return new v(o,n)}if(e.startsWith("uint")){const t=e=>[...e].every((e=>"0123456789".includes(e))),r=e.slice(4,e.length);if(!t(r))throw new Error(`malformed uint string: ${r}`);const n=parseInt(r,10);if(n>a)throw new Error(`malformed uint string: ${n}`);return new g(n)}if("byte"===e)return new A;if(e.startsWith("ufixed")){const t=e.match(f);if(3!==t.length)throw new Error(`malformed ufixed type: ${e}`);const r=parseInt(t[1],10),n=parseInt(t[2],10);return new y(r,n)}if("bool"===e)return new b;if("address"===e)return new m;if("string"===e)return new w;if(e.length>=2&&"("===e[0]&&")"===e[e.length-1]){const t=S.parseTupleContent(e.slice(1,e.length-1)),r=[];for(let e=0;e512)throw new Error(`unsupported uint type bitSize: ${e}`);this.bitSize=e}toString(){return`uint${this.bitSize}`}equals(e){return e instanceof g&&this.bitSize===e.bitSize}isDynamic(){return!1}byteLen(){return this.bitSize/8}encode(e){if("bigint"!=typeof e&&"number"!=typeof e)throw new Error(`Cannot encode value as uint${this.bitSize}: ${e}`);if(e>=BigInt(2**this.bitSize)||e512)throw new Error(`unsupported ufixed type bitSize: ${e}`);if(t>160||t<1)throw new Error(`unsupported ufixed type precision: ${t}`);this.bitSize=e,this.precision=t}toString(){return`ufixed${this.bitSize}x${this.precision}`}equals(e){return e instanceof y&&this.bitSize===e.bitSize&&this.precision===e.precision}isDynamic(){return!1}byteLen(){return this.bitSize/8}encode(e){if("bigint"!=typeof e&&"number"!=typeof e)throw new Error(`Cannot encode value as ${this.toString()}: ${e}`);if(e>=BigInt(2**this.bitSize)||e255)throw new Error(`${e} cannot be encoded into a byte`);return new Uint8Array([e])}decode(e){if(1!==e.byteLength)throw new Error("byte string must be 1 byte long");return e[0]}}class w extends d{toString(){return"string"}equals(e){return e instanceof w}isDynamic(){return!0}byteLen(){throw new Error(`${this.toString()} is a dynamic type`)}encode(e){if("string"!=typeof e&&!(e instanceof Uint8Array))throw new Error(`Cannot encode value as string: ${e}`);const t=s.from(e),r=(0,o.j)(e.length,h),n=new Uint8Array(e.length+h);return n.set(r),n.set(t,h),n}decode(e){if(e.length=a)throw new Error("tuple type child type number larger than maximum uint16 error");this.childTypes=e}toString(){const e=[];for(let t=0;tt.equals(e.childTypes[r])))}isDynamic(){return this.childTypes.some((e=>e.isDynamic()))}byteLen(){let e=0;for(let t=0;ta)throw new Error("length of tuple array should not exceed a uint16");const r=this.childTypes,n=[],s=[],c=new Map;let u=0;for(;ua)throw new Error(`byte length of ${t} should not exceed a uint16`);n[e]=(0,o.j)(t,h)}p+=s[e].length}return(0,i.concatArrays)(...n,...s)}decode(e){const t=this.childTypes,r=[],n=[];let o=0,i=0;const a=s.from(e);for(;o0&&(r[r.length-1].right=t,t>t;(e[i]&r)>0?n.push(new Uint8Array([128])):n.push(new Uint8Array([0]))}o+=r,i+=1}else{const t=s.byteLen();n.push(e.slice(i,i+t)),i+=t}if(o!==t.length-1&&i>=e.length)throw new Error("input byte not enough to decode");o+=1}if(r.length>0&&(r[r.length-1].right=e.length,i=e.length),it.right)throw new Error("dynamic segment should display a [l, r] space with l <= r");if(e!==r.length-1&&t.right!==r[e+1].left)throw new Error("dynamic segment should be consecutive")}let c=0;for(let o=0;o8)throw new Error("value list passed in should be no greater than length 8");for(let r=0;r0&&-1===r))break;n+=1}}return n}var _,B,U=r(9404);function k(e){return e===_.any||e===_.pay||e===_.keyreg||e===_.acfg||e===_.axfer||e===_.afrz||e===_.appl}function I(e,t){return e===_.any||t.type&&t.type.toString()===e.toString()}function C(e){return e===B.account||e===B.application||e===B.asset}!function(e){e.any="txn",e.pay="pay",e.keyreg="keyreg",e.acfg="acfg",e.axfer="axfer",e.afrz="afrz",e.appl="appl"}(_||(_={})),function(e){e.account="account",e.application="application",e.asset="asset"}(B||(B={}));class R{constructor(e){if("string"!=typeof e.name||"object"!=typeof e.returns||!Array.isArray(e.args))throw new Error("Invalid ABIMethod parameters");this.name=e.name,this.description=e.desc,this.args=e.args.map((({type:e,name:t,desc:r})=>k(e)||C(e)?{type:e,name:t,description:r}:{type:d.from(e),name:t,description:r})),this.returns={type:"void"===e.returns.type?e.returns.type:d.from(e.returns.type),description:e.returns.desc}}getSignature(){const e=this.args.map((e=>e.type.toString())).join(","),t=this.returns.type.toString();return`${this.name}(${e})${t}`}getSelector(){const e=(0,U.genericHash)(this.getSignature());return new Uint8Array(e.slice(0,4))}txnCount(){let e=1;for(const t of this.args)"string"==typeof t.type&&k(t.type)&&(e+=1);return e}toJSON(){return{name:this.name,desc:this.description,args:this.args.map((({type:e,name:t,description:r})=>({type:e.toString(),name:t,desc:r}))),returns:{type:this.returns.type.toString(),desc:this.returns.description}}}static fromSignature(e){const{name:t,args:r,returns:n}=function(e){const t=e.indexOf("(");if(-1===t)throw new Error(`Invalid method signature: ${e}`);let r=-1,n=0;for(let o=t;o({type:e}))),returns:{type:n}})}}class O{constructor(e){if("string"!=typeof e.name||!Array.isArray(e.methods)||e.networks&&"object"!=typeof e.networks)throw new Error("Invalid ABIContract parameters");this.name=e.name,this.description=e.desc,this.networks=e.networks?{...e.networks}:{},this.methods=e.methods.map((e=>new R(e)))}toJSON(){return{name:this.name,desc:this.description,networks:this.networks,methods:this.methods.map((e=>e.toJSON()))}}}class D{constructor(e){if("string"!=typeof e.name||!Array.isArray(e.methods))throw new Error("Invalid ABIInterface parameters");this.name=e.name,this.description=e.desc,this.methods=e.methods.map((e=>new R(e)))}toJSON(){return{name:this.name,desc:this.description,methods:this.methods.map((e=>e.toJSON()))}}}},7988:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(9404),o=r(7116);function i(){const e=n.keyPair();return{addr:o.encodeAddress(e.publicKey),sk:e.secretKey}}},2691:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(7116),o=r(3033),i=r(9404),s=r(413),a=r(2486).Buffer;class c{constructor({bidderKey:e,bidAmount:t,bidID:r,auctionKey:o,auctionID:i,maxPrice:s}){this.name="Bid",this.tag=a.from([97,66]);const c=n.decodeAddress(e),u=n.decodeAddress(o);if(!Number.isSafeInteger(t)||t<0)throw Error("Bid amount must be positive and 2^53-1");if(!Number.isSafeInteger(r)||r<0)throw Error("BidID must be positive and 2^53-1");if(!Number.isSafeInteger(i)||i<0)throw Error("auctionID must be positive");Object.assign(this,{bidderKey:c,bidAmount:t,bidID:r,auctionKey:u,auctionID:i,maxPrice:s})}get_obj_for_encoding(){return{bidder:a.from(this.bidderKey.publicKey),cur:this.bidAmount,price:this.maxPrice,id:this.bidID,auc:a.from(this.auctionKey.publicKey),aid:this.auctionID}}signBid(e){const t=o.encode(this.get_obj_for_encoding()),r=a.from(s.concatArrays(this.tag,t)),n=i.sign(r,e),c={t:"b",b:{sig:a.from(n),bid:this.get_obj_for_encoding()}};return new Uint8Array(o.encode(c))}}},1113:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>f});var n=r(413),o=r(1042),i=r.n(o),s=r(9368),a=r.n(s),c=r(5391),u=r(2486).Buffer;class l{constructor(e,t,r,n={}){this.defaultHeaders=n;const o=new(i())(t,{});if(void 0!==r&&o.set("port",r.toString()),0===o.protocol.length)throw new Error("Invalid base server URL, protocol must be defined.");this.baseURL=o,this.tokenHeader=e}addressWithPath(e){return new(i())(a().posix.join(this.baseURL.pathname,e),this.baseURL).toString()}static superagentToHTTPClientResponse(e){return e.body instanceof ArrayBuffer&&(e.body=new Uint8Array(e.body)),e}static formatSuperagentError(e){if(e.response)try{const t=JSON.parse(u.from(e.response.body).toString());e.message=`Network request error. Received status ${e.response.status}: ${t.message}`}catch(e){}return e}async get(e,t,r={}){const n=c.get(this.addressWithPath(e)).set(this.tokenHeader).set(this.defaultHeaders).set(r).responseType("arraybuffer").query(t);try{const e=await n;return l.superagentToHTTPClientResponse(e)}catch(e){throw l.formatSuperagentError(e)}}async post(e,t,r,n={}){const o=c.post(this.addressWithPath(e)).set(this.tokenHeader).set(this.defaultHeaders).set(n).query(r).serialize((e=>e)).responseType("arraybuffer").send(u.from(t));try{const e=await o;return l.superagentToHTTPClientResponse(e)}catch(e){throw l.formatSuperagentError(e)}}async delete(e,t,r,n={}){const o=c.delete(this.addressWithPath(e)).set(this.tokenHeader).set(this.defaultHeaders).set(n).query(r).serialize((e=>e)).responseType("arraybuffer").send(u.from(t));try{const e=await o;return l.superagentToHTTPClientResponse(e)}catch(e){throw l.formatSuperagentError(e)}}}var h=r(2486).Buffer;function p(e){return Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{})}class f{constructor(e,t,r,n={}){this.bc=void 0!==t?new l(e,t,r,n):e}static parseJSON(e,t,r={}){try{return 0===Object.keys(r).length?e&&JSON.parse(e):e&&n.parseJSON(e,r)}catch(r){const n=r;throw n.rawResponse=e||null,n.statusCode=t,n}}static serializeData(e,t){if(!e)return new Uint8Array(0);if("application/json"===t["content-type"])return new Uint8Array(h.from(JSON.stringify(e)));if("string"==typeof e)return new Uint8Array(h.from(e));if(e instanceof Uint8Array)return e;throw new Error("provided data is neither a string nor a Uint8Array and content-type is not application/json")}static prepareResponse(e,t,r={}){let n,{body:o}=e;return"application/msgpack"!==t&&(n=o&&h.from(o).toString()||""),"application/json"===t&&(o=f.parseJSON(n,e.status,r)),{...e,body:o,text:n,ok:2===Math.trunc(e.status/100)}}static prepareResponseError(e){return e.response&&(e.response=f.prepareResponse(e.response,"application/json"),e.status=e.response.status),e}async get(e,t,r={},n={}){const o=function(e){if(void 0===e||!Object.prototype.hasOwnProperty.call(e,"format"))return"application/json";switch(e.format){case"msgpack":return"application/msgpack";case"json":default:return"application/json"}}(t),i={...r,accept:o};try{const r=await this.bc.get(e,function(e){for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(e[t]&&0!==e[t].length||delete e[t]);return e}(t),i);return f.prepareResponse(r,o,n)}catch(e){throw f.prepareResponseError(e)}}async post(e,t,r={}){const n={"content-type":"application/json",...p(r)};try{const r=await this.bc.post(e,f.serializeData(t,n),void 0,n);return f.prepareResponse(r,"application/json")}catch(e){throw f.prepareResponseError(e)}}async delete(e,t,r={}){const n={"content-type":"application/json",...p(r)},o=await this.bc.delete(e,f.serializeData(t,n),void 0,n);return f.prepareResponse(o,"application/json")}}},6477:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s});var n=r(3480),o=r(9417),i=r(2486).Buffer;class s extends n.Z{constructor(e,t="http://127.0.0.1",r=7833,n={}){super("X-KMD-API-Token",e,t,r,n)}async versions(){return(await this.c.get("/versions")).body}async listWallets(){return(await this.c.get("/v1/wallets")).body}async createWallet(e,t,r="",n="sqlite"){const o={wallet_name:e,wallet_driver_name:n,wallet_password:t,master_derivation_key:i.from(r).toString("base64")};return(await this.c.post("/v1/wallet",o)).body}async initWalletHandle(e,t){const r={wallet_id:e,wallet_password:t};return(await this.c.post("/v1/wallet/init",r)).body}async releaseWalletHandle(e){const t={wallet_handle_token:e};return(await this.c.post("/v1/wallet/release",t)).body}async renewWalletHandle(e){const t={wallet_handle_token:e};return(await this.c.post("/v1/wallet/renew",t)).body}async renameWallet(e,t,r){const n={wallet_id:e,wallet_password:t,wallet_name:r};return(await this.c.post("/v1/wallet/rename",n)).body}async getWallet(e){const t={wallet_handle_token:e};return(await this.c.post("/v1/wallet/info",t)).body}async exportMasterDerivationKey(e,t){const r={wallet_handle_token:e,wallet_password:t},n=await this.c.post("/v1/master-key/export",r);return{master_derivation_key:i.from(n.body.master_derivation_key,"base64")}}async importKey(e,t){const r={wallet_handle_token:e,private_key:i.from(t).toString("base64")};return(await this.c.post("/v1/key/import",r)).body}async exportKey(e,t,r){const n={wallet_handle_token:e,address:r,wallet_password:t},o=await this.c.post("/v1/key/export",n);return{private_key:i.from(o.body.private_key,"base64")}}async generateKey(e){const t={wallet_handle_token:e,display_mnemonic:!1};return(await this.c.post("/v1/key",t)).body}async deleteKey(e,t,r){const n={wallet_handle_token:e,address:r,wallet_password:t};return(await this.c.delete("/v1/key",n)).body}async listKeys(e){const t={wallet_handle_token:e};return(await this.c.post("/v1/key/list",t)).body}async signTransaction(e,t,r){const n=o.instantiateTxnIfNeeded(r),s={wallet_handle_token:e,wallet_password:t,transaction:i.from(n.toByte()).toString("base64")},a=await this.c.post("/v1/transaction/sign",s);return 200===a.status?i.from(a.body.signed_transaction,"base64"):a.body}async signTransactionWithSpecificPublicKey(e,t,r,n){const s=o.instantiateTxnIfNeeded(r),a={wallet_handle_token:e,wallet_password:t,transaction:i.from(s.toByte()).toString("base64"),public_key:i.from(n).toString("base64")},c=await this.c.post("/v1/transaction/sign",a);return 200===c.status?i.from(c.body.signed_transaction,"base64"):c.body}async listMultisig(e){const t={wallet_handle_token:e};return(await this.c.post("/v1/multisig/list",t)).body}async importMultisig(e,t,r,n){const o={wallet_handle_token:e,multisig_version:t,threshold:r,pks:n};return(await this.c.post("/v1/multisig/import",o)).body}async exportMultisig(e,t){const r={wallet_handle_token:e,address:t};return(await this.c.post("/v1/multisig/export",r)).body}async signMultisigTransaction(e,t,r,n,s){const a=o.instantiateTxnIfNeeded(r),c={wallet_handle_token:e,transaction:i.from(a.toByte()).toString("base64"),public_key:i.from(n).toString("base64"),partial_multisig:s,wallet_password:t};return(await this.c.post("/v1/multisig/sign",c)).body}async deleteMultisig(e,t,r){const n={wallet_handle_token:e,address:r,wallet_password:t};return(await this.c.delete("/v1/multisig",n)).body}}},5427:(e,t,r)=>{"use strict";r.d(t,{Z:()=>B});var n=r(3480),o=r(8680);class i extends o.Z{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}`}}var s=r(3033);class a extends o.Z{constructor(e,t){if(super(e),!Number.isInteger(t))throw Error("roundNumber should be an integer");this.round=t,this.query={format:"msgpack"}}path(){return`/v2/blocks/${this.round}`}prepare(e){if(e&&e.byteLength>0)return s.decode(e)}}var c=r(2486).Buffer;function u(e={}){let t=e;return Object.keys(t).every((e=>"content-type"!==e.toLowerCase()))&&(t={...e},t["Content-Type"]="text/plain"),t}class l extends o.Z{constructor(e,t){super(e),this.source=t,this.source=t}path(){return"/v2/teal/compile"}async do(e={}){const t=u(e);return(await this.c.post(this.path(),c.from(this.source),t)).body}}var h=r(2486).Buffer;class p extends o.Z{constructor(e,t){super(e),this.blob=s.encode(t.get_obj_for_encoding(!0))}path(){return"/v2/teal/dryrun"}async do(e={}){const t=u(e);return(await this.c.post(this.path(),h.from(this.blob),t)).body}}class f extends o.Z{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/assets/${this.index}`}}class d extends o.Z{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/applications/${this.index}`}}class g extends o.Z{path(){return"/health"}async do(e={}){const t=await this.c.get(this.path(),{},e);if(!t.ok)throw new Error(`Health response: ${t.status}`);return{}}}class y extends o.Z{constructor(e,t){super(e),this.txid=t,this.txid=t,this.query.format="msgpack"}prepare(e){if(e&&e.byteLength>0)return s.decode(e)}path(){return`/v2/transactions/pending/${this.txid}`}max(e){return this.query.max=e,this}}class m extends o.Z{constructor(e){super(e),this.query.format="msgpack"}path(){return"/v2/transactions/pending"}prepare(e){if(e&&e.byteLength>0)return s.decode(e)}max(e){return this.query.max=e,this}}class b extends o.Z{constructor(e,t){super(e),this.address=t,this.address=t,this.query.format="msgpack"}prepare(e){if(e&&e.byteLength>0)return s.decode(e)}path(){return`/v2/accounts/${this.address}/transactions/pending`}max(e){return this.query.max=e,this}}var A=r(5180);class w extends o.Z{path(){return"/v2/status"}}class v extends o.Z{constructor(e,t,r){if(super(e,t),this.round=r,!Number.isInteger(r))throw Error("round should be an integer");this.round=r}path(){return`/v2/status/wait-for-block-after/${this.round}`}}class x extends o.Z{path(){return"/v2/transactions/params"}prepare(e){return{flatFee:!1,fee:e.fee,firstRound:e["last-round"],lastRound:e["last-round"]+1e3,genesisID:e["genesis-id"],genesisHash:e["genesis-hash"]}}}class S extends o.Z{path(){return"/v2/ledger/supply"}}class E extends o.Z{path(){return"/versions"}}class T extends o.Z{path(){return"/genesis"}}class _ extends o.Z{constructor(e,t,r,n){super(e,t),this.round=r,this.txID=n,this.round=r,this.txID=n}path(){return`/v2/blocks/${this.round}/transactions/${this.txID}/proof`}}class B extends n.Z{constructor(e,t="http://r2.algorand.network",r=4180,n={}){super("X-Algo-API-Token",e,t,r,n)}healthCheck(){return new g(this.c)}versionsCheck(){return new E(this.c)}sendRawTransaction(e){return new A.default(this.c,e)}accountInformation(e){return new i(this.c,this.intDecoding,e)}block(e){return new a(this.c,e)}pendingTransactionInformation(e){return new y(this.c,e)}pendingTransactionsInformation(){return new m(this.c)}pendingTransactionByAddress(e){return new b(this.c,e)}status(){return new w(this.c,this.intDecoding)}statusAfterBlock(e){return new v(this.c,this.intDecoding,e)}getTransactionParams(){return new x(this.c)}supply(){return new S(this.c,this.intDecoding)}compile(e){return new l(this.c,e)}dryrun(e){return new p(this.c,e)}getAssetByID(e){return new f(this.c,this.intDecoding,e)}getApplicationByID(e){return new d(this.c,this.intDecoding,e)}genesis(){return new T(this.c,this.intDecoding)}getProof(e,t){return new _(this.c,this.intDecoding,e,t)}}},227:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Account:()=>a,AccountParticipation:()=>c,AccountStateDelta:()=>u,Application:()=>l,ApplicationLocalState:()=>h,ApplicationParams:()=>p,ApplicationStateSchema:()=>f,Asset:()=>d,AssetHolding:()=>g,AssetParams:()=>y,BlockResponse:()=>m,BuildVersion:()=>b,CatchpointAbortResponse:()=>A,CatchpointStartResponse:()=>w,CompileResponse:()=>v,DryrunRequest:()=>x,DryrunResponse:()=>S,DryrunSource:()=>E,DryrunState:()=>T,DryrunTxnResult:()=>_,ErrorResponse:()=>B,EvalDelta:()=>U,EvalDeltaKeyValue:()=>k,NodeStatusResponse:()=>I,PendingTransactionResponse:()=>C,PendingTransactionsResponse:()=>R,PostTransactionsResponse:()=>O,ProofResponse:()=>D,SupplyResponse:()=>N,TealKeyValue:()=>P,TealValue:()=>L,TransactionParametersResponse:()=>F,Version:()=>z});var n=r(2486).Buffer;function o(e,t){let r;if(e instanceof Uint8Array)r=t?e:n.from(e).toString("base64");else if("function"==typeof e.get_obj_for_encoding)r=e.get_obj_for_encoding(t);else if(Array.isArray(e)){r=[];for(const n of e)r.push(o(n,t))}else if("object"==typeof e){const n={};for(const r of Object.keys(e))n[r]=o(e[r],t);r=n}else{if(!function(e){return void 0===e||null==e||"object"!=typeof e&&"function"!=typeof e}(e))throw new Error(`Unsupported value: ${String(e)}`);r=e}return r}class i{get_obj_for_encoding(e=!1){const t={};for(const r of Object.keys(this.attribute_map)){const n=this.attribute_map[r],i=this[r];void 0!==i&&(t[n]=null===i?null:o(i,e))}return t}}var s=r(2486).Buffer;class a extends i{constructor({address:e,amount:t,amountWithoutPendingRewards:r,minBalance:n,pendingRewards:o,rewards:i,round:s,status:a,appsLocalState:c,appsTotalExtraPages:u,appsTotalSchema:l,assets:h,authAddr:p,createdApps:f,createdAssets:d,participation:g,rewardBase:y,sigType:m}){super(),this.address=e,this.amount=t,this.amountWithoutPendingRewards=r,this.minBalance=n,this.pendingRewards=o,this.rewards=i,this.round=s,this.status=a,this.appsLocalState=c,this.appsTotalExtraPages=u,this.appsTotalSchema=l,this.assets=h,this.authAddr=p,this.createdApps=f,this.createdAssets=d,this.participation=g,this.rewardBase=y,this.sigType=m,this.attribute_map={address:"address",amount:"amount",amountWithoutPendingRewards:"amount-without-pending-rewards",minBalance:"min-balance",pendingRewards:"pending-rewards",rewards:"rewards",round:"round",status:"status",appsLocalState:"apps-local-state",appsTotalExtraPages:"apps-total-extra-pages",appsTotalSchema:"apps-total-schema",assets:"assets",authAddr:"auth-addr",createdApps:"created-apps",createdAssets:"created-assets",participation:"participation",rewardBase:"reward-base",sigType:"sig-type"}}}class c extends i{constructor({selectionParticipationKey:e,voteFirstValid:t,voteKeyDilution:r,voteLastValid:n,voteParticipationKey:o,stateProofKey:i}){super(),this.selectionParticipationKey="string"==typeof e?new Uint8Array(s.from(e,"base64")):e,this.voteFirstValid=t,this.voteKeyDilution=r,this.voteLastValid=n,this.voteParticipationKey="string"==typeof o?new Uint8Array(s.from(o,"base64")):o,this.stateProofKey="string"==typeof i?new Uint8Array(s.from(i,"base64")):i,this.attribute_map={selectionParticipationKey:"selection-participation-key",voteFirstValid:"vote-first-valid",voteKeyDilution:"vote-key-dilution",voteLastValid:"vote-last-valid",voteParticipationKey:"vote-participation-key",stateProofKey:"state-proof-key"}}}class u extends i{constructor(e,t){super(),this.address=e,this.delta=t,this.attribute_map={address:"address",delta:"delta"}}}class l extends i{constructor(e,t){super(),this.id=e,this.params=t,this.attribute_map={id:"id",params:"params"}}}class h extends i{constructor(e,t,r){super(),this.id=e,this.schema=t,this.keyValue=r,this.attribute_map={id:"id",schema:"schema",keyValue:"key-value"}}}class p extends i{constructor({approvalProgram:e,clearStateProgram:t,creator:r,extraProgramPages:n,globalState:o,globalStateSchema:i,localStateSchema:a}){super(),this.approvalProgram="string"==typeof e?new Uint8Array(s.from(e,"base64")):e,this.clearStateProgram="string"==typeof t?new Uint8Array(s.from(t,"base64")):t,this.creator=r,this.extraProgramPages=n,this.globalState=o,this.globalStateSchema=i,this.localStateSchema=a,this.attribute_map={approvalProgram:"approval-program",clearStateProgram:"clear-state-program",creator:"creator",extraProgramPages:"extra-program-pages",globalState:"global-state",globalStateSchema:"global-state-schema",localStateSchema:"local-state-schema"}}}class f extends i{constructor(e,t){super(),this.numUint=e,this.numByteSlice=t,this.attribute_map={numUint:"num-uint",numByteSlice:"num-byte-slice"}}}class d extends i{constructor(e,t){super(),this.index=e,this.params=t,this.attribute_map={index:"index",params:"params"}}}class g extends i{constructor(e,t,r,n){super(),this.amount=e,this.assetId=t,this.creator=r,this.isFrozen=n,this.attribute_map={amount:"amount",assetId:"asset-id",creator:"creator",isFrozen:"is-frozen"}}}class y extends i{constructor({creator:e,decimals:t,total:r,clawback:n,defaultFrozen:o,freeze:i,manager:a,metadataHash:c,name:u,nameB64:l,reserve:h,unitName:p,unitNameB64:f,url:d,urlB64:g}){super(),this.creator=e,this.decimals=t,this.total=r,this.clawback=n,this.defaultFrozen=o,this.freeze=i,this.manager=a,this.metadataHash="string"==typeof c?new Uint8Array(s.from(c,"base64")):c,this.name=u,this.nameB64="string"==typeof l?new Uint8Array(s.from(l,"base64")):l,this.reserve=h,this.unitName=p,this.unitNameB64="string"==typeof f?new Uint8Array(s.from(f,"base64")):f,this.url=d,this.urlB64="string"==typeof g?new Uint8Array(s.from(g,"base64")):g,this.attribute_map={creator:"creator",decimals:"decimals",total:"total",clawback:"clawback",defaultFrozen:"default-frozen",freeze:"freeze",manager:"manager",metadataHash:"metadata-hash",name:"name",nameB64:"name-b64",reserve:"reserve",unitName:"unit-name",unitNameB64:"unit-name-b64",url:"url",urlB64:"url-b64"}}}class m extends i{constructor(e,t){super(),this.block=e,this.cert=t,this.attribute_map={block:"block",cert:"cert"}}}class b extends i{constructor({branch:e,buildNumber:t,channel:r,commitHash:n,major:o,minor:i}){super(),this.branch=e,this.buildNumber=t,this.channel=r,this.commitHash=n,this.major=o,this.minor=i,this.attribute_map={branch:"branch",buildNumber:"build_number",channel:"channel",commitHash:"commit_hash",major:"major",minor:"minor"}}}class A extends i{constructor(e){super(),this.catchupMessage=e,this.attribute_map={catchupMessage:"catchup-message"}}}class w extends i{constructor(e){super(),this.catchupMessage=e,this.attribute_map={catchupMessage:"catchup-message"}}}class v extends i{constructor(e,t){super(),this.hash=e,this.result=t,this.attribute_map={hash:"hash",result:"result"}}}class x extends i{constructor({accounts:e,apps:t,latestTimestamp:r,protocolVersion:n,round:o,sources:i,txns:s}){super(),this.accounts=e,this.apps=t,this.latestTimestamp=r,this.protocolVersion=n,this.round=o,this.sources=i,this.txns=s,this.attribute_map={accounts:"accounts",apps:"apps",latestTimestamp:"latest-timestamp",protocolVersion:"protocol-version",round:"round",sources:"sources",txns:"txns"}}}class S extends i{constructor(e,t,r){super(),this.error=e,this.protocolVersion=t,this.txns=r,this.attribute_map={error:"error",protocolVersion:"protocol-version",txns:"txns"}}}class E extends i{constructor(e,t,r,n){super(),this.fieldName=e,this.source=t,this.txnIndex=r,this.appIndex=n,this.attribute_map={fieldName:"field-name",source:"source",txnIndex:"txn-index",appIndex:"app-index"}}}class T extends i{constructor({line:e,pc:t,stack:r,error:n,scratch:o}){super(),this.line=e,this.pc=t,this.stack=r,this.error=n,this.scratch=o,this.attribute_map={line:"line",pc:"pc",stack:"stack",error:"error",scratch:"scratch"}}}class _ extends i{constructor({disassembly:e,appCallMessages:t,appCallTrace:r,cost:n,globalDelta:o,localDeltas:i,logicSigDisassembly:s,logicSigMessages:a,logicSigTrace:c,logs:u}){super(),this.disassembly=e,this.appCallMessages=t,this.appCallTrace=r,this.cost=n,this.globalDelta=o,this.localDeltas=i,this.logicSigDisassembly=s,this.logicSigMessages=a,this.logicSigTrace=c,this.logs=u,this.attribute_map={disassembly:"disassembly",appCallMessages:"app-call-messages",appCallTrace:"app-call-trace",cost:"cost",globalDelta:"global-delta",localDeltas:"local-deltas",logicSigDisassembly:"logic-sig-disassembly",logicSigMessages:"logic-sig-messages",logicSigTrace:"logic-sig-trace",logs:"logs"}}}class B extends i{constructor(e,t){super(),this.message=e,this.data=t,this.attribute_map={message:"message",data:"data"}}}class U extends i{constructor(e,t,r){super(),this.action=e,this.bytes=t,this.uint=r,this.attribute_map={action:"action",bytes:"bytes",uint:"uint"}}}class k extends i{constructor(e,t){super(),this.key=e,this.value=t,this.attribute_map={key:"key",value:"value"}}}class I extends i{constructor({catchupTime:e,lastRound:t,lastVersion:r,nextVersion:n,nextVersionRound:o,nextVersionSupported:i,stoppedAtUnsupportedRound:s,timeSinceLastRound:a,catchpoint:c,catchpointAcquiredBlocks:u,catchpointProcessedAccounts:l,catchpointTotalAccounts:h,catchpointTotalBlocks:p,catchpointVerifiedAccounts:f,lastCatchpoint:d}){super(),this.catchupTime=e,this.lastRound=t,this.lastVersion=r,this.nextVersion=n,this.nextVersionRound=o,this.nextVersionSupported=i,this.stoppedAtUnsupportedRound=s,this.timeSinceLastRound=a,this.catchpoint=c,this.catchpointAcquiredBlocks=u,this.catchpointProcessedAccounts=l,this.catchpointTotalAccounts=h,this.catchpointTotalBlocks=p,this.catchpointVerifiedAccounts=f,this.lastCatchpoint=d,this.attribute_map={catchupTime:"catchup-time",lastRound:"last-round",lastVersion:"last-version",nextVersion:"next-version",nextVersionRound:"next-version-round",nextVersionSupported:"next-version-supported",stoppedAtUnsupportedRound:"stopped-at-unsupported-round",timeSinceLastRound:"time-since-last-round",catchpoint:"catchpoint",catchpointAcquiredBlocks:"catchpoint-acquired-blocks",catchpointProcessedAccounts:"catchpoint-processed-accounts",catchpointTotalAccounts:"catchpoint-total-accounts",catchpointTotalBlocks:"catchpoint-total-blocks",catchpointVerifiedAccounts:"catchpoint-verified-accounts",lastCatchpoint:"last-catchpoint"}}}class C extends i{constructor({poolError:e,txn:t,applicationIndex:r,assetClosingAmount:n,assetIndex:o,closeRewards:i,closingAmount:s,confirmedRound:a,globalStateDelta:c,innerTxns:u,localStateDelta:l,logs:h,receiverRewards:p,senderRewards:f}){super(),this.poolError=e,this.txn=t,this.applicationIndex=r,this.assetClosingAmount=n,this.assetIndex=o,this.closeRewards=i,this.closingAmount=s,this.confirmedRound=a,this.globalStateDelta=c,this.innerTxns=u,this.localStateDelta=l,this.logs=h,this.receiverRewards=p,this.senderRewards=f,this.attribute_map={poolError:"pool-error",txn:"txn",applicationIndex:"application-index",assetClosingAmount:"asset-closing-amount",assetIndex:"asset-index",closeRewards:"close-rewards",closingAmount:"closing-amount",confirmedRound:"confirmed-round",globalStateDelta:"global-state-delta",innerTxns:"inner-txns",localStateDelta:"local-state-delta",logs:"logs",receiverRewards:"receiver-rewards",senderRewards:"sender-rewards"}}}class R extends i{constructor(e,t){super(),this.topTransactions=e,this.totalTransactions=t,this.attribute_map={topTransactions:"top-transactions",totalTransactions:"total-transactions"}}}class O extends i{constructor(e){super(),this.txid=e,this.attribute_map={txid:"txId"}}}class D extends i{constructor({idx:e,proof:t,stibhash:r,treedepth:n,hashtype:o}){super(),this.idx=e,this.proof="string"==typeof t?new Uint8Array(s.from(t,"base64")):t,this.stibhash="string"==typeof r?new Uint8Array(s.from(r,"base64")):r,this.treedepth=n,this.hashtype=o,this.attribute_map={idx:"idx",proof:"proof",stibhash:"stibhash",treedepth:"treedepth",hashtype:"hashtype"}}}class N extends i{constructor(e,t,r){super(),this.currentRound=e,this.onlineMoney=t,this.totalMoney=r,this.attribute_map={currentRound:"current_round",onlineMoney:"online-money",totalMoney:"total-money"}}}class P extends i{constructor(e,t){super(),this.key=e,this.value=t,this.attribute_map={key:"key",value:"value"}}}class L extends i{constructor(e,t,r){super(),this.type=e,this.bytes=t,this.uint=r,this.attribute_map={type:"type",bytes:"bytes",uint:"uint"}}}class F extends i{constructor({consensusVersion:e,fee:t,genesisHash:r,genesisId:n,lastRound:o,minFee:i}){super(),this.consensusVersion=e,this.fee=t,this.genesisHash="string"==typeof r?new Uint8Array(s.from(r,"base64")):r,this.genesisId=n,this.lastRound=o,this.minFee=i,this.attribute_map={consensusVersion:"consensus-version",fee:"fee",genesisHash:"genesis-hash",genesisId:"genesis-id",lastRound:"last-round",minFee:"min-fee"}}}class z extends i{constructor(e,t,r,n){super(),this.build=e,this.genesisHashB64="string"==typeof t?new Uint8Array(s.from(t,"base64")):t,this.genesisId=r,this.versions=n,this.attribute_map={build:"build",genesisHashB64:"genesis_hash_b64",genesisId:"genesis_id",versions:"versions"}}}},5180:(e,t,r)=>{"use strict";r.r(t),r.d(t,{setSendTransactionHeaders:()=>s,default:()=>c});var n=r(8680),o=r(413),i=r(2486).Buffer;function s(e={}){let t=e;return Object.keys(t).every((e=>"content-type"!==e.toLowerCase()))&&(t={...e},t["Content-Type"]="application/x-binary"),t}function a(e){return e&&void 0!==e.byteLength}class c extends n.Z{constructor(e,t){super(e);let r=t;if(Array.isArray(t)){if(!t.every(a))throw new TypeError("Array elements must be byte arrays");r=(0,o.concatArrays)(...t)}else if(!a(r))throw new TypeError("Argument must be byte array");this.txnBytesToPost=r}path(){return"/v2/transactions"}async do(e={}){const t=s(e);return(await this.c.post(this.path(),i.from(this.txnBytesToPost),t)).body}}},8104:(e,t,r)=>{"use strict";r.d(t,{Z:()=>v});var n=r(3480),o=r(8680);class i extends o.Z{path(){return"/health"}}class s extends o.Z{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/assets/${this.index}/balances`}limit(e){return this.query.limit=e,this}round(e){return this.query.round=e,this}currencyGreaterThan(e){return this.query["currency-greater-than"]=e,this}currencyLessThan(e){return this.query["currency-less-than"]=e,this}nextToken(e){return this.query.next=e,this}includeAll(e=!0){return this.query["include-all"]=e,this}}var a=r(2486).Buffer;function c(e){return"string"==typeof e?e:a.from(e).toString("base64")}class u extends o.Z{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}/transactions`}notePrefix(e){return this.query["note-prefix"]=c(e),this}txType(e){return this.query["tx-type"]=e,this}sigType(e){return this.query["sig-type"]=e,this}txid(e){return this.query.txid=e,this}round(e){return this.query.round=e,this}minRound(e){return this.query["min-round"]=e,this}maxRound(e){return this.query["max-round"]=e,this}assetID(e){return this.query["asset-id"]=e,this}limit(e){return this.query.limit=e,this}beforeTime(e){return this.query["before-time"]=e,this}afterTime(e){return this.query["after-time"]=e,this}currencyGreaterThan(e){return this.query["currency-greater-than"]=e,this}currencyLessThan(e){return this.query["currency-less-than"]=e,this}nextToken(e){return this.query.next=e,this}rekeyTo(e){return this.query["rekey-to"]=e,this}}class l extends o.Z{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/assets/${this.index}/transactions`}notePrefix(e){return this.query["note-prefix"]=c(e),this}txType(e){return this.query["tx-type"]=e,this}sigType(e){return this.query["sig-type"]=e,this}txid(e){return this.query.txid=e,this}round(e){return this.query.round=e,this}minRound(e){return this.query["min-round"]=e,this}maxRound(e){return this.query["max-round"]=e,this}assetID(e){return this.query["asset-id"]=e,this}limit(e){return this.query.limit=e,this}beforeTime(e){return this.query["before-time"]=e,this}afterTime(e){return this.query["after-time"]=e,this}currencyGreaterThan(e){return this.query["currency-greater-than"]=e,this}currencyLessThan(e){return this.query["currency-less-than"]=e,this}addressRole(e){return this.query["address-role"]=e,this}address(e){return this.query.address=e,this}excludeCloseTo(e){return this.query["exclude-close-to"]=e,this}nextToken(e){return this.query.next=e,this}rekeyTo(e){return this.query["rekey-to"]=e,this}}class h extends o.Z{constructor(e,t,r){super(e,t),this.round=r,this.round=r}path(){return`/v2/blocks/${this.round}`}}class p extends o.Z{constructor(e,t,r){super(e,t),this.txID=r,this.txID=r}path(){return`/v2/transactions/${this.txID}`}}class f extends o.Z{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}`}round(e){return this.query.round=e,this}includeAll(e=!0){return this.query["include-all"]=e,this}}class d extends o.Z{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/assets/${this.index}`}includeAll(e=!0){return this.query["include-all"]=e,this}}class g extends o.Z{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/applications/${this.index}`}includeAll(e=!0){return this.query["include-all"]=e,this}}class y extends o.Z{constructor(e,t,r){super(e,t),this.appID=r,this.appID=r}path(){return`/v2/applications/${this.appID}/logs`}limit(e){return this.query.limit=e,this}minRound(e){return this.query["min-round"]=e,this}maxRound(e){return this.query["max-round"]=e,this}nextToken(e){return this.query.next=e,this}sender(e){return this.query["sender-address"]=e,this}txid(e){return this.query.txid=e,this}}class m extends o.Z{path(){return"/v2/accounts"}currencyGreaterThan(e){return this.query["currency-greater-than"]=e,this}currencyLessThan(e){return this.query["currency-less-than"]=e,this}limit(e){return this.query.limit=e,this}assetID(e){return this.query["asset-id"]=e,this}nextToken(e){return this.query.next=e,this}round(e){return this.query.round=e,this}authAddr(e){return this.query["auth-addr"]=e,this}applicationID(e){return this.query["application-id"]=e,this}includeAll(e=!0){return this.query["include-all"]=e,this}}class b extends o.Z{path(){return"/v2/transactions"}notePrefix(e){return this.query["note-prefix"]=c(e),this}txType(e){return this.query["tx-type"]=e,this}sigType(e){return this.query["sig-type"]=e,this}txid(e){return this.query.txid=e,this}round(e){return this.query.round=e,this}minRound(e){return this.query["min-round"]=e,this}maxRound(e){return this.query["max-round"]=e,this}assetID(e){return this.query["asset-id"]=e,this}limit(e){return this.query.limit=e,this}beforeTime(e){return this.query["before-time"]=e,this}afterTime(e){return this.query["after-time"]=e,this}currencyGreaterThan(e){return this.query["currency-greater-than"]=e,this}currencyLessThan(e){return this.query["currency-less-than"]=e,this}addressRole(e){return this.query["address-role"]=e,this}address(e){return this.query.address=e,this}excludeCloseTo(e){return this.query["exclude-close-to"]=e,this}nextToken(e){return this.query.next=e,this}rekeyTo(e){return this.query["rekey-to"]=e,this}applicationID(e){return this.query["application-id"]=e,this}}class A extends o.Z{path(){return"/v2/assets"}limit(e){return this.query.limit=e,this}creator(e){return this.query.creator=e,this}name(e){return this.query.name=e,this}unit(e){return this.query.unit=e,this}index(e){return this.query["asset-id"]=e,this}nextToken(e){return this.query.next=e,this}includeAll(e=!0){return this.query["include-all"]=e,this}}class w extends o.Z{path(){return"/v2/applications"}index(e){return this.query["application-id"]=e,this}nextToken(e){return this.query.next=e,this}limit(e){return this.query.limit=e,this}includeAll(e=!0){return this.query["include-all"]=e,this}}class v extends n.Z{constructor(e,t="http://127.0.0.1",r=8080,n={}){super("X-Indexer-API-Token",e,t,r,n)}makeHealthCheck(){return new i(this.c,this.intDecoding)}lookupAssetBalances(e){return new s(this.c,this.intDecoding,e)}lookupAssetTransactions(e){return new l(this.c,this.intDecoding,e)}lookupAccountTransactions(e){return new u(this.c,this.intDecoding,e)}lookupBlock(e){return new h(this.c,this.intDecoding,e)}lookupTransactionByID(e){return new p(this.c,this.intDecoding,e)}lookupAccountByID(e){return new f(this.c,this.intDecoding,e)}lookupAssetByID(e){return new d(this.c,this.intDecoding,e)}lookupApplications(e){return new g(this.c,this.intDecoding,e)}lookupApplicationLogs(e){return new y(this.c,this.intDecoding,e)}searchAccounts(){return new m(this.c,this.intDecoding)}searchForTransactions(){return new b(this.c,this.intDecoding)}searchForAssets(){return new A(this.c,this.intDecoding)}searchForApplications(){return new w(this.c,this.intDecoding)}}},8680:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(7197);class o{constructor(e,t){this.c=e,this.query={},this.intDecoding=t||n.Z.DEFAULT}prepare(e){return e}async do(e={}){const t={};"default"!==this.intDecoding&&(t.intDecoding=this.intDecoding);const r=await this.c.get(this.path(),this.query,e,t);return this.prepare(r.body)}setIntDecoding(e){if("default"!==e&&"safe"!==e&&"mixed"!==e&&"bigint"!==e)throw new Error(`Invalid method for int decoding: ${e}`);return this.intDecoding=e,this}}},3480:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(1113),o=r(7197);class i{constructor(e,t,r,i,s={}){if("function"==typeof t.get)this.c=new n.default(t);else{let o;o="string"==typeof t?function(e="",t){const r={};return r[t]=e,r}(t,e):t,this.c=new n.default(o,r,i,s)}this.intDecoding=o.Z.DEFAULT}setIntEncoding(e){this.intDecoding=e}getIntEncoding(){return this.intDecoding}}},3458:(e,t,r)=>{"use strict";r.d(t,{b:()=>p,A:()=>d});var n=r(7677),o=r(9417),i=r(1988),s=r(1063),a=r(5062),c=r(834),u=r(1624),l=r(2486).Buffer;const h=l.from([21,31,124,117]);var p;function f(e,t,r){if(null!=r&&e===r)return 0;const n=null==r?0:1;for(let r=0;r({txn:o.Transaction.from_obj_for_encoding({...e.get_obj_for_encoding(),grp:void 0}),signer:t}))),e.methodCalls=new Map(this.methodCalls),e}addTransaction(e){if(this.status!==p.BUILDING)throw new Error("Cannot add transactions when composer status is not BUILDING");if(this.transactions.length===d.MAX_GROUP_SIZE)throw new Error(`Adding an additional transaction exceeds the maximum atomic group size of ${d.MAX_GROUP_SIZE}`);if(e.txn.group&&e.txn.group.some((e=>0!==e)))throw new Error("Cannot add a transaction with nonzero group ID");this.transactions.push(e)}addMethodCall({appID:e,method:t,methodArgs:r,sender:o,suggestedParams:s,onComplete:a,approvalProgram:l,clearProgram:h,numGlobalInts:g,numGlobalByteSlices:y,numLocalInts:m,numLocalByteSlices:b,extraPages:A,note:w,lease:v,rekeyTo:x,signer:S}){if(this.status!==p.BUILDING)throw new Error("Cannot add transactions when composer status is not BUILDING");if(this.transactions.length+t.txnCount()>d.MAX_GROUP_SIZE)throw new Error(`Adding additional transactions exceeds the maximum atomic group size of ${d.MAX_GROUP_SIZE}`);if(0===e){if(null==l||null==h||null==g||null==y||null==m||null==b)throw new Error("One of the following required parameters for application creation is missing: approvalProgram, clearProgram, numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices")}else if(a===u.hq.UpdateApplicationOC){if(null==l||null==h)throw new Error("One of the following required parameters for OnApplicationComplete.UpdateApplicationOC is missing: approvalProgram, clearProgram");if(null!=g||null!=y||null!=m||null!=b||null!=A)throw new Error("One of the following application creation parameters were set on a non-creation call: numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices, extraPages")}else if(null!=l||null!=h||null!=g||null!=y||null!=m||null!=b||null!=A)throw new Error("One of the following application creation parameters were set on a non-creation call: approvalProgram, clearProgram, numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices, extraPages");if(null==r&&(r=[]),r.length!==t.args.length)throw new Error(`Incorrect number of method arguments. Expected ${t.args.length}, got ${r.length}`);let E=[],T=[];const _=[],B=[],U=[],k=new Map;for(let e=0;e0!==e)))throw new Error("Cannot add a transaction with nonzero group ID");_.push(i)}else{if((0,c.Xw)(i))throw new Error(`Expected non-transaction value for argument at index ${e}`);if((0,n.o5)(o)&&(k.set(B.length,E.length),B.push(o),U.push(i),o=new n.Pu(8)),"string"==typeof o)throw new Error(`Unknown ABI type: ${o}`);E.push(o),T.push(i)}}const I=[],C=[],R=[],O=[];for(let t=0;tNumber.MAX_SAFE_INTEGER)throw new Error(`Expected safe integer for application value, got ${r}`);s=f(Number(r),R,e);break}case n.UV.asset:{const e=new n.Pu(64),t=e.decode(e.encode(i));if(t>Number.MAX_SAFE_INTEGER)throw new Error(`Expected safe integer for asset value, got ${t}`);s=f(Number(t),O);break}default:throw new Error(`Unknown reference type: ${r}`)}I.push(s)}for(let e=0;e15){const e=E.slice(14),t=T.slice(14);E=E.slice(0,14),T=T.slice(0,14),E.push(new n.w1(e)),T.push(t)}const D=[t.getSelector()];for(let e=0;e1&&(0,s.assignGroupID)(this.transactions.map((e=>e.txn))),this.status=p.BUILT}return this.transactions}async gatherSignatures(){if(this.status>=p.SIGNED)return this.signedTxns;const e=this.buildGroup(),t=e.map((e=>e.txn)),r=new Map;for(let t=0;te(t,r)))),s=e.map((()=>null));for(let e=0;enull!=e)))throw new Error(`Missing signatures. Got ${s}`);const a=s.map(((e,t)=>{try{return(0,o.decodeSignedTransaction)(e).txn.txID()}catch(e){throw new Error(`Cannot decode signed transaction at index ${t}. ${e}`)}}));return this.signedTxns=s,this.txIDs=a,this.status=p.SIGNED,s}async submit(e){if(this.status>p.SUBMITTED)throw new Error("Transaction group cannot be resubmitted");const t=await this.gatherSignatures();return await e.sendRawTransaction(t).do(),this.status=p.SUBMITTED,this.txIDs}async execute(e,t){if(this.status===p.COMMITTED)throw new Error("Transaction group has already been executed successfully");const r=await this.submit(e);this.status=p.SUBMITTED;const n=this.transactions.findIndex(((e,t)=>this.methodCalls.has(t))),o=-1===n?0:n,i=await(0,a.K)(e,r[o],t);this.status=p.COMMITTED;const s=i["confirmed-round"],c=[];for(const[t,o]of this.methodCalls){const s=r[t],a={txID:s,rawReturnValue:new Uint8Array};try{const r=t===n?i:await e.pendingTransactionInformation(s).do();if(a.txInfo=r,"void"!==o.returns.type){const e=r.logs||[];if(0===e.length)throw new Error("App call transaction did not log a return value");const t=l.from(e[e.length-1],"base64");if(t.byteLength<4||!t.slice(0,4).equals(h))throw new Error("App call transaction did not log a return value");a.rawReturnValue=new Uint8Array(t.slice(4)),a.returnValue=o.returns.type.decode(a.rawReturnValue)}}catch(e){a.decodeError=e}c.push(a)}return{confirmedRound:s,txIDs:r,methodResults:c}}}d.MAX_GROUP_SIZE=16},9070:(e,t,r)=>{"use strict";r.d(t,{rD:()=>o,_:()=>i,HN:()=>s});const n=1e6,o="Microalgos should be positive and less than 2^53 - 1.";function i(e){if(e<0||!Number.isSafeInteger(e))throw new Error(o);return e/n}function s(e){const t=e*n;return Math.round(t)}},4383:(e,t,r)=>{"use strict";r.d(t,{P:()=>c});var n=r(227),o=r(1824),i=r(7116),s=r(2486).Buffer;function a(e){return e.params["approval-program"]=s.from(e.params["approval-program"].toString(),"base64"),e.params["clear-state-program"]=s.from(e.params["clear-state-program"].toString(),"base64"),e}async function c({client:e,txns:t,protocolVersion:r,latestTimestamp:s,round:c,sources:u}){const l=[],h=[],p=[],f=[],d=[];for(const e of t)e.txn.type===o.i.appl&&(d.push((0,i.encodeAddress)(e.txn.from.publicKey)),e.txn.appAccounts&&d.push(...e.txn.appAccounts.map((e=>(0,i.encodeAddress)(e.publicKey)))),e.txn.appForeignApps&&p.push(...e.txn.appForeignApps),e.txn.appForeignAssets&&f.push(...e.txn.appForeignAssets),0===e.txn.appIndex?l.push(new n.Application(1380011588,new n.ApplicationParams({creator:(0,i.encodeAddress)(e.txn.from.publicKey),approvalProgram:e.txn.appApprovalProgram,clearStateProgram:e.txn.appClearProgram,localStateSchema:new n.ApplicationStateSchema(e.txn.appLocalInts,e.txn.appLocalByteSlices),globalStateSchema:new n.ApplicationStateSchema(e.txn.appGlobalInts,e.txn.appGlobalByteSlices)}))):(p.push(e.txn.appIndex),d.push((0,i.getApplicationAddress)(e.txn.appIndex))));const g=[];for(const t of[...new Set(f)])g.push(e.getAssetByID(t).do().then((e=>{d.push(e.params.creator)})));await Promise.all(g);const y=[];for(const t of[...new Set(p)])y.push(e.getApplicationByID(t).do().then((e=>{const t=a(e);l.push(t),d.push(t.params.creator)})));await Promise.all(y);const m=[];for(const t of[...new Set(d)])m.push(e.accountInformation(t).do().then((e=>{"created-apps"in e&&(e["created-apps"]=e["created-apps"].map((e=>a(e)))),h.push(e)})));return await Promise.all(m),new n.DryrunRequest({txns:t.map((e=>({...e,txn:e.txn.get_obj_for_encoding()}))),accounts:h,apps:l,latestTimestamp:s,round:c,protocolVersion:r,sources:u})}},7116:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ALGORAND_ZERO_ADDRESS_STRING:()=>u,MALFORMED_ADDRESS_ERROR_MSG:()=>p,CHECKSUM_ADDRESS_ERROR_MSG:()=>f,INVALID_MSIG_VERSION_ERROR_MSG:()=>d,INVALID_MSIG_THRESHOLD_ERROR_MSG:()=>g,INVALID_MSIG_PK_ERROR_MSG:()=>y,UNEXPECTED_PK_LEN_ERROR_MSG:()=>m,decodeAddress:()=>b,isValidAddress:()=>A,encodeAddress:()=>w,fromMultisigPreImg:()=>v,fromMultisigPreImgAddrs:()=>x,getApplicationAddress:()=>S});var n=r(7267),o=r.n(n),i=r(9404),s=r(413),a=r(6963),c=r(2486).Buffer;const u="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ",l=new Uint8Array([77,117,108,116,105,115,105,103,65,100,100,114]),h=c.from("appID"),p="address seems to be malformed",f="wrong checksum for address",d="invalid multisig version",g="bad multisig threshold",y="bad multisig public key - wrong length",m="nacl public key length is not 32 bytes";function b(e){if("string"!=typeof e||58!==e.length)throw new Error(p);const t=o().decode.asBytes(e.toString());if(36!==t.length)throw new Error(p);const r=new Uint8Array(t.slice(0,32)),n=new Uint8Array(t.slice(i.PUBLIC_KEY_LENGTH,36)),a=i.genericHash(r).slice(i.HASH_BYTES_LENGTH-4,i.HASH_BYTES_LENGTH);if(!s.arrayEqual(a,n))throw new Error(f);return{publicKey:r,checksum:n}}function A(e){try{b(e)}catch(e){return!1}return!0}function w(e){const t=i.genericHash(e).slice(i.PUBLIC_KEY_LENGTH-4,i.PUBLIC_KEY_LENGTH);return o().encode(s.concatArrays(e,t)).toString().slice(0,58)}function v({version:e,threshold:t,pks:r}){if(1!==e||e>255||e<0)throw new Error(d);if(0===t||0===r.length||t>r.length||t>255)throw new Error(g);if(32!==i.PUBLIC_KEY_LENGTH)throw new Error(m);const n=new Uint8Array(l.length+2+32*r.length);n.set(l,0),n.set([e],l.length),n.set([t],l.length+1);for(let e=0;eb(e).publicKey))}))}function S(e){const t=s.concatArrays(h,(0,a.T)(e)),r=i.genericHash(t);return w(new Uint8Array(r))}},8922:(e,t,r)=>{"use strict";r.d(t,{j:()=>o,v:()=>i});var n=r(2486).Buffer;function o(e,t){let r=e.toString(16);r.length!==2*t&&(r=r.padStart(2*t,"0"));const n=new Uint8Array(r.length/2);for(let e=0,t=0;e{"use strict";r.r(t),r.d(t,{ERROR_CONTAINS_EMPTY_STRING:()=>o,encode:()=>i,decode:()=>s});var n=r(5406);const o="The object contains empty or 0 values. First empty or 0 value encountered during encoding: ";function i(e){const t=function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&(!e[t]||0===e[t].length))return{containsEmpty:!0,firstEmptyKey:t};return{containsEmpty:!1,firstEmptyKey:void 0}}(e);if(t.containsEmpty)throw new Error(o+t.firstEmptyKey);return n.encode(e,{sortKeys:!0})}function s(e){return n.decode(e)}},6963:(e,t,r)=>{"use strict";r.d(t,{T:()=>o,u:()=>i});var n=r(2486).Buffer;function o(e){if("bigint"!=typeof e&&!Number.isInteger(e)||e<0||e>BigInt("0xffffffffffffffff"))throw new Error("Input is not a 64-bit unsigned integer");const t=n.allocUnsafe(8);return t.writeBigUInt64BE(BigInt(e)),new Uint8Array(t)}function i(e,t="safe"){if("safe"!==t&&"mixed"!==t&&"bigint"!==t)throw new Error(`Unknown decodingMode option: ${t}`);if(0===e.byteLength||e.byteLength>8)throw new Error(`Data has unacceptable length. Expected length is between 1 and 8, got ${e.byteLength}`);const r=n.allocUnsafe(8-e.byteLength);r.fill(0);const o=n.concat([r,n.from(e)]).readBigUInt64BE(),i=o>Number.MAX_SAFE_INTEGER;if("safe"===t){if(i)throw new Error(`Integer exceeds maximum safe integer: ${o.toString()}. Try decoding with "mixed" or "safe" decodingMode.`);return Number(o)}return"mixed"!==t||i?o:Number(o)}},1063:(e,t,r)=>{"use strict";r.r(t),r.d(t,{TxGroup:()=>u,computeGroupID:()=>l,assignGroupID:()=>h,default:()=>p});var n=r(9417),o=r(9404),i=r(3033),s=r(7116),a=r(413),c=r(2486).Buffer;class u{constructor(e){if(this.name="Transaction group",this.tag=c.from("TG"),e.length>16){const t=`${e.length.toString()} transactions grouped together but max group size is ${16..toString()}`;throw Error(t)}this.txGroupHashes=e}get_obj_for_encoding(){return{txlist:this.txGroupHashes}}static from_obj_for_encoding(e){const t=Object.create(this.prototype);t.name="Transaction group",t.tag=c.from("TG"),t.txGroupHashes=[];for(const r of e.txlist)t.txGroupHashes.push(c.from(r));return t}toByte(){return i.encode(this.get_obj_for_encoding())}}function l(e){const t=[];for(const r of e){const e=n.instantiateTxnIfNeeded(r);t.push(e.rawTxID())}const r=new u(t),i=r.toByte(),s=c.from(a.concatArrays(r.tag,i)),l=o.genericHash(s);return c.from(l)}function h(e,t){const r=l(e),o=[];for(const i of e){const e=n.instantiateTxnIfNeeded(i);t&&s.encodeAddress(e.from.publicKey)!==t||(e.group=r,o.push(e))}return o}const p=u},5583:(e,t,r)=>{"use strict";r.r(t),r.d(t,{checkByteConstBlock:()=>f,checkIntConstBlock:()=>p,checkProgram:()=>h,checkPushByteOp:()=>g,checkPushIntOp:()=>d,langspecEvalMaxVersion:()=>y,langspecLogicSigVersion:()=>m,parseUvarint:()=>i,readProgram:()=>l});const n=JSON.parse('{"z_":6,"BV":5,"AP":[{"Opcode":0,"Name":"err","Cost":1,"Size":1,"Doc":"Fail immediately.","Groups":["Flow Control"]},{"Opcode":1,"Name":"sha256","Args":"B","Returns":"B","Cost":35,"Size":1,"Doc":"SHA256 hash of value A, yields [32]byte","Groups":["Arithmetic"]},{"Opcode":2,"Name":"keccak256","Args":"B","Returns":"B","Cost":130,"Size":1,"Doc":"Keccak256 hash of value A, yields [32]byte","Groups":["Arithmetic"]},{"Opcode":3,"Name":"sha512_256","Args":"B","Returns":"B","Cost":45,"Size":1,"Doc":"SHA512_256 hash of value A, yields [32]byte","Groups":["Arithmetic"]},{"Opcode":4,"Name":"ed25519verify","Args":"BBB","Returns":"U","Cost":1900,"Size":1,"Doc":"for (data A, signature B, pubkey C) verify the signature of (\\"ProgData\\" || program_hash || data) against the pubkey => {0 or 1}","DocExtra":"The 32 byte public key is the last element on the stack, preceded by the 64 byte signature at the second-to-last element on the stack, preceded by the data which was signed at the third-to-last element on the stack.","Groups":["Arithmetic"]},{"Opcode":5,"Name":"ecdsa_verify","Args":"BBBBB","Returns":"U","Cost":1700,"Size":2,"Doc":"for (data A, signature B, C and pubkey D, E) verify the signature of the data against the pubkey => {0 or 1}","DocExtra":"The 32 byte Y-component of a public key is the last element on the stack, preceded by X-component of a pubkey, preceded by S and R components of a signature, preceded by the data that is fifth element on the stack. All values are big-endian encoded. The signed data must be 32 bytes long, and signatures in lower-S form are only accepted.","ImmediateNote":"{uint8 curve index}","Groups":["Arithmetic"]},{"Opcode":6,"Name":"ecdsa_pk_decompress","Args":"B","Returns":"BB","Cost":650,"Size":2,"Doc":"decompress pubkey A into components X, Y","DocExtra":"The 33 byte public key in a compressed form to be decompressed into X and Y (top) components. All values are big-endian encoded.","ImmediateNote":"{uint8 curve index}","Groups":["Arithmetic"]},{"Opcode":7,"Name":"ecdsa_pk_recover","Args":"BUBB","Returns":"BB","Cost":2000,"Size":2,"Doc":"for (data A, recovery id B, signature C, D) recover a public key","DocExtra":"S (top) and R elements of a signature, recovery id and data (bottom) are expected on the stack and used to deriver a public key. All values are big-endian encoded. The signed data must be 32 bytes long.","ImmediateNote":"{uint8 curve index}","Groups":["Arithmetic"]},{"Opcode":8,"Name":"+","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A plus B. Fail on overflow.","DocExtra":"Overflow is an error condition which halts execution and fails the transaction. Full precision is available from `addw`.","Groups":["Arithmetic"]},{"Opcode":9,"Name":"-","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A minus B. Fail if B > A.","Groups":["Arithmetic"]},{"Opcode":10,"Name":"/","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A divided by B (truncated division). Fail if B == 0.","DocExtra":"`divmodw` is available to divide the two-element values produced by `mulw` and `addw`.","Groups":["Arithmetic"]},{"Opcode":11,"Name":"*","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A times B. Fail on overflow.","DocExtra":"Overflow is an error condition which halts execution and fails the transaction. Full precision is available from `mulw`.","Groups":["Arithmetic"]},{"Opcode":12,"Name":"<","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A less than B => {0 or 1}","Groups":["Arithmetic"]},{"Opcode":13,"Name":">","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A greater than B => {0 or 1}","Groups":["Arithmetic"]},{"Opcode":14,"Name":"<=","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A less than or equal to B => {0 or 1}","Groups":["Arithmetic"]},{"Opcode":15,"Name":">=","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A greater than or equal to B => {0 or 1}","Groups":["Arithmetic"]},{"Opcode":16,"Name":"&&","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A is not zero and B is not zero => {0 or 1}","Groups":["Arithmetic"]},{"Opcode":17,"Name":"||","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A is not zero or B is not zero => {0 or 1}","Groups":["Arithmetic"]},{"Opcode":18,"Name":"==","Args":"..","Returns":"U","Cost":1,"Size":1,"Doc":"A is equal to B => {0 or 1}","Groups":["Arithmetic"]},{"Opcode":19,"Name":"!=","Args":"..","Returns":"U","Cost":1,"Size":1,"Doc":"A is not equal to B => {0 or 1}","Groups":["Arithmetic"]},{"Opcode":20,"Name":"!","Args":"U","Returns":"U","Cost":1,"Size":1,"Doc":"A == 0 yields 1; else 0","Groups":["Arithmetic"]},{"Opcode":21,"Name":"len","Args":"B","Returns":"U","Cost":1,"Size":1,"Doc":"yields length of byte value A","Groups":["Arithmetic"]},{"Opcode":22,"Name":"itob","Args":"U","Returns":"B","Cost":1,"Size":1,"Doc":"converts uint64 A to big endian bytes","Groups":["Arithmetic"]},{"Opcode":23,"Name":"btoi","Args":"B","Returns":"U","Cost":1,"Size":1,"Doc":"converts bytes A as big endian to uint64","DocExtra":"`btoi` fails if the input is longer than 8 bytes.","Groups":["Arithmetic"]},{"Opcode":24,"Name":"%","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A modulo B. Fail if B == 0.","Groups":["Arithmetic"]},{"Opcode":25,"Name":"|","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A bitwise-or B","Groups":["Arithmetic"]},{"Opcode":26,"Name":"&","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A bitwise-and B","Groups":["Arithmetic"]},{"Opcode":27,"Name":"^","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A bitwise-xor B","Groups":["Arithmetic"]},{"Opcode":28,"Name":"~","Args":"U","Returns":"U","Cost":1,"Size":1,"Doc":"bitwise invert value A","Groups":["Arithmetic"]},{"Opcode":29,"Name":"mulw","Args":"UU","Returns":"UU","Cost":1,"Size":1,"Doc":"A times B as a 128-bit result in two uint64s. X is the high 64 bits, Y is the low","Groups":["Arithmetic"]},{"Opcode":30,"Name":"addw","Args":"UU","Returns":"UU","Cost":1,"Size":1,"Doc":"A plus B as a 128-bit result. X is the carry-bit, Y is the low-order 64 bits.","Groups":["Arithmetic"]},{"Opcode":31,"Name":"divmodw","Args":"UUUU","Returns":"UUUU","Cost":20,"Size":1,"Doc":"W,X = (A,B / C,D); Y,Z = (A,B modulo C,D)","DocExtra":"The notation J,K indicates that two uint64 values J and K are interpreted as a uint128 value, with J as the high uint64 and K the low.","Groups":["Arithmetic"]},{"Opcode":32,"Name":"intcblock","Cost":1,"Size":0,"Doc":"prepare block of uint64 constants for use by intc","DocExtra":"`intcblock` loads following program bytes into an array of integer constants in the evaluator. These integer constants can be referred to by `intc` and `intc_*` which will push the value onto the stack. Subsequent calls to `intcblock` reset and replace the integer constants available to the script.","ImmediateNote":"{varuint length} [{varuint value}, ...]","Groups":["Loading Values"]},{"Opcode":33,"Name":"intc","Returns":"U","Cost":1,"Size":2,"Doc":"Ith constant from intcblock","ImmediateNote":"{uint8 int constant index}","Groups":["Loading Values"]},{"Opcode":34,"Name":"intc_0","Returns":"U","Cost":1,"Size":1,"Doc":"constant 0 from intcblock","Groups":["Loading Values"]},{"Opcode":35,"Name":"intc_1","Returns":"U","Cost":1,"Size":1,"Doc":"constant 1 from intcblock","Groups":["Loading Values"]},{"Opcode":36,"Name":"intc_2","Returns":"U","Cost":1,"Size":1,"Doc":"constant 2 from intcblock","Groups":["Loading Values"]},{"Opcode":37,"Name":"intc_3","Returns":"U","Cost":1,"Size":1,"Doc":"constant 3 from intcblock","Groups":["Loading Values"]},{"Opcode":38,"Name":"bytecblock","Cost":1,"Size":0,"Doc":"prepare block of byte-array constants for use by bytec","DocExtra":"`bytecblock` loads the following program bytes into an array of byte-array constants in the evaluator. These constants can be referred to by `bytec` and `bytec_*` which will push the value onto the stack. Subsequent calls to `bytecblock` reset and replace the bytes constants available to the script.","ImmediateNote":"{varuint length} [({varuint value length} bytes), ...]","Groups":["Loading Values"]},{"Opcode":39,"Name":"bytec","Returns":"B","Cost":1,"Size":2,"Doc":"Ith constant from bytecblock","ImmediateNote":"{uint8 byte constant index}","Groups":["Loading Values"]},{"Opcode":40,"Name":"bytec_0","Returns":"B","Cost":1,"Size":1,"Doc":"constant 0 from bytecblock","Groups":["Loading Values"]},{"Opcode":41,"Name":"bytec_1","Returns":"B","Cost":1,"Size":1,"Doc":"constant 1 from bytecblock","Groups":["Loading Values"]},{"Opcode":42,"Name":"bytec_2","Returns":"B","Cost":1,"Size":1,"Doc":"constant 2 from bytecblock","Groups":["Loading Values"]},{"Opcode":43,"Name":"bytec_3","Returns":"B","Cost":1,"Size":1,"Doc":"constant 3 from bytecblock","Groups":["Loading Values"]},{"Opcode":44,"Name":"arg","Returns":"B","Cost":1,"Size":2,"Doc":"Nth LogicSig argument","ImmediateNote":"{uint8 arg index N}","Groups":["Loading Values"]},{"Opcode":45,"Name":"arg_0","Returns":"B","Cost":1,"Size":1,"Doc":"LogicSig argument 0","Groups":["Loading Values"]},{"Opcode":46,"Name":"arg_1","Returns":"B","Cost":1,"Size":1,"Doc":"LogicSig argument 1","Groups":["Loading Values"]},{"Opcode":47,"Name":"arg_2","Returns":"B","Cost":1,"Size":1,"Doc":"LogicSig argument 2","Groups":["Loading Values"]},{"Opcode":48,"Name":"arg_3","Returns":"B","Cost":1,"Size":1,"Doc":"LogicSig argument 3","Groups":["Loading Values"]},{"Opcode":49,"Name":"txn","Returns":".","Cost":1,"Size":2,"ArgEnum":["Sender","Fee","FirstValid","FirstValidTime","LastValid","Note","Lease","Receiver","Amount","CloseRemainderTo","VotePK","SelectionPK","VoteFirst","VoteLast","VoteKeyDilution","Type","TypeEnum","XferAsset","AssetAmount","AssetSender","AssetReceiver","AssetCloseTo","GroupIndex","TxID","ApplicationID","OnCompletion","ApplicationArgs","NumAppArgs","Accounts","NumAccounts","ApprovalProgram","ClearStateProgram","RekeyTo","ConfigAsset","ConfigAssetTotal","ConfigAssetDecimals","ConfigAssetDefaultFrozen","ConfigAssetUnitName","ConfigAssetName","ConfigAssetURL","ConfigAssetMetadataHash","ConfigAssetManager","ConfigAssetReserve","ConfigAssetFreeze","ConfigAssetClawback","FreezeAsset","FreezeAssetAccount","FreezeAssetFrozen","Assets","NumAssets","Applications","NumApplications","GlobalNumUint","GlobalNumByteSlice","LocalNumUint","LocalNumByteSlice","ExtraProgramPages","Nonparticipation","Logs","NumLogs","CreatedAssetID","CreatedApplicationID","LastLog","StateProofPK"],"ArgEnumTypes":"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB","Doc":"field F of current transaction","DocExtra":"FirstValidTime causes the program to fail. The field is reserved for future use.","ImmediateNote":"{uint8 transaction field index}","Groups":["Loading Values"]},{"Opcode":50,"Name":"global","Returns":".","Cost":1,"Size":2,"Doc":"global field F","ImmediateNote":"{uint8 global field index}","Groups":["Loading Values"]},{"Opcode":51,"Name":"gtxn","Returns":".","Cost":1,"Size":3,"ArgEnum":["Sender","Fee","FirstValid","FirstValidTime","LastValid","Note","Lease","Receiver","Amount","CloseRemainderTo","VotePK","SelectionPK","VoteFirst","VoteLast","VoteKeyDilution","Type","TypeEnum","XferAsset","AssetAmount","AssetSender","AssetReceiver","AssetCloseTo","GroupIndex","TxID","ApplicationID","OnCompletion","ApplicationArgs","NumAppArgs","Accounts","NumAccounts","ApprovalProgram","ClearStateProgram","RekeyTo","ConfigAsset","ConfigAssetTotal","ConfigAssetDecimals","ConfigAssetDefaultFrozen","ConfigAssetUnitName","ConfigAssetName","ConfigAssetURL","ConfigAssetMetadataHash","ConfigAssetManager","ConfigAssetReserve","ConfigAssetFreeze","ConfigAssetClawback","FreezeAsset","FreezeAssetAccount","FreezeAssetFrozen","Assets","NumAssets","Applications","NumApplications","GlobalNumUint","GlobalNumByteSlice","LocalNumUint","LocalNumByteSlice","ExtraProgramPages","Nonparticipation","Logs","NumLogs","CreatedAssetID","CreatedApplicationID","LastLog","StateProofPK"],"ArgEnumTypes":"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB","Doc":"field F of the Tth transaction in the current group","DocExtra":"for notes on transaction fields available, see `txn`. If this transaction is _i_ in the group, `gtxn i field` is equivalent to `txn field`.","ImmediateNote":"{uint8 transaction group index} {uint8 transaction field index}","Groups":["Loading Values"]},{"Opcode":52,"Name":"load","Returns":".","Cost":1,"Size":2,"Doc":"Ith scratch space value. All scratch spaces are 0 at program start.","ImmediateNote":"{uint8 position in scratch space to load from}","Groups":["Loading Values"]},{"Opcode":53,"Name":"store","Args":".","Cost":1,"Size":2,"Doc":"store A to the Ith scratch space","ImmediateNote":"{uint8 position in scratch space to store to}","Groups":["Loading Values"]},{"Opcode":54,"Name":"txna","Returns":".","Cost":1,"Size":3,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ith value of the array field F of the current transaction","ImmediateNote":"{uint8 transaction field index} {uint8 transaction field array index}","Groups":["Loading Values"]},{"Opcode":55,"Name":"gtxna","Returns":".","Cost":1,"Size":4,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ith value of the array field F from the Tth transaction in the current group","ImmediateNote":"{uint8 transaction group index} {uint8 transaction field index} {uint8 transaction field array index}","Groups":["Loading Values"]},{"Opcode":56,"Name":"gtxns","Args":"U","Returns":".","Cost":1,"Size":2,"ArgEnum":["Sender","Fee","FirstValid","FirstValidTime","LastValid","Note","Lease","Receiver","Amount","CloseRemainderTo","VotePK","SelectionPK","VoteFirst","VoteLast","VoteKeyDilution","Type","TypeEnum","XferAsset","AssetAmount","AssetSender","AssetReceiver","AssetCloseTo","GroupIndex","TxID","ApplicationID","OnCompletion","ApplicationArgs","NumAppArgs","Accounts","NumAccounts","ApprovalProgram","ClearStateProgram","RekeyTo","ConfigAsset","ConfigAssetTotal","ConfigAssetDecimals","ConfigAssetDefaultFrozen","ConfigAssetUnitName","ConfigAssetName","ConfigAssetURL","ConfigAssetMetadataHash","ConfigAssetManager","ConfigAssetReserve","ConfigAssetFreeze","ConfigAssetClawback","FreezeAsset","FreezeAssetAccount","FreezeAssetFrozen","Assets","NumAssets","Applications","NumApplications","GlobalNumUint","GlobalNumByteSlice","LocalNumUint","LocalNumByteSlice","ExtraProgramPages","Nonparticipation","Logs","NumLogs","CreatedAssetID","CreatedApplicationID","LastLog","StateProofPK"],"ArgEnumTypes":"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB","Doc":"field F of the Ath transaction in the current group","DocExtra":"for notes on transaction fields available, see `txn`. If top of stack is _i_, `gtxns field` is equivalent to `gtxn _i_ field`. gtxns exists so that _i_ can be calculated, often based on the index of the current transaction.","ImmediateNote":"{uint8 transaction field index}","Groups":["Loading Values"]},{"Opcode":57,"Name":"gtxnsa","Args":"U","Returns":".","Cost":1,"Size":3,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ith value of the array field F from the Ath transaction in the current group","ImmediateNote":"{uint8 transaction field index} {uint8 transaction field array index}","Groups":["Loading Values"]},{"Opcode":58,"Name":"gload","Returns":".","Cost":1,"Size":3,"Doc":"Ith scratch space value of the Tth transaction in the current group","DocExtra":"`gload` fails unless the requested transaction is an ApplicationCall and T < GroupIndex.","ImmediateNote":"{uint8 transaction group index} {uint8 position in scratch space to load from}","Groups":["Loading Values"]},{"Opcode":59,"Name":"gloads","Args":"U","Returns":".","Cost":1,"Size":2,"Doc":"Ith scratch space value of the Ath transaction in the current group","DocExtra":"`gloads` fails unless the requested transaction is an ApplicationCall and A < GroupIndex.","ImmediateNote":"{uint8 position in scratch space to load from}","Groups":["Loading Values"]},{"Opcode":60,"Name":"gaid","Returns":"U","Cost":1,"Size":2,"Doc":"ID of the asset or application created in the Tth transaction of the current group","DocExtra":"`gaid` fails unless the requested transaction created an asset or application and T < GroupIndex.","ImmediateNote":"{uint8 transaction group index}","Groups":["Loading Values"]},{"Opcode":61,"Name":"gaids","Args":"U","Returns":"U","Cost":1,"Size":1,"Doc":"ID of the asset or application created in the Ath transaction of the current group","DocExtra":"`gaids` fails unless the requested transaction created an asset or application and A < GroupIndex.","Groups":["Loading Values"]},{"Opcode":62,"Name":"loads","Args":"U","Returns":".","Cost":1,"Size":1,"Doc":"Ath scratch space value. All scratch spaces are 0 at program start.","Groups":["Loading Values"]},{"Opcode":63,"Name":"stores","Args":"U.","Cost":1,"Size":1,"Doc":"store B to the Ath scratch space","Groups":["Loading Values"]},{"Opcode":64,"Name":"bnz","Args":"U","Cost":1,"Size":3,"Doc":"branch to TARGET if value A is not zero","DocExtra":"The `bnz` instruction opcode 0x40 is followed by two immediate data bytes which are a high byte first and low byte second which together form a 16 bit offset which the instruction may branch to. For a bnz instruction at `pc`, if the last element of the stack is not zero then branch to instruction at `pc + 3 + N`, else proceed to next instruction at `pc + 3`. Branch targets must be aligned instructions. (e.g. Branching to the second byte of a 2 byte op will be rejected.) Starting at v4, the offset is treated as a signed 16 bit integer allowing for backward branches and looping. In prior version (v1 to v3), branch offsets are limited to forward branches only, 0-0x7fff.\\n\\nAt v2 it became allowed to branch to the end of the program exactly after the last instruction: bnz to byte N (with 0-indexing) was illegal for a TEAL program with N bytes before v2, and is legal after it. This change eliminates the need for a last instruction of no-op as a branch target at the end. (Branching beyond the end--in other words, to a byte larger than N--is still illegal and will cause the program to fail.)","ImmediateNote":"{int16 branch offset, big endian}","Groups":["Flow Control"]},{"Opcode":65,"Name":"bz","Args":"U","Cost":1,"Size":3,"Doc":"branch to TARGET if value A is zero","DocExtra":"See `bnz` for details on how branches work. `bz` inverts the behavior of `bnz`.","ImmediateNote":"{int16 branch offset, big endian}","Groups":["Flow Control"]},{"Opcode":66,"Name":"b","Cost":1,"Size":3,"Doc":"branch unconditionally to TARGET","DocExtra":"See `bnz` for details on how branches work. `b` always jumps to the offset.","ImmediateNote":"{int16 branch offset, big endian}","Groups":["Flow Control"]},{"Opcode":67,"Name":"return","Args":"U","Cost":1,"Size":1,"Doc":"use A as success value; end","Groups":["Flow Control"]},{"Opcode":68,"Name":"assert","Args":"U","Cost":1,"Size":1,"Doc":"immediately fail unless A is a non-zero number","Groups":["Flow Control"]},{"Opcode":72,"Name":"pop","Args":".","Cost":1,"Size":1,"Doc":"discard A","Groups":["Flow Control"]},{"Opcode":73,"Name":"dup","Args":".","Returns":"..","Cost":1,"Size":1,"Doc":"duplicate A","Groups":["Flow Control"]},{"Opcode":74,"Name":"dup2","Args":"..","Returns":"....","Cost":1,"Size":1,"Doc":"duplicate A and B","Groups":["Flow Control"]},{"Opcode":75,"Name":"dig","Args":".","Returns":"..","Cost":1,"Size":2,"Doc":"Nth value from the top of the stack. dig 0 is equivalent to dup","ImmediateNote":"{uint8 depth}","Groups":["Flow Control"]},{"Opcode":76,"Name":"swap","Args":"..","Returns":"..","Cost":1,"Size":1,"Doc":"swaps A and B on stack","Groups":["Flow Control"]},{"Opcode":77,"Name":"select","Args":"..U","Returns":".","Cost":1,"Size":1,"Doc":"selects one of two values based on top-of-stack: B if C != 0, else A","Groups":["Flow Control"]},{"Opcode":78,"Name":"cover","Args":".","Returns":".","Cost":1,"Size":2,"Doc":"remove top of stack, and place it deeper in the stack such that N elements are above it. Fails if stack depth <= N.","ImmediateNote":"{uint8 depth}","Groups":["Flow Control"]},{"Opcode":79,"Name":"uncover","Args":".","Returns":".","Cost":1,"Size":2,"Doc":"remove the value at depth N in the stack and shift above items down so the Nth deep value is on top of the stack. Fails if stack depth <= N.","ImmediateNote":"{uint8 depth}","Groups":["Flow Control"]},{"Opcode":80,"Name":"concat","Args":"BB","Returns":"B","Cost":1,"Size":1,"Doc":"join A and B","DocExtra":"`concat` fails if the result would be greater than 4096 bytes.","Groups":["Arithmetic"]},{"Opcode":81,"Name":"substring","Args":"B","Returns":"B","Cost":1,"Size":3,"Doc":"A range of bytes from A starting at S up to but not including E. If E < S, or either is larger than the array length, the program fails","ImmediateNote":"{uint8 start position} {uint8 end position}","Groups":["Byte Array Manipulation"]},{"Opcode":82,"Name":"substring3","Args":"BUU","Returns":"B","Cost":1,"Size":1,"Doc":"A range of bytes from A starting at B up to but not including C. If C < B, or either is larger than the array length, the program fails","Groups":["Byte Array Manipulation"]},{"Opcode":83,"Name":"getbit","Args":".U","Returns":"U","Cost":1,"Size":1,"Doc":"Bth bit of (byte-array or integer) A.","DocExtra":"see explanation of bit ordering in setbit","Groups":["Arithmetic"]},{"Opcode":84,"Name":"setbit","Args":".UU","Returns":".","Cost":1,"Size":1,"Doc":"Copy of (byte-array or integer) A, with the Bth bit set to (0 or 1) C","DocExtra":"When A is a uint64, index 0 is the least significant bit. Setting bit 3 to 1 on the integer 0 yields 8, or 2^3. When A is a byte array, index 0 is the leftmost bit of the leftmost byte. Setting bits 0 through 11 to 1 in a 4-byte-array of 0s yields the byte array 0xfff00000. Setting bit 3 to 1 on the 1-byte-array 0x00 yields the byte array 0x10.","Groups":["Arithmetic"]},{"Opcode":85,"Name":"getbyte","Args":"BU","Returns":"U","Cost":1,"Size":1,"Doc":"Bth byte of A, as an integer","Groups":["Arithmetic"]},{"Opcode":86,"Name":"setbyte","Args":"BUU","Returns":"B","Cost":1,"Size":1,"Doc":"Copy of A with the Bth byte set to small integer (between 0..255) C","Groups":["Arithmetic"]},{"Opcode":87,"Name":"extract","Args":"B","Returns":"B","Cost":1,"Size":3,"Doc":"A range of bytes from A starting at S up to but not including S+L. If L is 0, then extract to the end of the string. If S or S+L is larger than the array length, the program fails","ImmediateNote":"{uint8 start position} {uint8 length}","Groups":["Byte Array Manipulation"]},{"Opcode":88,"Name":"extract3","Args":"BUU","Returns":"B","Cost":1,"Size":1,"Doc":"A range of bytes from A starting at B up to but not including B+C. If B+C is larger than the array length, the program fails","Groups":["Byte Array Manipulation"]},{"Opcode":89,"Name":"extract_uint16","Args":"BU","Returns":"U","Cost":1,"Size":1,"Doc":"A uint16 formed from a range of big-endian bytes from A starting at B up to but not including B+2. If B+2 is larger than the array length, the program fails","Groups":["Byte Array Manipulation"]},{"Opcode":90,"Name":"extract_uint32","Args":"BU","Returns":"U","Cost":1,"Size":1,"Doc":"A uint32 formed from a range of big-endian bytes from A starting at B up to but not including B+4. If B+4 is larger than the array length, the program fails","Groups":["Byte Array Manipulation"]},{"Opcode":91,"Name":"extract_uint64","Args":"BU","Returns":"U","Cost":1,"Size":1,"Doc":"A uint64 formed from a range of big-endian bytes from A starting at B up to but not including B+8. If B+8 is larger than the array length, the program fails","Groups":["Byte Array Manipulation"]},{"Opcode":96,"Name":"balance","Args":".","Returns":"U","Cost":1,"Size":1,"Doc":"get balance for account A, in microalgos. The balance is observed after the effects of previous transactions in the group, and after the fee for the current transaction is deducted.","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset). Return: value.","Groups":["State Access"]},{"Opcode":97,"Name":"app_opted_in","Args":".U","Returns":"U","Cost":1,"Size":1,"Doc":"1 if account A is opted in to application B, else 0","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset). Return: 1 if opted in and 0 otherwise.","Groups":["State Access"]},{"Opcode":98,"Name":"app_local_get","Args":".B","Returns":".","Cost":1,"Size":1,"Doc":"local state of the key B in the current application in account A","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), state key. Return: value. The value is zero (of type uint64) if the key does not exist.","Groups":["State Access"]},{"Opcode":99,"Name":"app_local_get_ex","Args":".UB","Returns":".U","Cost":1,"Size":1,"Doc":"X is the local state of application B, key C in account A. Y is 1 if key existed, else 0","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset), state key. Return: did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.","Groups":["State Access"]},{"Opcode":100,"Name":"app_global_get","Args":"B","Returns":".","Cost":1,"Size":1,"Doc":"global state of the key A in the current application","DocExtra":"params: state key. Return: value. The value is zero (of type uint64) if the key does not exist.","Groups":["State Access"]},{"Opcode":101,"Name":"app_global_get_ex","Args":"UB","Returns":".U","Cost":1,"Size":1,"Doc":"X is the global state of application A, key B. Y is 1 if key existed, else 0","DocExtra":"params: Txn.ForeignApps offset (or, since v4, an _available_ application id), state key. Return: did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.","Groups":["State Access"]},{"Opcode":102,"Name":"app_local_put","Args":".B.","Cost":1,"Size":1,"Doc":"write C to key B in account A\'s local state of the current application","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), state key, value.","Groups":["State Access"]},{"Opcode":103,"Name":"app_global_put","Args":"B.","Cost":1,"Size":1,"Doc":"write B to key A in the global state of the current application","Groups":["State Access"]},{"Opcode":104,"Name":"app_local_del","Args":".B","Cost":1,"Size":1,"Doc":"delete key B from account A\'s local state of the current application","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), state key.\\n\\nDeleting a key which is already absent has no effect on the application local state. (In particular, it does _not_ cause the program to fail.)","Groups":["State Access"]},{"Opcode":105,"Name":"app_global_del","Args":"B","Cost":1,"Size":1,"Doc":"delete key A from the global state of the current application","DocExtra":"params: state key.\\n\\nDeleting a key which is already absent has no effect on the application global state. (In particular, it does _not_ cause the program to fail.)","Groups":["State Access"]},{"Opcode":112,"Name":"asset_holding_get","Args":".U","Returns":".U","Cost":1,"Size":2,"ArgEnum":["AssetBalance","AssetFrozen"],"ArgEnumTypes":"UU","Doc":"X is field F from account A\'s holding of asset B. Y is 1 if A is opted into B, else 0","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ address), asset id (or, since v4, a Txn.ForeignAssets offset). Return: did_exist flag (1 if the asset existed and 0 otherwise), value.","ImmediateNote":"{uint8 asset holding field index}","Groups":["State Access"]},{"Opcode":113,"Name":"asset_params_get","Args":"U","Returns":".U","Cost":1,"Size":2,"ArgEnum":["AssetTotal","AssetDecimals","AssetDefaultFrozen","AssetUnitName","AssetName","AssetURL","AssetMetadataHash","AssetManager","AssetReserve","AssetFreeze","AssetClawback","AssetCreator"],"ArgEnumTypes":"UUUBBBBBBBBB","Doc":"X is field F from asset A. Y is 1 if A exists, else 0","DocExtra":"params: Txn.ForeignAssets offset (or, since v4, an _available_ asset id. Return: did_exist flag (1 if the asset existed and 0 otherwise), value.","ImmediateNote":"{uint8 asset params field index}","Groups":["State Access"]},{"Opcode":114,"Name":"app_params_get","Args":"U","Returns":".U","Cost":1,"Size":2,"ArgEnum":["AppApprovalProgram","AppClearStateProgram","AppGlobalNumUint","AppGlobalNumByteSlice","AppLocalNumUint","AppLocalNumByteSlice","AppExtraProgramPages","AppCreator","AppAddress"],"ArgEnumTypes":"BBUUUUUBB","Doc":"X is field F from app A. Y is 1 if A exists, else 0","DocExtra":"params: Txn.ForeignApps offset or an _available_ app id. Return: did_exist flag (1 if the application existed and 0 otherwise), value.","ImmediateNote":"{uint8 app params field index}","Groups":["State Access"]},{"Opcode":115,"Name":"acct_params_get","Args":".","Returns":".U","Cost":1,"Size":2,"Doc":"X is field F from account A. Y is 1 if A owns positive algos, else 0","ImmediateNote":"{uint8 account params field index}","Groups":["State Access"]},{"Opcode":120,"Name":"min_balance","Args":".","Returns":"U","Cost":1,"Size":1,"Doc":"get minimum required balance for account A, in microalgos. Required balance is affected by [ASA](https://developer.algorand.org/docs/features/asa/#assets-overview) and [App](https://developer.algorand.org/docs/features/asc1/stateful/#minimum-balance-requirement-for-a-smart-contract) usage. When creating or opting into an app, the minimum balance grows before the app code runs, therefore the increase is visible there. When deleting or closing out, the minimum balance decreases after the app executes.","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset). Return: value.","Groups":["State Access"]},{"Opcode":128,"Name":"pushbytes","Returns":"B","Cost":1,"Size":0,"Doc":"immediate BYTES","DocExtra":"pushbytes args are not added to the bytecblock during assembly processes","ImmediateNote":"{varuint length} {bytes}","Groups":["Loading Values"]},{"Opcode":129,"Name":"pushint","Returns":"U","Cost":1,"Size":0,"Doc":"immediate UINT","DocExtra":"pushint args are not added to the intcblock during assembly processes","ImmediateNote":"{varuint int}","Groups":["Loading Values"]},{"Opcode":136,"Name":"callsub","Cost":1,"Size":3,"Doc":"branch unconditionally to TARGET, saving the next instruction on the call stack","DocExtra":"The call stack is separate from the data stack. Only `callsub` and `retsub` manipulate it.","ImmediateNote":"{int16 branch offset, big endian}","Groups":["Flow Control"]},{"Opcode":137,"Name":"retsub","Cost":1,"Size":1,"Doc":"pop the top instruction from the call stack and branch to it","DocExtra":"The call stack is separate from the data stack. Only `callsub` and `retsub` manipulate it.","Groups":["Flow Control"]},{"Opcode":144,"Name":"shl","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A times 2^B, modulo 2^64","Groups":["Arithmetic"]},{"Opcode":145,"Name":"shr","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A divided by 2^B","Groups":["Arithmetic"]},{"Opcode":146,"Name":"sqrt","Args":"U","Returns":"U","Cost":4,"Size":1,"Doc":"The largest integer I such that I^2 <= A","Groups":["Arithmetic"]},{"Opcode":147,"Name":"bitlen","Args":".","Returns":"U","Cost":1,"Size":1,"Doc":"The highest set bit in A. If A is a byte-array, it is interpreted as a big-endian unsigned integer. bitlen of 0 is 0, bitlen of 8 is 4","DocExtra":"bitlen interprets arrays as big-endian integers, unlike setbit/getbit","Groups":["Arithmetic"]},{"Opcode":148,"Name":"exp","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A raised to the Bth power. Fail if A == B == 0 and on overflow","Groups":["Arithmetic"]},{"Opcode":149,"Name":"expw","Args":"UU","Returns":"UU","Cost":10,"Size":1,"Doc":"A raised to the Bth power as a 128-bit result in two uint64s. X is the high 64 bits, Y is the low. Fail if A == B == 0 or if the results exceeds 2^128-1","Groups":["Arithmetic"]},{"Opcode":150,"Name":"bsqrt","Args":"B","Returns":"B","Cost":40,"Size":1,"Doc":"The largest integer I such that I^2 <= A. A and I are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":151,"Name":"divw","Args":"UUU","Returns":"U","Cost":1,"Size":1,"Doc":"A,B / C. Fail if C == 0 or if result overflows.","DocExtra":"The notation A,B indicates that A and B are interpreted as a uint128 value, with A as the high uint64 and B the low.","Groups":["Arithmetic"]},{"Opcode":160,"Name":"b+","Args":"BB","Returns":"B","Cost":10,"Size":1,"Doc":"A plus B. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":161,"Name":"b-","Args":"BB","Returns":"B","Cost":10,"Size":1,"Doc":"A minus B. A and B are interpreted as big-endian unsigned integers. Fail on underflow.","Groups":["Byte Array Arithmetic"]},{"Opcode":162,"Name":"b/","Args":"BB","Returns":"B","Cost":20,"Size":1,"Doc":"A divided by B (truncated division). A and B are interpreted as big-endian unsigned integers. Fail if B is zero.","Groups":["Byte Array Arithmetic"]},{"Opcode":163,"Name":"b*","Args":"BB","Returns":"B","Cost":20,"Size":1,"Doc":"A times B. A and B are interpreted as big-endian unsigned integers.","Groups":["Byte Array Arithmetic"]},{"Opcode":164,"Name":"b<","Args":"BB","Returns":"U","Cost":1,"Size":1,"Doc":"1 if A is less than B, else 0. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":165,"Name":"b>","Args":"BB","Returns":"U","Cost":1,"Size":1,"Doc":"1 if A is greater than B, else 0. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":166,"Name":"b<=","Args":"BB","Returns":"U","Cost":1,"Size":1,"Doc":"1 if A is less than or equal to B, else 0. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":167,"Name":"b>=","Args":"BB","Returns":"U","Cost":1,"Size":1,"Doc":"1 if A is greater than or equal to B, else 0. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":168,"Name":"b==","Args":"BB","Returns":"U","Cost":1,"Size":1,"Doc":"1 if A is equal to B, else 0. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":169,"Name":"b!=","Args":"BB","Returns":"U","Cost":1,"Size":1,"Doc":"0 if A is equal to B, else 1. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":170,"Name":"b%","Args":"BB","Returns":"B","Cost":20,"Size":1,"Doc":"A modulo B. A and B are interpreted as big-endian unsigned integers. Fail if B is zero.","Groups":["Byte Array Arithmetic"]},{"Opcode":171,"Name":"b|","Args":"BB","Returns":"B","Cost":6,"Size":1,"Doc":"A bitwise-or B. A and B are zero-left extended to the greater of their lengths","Groups":["Byte Array Logic"]},{"Opcode":172,"Name":"b&","Args":"BB","Returns":"B","Cost":6,"Size":1,"Doc":"A bitwise-and B. A and B are zero-left extended to the greater of their lengths","Groups":["Byte Array Logic"]},{"Opcode":173,"Name":"b^","Args":"BB","Returns":"B","Cost":6,"Size":1,"Doc":"A bitwise-xor B. A and B are zero-left extended to the greater of their lengths","Groups":["Byte Array Logic"]},{"Opcode":174,"Name":"b~","Args":"B","Returns":"B","Cost":4,"Size":1,"Doc":"A with all bits inverted","Groups":["Byte Array Logic"]},{"Opcode":175,"Name":"bzero","Args":"U","Returns":"B","Cost":1,"Size":1,"Doc":"zero filled byte-array of length A","Groups":["Loading Values"]},{"Opcode":176,"Name":"log","Args":"B","Cost":1,"Size":1,"Doc":"write A to log state of the current application","DocExtra":"`log` fails if called more than MaxLogCalls times in a program, or if the sum of logged bytes exceeds 1024 bytes.","Groups":["State Access"]},{"Opcode":177,"Name":"itxn_begin","Cost":1,"Size":1,"Doc":"begin preparation of a new inner transaction in a new transaction group","DocExtra":"`itxn_begin` initializes Sender to the application address; Fee to the minimum allowable, taking into account MinTxnFee and credit from overpaying in earlier transactions; FirstValid/LastValid to the values in the invoking transaction, and all other fields to zero or empty values.","Groups":["Inner Transactions"]},{"Opcode":178,"Name":"itxn_field","Args":".","Cost":1,"Size":2,"ArgEnum":["Sender","Fee","FirstValid","FirstValidTime","LastValid","Note","Lease","Receiver","Amount","CloseRemainderTo","VotePK","SelectionPK","VoteFirst","VoteLast","VoteKeyDilution","Type","TypeEnum","XferAsset","AssetAmount","AssetSender","AssetReceiver","AssetCloseTo","GroupIndex","TxID","ApplicationID","OnCompletion","ApplicationArgs","NumAppArgs","Accounts","NumAccounts","ApprovalProgram","ClearStateProgram","RekeyTo","ConfigAsset","ConfigAssetTotal","ConfigAssetDecimals","ConfigAssetDefaultFrozen","ConfigAssetUnitName","ConfigAssetName","ConfigAssetURL","ConfigAssetMetadataHash","ConfigAssetManager","ConfigAssetReserve","ConfigAssetFreeze","ConfigAssetClawback","FreezeAsset","FreezeAssetAccount","FreezeAssetFrozen","Assets","NumAssets","Applications","NumApplications","GlobalNumUint","GlobalNumByteSlice","LocalNumUint","LocalNumByteSlice","ExtraProgramPages","Nonparticipation","Logs","NumLogs","CreatedAssetID","CreatedApplicationID","LastLog","StateProofPK"],"ArgEnumTypes":"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB","Doc":"set field F of the current inner transaction to A","DocExtra":"`itxn_field` fails if A is of the wrong type for F, including a byte array of the wrong size for use as an address when F is an address field. `itxn_field` also fails if A is an account, asset, or app that is not _available_, or an attempt is made extend an array field beyond the limit imposed by consensus parameters. (Addresses set into asset params of acfg transactions need not be _available_.)","ImmediateNote":"{uint8 transaction field index}","Groups":["Inner Transactions"]},{"Opcode":179,"Name":"itxn_submit","Cost":1,"Size":1,"Doc":"execute the current inner transaction group. Fail if executing this group would exceed the inner transaction limit, or if any transaction in the group fails.","DocExtra":"`itxn_submit` resets the current transaction so that it can not be resubmitted. A new `itxn_begin` is required to prepare another inner transaction.","Groups":["Inner Transactions"]},{"Opcode":180,"Name":"itxn","Returns":".","Cost":1,"Size":2,"ArgEnum":["Sender","Fee","FirstValid","FirstValidTime","LastValid","Note","Lease","Receiver","Amount","CloseRemainderTo","VotePK","SelectionPK","VoteFirst","VoteLast","VoteKeyDilution","Type","TypeEnum","XferAsset","AssetAmount","AssetSender","AssetReceiver","AssetCloseTo","GroupIndex","TxID","ApplicationID","OnCompletion","ApplicationArgs","NumAppArgs","Accounts","NumAccounts","ApprovalProgram","ClearStateProgram","RekeyTo","ConfigAsset","ConfigAssetTotal","ConfigAssetDecimals","ConfigAssetDefaultFrozen","ConfigAssetUnitName","ConfigAssetName","ConfigAssetURL","ConfigAssetMetadataHash","ConfigAssetManager","ConfigAssetReserve","ConfigAssetFreeze","ConfigAssetClawback","FreezeAsset","FreezeAssetAccount","FreezeAssetFrozen","Assets","NumAssets","Applications","NumApplications","GlobalNumUint","GlobalNumByteSlice","LocalNumUint","LocalNumByteSlice","ExtraProgramPages","Nonparticipation","Logs","NumLogs","CreatedAssetID","CreatedApplicationID","LastLog","StateProofPK"],"ArgEnumTypes":"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB","Doc":"field F of the last inner transaction","ImmediateNote":"{uint8 transaction field index}","Groups":["Inner Transactions"]},{"Opcode":181,"Name":"itxna","Returns":".","Cost":1,"Size":3,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ith value of the array field F of the last inner transaction","ImmediateNote":"{uint8 transaction field index} {uint8 transaction field array index}","Groups":["Inner Transactions"]},{"Opcode":182,"Name":"itxn_next","Cost":1,"Size":1,"Doc":"begin preparation of a new inner transaction in the same transaction group","DocExtra":"`itxn_next` initializes the transaction exactly as `itxn_begin` does","Groups":["Inner Transactions"]},{"Opcode":183,"Name":"gitxn","Returns":".","Cost":1,"Size":3,"ArgEnum":["Sender","Fee","FirstValid","FirstValidTime","LastValid","Note","Lease","Receiver","Amount","CloseRemainderTo","VotePK","SelectionPK","VoteFirst","VoteLast","VoteKeyDilution","Type","TypeEnum","XferAsset","AssetAmount","AssetSender","AssetReceiver","AssetCloseTo","GroupIndex","TxID","ApplicationID","OnCompletion","ApplicationArgs","NumAppArgs","Accounts","NumAccounts","ApprovalProgram","ClearStateProgram","RekeyTo","ConfigAsset","ConfigAssetTotal","ConfigAssetDecimals","ConfigAssetDefaultFrozen","ConfigAssetUnitName","ConfigAssetName","ConfigAssetURL","ConfigAssetMetadataHash","ConfigAssetManager","ConfigAssetReserve","ConfigAssetFreeze","ConfigAssetClawback","FreezeAsset","FreezeAssetAccount","FreezeAssetFrozen","Assets","NumAssets","Applications","NumApplications","GlobalNumUint","GlobalNumByteSlice","LocalNumUint","LocalNumByteSlice","ExtraProgramPages","Nonparticipation","Logs","NumLogs","CreatedAssetID","CreatedApplicationID","LastLog","StateProofPK"],"ArgEnumTypes":"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB","Doc":"field F of the Tth transaction in the last inner group submitted","ImmediateNote":"{uint8 transaction group index} {uint8 transaction field index}","Groups":["Inner Transactions"]},{"Opcode":184,"Name":"gitxna","Returns":".","Cost":1,"Size":4,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ith value of the array field F from the Tth transaction in the last inner group submitted","ImmediateNote":"{uint8 transaction group index} {uint8 transaction field index} {uint8 transaction field array index}","Groups":["Inner Transactions"]},{"Opcode":192,"Name":"txnas","Args":"U","Returns":".","Cost":1,"Size":2,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ath value of the array field F of the current transaction","ImmediateNote":"{uint8 transaction field index}","Groups":["Loading Values"]},{"Opcode":193,"Name":"gtxnas","Args":"U","Returns":".","Cost":1,"Size":3,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ath value of the array field F from the Tth transaction in the current group","ImmediateNote":"{uint8 transaction group index} {uint8 transaction field index}","Groups":["Loading Values"]},{"Opcode":194,"Name":"gtxnsas","Args":"UU","Returns":".","Cost":1,"Size":2,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Bth value of the array field F from the Ath transaction in the current group","ImmediateNote":"{uint8 transaction field index}","Groups":["Loading Values"]},{"Opcode":195,"Name":"args","Args":"U","Returns":"B","Cost":1,"Size":1,"Doc":"Ath LogicSig argument","Groups":["Loading Values"]},{"Opcode":196,"Name":"gloadss","Args":"UU","Returns":".","Cost":1,"Size":1,"Doc":"Bth scratch space value of the Ath transaction in the current group","Groups":["Loading Values"]},{"Opcode":197,"Name":"itxnas","Args":"U","Returns":".","Cost":1,"Size":2,"Doc":"Ath value of the array field F of the last inner transaction","ImmediateNote":"{uint8 transaction field index}","Groups":["Inner Transactions"]},{"Opcode":198,"Name":"gitxnas","Args":"U","Returns":".","Cost":1,"Size":3,"Doc":"Ath value of the array field F from the Tth transaction in the last inner group submitted","ImmediateNote":"{uint8 transaction group index} {uint8 transaction field index}","Groups":["Inner Transactions"]}]}');let o;function i(e){let t=0,r=0;for(let n=0;n9||9===n&&o>1?[0,-(n+1)]:[t|o<=e.length)throw new Error("intcblock ran past end of program");let o;if([o,s]=i(e.slice(t+r)),s<=0)throw new Error(`could not decode int const[${n}] block size at pc=${t+r}`);a.push(o),r+=s}return[r,a]}function a(e,t){let r=1;const n=i(e.slice(t+r)),o=n[0];let s=n[1];if(s<=0)throw new Error(`could not decode []byte const block size at pc=${t+r}`);const a=[];r+=s;for(let n=0;n=e.length)throw new Error("bytecblock ran past end of program");let o;if([o,s]=i(e.slice(t+r)),s<=0)throw new Error(`could not decode []byte] const[${n}] block size at pc=${t+r}`);if(r+=s,t+r+o>e.length)throw new Error("bytecblock ran past end of program");const c=e.slice(t+r,t+r+o);a.push(c),r+=o}return[r,a]}function c(e,t){let r=1;const[n,o]=i(e.slice(t+r));if(o<=0)throw new Error(`could not decode push int const at pc=${t+r}`);return r+=o,[r,n]}function u(e,t){let r=1;const[n,o]=i(e.slice(t+r));if(o<=0)throw new Error(`could not decode push []byte const size at pc=${t+r}`);if(r+=o,t+r+n>e.length)throw new Error("pushbytes ran past end of program");const s=e.slice(t+r,t+r+n);return r+=n,[r,s]}function l(e,t){if(!e)throw new Error("empty program");if(void 0===t&&(t=[]),!Array.isArray(t))throw new Error("invalid arguments");const[r,l]=i(e);if(l<=0)throw new Error("version parsing error");if(r>n.z_)throw new Error("unsupported version");let h=0,{length:p}=e;for(const e of t)p+=e.length;if(p>1e3)throw new Error("program too long");if(!o){o={};for(const e of n.AP)o[e.Opcode]=e}let f=l,d=[],g=[];for(;f2e4)throw new Error("program too costly for Teal version < 4. consider using v4.");return[d,g,!0]}function h(e,t){const[,,r]=l(e,t);return r}function p(e,t){const[r]=s(e,t);return r}function f(e,t){const[r]=a(e,t);return r}function d(e,t){const[r]=c(e,t);return r}function g(e,t){const[r]=u(e,t);return r}const y=n.z_,m=n.BV},8800:(e,t,r)=>{"use strict";r.r(t),r.d(t,{LogicSig:()=>h,LogicSigAccount:()=>p,makeLogicSig:()=>f,signLogicSigTransactionObject:()=>d,signLogicSigTransaction:()=>g,logicSigFromByte:()=>y,tealSign:()=>b,tealSignFromProgram:()=>A});var n=r(9404),o=r(7116),i=r(3033),s=r(5583),a=r(4158),c=r(413),u=r(9417),l=r(2486).Buffer;class h{constructor(e,t){if(this.tag=l.from("Program"),t&&(!Array.isArray(t)||!t.every((e=>e.constructor===Uint8Array||l.isBuffer(e)))))throw new TypeError("Invalid arguments");let r;if(null!=t&&(r=t.map((e=>new Uint8Array(e)))),!s.checkProgram(e,r))throw new Error("Invalid program");this.logic=e,this.args=r,this.sig=void 0,this.msig=void 0}get_obj_for_encoding(){const e={l:this.logic};return this.args&&(e.arg=this.args),this.sig?e.sig=this.sig:this.msig&&(e.msig=this.msig),e}static from_obj_for_encoding(e){const t=new h(e.l,e.arg);return t.sig=e.sig,t.msig=e.msig,t}verify(e){if(this.sig&&this.msig)return!1;try{s.checkProgram(this.logic,this.args)}catch(e){return!1}const t=c.concatArrays(this.tag,this.logic);if(!this.sig&&!this.msig){const r=n.genericHash(t);return c.arrayEqual(r,e)}return this.sig?n.verify(t,this.sig,e):(0,a.F2)(t,this.msig,e)}address(){const e=c.concatArrays(this.tag,this.logic),t=n.genericHash(e);return o.encodeAddress(new Uint8Array(t))}sign(e,t){if(null==t)this.sig=this.signProgram(e);else{const r=t.addrs.map((e=>({pk:o.decodeAddress(e).publicKey})));this.msig={v:t.version,thr:t.threshold,subsig:r};const[n,i]=this.singleSignMultisig(e,this.msig);this.msig.subsig[i].s=n}}appendToMultisig(e){if(void 0===this.msig)throw new Error("no multisig present");const[t,r]=this.singleSignMultisig(e,this.msig);this.msig.subsig[r].s=t}signProgram(e){const t=c.concatArrays(this.tag,this.logic);return n.sign(t,e)}singleSignMultisig(e,t){let r=-1;const o=n.keyPairFromSecretKey(e).publicKey;for(let e=0;ee.pk))};return o.encodeAddress(o.fromMultisigPreImg(e))}return this.lsig.address()}signMultisig(e,t){this.lsig.sign(t,e)}appendToMultisig(e){this.lsig.appendToMultisig(e)}sign(e){this.lsig.sign(e),this.sigkey=n.keyPairFromSecretKey(e).publicKey}}function f(e,t){return new h(e,t)}function d(e,t){let r,s;if(t instanceof p)r=t.lsig,s=o.decodeAddress(t.address()).publicKey;else if(r=t,r.sig)s=e.from.publicKey;else if(r.msig){const e={version:r.msig.v,threshold:r.msig.thr,pks:r.msig.subsig.map((e=>e.pk))};s=o.fromMultisigPreImg(e)}else s=o.decodeAddress(r.address()).publicKey;return function(e,t,r){if(!t.verify(r))throw new Error("Logic signature verification failed. Ensure the program and signature are valid.");const o={lsig:t.get_obj_for_encoding(),txn:e.get_obj_for_encoding()};return n.bytesEqual(r,e.from.publicKey)||(o.sgnr=l.from(r)),{txID:e.txID().toString(),blob:i.encode(o)}}(e,r,s)}function g(e,t){return d(u.instantiateTxnIfNeeded(e),t)}function y(e){return h.fromByte(e)}const m=l.from("ProgData");function b(e,t,r){const i=c.concatArrays(o.decodeAddress(r).publicKey,t),s=l.from(c.concatArrays(m,i));return n.sign(s,e)}function A(e,t,r){return b(e,t,new h(r).address())}},6608:(e,t,r)=>{"use strict";r.r(t),r.d(t,{MULTISIG_BAD_SENDER_ERROR_MSG:()=>N,signTransaction:()=>P,signBid:()=>L,signBytes:()=>F,verifyBytes:()=>z,encodeObj:()=>j,decodeObj:()=>M,ERROR_MULTISIG_BAD_SENDER:()=>H,ERROR_INVALID_MICROALGOS:()=>G,Algodv2:()=>d.Z,Kmd:()=>g.Z,IntDecoding:()=>y.Z,Indexer:()=>m.Z,waitForConfirmation:()=>b.K,isValidAddress:()=>o.isValidAddress,encodeAddress:()=>o.encodeAddress,decodeAddress:()=>o.decodeAddress,getApplicationAddress:()=>o.getApplicationAddress,bytesToBigInt:()=>A.v,bigIntToBytes:()=>A.j,encodeUint64:()=>w.T,decodeUint64:()=>w.u,generateAccount:()=>v.Z,modelsv2:()=>x,mnemonicToMasterDerivationKey:()=>S.OF,masterDerivationKeyToMnemonic:()=>S.vC,secretKeyToMnemonic:()=>S.QX,mnemonicToSecretKey:()=>S.Ch,seedFromMnemonic:()=>S.mE,mnemonicFromSeed:()=>S.w3,microalgosToAlgos:()=>l._,algosToMicroalgos:()=>l.HN,INVALID_MICROALGOS_ERROR_MSG:()=>l.rD,computeGroupID:()=>E.computeGroupID,assignGroupID:()=>E.assignGroupID,LogicSigAccount:()=>T.LogicSigAccount,makeLogicSig:()=>T.makeLogicSig,signLogicSigTransaction:()=>T.signLogicSigTransaction,signLogicSigTransactionObject:()=>T.signLogicSigTransactionObject,logicSigFromByte:()=>T.logicSigFromByte,tealSign:()=>T.tealSign,tealSignFromProgram:()=>T.tealSignFromProgram,signMultisigTransaction:()=>_.PU,mergeMultisigTransactions:()=>_.J6,appendSignMultisigTransaction:()=>_.PO,multisigAddress:()=>_.vH,LogicTemplates:()=>K,createDryrun:()=>B.P,OnApplicationComplete:()=>U.OnApplicationComplete,makeApplicationCallTxnFromObject:()=>U.makeApplicationCallTxnFromObject,makeApplicationClearStateTxn:()=>U.makeApplicationClearStateTxn,makeApplicationClearStateTxnFromObject:()=>U.makeApplicationClearStateTxnFromObject,makeApplicationCloseOutTxn:()=>U.makeApplicationCloseOutTxn,makeApplicationCloseOutTxnFromObject:()=>U.makeApplicationCloseOutTxnFromObject,makeApplicationCreateTxn:()=>U.makeApplicationCreateTxn,makeApplicationCreateTxnFromObject:()=>U.makeApplicationCreateTxnFromObject,makeApplicationDeleteTxn:()=>U.makeApplicationDeleteTxn,makeApplicationDeleteTxnFromObject:()=>U.makeApplicationDeleteTxnFromObject,makeApplicationNoOpTxn:()=>U.makeApplicationNoOpTxn,makeApplicationNoOpTxnFromObject:()=>U.makeApplicationNoOpTxnFromObject,makeApplicationOptInTxn:()=>U.makeApplicationOptInTxn,makeApplicationOptInTxnFromObject:()=>U.makeApplicationOptInTxnFromObject,makeApplicationUpdateTxn:()=>U.makeApplicationUpdateTxn,makeApplicationUpdateTxnFromObject:()=>U.makeApplicationUpdateTxnFromObject,makeAssetConfigTxn:()=>U.makeAssetConfigTxn,makeAssetConfigTxnWithSuggestedParams:()=>U.makeAssetConfigTxnWithSuggestedParams,makeAssetConfigTxnWithSuggestedParamsFromObject:()=>U.makeAssetConfigTxnWithSuggestedParamsFromObject,makeAssetCreateTxn:()=>U.makeAssetCreateTxn,makeAssetCreateTxnWithSuggestedParams:()=>U.makeAssetCreateTxnWithSuggestedParams,makeAssetCreateTxnWithSuggestedParamsFromObject:()=>U.makeAssetCreateTxnWithSuggestedParamsFromObject,makeAssetDestroyTxn:()=>U.makeAssetDestroyTxn,makeAssetDestroyTxnWithSuggestedParams:()=>U.makeAssetDestroyTxnWithSuggestedParams,makeAssetDestroyTxnWithSuggestedParamsFromObject:()=>U.makeAssetDestroyTxnWithSuggestedParamsFromObject,makeAssetFreezeTxn:()=>U.makeAssetFreezeTxn,makeAssetFreezeTxnWithSuggestedParams:()=>U.makeAssetFreezeTxnWithSuggestedParams,makeAssetFreezeTxnWithSuggestedParamsFromObject:()=>U.makeAssetFreezeTxnWithSuggestedParamsFromObject,makeAssetTransferTxn:()=>U.makeAssetTransferTxn,makeAssetTransferTxnWithSuggestedParams:()=>U.makeAssetTransferTxnWithSuggestedParams,makeAssetTransferTxnWithSuggestedParamsFromObject:()=>U.makeAssetTransferTxnWithSuggestedParamsFromObject,makeKeyRegistrationTxn:()=>U.makeKeyRegistrationTxn,makeKeyRegistrationTxnWithSuggestedParams:()=>U.makeKeyRegistrationTxnWithSuggestedParams,makeKeyRegistrationTxnWithSuggestedParamsFromObject:()=>U.makeKeyRegistrationTxnWithSuggestedParamsFromObject,makePaymentTxn:()=>U.makePaymentTxn,makePaymentTxnWithSuggestedParams:()=>U.makePaymentTxnWithSuggestedParams,makePaymentTxnWithSuggestedParamsFromObject:()=>U.makePaymentTxnWithSuggestedParamsFromObject,ALGORAND_MIN_TX_FEE:()=>s.ALGORAND_MIN_TX_FEE,Transaction:()=>s.Transaction,decodeSignedTransaction:()=>s.decodeSignedTransaction,decodeUnsignedTransaction:()=>s.decodeUnsignedTransaction,encodeUnsignedTransaction:()=>s.encodeUnsignedTransaction,instantiateTxnIfNeeded:()=>s.instantiateTxnIfNeeded,isTransactionWithSigner:()=>k.Xw,makeBasicAccountTransactionSigner:()=>k.x7,makeLogicSigAccountTransactionSigner:()=>k.i1,makeMultiSigAccountTransactionSigner:()=>k.Vj,AtomicTransactionComposer:()=>I.A,AtomicTransactionComposerStatus:()=>I.b,TransactionType:()=>C.i,ABIAddressType:()=>R.JQ,ABIArrayDynamicType:()=>R._4,ABIArrayStaticType:()=>R.X3,ABIBoolType:()=>R.R0,ABIByteType:()=>R.jD,ABIContract:()=>R.Yh,ABIInterface:()=>R.bL,ABIMethod:()=>R.Ls,ABIReferenceType:()=>R.UV,ABIStringType:()=>R.Ax,ABITransactionType:()=>R.A9,ABITupleType:()=>R.w1,ABIType:()=>R.NK,ABIUfixedType:()=>R.RY,ABIUintType:()=>R.Pu,ADDR_BYTE_SIZE:()=>R.Vk,LENGTH_ENCODE_BYTE_SIZE:()=>R.nh,MAX_LEN:()=>R.kG,SINGLE_BOOL_SIZE:()=>R.qH,SINGLE_BYTE_SIZE:()=>R.JH,abiCheckTransactionType:()=>R.vJ,abiTypeIsReference:()=>R.o5,abiTypeIsTransaction:()=>R.AE});var n=r(9404),o=r(7116),i=r(3033),s=r(9417),a=r(8886),c=r.n(a),u=r(2691),l=r(9070),h=r(413),p=r(5922),f={};for(const e in p)["default","MULTISIG_BAD_SENDER_ERROR_MSG","signTransaction","signBid","signBytes","verifyBytes","encodeObj","decodeObj","ERROR_MULTISIG_BAD_SENDER","ERROR_INVALID_MICROALGOS","Algodv2","Kmd","IntDecoding","Indexer","waitForConfirmation","isValidAddress","encodeAddress","decodeAddress","getApplicationAddress","bytesToBigInt","bigIntToBytes","encodeUint64","decodeUint64","generateAccount","modelsv2","mnemonicToMasterDerivationKey","masterDerivationKeyToMnemonic","secretKeyToMnemonic","mnemonicToSecretKey","seedFromMnemonic","mnemonicFromSeed","microalgosToAlgos","algosToMicroalgos","INVALID_MICROALGOS_ERROR_MSG","computeGroupID","assignGroupID","LogicSigAccount","makeLogicSig","signLogicSigTransaction","signLogicSigTransactionObject","logicSigFromByte","tealSign","tealSignFromProgram","signMultisigTransaction","mergeMultisigTransactions","appendSignMultisigTransaction","multisigAddress","LogicTemplates"].indexOf(e)<0&&(f[e]=()=>p[e]);r.d(t,f);var d=r(5427),g=r(6477),y=r(7197),m=r(8104),b=r(5062),A=r(8922),w=r(6963),v=r(7988),x=r(227),S=r(3510),E=r(1063),T=r(8800),_=r(4158),B=r(4383),U=r(1988),k=r(834),I=r(3458),C=r(2380),R=r(7677),O=r(2486).Buffer;const D=O.from([77,88]),N="The transaction sender address and multisig preimage do not match.";function P(e,t){if(void 0===e.from){const r=n.keyPairFromSecretKey(t);e.from=o.encodeAddress(r.publicKey)}const r=s.instantiateTxnIfNeeded(e);return{txID:r.txID().toString(),blob:r.signTxn(t)}}function L(e,t){return new u.Z(e).signBid(t)}function F(e,t){const r=O.from(h.concatArrays(D,e));return n.sign(r,t)}function z(e,t,r){const i=O.from(h.concatArrays(D,e)),s=o.decodeAddress(r).publicKey;return n.verify(i,t,s)}function j(e){return new Uint8Array(i.encode(e))}function M(e){return i.decode(e)}const H=new Error(N),G=new Error(l.rD),K=c()},1988:(e,t,r)=>{"use strict";r.r(t),r.d(t,{makePaymentTxnWithSuggestedParams:()=>s,makePaymentTxn:()=>a,makePaymentTxnWithSuggestedParamsFromObject:()=>c,makeKeyRegistrationTxnWithSuggestedParams:()=>u,makeKeyRegistrationTxn:()=>l,makeKeyRegistrationTxnWithSuggestedParamsFromObject:()=>h,makeAssetCreateTxnWithSuggestedParams:()=>p,makeAssetCreateTxn:()=>f,makeAssetCreateTxnWithSuggestedParamsFromObject:()=>d,makeAssetConfigTxnWithSuggestedParams:()=>g,makeAssetConfigTxn:()=>y,makeAssetConfigTxnWithSuggestedParamsFromObject:()=>m,makeAssetDestroyTxnWithSuggestedParams:()=>b,makeAssetDestroyTxn:()=>A,makeAssetDestroyTxnWithSuggestedParamsFromObject:()=>w,makeAssetFreezeTxnWithSuggestedParams:()=>v,makeAssetFreezeTxn:()=>x,makeAssetFreezeTxnWithSuggestedParamsFromObject:()=>S,makeAssetTransferTxnWithSuggestedParams:()=>E,makeAssetTransferTxn:()=>T,makeAssetTransferTxnWithSuggestedParamsFromObject:()=>_,makeApplicationCreateTxn:()=>B,makeApplicationCreateTxnFromObject:()=>U,makeApplicationUpdateTxn:()=>k,makeApplicationUpdateTxnFromObject:()=>I,makeApplicationDeleteTxn:()=>C,makeApplicationDeleteTxnFromObject:()=>R,makeApplicationOptInTxn:()=>O,makeApplicationOptInTxnFromObject:()=>D,makeApplicationCloseOutTxn:()=>N,makeApplicationCloseOutTxnFromObject:()=>P,makeApplicationClearStateTxn:()=>L,makeApplicationClearStateTxnFromObject:()=>F,makeApplicationNoOpTxn:()=>z,makeApplicationNoOpTxnFromObject:()=>j,OnApplicationComplete:()=>o.hq,makeApplicationCallTxnFromObject:()=>M});var n=r(9417),o=r(1624),i=r(1824);function s(e,t,r,o,s,a,c){const u={from:e,to:t,amount:r,closeRemainderTo:o,note:s,suggestedParams:a,type:i.i.pay,reKeyTo:c};return new n.Transaction(u)}function a(e,t,r,n,o,i,a,c,u,l,h){return s(e,t,n,o,c,{genesisHash:u,genesisID:l,firstRound:i,lastRound:a,fee:r},h)}function c(e){return s(e.from,e.to,e.amount,e.closeRemainderTo,e.note,e.suggestedParams,e.rekeyTo)}function u(e,t,r,o,s,a,c,u,l,h=!1,p){const f={from:e,note:t,voteKey:r,selectionKey:o,voteFirst:s,voteLast:a,voteKeyDilution:c,suggestedParams:u,type:i.i.keyreg,reKeyTo:l,nonParticipation:h,stateProofKey:p};return new n.Transaction(f)}function l(e,t,r,n,o,i,s,a,c,l,h,p,f,d=!1,g){return u(e,o,a,c,l,h,p,{genesisHash:i,genesisID:s,firstRound:r,lastRound:n,fee:t},f,d,g)}function h(e){return u(e.from,e.note,e.voteKey,e.selectionKey,e.voteFirst,e.voteLast,e.voteKeyDilution,e.suggestedParams,e.rekeyTo,e.nonParticipation,e.stateProofKey)}function p(e,t,r,o,s,a,c,u,l,h,p,f,d,g,y){const m={from:e,note:t,suggestedParams:g,assetTotal:r,assetDecimals:o,assetDefaultFrozen:s,assetUnitName:h,assetName:p,assetURL:f,assetMetadataHash:d,assetManager:a,assetReserve:c,assetFreeze:u,assetClawback:l,type:i.i.acfg,reKeyTo:y};return new n.Transaction(m)}function f(e,t,r,n,o,i,s,a,c,u,l,h,f,d,g,y,m,b,A){return p(e,o,a,c,u,l,h,f,d,g,y,m,b,{genesisHash:i,genesisID:s,firstRound:r,lastRound:n,fee:t},A)}function d(e){return p(e.from,e.note,e.total,e.decimals,e.defaultFrozen,e.manager,e.reserve,e.freeze,e.clawback,e.unitName,e.assetName,e.assetURL,e.assetMetadataHash,e.suggestedParams,e.rekeyTo)}function g(e,t,r,o,s,a,c,u,l=!0,h){if(l&&(void 0===o||void 0===s||void 0===a||void 0===c))throw Error("strict empty address checking was turned on, but at least one empty address was provided");const p={from:e,suggestedParams:u,assetIndex:r,assetManager:o,assetReserve:s,assetFreeze:a,assetClawback:c,type:i.i.acfg,note:t,reKeyTo:h};return new n.Transaction(p)}function y(e,t,r,n,o,i,s,a,c,u,l,h,p=!0,f){return g(e,o,a,c,u,l,h,{genesisHash:i,genesisID:s,firstRound:r,lastRound:n,fee:t},p,f)}function m(e){return g(e.from,e.note,e.assetIndex,e.manager,e.reserve,e.freeze,e.clawback,e.suggestedParams,e.strictEmptyAddressChecking,e.rekeyTo)}function b(e,t,r,o,s){const a={from:e,suggestedParams:o,assetIndex:r,type:i.i.acfg,note:t,reKeyTo:s};return new n.Transaction(a)}function A(e,t,r,n,o,i,s,a,c){return b(e,o,a,{genesisHash:i,genesisID:s,firstRound:r,lastRound:n,fee:t},c)}function w(e){return b(e.from,e.note,e.assetIndex,e.suggestedParams,e.rekeyTo)}function v(e,t,r,o,s,a,c){const u={from:e,type:i.i.afrz,freezeAccount:o,assetIndex:r,freezeState:s,note:t,suggestedParams:a,reKeyTo:c};return new n.Transaction(u)}function x(e,t,r,n,o,i,s,a,c,u,l){return v(e,o,a,c,u,{genesisHash:i,genesisID:s,firstRound:r,lastRound:n,fee:t},l)}function S(e){return v(e.from,e.note,e.assetIndex,e.freezeTarget,e.freezeState,e.suggestedParams,e.rekeyTo)}function E(e,t,r,o,s,a,c,u,l){const h={type:i.i.axfer,from:e,to:t,amount:s,suggestedParams:u,assetIndex:c,note:a,assetRevocationTarget:o,closeRemainderTo:r,reKeyTo:l};return new n.Transaction(h)}function T(e,t,r,n,o,i,s,a,c,u,l,h,p){return E(e,t,r,n,i,c,h,{genesisHash:u,genesisID:l,firstRound:s,lastRound:a,fee:o},p)}function _(e){return E(e.from,e.to,e.closeRemainderTo,e.revocationTarget,e.amount,e.note,e.assetIndex,e.suggestedParams,e.rekeyTo)}function B(e,t,r,o,s,a,c,u,l,h,p,f,d,g,y,m,b){const A={type:i.i.appl,from:e,suggestedParams:t,appIndex:0,appOnComplete:r,appLocalInts:a,appLocalByteSlices:c,appGlobalInts:u,appGlobalByteSlices:l,appApprovalProgram:o,appClearProgram:s,appArgs:h,appAccounts:p,appForeignApps:f,appForeignAssets:d,note:g,lease:y,reKeyTo:m,extraPages:b};return new n.Transaction(A)}function U(e){return B(e.from,e.suggestedParams,e.onComplete,e.approvalProgram,e.clearProgram,e.numLocalInts,e.numLocalByteSlices,e.numGlobalInts,e.numGlobalByteSlices,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo,e.extraPages)}function k(e,t,r,s,a,c,u,l,h,p,f,d){const g={type:i.i.appl,from:e,suggestedParams:t,appIndex:r,appApprovalProgram:s,appOnComplete:o.hq.UpdateApplicationOC,appClearProgram:a,appArgs:c,appAccounts:u,appForeignApps:l,appForeignAssets:h,note:p,lease:f,reKeyTo:d};return new n.Transaction(g)}function I(e){return k(e.from,e.suggestedParams,e.appIndex,e.approvalProgram,e.clearProgram,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo)}function C(e,t,r,s,a,c,u,l,h,p){const f={type:i.i.appl,from:e,suggestedParams:t,appIndex:r,appOnComplete:o.hq.DeleteApplicationOC,appArgs:s,appAccounts:a,appForeignApps:c,appForeignAssets:u,note:l,lease:h,reKeyTo:p};return new n.Transaction(f)}function R(e){return C(e.from,e.suggestedParams,e.appIndex,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo)}function O(e,t,r,s,a,c,u,l,h,p){const f={type:i.i.appl,from:e,suggestedParams:t,appIndex:r,appOnComplete:o.hq.OptInOC,appArgs:s,appAccounts:a,appForeignApps:c,appForeignAssets:u,note:l,lease:h,reKeyTo:p};return new n.Transaction(f)}function D(e){return O(e.from,e.suggestedParams,e.appIndex,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo)}function N(e,t,r,s,a,c,u,l,h,p){const f={type:i.i.appl,from:e,suggestedParams:t,appIndex:r,appOnComplete:o.hq.CloseOutOC,appArgs:s,appAccounts:a,appForeignApps:c,appForeignAssets:u,note:l,lease:h,reKeyTo:p};return new n.Transaction(f)}function P(e){return N(e.from,e.suggestedParams,e.appIndex,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo)}function L(e,t,r,s,a,c,u,l,h,p){const f={type:i.i.appl,from:e,suggestedParams:t,appIndex:r,appOnComplete:o.hq.ClearStateOC,appArgs:s,appAccounts:a,appForeignApps:c,appForeignAssets:u,note:l,lease:h,reKeyTo:p};return new n.Transaction(f)}function F(e){return L(e.from,e.suggestedParams,e.appIndex,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo)}function z(e,t,r,s,a,c,u,l,h,p){const f={type:i.i.appl,from:e,suggestedParams:t,appIndex:r,appOnComplete:o.hq.NoOpOC,appArgs:s,appAccounts:a,appForeignApps:c,appForeignAssets:u,note:l,lease:h,reKeyTo:p};return new n.Transaction(f)}function j(e){return z(e.from,e.suggestedParams,e.appIndex,e.appArgs,e.accounts,e.foreignApps,e.foreignAssets,e.note,e.lease,e.rekeyTo)}function M(e){const t={type:i.i.appl,from:e.from,suggestedParams:e.suggestedParams,appIndex:e.appIndex,appOnComplete:e.onComplete,appLocalInts:e.numLocalInts,appLocalByteSlices:e.numLocalByteSlices,appGlobalInts:e.numGlobalInts,appGlobalByteSlices:e.numGlobalByteSlices,appApprovalProgram:e.approvalProgram,appClearProgram:e.clearProgram,appArgs:e.appArgs,appAccounts:e.accounts,appForeignApps:e.foreignApps,appForeignAssets:e.foreignAssets,note:e.note,lease:e.lease,reKeyTo:e.rekeyTo,extraPages:e.extraPages};return new n.Transaction(t)}},3510:(e,t,r)=>{"use strict";r.d(t,{vC:()=>g,w3:()=>l,OF:()=>d,Ch:()=>p,QX:()=>f,mE:()=>h});const n=["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"];var o=r(9404),i=r(7116);const s="failed to decode mnemonic";function a(e){const t=[];let r=0,n=0;return e.forEach((function(e){r|=e<=11&&(t.push(2047&r),r>>=11,n-=11)})),n&&t.push(r),t}function c(e){return e.map((e=>n[e]))}function u(e){return c(a(o.genericHash(e)))[0]}function l(e){if(e.length!==o.SEED_BTYES_LENGTH)throw new RangeError(`Seed length must be ${o.SEED_BTYES_LENGTH}`);const t=c(a(e)),r=u(e);return`${t.join(" ")} ${r}`}function h(e){const t=e.split(" "),r=t.slice(0,24);for(const e of r)if(-1===n.indexOf(e))throw new Error("the mnemonic contains a word that is not in the wordlist");const o=t[t.length-1];let i=function(e){const t=[];let r=0,n=0;return e.forEach((function(e){for(r|=e<=8;)t.push(255&r),r>>=8,n-=8})),n&&t.push(r),new Uint8Array(t)}(r.map((e=>n.indexOf(e))));if(33!==i.length)throw new Error(s);if(0!==i[i.length-1])throw new Error(s);if(i=i.slice(0,i.length-1),u(i)===o)return i;throw new Error(s)}function p(e){const t=h(e),r=o.keyPairFromSeed(t);return{addr:i.encodeAddress(r.publicKey),sk:r.secretKey}}function f(e){return l(e.slice(0,o.SEED_BTYES_LENGTH))}function d(e){return h(e)}function g(e){return l(e)}},4158:(e,t,r)=>{"use strict";r.d(t,{J6:()=>p,F2:()=>f,PU:()=>d,PO:()=>g,vH:()=>y});var n=r(9404),o=r(7116),i=r(3033),s=r(9417),a=r(413),c=r(2486).Buffer;const u="Cannot merge txs. Multisig preimages differ",l="Cannot mutate a multisig field as it would invalidate all existing signatures.";class h extends s.Transaction{addLease(){throw new Error(l)}addRekey(){throw new Error(l)}signTxn(e){throw new Error("Cannot sign a multisig transaction using `signTxn`. Use `partialSignTxn` instead.")}partialSignTxn({version:e,threshold:t,pks:r},s){const a=n.keyPairFromSecretKey(s).publicKey;return function(e,{rawSig:t,myPk:r},{version:s,threshold:a,pks:u}){let l=!1;const h=u.map((e=>n.bytesEqual(e,r)?(l=!0,{pk:c.from(e),s:t}):{pk:c.from(e)}));if(!1===l)throw new Error("Key does not exist");const p={msig:{v:s,thr:a,subsig:h},txn:e},f=o.fromMultisigPreImg({version:s,threshold:a,pks:u});return o.encodeAddress(e.snd)!==o.encodeAddress(f)&&(p.sgnr=c.from(f)),new Uint8Array(i.encode(p))}(this.get_obj_for_encoding(),{rawSig:this.rawSignTxn(s),myPk:a},{version:e,threshold:t,pks:r})}static from_obj_for_encoding(e){return super.from_obj_for_encoding(e)}}function p(e){if(e.length<2)throw new Error("Not enough multisig transactions to merge. Need at least two");const t=i.decode(e[0]),r=h.from_obj_for_encoding(t.txn).txID(),n=t.sgnr?o.encodeAddress(t.sgnr):void 0,s={version:t.msig.v,threshold:t.msig.thr,pks:t.msig.subsig.map((e=>e.pk))},a=o.encodeAddress(o.fromMultisigPreImg(s));let l=t.msig.subsig;for(let s=0;se.pk))};if(a!==o.encodeAddress(o.fromMultisigPreImg(f)))throw new Error(u);l=p.msig.subsig.map(((e,r)=>{const n=t.msig.subsig[r];if(n.s){if(e.s&&0!==c.compare(c.from(e.s),c.from(n.s)))throw new Error("Cannot merge txs. subsigs are mismatched.");return{pk:n.pk,s:n.s}}return e.s?{pk:n.pk,s:e.s}:n}))}const p={msig:{v:t.msig.v,thr:t.msig.thr,subsig:l},txn:t.txn};return void 0!==n&&(p.sgnr=c.from(o.decodeAddress(n).publicKey)),new Uint8Array(i.encode(p))}function f(e,t,r){const i=t.v,s=t.thr,c=t.subsig,u=c.map((e=>e.pk));if(t.subsig.lengtho.decodeAddress(e).publicKey));let u,l;return e instanceof s.Transaction?(u=e,l=h.prototype.partialSignTxn.call(u,{version:t,threshold:r,pks:c},i)):(u=new h(e),l=u.partialSignTxn({version:t,threshold:r,pks:c},i)),{txID:u.txID().toString(),blob:l}}function g(e,{version:t,threshold:r,addrs:n},s){const a=n.map((e=>o.decodeAddress(e).publicKey)),c=i.decode(e),u=h.from_obj_for_encoding(c.txn),l=u.partialSignTxn({version:t,threshold:r,pks:a},s);return{txID:u.txID().toString(),blob:p([e,l])}}function y({version:e,threshold:t,addrs:r}){return o.fromMultisigPreImgAddrs({version:e,threshold:t,addrs:r})}},9404:(e,t,r)=>{"use strict";r.r(t),r.d(t,{genericHash:()=>a,randomBytes:()=>c,keyPairFromSeed:()=>u,keyPair:()=>l,keyPairFromSecretKey:()=>h,sign:()=>p,bytesEqual:()=>f,verify:()=>d,PUBLIC_KEY_LENGTH:()=>g,SECRET_KEY_LENGTH:()=>y,HASH_BYTES_LENGTH:()=>m,SEED_BTYES_LENGTH:()=>b});var n=r(7765),o=r.n(n),i=r(9757),s=r.n(i);function a(e){return s().sha512_256.array(e)}function c(e){return o().randomBytes(e)}function u(e){return o().sign.keyPair.fromSeed(e)}function l(){return u(c(o().box.secretKeyLength))}function h(e){return o().sign.keyPair.fromSecretKey(e)}function p(e,t){return o().sign.detached(e,t)}function f(e,t){return o().verify(e,t)}function d(e,t,r){return o().sign.detached.verify(e,t,r)}const g=o().sign.publicKeyLength,y=o().sign.secretKeyLength,m=32,b=32},834:(e,t,r)=>{"use strict";r.d(t,{x7:()=>i,i1:()=>s,Vj:()=>a,Xw:()=>c});var n=r(8800),o=r(4158);function i(e){return(t,r)=>{const n=[];for(const o of r)n.push(t[o].signTxn(e.sk));return Promise.resolve(n)}}function s(e){return(t,r)=>{const o=[];for(const i of r){const{blob:r}=(0,n.signLogicSigTransactionObject)(t[i],e);o.push(r)}return Promise.resolve(o)}}function a(e,t){return(r,n)=>{const i=[];for(const s of n){const n=r[s],a=[];for(const r of t){const{blob:t}=(0,o.PU)(n,e,r);a.push(t)}i.push((0,o.J6)(a))}return Promise.resolve(i)}}function c(e){return"object"==typeof e&&2===Object.keys(e).length&&"object"==typeof e.txn&&"function"==typeof e.signer}},9417:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ALGORAND_MIN_TX_FEE:()=>h,Transaction:()=>f,encodeUnsignedTransaction:()=>d,decodeUnsignedTransaction:()=>g,decodeSignedTransaction:()=>y,instantiateTxnIfNeeded:()=>m,default:()=>b});var n=r(7267),o=r.n(n),i=r(7116),s=r(3033),a=r(9404),c=r(413),u=r(1624),l=r(2486).Buffer;const h=1e3;function p(e,t,r){if(null==e)return;let n;if("string"==typeof e?n=l.from(e,"base64"):e.constructor===Uint8Array?n=l.from(e):l.isBuffer(e)&&(n=e),null==n||n.byteLength!==r)throw Error(`${t} must be a ${r} byte Uint8Array or Buffer or base64 string.`);return n}class f{constructor({...e}){this.name="Transaction",this.tag=l.from("TX");const t={type:u.iU.pay,flatFee:!1,nonParticipation:!1};if(void 0===e.type&&(e.type=t.type),void 0===e.flatFee&&(e.flatFee=t.flatFee),e.type===u.iU.keyreg&&void 0!==e.voteKey&&void 0===e.nonParticipation&&(e.nonParticipation=t.nonParticipation),void 0!==e.suggestedParams){const t=e;t.genesisHash=t.suggestedParams.genesisHash,t.fee=t.suggestedParams.fee,void 0!==t.suggestedParams.flatFee&&(t.flatFee=t.suggestedParams.flatFee),t.firstRound=t.suggestedParams.firstRound,t.lastRound=t.suggestedParams.lastRound,t.genesisID=t.suggestedParams.genesisID}const r=e;if(r.from=i.decodeAddress(r.from),void 0!==r.to&&(r.to=i.decodeAddress(r.to)),void 0!==r.closeRemainderTo&&(r.closeRemainderTo=i.decodeAddress(r.closeRemainderTo)),void 0!==r.assetManager&&(r.assetManager=i.decodeAddress(r.assetManager)),void 0!==r.assetReserve&&(r.assetReserve=i.decodeAddress(r.assetReserve)),void 0!==r.assetFreeze&&(r.assetFreeze=i.decodeAddress(r.assetFreeze)),void 0!==r.assetClawback&&(r.assetClawback=i.decodeAddress(r.assetClawback)),void 0!==r.assetRevocationTarget&&(r.assetRevocationTarget=i.decodeAddress(r.assetRevocationTarget)),void 0!==r.freezeAccount&&(r.freezeAccount=i.decodeAddress(r.freezeAccount)),void 0!==r.reKeyTo&&(r.reKeyTo=i.decodeAddress(r.reKeyTo)),void 0===r.genesisHash)throw Error("genesis hash must be specified and in a base64 string.");if(r.genesisHash=l.from(r.genesisHash,"base64"),void 0!==r.amount&&(!(Number.isSafeInteger(r.amount)||"bigint"==typeof r.amount&&r.amount<=BigInt("0xffffffffffffffff"))||r.amount<0))throw Error("Amount must be a positive number and smaller than 2^64-1. If the number is larger than 2^53-1, use bigint.");if(!Number.isSafeInteger(r.fee)||r.fee<0)throw Error("fee must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(r.firstRound)||r.firstRound<0)throw Error("firstRound must be a positive number");if(!Number.isSafeInteger(r.lastRound)||r.lastRound<0)throw Error("lastRound must be a positive number");if(void 0!==r.extraPages&&(!Number.isInteger(r.extraPages)||r.extraPages<0||r.extraPages>3))throw Error("extraPages must be an Integer between and including 0 to 3");if(void 0!==r.assetTotal&&(!(Number.isSafeInteger(r.assetTotal)||"bigint"==typeof r.assetTotal&&r.assetTotal<=BigInt("0xffffffffffffffff"))||r.assetTotal<0))throw Error("Total asset issuance must be a positive number and smaller than 2^64-1. If the number is larger than 2^53-1, use bigint.");if(void 0!==r.assetDecimals&&(!Number.isSafeInteger(r.assetDecimals)||r.assetDecimals<0||r.assetDecimals>19))throw Error(`assetDecimals must be a positive number and smaller than ${19..toString()}`);if(void 0!==r.assetIndex&&(!Number.isSafeInteger(r.assetIndex)||r.assetIndex<0))throw Error("Asset index must be a positive number and smaller than 2^53-1");if(void 0!==r.appIndex&&(!Number.isSafeInteger(r.appIndex)||r.appIndex<0))throw Error("Application index must be a positive number and smaller than 2^53-1");if(void 0!==r.appLocalInts&&(!Number.isSafeInteger(r.appLocalInts)||r.appLocalInts<0))throw Error("Application local ints count must be a positive number and smaller than 2^53-1");if(void 0!==r.appLocalByteSlices&&(!Number.isSafeInteger(r.appLocalByteSlices)||r.appLocalByteSlices<0))throw Error("Application local byte slices count must be a positive number and smaller than 2^53-1");if(void 0!==r.appGlobalInts&&(!Number.isSafeInteger(r.appGlobalInts)||r.appGlobalInts<0))throw Error("Application global ints count must be a positive number and smaller than 2^53-1");if(void 0!==r.appGlobalByteSlices&&(!Number.isSafeInteger(r.appGlobalByteSlices)||r.appGlobalByteSlices<0))throw Error("Application global byte slices count must be a positive number and smaller than 2^53-1");if(void 0!==r.appApprovalProgram&&r.appApprovalProgram.constructor!==Uint8Array)throw Error("appApprovalProgram must be a Uint8Array.");if(void 0!==r.appClearProgram&&r.appClearProgram.constructor!==Uint8Array)throw Error("appClearProgram must be a Uint8Array.");if(void 0!==r.appArgs){if(!Array.isArray(r.appArgs))throw Error("appArgs must be an Array of Uint8Array.");r.appArgs=r.appArgs.slice(),r.appArgs.forEach((e=>{if(e.constructor!==Uint8Array)throw Error("each element of AppArgs must be a Uint8Array.")}))}else r.appArgs=[];if(void 0!==r.appAccounts){if(!Array.isArray(r.appAccounts))throw Error("appAccounts must be an Array of addresses.");r.appAccounts=r.appAccounts.map((e=>i.decodeAddress(e)))}if(void 0!==r.appForeignApps){if(!Array.isArray(r.appForeignApps))throw Error("appForeignApps must be an Array of integers.");r.appForeignApps=r.appForeignApps.slice(),r.appForeignApps.forEach((e=>{if(!Number.isSafeInteger(e)||e<0)throw Error("each foreign application index must be a positive number and smaller than 2^53-1")}))}if(void 0!==r.appForeignAssets){if(!Array.isArray(r.appForeignAssets))throw Error("appForeignAssets must be an Array of integers.");r.appForeignAssets=r.appForeignAssets.slice(),r.appForeignAssets.forEach((e=>{if(!Number.isSafeInteger(e)||e<0)throw Error("each foreign asset index must be a positive number and smaller than 2^53-1")}))}if(void 0!==r.assetMetadataHash&&0!==r.assetMetadataHash.length){if("string"==typeof r.assetMetadataHash&&(r.assetMetadataHash=new Uint8Array(l.from(r.assetMetadataHash))),r.assetMetadataHash.constructor!==Uint8Array||32!==r.assetMetadataHash.byteLength)throw Error("assetMetadataHash must be a 32 byte Uint8Array or string.");r.assetMetadataHash.every((e=>0===e))&&(r.assetMetadataHash=void 0)}else r.assetMetadataHash=void 0;if(void 0!==r.note){if(r.note.constructor!==Uint8Array)throw Error("note must be a Uint8Array.")}else r.note=new Uint8Array(0);if(void 0!==r.lease){if(r.lease.constructor!==Uint8Array)throw Error("lease must be a Uint8Array.");if(32!==r.lease.length)throw Error(`lease must be of length ${32..toString()}.`);r.lease.every((e=>0===e))&&(r.lease=new Uint8Array(0))}else r.lease=new Uint8Array(0);if(r.voteKey=p(r.voteKey,"voteKey",32),r.selectionKey=p(r.selectionKey,"selectionKey",32),r.stateProofKey=p(r.stateProofKey,"stateProofKey",64),r.nonParticipation&&(r.voteKey||r.selectionKey||r.voteFirst||r.stateProofKey||r.voteLast||r.voteKeyDilution))throw new Error("nonParticipation is true but participation params are present.");if(!r.nonParticipation&&(r.voteKey||r.selectionKey||r.stateProofKey||r.voteFirst||r.voteLast||r.voteKeyDilution)&&!(r.voteKey&&r.selectionKey&&r.voteFirst&&r.voteLast&&r.voteKeyDilution))throw new Error("online key registration missing at least one of the following fields: voteKey, selectionKey, voteFirst, voteLast, voteKeyDilution");delete r.suggestedParams,Object.assign(this,c.removeUndefinedProperties(r)),r.flatFee||(this.fee*=this.estimateSize(),this.feel.from(e)))),void 0!==this.appAccounts&&(e.apat=this.appAccounts.map((e=>l.from(e.publicKey)))),e.note.length||delete e.note,e.lx.length||delete e.lx,e.amt||delete e.amt,e.fee||delete e.fee,e.fv||delete e.fv,e.gen||delete e.gen,e.apid||delete e.apid,e.apls.nui||delete e.apls.nui,e.apls.nbs||delete e.apls.nbs,e.apls.nui||e.apls.nbs||delete e.apls,e.apgs.nui||delete e.apgs.nui,e.apgs.nbs||delete e.apgs.nbs,e.apaa&&e.apaa.length||delete e.apaa,e.apgs.nui||e.apgs.nbs||delete e.apgs,e.apap||delete e.apap,e.apsu||delete e.apsu,e.apan||delete e.apan,e.apfa&&e.apfa.length||delete e.apfa,e.apas&&e.apas.length||delete e.apas,e.apat&&e.apat.length||delete e.apat,e.apep||delete e.apep,void 0===e.grp&&delete e.grp,e}}static from_obj_for_encoding(e){const t=Object.create(this.prototype);if(t.name="Transaction",t.tag=l.from("TX"),t.genesisID=e.gen,t.genesisHash=l.from(e.gh),!(0,u.v8)(e.type))throw new Error(`Unrecognized transaction type: ${e.type}`);return t.type=e.type,t.fee=e.fee,t.firstRound=e.fv,t.lastRound=e.lv,t.note=new Uint8Array(e.note),t.lease=new Uint8Array(e.lx),t.from=i.decodeAddress(i.encodeAddress(new Uint8Array(e.snd))),void 0!==e.grp&&(t.group=l.from(e.grp)),void 0!==e.rekey&&(t.reKeyTo=i.decodeAddress(i.encodeAddress(new Uint8Array(e.rekey)))),"pay"===e.type?(t.amount=e.amt,t.to=i.decodeAddress(i.encodeAddress(new Uint8Array(e.rcv))),void 0!==e.close&&(t.closeRemainderTo=i.decodeAddress(i.encodeAddress(e.close)))):"keyreg"===e.type?(void 0!==e.votekey&&(t.voteKey=l.from(e.votekey)),void 0!==e.selkey&&(t.selectionKey=l.from(e.selkey)),void 0!==e.sprfkey&&(t.stateProofKey=l.from(e.sprfkey)),void 0!==e.votekd&&(t.voteKeyDilution=e.votekd),void 0!==e.votefst&&(t.voteFirst=e.votefst),void 0!==e.votelst&&(t.voteLast=e.votelst),void 0!==e.nonpart&&(t.nonParticipation=e.nonpart)):"acfg"===e.type?(void 0!==e.caid&&(t.assetIndex=e.caid),void 0!==e.apar&&(t.assetTotal=e.apar.t,t.assetDefaultFrozen=e.apar.df,void 0!==e.apar.dc&&(t.assetDecimals=e.apar.dc),void 0!==e.apar.m&&(t.assetManager=i.decodeAddress(i.encodeAddress(new Uint8Array(e.apar.m)))),void 0!==e.apar.r&&(t.assetReserve=i.decodeAddress(i.encodeAddress(new Uint8Array(e.apar.r)))),void 0!==e.apar.f&&(t.assetFreeze=i.decodeAddress(i.encodeAddress(new Uint8Array(e.apar.f)))),void 0!==e.apar.c&&(t.assetClawback=i.decodeAddress(i.encodeAddress(new Uint8Array(e.apar.c)))),void 0!==e.apar.un&&(t.assetUnitName=e.apar.un),void 0!==e.apar.an&&(t.assetName=e.apar.an),void 0!==e.apar.au&&(t.assetURL=e.apar.au),void 0!==e.apar.am&&(t.assetMetadataHash=e.apar.am))):"axfer"===e.type?(void 0!==e.xaid&&(t.assetIndex=e.xaid),void 0!==e.aamt&&(t.amount=e.aamt),void 0!==e.aclose&&(t.closeRemainderTo=i.decodeAddress(i.encodeAddress(new Uint8Array(e.aclose)))),void 0!==e.asnd&&(t.assetRevocationTarget=i.decodeAddress(i.encodeAddress(new Uint8Array(e.asnd)))),t.to=i.decodeAddress(i.encodeAddress(new Uint8Array(e.arcv)))):"afrz"===e.type?(void 0!==e.afrz&&(t.freezeState=e.afrz),void 0!==e.faid&&(t.assetIndex=e.faid),t.freezeAccount=i.decodeAddress(i.encodeAddress(new Uint8Array(e.fadd)))):"appl"===e.type&&(void 0!==e.apid&&(t.appIndex=e.apid),void 0!==e.apan&&(t.appOnComplete=e.apan),void 0!==e.apls&&(void 0!==e.apls.nui&&(t.appLocalInts=e.apls.nui),void 0!==e.apls.nbs&&(t.appLocalByteSlices=e.apls.nbs)),void 0!==e.apgs&&(void 0!==e.apgs.nui&&(t.appGlobalInts=e.apgs.nui),void 0!==e.apgs.nbs&&(t.appGlobalByteSlices=e.apgs.nbs)),void 0!==e.apep&&(t.extraPages=e.apep),void 0!==e.apap&&(t.appApprovalProgram=new Uint8Array(e.apap)),void 0!==e.apsu&&(t.appClearProgram=new Uint8Array(e.apsu)),void 0!==e.apaa&&(t.appArgs=e.apaa.map((e=>new Uint8Array(e)))),void 0!==e.apat&&(t.appAccounts=e.apat.map((e=>i.decodeAddress(i.encodeAddress(new Uint8Array(e)))))),void 0!==e.apfa&&(t.appForeignApps=e.apfa),void 0!==e.apas&&(t.appForeignAssets=e.apas)),t}estimateSize(){return this.toByte().length+75}bytesToSign(){const e=this.toByte();return l.from(c.concatArrays(this.tag,e))}toByte(){return s.encode(this.get_obj_for_encoding())}rawSignTxn(e){const t=this.bytesToSign(),r=a.sign(t,e);return l.from(r)}signTxn(e){const t={sig:this.rawSignTxn(e),txn:this.get_obj_for_encoding()},r=a.keyPairFromSecretKey(e).publicKey;return i.encodeAddress(r)!==i.encodeAddress(this.from.publicKey)&&(t.sgnr=l.from(r)),new Uint8Array(s.encode(t))}rawTxID(){const e=this.toByte(),t=l.from(c.concatArrays(this.tag,e));return l.from(a.genericHash(t))}txID(){const e=this.rawTxID();return o().encode(e).slice(0,52)}addLease(e,t=0){let r;if(void 0!==e){if(e.constructor!==Uint8Array)throw Error("lease must be a Uint8Array.");if(32!==e.length)throw Error(`lease must be of length ${32..toString()}.`);r=new Uint8Array(e)}else r=new Uint8Array(0);this.lease=r,0!==t&&(this.fee+=37*t)}addRekey(e,t=0){void 0!==e&&(this.reKeyTo=i.decodeAddress(e)),0!==t&&(this.fee+=37*t)}_getDictForDisplay(){const e={...this};return e.tag=e.tag.toString(),e.from=i.encodeAddress(e.from.publicKey),void 0!==e.to&&(e.to=i.encodeAddress(e.to.publicKey)),void 0!==e.freezeAccount&&(e.freezeAccount=i.encodeAddress(e.freezeAccount.publicKey)),void 0!==e.closeRemainderTo&&(e.closeRemainderTo=i.encodeAddress(e.closeRemainderTo.publicKey)),void 0!==e.assetManager&&(e.assetManager=i.encodeAddress(e.assetManager.publicKey)),void 0!==e.assetReserve&&(e.assetReserve=i.encodeAddress(e.assetReserve.publicKey)),void 0!==e.assetFreeze&&(e.assetFreeze=i.encodeAddress(e.assetFreeze.publicKey)),void 0!==e.assetClawback&&(e.assetClawback=i.encodeAddress(e.assetClawback.publicKey)),void 0!==e.assetRevocationTarget&&(e.assetRevocationTarget=i.encodeAddress(e.assetRevocationTarget.publicKey)),void 0!==e.reKeyTo&&(e.reKeyTo=i.encodeAddress(e.reKeyTo.publicKey)),e.genesisHash=e.genesisHash.toString("base64"),e}prettyPrint(){console.log(this._getDictForDisplay())}toString(){return JSON.stringify(this._getDictForDisplay())}}function d(e){const t=e.get_obj_for_encoding();return s.encode(t)}function g(e){const t=s.decode(e);return f.from_obj_for_encoding(t)}function y(e){const t=s.decode(e);return{...t,txn:f.from_obj_for_encoding(t.txn)}}function m(e){return e instanceof f?e:new f(e)}const b=f},2380:(e,t,r)=>{"use strict";r.d(t,{i:()=>n.i});var n=r(1824)},7197:(e,t,r)=>{"use strict";var n;r.d(t,{Z:()=>o}),function(e){e.DEFAULT="default",e.SAFE="safe",e.MIXED="mixed",e.BIGINT="bigint"}(n||(n={}));const o=n},1624:(e,t,r)=>{"use strict";var n,o;function i(e){return e===n.pay||e===n.keyreg||e===n.acfg||e===n.axfer||e===n.afrz||e===n.appl}r.d(t,{iU:()=>n,v8:()=>i,hq:()=>o}),function(e){e.pay="pay",e.keyreg="keyreg",e.acfg="acfg",e.axfer="axfer",e.afrz="afrz",e.appl="appl"}(n||(n={})),function(e){e[e.NoOpOC=0]="NoOpOC",e[e.OptInOC=1]="OptInOC",e[e.CloseOutOC=2]="CloseOutOC",e[e.ClearStateOC=3]="ClearStateOC",e[e.UpdateApplicationOC=4]="UpdateApplicationOC",e[e.DeleteApplicationOC=5]="DeleteApplicationOC"}(o||(o={}))},1824:(e,t,r)=>{"use strict";r.d(t,{i:()=>n.iU});var n=r(1624)},413:(e,t,r)=>{"use strict";r.r(t),r.d(t,{parseJSON:()=>a,arrayEqual:()=>c,concatArrays:()=>u,removeUndefinedProperties:()=>l,isNode:()=>h});var n=r(4360),o=r.n(n),i=r(7197);const s=o()({useNativeBigInt:!0,strict:!0});function a(e,t){const r=t&&t.intDecoding?t.intDecoding:i.Z.DEFAULT;return s.parse(e,((e,t)=>{if(null!=t&&"object"==typeof t&&null==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,Object.prototype),"bigint"==typeof t){if("bigint"===r||"mixed"===r&&t>Number.MAX_SAFE_INTEGER)return t;if("default"===r||"mixed"===r)return Number(t);throw new Error(`Integer exceeds maximum safe integer: ${t.toString()}. Try parsing with a different intDecoding option.`)}return"number"==typeof t&&"bigint"===r&&Number.isInteger(t)?BigInt(t):t}))}function c(e,t){return e.length===t.length&&Array.from(e).every(((e,r)=>e===t[r]))}function u(...e){const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);let n=0;for(let t=0;t{void 0===t[e]&&delete t[e]})),t}function h(){return"object"==typeof process&&"object"==typeof process.versions&&void 0!==process.versions.node}},5062:(e,t,r)=>{"use strict";async function n(e,t,r){const n=await e.status().do();if(void 0===n)throw new Error("Unable to get node status");const o=n["last-round"]+1;let i=o;for(;in})},4654:()=>{}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.amdO={},__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>r});var e=__webpack_require__(6608),t={};for(const r in e)"default"!==r&&(t[r]=()=>e[r]);__webpack_require__.d(__webpack_exports__,t);const r=e})(),__webpack_exports__})()})); //# sourceMappingURL=algosdk.min.js.map \ No newline at end of file diff --git a/node_modules/algosdk/dist/cjs/index.js b/node_modules/algosdk/dist/cjs/index.js index b2bb615..16f498f 100644 --- a/node_modules/algosdk/dist/cjs/index.js +++ b/node_modules/algosdk/dist/cjs/index.js @@ -1,4 +1,5 @@ "use strict"; +globalThis.Buffer = require('buffer/').Buffer; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); diff --git a/node_modules/algosdk/dist/esm/index.js b/node_modules/algosdk/dist/esm/index.js index 63badab..3d2c638 100644 --- a/node_modules/algosdk/dist/esm/index.js +++ b/node_modules/algosdk/dist/esm/index.js @@ -1,4 +1,6 @@ import * as algosdk from './src/main'; export * from './src/main'; +globalThis.Buffer = require('buffer/').Buffer; export default algosdk; + //# sourceMappingURL=index.js.map \ No newline at end of file