edge-currency-accountbased 2.2.4 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/android/src/main/assets/edge-currency-accountbased/234.chunk.js +35 -0
  3. package/android/src/main/assets/edge-currency-accountbased/248.chunk.js +35 -0
  4. package/android/src/main/assets/edge-currency-accountbased/336.chunk.js +9 -0
  5. package/android/src/main/assets/edge-currency-accountbased/612.chunk.js +1 -0
  6. package/android/src/main/assets/edge-currency-accountbased/{945.chunk.js → 814.chunk.js} +8 -8
  7. package/android/src/main/assets/edge-currency-accountbased/935.chunk.js +1 -1
  8. package/android/src/main/assets/edge-currency-accountbased/94.chunk.js +8 -0
  9. package/android/src/main/assets/edge-currency-accountbased/algorand.chunk.js +2 -2
  10. package/android/src/main/assets/edge-currency-accountbased/bnb.chunk.js +4 -4
  11. package/android/src/main/assets/edge-currency-accountbased/edge-currency-accountbased.js +10 -10
  12. package/android/src/main/assets/edge-currency-accountbased/eos.chunk.js +12 -12
  13. package/android/src/main/assets/edge-currency-accountbased/ethereum.chunk.js +5 -5
  14. package/android/src/main/assets/edge-currency-accountbased/filecoin.chunk.js +1 -1
  15. package/android/src/main/assets/edge-currency-accountbased/fio.chunk.js +2 -2
  16. package/android/src/main/assets/edge-currency-accountbased/hedera.chunk.js +2 -2
  17. package/android/src/main/assets/edge-currency-accountbased/polkadot.chunk.js +2 -2
  18. package/android/src/main/assets/edge-currency-accountbased/ripple.chunk.js +5 -5
  19. package/android/src/main/assets/edge-currency-accountbased/solana.chunk.js +3 -3
  20. package/android/src/main/assets/edge-currency-accountbased/stellar.chunk.js +4 -4
  21. package/android/src/main/assets/edge-currency-accountbased/tezos.chunk.js +3 -3
  22. package/android/src/main/assets/edge-currency-accountbased/tron.chunk.js +1 -1
  23. package/android/src/main/assets/edge-currency-accountbased/zcash.chunk.js +2 -2
  24. package/lib/algorand/AlgorandEngine.js +46 -24
  25. package/lib/algorand/algorandInfo.js +8 -7
  26. package/lib/algorand/algorandTestnetInfo.js +8 -7
  27. package/lib/binance/BinanceEngine.js +19 -17
  28. package/lib/binance/binanceInfo.js +10 -7
  29. package/lib/common/types.js +10 -0
  30. package/lib/common/upgradeMemos.js +52 -0
  31. package/lib/common/utf8.js +32 -0
  32. package/lib/common/validateMemos.js +107 -0
  33. package/lib/eos/EosEngine.js +42 -41
  34. package/lib/eos/info/eosCommonInfo.js +10 -0
  35. package/lib/eos/info/eosInfo.js +15 -17
  36. package/lib/eos/info/telosInfo.js +15 -15
  37. package/lib/eos/info/waxInfo.js +15 -16
  38. package/lib/ethereum/EthereumEngine.js +13 -12
  39. package/lib/ethereum/EthereumNetwork.js +16 -14
  40. package/lib/ethereum/info/avalancheInfo.js +9 -7
  41. package/lib/ethereum/info/binancesmartchainInfo.js +9 -7
  42. package/lib/ethereum/info/celoInfo.js +9 -7
  43. package/lib/ethereum/info/ethDevInfo.js +9 -7
  44. package/lib/ethereum/info/ethereumCommonInfo.js +10 -0
  45. package/lib/ethereum/info/ethereumInfo.js +9 -7
  46. package/lib/ethereum/info/ethereumclassicInfo.js +9 -7
  47. package/lib/ethereum/info/ethereumpowInfo.js +9 -7
  48. package/lib/ethereum/info/fantomInfo.js +9 -7
  49. package/lib/ethereum/info/goerliInfo.js +9 -7
  50. package/lib/ethereum/info/kovanInfo.js +9 -7
  51. package/lib/ethereum/info/optimismInfo.js +9 -7
  52. package/lib/ethereum/info/polygonInfo.js +9 -7
  53. package/lib/ethereum/info/pulsechainInfo.js +9 -7
  54. package/lib/ethereum/info/rinkebyInfo.js +9 -7
  55. package/lib/ethereum/info/ropstenInfo.js +9 -7
  56. package/lib/ethereum/info/rskInfo.js +9 -7
  57. package/lib/ethereum/info/zksyncInfo.js +9 -7
  58. package/lib/filecoin/FilecoinEngine.js +21 -15
  59. package/lib/filecoin/filecoinInfo.js +5 -7
  60. package/lib/fio/FioEngine.js +25 -17
  61. package/lib/fio/fioInfo.js +8 -6
  62. package/lib/hedera/HederaEngine.js +22 -18
  63. package/lib/hedera/hederaInfo.js +11 -8
  64. package/lib/hedera/hederaTestnetInfo.js +6 -6
  65. package/lib/polkadot/PolkadotEngine.js +15 -9
  66. package/lib/polkadot/info/liberlandInfo.js +3 -2
  67. package/lib/polkadot/info/liberlandTestnetInfo.js +3 -2
  68. package/lib/polkadot/info/polkadotInfo.js +8 -5
  69. package/lib/ripple/RippleEngine.js +53 -75
  70. package/lib/ripple/rippleInfo.js +16 -8
  71. package/lib/solana/SolanaEngine.js +17 -12
  72. package/lib/solana/solanaInfo.js +9 -5
  73. package/lib/stellar/StellarEngine.js +31 -22
  74. package/lib/stellar/stellarInfo.js +16 -7
  75. package/lib/tezos/TezosEngine.js +17 -11
  76. package/lib/tezos/tezosInfo.js +8 -5
  77. package/lib/tron/TronEngine.js +85 -68
  78. package/lib/tron/tronInfo.js +8 -7
  79. package/lib/zcash/ZcashEngine.js +17 -19
  80. package/lib/zcash/piratechainInfo.js +8 -6
  81. package/lib/zcash/zcashInfo.js +7 -6
  82. package/package.json +2 -2
  83. package/android/src/main/assets/edge-currency-accountbased/124.chunk.js +0 -35
  84. package/android/src/main/assets/edge-currency-accountbased/223.chunk.js +0 -9
  85. package/android/src/main/assets/edge-currency-accountbased/650.chunk.js +0 -1
  86. package/android/src/main/assets/edge-currency-accountbased/689.chunk.js +0 -8
  87. package/android/src/main/assets/edge-currency-accountbased/826.chunk.js +0 -35
@@ -1,25 +1,25 @@
1
- (self.webpackChunkedge_currency_accountbased=self.webpackChunkedge_currency_accountbased||[]).push([[945],{66424:function(Be,Ke,ce){var de=ce(34155);(function(ye,J){Be.exports=J()})(this,function(){return function(ye){var J={};function l(N){if(J[N])return J[N].exports;var L=J[N]={i:N,l:!1,exports:{}};return ye[N].call(L.exports,L,L.exports,l),L.l=!0,L.exports}return l.m=ye,l.c=J,l.d=function(N,L,k){l.o(N,L)||Object.defineProperty(N,L,{enumerable:!0,get:k})},l.r=function(N){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(N,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(N,"__esModule",{value:!0})},l.t=function(N,L){if(1&L&&(N=l(N)),8&L||4&L&&typeof N=="object"&&N&&N.__esModule)return N;var k=Object.create(null);if(l.r(k),Object.defineProperty(k,"default",{enumerable:!0,value:N}),2&L&&typeof N!="string")for(var D in N)l.d(k,D,function(Y){return N[Y]}.bind(null,D));return k},l.n=function(N){var L=N&&N.__esModule?function(){return N.default}:function(){return N};return l.d(L,"a",L),L},l.o=function(N,L){return Object.prototype.hasOwnProperty.call(N,L)},l.p="",l(l.s=0)}([function(ye,J,l){"use strict";l.r(J),l.d(J,"encode",function(){return x}),l.d(J,"decode",function(){return Ce}),l.d(J,"decodeAsync",function(){return lt}),l.d(J,"decodeArrayStream",function(){return it}),l.d(J,"decodeStream",function(){return ht}),l.d(J,"Decoder",function(){return Te}),l.d(J,"Encoder",function(){return $}),l.d(J,"ExtensionCodec",function(){return g}),l.d(J,"ExtData",function(){return le}),l.d(J,"EXT_TIMESTAMP",function(){return _e}),l.d(J,"encodeDateToTimeSpec",function(){return F}),l.d(J,"encodeTimeSpecToTimestamp",function(){return A}),l.d(J,"decodeTimestampToTimeSpec",function(){return j}),l.d(J,"encodeTimestampExtension",function(){return T}),l.d(J,"decodeTimestampExtension",function(){return O});var N=function(p,i){var a=typeof Symbol=="function"&&p[Symbol.iterator];if(!a)return p;var u,c,y=a.call(p),f=[];try{for(;(i===void 0||i-- >0)&&!(u=y.next()).done;)f.push(u.value)}catch(I){c={error:I}}finally{try{u&&!u.done&&(a=y.return)&&a.call(y)}finally{if(c)throw c.error}}return f},L=function(){for(var p=[],i=0;i<arguments.length;i++)p=p.concat(N(arguments[i]));return p},k=typeof de<"u"&&typeof TextEncoder<"u"&&typeof TextDecoder<"u";function D(p){for(var i=p.length,a=0,u=0;u<i;){var c=p.charCodeAt(u++);if((4294967168&c)!=0)if((4294965248&c)==0)a+=2;else{if(c>=55296&&c<=56319&&u<i){var y=p.charCodeAt(u);(64512&y)==56320&&(++u,c=((1023&c)<<10)+(1023&y)+65536)}a+=(4294901760&c)==0?3:4}else a++}return a}var Y=k?new TextEncoder:void 0,Fe=typeof de<"u"?200:0,be=Y!=null&&Y.encodeInto?function(p,i,a){Y.encodeInto(p,i.subarray(a))}:function(p,i,a){i.set(Y.encode(p),a)};function m(p,i,a){for(var u=i,c=u+a,y=[],f="";u<c;){var I=p[u++];if((128&I)==0)y.push(I);else if((224&I)==192){var q=63&p[u++];y.push((31&I)<<6|q)}else if((240&I)==224){q=63&p[u++];var V=63&p[u++];y.push((31&I)<<12|q<<6|V)}else if((248&I)==240){var b=(7&I)<<18|(q=63&p[u++])<<12|(V=63&p[u++])<<6|63&p[u++];b>65535&&(b-=65536,y.push(b>>>10&1023|55296),b=56320|1023&b),y.push(b)}else y.push(I);y.length>=4096&&(f+=String.fromCharCode.apply(String,L(y)),y.length=0)}return y.length>0&&(f+=String.fromCharCode.apply(String,L(y))),f}var fe=k?new TextDecoder:null,ie=typeof de<"u"?200:0,le=function(p,i){this.type=p,this.data=i};function Ee(p,i,a){var u=Math.floor(a/4294967296),c=a;p.setUint32(i,u),p.setUint32(i+4,c)}function Z(p,i){var a=p.getInt32(i),u=p.getUint32(i+4),c=a<Math.floor(Number.MIN_SAFE_INTEGER/4294967296)||a===Math.floor(Number.MIN_SAFE_INTEGER/4294967296)&&u===0,y=a>Math.floor(Number.MAX_SAFE_INTEGER/4294967296);return c||y?BigInt(a)*BigInt(4294967296)+BigInt(u):4294967296*a+u}var _e=-1;function A(p){var i=p.sec,a=p.nsec;if(i>=0&&a>=0&&i<=17179869183){if(a===0&&i<=4294967295){var u=new Uint8Array(4);return(f=new DataView(u.buffer)).setUint32(0,i),u}var c=i/4294967296,y=4294967295&i;return u=new Uint8Array(8),(f=new DataView(u.buffer)).setUint32(0,a<<2|3&c),f.setUint32(4,y),u}var f;return u=new Uint8Array(12),(f=new DataView(u.buffer)).setUint32(0,a),Ee(f,4,i),u}function F(p){var i=p.getTime(),a=Math.floor(i/1e3),u=1e6*(i-1e3*a),c=Math.floor(u/1e9);return{sec:a+c,nsec:u-1e9*c}}function T(p){return p instanceof Date?A(F(p)):null}function j(p){var i=new DataView(p.buffer,p.byteOffset,p.byteLength);switch(p.byteLength){case 4:return{sec:i.getUint32(0),nsec:0};case 8:var a=i.getUint32(0);return{sec:4294967296*(3&a)+i.getUint32(4),nsec:a>>>2};case 12:return{sec:Z(i,4),nsec:i.getUint32(0)};default:throw new Error("Unrecognized data size for timestamp: "+p.length)}}function O(p){var i=j(p);return new Date(1e3*i.sec+i.nsec/1e6)}var z={type:_e,encode:T,decode:O},g=function(){function p(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(z)}return p.prototype.register=function(i){var a=i.type,u=i.encode,c=i.decode;if(a>=0)this.encoders[a]=u,this.decoders[a]=c;else{var y=1+a;this.builtInEncoders[y]=u,this.builtInDecoders[y]=c}},p.prototype.tryToEncode=function(i,a){for(var u=0;u<this.builtInEncoders.length;u++)if((c=this.builtInEncoders[u])!=null&&(y=c(i,a))!=null)return new le(-1-u,y);for(u=0;u<this.encoders.length;u++){var c,y;if((c=this.encoders[u])!=null&&(y=c(i,a))!=null)return new le(u,y)}return i instanceof le?i:null},p.prototype.decode=function(i,a,u){var c=a<0?this.builtInDecoders[-1-a]:this.decoders[a];return c?c(i,a,u):new le(a,i)},p.defaultCodec=new p,p}();function U(p){return p instanceof Uint8Array?p:ArrayBuffer.isView(p)?new Uint8Array(p.buffer,p.byteOffset,p.byteLength):p instanceof ArrayBuffer?new Uint8Array(p):Uint8Array.from(p)}var S=function(p){var i=typeof Symbol=="function"&&Symbol.iterator,a=i&&p[i],u=0;if(a)return a.call(p);if(p&&typeof p.length=="number")return{next:function(){return p&&u>=p.length&&(p=void 0),{value:p&&p[u++],done:!p}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},$=function(){function p(i,a,u,c,y,f,I,q){i===void 0&&(i=g.defaultCodec),a===void 0&&(a=void 0),u===void 0&&(u=100),c===void 0&&(c=2048),y===void 0&&(y=!1),f===void 0&&(f=!1),I===void 0&&(I=!1),q===void 0&&(q=!1),this.extensionCodec=i,this.context=a,this.maxDepth=u,this.initialBufferSize=c,this.sortKeys=y,this.forceFloat32=f,this.ignoreUndefined=I,this.forceIntegerToFloat=q,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}return p.prototype.getUint8Array=function(){return this.bytes.subarray(0,this.pos)},p.prototype.reinitializeState=function(){this.pos=0},p.prototype.encode=function(i){return this.reinitializeState(),this.doEncode(i,1),this.getUint8Array()},p.prototype.doEncode=function(i,a){if(a>this.maxDepth)throw new Error("Too deep objects in depth "+a);i==null?this.encodeNil():typeof i=="boolean"?this.encodeBoolean(i):typeof i=="number"?this.encodeNumber(i):typeof i=="string"?this.encodeString(i):typeof i=="bigint"?this.encodebigint(i):this.encodeObject(i,a)},p.prototype.ensureBufferSizeToWrite=function(i){var a=this.pos+i;this.view.byteLength<a&&this.resizeBuffer(2*a)},p.prototype.resizeBuffer=function(i){var a=new ArrayBuffer(i),u=new Uint8Array(a),c=new DataView(a);u.set(this.bytes),this.view=c,this.bytes=u},p.prototype.encodeNil=function(){this.writeU8(192)},p.prototype.encodeBoolean=function(i){i===!1?this.writeU8(194):this.writeU8(195)},p.prototype.encodeNumber=function(i){Number.isSafeInteger(i)&&!this.forceIntegerToFloat?i>=0?i<128?this.writeU8(i):i<256?(this.writeU8(204),this.writeU8(i)):i<65536?(this.writeU8(205),this.writeU16(i)):i<4294967296?(this.writeU8(206),this.writeU32(i)):(this.writeU8(207),this.writeU64(i)):i>=-32?this.writeU8(224|i+32):i>=-128?(this.writeU8(208),this.writeI8(i)):i>=-32768?(this.writeU8(209),this.writeI16(i)):i>=-2147483648?(this.writeU8(210),this.writeI32(i)):(this.writeU8(211),this.writeI64(i)):this.forceFloat32?(this.writeU8(202),this.writeF32(i)):(this.writeU8(203),this.writeF64(i))},p.prototype.encodebigint=function(i){i>=BigInt(0)?i<BigInt(128)?this.writeU8(Number(i)):i<BigInt(256)?(this.writeU8(204),this.writeU8(Number(i))):i<BigInt(65536)?(this.writeU8(205),this.writeU16(Number(i))):i<BigInt(4294967296)?(this.writeU8(206),this.writeU32(Number(i))):(this.writeU8(207),this.writeBig64(i)):i>=BigInt(-32)?this.writeU8(224|Number(i)+32):i>=BigInt(-128)?(this.writeU8(208),this.writeI8(Number(i))):i>=BigInt(-32768)?(this.writeU8(209),this.writeI16(Number(i))):i>=BigInt(-2147483648)?(this.writeU8(210),this.writeI32(Number(i))):(this.writeU8(211),this.writeBig64(i))},p.prototype.writeStringHeader=function(i){if(i<32)this.writeU8(160+i);else if(i<256)this.writeU8(217),this.writeU8(i);else if(i<65536)this.writeU8(218),this.writeU16(i);else{if(!(i<4294967296))throw new Error("Too long string: "+i+" bytes in UTF-8");this.writeU8(219),this.writeU32(i)}},p.prototype.encodeString=function(i){var a=i.length;if(k&&a>Fe){var u=D(i);this.ensureBufferSizeToWrite(5+u),this.writeStringHeader(u),be(i,this.bytes,this.pos),this.pos+=u}else u=D(i),this.ensureBufferSizeToWrite(5+u),this.writeStringHeader(u),function(c,y,f){for(var I=c.length,q=f,V=0;V<I;){var b=c.charCodeAt(V++);if((4294967168&b)!=0){if((4294965248&b)==0)y[q++]=b>>6&31|192;else{if(b>=55296&&b<=56319&&V<I){var H=c.charCodeAt(V);(64512&H)==56320&&(++V,b=((1023&b)<<10)+(1023&H)+65536)}(4294901760&b)==0?(y[q++]=b>>12&15|224,y[q++]=b>>6&63|128):(y[q++]=b>>18&7|240,y[q++]=b>>12&63|128,y[q++]=b>>6&63|128)}y[q++]=63&b|128}else y[q++]=b}}(i,this.bytes,this.pos),this.pos+=u},p.prototype.encodeObject=function(i,a){var u=this.extensionCodec.tryToEncode(i,this.context);if(u!=null)this.encodeExtension(u);else if(Array.isArray(i))this.encodeArray(i,a);else if(ArrayBuffer.isView(i))this.encodeBinary(i);else{if(typeof i!="object")throw new Error("Unrecognized object: "+Object.prototype.toString.apply(i));this.encodeMap(i,a)}},p.prototype.encodeBinary=function(i){var a=i.byteLength;if(a<256)this.writeU8(196),this.writeU8(a);else if(a<65536)this.writeU8(197),this.writeU16(a);else{if(!(a<4294967296))throw new Error("Too large binary: "+a);this.writeU8(198),this.writeU32(a)}var u=U(i);this.writeU8a(u)},p.prototype.encodeArray=function(i,a){var u,c,y=i.length;if(y<16)this.writeU8(144+y);else if(y<65536)this.writeU8(220),this.writeU16(y);else{if(!(y<4294967296))throw new Error("Too large array: "+y);this.writeU8(221),this.writeU32(y)}try{for(var f=S(i),I=f.next();!I.done;I=f.next()){var q=I.value;this.doEncode(q,a+1)}}catch(V){u={error:V}}finally{try{I&&!I.done&&(c=f.return)&&c.call(f)}finally{if(u)throw u.error}}},p.prototype.countWithoutUndefined=function(i,a){var u,c,y=0;try{for(var f=S(a),I=f.next();!I.done;I=f.next())i[I.value]!==void 0&&y++}catch(q){u={error:q}}finally{try{I&&!I.done&&(c=f.return)&&c.call(f)}finally{if(u)throw u.error}}return y},p.prototype.encodeMap=function(i,a){var u,c,y=Object.keys(i);this.sortKeys&&y.sort();var f=this.ignoreUndefined?this.countWithoutUndefined(i,y):y.length;if(f<16)this.writeU8(128+f);else if(f<65536)this.writeU8(222),this.writeU16(f);else{if(!(f<4294967296))throw new Error("Too large map object: "+f);this.writeU8(223),this.writeU32(f)}try{for(var I=S(y),q=I.next();!q.done;q=I.next()){var V=q.value,b=i[V];this.ignoreUndefined&&b===void 0||(this.encodeString(V),this.doEncode(b,a+1))}}catch(H){u={error:H}}finally{try{q&&!q.done&&(c=I.return)&&c.call(I)}finally{if(u)throw u.error}}},p.prototype.encodeExtension=function(i){var a=i.data.length;if(a===1)this.writeU8(212);else if(a===2)this.writeU8(213);else if(a===4)this.writeU8(214);else if(a===8)this.writeU8(215);else if(a===16)this.writeU8(216);else if(a<256)this.writeU8(199),this.writeU8(a);else if(a<65536)this.writeU8(200),this.writeU16(a);else{if(!(a<4294967296))throw new Error("Too large extension object: "+a);this.writeU8(201),this.writeU32(a)}this.writeI8(i.type),this.writeU8a(i.data)},p.prototype.writeU8=function(i){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,i),this.pos++},p.prototype.writeU8a=function(i){var a=i.length;this.ensureBufferSizeToWrite(a),this.bytes.set(i,this.pos),this.pos+=a},p.prototype.writeI8=function(i){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,i),this.pos++},p.prototype.writeU16=function(i){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,i),this.pos+=2},p.prototype.writeI16=function(i){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,i),this.pos+=2},p.prototype.writeU32=function(i){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,i),this.pos+=4},p.prototype.writeI32=function(i){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,i),this.pos+=4},p.prototype.writeF32=function(i){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,i),this.pos+=4},p.prototype.writeF64=function(i){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,i),this.pos+=8},p.prototype.writeU64=function(i){this.ensureBufferSizeToWrite(8),function(a,u,c){var y=c/4294967296,f=c;a.setUint32(u,y),a.setUint32(u+4,f)}(this.view,this.pos,i),this.pos+=8},p.prototype.writeI64=function(i){this.ensureBufferSizeToWrite(8),Ee(this.view,this.pos,i),this.pos+=8},p.prototype.writeBig64=function(i){this.ensureBufferSizeToWrite(8),function(a,u,c){var y=Number(c/BigInt(4294967296)),f=Number(c%BigInt(4294967296));y<0&&f!==0&&(y-=1),a.setUint32(u,y),a.setUint32(u+4,f)}(this.view,this.pos,i),this.pos+=8},p}(),h={};function x(p,i){return i===void 0&&(i=h),new $(i.extensionCodec,i.context,i.maxDepth,i.initialBufferSize,i.sortKeys,i.forceFloat32,i.ignoreUndefined,i.forceIntegerToFloat).encode(p)}function v(p){return(p<0?"-":"")+"0x"+Math.abs(p).toString(16).padStart(2,"0")}var R=function(){function p(i,a){i===void 0&&(i=16),a===void 0&&(a=16),this.maxKeyLength=i,this.maxLengthPerKey=a,this.hit=0,this.miss=0,this.caches=[];for(var u=0;u<this.maxKeyLength;u++)this.caches.push([])}return p.prototype.canBeCached=function(i){return i>0&&i<=this.maxKeyLength},p.prototype.get=function(i,a,u){var c=this.caches[u-1],y=c.length;e:for(var f=0;f<y;f++){for(var I=c[f],q=I.bytes,V=0;V<u;V++)if(q[V]!==i[a+V])continue e;return I.value}return null},p.prototype.store=function(i,a){var u=this.caches[i.length-1],c={bytes:i,value:a};u.length>=this.maxLengthPerKey?u[Math.random()*u.length|0]=c:u.push(c)},p.prototype.decode=function(i,a,u){var c=this.get(i,a,u);if(c!=null)return this.hit++,c;this.miss++;var y=m(i,a,u),f=Uint8Array.prototype.slice.call(i,a,a+u);return this.store(f,y),y},p}(),W=function(p,i,a,u){return new(a||(a=Promise))(function(c,y){function f(V){try{q(u.next(V))}catch(b){y(b)}}function I(V){try{q(u.throw(V))}catch(b){y(b)}}function q(V){var b;V.done?c(V.value):(b=V.value,b instanceof a?b:new a(function(H){H(b)})).then(f,I)}q((u=u.apply(p,i||[])).next())})},Q=function(p,i){var a,u,c,y,f={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return y={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(y[Symbol.iterator]=function(){return this}),y;function I(q){return function(V){return function(b){if(a)throw new TypeError("Generator is already executing.");for(;f;)try{if(a=1,u&&(c=2&b[0]?u.return:b[0]?u.throw||((c=u.return)&&c.call(u),0):u.next)&&!(c=c.call(u,b[1])).done)return c;switch(u=0,c&&(b=[2&b[0],c.value]),b[0]){case 0:case 1:c=b;break;case 4:return f.label++,{value:b[1],done:!1};case 5:f.label++,u=b[1],b=[0];continue;case 7:b=f.ops.pop(),f.trys.pop();continue;default:if(c=f.trys,!((c=c.length>0&&c[c.length-1])||b[0]!==6&&b[0]!==2)){f=0;continue}if(b[0]===3&&(!c||b[1]>c[0]&&b[1]<c[3])){f.label=b[1];break}if(b[0]===6&&f.label<c[1]){f.label=c[1],c=b;break}if(c&&f.label<c[2]){f.label=c[2],f.ops.push(b);break}c[2]&&f.ops.pop(),f.trys.pop();continue}b=i.call(p,f)}catch(H){b=[6,H],u=0}finally{a=c=0}if(5&b[0])throw b[1];return{value:b[0]?b[1]:void 0,done:!0}}([q,V])}}},xe=function(p){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,a=p[Symbol.asyncIterator];return a?a.call(p):(p=typeof __values=="function"?__values(p):p[Symbol.iterator](),i={},u("next"),u("throw"),u("return"),i[Symbol.asyncIterator]=function(){return this},i);function u(c){i[c]=p[c]&&function(y){return new Promise(function(f,I){(function(q,V,b,H){Promise.resolve(H).then(function(re){q({value:re,done:b})},V)})(f,I,(y=p[c](y)).done,y.value)})}}},ge=function(p){return this instanceof ge?(this.v=p,this):new ge(p)},Ae=function(p,i,a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var u,c=a.apply(p,i||[]),y=[];return u={},f("next"),f("throw"),f("return"),u[Symbol.asyncIterator]=function(){return this},u;function f(H){c[H]&&(u[H]=function(re){return new Promise(function(we,pe){y.push([H,re,we,pe])>1||I(H,re)})})}function I(H,re){try{(we=c[H](re)).value instanceof ge?Promise.resolve(we.value.v).then(q,V):b(y[0][2],we)}catch(pe){b(y[0][3],pe)}var we}function q(H){I("next",H)}function V(H){I("throw",H)}function b(H,re){H(re),y.shift(),y.length&&I(y[0][0],y[0][1])}},ve=new DataView(new ArrayBuffer(0)),Ie=new Uint8Array(ve.buffer),Se=function(){try{ve.getInt8(0)}catch(p){return p.constructor}throw new Error("never reached")}(),me=new Se("Insufficient data"),ae=new R,Te=function(){function p(i,a,u,c,y,f,I,q){i===void 0&&(i=g.defaultCodec),a===void 0&&(a=void 0),u===void 0&&(u=4294967295),c===void 0&&(c=4294967295),y===void 0&&(y=4294967295),f===void 0&&(f=4294967295),I===void 0&&(I=4294967295),q===void 0&&(q=ae),this.extensionCodec=i,this.context=a,this.maxStrLength=u,this.maxBinLength=c,this.maxArrayLength=y,this.maxMapLength=f,this.maxExtLength=I,this.keyDecoder=q,this.totalPos=0,this.pos=0,this.view=ve,this.bytes=Ie,this.headByte=-1,this.stack=[]}return p.prototype.reinitializeState=function(){this.totalPos=0,this.headByte=-1},p.prototype.setBuffer=function(i){this.bytes=U(i),this.view=function(a){if(a instanceof ArrayBuffer)return new DataView(a);var u=U(a);return new DataView(u.buffer,u.byteOffset,u.byteLength)}(this.bytes),this.pos=0},p.prototype.appendBuffer=function(i){if(this.headByte!==-1||this.hasRemaining()){var a=this.bytes.subarray(this.pos),u=U(i),c=new Uint8Array(a.length+u.length);c.set(a),c.set(u,a.length),this.setBuffer(c)}else this.setBuffer(i)},p.prototype.hasRemaining=function(i){return i===void 0&&(i=1),this.view.byteLength-this.pos>=i},p.prototype.createNoExtraBytesError=function(i){var a=this.view,u=this.pos;return new RangeError("Extra "+(a.byteLength-u)+" of "+a.byteLength+" byte(s) found at buffer["+i+"]")},p.prototype.decode=function(i){return this.reinitializeState(),this.setBuffer(i),this.doDecodeSingleSync()},p.prototype.doDecodeSingleSync=function(){var i=this.doDecodeSync();if(this.hasRemaining())throw this.createNoExtraBytesError(this.pos);return i},p.prototype.decodeAsync=function(i){var a,u,c,y;return W(this,void 0,void 0,function(){var f,I,q,V,b,H,re,we;return Q(this,function(pe){switch(pe.label){case 0:f=!1,pe.label=1;case 1:pe.trys.push([1,6,7,12]),a=xe(i),pe.label=2;case 2:return[4,a.next()];case 3:if((u=pe.sent()).done)return[3,5];if(q=u.value,f)throw this.createNoExtraBytesError(this.totalPos);this.appendBuffer(q);try{I=this.doDecodeSync(),f=!0}catch(Ue){if(!(Ue instanceof Se))throw Ue}this.totalPos+=this.pos,pe.label=4;case 4:return[3,2];case 5:return[3,12];case 6:return V=pe.sent(),c={error:V},[3,12];case 7:return pe.trys.push([7,,10,11]),u&&!u.done&&(y=a.return)?[4,y.call(a)]:[3,9];case 8:pe.sent(),pe.label=9;case 9:return[3,11];case 10:if(c)throw c.error;return[7];case 11:return[7];case 12:if(f){if(this.hasRemaining())throw this.createNoExtraBytesError(this.totalPos);return[2,I]}throw H=(b=this).headByte,re=b.pos,we=b.totalPos,new RangeError("Insufficient data in parcing "+v(H)+" at "+we+" ("+re+" in the current buffer)")}})})},p.prototype.decodeArrayStream=function(i){return this.decodeMultiAsync(i,!0)},p.prototype.decodeStream=function(i){return this.decodeMultiAsync(i,!1)},p.prototype.decodeMultiAsync=function(i,a){return Ae(this,arguments,function(){var u,c,y,f,I,q,V,b,H;return Q(this,function(re){switch(re.label){case 0:u=a,c=-1,re.label=1;case 1:re.trys.push([1,13,14,19]),y=xe(i),re.label=2;case 2:return[4,ge(y.next())];case 3:if((f=re.sent()).done)return[3,12];if(I=f.value,a&&c===0)throw this.createNoExtraBytesError(this.totalPos);this.appendBuffer(I),u&&(c=this.readArraySize(),u=!1,this.complete()),re.label=4;case 4:re.trys.push([4,9,,10]),re.label=5;case 5:return[4,ge(this.doDecodeSync())];case 6:return[4,re.sent()];case 7:return re.sent(),--c==0?[3,8]:[3,5];case 8:return[3,10];case 9:if(!((q=re.sent())instanceof Se))throw q;return[3,10];case 10:this.totalPos+=this.pos,re.label=11;case 11:return[3,2];case 12:return[3,19];case 13:return V=re.sent(),b={error:V},[3,19];case 14:return re.trys.push([14,,17,18]),f&&!f.done&&(H=y.return)?[4,ge(H.call(y))]:[3,16];case 15:re.sent(),re.label=16;case 16:return[3,18];case 17:if(b)throw b.error;return[7];case 18:return[7];case 19:return[2]}})})},p.prototype.doDecodeSync=function(){e:for(;;){var i=this.readHeadByte(),a=void 0;if(i>=224)a=i-256;else if(i<192)if(i<128)a=i;else if(i<144){if((c=i-128)!==0){this.pushMapState(c),this.complete();continue e}a={}}else if(i<160){if((c=i-144)!==0){this.pushArrayState(c),this.complete();continue e}a=[]}else{var u=i-160;a=this.decodeUtf8String(u,0)}else if(i===192)a=null;else if(i===194)a=!1;else if(i===195)a=!0;else if(i===202)a=this.readF32();else if(i===203)a=this.readF64();else if(i===204)a=this.readU8();else if(i===205)a=this.readU16();else if(i===206)a=this.readU32();else if(i===207)a=this.readU64();else if(i===208)a=this.readI8();else if(i===209)a=this.readI16();else if(i===210)a=this.readI32();else if(i===211)a=this.readI64();else if(i===217)u=this.lookU8(),a=this.decodeUtf8String(u,1);else if(i===218)u=this.lookU16(),a=this.decodeUtf8String(u,2);else if(i===219)u=this.lookU32(),a=this.decodeUtf8String(u,4);else if(i===220){if((c=this.readU16())!==0){this.pushArrayState(c),this.complete();continue e}a=[]}else if(i===221){if((c=this.readU32())!==0){this.pushArrayState(c),this.complete();continue e}a=[]}else if(i===222){if((c=this.readU16())!==0){this.pushMapState(c),this.complete();continue e}a={}}else if(i===223){if((c=this.readU32())!==0){this.pushMapState(c),this.complete();continue e}a={}}else if(i===196){var c=this.lookU8();a=this.decodeBinary(c,1)}else if(i===197)c=this.lookU16(),a=this.decodeBinary(c,2);else if(i===198)c=this.lookU32(),a=this.decodeBinary(c,4);else if(i===212)a=this.decodeExtension(1,0);else if(i===213)a=this.decodeExtension(2,0);else if(i===214)a=this.decodeExtension(4,0);else if(i===215)a=this.decodeExtension(8,0);else if(i===216)a=this.decodeExtension(16,0);else if(i===199)c=this.lookU8(),a=this.decodeExtension(c,1);else if(i===200)c=this.lookU16(),a=this.decodeExtension(c,2);else{if(i!==201)throw new Error("Unrecognized type byte: "+v(i));c=this.lookU32(),a=this.decodeExtension(c,4)}this.complete();for(var y=this.stack;y.length>0;){var f=y[y.length-1];if(f.type===0){if(f.array[f.position]=a,f.position++,f.position!==f.size)continue e;y.pop(),a=f.array}else{if(f.type===1){if(I=void 0,(I=typeof a)!="string"&&I!=="number")throw new Error("The type of key must be string or number but "+typeof a);f.key=a,f.type=2;continue e}if(f.map[f.key]=a,f.readCount++,f.readCount!==f.size){f.key=null,f.type=1;continue e}y.pop(),a=f.map}}return a}var I},p.prototype.readHeadByte=function(){return this.headByte===-1&&(this.headByte=this.readU8()),this.headByte},p.prototype.complete=function(){this.headByte=-1},p.prototype.readArraySize=function(){var i=this.readHeadByte();switch(i){case 220:return this.readU16();case 221:return this.readU32();default:if(i<160)return i-144;throw new Error("Unrecognized array type byte: "+v(i))}},p.prototype.pushMapState=function(i){if(i>this.maxMapLength)throw new Error("Max length exceeded: map length ("+i+") > maxMapLengthLength ("+this.maxMapLength+")");this.stack.push({type:1,size:i,key:null,readCount:0,map:{}})},p.prototype.pushArrayState=function(i){if(i>this.maxArrayLength)throw new Error("Max length exceeded: array length ("+i+") > maxArrayLength ("+this.maxArrayLength+")");this.stack.push({type:0,size:i,array:new Array(i),position:0})},p.prototype.decodeUtf8String=function(i,a){var u;if(i>this.maxStrLength)throw new Error("Max length exceeded: UTF-8 byte length ("+i+") > maxStrLength ("+this.maxStrLength+")");if(this.bytes.byteLength<this.pos+a+i)throw me;var c,y=this.pos+a;return c=this.stateIsMapKey()&&((u=this.keyDecoder)===null||u===void 0?void 0:u.canBeCached(i))?this.keyDecoder.decode(this.bytes,y,i):k&&i>ie?function(f,I,q){var V=f.subarray(I,I+q);return fe.decode(V)}(this.bytes,y,i):m(this.bytes,y,i),this.pos+=a+i,c},p.prototype.stateIsMapKey=function(){return this.stack.length>0&&this.stack[this.stack.length-1].type===1},p.prototype.decodeBinary=function(i,a){if(i>this.maxBinLength)throw new Error("Max length exceeded: bin length ("+i+") > maxBinLength ("+this.maxBinLength+")");if(!this.hasRemaining(i+a))throw me;var u=this.pos+a,c=this.bytes.subarray(u,u+i);return this.pos+=a+i,c},p.prototype.decodeExtension=function(i,a){if(i>this.maxExtLength)throw new Error("Max length exceeded: ext length ("+i+") > maxExtLength ("+this.maxExtLength+")");var u=this.view.getInt8(this.pos+a),c=this.decodeBinary(i,a+1);return this.extensionCodec.decode(c,u,this.context)},p.prototype.lookU8=function(){return this.view.getUint8(this.pos)},p.prototype.lookU16=function(){return this.view.getUint16(this.pos)},p.prototype.lookU32=function(){return this.view.getUint32(this.pos)},p.prototype.readU8=function(){var i=this.view.getUint8(this.pos);return this.pos++,i},p.prototype.readI8=function(){var i=this.view.getInt8(this.pos);return this.pos++,i},p.prototype.readU16=function(){var i=this.view.getUint16(this.pos);return this.pos+=2,i},p.prototype.readI16=function(){var i=this.view.getInt16(this.pos);return this.pos+=2,i},p.prototype.readU32=function(){var i=this.view.getUint32(this.pos);return this.pos+=4,i},p.prototype.readI32=function(){var i=this.view.getInt32(this.pos);return this.pos+=4,i},p.prototype.readU64=function(){var i,a,u,c,y=(i=this.view,a=this.pos,u=i.getUint32(a),c=i.getUint32(a+4),u>Math.floor(Number.MAX_SAFE_INTEGER/4294967296)?BigInt(u)*BigInt(4294967296)+BigInt(c):4294967296*u+c);return this.pos+=8,y},p.prototype.readI64=function(){var i=Z(this.view,this.pos);return this.pos+=8,i},p.prototype.readF32=function(){var i=this.view.getFloat32(this.pos);return this.pos+=4,i},p.prototype.readF64=function(){var i=this.view.getFloat64(this.pos);return this.pos+=8,i},p}(),De={};function Ce(p,i){return i===void 0&&(i=De),new Te(i.extensionCodec,i.context,i.maxStrLength,i.maxBinLength,i.maxArrayLength,i.maxMapLength,i.maxExtLength).decode(p)}var je=function(p,i){var a,u,c,y,f={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return y={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(y[Symbol.iterator]=function(){return this}),y;function I(q){return function(V){return function(b){if(a)throw new TypeError("Generator is already executing.");for(;f;)try{if(a=1,u&&(c=2&b[0]?u.return:b[0]?u.throw||((c=u.return)&&c.call(u),0):u.next)&&!(c=c.call(u,b[1])).done)return c;switch(u=0,c&&(b=[2&b[0],c.value]),b[0]){case 0:case 1:c=b;break;case 4:return f.label++,{value:b[1],done:!1};case 5:f.label++,u=b[1],b=[0];continue;case 7:b=f.ops.pop(),f.trys.pop();continue;default:if(c=f.trys,!((c=c.length>0&&c[c.length-1])||b[0]!==6&&b[0]!==2)){f=0;continue}if(b[0]===3&&(!c||b[1]>c[0]&&b[1]<c[3])){f.label=b[1];break}if(b[0]===6&&f.label<c[1]){f.label=c[1],c=b;break}if(c&&f.label<c[2]){f.label=c[2],f.ops.push(b);break}c[2]&&f.ops.pop(),f.trys.pop();continue}b=i.call(p,f)}catch(H){b=[6,H],u=0}finally{a=c=0}if(5&b[0])throw b[1];return{value:b[0]?b[1]:void 0,done:!0}}([q,V])}}},M=function(p){return this instanceof M?(this.v=p,this):new M(p)},G=function(p,i,a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var u,c=a.apply(p,i||[]),y=[];return u={},f("next"),f("throw"),f("return"),u[Symbol.asyncIterator]=function(){return this},u;function f(H){c[H]&&(u[H]=function(re){return new Promise(function(we,pe){y.push([H,re,we,pe])>1||I(H,re)})})}function I(H,re){try{(we=c[H](re)).value instanceof M?Promise.resolve(we.value.v).then(q,V):b(y[0][2],we)}catch(pe){b(y[0][3],pe)}var we}function q(H){I("next",H)}function V(H){I("throw",H)}function b(H,re){H(re),y.shift(),y.length&&I(y[0][0],y[0][1])}};function B(p){if(p==null)throw new Error("Assertion Failure: value must not be null nor undefined")}function ee(p){return p[Symbol.asyncIterator]!=null?p:function(i){return G(this,arguments,function(){var a,u,c,y;return je(this,function(f){switch(f.label){case 0:a=i.getReader(),f.label=1;case 1:f.trys.push([1,,9,10]),f.label=2;case 2:return[4,M(a.read())];case 3:return u=f.sent(),c=u.done,y=u.value,c?[4,M(void 0)]:[3,5];case 4:return[2,f.sent()];case 5:return B(y),[4,M(y)];case 6:return[4,f.sent()];case 7:return f.sent(),[3,2];case 8:return[3,10];case 9:return a.releaseLock(),[7];case 10:return[2]}})})}(p)}var te=function(p,i,a,u){return new(a||(a=Promise))(function(c,y){function f(V){try{q(u.next(V))}catch(b){y(b)}}function I(V){try{q(u.throw(V))}catch(b){y(b)}}function q(V){var b;V.done?c(V.value):(b=V.value,b instanceof a?b:new a(function(H){H(b)})).then(f,I)}q((u=u.apply(p,i||[])).next())})},et=function(p,i){var a,u,c,y,f={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return y={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(y[Symbol.iterator]=function(){return this}),y;function I(q){return function(V){return function(b){if(a)throw new TypeError("Generator is already executing.");for(;f;)try{if(a=1,u&&(c=2&b[0]?u.return:b[0]?u.throw||((c=u.return)&&c.call(u),0):u.next)&&!(c=c.call(u,b[1])).done)return c;switch(u=0,c&&(b=[2&b[0],c.value]),b[0]){case 0:case 1:c=b;break;case 4:return f.label++,{value:b[1],done:!1};case 5:f.label++,u=b[1],b=[0];continue;case 7:b=f.ops.pop(),f.trys.pop();continue;default:if(c=f.trys,!((c=c.length>0&&c[c.length-1])||b[0]!==6&&b[0]!==2)){f=0;continue}if(b[0]===3&&(!c||b[1]>c[0]&&b[1]<c[3])){f.label=b[1];break}if(b[0]===6&&f.label<c[1]){f.label=c[1],c=b;break}if(c&&f.label<c[2]){f.label=c[2],f.ops.push(b);break}c[2]&&f.ops.pop(),f.trys.pop();continue}b=i.call(p,f)}catch(H){b=[6,H],u=0}finally{a=c=0}if(5&b[0])throw b[1];return{value:b[0]?b[1]:void 0,done:!0}}([q,V])}}};function lt(p,i){return i===void 0&&(i=De),te(this,void 0,void 0,function(){var a;return et(this,function(u){return a=ee(p),[2,new Te(i.extensionCodec,i.context,i.maxStrLength,i.maxBinLength,i.maxArrayLength,i.maxMapLength,i.maxExtLength).decodeAsync(a)]})})}function it(p,i){i===void 0&&(i=De);var a=ee(p);return new Te(i.extensionCodec,i.context,i.maxStrLength,i.maxBinLength,i.maxArrayLength,i.maxMapLength,i.maxExtLength).decodeArrayStream(a)}function ht(p,i){i===void 0&&(i=De);var a=ee(p);return new Te(i.extensionCodec,i.context,i.maxStrLength,i.maxBinLength,i.maxArrayLength,i.maxMapLength,i.maxExtLength).decodeStream(a)}}])})},88814:function(Be,Ke,ce){"use strict";ce.d(Ke,{wj:function(){return Me},ZP:function(){return ga},nJ:function(){return Oe}});var de={};ce.r(de),ce.d(de,{Account:function(){return nr},AccountApplicationResponse:function(){return dn},AccountAssetResponse:function(){return pn},AccountParticipation:function(){return sr},AccountStateDelta:function(){return $t},Application:function(){return Bt},ApplicationLocalState:function(){return Lt},ApplicationParams:function(){return St},ApplicationStateSchema:function(){return ot},Asset:function(){return ir},AssetHolding:function(){return Ot},AssetParams:function(){return Mt},BlockHashResponse:function(){return gn},BlockResponse:function(){return mn},Box:function(){return or},BoxDescriptor:function(){return ar},BoxesResponse:function(){return ur},BuildVersion:function(){return cr},CompileResponse:function(){return yn},DisassembleResponse:function(){return wn},DryrunRequest:function(){return fr},DryrunResponse:function(){return bn},DryrunSource:function(){return lr},DryrunState:function(){return Nt},DryrunTxnResult:function(){return hr},ErrorResponse:function(){return xn},EvalDelta:function(){return dr},EvalDeltaKeyValue:function(){return kt},LightBlockHeaderProof:function(){return An},NodeStatusResponse:function(){return Fn},PendingTransactionResponse:function(){return pr},PendingTransactionsResponse:function(){return vn},PostTransactionsResponse:function(){return _n},StateProof:function(){return En},StateProofMessage:function(){return gr},SupplyResponse:function(){return Tn},TealKeyValue:function(){return Kt},TealValue:function(){return It},TransactionParametersResponse:function(){return Rn},TransactionProofResponse:function(){return Bn},Version:function(){return Sn}});var ye={};ce.r(ye),ce.d(ye,{Account:function(){return zt},AccountParticipation:function(){return mr},AccountResponse:function(){return In},AccountStateDelta:function(){return yr},AccountsResponse:function(){return Dn},Application:function(){return Dt},ApplicationLocalState:function(){return Gt},ApplicationLocalStatesResponse:function(){return Un},ApplicationLogData:function(){return wr},ApplicationLogsResponse:function(){return Cn},ApplicationParams:function(){return br},ApplicationResponse:function(){return jn},ApplicationStateSchema:function(){return xt},ApplicationsResponse:function(){return Pn},Asset:function(){return Ut},AssetBalancesResponse:function(){return qn},AssetHolding:function(){return Ht},AssetHoldingsResponse:function(){return $n},AssetParams:function(){return Vt},AssetResponse:function(){return Ln},AssetsResponse:function(){return On},Block:function(){return Mn},BlockRewards:function(){return xr},BlockUpgradeState:function(){return Ar},BlockUpgradeVote:function(){return Fr},Box:function(){return vr},BoxDescriptor:function(){return _r},BoxesResponse:function(){return Er},ErrorResponse:function(){return Nn},EvalDelta:function(){return Tr},EvalDeltaKeyValue:function(){return Wt},HashFactory:function(){return Rr},HealthCheck:function(){return Kn},IndexerStateProofMessage:function(){return Br},MerkleArrayProof:function(){return Ct},MiniAssetHolding:function(){return Sr},ParticipationUpdates:function(){return kr},StateProofFields:function(){return Ir},StateProofParticipant:function(){return Dr},StateProofReveal:function(){return Ur},StateProofSigSlot:function(){return Cr},StateProofSignature:function(){return jr},StateProofTracking:function(){return Pr},StateProofVerifier:function(){return qr},StateSchema:function(){return Xt},TealKeyValue:function(){return Jt},TealValue:function(){return $r},Transaction:function(){return At},TransactionApplication:function(){return Lr},TransactionAssetConfig:function(){return Or},TransactionAssetFreeze:function(){return Mr},TransactionAssetTransfer:function(){return Nr},TransactionKeyreg:function(){return Kr},TransactionPayment:function(){return zr},TransactionResponse:function(){return zn},TransactionSignature:function(){return Gr},TransactionSignatureLogicsig:function(){return Hr},TransactionSignatureMultisig:function(){return Yt},TransactionSignatureMultisigSubsignature:function(){return Vr},TransactionStateProof:function(){return Wr},TransactionsResponse:function(){return Gn}});var J={};ce.r(J),ce.d(J,{ABIAddressType:function(){return Qt},ABIArrayDynamicType:function(){return tn},ABIArrayStaticType:function(){return en},ABIBoolType:function(){return at},ABIByteType:function(){return Zr},ABIContract:function(){return sa},ABIInterface:function(){return ia},ABIMethod:function(){return Pt},ABIReferenceType:function(){return ct},ABIStringType:function(){return Qr},ABITransactionType:function(){return st},ABITupleType:function(){return ut},ABIType:function(){return Ve},ABIUfixedType:function(){return Yr},ABIUintType:function(){return _t},ADDR_BYTE_SIZE:function(){return Hs},ALGORAND_MIN_TX_FEE:function(){return b},Algodv2:function(){return ji},AtomicTransactionComposer:function(){return pt},AtomicTransactionComposerStatus:function(){return Ye},DryrunResult:function(){return Po},ERROR_INVALID_MICROALGOS:function(){return pa},ERROR_MULTISIG_BAD_SENDER:function(){return da},INVALID_MICROALGOS_ERROR_MSG:function(){return cn},Indexer:function(){return no},IntDecoding:function(){return S},Kmd:function(){return Pi},LENGTH_ENCODE_BYTE_SIZE:function(){return Je},LogicSig:function(){return dt},LogicSigAccount:function(){return Zt},MAX_LEN:function(){return vt},MULTISIG_BAD_SENDER_ERROR_MSG:function(){return Ys},OnApplicationComplete:function(){return q},SINGLE_BOOL_SIZE:function(){return Ws},SINGLE_BYTE_SIZE:function(){return Vs},SourceMap:function(){return So},Transaction:function(){return he},TransactionType:function(){return f},abiCheckTransactionType:function(){return Xs},abiTypeIsReference:function(){return ts},abiTypeIsTransaction:function(){return rn},algosToMicroalgos:function(){return ei},appendSignMultisigTransaction:function(){return xo},appendSignRawMultisigSignature:function(){return Ao},assignGroupID:function(){return ms},bigIntToBytes:function(){return Ft},bytesToBigInt:function(){return Hn},computeGroupID:function(){return gs},createDryrun:function(){return Io},createMultisigTransaction:function(){return bs},decodeAddress:function(){return B},decodeObj:function(){return ha},decodeSignedTransaction:function(){return Ne},decodeUint64:function(){return ge},decodeUnsignedTransaction:function(){return Me},encodeAddress:function(){return te},encodeObj:function(){return la},encodeUint64:function(){return xe},encodeUnsignedTransaction:function(){return Oe},generateAccount:function(){return so},getApplicationAddress:function(){return it},getMethodByName:function(){return rs},indexerModels:function(){return ye},instantiateTxnIfNeeded:function(){return Re},isTransactionWithSigner:function(){return es},isValidAddress:function(){return ee},logicSigFromByte:function(){return Eo},makeApplicationCallTxnFromObject:function(){return Gs},makeApplicationClearStateTxn:function(){return Ks},makeApplicationClearStateTxnFromObject:function(){return Xo},makeApplicationCloseOutTxn:function(){return Ns},makeApplicationCloseOutTxnFromObject:function(){return Wo},makeApplicationCreateTxn:function(){return $s},makeApplicationCreateTxnFromObject:function(){return zo},makeApplicationDeleteTxn:function(){return Os},makeApplicationDeleteTxnFromObject:function(){return Ho},makeApplicationNoOpTxn:function(){return zs},makeApplicationNoOpTxnFromObject:function(){return Jo},makeApplicationOptInTxn:function(){return Ms},makeApplicationOptInTxnFromObject:function(){return Vo},makeApplicationUpdateTxn:function(){return Ls},makeApplicationUpdateTxnFromObject:function(){return Go},makeAssetConfigTxnWithSuggestedParams:function(){return Cs},makeAssetConfigTxnWithSuggestedParamsFromObject:function(){return Oo},makeAssetCreateTxnWithSuggestedParams:function(){return Us},makeAssetCreateTxnWithSuggestedParamsFromObject:function(){return Lo},makeAssetDestroyTxnWithSuggestedParams:function(){return js},makeAssetDestroyTxnWithSuggestedParamsFromObject:function(){return Mo},makeAssetFreezeTxnWithSuggestedParams:function(){return Ps},makeAssetFreezeTxnWithSuggestedParamsFromObject:function(){return No},makeAssetTransferTxnWithSuggestedParams:function(){return qs},makeAssetTransferTxnWithSuggestedParamsFromObject:function(){return Ko},makeBasicAccountTransactionSigner:function(){return Yo},makeKeyRegistrationTxnWithSuggestedParams:function(){return Ds},makeKeyRegistrationTxnWithSuggestedParamsFromObject:function(){return $o},makeLogicSigAccountTransactionSigner:function(){return Zo},makeMultiSigAccountTransactionSigner:function(){return Qo},makePaymentTxnWithSuggestedParams:function(){return Is},makePaymentTxnWithSuggestedParamsFromObject:function(){return qo},masterDerivationKeyToMnemonic:function(){return fo},mergeMultisigTransactions:function(){return Xr},microalgosToAlgos:function(){return Qs},mnemonicFromSeed:function(){return Xn},mnemonicToMasterDerivationKey:function(){return co},mnemonicToSecretKey:function(){return ao},modelsv2:function(){return de},multisigAddress:function(){return Fo},secretKeyToMnemonic:function(){return uo},seedFromMnemonic:function(){return Jn},signBid:function(){return ua},signBytes:function(){return ca},signLogicSigTransaction:function(){return _o},signLogicSigTransactionObject:function(){return Yn},signMultisigTransaction:function(){return Fs},signTransaction:function(){return aa},tealSign:function(){return Es},tealSignFromProgram:function(){return Ro},verifyBytes:function(){return fa},verifyMultisig:function(){return As},verifyTealSign:function(){return To},waitForConfirmation:function(){return fs}});var l=ce(48764),N=ce(50780),L=ce.n(N),k=ce(93434),D=ce.n(k);function Y(n){return D().sha512_256.array(n)}function Fe(n){return L().randomBytes(n)}function be(n){return L().sign.keyPair.fromSeed(n)}function m(){const n=Fe(L().box.secretKeyLength);return be(n)}function fe(n){return n===L().sign.signatureLength}function ie(n){return L().sign.keyPair.fromSecretKey(n)}function le(n,e){return L().sign.detached(n,e)}function Ee(n,e){return L().verify(n,e)}function Z(n,e,t){return L().sign.detached.verify(n,e,t)}const _e=L().sign.publicKeyLength,A=L().sign.secretKeyLength,F=32,T=32;var j=ce(89090),O=ce.n(j),z=ce(4400),g=ce.n(z),U;(function(n){n.DEFAULT="default",n.SAFE="safe",n.MIXED="mixed",n.BIGINT="bigint"})(U||(U={}));var S=U,$=ce(34155);const h=g()({useNativeBigInt:!0,strict:!0});function x(n,e){const t=e&&e.intDecoding?e.intDecoding:S.DEFAULT;return h.parse(n,(r,s)=>{if(s!=null&&typeof s=="object"&&Object.getPrototypeOf(s)==null&&Object.setPrototypeOf(s,Object.prototype),typeof s=="bigint"){if(t==="safe"&&s>Number.MAX_SAFE_INTEGER)throw new Error(`Integer exceeds maximum safe integer: ${s.toString()}. Try parsing with a different intDecoding option.`);return t==="bigint"||t==="mixed"&&s>Number.MAX_SAFE_INTEGER?s:Number(s)}return typeof s=="number"&&t==="bigint"&&Number.isInteger(s)?BigInt(s):s})}function v(n,e){return n.length!==e.length?!1:Array.from(n).every((t,r)=>t===e[r])}function R(...n){const e=n.reduce((s,o)=>s+o.length,0),t=new Uint8Array(e);let r=0;for(let s=0;s<n.length;s++)t.set(n[s],r),r+=n[s].length;return t}function W(n){const e={...n};return Object.keys(e).forEach(t=>{typeof e[t]>"u"&&delete e[t]}),e}function Q(){return typeof $=="object"&&typeof $.versions=="object"&&typeof $.versions.node<"u"}function xe(n){if(!(typeof n=="bigint"||Number.isInteger(n))||n<0||n>BigInt("0xffffffffffffffff"))throw new Error("Input is not a 64-bit unsigned integer");const t=new Uint8Array(8);return new DataView(t.buffer).setBigUint64(0,BigInt(n)),t}function ge(n,e="safe"){if(e!=="safe"&&e!=="mixed"&&e!=="bigint")throw new Error(`Unknown decodingMode option: ${e}`);if(n.byteLength===0||n.byteLength>8)throw new Error(`Data has unacceptable length. Expected length is between 1 and 8, got ${n.byteLength}`);const t=new Uint8Array(8-n.byteLength),r=R(t,n),o=new DataView(r.buffer).getBigUint64(0),d=o>BigInt(Number.MAX_SAFE_INTEGER);if(e==="safe"){if(d)throw new Error(`Integer exceeds maximum safe integer: ${o.toString()}. Try decoding with "mixed" or "safe" decodingMode.`);return Number(o)}return e==="mixed"&&!d?Number(o):o}const Ae=36,ve=4,Ie=58,Se="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ",me=new Uint8Array([77,117,108,116,105,115,105,103,65,100,100,114]),ae=l.Buffer.from("appID"),Te="address seems to be malformed",De="wrong checksum for address",Ce="invalid multisig version",je="bad multisig threshold",M="bad multisig public key - wrong length",G="nacl public key length is not 32 bytes";function B(n){if(typeof n!="string"||n.length!==Ie)throw new Error(Te);const e=O().decode.asBytes(n.toString());if(e.length!==Ae)throw new Error(Te);const t=new Uint8Array(e.slice(0,Ae-ve)),r=new Uint8Array(e.slice(_e,Ae)),s=Y(t).slice(F-ve,F);if(!v(s,r))throw new Error(De);return{publicKey:t,checksum:r}}function ee(n){try{B(n)}catch{return!1}return!0}function te(n){const e=Y(n).slice(_e-ve,_e);return O().encode(R(n,e)).toString().slice(0,Ie)}function et({version:n,threshold:e,pks:t}){if(n!==1||n>255||n<0)throw new Error(Ce);if(e===0||t.length===0||e>t.length||e>255)throw new Error(je);const r=Ae-ve;if(r!==_e)throw new Error(G);const s=new Uint8Array(me.length+2+r*t.length);s.set(me,0),s.set([n],me.length),s.set([e],me.length+1);for(let o=0;o<t.length;o++){if(t[o].length!==r)throw new Error(M);s.set(t[o],me.length+2+o*r)}return new Uint8Array(Y(s))}function lt({version:n,threshold:e,addrs:t}){const r=t.map(s=>B(s).publicKey);return te(et({version:n,threshold:e,pks:r}))}function it(n){const e=R(ae,xe(n)),t=Y(e);return te(new Uint8Array(t))}var ht=ce(66424);const p="The object contains empty or 0 values. First empty or 0 value encountered during encoding: ";function i(n){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&(!n[e]||n[e].length===0))return{containsEmpty:!0,firstEmptyKey:e};return{containsEmpty:!1,firstEmptyKey:void 0}}function a(n){const e=i(n);if(e.containsEmpty)throw new Error(p+e.firstEmptyKey);const t={sortKeys:!0};return ht.encode(n,t)}function u(n){return ht.decode(n)}function c(n,e,t){const r=n.appIndex,s=n.name,o=r===0||r===t;let d=0;if(e!=null&&(d=e.indexOf(r)+1),d===0&&!o)throw new Error(`Box ref with appId ${r} not in foreign-apps`);return{i:d,n:s}}function y(n,e,t){return n==null?[]:n.map(r=>c(r,e,t))}var f;(function(n){n.pay="pay",n.keyreg="keyreg",n.acfg="acfg",n.axfer="axfer",n.afrz="afrz",n.appl="appl",n.stpf="stpf"})(f||(f={}));function I(n){return n===f.pay||n===f.keyreg||n===f.acfg||n===f.axfer||n===f.afrz||n===f.appl||n===f.stpf}var q;(function(n){n[n.NoOpOC=0]="NoOpOC",n[n.OptInOC=1]="OptInOC",n[n.CloseOutOC=2]="CloseOutOC",n[n.ClearStateOC=3]="ClearStateOC",n[n.UpdateApplicationOC=4]="UpdateApplicationOC",n[n.DeleteApplicationOC=5]="DeleteApplicationOC"})(q||(q={}));const V=52,b=1e3,H=32,re=19,we=75,pe=5,Ue=32,$e=5,Le=32,ze=32,Ge=32,He=64;function Pe(n,e,t){if(n==null)return;let r;if(typeof n=="string"?r=l.Buffer.from(n,"base64"):n.constructor===Uint8Array?r=l.Buffer.from(n):l.Buffer.isBuffer(n)&&(r=n),r==null||r.byteLength!==t)throw Error(`${e} must be a ${t} byte Uint8Array or Buffer or base64 string.`);return r}class he{constructor({...e}){this.name="Transaction",this.tag=l.Buffer.from("TX");const t={type:f.pay,flatFee:!1,nonParticipation:!1};if(typeof e.type>"u"&&(e.type=t.type),typeof e.flatFee>"u"&&(e.flatFee=t.flatFee),e.type===f.keyreg&&typeof e.voteKey<"u"&&typeof e.nonParticipation>"u"&&(e.nonParticipation=t.nonParticipation),e.suggestedParams!==void 0){const s=e;s.genesisHash=s.suggestedParams.genesisHash,s.fee=s.suggestedParams.fee,s.suggestedParams.flatFee!==void 0&&(s.flatFee=s.suggestedParams.flatFee),s.firstRound=s.suggestedParams.firstRound,s.lastRound=s.suggestedParams.lastRound,s.genesisID=s.suggestedParams.genesisID}const r=e;if(r.from=B(r.from),r.to!==void 0&&(r.to=B(r.to)),r.closeRemainderTo!==void 0&&(r.closeRemainderTo=B(r.closeRemainderTo)),r.assetManager!==void 0&&(r.assetManager=B(r.assetManager)),r.assetReserve!==void 0&&(r.assetReserve=B(r.assetReserve)),r.assetFreeze!==void 0&&(r.assetFreeze=B(r.assetFreeze)),r.assetClawback!==void 0&&(r.assetClawback=B(r.assetClawback)),r.assetRevocationTarget!==void 0&&(r.assetRevocationTarget=B(r.assetRevocationTarget)),r.freezeAccount!==void 0&&(r.freezeAccount=B(r.freezeAccount)),r.reKeyTo!==void 0&&(r.reKeyTo=B(r.reKeyTo)),r.genesisHash===void 0)throw Error("genesis hash must be specified and in a base64 string.");if(r.genesisHash=l.Buffer.from(r.genesisHash,"base64"),r.amount!==void 0&&(!(Number.isSafeInteger(r.amount)||typeof r.amount=="bigint"&&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(r.extraPages!==void 0&&(!Number.isInteger(r.extraPages)||r.extraPages<0||r.extraPages>3))throw Error("extraPages must be an Integer between and including 0 to 3");if(r.assetTotal!==void 0&&(!(Number.isSafeInteger(r.assetTotal)||typeof r.assetTotal=="bigint"&&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(r.assetDecimals!==void 0&&(!Number.isSafeInteger(r.assetDecimals)||r.assetDecimals<0||r.assetDecimals>re))throw Error(`assetDecimals must be a positive number and smaller than ${re.toString()}`);if(r.assetIndex!==void 0&&(!Number.isSafeInteger(r.assetIndex)||r.assetIndex<0))throw Error("Asset index must be a positive number and smaller than 2^53-1");if(r.appIndex!==void 0&&(!Number.isSafeInteger(r.appIndex)||r.appIndex<0))throw Error("Application index must be a positive number and smaller than 2^53-1");if(r.appLocalInts!==void 0&&(!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(r.appLocalByteSlices!==void 0&&(!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(r.appGlobalInts!==void 0&&(!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(r.appGlobalByteSlices!==void 0&&(!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(r.appApprovalProgram!==void 0&&r.appApprovalProgram.constructor!==Uint8Array)throw Error("appApprovalProgram must be a Uint8Array.");if(r.appClearProgram!==void 0&&r.appClearProgram.constructor!==Uint8Array)throw Error("appClearProgram must be a Uint8Array.");if(r.appArgs!==void 0){if(!Array.isArray(r.appArgs))throw Error("appArgs must be an Array of Uint8Array.");r.appArgs=r.appArgs.slice(),r.appArgs.forEach(s=>{if(s.constructor!==Uint8Array)throw Error("each element of AppArgs must be a Uint8Array.")})}else r.appArgs=[];if(r.appAccounts!==void 0){if(!Array.isArray(r.appAccounts))throw Error("appAccounts must be an Array of addresses.");r.appAccounts=r.appAccounts.map(s=>B(s))}if(r.appForeignApps!==void 0){if(!Array.isArray(r.appForeignApps))throw Error("appForeignApps must be an Array of integers.");r.appForeignApps=r.appForeignApps.slice(),r.appForeignApps.forEach(s=>{if(!Number.isSafeInteger(s)||s<0)throw Error("each foreign application index must be a positive number and smaller than 2^53-1")})}if(r.appForeignAssets!==void 0){if(!Array.isArray(r.appForeignAssets))throw Error("appForeignAssets must be an Array of integers.");r.appForeignAssets=r.appForeignAssets.slice(),r.appForeignAssets.forEach(s=>{if(!Number.isSafeInteger(s)||s<0)throw Error("each foreign asset index must be a positive number and smaller than 2^53-1")})}if(r.boxes!==void 0){if(!Array.isArray(r.boxes))throw Error("boxes must be an Array of BoxReference.");r.boxes=r.boxes.slice(),r.boxes.forEach(s=>{if(!Number.isSafeInteger(s.appIndex)||s.name.constructor!==Uint8Array)throw Error("box app index must be a number and name must be an Uint8Array.")})}if(r.assetMetadataHash!==void 0&&r.assetMetadataHash.length!==0){if(typeof r.assetMetadataHash=="string"&&(r.assetMetadataHash=new Uint8Array(l.Buffer.from(r.assetMetadataHash))),r.assetMetadataHash.constructor!==Uint8Array||r.assetMetadataHash.byteLength!==Le)throw Error(`assetMetadataHash must be a ${Le} byte Uint8Array or string.`);r.assetMetadataHash.every(s=>s===0)&&(r.assetMetadataHash=void 0)}else r.assetMetadataHash=void 0;if(r.note!==void 0){if(r.note.constructor!==Uint8Array)throw Error("note must be a Uint8Array.")}else r.note=new Uint8Array(0);if(r.lease!==void 0){if(r.lease.constructor!==Uint8Array)throw Error("lease must be a Uint8Array.");if(r.lease.length!==H)throw Error(`lease must be of length ${H.toString()}.`);r.lease.every(s=>s===0)&&(r.lease=new Uint8Array(0))}else r.lease=new Uint8Array(0);if(r.voteKey=Pe(r.voteKey,"voteKey",ze),r.selectionKey=Pe(r.selectionKey,"selectionKey",Ge),r.stateProofKey=Pe(r.stateProofKey,"stateProofKey",He),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");if(delete r.suggestedParams,Object.assign(this,W(r)),r.flatFee||(this.fee*=this.estimateSize(),this.fee<b&&(this.fee=b)),this.group=void 0,r.stateProofType!==void 0&&(!Number.isSafeInteger(r.stateProofType)||r.stateProofType<0))throw Error("State Proof type must be a positive number and smaller than 2^53-1");if(r.stateProofMessage!==void 0){if(r.stateProofMessage.constructor!==Uint8Array)throw Error("stateProofMessage must be a Uint8Array.")}else r.stateProofMessage=new Uint8Array(0);if(r.stateProof!==void 0){if(r.stateProof.constructor!==Uint8Array)throw Error("stateProof must be a Uint8Array.")}else r.stateProof=new Uint8Array(0)}get_obj_for_encoding(){if(this.type==="pay"){const e={amt:this.amount,fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:l.Buffer.from(this.note),snd:l.Buffer.from(this.from.publicKey),type:"pay",gen:this.genesisID,gh:this.genesisHash,lx:l.Buffer.from(this.lease),grp:this.group};return this.closeRemainderTo!==void 0&&te(this.closeRemainderTo.publicKey)!==Se&&(e.close=l.Buffer.from(this.closeRemainderTo.publicKey)),this.reKeyTo!==void 0&&(e.rekey=l.Buffer.from(this.reKeyTo.publicKey)),this.to!==void 0&&(e.rcv=l.Buffer.from(this.to.publicKey)),e.note.length||delete e.note,e.amt||delete e.amt,e.fee||delete e.fee,e.fv||delete e.fv,e.gen||delete e.gen,e.grp===void 0&&delete e.grp,e.lx.length||delete e.lx,e.rekey||delete e.rekey,e}if(this.type==="keyreg"){const e={fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:l.Buffer.from(this.note),snd:l.Buffer.from(this.from.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:l.Buffer.from(this.lease),grp:this.group,votekey:this.voteKey,selkey:this.selectionKey,sprfkey:this.stateProofKey,votefst:this.voteFirst,votelst:this.voteLast,votekd:this.voteKeyDilution};return e.note.length||delete e.note,e.lx.length||delete e.lx,e.fee||delete e.fee,e.fv||delete e.fv,e.gen||delete e.gen,e.grp===void 0&&delete e.grp,this.reKeyTo!==void 0&&(e.rekey=l.Buffer.from(this.reKeyTo.publicKey)),this.nonParticipation&&(e.nonpart=!0),e.selkey||delete e.selkey,e.votekey||delete e.votekey,e.sprfkey||delete e.sprfkey,e.votefst||delete e.votefst,e.votelst||delete e.votelst,e.votekd||delete e.votekd,e}if(this.type==="acfg"){const e={fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:l.Buffer.from(this.note),snd:l.Buffer.from(this.from.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:l.Buffer.from(this.lease),grp:this.group,caid:this.assetIndex,apar:{t:this.assetTotal,df:this.assetDefaultFrozen,dc:this.assetDecimals}};return this.assetManager!==void 0&&(e.apar.m=l.Buffer.from(this.assetManager.publicKey)),this.assetReserve!==void 0&&(e.apar.r=l.Buffer.from(this.assetReserve.publicKey)),this.assetFreeze!==void 0&&(e.apar.f=l.Buffer.from(this.assetFreeze.publicKey)),this.assetClawback!==void 0&&(e.apar.c=l.Buffer.from(this.assetClawback.publicKey)),this.assetName!==void 0&&(e.apar.an=this.assetName),this.assetUnitName!==void 0&&(e.apar.un=this.assetUnitName),this.assetURL!==void 0&&(e.apar.au=this.assetURL),this.assetMetadataHash!==void 0&&(e.apar.am=l.Buffer.from(this.assetMetadataHash)),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,this.reKeyTo!==void 0&&(e.rekey=l.Buffer.from(this.reKeyTo.publicKey)),e.caid||delete e.caid,!e.apar.t&&!e.apar.un&&!e.apar.an&&!e.apar.df&&!e.apar.m&&!e.apar.r&&!e.apar.f&&!e.apar.c&&!e.apar.au&&!e.apar.am&&!e.apar.dc?delete e.apar:(e.apar.t||delete e.apar.t,e.apar.dc||delete e.apar.dc,e.apar.un||delete e.apar.un,e.apar.an||delete e.apar.an,e.apar.df||delete e.apar.df,e.apar.m||delete e.apar.m,e.apar.r||delete e.apar.r,e.apar.f||delete e.apar.f,e.apar.c||delete e.apar.c,e.apar.au||delete e.apar.au,e.apar.am||delete e.apar.am),e.grp===void 0&&delete e.grp,e}if(this.type==="axfer"){const e={aamt:this.amount,fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:l.Buffer.from(this.note),snd:l.Buffer.from(this.from.publicKey),arcv:l.Buffer.from(this.to.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:l.Buffer.from(this.lease),grp:this.group,xaid:this.assetIndex};return this.closeRemainderTo!==void 0&&(e.aclose=l.Buffer.from(this.closeRemainderTo.publicKey)),this.assetRevocationTarget!==void 0&&(e.asnd=l.Buffer.from(this.assetRevocationTarget.publicKey)),e.note.length||delete e.note,e.lx.length||delete e.lx,e.aamt||delete e.aamt,e.amt||delete e.amt,e.fee||delete e.fee,e.fv||delete e.fv,e.gen||delete e.gen,e.grp===void 0&&delete e.grp,e.aclose||delete e.aclose,e.asnd||delete e.asnd,e.rekey||delete e.rekey,this.reKeyTo!==void 0&&(e.rekey=l.Buffer.from(this.reKeyTo.publicKey)),e}if(this.type==="afrz"){const e={fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:l.Buffer.from(this.note),snd:l.Buffer.from(this.from.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:l.Buffer.from(this.lease),grp:this.group,faid:this.assetIndex,afrz:this.freezeState};return this.freezeAccount!==void 0&&(e.fadd=l.Buffer.from(this.freezeAccount.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.afrz||delete e.afrz,e.grp===void 0&&delete e.grp,this.reKeyTo!==void 0&&(e.rekey=l.Buffer.from(this.reKeyTo.publicKey)),e}if(this.type==="appl"){const e={fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:l.Buffer.from(this.note),snd:l.Buffer.from(this.from.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:l.Buffer.from(this.lease),grp:this.group,apid:this.appIndex,apan:this.appOnComplete,apls:{nui:this.appLocalInts,nbs:this.appLocalByteSlices},apgs:{nui:this.appGlobalInts,nbs:this.appGlobalByteSlices},apfa:this.appForeignApps,apas:this.appForeignAssets,apep:this.extraPages,apbx:y(this.boxes,this.appForeignApps,this.appIndex)};this.reKeyTo!==void 0&&(e.rekey=l.Buffer.from(this.reKeyTo.publicKey)),this.appApprovalProgram!==void 0&&(e.apap=l.Buffer.from(this.appApprovalProgram)),this.appClearProgram!==void 0&&(e.apsu=l.Buffer.from(this.appClearProgram)),this.appArgs!==void 0&&(e.apaa=this.appArgs.map(t=>l.Buffer.from(t))),this.appAccounts!==void 0&&(e.apat=this.appAccounts.map(t=>l.Buffer.from(t.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;for(const t of e.apbx)t.i||delete t.i,(!t.n||!t.n.length)&&delete t.n;return(!e.apbx||!e.apbx.length)&&delete e.apbx,(!e.apat||!e.apat.length)&&delete e.apat,e.apep||delete e.apep,e.grp===void 0&&delete e.grp,e}if(this.type==="stpf"){const e={fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:l.Buffer.from(this.note),snd:l.Buffer.from(this.from.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:l.Buffer.from(this.lease),sptype:this.stateProofType,spmsg:l.Buffer.from(this.stateProofMessage),sp:l.Buffer.from(this.stateProof)};return e.sptype||delete e.sptype,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.apaa||!e.apaa.length)&&delete e.apaa,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,e.grp===void 0&&delete e.grp,e}}static from_obj_for_encoding(e){const t=Object.create(this.prototype);if(t.name="Transaction",t.tag=l.Buffer.from("TX"),t.genesisID=e.gen,t.genesisHash=l.Buffer.from(e.gh),!I(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=B(te(new Uint8Array(e.snd))),e.grp!==void 0&&(t.group=l.Buffer.from(e.grp)),e.rekey!==void 0&&(t.reKeyTo=B(te(new Uint8Array(e.rekey)))),e.type==="pay"?(t.amount=e.amt,t.to=B(te(new Uint8Array(e.rcv))),e.close!==void 0&&(t.closeRemainderTo=B(te(e.close)))):e.type==="keyreg"?(e.votekey!==void 0&&(t.voteKey=l.Buffer.from(e.votekey)),e.selkey!==void 0&&(t.selectionKey=l.Buffer.from(e.selkey)),e.sprfkey!==void 0&&(t.stateProofKey=l.Buffer.from(e.sprfkey)),e.votekd!==void 0&&(t.voteKeyDilution=e.votekd),e.votefst!==void 0&&(t.voteFirst=e.votefst),e.votelst!==void 0&&(t.voteLast=e.votelst),e.nonpart!==void 0&&(t.nonParticipation=e.nonpart)):e.type==="acfg"?(e.caid!==void 0&&(t.assetIndex=e.caid),e.apar!==void 0&&(t.assetTotal=e.apar.t,t.assetDefaultFrozen=e.apar.df,e.apar.dc!==void 0&&(t.assetDecimals=e.apar.dc),e.apar.m!==void 0&&(t.assetManager=B(te(new Uint8Array(e.apar.m)))),e.apar.r!==void 0&&(t.assetReserve=B(te(new Uint8Array(e.apar.r)))),e.apar.f!==void 0&&(t.assetFreeze=B(te(new Uint8Array(e.apar.f)))),e.apar.c!==void 0&&(t.assetClawback=B(te(new Uint8Array(e.apar.c)))),e.apar.un!==void 0&&(t.assetUnitName=e.apar.un),e.apar.an!==void 0&&(t.assetName=e.apar.an),e.apar.au!==void 0&&(t.assetURL=e.apar.au),e.apar.am!==void 0&&(t.assetMetadataHash=e.apar.am))):e.type==="axfer"?(e.xaid!==void 0&&(t.assetIndex=e.xaid),e.aamt!==void 0&&(t.amount=e.aamt),e.aclose!==void 0&&(t.closeRemainderTo=B(te(new Uint8Array(e.aclose)))),e.asnd!==void 0&&(t.assetRevocationTarget=B(te(new Uint8Array(e.asnd)))),t.to=B(te(new Uint8Array(e.arcv)))):e.type==="afrz"?(e.afrz!==void 0&&(t.freezeState=e.afrz),e.faid!==void 0&&(t.assetIndex=e.faid),t.freezeAccount=B(te(new Uint8Array(e.fadd)))):e.type==="appl"?(e.apid!==void 0&&(t.appIndex=e.apid),e.apan!==void 0&&(t.appOnComplete=e.apan),e.apls!==void 0&&(e.apls.nui!==void 0&&(t.appLocalInts=e.apls.nui),e.apls.nbs!==void 0&&(t.appLocalByteSlices=e.apls.nbs)),e.apgs!==void 0&&(e.apgs.nui!==void 0&&(t.appGlobalInts=e.apgs.nui),e.apgs.nbs!==void 0&&(t.appGlobalByteSlices=e.apgs.nbs)),e.apep!==void 0&&(t.extraPages=e.apep),e.apap!==void 0&&(t.appApprovalProgram=new Uint8Array(e.apap)),e.apsu!==void 0&&(t.appClearProgram=new Uint8Array(e.apsu)),e.apaa!==void 0&&(t.appArgs=e.apaa.map(r=>new Uint8Array(r))),e.apat!==void 0&&(t.appAccounts=e.apat.map(r=>B(te(new Uint8Array(r))))),e.apfa!==void 0&&(t.appForeignApps=e.apfa),e.apas!==void 0&&(t.appForeignAssets=e.apas),e.apbx!==void 0&&(t.boxes=e.apbx.map(r=>({appIndex:r.i?t.appForeignApps[r.i-1]:0,name:r.n})))):e.type==="stpf"&&(e.sptype!==void 0&&(t.stateProofType=e.sptype),e.sp!==void 0&&(t.stateProof=e.sp),e.spmsg!==void 0&&(t.stateProofMessage=e.spmsg)),t}estimateSize(){return this.toByte().length+we}bytesToSign(){const e=this.toByte();return l.Buffer.from(R(this.tag,e))}toByte(){return a(this.get_obj_for_encoding())}rawSignTxn(e){const t=this.bytesToSign(),r=le(t,e);return l.Buffer.from(r)}signTxn(e){const t={sig:this.rawSignTxn(e),txn:this.get_obj_for_encoding()},s=ie(e).publicKey;return te(s)!==te(this.from.publicKey)&&(t.sgnr=l.Buffer.from(s)),new Uint8Array(a(t))}attachSignature(e,t){if(!fe(t.length))throw new Error("Invalid signature length");const r={sig:l.Buffer.from(t),txn:this.get_obj_for_encoding()};if(e!==te(this.from.publicKey)){const s=B(e).publicKey;r.sgnr=l.Buffer.from(s)}return new Uint8Array(a(r))}rawTxID(){const e=this.toByte(),t=l.Buffer.from(R(this.tag,e));return l.Buffer.from(Y(t))}txID(){const e=this.rawTxID();return O().encode(e).slice(0,V)}addLease(e,t=0){let r;if(e!==void 0){if(e.constructor!==Uint8Array)throw Error("lease must be a Uint8Array.");if(e.length!==H)throw Error(`lease must be of length ${H.toString()}.`);r=new Uint8Array(e)}else r=new Uint8Array(0);this.lease=r,t!==0&&(this.fee+=(pe+H)*t)}addRekey(e,t=0){e!==void 0&&(this.reKeyTo=B(e)),t!==0&&(this.fee+=($e+Ue)*t)}_getDictForDisplay(){const e={...this};return e.tag=e.tag.toString(),e.from=te(e.from.publicKey),e.to!==void 0&&(e.to=te(e.to.publicKey)),e.freezeAccount!==void 0&&(e.freezeAccount=te(e.freezeAccount.publicKey)),e.closeRemainderTo!==void 0&&(e.closeRemainderTo=te(e.closeRemainderTo.publicKey)),e.assetManager!==void 0&&(e.assetManager=te(e.assetManager.publicKey)),e.assetReserve!==void 0&&(e.assetReserve=te(e.assetReserve.publicKey)),e.assetFreeze!==void 0&&(e.assetFreeze=te(e.assetFreeze.publicKey)),e.assetClawback!==void 0&&(e.assetClawback=te(e.assetClawback.publicKey)),e.assetRevocationTarget!==void 0&&(e.assetRevocationTarget=te(e.assetRevocationTarget.publicKey)),e.reKeyTo!==void 0&&(e.reKeyTo=te(e.reKeyTo.publicKey)),e.genesisHash=e.genesisHash.toString("base64"),e}prettyPrint(){console.log(this._getDictForDisplay())}toString(){return JSON.stringify(this._getDictForDisplay())}}function Oe(n){const e=n.get_obj_for_encoding();return a(e)}function Me(n){const e=u(n);return he.from_obj_for_encoding(e)}function Ne(n){const e=u(n);return{...e,txn:he.from_obj_for_encoding(e.txn)}}function Re(n){return n instanceof he?n:new he(n)}var ma=null;class Zs{constructor({bidderKey:e,bidAmount:t,bidID:r,auctionKey:s,auctionID:o,maxPrice:d}){this.name="Bid",this.tag=l.Buffer.from([97,66]);const w=B(e),E=B(s);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(o)||o<0)throw Error("auctionID must be positive");Object.assign(this,{bidderKey:w,bidAmount:t,bidID:r,auctionKey:E,auctionID:o,maxPrice:d})}get_obj_for_encoding(){return{bidder:l.Buffer.from(this.bidderKey.publicKey),cur:this.bidAmount,price:this.maxPrice,id:this.bidID,auc:l.Buffer.from(this.auctionKey.publicKey),aid:this.auctionID}}signBid(e){const t=a(this.get_obj_for_encoding()),r=l.Buffer.from(R(this.tag,t)),s=le(r,e),d={t:"b",b:{sig:l.Buffer.from(s),bid:this.get_obj_for_encoding()}};return new Uint8Array(a(d))}}const os=1e6,cn="Microalgos should be positive and less than 2^53 - 1.";function Qs(n){if(n<0||!Number.isSafeInteger(n))throw new Error(cn);return n/os}function ei(n){const e=n*os;return Math.round(e)}var fn=ce(54098);class ti extends Error{constructor(e,t){super(e),this.response=t,this.name="URLTokenBaseHTTPError",this.response=t}}class bt{constructor(e,t,r,s={}){this.defaultHeaders=s;const o=t.endsWith("/")?t:`${t}/`,d=new URL(o);if(typeof r<"u"&&(d.port=r.toString()),d.protocol.length===0)throw new Error("Invalid base server URL, protocol must be defined.");this.baseURL=d,this.tokenHeader=e}getURL(e,t){let r;e.startsWith("./")?r=e:e.startsWith("/")?r=`.${e}`:r=`./${e}`;const s=new URL(r,this.baseURL);if(t)for(const[o,d]of Object.entries(t))s.searchParams.set(o,d);return s.toString()}static formatFetchResponseHeaders(e){const t={};return e.forEach((r,s)=>{t[r]=s}),t}static async checkHttpError(e){if(e.ok)return;let t=null,r=null;try{t=new Uint8Array(await e.arrayBuffer());const o=JSON.parse(l.Buffer.from(t).toString());o.message&&(r=o.message)}catch{}let s=`Network request error. Received status ${e.status} (${e.statusText})`;throw r&&(s+=`: ${r}`),new ti(s,{body:t,status:e.status,headers:bt.formatFetchResponseHeaders(e.headers)})}static async formatFetchResponse(e){return await this.checkHttpError(e),{body:new Uint8Array(await e.arrayBuffer()),status:e.status,headers:bt.formatFetchResponseHeaders(e.headers)}}async get(e,t,r={}){const s={...this.tokenHeader,...this.defaultHeaders,...r},o=await(0,fn.fetch)(this.getURL(e,t),{mode:"cors",headers:s});return bt.formatFetchResponse(o)}async post(e,t,r,s={}){const o={...this.tokenHeader,...this.defaultHeaders,...s},d=await(0,fn.fetch)(this.getURL(e,r),{method:"POST",mode:"cors",body:t,headers:o});return bt.formatFetchResponse(d)}async delete(e,t,r,s={}){const o={...this.tokenHeader,...this.defaultHeaders,...s},d=await(0,fn.fetch)(this.getURL(e,r),{method:"DELETE",mode:"cors",body:t,headers:o});return bt.formatFetchResponse(d)}}function ri(n){for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&(!n[e]||n[e].length===0)&&delete n[e];return n}function as(n){return Object.keys(n).reduce((e,t)=>(e[t.toLowerCase()]=n[t],e),{})}function ni(n){if(n!==void 0&&Object.prototype.hasOwnProperty.call(n,"format"))switch(n.format){case"msgpack":return"application/msgpack";case"json":default:return"application/json"}else return"application/json"}class rt{constructor(e,t,r,s={}){t!==void 0?this.bc=new bt(e,t,r,s):this.bc=e}static parseJSON(e,t,r={}){try{return Object.keys(r).length===0?e&&JSON.parse(e):e&&x(e,r)}catch(s){const o=s;throw o.rawResponse=e||null,o.statusCode=t,o}}static serializeData(e,t){if(!e)return new Uint8Array(0);if(t["content-type"]==="application/json")return new Uint8Array(l.Buffer.from(JSON.stringify(e)));if(typeof e=="string")return new Uint8Array(l.Buffer.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,s={}){let{body:o}=e,d;return t!=="application/msgpack"&&(d=o&&l.Buffer.from(o).toString()||""),r&&t==="application/json"&&(o=rt.parseJSON(d,e.status,s)),{...e,body:o,text:d,ok:Math.trunc(e.status/100)===2}}static prepareResponseError(e){return e.response&&(e.response=rt.prepareResponse(e.response,"application/json",!0),e.status=e.response.status),e}async get(e,t,r={},s={},o=!0){const d=ni(t),w={...r,accept:d};try{const E=await this.bc.get(e,ri(t),w);return rt.prepareResponse(E,d,o,s)}catch(E){throw rt.prepareResponseError(E)}}async post(e,t,r={},s,o=!0){const d={"content-type":"application/json",...as(r)};try{const w=await this.bc.post(e,rt.serializeData(t,d),s,d);return rt.prepareResponse(w,"application/json",o)}catch(w){throw rt.prepareResponseError(w)}}async delete(e,t,r={},s=!0){const o={"content-type":"application/json",...as(r)},d=await this.bc.delete(e,rt.serializeData(t,o),void 0,o);return rt.prepareResponse(d,"application/json",s)}}function si(n="",e){const t={};return t[e]=n,t}function ii(n){return typeof n.get=="function"}class ln{constructor(e,t,r,s,o={}){if(ii(t))this.c=new rt(t);else{let d;typeof t=="string"?d=si(t,e):d=t,this.c=new rt(d,r,s,o)}this.intDecoding=S.DEFAULT}setIntEncoding(e){this.intDecoding=e}getIntEncoding(){return this.intDecoding}}class ue{constructor(e,t){this.c=e,this.query={},this.intDecoding=t||S.DEFAULT}prepare(e){return e}async do(e={}){const t={};this.intDecoding!=="default"&&(t.intDecoding=this.intDecoding);const r=await this.c.get(this.path(),this.query,e,t);return this.prepare(r.body)}async doRaw(e={}){return(await this.c.get(this.path(),this.query,e,{},!1)).body}setIntDecoding(e){if(e!=="default"&&e!=="safe"&&e!=="mixed"&&e!=="bigint")throw new Error(`Invalid method for int decoding: ${e}`);return this.intDecoding=e,this}}class oi extends ue{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}`}exclude(e){return this.query.exclude=e,this}}class ai extends ue{constructor(e,t,r,s){super(e,t),this.account=r,this.assetID=s,this.account=r,this.assetID=s}path(){return`/v2/accounts/${this.account}/assets/${this.assetID}`}}class ui extends ue{constructor(e,t,r,s){super(e,t),this.account=r,this.applicationID=s,this.account=r,this.applicationID=s}path(){return`/v2/accounts/${this.account}/applications/${this.applicationID}`}}class ci extends ue{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 u(e)}}function us(n={}){let e=n;return Object.keys(e).every(t=>t.toLowerCase()!=="content-type")&&(e={...n},e["Content-Type"]="text/plain"),e}class fi extends ue{constructor(e,t){super(e),this.source=t,this.source=t}path(){return"/v2/teal/compile"}sourcemap(e=!0){return this.query.sourcemap=e,this}async do(e={}){const t=us(e);return(await this.c.post(this.path(),l.Buffer.from(this.source),t,this.query)).body}}class li extends ue{constructor(e,t){super(e),this.blob=a(t.get_obj_for_encoding(!0))}path(){return"/v2/teal/dryrun"}async do(e={}){const t=us(e);return(await this.c.post(this.path(),l.Buffer.from(this.blob),t)).body}}class hi extends ue{path(){return"/genesis"}}class di extends ue{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/assets/${this.index}`}}class pi extends ue{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/applications/${this.index}`}}class gi extends ue{constructor(e,t,r){if(super(e,t),!Number.isInteger(r))throw Error("roundNumber should be an integer");this.round=r}path(){return`/v2/blocks/${this.round}/hash`}}function mi(n){return n===void 0||n==null||typeof n!="object"&&typeof n!="function"}function hn(n,e){let t;if(n instanceof Uint8Array)t=e?n:l.Buffer.from(n).toString("base64");else if(typeof n.get_obj_for_encoding=="function")t=n.get_obj_for_encoding(e);else if(Array.isArray(n)){t=[];for(const r of n)t.push(hn(r,e))}else if(typeof n=="object"){const r={};for(const s of Object.keys(n))r[s]=hn(n[s],e);t=r}else if(mi(n))t=n;else throw new Error(`Unsupported value: ${String(n)}`);return t}class P{get_obj_for_encoding(e=!1){const t={};for(const r of Object.keys(this.attribute_map)){const s=this.attribute_map[r],o=this[r];typeof o<"u"&&(t[s]=o===null?null:hn(o,e))}return t}}class nr extends P{constructor({address:e,amount:t,amountWithoutPendingRewards:r,minBalance:s,pendingRewards:o,rewards:d,round:w,status:E,totalAppsOptedIn:C,totalAssetsOptedIn:_,totalCreatedApps:K,totalCreatedAssets:ne,appsLocalState:oe,appsTotalExtraPages:X,appsTotalSchema:se,assets:qe,authAddr:We,createdApps:tt,createdAssets:Et,participation:Tt,rewardBase:Rt,sigType:Ze,totalBoxBytes:Qe,totalBoxes:gt}){super(),this.address=e,this.amount=t,this.amountWithoutPendingRewards=r,this.minBalance=s,this.pendingRewards=o,this.rewards=d,this.round=w,this.status=E,this.totalAppsOptedIn=C,this.totalAssetsOptedIn=_,this.totalCreatedApps=K,this.totalCreatedAssets=ne,this.appsLocalState=oe,this.appsTotalExtraPages=X,this.appsTotalSchema=se,this.assets=qe,this.authAddr=We,this.createdApps=tt,this.createdAssets=Et,this.participation=Tt,this.rewardBase=Rt,this.sigType=Ze,this.totalBoxBytes=Qe,this.totalBoxes=gt,this.attribute_map={address:"address",amount:"amount",amountWithoutPendingRewards:"amount-without-pending-rewards",minBalance:"min-balance",pendingRewards:"pending-rewards",rewards:"rewards",round:"round",status:"status",totalAppsOptedIn:"total-apps-opted-in",totalAssetsOptedIn:"total-assets-opted-in",totalCreatedApps:"total-created-apps",totalCreatedAssets:"total-created-assets",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",totalBoxBytes:"total-box-bytes",totalBoxes:"total-boxes"}}static from_obj_for_encoding(e){if(typeof e.address>"u")throw new Error(`Response is missing required field 'address': ${e}`);if(typeof e.amount>"u")throw new Error(`Response is missing required field 'amount': ${e}`);if(typeof e["amount-without-pending-rewards"]>"u")throw new Error(`Response is missing required field 'amount-without-pending-rewards': ${e}`);if(typeof e["min-balance"]>"u")throw new Error(`Response is missing required field 'min-balance': ${e}`);if(typeof e["pending-rewards"]>"u")throw new Error(`Response is missing required field 'pending-rewards': ${e}`);if(typeof e.rewards>"u")throw new Error(`Response is missing required field 'rewards': ${e}`);if(typeof e.round>"u")throw new Error(`Response is missing required field 'round': ${e}`);if(typeof e.status>"u")throw new Error(`Response is missing required field 'status': ${e}`);if(typeof e["total-apps-opted-in"]>"u")throw new Error(`Response is missing required field 'total-apps-opted-in': ${e}`);if(typeof e["total-assets-opted-in"]>"u")throw new Error(`Response is missing required field 'total-assets-opted-in': ${e}`);if(typeof e["total-created-apps"]>"u")throw new Error(`Response is missing required field 'total-created-apps': ${e}`);if(typeof e["total-created-assets"]>"u")throw new Error(`Response is missing required field 'total-created-assets': ${e}`);return new nr({address:e.address,amount:e.amount,amountWithoutPendingRewards:e["amount-without-pending-rewards"],minBalance:e["min-balance"],pendingRewards:e["pending-rewards"],rewards:e.rewards,round:e.round,status:e.status,totalAppsOptedIn:e["total-apps-opted-in"],totalAssetsOptedIn:e["total-assets-opted-in"],totalCreatedApps:e["total-created-apps"],totalCreatedAssets:e["total-created-assets"],appsLocalState:typeof e["apps-local-state"]<"u"?e["apps-local-state"].map(Lt.from_obj_for_encoding):void 0,appsTotalExtraPages:e["apps-total-extra-pages"],appsTotalSchema:typeof e["apps-total-schema"]<"u"?ot.from_obj_for_encoding(e["apps-total-schema"]):void 0,assets:typeof e.assets<"u"?e.assets.map(Ot.from_obj_for_encoding):void 0,authAddr:e["auth-addr"],createdApps:typeof e["created-apps"]<"u"?e["created-apps"].map(Bt.from_obj_for_encoding):void 0,createdAssets:typeof e["created-assets"]<"u"?e["created-assets"].map(ir.from_obj_for_encoding):void 0,participation:typeof e.participation<"u"?sr.from_obj_for_encoding(e.participation):void 0,rewardBase:e["reward-base"],sigType:e["sig-type"],totalBoxBytes:e["total-box-bytes"],totalBoxes:e["total-boxes"]})}}class dn extends P{constructor({round:e,appLocalState:t,createdApp:r}){super(),this.round=e,this.appLocalState=t,this.createdApp=r,this.attribute_map={round:"round",appLocalState:"app-local-state",createdApp:"created-app"}}static from_obj_for_encoding(e){if(typeof e.round>"u")throw new Error(`Response is missing required field 'round': ${e}`);return new dn({round:e.round,appLocalState:typeof e["app-local-state"]<"u"?Lt.from_obj_for_encoding(e["app-local-state"]):void 0,createdApp:typeof e["created-app"]<"u"?St.from_obj_for_encoding(e["created-app"]):void 0})}}class pn extends P{constructor({round:e,assetHolding:t,createdAsset:r}){super(),this.round=e,this.assetHolding=t,this.createdAsset=r,this.attribute_map={round:"round",assetHolding:"asset-holding",createdAsset:"created-asset"}}static from_obj_for_encoding(e){if(typeof e.round>"u")throw new Error(`Response is missing required field 'round': ${e}`);return new pn({round:e.round,assetHolding:typeof e["asset-holding"]<"u"?Ot.from_obj_for_encoding(e["asset-holding"]):void 0,createdAsset:typeof e["created-asset"]<"u"?Mt.from_obj_for_encoding(e["created-asset"]):void 0})}}class sr extends P{constructor({selectionParticipationKey:e,voteFirstValid:t,voteKeyDilution:r,voteLastValid:s,voteParticipationKey:o,stateProofKey:d}){super(),this.selectionParticipationKey=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.voteFirstValid=t,this.voteKeyDilution=r,this.voteLastValid=s,this.voteParticipationKey=typeof o=="string"?new Uint8Array(l.Buffer.from(o,"base64")):o,this.stateProofKey=typeof d=="string"?new Uint8Array(l.Buffer.from(d,"base64")):d,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"}}static from_obj_for_encoding(e){if(typeof e["selection-participation-key"]>"u")throw new Error(`Response is missing required field 'selection-participation-key': ${e}`);if(typeof e["vote-first-valid"]>"u")throw new Error(`Response is missing required field 'vote-first-valid': ${e}`);if(typeof e["vote-key-dilution"]>"u")throw new Error(`Response is missing required field 'vote-key-dilution': ${e}`);if(typeof e["vote-last-valid"]>"u")throw new Error(`Response is missing required field 'vote-last-valid': ${e}`);if(typeof e["vote-participation-key"]>"u")throw new Error(`Response is missing required field 'vote-participation-key': ${e}`);return new sr({selectionParticipationKey:e["selection-participation-key"],voteFirstValid:e["vote-first-valid"],voteKeyDilution:e["vote-key-dilution"],voteLastValid:e["vote-last-valid"],voteParticipationKey:e["vote-participation-key"],stateProofKey:e["state-proof-key"]})}}class $t extends P{constructor({address:e,delta:t}){super(),this.address=e,this.delta=t,this.attribute_map={address:"address",delta:"delta"}}static from_obj_for_encoding(e){if(typeof e.address>"u")throw new Error(`Response is missing required field 'address': ${e}`);if(!Array.isArray(e.delta))throw new Error(`Response is missing required array field 'delta': ${e}`);return new $t({address:e.address,delta:e.delta.map(kt.from_obj_for_encoding)})}}class Bt extends P{constructor({id:e,params:t}){super(),this.id=e,this.params=t,this.attribute_map={id:"id",params:"params"}}static from_obj_for_encoding(e){if(typeof e.id>"u")throw new Error(`Response is missing required field 'id': ${e}`);if(typeof e.params>"u")throw new Error(`Response is missing required field 'params': ${e}`);return new Bt({id:e.id,params:St.from_obj_for_encoding(e.params)})}}class Lt extends P{constructor({id:e,schema:t,keyValue:r}){super(),this.id=e,this.schema=t,this.keyValue=r,this.attribute_map={id:"id",schema:"schema",keyValue:"key-value"}}static from_obj_for_encoding(e){if(typeof e.id>"u")throw new Error(`Response is missing required field 'id': ${e}`);if(typeof e.schema>"u")throw new Error(`Response is missing required field 'schema': ${e}`);return new Lt({id:e.id,schema:ot.from_obj_for_encoding(e.schema),keyValue:typeof e["key-value"]<"u"?e["key-value"].map(Kt.from_obj_for_encoding):void 0})}}class St extends P{constructor({approvalProgram:e,clearStateProgram:t,creator:r,extraProgramPages:s,globalState:o,globalStateSchema:d,localStateSchema:w}){super(),this.approvalProgram=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.clearStateProgram=typeof t=="string"?new Uint8Array(l.Buffer.from(t,"base64")):t,this.creator=r,this.extraProgramPages=s,this.globalState=o,this.globalStateSchema=d,this.localStateSchema=w,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"}}static from_obj_for_encoding(e){if(typeof e["approval-program"]>"u")throw new Error(`Response is missing required field 'approval-program': ${e}`);if(typeof e["clear-state-program"]>"u")throw new Error(`Response is missing required field 'clear-state-program': ${e}`);if(typeof e.creator>"u")throw new Error(`Response is missing required field 'creator': ${e}`);return new St({approvalProgram:e["approval-program"],clearStateProgram:e["clear-state-program"],creator:e.creator,extraProgramPages:e["extra-program-pages"],globalState:typeof e["global-state"]<"u"?e["global-state"].map(Kt.from_obj_for_encoding):void 0,globalStateSchema:typeof e["global-state-schema"]<"u"?ot.from_obj_for_encoding(e["global-state-schema"]):void 0,localStateSchema:typeof e["local-state-schema"]<"u"?ot.from_obj_for_encoding(e["local-state-schema"]):void 0})}}class ot extends P{constructor({numUint:e,numByteSlice:t}){super(),this.numUint=e,this.numByteSlice=t,this.attribute_map={numUint:"num-uint",numByteSlice:"num-byte-slice"}}static from_obj_for_encoding(e){if(typeof e["num-uint"]>"u")throw new Error(`Response is missing required field 'num-uint': ${e}`);if(typeof e["num-byte-slice"]>"u")throw new Error(`Response is missing required field 'num-byte-slice': ${e}`);return new ot({numUint:e["num-uint"],numByteSlice:e["num-byte-slice"]})}}class ir extends P{constructor({index:e,params:t}){super(),this.index=e,this.params=t,this.attribute_map={index:"index",params:"params"}}static from_obj_for_encoding(e){if(typeof e.index>"u")throw new Error(`Response is missing required field 'index': ${e}`);if(typeof e.params>"u")throw new Error(`Response is missing required field 'params': ${e}`);return new ir({index:e.index,params:Mt.from_obj_for_encoding(e.params)})}}class Ot extends P{constructor({amount:e,assetId:t,isFrozen:r}){super(),this.amount=e,this.assetId=t,this.isFrozen=r,this.attribute_map={amount:"amount",assetId:"asset-id",isFrozen:"is-frozen"}}static from_obj_for_encoding(e){if(typeof e.amount>"u")throw new Error(`Response is missing required field 'amount': ${e}`);if(typeof e["asset-id"]>"u")throw new Error(`Response is missing required field 'asset-id': ${e}`);if(typeof e["is-frozen"]>"u")throw new Error(`Response is missing required field 'is-frozen': ${e}`);return new Ot({amount:e.amount,assetId:e["asset-id"],isFrozen:e["is-frozen"]})}}class Mt extends P{constructor({creator:e,decimals:t,total:r,clawback:s,defaultFrozen:o,freeze:d,manager:w,metadataHash:E,name:C,nameB64:_,reserve:K,unitName:ne,unitNameB64:oe,url:X,urlB64:se}){super(),this.creator=e,this.decimals=t,this.total=r,this.clawback=s,this.defaultFrozen=o,this.freeze=d,this.manager=w,this.metadataHash=typeof E=="string"?new Uint8Array(l.Buffer.from(E,"base64")):E,this.name=C,this.nameB64=typeof _=="string"?new Uint8Array(l.Buffer.from(_,"base64")):_,this.reserve=K,this.unitName=ne,this.unitNameB64=typeof oe=="string"?new Uint8Array(l.Buffer.from(oe,"base64")):oe,this.url=X,this.urlB64=typeof se=="string"?new Uint8Array(l.Buffer.from(se,"base64")):se,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"}}static from_obj_for_encoding(e){if(typeof e.creator>"u")throw new Error(`Response is missing required field 'creator': ${e}`);if(typeof e.decimals>"u")throw new Error(`Response is missing required field 'decimals': ${e}`);if(typeof e.total>"u")throw new Error(`Response is missing required field 'total': ${e}`);return new Mt({creator:e.creator,decimals:e.decimals,total:e.total,clawback:e.clawback,defaultFrozen:e["default-frozen"],freeze:e.freeze,manager:e.manager,metadataHash:e["metadata-hash"],name:e.name,nameB64:e["name-b64"],reserve:e.reserve,unitName:e["unit-name"],unitNameB64:e["unit-name-b64"],url:e.url,urlB64:e["url-b64"]})}}class gn extends P{constructor({blockhash:e}){super(),this.blockhash=e,this.attribute_map={blockhash:"blockHash"}}static from_obj_for_encoding(e){if(typeof e.blockHash>"u")throw new Error(`Response is missing required field 'blockHash': ${e}`);return new gn({blockhash:e.blockHash})}}class mn extends P{constructor({block:e,cert:t}){super(),this.block=e,this.cert=t,this.attribute_map={block:"block",cert:"cert"}}static from_obj_for_encoding(e){if(typeof e.block>"u")throw new Error(`Response is missing required field 'block': ${e}`);return new mn({block:e.block,cert:e.cert})}}class or extends P{constructor({name:e,value:t}){super(),this.name=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.value=typeof t=="string"?new Uint8Array(l.Buffer.from(t,"base64")):t,this.attribute_map={name:"name",value:"value"}}static from_obj_for_encoding(e){if(typeof e.name>"u")throw new Error(`Response is missing required field 'name': ${e}`);if(typeof e.value>"u")throw new Error(`Response is missing required field 'value': ${e}`);return new or({name:e.name,value:e.value})}}class ar extends P{constructor({name:e}){super(),this.name=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.attribute_map={name:"name"}}static from_obj_for_encoding(e){if(typeof e.name>"u")throw new Error(`Response is missing required field 'name': ${e}`);return new ar({name:e.name})}}class ur extends P{constructor({boxes:e}){super(),this.boxes=e,this.attribute_map={boxes:"boxes"}}static from_obj_for_encoding(e){if(!Array.isArray(e.boxes))throw new Error(`Response is missing required array field 'boxes': ${e}`);return new ur({boxes:e.boxes.map(ar.from_obj_for_encoding)})}}class cr extends P{constructor({branch:e,buildNumber:t,channel:r,commitHash:s,major:o,minor:d}){super(),this.branch=e,this.buildNumber=t,this.channel=r,this.commitHash=s,this.major=o,this.minor=d,this.attribute_map={branch:"branch",buildNumber:"build_number",channel:"channel",commitHash:"commit_hash",major:"major",minor:"minor"}}static from_obj_for_encoding(e){if(typeof e.branch>"u")throw new Error(`Response is missing required field 'branch': ${e}`);if(typeof e.build_number>"u")throw new Error(`Response is missing required field 'build_number': ${e}`);if(typeof e.channel>"u")throw new Error(`Response is missing required field 'channel': ${e}`);if(typeof e.commit_hash>"u")throw new Error(`Response is missing required field 'commit_hash': ${e}`);if(typeof e.major>"u")throw new Error(`Response is missing required field 'major': ${e}`);if(typeof e.minor>"u")throw new Error(`Response is missing required field 'minor': ${e}`);return new cr({branch:e.branch,buildNumber:e.build_number,channel:e.channel,commitHash:e.commit_hash,major:e.major,minor:e.minor})}}class yn extends P{constructor({hash:e,result:t,sourcemap:r}){super(),this.hash=e,this.result=t,this.sourcemap=r,this.attribute_map={hash:"hash",result:"result",sourcemap:"sourcemap"}}static from_obj_for_encoding(e){if(typeof e.hash>"u")throw new Error(`Response is missing required field 'hash': ${e}`);if(typeof e.result>"u")throw new Error(`Response is missing required field 'result': ${e}`);return new yn({hash:e.hash,result:e.result,sourcemap:e.sourcemap})}}class wn extends P{constructor({result:e}){super(),this.result=e,this.attribute_map={result:"result"}}static from_obj_for_encoding(e){if(typeof e.result>"u")throw new Error(`Response is missing required field 'result': ${e}`);return new wn({result:e.result})}}class fr extends P{constructor({accounts:e,apps:t,latestTimestamp:r,protocolVersion:s,round:o,sources:d,txns:w}){super(),this.accounts=e,this.apps=t,this.latestTimestamp=r,this.protocolVersion=s,this.round=o,this.sources=d,this.txns=w,this.attribute_map={accounts:"accounts",apps:"apps",latestTimestamp:"latest-timestamp",protocolVersion:"protocol-version",round:"round",sources:"sources",txns:"txns"}}static from_obj_for_encoding(e){if(!Array.isArray(e.accounts))throw new Error(`Response is missing required array field 'accounts': ${e}`);if(!Array.isArray(e.apps))throw new Error(`Response is missing required array field 'apps': ${e}`);if(typeof e["latest-timestamp"]>"u")throw new Error(`Response is missing required field 'latest-timestamp': ${e}`);if(typeof e["protocol-version"]>"u")throw new Error(`Response is missing required field 'protocol-version': ${e}`);if(typeof e.round>"u")throw new Error(`Response is missing required field 'round': ${e}`);if(!Array.isArray(e.sources))throw new Error(`Response is missing required array field 'sources': ${e}`);if(!Array.isArray(e.txns))throw new Error(`Response is missing required array field 'txns': ${e}`);return new fr({accounts:e.accounts.map(nr.from_obj_for_encoding),apps:e.apps.map(Bt.from_obj_for_encoding),latestTimestamp:e["latest-timestamp"],protocolVersion:e["protocol-version"],round:e.round,sources:e.sources.map(lr.from_obj_for_encoding),txns:e.txns})}}class bn extends P{constructor({error:e,protocolVersion:t,txns:r}){super(),this.error=e,this.protocolVersion=t,this.txns=r,this.attribute_map={error:"error",protocolVersion:"protocol-version",txns:"txns"}}static from_obj_for_encoding(e){if(typeof e.error>"u")throw new Error(`Response is missing required field 'error': ${e}`);if(typeof e["protocol-version"]>"u")throw new Error(`Response is missing required field 'protocol-version': ${e}`);if(!Array.isArray(e.txns))throw new Error(`Response is missing required array field 'txns': ${e}`);return new bn({error:e.error,protocolVersion:e["protocol-version"],txns:e.txns.map(hr.from_obj_for_encoding)})}}class lr extends P{constructor({fieldName:e,source:t,txnIndex:r,appIndex:s}){super(),this.fieldName=e,this.source=t,this.txnIndex=r,this.appIndex=s,this.attribute_map={fieldName:"field-name",source:"source",txnIndex:"txn-index",appIndex:"app-index"}}static from_obj_for_encoding(e){if(typeof e["field-name"]>"u")throw new Error(`Response is missing required field 'field-name': ${e}`);if(typeof e.source>"u")throw new Error(`Response is missing required field 'source': ${e}`);if(typeof e["txn-index"]>"u")throw new Error(`Response is missing required field 'txn-index': ${e}`);if(typeof e["app-index"]>"u")throw new Error(`Response is missing required field 'app-index': ${e}`);return new lr({fieldName:e["field-name"],source:e.source,txnIndex:e["txn-index"],appIndex:e["app-index"]})}}class Nt extends P{constructor({line:e,pc:t,stack:r,error:s,scratch:o}){super(),this.line=e,this.pc=t,this.stack=r,this.error=s,this.scratch=o,this.attribute_map={line:"line",pc:"pc",stack:"stack",error:"error",scratch:"scratch"}}static from_obj_for_encoding(e){if(typeof e.line>"u")throw new Error(`Response is missing required field 'line': ${e}`);if(typeof e.pc>"u")throw new Error(`Response is missing required field 'pc': ${e}`);if(!Array.isArray(e.stack))throw new Error(`Response is missing required array field 'stack': ${e}`);return new Nt({line:e.line,pc:e.pc,stack:e.stack.map(It.from_obj_for_encoding),error:e.error,scratch:typeof e.scratch<"u"?e.scratch.map(It.from_obj_for_encoding):void 0})}}class hr extends P{constructor({disassembly:e,appCallMessages:t,appCallTrace:r,budgetAdded:s,budgetConsumed:o,globalDelta:d,localDeltas:w,logicSigDisassembly:E,logicSigMessages:C,logicSigTrace:_,logs:K}){super(),this.disassembly=e,this.appCallMessages=t,this.appCallTrace=r,this.budgetAdded=s,this.budgetConsumed=o,this.globalDelta=d,this.localDeltas=w,this.logicSigDisassembly=E,this.logicSigMessages=C,this.logicSigTrace=_,this.logs=K,this.attribute_map={disassembly:"disassembly",appCallMessages:"app-call-messages",appCallTrace:"app-call-trace",budgetAdded:"budget-added",budgetConsumed:"budget-consumed",globalDelta:"global-delta",localDeltas:"local-deltas",logicSigDisassembly:"logic-sig-disassembly",logicSigMessages:"logic-sig-messages",logicSigTrace:"logic-sig-trace",logs:"logs"}}static from_obj_for_encoding(e){if(!Array.isArray(e.disassembly))throw new Error(`Response is missing required array field 'disassembly': ${e}`);return new hr({disassembly:e.disassembly,appCallMessages:e["app-call-messages"],appCallTrace:typeof e["app-call-trace"]<"u"?e["app-call-trace"].map(Nt.from_obj_for_encoding):void 0,budgetAdded:e["budget-added"],budgetConsumed:e["budget-consumed"],globalDelta:typeof e["global-delta"]<"u"?e["global-delta"].map(kt.from_obj_for_encoding):void 0,localDeltas:typeof e["local-deltas"]<"u"?e["local-deltas"].map($t.from_obj_for_encoding):void 0,logicSigDisassembly:e["logic-sig-disassembly"],logicSigMessages:e["logic-sig-messages"],logicSigTrace:typeof e["logic-sig-trace"]<"u"?e["logic-sig-trace"].map(Nt.from_obj_for_encoding):void 0,logs:e.logs})}}class xn extends P{constructor({message:e,data:t}){super(),this.message=e,this.data=t,this.attribute_map={message:"message",data:"data"}}static from_obj_for_encoding(e){if(typeof e.message>"u")throw new Error(`Response is missing required field 'message': ${e}`);return new xn({message:e.message,data:e.data})}}class dr extends P{constructor({action:e,bytes:t,uint:r}){super(),this.action=e,this.bytes=t,this.uint=r,this.attribute_map={action:"action",bytes:"bytes",uint:"uint"}}static from_obj_for_encoding(e){if(typeof e.action>"u")throw new Error(`Response is missing required field 'action': ${e}`);return new dr({action:e.action,bytes:e.bytes,uint:e.uint})}}class kt extends P{constructor({key:e,value:t}){super(),this.key=e,this.value=t,this.attribute_map={key:"key",value:"value"}}static from_obj_for_encoding(e){if(typeof e.key>"u")throw new Error(`Response is missing required field 'key': ${e}`);if(typeof e.value>"u")throw new Error(`Response is missing required field 'value': ${e}`);return new kt({key:e.key,value:dr.from_obj_for_encoding(e.value)})}}class An extends P{constructor({index:e,proof:t,treedepth:r}){super(),this.index=e,this.proof=typeof t=="string"?new Uint8Array(l.Buffer.from(t,"base64")):t,this.treedepth=r,this.attribute_map={index:"index",proof:"proof",treedepth:"treedepth"}}static from_obj_for_encoding(e){if(typeof e.index>"u")throw new Error(`Response is missing required field 'index': ${e}`);if(typeof e.proof>"u")throw new Error(`Response is missing required field 'proof': ${e}`);if(typeof e.treedepth>"u")throw new Error(`Response is missing required field 'treedepth': ${e}`);return new An({index:e.index,proof:e.proof,treedepth:e.treedepth})}}class Fn extends P{constructor({catchupTime:e,lastRound:t,lastVersion:r,nextVersion:s,nextVersionRound:o,nextVersionSupported:d,stoppedAtUnsupportedRound:w,timeSinceLastRound:E,catchpoint:C,catchpointAcquiredBlocks:_,catchpointProcessedAccounts:K,catchpointProcessedKvs:ne,catchpointTotalAccounts:oe,catchpointTotalBlocks:X,catchpointTotalKvs:se,catchpointVerifiedAccounts:qe,catchpointVerifiedKvs:We,lastCatchpoint:tt}){super(),this.catchupTime=e,this.lastRound=t,this.lastVersion=r,this.nextVersion=s,this.nextVersionRound=o,this.nextVersionSupported=d,this.stoppedAtUnsupportedRound=w,this.timeSinceLastRound=E,this.catchpoint=C,this.catchpointAcquiredBlocks=_,this.catchpointProcessedAccounts=K,this.catchpointProcessedKvs=ne,this.catchpointTotalAccounts=oe,this.catchpointTotalBlocks=X,this.catchpointTotalKvs=se,this.catchpointVerifiedAccounts=qe,this.catchpointVerifiedKvs=We,this.lastCatchpoint=tt,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",catchpointProcessedKvs:"catchpoint-processed-kvs",catchpointTotalAccounts:"catchpoint-total-accounts",catchpointTotalBlocks:"catchpoint-total-blocks",catchpointTotalKvs:"catchpoint-total-kvs",catchpointVerifiedAccounts:"catchpoint-verified-accounts",catchpointVerifiedKvs:"catchpoint-verified-kvs",lastCatchpoint:"last-catchpoint"}}static from_obj_for_encoding(e){if(typeof e["catchup-time"]>"u")throw new Error(`Response is missing required field 'catchup-time': ${e}`);if(typeof e["last-round"]>"u")throw new Error(`Response is missing required field 'last-round': ${e}`);if(typeof e["last-version"]>"u")throw new Error(`Response is missing required field 'last-version': ${e}`);if(typeof e["next-version"]>"u")throw new Error(`Response is missing required field 'next-version': ${e}`);if(typeof e["next-version-round"]>"u")throw new Error(`Response is missing required field 'next-version-round': ${e}`);if(typeof e["next-version-supported"]>"u")throw new Error(`Response is missing required field 'next-version-supported': ${e}`);if(typeof e["stopped-at-unsupported-round"]>"u")throw new Error(`Response is missing required field 'stopped-at-unsupported-round': ${e}`);if(typeof e["time-since-last-round"]>"u")throw new Error(`Response is missing required field 'time-since-last-round': ${e}`);return new Fn({catchupTime:e["catchup-time"],lastRound:e["last-round"],lastVersion:e["last-version"],nextVersion:e["next-version"],nextVersionRound:e["next-version-round"],nextVersionSupported:e["next-version-supported"],stoppedAtUnsupportedRound:e["stopped-at-unsupported-round"],timeSinceLastRound:e["time-since-last-round"],catchpoint:e.catchpoint,catchpointAcquiredBlocks:e["catchpoint-acquired-blocks"],catchpointProcessedAccounts:e["catchpoint-processed-accounts"],catchpointProcessedKvs:e["catchpoint-processed-kvs"],catchpointTotalAccounts:e["catchpoint-total-accounts"],catchpointTotalBlocks:e["catchpoint-total-blocks"],catchpointTotalKvs:e["catchpoint-total-kvs"],catchpointVerifiedAccounts:e["catchpoint-verified-accounts"],catchpointVerifiedKvs:e["catchpoint-verified-kvs"],lastCatchpoint:e["last-catchpoint"]})}}class pr extends P{constructor({poolError:e,txn:t,applicationIndex:r,assetClosingAmount:s,assetIndex:o,closeRewards:d,closingAmount:w,confirmedRound:E,globalStateDelta:C,innerTxns:_,localStateDelta:K,logs:ne,receiverRewards:oe,senderRewards:X}){super(),this.poolError=e,this.txn=t,this.applicationIndex=r,this.assetClosingAmount=s,this.assetIndex=o,this.closeRewards=d,this.closingAmount=w,this.confirmedRound=E,this.globalStateDelta=C,this.innerTxns=_,this.localStateDelta=K,this.logs=ne,this.receiverRewards=oe,this.senderRewards=X,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"}}static from_obj_for_encoding(e){if(typeof e["pool-error"]>"u")throw new Error(`Response is missing required field 'pool-error': ${e}`);if(typeof e.txn>"u")throw new Error(`Response is missing required field 'txn': ${e}`);return new pr({poolError:e["pool-error"],txn:e.txn,applicationIndex:e["application-index"],assetClosingAmount:e["asset-closing-amount"],assetIndex:e["asset-index"],closeRewards:e["close-rewards"],closingAmount:e["closing-amount"],confirmedRound:e["confirmed-round"],globalStateDelta:typeof e["global-state-delta"]<"u"?e["global-state-delta"].map(kt.from_obj_for_encoding):void 0,innerTxns:typeof e["inner-txns"]<"u"?e["inner-txns"].map(pr.from_obj_for_encoding):void 0,localStateDelta:typeof e["local-state-delta"]<"u"?e["local-state-delta"].map($t.from_obj_for_encoding):void 0,logs:e.logs,receiverRewards:e["receiver-rewards"],senderRewards:e["sender-rewards"]})}}class vn extends P{constructor({topTransactions:e,totalTransactions:t}){super(),this.topTransactions=e,this.totalTransactions=t,this.attribute_map={topTransactions:"top-transactions",totalTransactions:"total-transactions"}}static from_obj_for_encoding(e){if(!Array.isArray(e["top-transactions"]))throw new Error(`Response is missing required array field 'top-transactions': ${e}`);if(typeof e["total-transactions"]>"u")throw new Error(`Response is missing required field 'total-transactions': ${e}`);return new vn({topTransactions:e["top-transactions"],totalTransactions:e["total-transactions"]})}}class _n extends P{constructor({txid:e}){super(),this.txid=e,this.attribute_map={txid:"txId"}}static from_obj_for_encoding(e){if(typeof e.txId>"u")throw new Error(`Response is missing required field 'txId': ${e}`);return new _n({txid:e.txId})}}class En extends P{constructor({message:e,stateproof:t}){super(),this.message=e,this.stateproof=typeof t=="string"?new Uint8Array(l.Buffer.from(t,"base64")):t,this.attribute_map={message:"Message",stateproof:"StateProof"}}static from_obj_for_encoding(e){if(typeof e.Message>"u")throw new Error(`Response is missing required field 'Message': ${e}`);if(typeof e.StateProof>"u")throw new Error(`Response is missing required field 'StateProof': ${e}`);return new En({message:gr.from_obj_for_encoding(e.Message),stateproof:e.StateProof})}}class gr extends P{constructor({blockheaderscommitment:e,firstattestedround:t,lastattestedround:r,lnprovenweight:s,voterscommitment:o}){super(),this.blockheaderscommitment=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.firstattestedround=t,this.lastattestedround=r,this.lnprovenweight=s,this.voterscommitment=typeof o=="string"?new Uint8Array(l.Buffer.from(o,"base64")):o,this.attribute_map={blockheaderscommitment:"BlockHeadersCommitment",firstattestedround:"FirstAttestedRound",lastattestedround:"LastAttestedRound",lnprovenweight:"LnProvenWeight",voterscommitment:"VotersCommitment"}}static from_obj_for_encoding(e){if(typeof e.BlockHeadersCommitment>"u")throw new Error(`Response is missing required field 'BlockHeadersCommitment': ${e}`);if(typeof e.FirstAttestedRound>"u")throw new Error(`Response is missing required field 'FirstAttestedRound': ${e}`);if(typeof e.LastAttestedRound>"u")throw new Error(`Response is missing required field 'LastAttestedRound': ${e}`);if(typeof e.LnProvenWeight>"u")throw new Error(`Response is missing required field 'LnProvenWeight': ${e}`);if(typeof e.VotersCommitment>"u")throw new Error(`Response is missing required field 'VotersCommitment': ${e}`);return new gr({blockheaderscommitment:e.BlockHeadersCommitment,firstattestedround:e.FirstAttestedRound,lastattestedround:e.LastAttestedRound,lnprovenweight:e.LnProvenWeight,voterscommitment:e.VotersCommitment})}}class Tn extends P{constructor({currentRound:e,onlineMoney:t,totalMoney:r}){super(),this.currentRound=e,this.onlineMoney=t,this.totalMoney=r,this.attribute_map={currentRound:"current_round",onlineMoney:"online-money",totalMoney:"total-money"}}static from_obj_for_encoding(e){if(typeof e.current_round>"u")throw new Error(`Response is missing required field 'current_round': ${e}`);if(typeof e["online-money"]>"u")throw new Error(`Response is missing required field 'online-money': ${e}`);if(typeof e["total-money"]>"u")throw new Error(`Response is missing required field 'total-money': ${e}`);return new Tn({currentRound:e.current_round,onlineMoney:e["online-money"],totalMoney:e["total-money"]})}}class Kt extends P{constructor({key:e,value:t}){super(),this.key=e,this.value=t,this.attribute_map={key:"key",value:"value"}}static from_obj_for_encoding(e){if(typeof e.key>"u")throw new Error(`Response is missing required field 'key': ${e}`);if(typeof e.value>"u")throw new Error(`Response is missing required field 'value': ${e}`);return new Kt({key:e.key,value:It.from_obj_for_encoding(e.value)})}}class It extends P{constructor({type:e,bytes:t,uint:r}){super(),this.type=e,this.bytes=t,this.uint=r,this.attribute_map={type:"type",bytes:"bytes",uint:"uint"}}static from_obj_for_encoding(e){if(typeof e.type>"u")throw new Error(`Response is missing required field 'type': ${e}`);if(typeof e.bytes>"u")throw new Error(`Response is missing required field 'bytes': ${e}`);if(typeof e.uint>"u")throw new Error(`Response is missing required field 'uint': ${e}`);return new It({type:e.type,bytes:e.bytes,uint:e.uint})}}class Rn extends P{constructor({consensusVersion:e,fee:t,genesisHash:r,genesisId:s,lastRound:o,minFee:d}){super(),this.consensusVersion=e,this.fee=t,this.genesisHash=typeof r=="string"?new Uint8Array(l.Buffer.from(r,"base64")):r,this.genesisId=s,this.lastRound=o,this.minFee=d,this.attribute_map={consensusVersion:"consensus-version",fee:"fee",genesisHash:"genesis-hash",genesisId:"genesis-id",lastRound:"last-round",minFee:"min-fee"}}static from_obj_for_encoding(e){if(typeof e["consensus-version"]>"u")throw new Error(`Response is missing required field 'consensus-version': ${e}`);if(typeof e.fee>"u")throw new Error(`Response is missing required field 'fee': ${e}`);if(typeof e["genesis-hash"]>"u")throw new Error(`Response is missing required field 'genesis-hash': ${e}`);if(typeof e["genesis-id"]>"u")throw new Error(`Response is missing required field 'genesis-id': ${e}`);if(typeof e["last-round"]>"u")throw new Error(`Response is missing required field 'last-round': ${e}`);if(typeof e["min-fee"]>"u")throw new Error(`Response is missing required field 'min-fee': ${e}`);return new Rn({consensusVersion:e["consensus-version"],fee:e.fee,genesisHash:e["genesis-hash"],genesisId:e["genesis-id"],lastRound:e["last-round"],minFee:e["min-fee"]})}}class Bn extends P{constructor({idx:e,proof:t,stibhash:r,treedepth:s,hashtype:o}){super(),this.idx=e,this.proof=typeof t=="string"?new Uint8Array(l.Buffer.from(t,"base64")):t,this.stibhash=typeof r=="string"?new Uint8Array(l.Buffer.from(r,"base64")):r,this.treedepth=s,this.hashtype=o,this.attribute_map={idx:"idx",proof:"proof",stibhash:"stibhash",treedepth:"treedepth",hashtype:"hashtype"}}static from_obj_for_encoding(e){if(typeof e.idx>"u")throw new Error(`Response is missing required field 'idx': ${e}`);if(typeof e.proof>"u")throw new Error(`Response is missing required field 'proof': ${e}`);if(typeof e.stibhash>"u")throw new Error(`Response is missing required field 'stibhash': ${e}`);if(typeof e.treedepth>"u")throw new Error(`Response is missing required field 'treedepth': ${e}`);return new Bn({idx:e.idx,proof:e.proof,stibhash:e.stibhash,treedepth:e.treedepth,hashtype:e.hashtype})}}class Sn extends P{constructor({build:e,genesisHashB64:t,genesisId:r,versions:s}){super(),this.build=e,this.genesisHashB64=typeof t=="string"?new Uint8Array(l.Buffer.from(t,"base64")):t,this.genesisId=r,this.versions=s,this.attribute_map={build:"build",genesisHashB64:"genesis_hash_b64",genesisId:"genesis_id",versions:"versions"}}static from_obj_for_encoding(e){if(typeof e.build>"u")throw new Error(`Response is missing required field 'build': ${e}`);if(typeof e.genesis_hash_b64>"u")throw new Error(`Response is missing required field 'genesis_hash_b64': ${e}`);if(typeof e.genesis_id>"u")throw new Error(`Response is missing required field 'genesis_id': ${e}`);if(!Array.isArray(e.versions))throw new Error(`Response is missing required array field 'versions': ${e}`);return new Sn({build:cr.from_obj_for_encoding(e.build),genesisHashB64:e.genesis_hash_b64,genesisId:e.genesis_id,versions:e.versions})}}class yi extends ue{constructor(e,t,r,s){super(e,t),this.index=r,this.index=r;const o=l.Buffer.from(s).toString("base64");this.query.name=encodeURI(`b64:${o}`)}path(){return`/v2/applications/${this.index}/box`}prepare(e){return or.from_obj_for_encoding(e)}}class wi extends ue{constructor(e,t,r){super(e,t),this.index=r,this.index=r,this.query.max=0}path(){return`/v2/applications/${this.index}/boxes`}max(e){return this.query.max=e,this}prepare(e){return ur.from_obj_for_encoding(e)}}class bi extends ue{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 xi extends ue{constructor(e,t){super(e),this.txid=t,this.txid=t,this.query.format="msgpack"}prepare(e){if(e&&e.byteLength>0)return u(e)}path(){return`/v2/transactions/pending/${this.txid}`}max(e){return this.query.max=e,this}}class Ai extends ue{constructor(e){super(e),this.query.format="msgpack"}path(){return"/v2/transactions/pending"}prepare(e){if(e&&e.byteLength>0)return u(e)}max(e){return this.query.max=e,this}}class Fi extends ue{constructor(e,t){super(e),this.address=t,this.address=t,this.query.format="msgpack"}prepare(e){if(e&&e.byteLength>0)return u(e)}path(){return`/v2/accounts/${this.address}/transactions/pending`}max(e){return this.query.max=e,this}}class vi extends ue{constructor(e,t,r,s){super(e,t),this.round=r,this.txID=s,this.round=r,this.txID=s}path(){return`/v2/blocks/${this.round}/transactions/${this.txID}/proof`}hashType(e){return this.query.hashtype=e,this}}function _i(n={}){let e=n;return Object.keys(e).every(t=>t.toLowerCase()!=="content-type")&&(e={...n},e["Content-Type"]="application/x-binary"),e}function cs(n){return n&&n.byteLength!==void 0}class Ei extends ue{constructor(e,t){super(e);let r=t;if(Array.isArray(t)){if(!t.every(cs))throw new TypeError("Array elements must be byte arrays");r=R(...t)}else if(!cs(r))throw new TypeError("Argument must be byte array");this.txnBytesToPost=r}path(){return"/v2/transactions"}async do(e={}){const t=_i(e);return(await this.c.post(this.path(),l.Buffer.from(this.txnBytesToPost),t)).body}}class Ti extends ue{path(){return"/v2/status"}}class Ri extends ue{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 Bi extends ue{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 Si extends ue{path(){return"/v2/ledger/supply"}}class ki extends ue{path(){return"/versions"}}class Ii extends ue{constructor(e,t,r){super(e,t),this.round=r,this.round=r}path(){return`/v2/blocks/${this.round}/lightheader/proof`}}class Di extends ue{constructor(e,t,r){super(e,t),this.round=r,this.round=r}path(){return`/v2/stateproofs/${this.round}`}}function Ui(n={}){let e=n;return Object.keys(e).every(t=>t.toLowerCase()!=="content-type")&&(e={...n},e["Content-Type"]="text/plain"),e}class Ci extends ue{constructor(e,t){super(e),this.source=t,this.source=t}path(){return"/v2/teal/disassemble"}async do(e={}){const t=Ui(e);return(await this.c.post(this.path(),l.Buffer.from(this.source),t,this.query)).body}}class ji extends ln{constructor(e,t,r,s={}){super("X-Algo-API-Token",e,t,r,s)}healthCheck(){return new bi(this.c)}versionsCheck(){return new ki(this.c)}sendRawTransaction(e){return new Ei(this.c,e)}accountInformation(e){return new oi(this.c,this.intDecoding,e)}accountAssetInformation(e,t){return new ai(this.c,this.intDecoding,e,t)}accountApplicationInformation(e,t){return new ui(this.c,this.intDecoding,e,t)}block(e){return new ci(this.c,e)}getBlockHash(e){return new gi(this.c,this.intDecoding,e)}pendingTransactionInformation(e){return new xi(this.c,e)}pendingTransactionsInformation(){return new Ai(this.c)}pendingTransactionByAddress(e){return new Fi(this.c,e)}status(){return new Ti(this.c,this.intDecoding)}statusAfterBlock(e){return new Ri(this.c,this.intDecoding,e)}getTransactionParams(){return new Bi(this.c)}supply(){return new Si(this.c,this.intDecoding)}compile(e){return new fi(this.c,e)}disassemble(e){return new Ci(this.c,e)}dryrun(e){return new li(this.c,e)}getAssetByID(e){return new di(this.c,this.intDecoding,e)}getApplicationByID(e){return new pi(this.c,this.intDecoding,e)}getApplicationBoxByName(e,t){return new yi(this.c,this.intDecoding,e,t)}getApplicationBoxes(e){return new wi(this.c,this.intDecoding,e)}genesis(){return new hi(this.c,this.intDecoding)}getTransactionProof(e,t){return new vi(this.c,this.intDecoding,e,t)}getLightBlockHeaderProof(e){return new Ii(this.c,this.intDecoding,e)}getStateProof(e){return new Di(this.c,this.intDecoding,e)}}class Pi extends ln{constructor(e,t="http://127.0.0.1",r=7833,s={}){super("X-KMD-API-Token",e,t,r,s)}async versions(){return(await this.c.get("/versions")).body}async listWallets(){return(await this.c.get("/v1/wallets")).body}async createWallet(e,t,r=new Uint8Array,s="sqlite"){const o={wallet_name:e,wallet_driver_name:s,wallet_password:t,master_derivation_key:l.Buffer.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 s={wallet_id:e,wallet_password:t,wallet_name:r};return(await this.c.post("/v1/wallet/rename",s)).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},s=await this.c.post("/v1/master-key/export",r);return{master_derivation_key:l.Buffer.from(s.body.master_derivation_key,"base64")}}async importKey(e,t){const r={wallet_handle_token:e,private_key:l.Buffer.from(t).toString("base64")};return(await this.c.post("/v1/key/import",r)).body}async exportKey(e,t,r){const s={wallet_handle_token:e,address:r,wallet_password:t},o=await this.c.post("/v1/key/export",s);return{private_key:l.Buffer.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 s={wallet_handle_token:e,address:r,wallet_password:t};return(await this.c.delete("/v1/key",s)).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 s=Re(r),o={wallet_handle_token:e,wallet_password:t,transaction:l.Buffer.from(s.toByte()).toString("base64")},d=await this.c.post("/v1/transaction/sign",o);return d.status===200?l.Buffer.from(d.body.signed_transaction,"base64"):d.body}async signTransactionWithSpecificPublicKey(e,t,r,s){const o=Re(r),d={wallet_handle_token:e,wallet_password:t,transaction:l.Buffer.from(o.toByte()).toString("base64"),public_key:l.Buffer.from(s).toString("base64")},w=await this.c.post("/v1/transaction/sign",d);return w.status===200?l.Buffer.from(w.body.signed_transaction,"base64"):w.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,s){const o={wallet_handle_token:e,multisig_version:t,threshold:r,pks:s};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,s,o){const d=Re(r),w={wallet_handle_token:e,transaction:l.Buffer.from(d.toByte()).toString("base64"),public_key:l.Buffer.from(s).toString("base64"),partial_multisig:o,wallet_password:t};return(await this.c.post("/v1/multisig/sign",w)).body}async deleteMultisig(e,t,r){const s={wallet_handle_token:e,address:r,wallet_password:t};return(await this.c.delete("/v1/multisig",s)).body}}class qi extends ue{path(){return"/health"}}class $i extends ue{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}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}}function kn(n){return typeof n=="string"?n:l.Buffer.from(n).toString("base64")}class Li extends ue{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"]=kn(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 Oi extends ue{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"]=kn(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}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 Mi extends ue{constructor(e,t,r){super(e,t),this.round=r,this.round=r}path(){return`/v2/blocks/${this.round}`}headerOnly(e){return this.query["header-only"]=e,this}}class Ni extends ue{constructor(e,t,r){super(e,t),this.txID=r,this.txID=r}path(){return`/v2/transactions/${this.txID}`}}class Ki extends ue{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}exclude(e){return this.query.exclude=e,this}}class zi extends ue{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}/assets`}limit(e){return this.query.limit=e,this}round(e){return this.query.round=e,this}nextToken(e){return this.query.next=e,this}includeAll(e=!0){return this.query["include-all"]=e,this}assetId(e){return this.query["asset-id"]=e,this}}class Gi extends ue{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}/created-assets`}limit(e){return this.query.limit=e,this}round(e){return this.query.round=e,this}nextToken(e){return this.query.next=e,this}includeAll(e=!0){return this.query["include-all"]=e,this}assetID(e){return this.query["asset-id"]=e,this}}class Hi extends ue{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}/apps-local-state`}limit(e){return this.query.limit=e,this}round(e){return this.query.round=e,this}nextToken(e){return this.query.next=e,this}includeAll(e=!0){return this.query["include-all"]=e,this}applicationID(e){return this.query["application-id"]=e,this}}class Vi extends ue{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}/created-applications`}limit(e){return this.query.limit=e,this}round(e){return this.query.round=e,this}nextToken(e){return this.query.next=e,this}includeAll(e=!0){return this.query["include-all"]=e,this}applicationID(e){return this.query["application-id"]=e,this}}class Wi extends ue{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 Xi extends ue{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 Ji extends ue{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 zt extends P{constructor({address:e,amount:t,amountWithoutPendingRewards:r,pendingRewards:s,rewards:o,round:d,status:w,totalAppsOptedIn:E,totalAssetsOptedIn:C,totalBoxBytes:_,totalBoxes:K,totalCreatedApps:ne,totalCreatedAssets:oe,appsLocalState:X,appsTotalExtraPages:se,appsTotalSchema:qe,assets:We,authAddr:tt,closedAtRound:Et,createdApps:Tt,createdAssets:Rt,createdAtRound:Ze,deleted:Qe,participation:gt,rewardBase:mt,sigType:yt}){super(),this.address=e,this.amount=t,this.amountWithoutPendingRewards=r,this.pendingRewards=s,this.rewards=o,this.round=d,this.status=w,this.totalAppsOptedIn=E,this.totalAssetsOptedIn=C,this.totalBoxBytes=_,this.totalBoxes=K,this.totalCreatedApps=ne,this.totalCreatedAssets=oe,this.appsLocalState=X,this.appsTotalExtraPages=se,this.appsTotalSchema=qe,this.assets=We,this.authAddr=tt,this.closedAtRound=Et,this.createdApps=Tt,this.createdAssets=Rt,this.createdAtRound=Ze,this.deleted=Qe,this.participation=gt,this.rewardBase=mt,this.sigType=yt,this.attribute_map={address:"address",amount:"amount",amountWithoutPendingRewards:"amount-without-pending-rewards",pendingRewards:"pending-rewards",rewards:"rewards",round:"round",status:"status",totalAppsOptedIn:"total-apps-opted-in",totalAssetsOptedIn:"total-assets-opted-in",totalBoxBytes:"total-box-bytes",totalBoxes:"total-boxes",totalCreatedApps:"total-created-apps",totalCreatedAssets:"total-created-assets",appsLocalState:"apps-local-state",appsTotalExtraPages:"apps-total-extra-pages",appsTotalSchema:"apps-total-schema",assets:"assets",authAddr:"auth-addr",closedAtRound:"closed-at-round",createdApps:"created-apps",createdAssets:"created-assets",createdAtRound:"created-at-round",deleted:"deleted",participation:"participation",rewardBase:"reward-base",sigType:"sig-type"}}static from_obj_for_encoding(e){if(typeof e.address>"u")throw new Error(`Response is missing required field 'address': ${e}`);if(typeof e.amount>"u")throw new Error(`Response is missing required field 'amount': ${e}`);if(typeof e["amount-without-pending-rewards"]>"u")throw new Error(`Response is missing required field 'amount-without-pending-rewards': ${e}`);if(typeof e["pending-rewards"]>"u")throw new Error(`Response is missing required field 'pending-rewards': ${e}`);if(typeof e.rewards>"u")throw new Error(`Response is missing required field 'rewards': ${e}`);if(typeof e.round>"u")throw new Error(`Response is missing required field 'round': ${e}`);if(typeof e.status>"u")throw new Error(`Response is missing required field 'status': ${e}`);if(typeof e["total-apps-opted-in"]>"u")throw new Error(`Response is missing required field 'total-apps-opted-in': ${e}`);if(typeof e["total-assets-opted-in"]>"u")throw new Error(`Response is missing required field 'total-assets-opted-in': ${e}`);if(typeof e["total-box-bytes"]>"u")throw new Error(`Response is missing required field 'total-box-bytes': ${e}`);if(typeof e["total-boxes"]>"u")throw new Error(`Response is missing required field 'total-boxes': ${e}`);if(typeof e["total-created-apps"]>"u")throw new Error(`Response is missing required field 'total-created-apps': ${e}`);if(typeof e["total-created-assets"]>"u")throw new Error(`Response is missing required field 'total-created-assets': ${e}`);return new zt({address:e.address,amount:e.amount,amountWithoutPendingRewards:e["amount-without-pending-rewards"],pendingRewards:e["pending-rewards"],rewards:e.rewards,round:e.round,status:e.status,totalAppsOptedIn:e["total-apps-opted-in"],totalAssetsOptedIn:e["total-assets-opted-in"],totalBoxBytes:e["total-box-bytes"],totalBoxes:e["total-boxes"],totalCreatedApps:e["total-created-apps"],totalCreatedAssets:e["total-created-assets"],appsLocalState:typeof e["apps-local-state"]<"u"?e["apps-local-state"].map(Gt.from_obj_for_encoding):void 0,appsTotalExtraPages:e["apps-total-extra-pages"],appsTotalSchema:typeof e["apps-total-schema"]<"u"?xt.from_obj_for_encoding(e["apps-total-schema"]):void 0,assets:typeof e.assets<"u"?e.assets.map(Ht.from_obj_for_encoding):void 0,authAddr:e["auth-addr"],closedAtRound:e["closed-at-round"],createdApps:typeof e["created-apps"]<"u"?e["created-apps"].map(Dt.from_obj_for_encoding):void 0,createdAssets:typeof e["created-assets"]<"u"?e["created-assets"].map(Ut.from_obj_for_encoding):void 0,createdAtRound:e["created-at-round"],deleted:e.deleted,participation:typeof e.participation<"u"?mr.from_obj_for_encoding(e.participation):void 0,rewardBase:e["reward-base"],sigType:e["sig-type"]})}}class mr extends P{constructor({selectionParticipationKey:e,voteFirstValid:t,voteKeyDilution:r,voteLastValid:s,voteParticipationKey:o,stateProofKey:d}){super(),this.selectionParticipationKey=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.voteFirstValid=t,this.voteKeyDilution=r,this.voteLastValid=s,this.voteParticipationKey=typeof o=="string"?new Uint8Array(l.Buffer.from(o,"base64")):o,this.stateProofKey=typeof d=="string"?new Uint8Array(l.Buffer.from(d,"base64")):d,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"}}static from_obj_for_encoding(e){if(typeof e["selection-participation-key"]>"u")throw new Error(`Response is missing required field 'selection-participation-key': ${e}`);if(typeof e["vote-first-valid"]>"u")throw new Error(`Response is missing required field 'vote-first-valid': ${e}`);if(typeof e["vote-key-dilution"]>"u")throw new Error(`Response is missing required field 'vote-key-dilution': ${e}`);if(typeof e["vote-last-valid"]>"u")throw new Error(`Response is missing required field 'vote-last-valid': ${e}`);if(typeof e["vote-participation-key"]>"u")throw new Error(`Response is missing required field 'vote-participation-key': ${e}`);return new mr({selectionParticipationKey:e["selection-participation-key"],voteFirstValid:e["vote-first-valid"],voteKeyDilution:e["vote-key-dilution"],voteLastValid:e["vote-last-valid"],voteParticipationKey:e["vote-participation-key"],stateProofKey:e["state-proof-key"]})}}class In extends P{constructor({account:e,currentRound:t}){super(),this.account=e,this.currentRound=t,this.attribute_map={account:"account",currentRound:"current-round"}}static from_obj_for_encoding(e){if(typeof e.account>"u")throw new Error(`Response is missing required field 'account': ${e}`);if(typeof e["current-round"]>"u")throw new Error(`Response is missing required field 'current-round': ${e}`);return new In({account:zt.from_obj_for_encoding(e.account),currentRound:e["current-round"]})}}class yr extends P{constructor({address:e,delta:t}){super(),this.address=e,this.delta=t,this.attribute_map={address:"address",delta:"delta"}}static from_obj_for_encoding(e){if(typeof e.address>"u")throw new Error(`Response is missing required field 'address': ${e}`);if(!Array.isArray(e.delta))throw new Error(`Response is missing required array field 'delta': ${e}`);return new yr({address:e.address,delta:e.delta.map(Wt.from_obj_for_encoding)})}}class Dn extends P{constructor({accounts:e,currentRound:t,nextToken:r}){super(),this.accounts=e,this.currentRound=t,this.nextToken=r,this.attribute_map={accounts:"accounts",currentRound:"current-round",nextToken:"next-token"}}static from_obj_for_encoding(e){if(!Array.isArray(e.accounts))throw new Error(`Response is missing required array field 'accounts': ${e}`);if(typeof e["current-round"]>"u")throw new Error(`Response is missing required field 'current-round': ${e}`);return new Dn({accounts:e.accounts.map(zt.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}class Dt extends P{constructor({id:e,params:t,createdAtRound:r,deleted:s,deletedAtRound:o}){super(),this.id=e,this.params=t,this.createdAtRound=r,this.deleted=s,this.deletedAtRound=o,this.attribute_map={id:"id",params:"params",createdAtRound:"created-at-round",deleted:"deleted",deletedAtRound:"deleted-at-round"}}static from_obj_for_encoding(e){if(typeof e.id>"u")throw new Error(`Response is missing required field 'id': ${e}`);if(typeof e.params>"u")throw new Error(`Response is missing required field 'params': ${e}`);return new Dt({id:e.id,params:br.from_obj_for_encoding(e.params),createdAtRound:e["created-at-round"],deleted:e.deleted,deletedAtRound:e["deleted-at-round"]})}}class Gt extends P{constructor({id:e,schema:t,closedOutAtRound:r,deleted:s,keyValue:o,optedInAtRound:d}){super(),this.id=e,this.schema=t,this.closedOutAtRound=r,this.deleted=s,this.keyValue=o,this.optedInAtRound=d,this.attribute_map={id:"id",schema:"schema",closedOutAtRound:"closed-out-at-round",deleted:"deleted",keyValue:"key-value",optedInAtRound:"opted-in-at-round"}}static from_obj_for_encoding(e){if(typeof e.id>"u")throw new Error(`Response is missing required field 'id': ${e}`);if(typeof e.schema>"u")throw new Error(`Response is missing required field 'schema': ${e}`);return new Gt({id:e.id,schema:xt.from_obj_for_encoding(e.schema),closedOutAtRound:e["closed-out-at-round"],deleted:e.deleted,keyValue:typeof e["key-value"]<"u"?e["key-value"].map(Jt.from_obj_for_encoding):void 0,optedInAtRound:e["opted-in-at-round"]})}}class Un extends P{constructor({appsLocalStates:e,currentRound:t,nextToken:r}){super(),this.appsLocalStates=e,this.currentRound=t,this.nextToken=r,this.attribute_map={appsLocalStates:"apps-local-states",currentRound:"current-round",nextToken:"next-token"}}static from_obj_for_encoding(e){if(!Array.isArray(e["apps-local-states"]))throw new Error(`Response is missing required array field 'apps-local-states': ${e}`);if(typeof e["current-round"]>"u")throw new Error(`Response is missing required field 'current-round': ${e}`);return new Un({appsLocalStates:e["apps-local-states"].map(Gt.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}class wr extends P{constructor({logs:e,txid:t}){super(),this.logs=e,this.txid=t,this.attribute_map={logs:"logs",txid:"txid"}}static from_obj_for_encoding(e){if(!Array.isArray(e.logs))throw new Error(`Response is missing required array field 'logs': ${e}`);if(typeof e.txid>"u")throw new Error(`Response is missing required field 'txid': ${e}`);return new wr({logs:e.logs,txid:e.txid})}}class Cn extends P{constructor({applicationId:e,currentRound:t,logData:r,nextToken:s}){super(),this.applicationId=e,this.currentRound=t,this.logData=r,this.nextToken=s,this.attribute_map={applicationId:"application-id",currentRound:"current-round",logData:"log-data",nextToken:"next-token"}}static from_obj_for_encoding(e){if(typeof e["application-id"]>"u")throw new Error(`Response is missing required field 'application-id': ${e}`);if(typeof e["current-round"]>"u")throw new Error(`Response is missing required field 'current-round': ${e}`);return new Cn({applicationId:e["application-id"],currentRound:e["current-round"],logData:typeof e["log-data"]<"u"?e["log-data"].map(wr.from_obj_for_encoding):void 0,nextToken:e["next-token"]})}}class br extends P{constructor({approvalProgram:e,clearStateProgram:t,creator:r,extraProgramPages:s,globalState:o,globalStateSchema:d,localStateSchema:w}){super(),this.approvalProgram=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.clearStateProgram=typeof t=="string"?new Uint8Array(l.Buffer.from(t,"base64")):t,this.creator=r,this.extraProgramPages=s,this.globalState=o,this.globalStateSchema=d,this.localStateSchema=w,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"}}static from_obj_for_encoding(e){if(typeof e["approval-program"]>"u")throw new Error(`Response is missing required field 'approval-program': ${e}`);if(typeof e["clear-state-program"]>"u")throw new Error(`Response is missing required field 'clear-state-program': ${e}`);return new br({approvalProgram:e["approval-program"],clearStateProgram:e["clear-state-program"],creator:e.creator,extraProgramPages:e["extra-program-pages"],globalState:typeof e["global-state"]<"u"?e["global-state"].map(Jt.from_obj_for_encoding):void 0,globalStateSchema:typeof e["global-state-schema"]<"u"?xt.from_obj_for_encoding(e["global-state-schema"]):void 0,localStateSchema:typeof e["local-state-schema"]<"u"?xt.from_obj_for_encoding(e["local-state-schema"]):void 0})}}class jn extends P{constructor({currentRound:e,application:t}){super(),this.currentRound=e,this.application=t,this.attribute_map={currentRound:"current-round",application:"application"}}static from_obj_for_encoding(e){if(typeof e["current-round"]>"u")throw new Error(`Response is missing required field 'current-round': ${e}`);return new jn({currentRound:e["current-round"],application:typeof e.application<"u"?Dt.from_obj_for_encoding(e.application):void 0})}}class xt extends P{constructor({numByteSlice:e,numUint:t}){super(),this.numByteSlice=e,this.numUint=t,this.attribute_map={numByteSlice:"num-byte-slice",numUint:"num-uint"}}static from_obj_for_encoding(e){if(typeof e["num-byte-slice"]>"u")throw new Error(`Response is missing required field 'num-byte-slice': ${e}`);if(typeof e["num-uint"]>"u")throw new Error(`Response is missing required field 'num-uint': ${e}`);return new xt({numByteSlice:e["num-byte-slice"],numUint:e["num-uint"]})}}class Pn extends P{constructor({applications:e,currentRound:t,nextToken:r}){super(),this.applications=e,this.currentRound=t,this.nextToken=r,this.attribute_map={applications:"applications",currentRound:"current-round",nextToken:"next-token"}}static from_obj_for_encoding(e){if(!Array.isArray(e.applications))throw new Error(`Response is missing required array field 'applications': ${e}`);if(typeof e["current-round"]>"u")throw new Error(`Response is missing required field 'current-round': ${e}`);return new Pn({applications:e.applications.map(Dt.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}class Ut extends P{constructor({index:e,params:t,createdAtRound:r,deleted:s,destroyedAtRound:o}){super(),this.index=e,this.params=t,this.createdAtRound=r,this.deleted=s,this.destroyedAtRound=o,this.attribute_map={index:"index",params:"params",createdAtRound:"created-at-round",deleted:"deleted",destroyedAtRound:"destroyed-at-round"}}static from_obj_for_encoding(e){if(typeof e.index>"u")throw new Error(`Response is missing required field 'index': ${e}`);if(typeof e.params>"u")throw new Error(`Response is missing required field 'params': ${e}`);return new Ut({index:e.index,params:Vt.from_obj_for_encoding(e.params),createdAtRound:e["created-at-round"],deleted:e.deleted,destroyedAtRound:e["destroyed-at-round"]})}}class qn extends P{constructor({balances:e,currentRound:t,nextToken:r}){super(),this.balances=e,this.currentRound=t,this.nextToken=r,this.attribute_map={balances:"balances",currentRound:"current-round",nextToken:"next-token"}}static from_obj_for_encoding(e){if(!Array.isArray(e.balances))throw new Error(`Response is missing required array field 'balances': ${e}`);if(typeof e["current-round"]>"u")throw new Error(`Response is missing required field 'current-round': ${e}`);return new qn({balances:e.balances.map(Sr.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}class Ht extends P{constructor({amount:e,assetId:t,isFrozen:r,deleted:s,optedInAtRound:o,optedOutAtRound:d}){super(),this.amount=e,this.assetId=t,this.isFrozen=r,this.deleted=s,this.optedInAtRound=o,this.optedOutAtRound=d,this.attribute_map={amount:"amount",assetId:"asset-id",isFrozen:"is-frozen",deleted:"deleted",optedInAtRound:"opted-in-at-round",optedOutAtRound:"opted-out-at-round"}}static from_obj_for_encoding(e){if(typeof e.amount>"u")throw new Error(`Response is missing required field 'amount': ${e}`);if(typeof e["asset-id"]>"u")throw new Error(`Response is missing required field 'asset-id': ${e}`);if(typeof e["is-frozen"]>"u")throw new Error(`Response is missing required field 'is-frozen': ${e}`);return new Ht({amount:e.amount,assetId:e["asset-id"],isFrozen:e["is-frozen"],deleted:e.deleted,optedInAtRound:e["opted-in-at-round"],optedOutAtRound:e["opted-out-at-round"]})}}class $n extends P{constructor({assets:e,currentRound:t,nextToken:r}){super(),this.assets=e,this.currentRound=t,this.nextToken=r,this.attribute_map={assets:"assets",currentRound:"current-round",nextToken:"next-token"}}static from_obj_for_encoding(e){if(!Array.isArray(e.assets))throw new Error(`Response is missing required array field 'assets': ${e}`);if(typeof e["current-round"]>"u")throw new Error(`Response is missing required field 'current-round': ${e}`);return new $n({assets:e.assets.map(Ht.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}class Vt extends P{constructor({creator:e,decimals:t,total:r,clawback:s,defaultFrozen:o,freeze:d,manager:w,metadataHash:E,name:C,nameB64:_,reserve:K,unitName:ne,unitNameB64:oe,url:X,urlB64:se}){super(),this.creator=e,this.decimals=t,this.total=r,this.clawback=s,this.defaultFrozen=o,this.freeze=d,this.manager=w,this.metadataHash=typeof E=="string"?new Uint8Array(l.Buffer.from(E,"base64")):E,this.name=C,this.nameB64=typeof _=="string"?new Uint8Array(l.Buffer.from(_,"base64")):_,this.reserve=K,this.unitName=ne,this.unitNameB64=typeof oe=="string"?new Uint8Array(l.Buffer.from(oe,"base64")):oe,this.url=X,this.urlB64=typeof se=="string"?new Uint8Array(l.Buffer.from(se,"base64")):se,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"}}static from_obj_for_encoding(e){if(typeof e.creator>"u")throw new Error(`Response is missing required field 'creator': ${e}`);if(typeof e.decimals>"u")throw new Error(`Response is missing required field 'decimals': ${e}`);if(typeof e.total>"u")throw new Error(`Response is missing required field 'total': ${e}`);return new Vt({creator:e.creator,decimals:e.decimals,total:e.total,clawback:e.clawback,defaultFrozen:e["default-frozen"],freeze:e.freeze,manager:e.manager,metadataHash:e["metadata-hash"],name:e.name,nameB64:e["name-b64"],reserve:e.reserve,unitName:e["unit-name"],unitNameB64:e["unit-name-b64"],url:e.url,urlB64:e["url-b64"]})}}class Ln extends P{constructor({asset:e,currentRound:t}){super(),this.asset=e,this.currentRound=t,this.attribute_map={asset:"asset",currentRound:"current-round"}}static from_obj_for_encoding(e){if(typeof e.asset>"u")throw new Error(`Response is missing required field 'asset': ${e}`);if(typeof e["current-round"]>"u")throw new Error(`Response is missing required field 'current-round': ${e}`);return new Ln({asset:Ut.from_obj_for_encoding(e.asset),currentRound:e["current-round"]})}}class On extends P{constructor({assets:e,currentRound:t,nextToken:r}){super(),this.assets=e,this.currentRound=t,this.nextToken=r,this.attribute_map={assets:"assets",currentRound:"current-round",nextToken:"next-token"}}static from_obj_for_encoding(e){if(!Array.isArray(e.assets))throw new Error(`Response is missing required array field 'assets': ${e}`);if(typeof e["current-round"]>"u")throw new Error(`Response is missing required field 'current-round': ${e}`);return new On({assets:e.assets.map(Ut.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}class Mn extends P{constructor({genesisHash:e,genesisId:t,previousBlockHash:r,round:s,seed:o,timestamp:d,transactionsRoot:w,transactionsRootSha256:E,participationUpdates:C,rewards:_,stateProofTracking:K,transactions:ne,txnCounter:oe,upgradeState:X,upgradeVote:se}){super(),this.genesisHash=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.genesisId=t,this.previousBlockHash=typeof r=="string"?new Uint8Array(l.Buffer.from(r,"base64")):r,this.round=s,this.seed=typeof o=="string"?new Uint8Array(l.Buffer.from(o,"base64")):o,this.timestamp=d,this.transactionsRoot=typeof w=="string"?new Uint8Array(l.Buffer.from(w,"base64")):w,this.transactionsRootSha256=typeof E=="string"?new Uint8Array(l.Buffer.from(E,"base64")):E,this.participationUpdates=C,this.rewards=_,this.stateProofTracking=K,this.transactions=ne,this.txnCounter=oe,this.upgradeState=X,this.upgradeVote=se,this.attribute_map={genesisHash:"genesis-hash",genesisId:"genesis-id",previousBlockHash:"previous-block-hash",round:"round",seed:"seed",timestamp:"timestamp",transactionsRoot:"transactions-root",transactionsRootSha256:"transactions-root-sha256",participationUpdates:"participation-updates",rewards:"rewards",stateProofTracking:"state-proof-tracking",transactions:"transactions",txnCounter:"txn-counter",upgradeState:"upgrade-state",upgradeVote:"upgrade-vote"}}static from_obj_for_encoding(e){if(typeof e["genesis-hash"]>"u")throw new Error(`Response is missing required field 'genesis-hash': ${e}`);if(typeof e["genesis-id"]>"u")throw new Error(`Response is missing required field 'genesis-id': ${e}`);if(typeof e["previous-block-hash"]>"u")throw new Error(`Response is missing required field 'previous-block-hash': ${e}`);if(typeof e.round>"u")throw new Error(`Response is missing required field 'round': ${e}`);if(typeof e.seed>"u")throw new Error(`Response is missing required field 'seed': ${e}`);if(typeof e.timestamp>"u")throw new Error(`Response is missing required field 'timestamp': ${e}`);if(typeof e["transactions-root"]>"u")throw new Error(`Response is missing required field 'transactions-root': ${e}`);if(typeof e["transactions-root-sha256"]>"u")throw new Error(`Response is missing required field 'transactions-root-sha256': ${e}`);return new Mn({genesisHash:e["genesis-hash"],genesisId:e["genesis-id"],previousBlockHash:e["previous-block-hash"],round:e.round,seed:e.seed,timestamp:e.timestamp,transactionsRoot:e["transactions-root"],transactionsRootSha256:e["transactions-root-sha256"],participationUpdates:typeof e["participation-updates"]<"u"?kr.from_obj_for_encoding(e["participation-updates"]):void 0,rewards:typeof e.rewards<"u"?xr.from_obj_for_encoding(e.rewards):void 0,stateProofTracking:typeof e["state-proof-tracking"]<"u"?e["state-proof-tracking"].map(Pr.from_obj_for_encoding):void 0,transactions:typeof e.transactions<"u"?e.transactions.map(At.from_obj_for_encoding):void 0,txnCounter:e["txn-counter"],upgradeState:typeof e["upgrade-state"]<"u"?Ar.from_obj_for_encoding(e["upgrade-state"]):void 0,upgradeVote:typeof e["upgrade-vote"]<"u"?Fr.from_obj_for_encoding(e["upgrade-vote"]):void 0})}}class xr extends P{constructor({feeSink:e,rewardsCalculationRound:t,rewardsLevel:r,rewardsPool:s,rewardsRate:o,rewardsResidue:d}){super(),this.feeSink=e,this.rewardsCalculationRound=t,this.rewardsLevel=r,this.rewardsPool=s,this.rewardsRate=o,this.rewardsResidue=d,this.attribute_map={feeSink:"fee-sink",rewardsCalculationRound:"rewards-calculation-round",rewardsLevel:"rewards-level",rewardsPool:"rewards-pool",rewardsRate:"rewards-rate",rewardsResidue:"rewards-residue"}}static from_obj_for_encoding(e){if(typeof e["fee-sink"]>"u")throw new Error(`Response is missing required field 'fee-sink': ${e}`);if(typeof e["rewards-calculation-round"]>"u")throw new Error(`Response is missing required field 'rewards-calculation-round': ${e}`);if(typeof e["rewards-level"]>"u")throw new Error(`Response is missing required field 'rewards-level': ${e}`);if(typeof e["rewards-pool"]>"u")throw new Error(`Response is missing required field 'rewards-pool': ${e}`);if(typeof e["rewards-rate"]>"u")throw new Error(`Response is missing required field 'rewards-rate': ${e}`);if(typeof e["rewards-residue"]>"u")throw new Error(`Response is missing required field 'rewards-residue': ${e}`);return new xr({feeSink:e["fee-sink"],rewardsCalculationRound:e["rewards-calculation-round"],rewardsLevel:e["rewards-level"],rewardsPool:e["rewards-pool"],rewardsRate:e["rewards-rate"],rewardsResidue:e["rewards-residue"]})}}class Ar extends P{constructor({currentProtocol:e,nextProtocol:t,nextProtocolApprovals:r,nextProtocolSwitchOn:s,nextProtocolVoteBefore:o}){super(),this.currentProtocol=e,this.nextProtocol=t,this.nextProtocolApprovals=r,this.nextProtocolSwitchOn=s,this.nextProtocolVoteBefore=o,this.attribute_map={currentProtocol:"current-protocol",nextProtocol:"next-protocol",nextProtocolApprovals:"next-protocol-approvals",nextProtocolSwitchOn:"next-protocol-switch-on",nextProtocolVoteBefore:"next-protocol-vote-before"}}static from_obj_for_encoding(e){if(typeof e["current-protocol"]>"u")throw new Error(`Response is missing required field 'current-protocol': ${e}`);return new Ar({currentProtocol:e["current-protocol"],nextProtocol:e["next-protocol"],nextProtocolApprovals:e["next-protocol-approvals"],nextProtocolSwitchOn:e["next-protocol-switch-on"],nextProtocolVoteBefore:e["next-protocol-vote-before"]})}}class Fr extends P{constructor({upgradeApprove:e,upgradeDelay:t,upgradePropose:r}){super(),this.upgradeApprove=e,this.upgradeDelay=t,this.upgradePropose=r,this.attribute_map={upgradeApprove:"upgrade-approve",upgradeDelay:"upgrade-delay",upgradePropose:"upgrade-propose"}}static from_obj_for_encoding(e){return new Fr({upgradeApprove:e["upgrade-approve"],upgradeDelay:e["upgrade-delay"],upgradePropose:e["upgrade-propose"]})}}class vr extends P{constructor({name:e,value:t}){super(),this.name=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.value=typeof t=="string"?new Uint8Array(l.Buffer.from(t,"base64")):t,this.attribute_map={name:"name",value:"value"}}static from_obj_for_encoding(e){if(typeof e.name>"u")throw new Error(`Response is missing required field 'name': ${e}`);if(typeof e.value>"u")throw new Error(`Response is missing required field 'value': ${e}`);return new vr({name:e.name,value:e.value})}}class _r extends P{constructor({name:e}){super(),this.name=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.attribute_map={name:"name"}}static from_obj_for_encoding(e){if(typeof e.name>"u")throw new Error(`Response is missing required field 'name': ${e}`);return new _r({name:e.name})}}class Er extends P{constructor({applicationId:e,boxes:t,nextToken:r}){super(),this.applicationId=e,this.boxes=t,this.nextToken=r,this.attribute_map={applicationId:"application-id",boxes:"boxes",nextToken:"next-token"}}static from_obj_for_encoding(e){if(typeof e["application-id"]>"u")throw new Error(`Response is missing required field 'application-id': ${e}`);if(!Array.isArray(e.boxes))throw new Error(`Response is missing required array field 'boxes': ${e}`);return new Er({applicationId:e["application-id"],boxes:e.boxes.map(_r.from_obj_for_encoding),nextToken:e["next-token"]})}}class Nn extends P{constructor({message:e,data:t}){super(),this.message=e,this.data=t,this.attribute_map={message:"message",data:"data"}}static from_obj_for_encoding(e){if(typeof e.message>"u")throw new Error(`Response is missing required field 'message': ${e}`);return new Nn({message:e.message,data:e.data})}}class Tr extends P{constructor({action:e,bytes:t,uint:r}){super(),this.action=e,this.bytes=t,this.uint=r,this.attribute_map={action:"action",bytes:"bytes",uint:"uint"}}static from_obj_for_encoding(e){if(typeof e.action>"u")throw new Error(`Response is missing required field 'action': ${e}`);return new Tr({action:e.action,bytes:e.bytes,uint:e.uint})}}class Wt extends P{constructor({key:e,value:t}){super(),this.key=e,this.value=t,this.attribute_map={key:"key",value:"value"}}static from_obj_for_encoding(e){if(typeof e.key>"u")throw new Error(`Response is missing required field 'key': ${e}`);if(typeof e.value>"u")throw new Error(`Response is missing required field 'value': ${e}`);return new Wt({key:e.key,value:Tr.from_obj_for_encoding(e.value)})}}class Rr extends P{constructor({hashType:e}){super(),this.hashType=e,this.attribute_map={hashType:"hash-type"}}static from_obj_for_encoding(e){return new Rr({hashType:e["hash-type"]})}}class Kn extends P{constructor({dbAvailable:e,isMigrating:t,message:r,round:s,version:o,data:d,errors:w}){super(),this.dbAvailable=e,this.isMigrating=t,this.message=r,this.round=s,this.version=o,this.data=d,this.errors=w,this.attribute_map={dbAvailable:"db-available",isMigrating:"is-migrating",message:"message",round:"round",version:"version",data:"data",errors:"errors"}}static from_obj_for_encoding(e){if(typeof e["db-available"]>"u")throw new Error(`Response is missing required field 'db-available': ${e}`);if(typeof e["is-migrating"]>"u")throw new Error(`Response is missing required field 'is-migrating': ${e}`);if(typeof e.message>"u")throw new Error(`Response is missing required field 'message': ${e}`);if(typeof e.round>"u")throw new Error(`Response is missing required field 'round': ${e}`);if(typeof e.version>"u")throw new Error(`Response is missing required field 'version': ${e}`);return new Kn({dbAvailable:e["db-available"],isMigrating:e["is-migrating"],message:e.message,round:e.round,version:e.version,data:e.data,errors:e.errors})}}class Br extends P{constructor({blockHeadersCommitment:e,firstAttestedRound:t,latestAttestedRound:r,lnProvenWeight:s,votersCommitment:o}){super(),this.blockHeadersCommitment=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.firstAttestedRound=t,this.latestAttestedRound=r,this.lnProvenWeight=s,this.votersCommitment=typeof o=="string"?new Uint8Array(l.Buffer.from(o,"base64")):o,this.attribute_map={blockHeadersCommitment:"block-headers-commitment",firstAttestedRound:"first-attested-round",latestAttestedRound:"latest-attested-round",lnProvenWeight:"ln-proven-weight",votersCommitment:"voters-commitment"}}static from_obj_for_encoding(e){return new Br({blockHeadersCommitment:e["block-headers-commitment"],firstAttestedRound:e["first-attested-round"],latestAttestedRound:e["latest-attested-round"],lnProvenWeight:e["ln-proven-weight"],votersCommitment:e["voters-commitment"]})}}class Ct extends P{constructor({hashFactory:e,path:t,treeDepth:r}){super(),this.hashFactory=e,this.path=t,this.treeDepth=r,this.attribute_map={hashFactory:"hash-factory",path:"path",treeDepth:"tree-depth"}}static from_obj_for_encoding(e){return new Ct({hashFactory:typeof e["hash-factory"]<"u"?Rr.from_obj_for_encoding(e["hash-factory"]):void 0,path:e.path,treeDepth:e["tree-depth"]})}}class Sr extends P{constructor({address:e,amount:t,isFrozen:r,deleted:s,optedInAtRound:o,optedOutAtRound:d}){super(),this.address=e,this.amount=t,this.isFrozen=r,this.deleted=s,this.optedInAtRound=o,this.optedOutAtRound=d,this.attribute_map={address:"address",amount:"amount",isFrozen:"is-frozen",deleted:"deleted",optedInAtRound:"opted-in-at-round",optedOutAtRound:"opted-out-at-round"}}static from_obj_for_encoding(e){if(typeof e.address>"u")throw new Error(`Response is missing required field 'address': ${e}`);if(typeof e.amount>"u")throw new Error(`Response is missing required field 'amount': ${e}`);if(typeof e["is-frozen"]>"u")throw new Error(`Response is missing required field 'is-frozen': ${e}`);return new Sr({address:e.address,amount:e.amount,isFrozen:e["is-frozen"],deleted:e.deleted,optedInAtRound:e["opted-in-at-round"],optedOutAtRound:e["opted-out-at-round"]})}}class kr extends P{constructor({expiredParticipationAccounts:e}){super(),this.expiredParticipationAccounts=e,this.attribute_map={expiredParticipationAccounts:"expired-participation-accounts"}}static from_obj_for_encoding(e){return new kr({expiredParticipationAccounts:e["expired-participation-accounts"]})}}class Ir extends P{constructor({partProofs:e,positionsToReveal:t,reveals:r,saltVersion:s,sigCommit:o,sigProofs:d,signedWeight:w}){super(),this.partProofs=e,this.positionsToReveal=t,this.reveals=r,this.saltVersion=s,this.sigCommit=typeof o=="string"?new Uint8Array(l.Buffer.from(o,"base64")):o,this.sigProofs=d,this.signedWeight=w,this.attribute_map={partProofs:"part-proofs",positionsToReveal:"positions-to-reveal",reveals:"reveals",saltVersion:"salt-version",sigCommit:"sig-commit",sigProofs:"sig-proofs",signedWeight:"signed-weight"}}static from_obj_for_encoding(e){return new Ir({partProofs:typeof e["part-proofs"]<"u"?Ct.from_obj_for_encoding(e["part-proofs"]):void 0,positionsToReveal:e["positions-to-reveal"],reveals:typeof e.reveals<"u"?e.reveals.map(Ur.from_obj_for_encoding):void 0,saltVersion:e["salt-version"],sigCommit:e["sig-commit"],sigProofs:typeof e["sig-proofs"]<"u"?Ct.from_obj_for_encoding(e["sig-proofs"]):void 0,signedWeight:e["signed-weight"]})}}class Dr extends P{constructor({verifier:e,weight:t}){super(),this.verifier=e,this.weight=t,this.attribute_map={verifier:"verifier",weight:"weight"}}static from_obj_for_encoding(e){return new Dr({verifier:typeof e.verifier<"u"?qr.from_obj_for_encoding(e.verifier):void 0,weight:e.weight})}}class Ur extends P{constructor({participant:e,position:t,sigSlot:r}){super(),this.participant=e,this.position=t,this.sigSlot=r,this.attribute_map={participant:"participant",position:"position",sigSlot:"sig-slot"}}static from_obj_for_encoding(e){return new Ur({participant:typeof e.participant<"u"?Dr.from_obj_for_encoding(e.participant):void 0,position:e.position,sigSlot:typeof e["sig-slot"]<"u"?Cr.from_obj_for_encoding(e["sig-slot"]):void 0})}}class Cr extends P{constructor({lowerSigWeight:e,signature:t}){super(),this.lowerSigWeight=e,this.signature=t,this.attribute_map={lowerSigWeight:"lower-sig-weight",signature:"signature"}}static from_obj_for_encoding(e){return new Cr({lowerSigWeight:e["lower-sig-weight"],signature:typeof e.signature<"u"?jr.from_obj_for_encoding(e.signature):void 0})}}class jr extends P{constructor({falconSignature:e,merkleArrayIndex:t,proof:r,verifyingKey:s}){super(),this.falconSignature=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.merkleArrayIndex=t,this.proof=r,this.verifyingKey=typeof s=="string"?new Uint8Array(l.Buffer.from(s,"base64")):s,this.attribute_map={falconSignature:"falcon-signature",merkleArrayIndex:"merkle-array-index",proof:"proof",verifyingKey:"verifying-key"}}static from_obj_for_encoding(e){return new jr({falconSignature:e["falcon-signature"],merkleArrayIndex:e["merkle-array-index"],proof:typeof e.proof<"u"?Ct.from_obj_for_encoding(e.proof):void 0,verifyingKey:e["verifying-key"]})}}class Pr extends P{constructor({nextRound:e,onlineTotalWeight:t,type:r,votersCommitment:s}){super(),this.nextRound=e,this.onlineTotalWeight=t,this.type=r,this.votersCommitment=typeof s=="string"?new Uint8Array(l.Buffer.from(s,"base64")):s,this.attribute_map={nextRound:"next-round",onlineTotalWeight:"online-total-weight",type:"type",votersCommitment:"voters-commitment"}}static from_obj_for_encoding(e){return new Pr({nextRound:e["next-round"],onlineTotalWeight:e["online-total-weight"],type:e.type,votersCommitment:e["voters-commitment"]})}}class qr extends P{constructor({commitment:e,keyLifetime:t}){super(),this.commitment=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.keyLifetime=t,this.attribute_map={commitment:"commitment",keyLifetime:"key-lifetime"}}static from_obj_for_encoding(e){return new qr({commitment:e.commitment,keyLifetime:e["key-lifetime"]})}}class Xt extends P{constructor({numByteSlice:e,numUint:t}){super(),this.numByteSlice=e,this.numUint=t,this.attribute_map={numByteSlice:"num-byte-slice",numUint:"num-uint"}}static from_obj_for_encoding(e){if(typeof e["num-byte-slice"]>"u")throw new Error(`Response is missing required field 'num-byte-slice': ${e}`);if(typeof e["num-uint"]>"u")throw new Error(`Response is missing required field 'num-uint': ${e}`);return new Xt({numByteSlice:e["num-byte-slice"],numUint:e["num-uint"]})}}class Jt extends P{constructor({key:e,value:t}){super(),this.key=e,this.value=t,this.attribute_map={key:"key",value:"value"}}static from_obj_for_encoding(e){if(typeof e.key>"u")throw new Error(`Response is missing required field 'key': ${e}`);if(typeof e.value>"u")throw new Error(`Response is missing required field 'value': ${e}`);return new Jt({key:e.key,value:$r.from_obj_for_encoding(e.value)})}}class $r extends P{constructor({bytes:e,type:t,uint:r}){super(),this.bytes=e,this.type=t,this.uint=r,this.attribute_map={bytes:"bytes",type:"type",uint:"uint"}}static from_obj_for_encoding(e){if(typeof e.bytes>"u")throw new Error(`Response is missing required field 'bytes': ${e}`);if(typeof e.type>"u")throw new Error(`Response is missing required field 'type': ${e}`);if(typeof e.uint>"u")throw new Error(`Response is missing required field 'uint': ${e}`);return new $r({bytes:e.bytes,type:e.type,uint:e.uint})}}class At extends P{constructor({fee:e,firstValid:t,lastValid:r,sender:s,applicationTransaction:o,assetConfigTransaction:d,assetFreezeTransaction:w,assetTransferTransaction:E,authAddr:C,closeRewards:_,closingAmount:K,confirmedRound:ne,createdApplicationIndex:oe,createdAssetIndex:X,genesisHash:se,genesisId:qe,globalStateDelta:We,group:tt,id:Et,innerTxns:Tt,intraRoundOffset:Rt,keyregTransaction:Ze,lease:Qe,localStateDelta:gt,logs:mt,note:yt,paymentTransaction:nn,receiverRewards:ss,rekeyTo:rr,roundTime:sn,senderRewards:on,signature:an,stateProofTransaction:un,txType:is}){super(),this.fee=e,this.firstValid=t,this.lastValid=r,this.sender=s,this.applicationTransaction=o,this.assetConfigTransaction=d,this.assetFreezeTransaction=w,this.assetTransferTransaction=E,this.authAddr=C,this.closeRewards=_,this.closingAmount=K,this.confirmedRound=ne,this.createdApplicationIndex=oe,this.createdAssetIndex=X,this.genesisHash=typeof se=="string"?new Uint8Array(l.Buffer.from(se,"base64")):se,this.genesisId=qe,this.globalStateDelta=We,this.group=typeof tt=="string"?new Uint8Array(l.Buffer.from(tt,"base64")):tt,this.id=Et,this.innerTxns=Tt,this.intraRoundOffset=Rt,this.keyregTransaction=Ze,this.lease=typeof Qe=="string"?new Uint8Array(l.Buffer.from(Qe,"base64")):Qe,this.localStateDelta=gt,this.logs=mt,this.note=typeof yt=="string"?new Uint8Array(l.Buffer.from(yt,"base64")):yt,this.paymentTransaction=nn,this.receiverRewards=ss,this.rekeyTo=rr,this.roundTime=sn,this.senderRewards=on,this.signature=an,this.stateProofTransaction=un,this.txType=is,this.attribute_map={fee:"fee",firstValid:"first-valid",lastValid:"last-valid",sender:"sender",applicationTransaction:"application-transaction",assetConfigTransaction:"asset-config-transaction",assetFreezeTransaction:"asset-freeze-transaction",assetTransferTransaction:"asset-transfer-transaction",authAddr:"auth-addr",closeRewards:"close-rewards",closingAmount:"closing-amount",confirmedRound:"confirmed-round",createdApplicationIndex:"created-application-index",createdAssetIndex:"created-asset-index",genesisHash:"genesis-hash",genesisId:"genesis-id",globalStateDelta:"global-state-delta",group:"group",id:"id",innerTxns:"inner-txns",intraRoundOffset:"intra-round-offset",keyregTransaction:"keyreg-transaction",lease:"lease",localStateDelta:"local-state-delta",logs:"logs",note:"note",paymentTransaction:"payment-transaction",receiverRewards:"receiver-rewards",rekeyTo:"rekey-to",roundTime:"round-time",senderRewards:"sender-rewards",signature:"signature",stateProofTransaction:"state-proof-transaction",txType:"tx-type"}}static from_obj_for_encoding(e){if(typeof e.fee>"u")throw new Error(`Response is missing required field 'fee': ${e}`);if(typeof e["first-valid"]>"u")throw new Error(`Response is missing required field 'first-valid': ${e}`);if(typeof e["last-valid"]>"u")throw new Error(`Response is missing required field 'last-valid': ${e}`);if(typeof e.sender>"u")throw new Error(`Response is missing required field 'sender': ${e}`);return new At({fee:e.fee,firstValid:e["first-valid"],lastValid:e["last-valid"],sender:e.sender,applicationTransaction:typeof e["application-transaction"]<"u"?Lr.from_obj_for_encoding(e["application-transaction"]):void 0,assetConfigTransaction:typeof e["asset-config-transaction"]<"u"?Or.from_obj_for_encoding(e["asset-config-transaction"]):void 0,assetFreezeTransaction:typeof e["asset-freeze-transaction"]<"u"?Mr.from_obj_for_encoding(e["asset-freeze-transaction"]):void 0,assetTransferTransaction:typeof e["asset-transfer-transaction"]<"u"?Nr.from_obj_for_encoding(e["asset-transfer-transaction"]):void 0,authAddr:e["auth-addr"],closeRewards:e["close-rewards"],closingAmount:e["closing-amount"],confirmedRound:e["confirmed-round"],createdApplicationIndex:e["created-application-index"],createdAssetIndex:e["created-asset-index"],genesisHash:e["genesis-hash"],genesisId:e["genesis-id"],globalStateDelta:typeof e["global-state-delta"]<"u"?e["global-state-delta"].map(Wt.from_obj_for_encoding):void 0,group:e.group,id:e.id,innerTxns:typeof e["inner-txns"]<"u"?e["inner-txns"].map(At.from_obj_for_encoding):void 0,intraRoundOffset:e["intra-round-offset"],keyregTransaction:typeof e["keyreg-transaction"]<"u"?Kr.from_obj_for_encoding(e["keyreg-transaction"]):void 0,lease:e.lease,localStateDelta:typeof e["local-state-delta"]<"u"?e["local-state-delta"].map(yr.from_obj_for_encoding):void 0,logs:e.logs,note:e.note,paymentTransaction:typeof e["payment-transaction"]<"u"?zr.from_obj_for_encoding(e["payment-transaction"]):void 0,receiverRewards:e["receiver-rewards"],rekeyTo:e["rekey-to"],roundTime:e["round-time"],senderRewards:e["sender-rewards"],signature:typeof e.signature<"u"?Gr.from_obj_for_encoding(e.signature):void 0,stateProofTransaction:typeof e["state-proof-transaction"]<"u"?Wr.from_obj_for_encoding(e["state-proof-transaction"]):void 0,txType:e["tx-type"]})}}class Lr extends P{constructor({applicationId:e,accounts:t,applicationArgs:r,approvalProgram:s,clearStateProgram:o,extraProgramPages:d,foreignApps:w,foreignAssets:E,globalStateSchema:C,localStateSchema:_,onCompletion:K}){super(),this.applicationId=e,this.accounts=t,this.applicationArgs=r,this.approvalProgram=typeof s=="string"?new Uint8Array(l.Buffer.from(s,"base64")):s,this.clearStateProgram=typeof o=="string"?new Uint8Array(l.Buffer.from(o,"base64")):o,this.extraProgramPages=d,this.foreignApps=w,this.foreignAssets=E,this.globalStateSchema=C,this.localStateSchema=_,this.onCompletion=K,this.attribute_map={applicationId:"application-id",accounts:"accounts",applicationArgs:"application-args",approvalProgram:"approval-program",clearStateProgram:"clear-state-program",extraProgramPages:"extra-program-pages",foreignApps:"foreign-apps",foreignAssets:"foreign-assets",globalStateSchema:"global-state-schema",localStateSchema:"local-state-schema",onCompletion:"on-completion"}}static from_obj_for_encoding(e){if(typeof e["application-id"]>"u")throw new Error(`Response is missing required field 'application-id': ${e}`);return new Lr({applicationId:e["application-id"],accounts:e.accounts,applicationArgs:e["application-args"],approvalProgram:e["approval-program"],clearStateProgram:e["clear-state-program"],extraProgramPages:e["extra-program-pages"],foreignApps:e["foreign-apps"],foreignAssets:e["foreign-assets"],globalStateSchema:typeof e["global-state-schema"]<"u"?Xt.from_obj_for_encoding(e["global-state-schema"]):void 0,localStateSchema:typeof e["local-state-schema"]<"u"?Xt.from_obj_for_encoding(e["local-state-schema"]):void 0,onCompletion:e["on-completion"]})}}class Or extends P{constructor({assetId:e,params:t}){super(),this.assetId=e,this.params=t,this.attribute_map={assetId:"asset-id",params:"params"}}static from_obj_for_encoding(e){return new Or({assetId:e["asset-id"],params:typeof e.params<"u"?Vt.from_obj_for_encoding(e.params):void 0})}}class Mr extends P{constructor({address:e,assetId:t,newFreezeStatus:r}){super(),this.address=e,this.assetId=t,this.newFreezeStatus=r,this.attribute_map={address:"address",assetId:"asset-id",newFreezeStatus:"new-freeze-status"}}static from_obj_for_encoding(e){if(typeof e.address>"u")throw new Error(`Response is missing required field 'address': ${e}`);if(typeof e["asset-id"]>"u")throw new Error(`Response is missing required field 'asset-id': ${e}`);if(typeof e["new-freeze-status"]>"u")throw new Error(`Response is missing required field 'new-freeze-status': ${e}`);return new Mr({address:e.address,assetId:e["asset-id"],newFreezeStatus:e["new-freeze-status"]})}}class Nr extends P{constructor({amount:e,assetId:t,receiver:r,closeAmount:s,closeTo:o,sender:d}){super(),this.amount=e,this.assetId=t,this.receiver=r,this.closeAmount=s,this.closeTo=o,this.sender=d,this.attribute_map={amount:"amount",assetId:"asset-id",receiver:"receiver",closeAmount:"close-amount",closeTo:"close-to",sender:"sender"}}static from_obj_for_encoding(e){if(typeof e.amount>"u")throw new Error(`Response is missing required field 'amount': ${e}`);if(typeof e["asset-id"]>"u")throw new Error(`Response is missing required field 'asset-id': ${e}`);if(typeof e.receiver>"u")throw new Error(`Response is missing required field 'receiver': ${e}`);return new Nr({amount:e.amount,assetId:e["asset-id"],receiver:e.receiver,closeAmount:e["close-amount"],closeTo:e["close-to"],sender:e.sender})}}class Kr extends P{constructor({nonParticipation:e,selectionParticipationKey:t,stateProofKey:r,voteFirstValid:s,voteKeyDilution:o,voteLastValid:d,voteParticipationKey:w}){super(),this.nonParticipation=e,this.selectionParticipationKey=typeof t=="string"?new Uint8Array(l.Buffer.from(t,"base64")):t,this.stateProofKey=typeof r=="string"?new Uint8Array(l.Buffer.from(r,"base64")):r,this.voteFirstValid=s,this.voteKeyDilution=o,this.voteLastValid=d,this.voteParticipationKey=typeof w=="string"?new Uint8Array(l.Buffer.from(w,"base64")):w,this.attribute_map={nonParticipation:"non-participation",selectionParticipationKey:"selection-participation-key",stateProofKey:"state-proof-key",voteFirstValid:"vote-first-valid",voteKeyDilution:"vote-key-dilution",voteLastValid:"vote-last-valid",voteParticipationKey:"vote-participation-key"}}static from_obj_for_encoding(e){return new Kr({nonParticipation:e["non-participation"],selectionParticipationKey:e["selection-participation-key"],stateProofKey:e["state-proof-key"],voteFirstValid:e["vote-first-valid"],voteKeyDilution:e["vote-key-dilution"],voteLastValid:e["vote-last-valid"],voteParticipationKey:e["vote-participation-key"]})}}class zr extends P{constructor({amount:e,receiver:t,closeAmount:r,closeRemainderTo:s}){super(),this.amount=e,this.receiver=t,this.closeAmount=r,this.closeRemainderTo=s,this.attribute_map={amount:"amount",receiver:"receiver",closeAmount:"close-amount",closeRemainderTo:"close-remainder-to"}}static from_obj_for_encoding(e){if(typeof e.amount>"u")throw new Error(`Response is missing required field 'amount': ${e}`);if(typeof e.receiver>"u")throw new Error(`Response is missing required field 'receiver': ${e}`);return new zr({amount:e.amount,receiver:e.receiver,closeAmount:e["close-amount"],closeRemainderTo:e["close-remainder-to"]})}}class zn extends P{constructor({currentRound:e,transaction:t}){super(),this.currentRound=e,this.transaction=t,this.attribute_map={currentRound:"current-round",transaction:"transaction"}}static from_obj_for_encoding(e){if(typeof e["current-round"]>"u")throw new Error(`Response is missing required field 'current-round': ${e}`);if(typeof e.transaction>"u")throw new Error(`Response is missing required field 'transaction': ${e}`);return new zn({currentRound:e["current-round"],transaction:At.from_obj_for_encoding(e.transaction)})}}class Gr extends P{constructor({logicsig:e,multisig:t,sig:r}){super(),this.logicsig=e,this.multisig=t,this.sig=typeof r=="string"?new Uint8Array(l.Buffer.from(r,"base64")):r,this.attribute_map={logicsig:"logicsig",multisig:"multisig",sig:"sig"}}static from_obj_for_encoding(e){return new Gr({logicsig:typeof e.logicsig<"u"?Hr.from_obj_for_encoding(e.logicsig):void 0,multisig:typeof e.multisig<"u"?Yt.from_obj_for_encoding(e.multisig):void 0,sig:e.sig})}}class Hr extends P{constructor({logic:e,args:t,multisigSignature:r,signature:s}){super(),this.logic=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.args=t,this.multisigSignature=r,this.signature=typeof s=="string"?new Uint8Array(l.Buffer.from(s,"base64")):s,this.attribute_map={logic:"logic",args:"args",multisigSignature:"multisig-signature",signature:"signature"}}static from_obj_for_encoding(e){if(typeof e.logic>"u")throw new Error(`Response is missing required field 'logic': ${e}`);return new Hr({logic:e.logic,args:e.args,multisigSignature:typeof e["multisig-signature"]<"u"?Yt.from_obj_for_encoding(e["multisig-signature"]):void 0,signature:e.signature})}}class Yt extends P{constructor({subsignature:e,threshold:t,version:r}){super(),this.subsignature=e,this.threshold=t,this.version=r,this.attribute_map={subsignature:"subsignature",threshold:"threshold",version:"version"}}static from_obj_for_encoding(e){return new Yt({subsignature:typeof e.subsignature<"u"?e.subsignature.map(Vr.from_obj_for_encoding):void 0,threshold:e.threshold,version:e.version})}}class Vr extends P{constructor({publicKey:e,signature:t}){super(),this.publicKey=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.signature=typeof t=="string"?new Uint8Array(l.Buffer.from(t,"base64")):t,this.attribute_map={publicKey:"public-key",signature:"signature"}}static from_obj_for_encoding(e){return new Vr({publicKey:e["public-key"],signature:e.signature})}}class Wr extends P{constructor({message:e,stateProof:t,stateProofType:r}){super(),this.message=e,this.stateProof=t,this.stateProofType=r,this.attribute_map={message:"message",stateProof:"state-proof",stateProofType:"state-proof-type"}}static from_obj_for_encoding(e){return new Wr({message:typeof e.message<"u"?Br.from_obj_for_encoding(e.message):void 0,stateProof:typeof e["state-proof"]<"u"?Ir.from_obj_for_encoding(e["state-proof"]):void 0,stateProofType:e["state-proof-type"]})}}class Gn extends P{constructor({currentRound:e,transactions:t,nextToken:r}){super(),this.currentRound=e,this.transactions=t,this.nextToken=r,this.attribute_map={currentRound:"current-round",transactions:"transactions",nextToken:"next-token"}}static from_obj_for_encoding(e){if(typeof e["current-round"]>"u")throw new Error(`Response is missing required field 'current-round': ${e}`);if(!Array.isArray(e.transactions))throw new Error(`Response is missing required array field 'transactions': ${e}`);return new Gn({currentRound:e["current-round"],transactions:e.transactions.map(At.from_obj_for_encoding),nextToken:e["next-token"]})}}class Yi extends ue{constructor(e,t,r,s){super(e,t),this.index=r,this.index=r;const o=l.Buffer.from(s).toString("base64");this.query.name=encodeURI(`b64:${o}`)}path(){return`/v2/applications/${this.index}/box`}prepare(e){return vr.from_obj_for_encoding(e)}}class Zi extends ue{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}exclude(e){return this.query.exclude=e,this}}class Qi extends ue{path(){return"/v2/transactions"}notePrefix(e){return this.query["note-prefix"]=kn(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 eo extends ue{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 to extends ue{path(){return"/v2/applications"}index(e){return this.query["application-id"]=e,this}creator(e){return this.query.creator=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 ro extends ue{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/applications/${this.index}/boxes`}nextToken(e){return this.query.next=e,this}limit(e){return this.query.limit=e,this}prepare(e){return Er.from_obj_for_encoding(e)}}class no extends ln{constructor(e,t="http://127.0.0.1",r=8080,s={}){super("X-Indexer-API-Token",e,t,r,s)}makeHealthCheck(){return new qi(this.c,this.intDecoding)}lookupAssetBalances(e){return new $i(this.c,this.intDecoding,e)}lookupAssetTransactions(e){return new Oi(this.c,this.intDecoding,e)}lookupAccountTransactions(e){return new Li(this.c,this.intDecoding,e)}lookupBlock(e){return new Mi(this.c,this.intDecoding,e)}lookupTransactionByID(e){return new Ni(this.c,this.intDecoding,e)}lookupAccountByID(e){return new Ki(this.c,this.intDecoding,e)}lookupAccountAssets(e){return new zi(this.c,this.intDecoding,e)}lookupAccountCreatedAssets(e){return new Gi(this.c,this.intDecoding,e)}lookupAccountAppLocalStates(e){return new Hi(this.c,this.intDecoding,e)}lookupAccountCreatedApplications(e){return new Vi(this.c,this.intDecoding,e)}lookupAssetByID(e){return new Wi(this.c,this.intDecoding,e)}lookupApplications(e){return new Xi(this.c,this.intDecoding,e)}lookupApplicationLogs(e){return new Ji(this.c,this.intDecoding,e)}searchAccounts(){return new Zi(this.c,this.intDecoding)}searchForTransactions(){return new Qi(this.c,this.intDecoding)}searchForAssets(){return new eo(this.c,this.intDecoding)}searchForApplications(){return new to(this.c,this.intDecoding)}searchForApplicationBoxes(e){return new ro(this.c,this.intDecoding,e)}lookupApplicationBoxByIDandName(e,t){return new Yi(this.c,this.intDecoding,e,t)}}async function fs(n,e,t){const r=await n.status().do();if(typeof r>"u")throw new Error("Unable to get node status");const s=r["last-round"]+1;let o=s;for(;o<s+t;){let d=!1;try{const w=await n.pendingTransactionInformation(e).do();if(w["confirmed-round"])return w;if(w["pool-error"])throw d=!0,new Error(`Transaction Rejected: ${w["pool-error"]}`)}catch(w){if(d)throw w}await n.statusAfterBlock(o).do(),o+=1}throw new Error(`Transaction not confirmed after ${t} rounds`)}function Ft(n,e){let t=n.toString(16);t.length!==e*2&&(t=t.padStart(e*2,"0"));const r=new Uint8Array(t.length/2);for(let s=0,o=0;s<t.length/2;s++,o+=2)r[s]=parseInt(t.slice(o,o+2),16);return r}function Hn(n){let e=BigInt(0);const t=l.Buffer.from(n);for(let r=0;r<n.length;r++)e=BigInt(Number(t.readUIntBE(r,1)))+e*BigInt(256);return e}function so(){const n=m();return{addr:te(n.publicKey),sk:n.secretKey}}var Vn=["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"];const Wn="failed to decode mnemonic",io="the mnemonic contains a word that is not in the wordlist";function ls(n){const e=[];let t=0,r=0;function s(d){t|=d<<r,r+=8,r>=11&&(e.push(t&2047),t>>=11,r-=11)}function o(){r&&e.push(t)}return n.forEach(s),o(),e}function hs(n){return n.map(e=>Vn[e])}function ds(n){const e=Y(n),t=ls(e);return hs(t)[0]}function Xn(n){if(n.length!==T)throw new RangeError(`Seed length must be ${T}`);const e=ls(n),t=hs(e),r=ds(n);return`${t.join(" ")} ${r}`}function oo(n){const e=[];let t=0,r=0;function s(d){for(t|=d<<r,r+=11;r>=8;)e.push(t&255),t>>=8,r-=8}function o(){r&&e.push(t)}return n.forEach(s),o(),new Uint8Array(e)}function Jn(n){const e=n.split(" "),t=e.slice(0,24);for(const w of t)if(Vn.indexOf(w)===-1)throw new Error(io);const r=e[e.length-1],s=t.map(w=>Vn.indexOf(w));let o=oo(s);if(o.length!==33)throw new Error(Wn);if(o[o.length-1]!==0)throw new Error(Wn);if(o=o.slice(0,o.length-1),ds(o)===r)return o;throw new Error(Wn)}function ao(n){const e=Jn(n),t=be(e);return{addr:te(t.publicKey),sk:t.secretKey}}function uo(n){const e=n.slice(0,T);return Xn(e)}function co(n){return Jn(n)}function fo(n){return Xn(n)}const ps=16;class lo{constructor(e){if(this.name="Transaction group",this.tag=l.Buffer.from("TG"),e.length>ps){const t=`${e.length.toString()} transactions grouped together but max group size is ${ps.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=l.Buffer.from("TG"),t.txGroupHashes=[];for(const r of e.txlist)t.txGroupHashes.push(l.Buffer.from(r));return t}toByte(){return a(this.get_obj_for_encoding())}}function gs(n){const e=[];for(const d of n){const w=Re(d);e.push(w.rawTxID())}const t=new lo(e),r=t.toByte(),s=l.Buffer.from(R(t.tag,r)),o=Y(s);return l.Buffer.from(o)}function ms(n,e){const t=gs(n),r=[];for(const s of n){const o=Re(s);(!e||te(o.from.publicKey)===e)&&(o.group=t,r.push(o))}return r}var wa=null;const ho="Not enough multisig transactions to merge. Need at least two",po="Cannot merge txs. txIDs differ",go="Cannot merge txs. Auth addrs differ",ys="Cannot merge txs. Multisig preimages differ",mo="Cannot merge txs. subsigs are mismatched.",yo="Key does not exist",ws="Cannot mutate a multisig field as it would invalidate all existing signatures.",wo="Cannot sign a multisig transaction using `signTxn`. Use `partialSignTxn` instead.",bo="Cannot add multisig signature. Signature is not of the correct length.";function bs(n,{version:e,threshold:t,addrs:r}){const s=r.map(_=>B(_).publicKey),o=s.map(_=>({pk:l.Buffer.from(_)})),d={v:e,thr:t,subsig:o},w=n.get_obj_for_encoding(),E={msig:d,txn:w},C=et({version:e,threshold:t,pks:s});return te(w.snd)!==te(C)&&(E.sgnr=l.Buffer.from(C)),new Uint8Array(a(E))}function xs(n,{rawSig:e,myPk:t},{version:r,threshold:s,pks:o}){const d=bs(n,{version:r,threshold:s,addrs:o.map(_=>te(_))}),w=u(d);let E=!1;if(w.msig.subsig.forEach((_,K)=>{Ee(_.pk,t)&&(E=!0,w.msig.subsig[K].s=e)}),E===!1)throw new Error(yo);const C=et({version:r,threshold:s,pks:o});return te(w.txn.snd)!==te(C)&&(w.sgnr=l.Buffer.from(C)),new Uint8Array(a(w))}class jt extends he{addLease(){throw new Error(ws)}addRekey(){throw new Error(ws)}signTxn(e){throw new Error(wo)}partialSignTxn({version:e,threshold:t,pks:r},s){const o=ie(s).publicKey;return xs(this,{rawSig:this.rawSignTxn(s),myPk:o},{version:e,threshold:t,pks:r})}partialSignWithMultisigSignature(e,t,r){if(!fe(r.length))throw new Error(bo);return xs(this,{rawSig:r,myPk:B(t).publicKey},e)}static from_obj_for_encoding(e){return super.from_obj_for_encoding(e)}}function Xr(n){if(n.length<2)throw new Error(ho);const e=u(n[0]),t=jt.from_obj_for_encoding(e.txn).txID(),r=e.sgnr?te(e.sgnr):void 0,s={version:e.msig.v,threshold:e.msig.thr,pks:e.msig.subsig.map(C=>C.pk)},o=te(et(s)),d=e.msig.subsig.map(C=>({...C}));for(let C=1;C<n.length;C++){const _=u(n[C]);if(jt.from_obj_for_encoding(_.txn).txID()!==t)throw new Error(po);const ne=_.sgnr?te(_.sgnr):void 0;if(r!==ne)throw new Error(go);if(_.msig.subsig.length!==e.msig.subsig.length)throw new Error(ys);const oe={version:_.msig.v,threshold:_.msig.thr,pks:_.msig.subsig.map(se=>se.pk)},X=te(et(oe));if(o!==X)throw new Error(ys);_.msig.subsig.forEach((se,qe)=>{if(!se.s)return;const We=d[qe];if(We.s&&l.Buffer.compare(l.Buffer.from(se.s),l.Buffer.from(We.s))!==0)throw new Error(mo);We.s=se.s})}const E={msig:{v:e.msig.v,thr:e.msig.thr,subsig:d},txn:e.txn};return typeof r<"u"&&(E.sgnr=l.Buffer.from(B(r).publicKey)),new Uint8Array(a(E))}function As(n,e,t){const r=e.v,s=e.thr,o=e.subsig,d=o.map(_=>_.pk);if(e.subsig.length<s)return!1;let w;try{w=et({version:r,threshold:s,pks:d})}catch{return!1}if(!v(w,t))return!1;let E=0;for(const _ of o)_.s!==void 0&&(E+=1);if(E<s)return!1;let C=0;for(const _ of o)_.s!==void 0&&Z(n,_.s,_.pk)&&(C+=1);return!(C<s)}function Fs(n,{version:e,threshold:t,addrs:r},s){const o=lt({version:e,threshold:t,addrs:r});Object.prototype.hasOwnProperty.call(n,"from")||(n.from=o);const d=r.map(_=>B(_).publicKey),w=n instanceof he;let E,C;return w?(E=n,C=jt.prototype.partialSignTxn.call(E,{version:e,threshold:t,pks:d},s)):(E=new jt(n),C=E.partialSignTxn({version:e,threshold:t,pks:d},s)),{txID:E.txID().toString(),blob:C}}function xo(n,{version:e,threshold:t,addrs:r},s){const o=r.map(C=>B(C).publicKey),d=u(n),w=jt.from_obj_for_encoding(d.txn),E=w.partialSignTxn({version:e,threshold:t,pks:o},s);return{txID:w.txID().toString(),blob:Xr([n,E])}}function Ao(n,{version:e,threshold:t,addrs:r},s,o){const d=r.map(_=>B(_).publicKey),w=u(n),E=jt.from_obj_for_encoding(w.txn),C=E.partialSignWithMultisigSignature({version:e,threshold:t,pks:d},s,o);return{txID:E.txID().toString(),blob:Xr([n,C])}}function Fo({version:n,threshold:e,addrs:t}){return lt({version:n,threshold:e,addrs:t})}function vs(n){if(!n||n.length===0)throw new Error("empty program");const e=`
2
- `.charCodeAt(0),t=" ".charCodeAt(0),r="~".charCodeAt(0),s=d=>t<=d&&d<=r;if(n.every(d=>d===e||s(d))){const d=l.Buffer.from(n).toString();throw ee(d)?new Error("requesting program bytes, get Algorand address"):l.Buffer.from(d,"base64").toString("base64")===d?new Error("program should not be b64 encoded"):new Error("program bytes are all ASCII printable characters, not looking like Teal byte code")}}class dt{constructor(e,t){if(this.tag=l.Buffer.from("Program"),t&&(!Array.isArray(t)||!t.every(s=>s.constructor===Uint8Array||l.Buffer.isBuffer(s))))throw new TypeError("Invalid arguments");let r;t!=null&&(r=t.map(s=>new Uint8Array(s))),vs(e),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 dt(e.l,e.arg);return t.sig=e.sig,t.msig=e.msig,t}verify(e){if(this.sig&&this.msig)return!1;try{vs(this.logic)}catch{return!1}const t=R(this.tag,this.logic);if(!this.sig&&!this.msig){const r=Y(t);return v(r,e)}return this.sig?Z(t,this.sig,e):As(t,this.msig,e)}address(){const e=R(this.tag,this.logic),t=Y(e);return te(new Uint8Array(t))}sign(e,t){if(t==null)this.sig=this.signProgram(e);else{const r=t.addrs.map(d=>({pk:B(d).publicKey}));this.msig={v:t.version,thr:t.threshold,subsig:r};const[s,o]=this.singleSignMultisig(e,this.msig);this.msig.subsig[o].s=s}}appendToMultisig(e){if(this.msig===void 0)throw new Error("no multisig present");const[t,r]=this.singleSignMultisig(e,this.msig);this.msig.subsig[r].s=t}signProgram(e){const t=R(this.tag,this.logic);return le(t,e)}singleSignMultisig(e,t){let r=-1;const s=ie(e).publicKey;for(let d=0;d<t.subsig.length;d++){const{pk:w}=t.subsig[d];if(v(w,s)){r=d;break}}if(r===-1)throw new Error("invalid secret key");return[this.signProgram(e),r]}toByte(){return a(this.get_obj_for_encoding())}static fromByte(e){const t=u(e);return dt.from_obj_for_encoding(t)}}class Zt{constructor(e,t){this.lsig=new dt(e,t),this.sigkey=void 0}get_obj_for_encoding(){const e={lsig:this.lsig.get_obj_for_encoding()};return this.sigkey&&(e.sigkey=this.sigkey),e}static from_obj_for_encoding(e){const t=new Zt(e.lsig.l,e.lsig.arg);return t.lsig=dt.from_obj_for_encoding(e.lsig),t.sigkey=e.sigkey,t}toByte(){return a(this.get_obj_for_encoding())}static fromByte(e){const t=u(e);return Zt.from_obj_for_encoding(t)}isDelegated(){return!!(this.lsig.sig||this.lsig.msig)}verify(){const e=this.address();return this.lsig.verify(B(e).publicKey)}address(){if(this.lsig.sig&&this.lsig.msig)throw new Error("LogicSig has too many signatures. At most one of sig or msig may be present");if(this.lsig.sig){if(!this.sigkey)throw new Error("Signing key for delegated account is missing");return te(this.sigkey)}if(this.lsig.msig){const e={version:this.lsig.msig.v,threshold:this.lsig.msig.thr,pks:this.lsig.msig.subsig.map(t=>t.pk)};return te(et(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=ie(e).publicKey}}function vo(n,e,t){if(!e.verify(t))throw new Error("Logic signature verification failed. Ensure the program and signature are valid.");const r={lsig:e.get_obj_for_encoding(),txn:n.get_obj_for_encoding()};return Ee(t,n.from.publicKey)||(r.sgnr=l.Buffer.from(t)),{txID:n.txID().toString(),blob:a(r)}}function Yn(n,e){let t,r;if(e instanceof Zt)t=e.lsig,r=B(e.address()).publicKey;else if(t=e,t.sig)r=n.from.publicKey;else if(t.msig){const s={version:t.msig.v,threshold:t.msig.thr,pks:t.msig.subsig.map(o=>o.pk)};r=et(s)}else r=B(t.address()).publicKey;return vo(n,t,r)}function _o(n,e){const t=Re(n);return Yn(t,e)}function Eo(n){return dt.fromByte(n)}const _s=l.Buffer.from("ProgData");function Es(n,e,t){const r=R(B(t).publicKey,e),s=l.Buffer.from(R(_s,r));return le(s,n)}function To(n,e,t,r){const s=R(B(e).publicKey,n),o=l.Buffer.from(R(_s,s));return Z(o,t,r)}function Ro(n,e,t){const s=new dt(t).address();return Es(n,e,s)}let Ts={},Rs={};"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split("").forEach(function(n,e){Ts[n]=e,Rs[e]=n});function Bo(n){let e=[],t=0,r=0;for(let s=0;s<n.length;s+=1){let o=Ts[n[s]];if(o===void 0)throw new Error("Invalid character ("+n[s]+")");const d=o&32;if(o&=31,r+=o<<t,d)t+=5;else{const w=r&1;r>>>=1,w?e.push(r===0?-2147483648:-r):e.push(r),r=t=0}}return e}function ba(n){if(typeof n=="number")return Bs(n);let e="";for(let t=0;t<n.length;t+=1)e+=Bs(n[t]);return e}function Bs(n){let e="";n<0?n=-n<<1|1:n<<=1;do{let t=n&31;n>>>=5,n>0&&(t|=32),e+=Rs[t]}while(n>0);return e}class So{constructor({version:e,sources:t,names:r,mappings:s}){if(this.version=e,this.sources=t,this.names=r,this.mappings=s,this.version!==3)throw new Error(`Only version 3 is supported, got ${this.version}`);if(this.mappings===void 0)throw new Error("mapping undefined, cannot build source map without `mapping`");const o=this.mappings.split(";").map(w=>{const E=Bo(w);if(E.length>2)return E[2]});this.pcToLine={},this.lineToPc={};let d=0;for(const[w,E]of o.entries())E!==void 0&&(d+=E),d in this.lineToPc||(this.lineToPc[d]=[]),this.lineToPc[d].push(w),this.pcToLine[w]=d}getLineForPc(e){return this.pcToLine[e]}getPcsForLine(e){return this.lineToPc[e]}}const ko=1380011588,Zn=30;function Ss(n){return n.params["approval-program"]=l.Buffer.from(n.params["approval-program"].toString(),"base64"),n.params["clear-state-program"]=l.Buffer.from(n.params["clear-state-program"].toString(),"base64"),n}async function Io({client:n,txns:e,protocolVersion:t,latestTimestamp:r,round:s,sources:o}){const d=[],w=[],E=[],C=[],_=[];for(const X of e)X.txn.type===f.appl&&(_.push(te(X.txn.from.publicKey)),X.txn.appAccounts&&_.push(...X.txn.appAccounts.map(se=>te(se.publicKey))),X.txn.appForeignApps&&(E.push(...X.txn.appForeignApps),_.push(...X.txn.appForeignApps.map(se=>it(se)))),X.txn.appForeignAssets&&C.push(...X.txn.appForeignAssets),X.txn.appIndex===void 0||X.txn.appIndex===0?d.push(new Bt({id:ko,params:new St({creator:te(X.txn.from.publicKey),approvalProgram:X.txn.appApprovalProgram,clearStateProgram:X.txn.appClearProgram,localStateSchema:new ot({numUint:X.txn.appLocalInts,numByteSlice:X.txn.appLocalByteSlices}),globalStateSchema:new ot({numUint:X.txn.appGlobalInts,numByteSlice:X.txn.appGlobalByteSlices})})})):(E.push(X.txn.appIndex),_.push(it(X.txn.appIndex))));const K=[];for(const X of[...new Set(C)])K.push(n.getAssetByID(X).do().then(se=>{_.push(se.params.creator)}));await Promise.all(K);const ne=[];for(const X of[...new Set(E)])ne.push(n.getApplicationByID(X).do().then(se=>{const qe=Ss(se);d.push(qe),_.push(qe.params.creator)}));await Promise.all(ne);const oe=[];for(const X of[...new Set(_)])oe.push(n.accountInformation(X).do().then(se=>{"created-apps"in se&&(se["created-apps"]=se["created-apps"].map(qe=>Ss(qe))),w.push(se)}));return await Promise.all(oe),new fr({txns:e.map(X=>({...X,txn:X.txn.get_obj_for_encoding()})),accounts:w,apps:d,latestTimestamp:r,round:s,protocolVersion:t,sources:o})}class Do{constructor(e){this.type=0,this.bytes="",this.uint=0,this.type=e.type,this.bytes=e.bytes,this.uint=e.uint}toString(){return this.type===1?`0x${l.Buffer.from(this.bytes,"base64").toString("hex")}`:this.uint.toString()}}class Uo{constructor(e){this.error="",this.line=0,this.pc=0,this.scratch=[],this.stack=[],this.error=e.error===void 0?"":e.error,this.line=e.line,this.pc=e.pc,this.scratch=e.scratch,this.stack=e.stack.map(t=>new Do(t))}}class ks{constructor(e){this.trace=[],e!=null&&(this.trace=e.map(t=>new Uo(t)))}}function Qn(n,e){return n.length>e&&e>0?`${n.slice(0,e)}...`:n}function Co(n,e){if(e.length===0)return"";let t=null;for(let s=0;s<e.length;s++){if(s>n.length){t=s;continue}JSON.stringify(n[s])!==JSON.stringify(e[s])&&(t=s)}if(t==null)return"";const r=e[t];return r.bytes.length>0?`${t} = 0x${l.Buffer.from(r.bytes,"base64").toString("hex")}`:`${t} = ${r.uint.toString()}`}function jo(n,e){return`[${(e?n.reverse():n).map(r=>{switch(r.type){case 1:return`0x${l.Buffer.from(r.bytes,"base64").toString("hex")}`;case 2:return`${r.uint.toString()}`;default:return""}}).join(", ")}]`}class Jr{constructor(e){this.disassembly=[],this.appCallMessages=[],this.localDeltas=[],this.globalDelta=[],this.cost=0,this.logicSigMessages=[],this.logicSigDisassembly=[],this.logs=[],this.appCallTrace=void 0,this.logicSigTrace=void 0,this.required=["disassembly"],this.optionals=["app-call-messages","local-deltas","global-delta","cost","logic-sig-messages","logic-sig-disassembly","logs"],this.traces=["app-call-trace","logic-sig-trace"],this.disassembly=e.disassembly,this.appCallMessages=e["app-call-messages"],this.localDeltas=e["local-deltas"],this.globalDelta=e["global-delta"],this.cost=e.cost,this.logicSigMessages=e["logic-sig-messages"],this.logicSigDisassembly=e["logic-sig-disassembly"],this.logs=e.logs,this.appCallTrace=new ks(e["app-call-trace"]),this.logicSigTrace=new ks(e["logic-sig-trace"])}appCallRejected(){return this.appCallMessages!==void 0&&this.appCallMessages.includes("REJECT")}logicSigRejected(){return this.logicSigMessages!==void 0&&this.logicSigMessages.includes("REJECT")}static trace(e,t,r){const s=r.maxValueWidth||Zn,o=[["pc#","ln#","source","scratch","stack"]];for(let w=0;w<e.trace.length;w++){const{line:E,error:C,pc:_,scratch:K,stack:ne}=e.trace[w],oe=K!==void 0?K:[],X=w>0&&e.trace[w-1].scratch!==void 0?e.trace[w-1].scratch:[],se=C===""?t[E]:`!! ${C} !!`;o.push([_.toString().padEnd(3," "),E.toString().padEnd(3," "),Qn(se,s),Qn(Co(X,oe),s),Qn(jo(ne,r.topOfStackFirst),s)])}const d=o.reduce((w,E)=>{const C=new Array(o[0].length).fill(0);for(let _=0;_<w.length;_++)C[_]=E[_].length>w[_]?E[_].length:w[_];return C},new Array(o[0].length).fill(0));return`${o.map(w=>w.map((E,C)=>E.padEnd(d[C]+1," ")).join("|").trim()).join(`
1
+ (self.webpackChunkedge_currency_accountbased=self.webpackChunkedge_currency_accountbased||[]).push([[814],{66424:function(ke,Je,le){var ye=le(34155);(function(we,Z){ke.exports=Z()})(this,function(){return function(we){var Z={};function l(K){if(Z[K])return Z[K].exports;var L=Z[K]={i:K,l:!1,exports:{}};return we[K].call(L.exports,L,L.exports,l),L.l=!0,L.exports}return l.m=we,l.c=Z,l.d=function(K,L,I){l.o(K,L)||Object.defineProperty(K,L,{enumerable:!0,get:I})},l.r=function(K){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(K,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(K,"__esModule",{value:!0})},l.t=function(K,L){if(1&L&&(K=l(K)),8&L||4&L&&typeof K=="object"&&K&&K.__esModule)return K;var I=Object.create(null);if(l.r(I),Object.defineProperty(I,"default",{enumerable:!0,value:K}),2&L&&typeof K!="string")for(var D in K)l.d(I,D,function(X){return K[X]}.bind(null,D));return I},l.n=function(K){var L=K&&K.__esModule?function(){return K.default}:function(){return K};return l.d(L,"a",L),L},l.o=function(K,L){return Object.prototype.hasOwnProperty.call(K,L)},l.p="",l(l.s=0)}([function(we,Z,l){"use strict";l.r(Z),l.d(Z,"encode",function(){return x}),l.d(Z,"decode",function(){return Ce}),l.d(Z,"decodeAsync",function(){return lt}),l.d(Z,"decodeArrayStream",function(){return it}),l.d(Z,"decodeStream",function(){return ht}),l.d(Z,"Decoder",function(){return Te}),l.d(Z,"Encoder",function(){return $}),l.d(Z,"ExtensionCodec",function(){return g}),l.d(Z,"ExtData",function(){return fe}),l.d(Z,"EXT_TIMESTAMP",function(){return _e}),l.d(Z,"encodeDateToTimeSpec",function(){return F}),l.d(Z,"encodeTimeSpecToTimestamp",function(){return A}),l.d(Z,"decodeTimestampToTimeSpec",function(){return j}),l.d(Z,"encodeTimestampExtension",function(){return T}),l.d(Z,"decodeTimestampExtension",function(){return O});var K=function(p,i){var a=typeof Symbol=="function"&&p[Symbol.iterator];if(!a)return p;var u,c,y=a.call(p),f=[];try{for(;(i===void 0||i-- >0)&&!(u=y.next()).done;)f.push(u.value)}catch(k){c={error:k}}finally{try{u&&!u.done&&(a=y.return)&&a.call(y)}finally{if(c)throw c.error}}return f},L=function(){for(var p=[],i=0;i<arguments.length;i++)p=p.concat(K(arguments[i]));return p},I=typeof ye<"u"&&typeof TextEncoder<"u"&&typeof TextDecoder<"u";function D(p){for(var i=p.length,a=0,u=0;u<i;){var c=p.charCodeAt(u++);if((4294967168&c)!=0)if((4294965248&c)==0)a+=2;else{if(c>=55296&&c<=56319&&u<i){var y=p.charCodeAt(u);(64512&y)==56320&&(++u,c=((1023&c)<<10)+(1023&y)+65536)}a+=(4294901760&c)==0?3:4}else a++}return a}var X=I?new TextEncoder:void 0,Fe=typeof ye<"u"?200:0,be=X!=null&&X.encodeInto?function(p,i,a){X.encodeInto(p,i.subarray(a))}:function(p,i,a){i.set(X.encode(p),a)};function m(p,i,a){for(var u=i,c=u+a,y=[],f="";u<c;){var k=p[u++];if((128&k)==0)y.push(k);else if((224&k)==192){var q=63&p[u++];y.push((31&k)<<6|q)}else if((240&k)==224){q=63&p[u++];var V=63&p[u++];y.push((31&k)<<12|q<<6|V)}else if((248&k)==240){var b=(7&k)<<18|(q=63&p[u++])<<12|(V=63&p[u++])<<6|63&p[u++];b>65535&&(b-=65536,y.push(b>>>10&1023|55296),b=56320|1023&b),y.push(b)}else y.push(k);y.length>=4096&&(f+=String.fromCharCode.apply(String,L(y)),y.length=0)}return y.length>0&&(f+=String.fromCharCode.apply(String,L(y))),f}var ce=I?new TextDecoder:null,ie=typeof ye<"u"?200:0,fe=function(p,i){this.type=p,this.data=i};function Ee(p,i,a){var u=Math.floor(a/4294967296),c=a;p.setUint32(i,u),p.setUint32(i+4,c)}function Y(p,i){var a=p.getInt32(i),u=p.getUint32(i+4),c=a<Math.floor(Number.MIN_SAFE_INTEGER/4294967296)||a===Math.floor(Number.MIN_SAFE_INTEGER/4294967296)&&u===0,y=a>Math.floor(Number.MAX_SAFE_INTEGER/4294967296);return c||y?BigInt(a)*BigInt(4294967296)+BigInt(u):4294967296*a+u}var _e=-1;function A(p){var i=p.sec,a=p.nsec;if(i>=0&&a>=0&&i<=17179869183){if(a===0&&i<=4294967295){var u=new Uint8Array(4);return(f=new DataView(u.buffer)).setUint32(0,i),u}var c=i/4294967296,y=4294967295&i;return u=new Uint8Array(8),(f=new DataView(u.buffer)).setUint32(0,a<<2|3&c),f.setUint32(4,y),u}var f;return u=new Uint8Array(12),(f=new DataView(u.buffer)).setUint32(0,a),Ee(f,4,i),u}function F(p){var i=p.getTime(),a=Math.floor(i/1e3),u=1e6*(i-1e3*a),c=Math.floor(u/1e9);return{sec:a+c,nsec:u-1e9*c}}function T(p){return p instanceof Date?A(F(p)):null}function j(p){var i=new DataView(p.buffer,p.byteOffset,p.byteLength);switch(p.byteLength){case 4:return{sec:i.getUint32(0),nsec:0};case 8:var a=i.getUint32(0);return{sec:4294967296*(3&a)+i.getUint32(4),nsec:a>>>2};case 12:return{sec:Y(i,4),nsec:i.getUint32(0)};default:throw new Error("Unrecognized data size for timestamp: "+p.length)}}function O(p){var i=j(p);return new Date(1e3*i.sec+i.nsec/1e6)}var z={type:_e,encode:T,decode:O},g=function(){function p(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(z)}return p.prototype.register=function(i){var a=i.type,u=i.encode,c=i.decode;if(a>=0)this.encoders[a]=u,this.decoders[a]=c;else{var y=1+a;this.builtInEncoders[y]=u,this.builtInDecoders[y]=c}},p.prototype.tryToEncode=function(i,a){for(var u=0;u<this.builtInEncoders.length;u++)if((c=this.builtInEncoders[u])!=null&&(y=c(i,a))!=null)return new fe(-1-u,y);for(u=0;u<this.encoders.length;u++){var c,y;if((c=this.encoders[u])!=null&&(y=c(i,a))!=null)return new fe(u,y)}return i instanceof fe?i:null},p.prototype.decode=function(i,a,u){var c=a<0?this.builtInDecoders[-1-a]:this.decoders[a];return c?c(i,a,u):new fe(a,i)},p.defaultCodec=new p,p}();function U(p){return p instanceof Uint8Array?p:ArrayBuffer.isView(p)?new Uint8Array(p.buffer,p.byteOffset,p.byteLength):p instanceof ArrayBuffer?new Uint8Array(p):Uint8Array.from(p)}var S=function(p){var i=typeof Symbol=="function"&&Symbol.iterator,a=i&&p[i],u=0;if(a)return a.call(p);if(p&&typeof p.length=="number")return{next:function(){return p&&u>=p.length&&(p=void 0),{value:p&&p[u++],done:!p}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},$=function(){function p(i,a,u,c,y,f,k,q){i===void 0&&(i=g.defaultCodec),a===void 0&&(a=void 0),u===void 0&&(u=100),c===void 0&&(c=2048),y===void 0&&(y=!1),f===void 0&&(f=!1),k===void 0&&(k=!1),q===void 0&&(q=!1),this.extensionCodec=i,this.context=a,this.maxDepth=u,this.initialBufferSize=c,this.sortKeys=y,this.forceFloat32=f,this.ignoreUndefined=k,this.forceIntegerToFloat=q,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}return p.prototype.getUint8Array=function(){return this.bytes.subarray(0,this.pos)},p.prototype.reinitializeState=function(){this.pos=0},p.prototype.encode=function(i){return this.reinitializeState(),this.doEncode(i,1),this.getUint8Array()},p.prototype.doEncode=function(i,a){if(a>this.maxDepth)throw new Error("Too deep objects in depth "+a);i==null?this.encodeNil():typeof i=="boolean"?this.encodeBoolean(i):typeof i=="number"?this.encodeNumber(i):typeof i=="string"?this.encodeString(i):typeof i=="bigint"?this.encodebigint(i):this.encodeObject(i,a)},p.prototype.ensureBufferSizeToWrite=function(i){var a=this.pos+i;this.view.byteLength<a&&this.resizeBuffer(2*a)},p.prototype.resizeBuffer=function(i){var a=new ArrayBuffer(i),u=new Uint8Array(a),c=new DataView(a);u.set(this.bytes),this.view=c,this.bytes=u},p.prototype.encodeNil=function(){this.writeU8(192)},p.prototype.encodeBoolean=function(i){i===!1?this.writeU8(194):this.writeU8(195)},p.prototype.encodeNumber=function(i){Number.isSafeInteger(i)&&!this.forceIntegerToFloat?i>=0?i<128?this.writeU8(i):i<256?(this.writeU8(204),this.writeU8(i)):i<65536?(this.writeU8(205),this.writeU16(i)):i<4294967296?(this.writeU8(206),this.writeU32(i)):(this.writeU8(207),this.writeU64(i)):i>=-32?this.writeU8(224|i+32):i>=-128?(this.writeU8(208),this.writeI8(i)):i>=-32768?(this.writeU8(209),this.writeI16(i)):i>=-2147483648?(this.writeU8(210),this.writeI32(i)):(this.writeU8(211),this.writeI64(i)):this.forceFloat32?(this.writeU8(202),this.writeF32(i)):(this.writeU8(203),this.writeF64(i))},p.prototype.encodebigint=function(i){i>=BigInt(0)?i<BigInt(128)?this.writeU8(Number(i)):i<BigInt(256)?(this.writeU8(204),this.writeU8(Number(i))):i<BigInt(65536)?(this.writeU8(205),this.writeU16(Number(i))):i<BigInt(4294967296)?(this.writeU8(206),this.writeU32(Number(i))):(this.writeU8(207),this.writeBig64(i)):i>=BigInt(-32)?this.writeU8(224|Number(i)+32):i>=BigInt(-128)?(this.writeU8(208),this.writeI8(Number(i))):i>=BigInt(-32768)?(this.writeU8(209),this.writeI16(Number(i))):i>=BigInt(-2147483648)?(this.writeU8(210),this.writeI32(Number(i))):(this.writeU8(211),this.writeBig64(i))},p.prototype.writeStringHeader=function(i){if(i<32)this.writeU8(160+i);else if(i<256)this.writeU8(217),this.writeU8(i);else if(i<65536)this.writeU8(218),this.writeU16(i);else{if(!(i<4294967296))throw new Error("Too long string: "+i+" bytes in UTF-8");this.writeU8(219),this.writeU32(i)}},p.prototype.encodeString=function(i){var a=i.length;if(I&&a>Fe){var u=D(i);this.ensureBufferSizeToWrite(5+u),this.writeStringHeader(u),be(i,this.bytes,this.pos),this.pos+=u}else u=D(i),this.ensureBufferSizeToWrite(5+u),this.writeStringHeader(u),function(c,y,f){for(var k=c.length,q=f,V=0;V<k;){var b=c.charCodeAt(V++);if((4294967168&b)!=0){if((4294965248&b)==0)y[q++]=b>>6&31|192;else{if(b>=55296&&b<=56319&&V<k){var H=c.charCodeAt(V);(64512&H)==56320&&(++V,b=((1023&b)<<10)+(1023&H)+65536)}(4294901760&b)==0?(y[q++]=b>>12&15|224,y[q++]=b>>6&63|128):(y[q++]=b>>18&7|240,y[q++]=b>>12&63|128,y[q++]=b>>6&63|128)}y[q++]=63&b|128}else y[q++]=b}}(i,this.bytes,this.pos),this.pos+=u},p.prototype.encodeObject=function(i,a){var u=this.extensionCodec.tryToEncode(i,this.context);if(u!=null)this.encodeExtension(u);else if(Array.isArray(i))this.encodeArray(i,a);else if(ArrayBuffer.isView(i))this.encodeBinary(i);else{if(typeof i!="object")throw new Error("Unrecognized object: "+Object.prototype.toString.apply(i));this.encodeMap(i,a)}},p.prototype.encodeBinary=function(i){var a=i.byteLength;if(a<256)this.writeU8(196),this.writeU8(a);else if(a<65536)this.writeU8(197),this.writeU16(a);else{if(!(a<4294967296))throw new Error("Too large binary: "+a);this.writeU8(198),this.writeU32(a)}var u=U(i);this.writeU8a(u)},p.prototype.encodeArray=function(i,a){var u,c,y=i.length;if(y<16)this.writeU8(144+y);else if(y<65536)this.writeU8(220),this.writeU16(y);else{if(!(y<4294967296))throw new Error("Too large array: "+y);this.writeU8(221),this.writeU32(y)}try{for(var f=S(i),k=f.next();!k.done;k=f.next()){var q=k.value;this.doEncode(q,a+1)}}catch(V){u={error:V}}finally{try{k&&!k.done&&(c=f.return)&&c.call(f)}finally{if(u)throw u.error}}},p.prototype.countWithoutUndefined=function(i,a){var u,c,y=0;try{for(var f=S(a),k=f.next();!k.done;k=f.next())i[k.value]!==void 0&&y++}catch(q){u={error:q}}finally{try{k&&!k.done&&(c=f.return)&&c.call(f)}finally{if(u)throw u.error}}return y},p.prototype.encodeMap=function(i,a){var u,c,y=Object.keys(i);this.sortKeys&&y.sort();var f=this.ignoreUndefined?this.countWithoutUndefined(i,y):y.length;if(f<16)this.writeU8(128+f);else if(f<65536)this.writeU8(222),this.writeU16(f);else{if(!(f<4294967296))throw new Error("Too large map object: "+f);this.writeU8(223),this.writeU32(f)}try{for(var k=S(y),q=k.next();!q.done;q=k.next()){var V=q.value,b=i[V];this.ignoreUndefined&&b===void 0||(this.encodeString(V),this.doEncode(b,a+1))}}catch(H){u={error:H}}finally{try{q&&!q.done&&(c=k.return)&&c.call(k)}finally{if(u)throw u.error}}},p.prototype.encodeExtension=function(i){var a=i.data.length;if(a===1)this.writeU8(212);else if(a===2)this.writeU8(213);else if(a===4)this.writeU8(214);else if(a===8)this.writeU8(215);else if(a===16)this.writeU8(216);else if(a<256)this.writeU8(199),this.writeU8(a);else if(a<65536)this.writeU8(200),this.writeU16(a);else{if(!(a<4294967296))throw new Error("Too large extension object: "+a);this.writeU8(201),this.writeU32(a)}this.writeI8(i.type),this.writeU8a(i.data)},p.prototype.writeU8=function(i){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,i),this.pos++},p.prototype.writeU8a=function(i){var a=i.length;this.ensureBufferSizeToWrite(a),this.bytes.set(i,this.pos),this.pos+=a},p.prototype.writeI8=function(i){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,i),this.pos++},p.prototype.writeU16=function(i){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,i),this.pos+=2},p.prototype.writeI16=function(i){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,i),this.pos+=2},p.prototype.writeU32=function(i){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,i),this.pos+=4},p.prototype.writeI32=function(i){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,i),this.pos+=4},p.prototype.writeF32=function(i){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,i),this.pos+=4},p.prototype.writeF64=function(i){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,i),this.pos+=8},p.prototype.writeU64=function(i){this.ensureBufferSizeToWrite(8),function(a,u,c){var y=c/4294967296,f=c;a.setUint32(u,y),a.setUint32(u+4,f)}(this.view,this.pos,i),this.pos+=8},p.prototype.writeI64=function(i){this.ensureBufferSizeToWrite(8),Ee(this.view,this.pos,i),this.pos+=8},p.prototype.writeBig64=function(i){this.ensureBufferSizeToWrite(8),function(a,u,c){var y=Number(c/BigInt(4294967296)),f=Number(c%BigInt(4294967296));y<0&&f!==0&&(y-=1),a.setUint32(u,y),a.setUint32(u+4,f)}(this.view,this.pos,i),this.pos+=8},p}(),h={};function x(p,i){return i===void 0&&(i=h),new $(i.extensionCodec,i.context,i.maxDepth,i.initialBufferSize,i.sortKeys,i.forceFloat32,i.ignoreUndefined,i.forceIntegerToFloat).encode(p)}function v(p){return(p<0?"-":"")+"0x"+Math.abs(p).toString(16).padStart(2,"0")}var R=function(){function p(i,a){i===void 0&&(i=16),a===void 0&&(a=16),this.maxKeyLength=i,this.maxLengthPerKey=a,this.hit=0,this.miss=0,this.caches=[];for(var u=0;u<this.maxKeyLength;u++)this.caches.push([])}return p.prototype.canBeCached=function(i){return i>0&&i<=this.maxKeyLength},p.prototype.get=function(i,a,u){var c=this.caches[u-1],y=c.length;e:for(var f=0;f<y;f++){for(var k=c[f],q=k.bytes,V=0;V<u;V++)if(q[V]!==i[a+V])continue e;return k.value}return null},p.prototype.store=function(i,a){var u=this.caches[i.length-1],c={bytes:i,value:a};u.length>=this.maxLengthPerKey?u[Math.random()*u.length|0]=c:u.push(c)},p.prototype.decode=function(i,a,u){var c=this.get(i,a,u);if(c!=null)return this.hit++,c;this.miss++;var y=m(i,a,u),f=Uint8Array.prototype.slice.call(i,a,a+u);return this.store(f,y),y},p}(),W=function(p,i,a,u){return new(a||(a=Promise))(function(c,y){function f(V){try{q(u.next(V))}catch(b){y(b)}}function k(V){try{q(u.throw(V))}catch(b){y(b)}}function q(V){var b;V.done?c(V.value):(b=V.value,b instanceof a?b:new a(function(H){H(b)})).then(f,k)}q((u=u.apply(p,i||[])).next())})},Q=function(p,i){var a,u,c,y,f={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return y={next:k(0),throw:k(1),return:k(2)},typeof Symbol=="function"&&(y[Symbol.iterator]=function(){return this}),y;function k(q){return function(V){return function(b){if(a)throw new TypeError("Generator is already executing.");for(;f;)try{if(a=1,u&&(c=2&b[0]?u.return:b[0]?u.throw||((c=u.return)&&c.call(u),0):u.next)&&!(c=c.call(u,b[1])).done)return c;switch(u=0,c&&(b=[2&b[0],c.value]),b[0]){case 0:case 1:c=b;break;case 4:return f.label++,{value:b[1],done:!1};case 5:f.label++,u=b[1],b=[0];continue;case 7:b=f.ops.pop(),f.trys.pop();continue;default:if(c=f.trys,!((c=c.length>0&&c[c.length-1])||b[0]!==6&&b[0]!==2)){f=0;continue}if(b[0]===3&&(!c||b[1]>c[0]&&b[1]<c[3])){f.label=b[1];break}if(b[0]===6&&f.label<c[1]){f.label=c[1],c=b;break}if(c&&f.label<c[2]){f.label=c[2],f.ops.push(b);break}c[2]&&f.ops.pop(),f.trys.pop();continue}b=i.call(p,f)}catch(H){b=[6,H],u=0}finally{a=c=0}if(5&b[0])throw b[1];return{value:b[0]?b[1]:void 0,done:!0}}([q,V])}}},xe=function(p){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,a=p[Symbol.asyncIterator];return a?a.call(p):(p=typeof __values=="function"?__values(p):p[Symbol.iterator](),i={},u("next"),u("throw"),u("return"),i[Symbol.asyncIterator]=function(){return this},i);function u(c){i[c]=p[c]&&function(y){return new Promise(function(f,k){(function(q,V,b,H){Promise.resolve(H).then(function(re){q({value:re,done:b})},V)})(f,k,(y=p[c](y)).done,y.value)})}}},pe=function(p){return this instanceof pe?(this.v=p,this):new pe(p)},Ae=function(p,i,a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var u,c=a.apply(p,i||[]),y=[];return u={},f("next"),f("throw"),f("return"),u[Symbol.asyncIterator]=function(){return this},u;function f(H){c[H]&&(u[H]=function(re){return new Promise(function(me,de){y.push([H,re,me,de])>1||k(H,re)})})}function k(H,re){try{(me=c[H](re)).value instanceof pe?Promise.resolve(me.value.v).then(q,V):b(y[0][2],me)}catch(de){b(y[0][3],de)}var me}function q(H){k("next",H)}function V(H){k("throw",H)}function b(H,re){H(re),y.shift(),y.length&&k(y[0][0],y[0][1])}},ve=new DataView(new ArrayBuffer(0)),Ie=new Uint8Array(ve.buffer),Be=function(){try{ve.getInt8(0)}catch(p){return p.constructor}throw new Error("never reached")}(),ge=new Be("Insufficient data"),ae=new R,Te=function(){function p(i,a,u,c,y,f,k,q){i===void 0&&(i=g.defaultCodec),a===void 0&&(a=void 0),u===void 0&&(u=4294967295),c===void 0&&(c=4294967295),y===void 0&&(y=4294967295),f===void 0&&(f=4294967295),k===void 0&&(k=4294967295),q===void 0&&(q=ae),this.extensionCodec=i,this.context=a,this.maxStrLength=u,this.maxBinLength=c,this.maxArrayLength=y,this.maxMapLength=f,this.maxExtLength=k,this.keyDecoder=q,this.totalPos=0,this.pos=0,this.view=ve,this.bytes=Ie,this.headByte=-1,this.stack=[]}return p.prototype.reinitializeState=function(){this.totalPos=0,this.headByte=-1},p.prototype.setBuffer=function(i){this.bytes=U(i),this.view=function(a){if(a instanceof ArrayBuffer)return new DataView(a);var u=U(a);return new DataView(u.buffer,u.byteOffset,u.byteLength)}(this.bytes),this.pos=0},p.prototype.appendBuffer=function(i){if(this.headByte!==-1||this.hasRemaining()){var a=this.bytes.subarray(this.pos),u=U(i),c=new Uint8Array(a.length+u.length);c.set(a),c.set(u,a.length),this.setBuffer(c)}else this.setBuffer(i)},p.prototype.hasRemaining=function(i){return i===void 0&&(i=1),this.view.byteLength-this.pos>=i},p.prototype.createNoExtraBytesError=function(i){var a=this.view,u=this.pos;return new RangeError("Extra "+(a.byteLength-u)+" of "+a.byteLength+" byte(s) found at buffer["+i+"]")},p.prototype.decode=function(i){return this.reinitializeState(),this.setBuffer(i),this.doDecodeSingleSync()},p.prototype.doDecodeSingleSync=function(){var i=this.doDecodeSync();if(this.hasRemaining())throw this.createNoExtraBytesError(this.pos);return i},p.prototype.decodeAsync=function(i){var a,u,c,y;return W(this,void 0,void 0,function(){var f,k,q,V,b,H,re,me;return Q(this,function(de){switch(de.label){case 0:f=!1,de.label=1;case 1:de.trys.push([1,6,7,12]),a=xe(i),de.label=2;case 2:return[4,a.next()];case 3:if((u=de.sent()).done)return[3,5];if(q=u.value,f)throw this.createNoExtraBytesError(this.totalPos);this.appendBuffer(q);try{k=this.doDecodeSync(),f=!0}catch(Ue){if(!(Ue instanceof Be))throw Ue}this.totalPos+=this.pos,de.label=4;case 4:return[3,2];case 5:return[3,12];case 6:return V=de.sent(),c={error:V},[3,12];case 7:return de.trys.push([7,,10,11]),u&&!u.done&&(y=a.return)?[4,y.call(a)]:[3,9];case 8:de.sent(),de.label=9;case 9:return[3,11];case 10:if(c)throw c.error;return[7];case 11:return[7];case 12:if(f){if(this.hasRemaining())throw this.createNoExtraBytesError(this.totalPos);return[2,k]}throw H=(b=this).headByte,re=b.pos,me=b.totalPos,new RangeError("Insufficient data in parcing "+v(H)+" at "+me+" ("+re+" in the current buffer)")}})})},p.prototype.decodeArrayStream=function(i){return this.decodeMultiAsync(i,!0)},p.prototype.decodeStream=function(i){return this.decodeMultiAsync(i,!1)},p.prototype.decodeMultiAsync=function(i,a){return Ae(this,arguments,function(){var u,c,y,f,k,q,V,b,H;return Q(this,function(re){switch(re.label){case 0:u=a,c=-1,re.label=1;case 1:re.trys.push([1,13,14,19]),y=xe(i),re.label=2;case 2:return[4,pe(y.next())];case 3:if((f=re.sent()).done)return[3,12];if(k=f.value,a&&c===0)throw this.createNoExtraBytesError(this.totalPos);this.appendBuffer(k),u&&(c=this.readArraySize(),u=!1,this.complete()),re.label=4;case 4:re.trys.push([4,9,,10]),re.label=5;case 5:return[4,pe(this.doDecodeSync())];case 6:return[4,re.sent()];case 7:return re.sent(),--c==0?[3,8]:[3,5];case 8:return[3,10];case 9:if(!((q=re.sent())instanceof Be))throw q;return[3,10];case 10:this.totalPos+=this.pos,re.label=11;case 11:return[3,2];case 12:return[3,19];case 13:return V=re.sent(),b={error:V},[3,19];case 14:return re.trys.push([14,,17,18]),f&&!f.done&&(H=y.return)?[4,pe(H.call(y))]:[3,16];case 15:re.sent(),re.label=16;case 16:return[3,18];case 17:if(b)throw b.error;return[7];case 18:return[7];case 19:return[2]}})})},p.prototype.doDecodeSync=function(){e:for(;;){var i=this.readHeadByte(),a=void 0;if(i>=224)a=i-256;else if(i<192)if(i<128)a=i;else if(i<144){if((c=i-128)!==0){this.pushMapState(c),this.complete();continue e}a={}}else if(i<160){if((c=i-144)!==0){this.pushArrayState(c),this.complete();continue e}a=[]}else{var u=i-160;a=this.decodeUtf8String(u,0)}else if(i===192)a=null;else if(i===194)a=!1;else if(i===195)a=!0;else if(i===202)a=this.readF32();else if(i===203)a=this.readF64();else if(i===204)a=this.readU8();else if(i===205)a=this.readU16();else if(i===206)a=this.readU32();else if(i===207)a=this.readU64();else if(i===208)a=this.readI8();else if(i===209)a=this.readI16();else if(i===210)a=this.readI32();else if(i===211)a=this.readI64();else if(i===217)u=this.lookU8(),a=this.decodeUtf8String(u,1);else if(i===218)u=this.lookU16(),a=this.decodeUtf8String(u,2);else if(i===219)u=this.lookU32(),a=this.decodeUtf8String(u,4);else if(i===220){if((c=this.readU16())!==0){this.pushArrayState(c),this.complete();continue e}a=[]}else if(i===221){if((c=this.readU32())!==0){this.pushArrayState(c),this.complete();continue e}a=[]}else if(i===222){if((c=this.readU16())!==0){this.pushMapState(c),this.complete();continue e}a={}}else if(i===223){if((c=this.readU32())!==0){this.pushMapState(c),this.complete();continue e}a={}}else if(i===196){var c=this.lookU8();a=this.decodeBinary(c,1)}else if(i===197)c=this.lookU16(),a=this.decodeBinary(c,2);else if(i===198)c=this.lookU32(),a=this.decodeBinary(c,4);else if(i===212)a=this.decodeExtension(1,0);else if(i===213)a=this.decodeExtension(2,0);else if(i===214)a=this.decodeExtension(4,0);else if(i===215)a=this.decodeExtension(8,0);else if(i===216)a=this.decodeExtension(16,0);else if(i===199)c=this.lookU8(),a=this.decodeExtension(c,1);else if(i===200)c=this.lookU16(),a=this.decodeExtension(c,2);else{if(i!==201)throw new Error("Unrecognized type byte: "+v(i));c=this.lookU32(),a=this.decodeExtension(c,4)}this.complete();for(var y=this.stack;y.length>0;){var f=y[y.length-1];if(f.type===0){if(f.array[f.position]=a,f.position++,f.position!==f.size)continue e;y.pop(),a=f.array}else{if(f.type===1){if(k=void 0,(k=typeof a)!="string"&&k!=="number")throw new Error("The type of key must be string or number but "+typeof a);f.key=a,f.type=2;continue e}if(f.map[f.key]=a,f.readCount++,f.readCount!==f.size){f.key=null,f.type=1;continue e}y.pop(),a=f.map}}return a}var k},p.prototype.readHeadByte=function(){return this.headByte===-1&&(this.headByte=this.readU8()),this.headByte},p.prototype.complete=function(){this.headByte=-1},p.prototype.readArraySize=function(){var i=this.readHeadByte();switch(i){case 220:return this.readU16();case 221:return this.readU32();default:if(i<160)return i-144;throw new Error("Unrecognized array type byte: "+v(i))}},p.prototype.pushMapState=function(i){if(i>this.maxMapLength)throw new Error("Max length exceeded: map length ("+i+") > maxMapLengthLength ("+this.maxMapLength+")");this.stack.push({type:1,size:i,key:null,readCount:0,map:{}})},p.prototype.pushArrayState=function(i){if(i>this.maxArrayLength)throw new Error("Max length exceeded: array length ("+i+") > maxArrayLength ("+this.maxArrayLength+")");this.stack.push({type:0,size:i,array:new Array(i),position:0})},p.prototype.decodeUtf8String=function(i,a){var u;if(i>this.maxStrLength)throw new Error("Max length exceeded: UTF-8 byte length ("+i+") > maxStrLength ("+this.maxStrLength+")");if(this.bytes.byteLength<this.pos+a+i)throw ge;var c,y=this.pos+a;return c=this.stateIsMapKey()&&((u=this.keyDecoder)===null||u===void 0?void 0:u.canBeCached(i))?this.keyDecoder.decode(this.bytes,y,i):I&&i>ie?function(f,k,q){var V=f.subarray(k,k+q);return ce.decode(V)}(this.bytes,y,i):m(this.bytes,y,i),this.pos+=a+i,c},p.prototype.stateIsMapKey=function(){return this.stack.length>0&&this.stack[this.stack.length-1].type===1},p.prototype.decodeBinary=function(i,a){if(i>this.maxBinLength)throw new Error("Max length exceeded: bin length ("+i+") > maxBinLength ("+this.maxBinLength+")");if(!this.hasRemaining(i+a))throw ge;var u=this.pos+a,c=this.bytes.subarray(u,u+i);return this.pos+=a+i,c},p.prototype.decodeExtension=function(i,a){if(i>this.maxExtLength)throw new Error("Max length exceeded: ext length ("+i+") > maxExtLength ("+this.maxExtLength+")");var u=this.view.getInt8(this.pos+a),c=this.decodeBinary(i,a+1);return this.extensionCodec.decode(c,u,this.context)},p.prototype.lookU8=function(){return this.view.getUint8(this.pos)},p.prototype.lookU16=function(){return this.view.getUint16(this.pos)},p.prototype.lookU32=function(){return this.view.getUint32(this.pos)},p.prototype.readU8=function(){var i=this.view.getUint8(this.pos);return this.pos++,i},p.prototype.readI8=function(){var i=this.view.getInt8(this.pos);return this.pos++,i},p.prototype.readU16=function(){var i=this.view.getUint16(this.pos);return this.pos+=2,i},p.prototype.readI16=function(){var i=this.view.getInt16(this.pos);return this.pos+=2,i},p.prototype.readU32=function(){var i=this.view.getUint32(this.pos);return this.pos+=4,i},p.prototype.readI32=function(){var i=this.view.getInt32(this.pos);return this.pos+=4,i},p.prototype.readU64=function(){var i,a,u,c,y=(i=this.view,a=this.pos,u=i.getUint32(a),c=i.getUint32(a+4),u>Math.floor(Number.MAX_SAFE_INTEGER/4294967296)?BigInt(u)*BigInt(4294967296)+BigInt(c):4294967296*u+c);return this.pos+=8,y},p.prototype.readI64=function(){var i=Y(this.view,this.pos);return this.pos+=8,i},p.prototype.readF32=function(){var i=this.view.getFloat32(this.pos);return this.pos+=4,i},p.prototype.readF64=function(){var i=this.view.getFloat64(this.pos);return this.pos+=8,i},p}(),De={};function Ce(p,i){return i===void 0&&(i=De),new Te(i.extensionCodec,i.context,i.maxStrLength,i.maxBinLength,i.maxArrayLength,i.maxMapLength,i.maxExtLength).decode(p)}var je=function(p,i){var a,u,c,y,f={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return y={next:k(0),throw:k(1),return:k(2)},typeof Symbol=="function"&&(y[Symbol.iterator]=function(){return this}),y;function k(q){return function(V){return function(b){if(a)throw new TypeError("Generator is already executing.");for(;f;)try{if(a=1,u&&(c=2&b[0]?u.return:b[0]?u.throw||((c=u.return)&&c.call(u),0):u.next)&&!(c=c.call(u,b[1])).done)return c;switch(u=0,c&&(b=[2&b[0],c.value]),b[0]){case 0:case 1:c=b;break;case 4:return f.label++,{value:b[1],done:!1};case 5:f.label++,u=b[1],b=[0];continue;case 7:b=f.ops.pop(),f.trys.pop();continue;default:if(c=f.trys,!((c=c.length>0&&c[c.length-1])||b[0]!==6&&b[0]!==2)){f=0;continue}if(b[0]===3&&(!c||b[1]>c[0]&&b[1]<c[3])){f.label=b[1];break}if(b[0]===6&&f.label<c[1]){f.label=c[1],c=b;break}if(c&&f.label<c[2]){f.label=c[2],f.ops.push(b);break}c[2]&&f.ops.pop(),f.trys.pop();continue}b=i.call(p,f)}catch(H){b=[6,H],u=0}finally{a=c=0}if(5&b[0])throw b[1];return{value:b[0]?b[1]:void 0,done:!0}}([q,V])}}},M=function(p){return this instanceof M?(this.v=p,this):new M(p)},G=function(p,i,a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var u,c=a.apply(p,i||[]),y=[];return u={},f("next"),f("throw"),f("return"),u[Symbol.asyncIterator]=function(){return this},u;function f(H){c[H]&&(u[H]=function(re){return new Promise(function(me,de){y.push([H,re,me,de])>1||k(H,re)})})}function k(H,re){try{(me=c[H](re)).value instanceof M?Promise.resolve(me.value.v).then(q,V):b(y[0][2],me)}catch(de){b(y[0][3],de)}var me}function q(H){k("next",H)}function V(H){k("throw",H)}function b(H,re){H(re),y.shift(),y.length&&k(y[0][0],y[0][1])}};function B(p){if(p==null)throw new Error("Assertion Failure: value must not be null nor undefined")}function ee(p){return p[Symbol.asyncIterator]!=null?p:function(i){return G(this,arguments,function(){var a,u,c,y;return je(this,function(f){switch(f.label){case 0:a=i.getReader(),f.label=1;case 1:f.trys.push([1,,9,10]),f.label=2;case 2:return[4,M(a.read())];case 3:return u=f.sent(),c=u.done,y=u.value,c?[4,M(void 0)]:[3,5];case 4:return[2,f.sent()];case 5:return B(y),[4,M(y)];case 6:return[4,f.sent()];case 7:return f.sent(),[3,2];case 8:return[3,10];case 9:return a.releaseLock(),[7];case 10:return[2]}})})}(p)}var te=function(p,i,a,u){return new(a||(a=Promise))(function(c,y){function f(V){try{q(u.next(V))}catch(b){y(b)}}function k(V){try{q(u.throw(V))}catch(b){y(b)}}function q(V){var b;V.done?c(V.value):(b=V.value,b instanceof a?b:new a(function(H){H(b)})).then(f,k)}q((u=u.apply(p,i||[])).next())})},et=function(p,i){var a,u,c,y,f={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return y={next:k(0),throw:k(1),return:k(2)},typeof Symbol=="function"&&(y[Symbol.iterator]=function(){return this}),y;function k(q){return function(V){return function(b){if(a)throw new TypeError("Generator is already executing.");for(;f;)try{if(a=1,u&&(c=2&b[0]?u.return:b[0]?u.throw||((c=u.return)&&c.call(u),0):u.next)&&!(c=c.call(u,b[1])).done)return c;switch(u=0,c&&(b=[2&b[0],c.value]),b[0]){case 0:case 1:c=b;break;case 4:return f.label++,{value:b[1],done:!1};case 5:f.label++,u=b[1],b=[0];continue;case 7:b=f.ops.pop(),f.trys.pop();continue;default:if(c=f.trys,!((c=c.length>0&&c[c.length-1])||b[0]!==6&&b[0]!==2)){f=0;continue}if(b[0]===3&&(!c||b[1]>c[0]&&b[1]<c[3])){f.label=b[1];break}if(b[0]===6&&f.label<c[1]){f.label=c[1],c=b;break}if(c&&f.label<c[2]){f.label=c[2],f.ops.push(b);break}c[2]&&f.ops.pop(),f.trys.pop();continue}b=i.call(p,f)}catch(H){b=[6,H],u=0}finally{a=c=0}if(5&b[0])throw b[1];return{value:b[0]?b[1]:void 0,done:!0}}([q,V])}}};function lt(p,i){return i===void 0&&(i=De),te(this,void 0,void 0,function(){var a;return et(this,function(u){return a=ee(p),[2,new Te(i.extensionCodec,i.context,i.maxStrLength,i.maxBinLength,i.maxArrayLength,i.maxMapLength,i.maxExtLength).decodeAsync(a)]})})}function it(p,i){i===void 0&&(i=De);var a=ee(p);return new Te(i.extensionCodec,i.context,i.maxStrLength,i.maxBinLength,i.maxArrayLength,i.maxMapLength,i.maxExtLength).decodeArrayStream(a)}function ht(p,i){i===void 0&&(i=De);var a=ee(p);return new Te(i.extensionCodec,i.context,i.maxStrLength,i.maxBinLength,i.maxArrayLength,i.maxMapLength,i.maxExtLength).decodeStream(a)}}])})},88814:function(ke,Je,le){"use strict";le.d(Je,{wj:function(){return Me},ZP:function(){return ga},nJ:function(){return Oe}});var ye={};le.r(ye),le.d(ye,{Account:function(){return nr},AccountApplicationResponse:function(){return dn},AccountAssetResponse:function(){return pn},AccountParticipation:function(){return sr},AccountStateDelta:function(){return $t},Application:function(){return Bt},ApplicationLocalState:function(){return Lt},ApplicationParams:function(){return St},ApplicationStateSchema:function(){return ot},Asset:function(){return ir},AssetHolding:function(){return Ot},AssetParams:function(){return Mt},BlockHashResponse:function(){return gn},BlockResponse:function(){return mn},Box:function(){return or},BoxDescriptor:function(){return ar},BoxesResponse:function(){return ur},BuildVersion:function(){return cr},CompileResponse:function(){return yn},DisassembleResponse:function(){return wn},DryrunRequest:function(){return fr},DryrunResponse:function(){return bn},DryrunSource:function(){return lr},DryrunState:function(){return Nt},DryrunTxnResult:function(){return hr},ErrorResponse:function(){return xn},EvalDelta:function(){return dr},EvalDeltaKeyValue:function(){return kt},LightBlockHeaderProof:function(){return An},NodeStatusResponse:function(){return Fn},PendingTransactionResponse:function(){return pr},PendingTransactionsResponse:function(){return vn},PostTransactionsResponse:function(){return _n},StateProof:function(){return En},StateProofMessage:function(){return gr},SupplyResponse:function(){return Tn},TealKeyValue:function(){return Kt},TealValue:function(){return It},TransactionParametersResponse:function(){return Rn},TransactionProofResponse:function(){return Bn},Version:function(){return Sn}});var we={};le.r(we),le.d(we,{Account:function(){return zt},AccountParticipation:function(){return mr},AccountResponse:function(){return In},AccountStateDelta:function(){return yr},AccountsResponse:function(){return Dn},Application:function(){return Dt},ApplicationLocalState:function(){return Gt},ApplicationLocalStatesResponse:function(){return Un},ApplicationLogData:function(){return wr},ApplicationLogsResponse:function(){return Cn},ApplicationParams:function(){return br},ApplicationResponse:function(){return jn},ApplicationStateSchema:function(){return xt},ApplicationsResponse:function(){return Pn},Asset:function(){return Ut},AssetBalancesResponse:function(){return qn},AssetHolding:function(){return Ht},AssetHoldingsResponse:function(){return $n},AssetParams:function(){return Vt},AssetResponse:function(){return Ln},AssetsResponse:function(){return On},Block:function(){return Mn},BlockRewards:function(){return xr},BlockUpgradeState:function(){return Ar},BlockUpgradeVote:function(){return Fr},Box:function(){return vr},BoxDescriptor:function(){return _r},BoxesResponse:function(){return Er},ErrorResponse:function(){return Nn},EvalDelta:function(){return Tr},EvalDeltaKeyValue:function(){return Wt},HashFactory:function(){return Rr},HealthCheck:function(){return Kn},IndexerStateProofMessage:function(){return Br},MerkleArrayProof:function(){return Ct},MiniAssetHolding:function(){return Sr},ParticipationUpdates:function(){return kr},StateProofFields:function(){return Ir},StateProofParticipant:function(){return Dr},StateProofReveal:function(){return Ur},StateProofSigSlot:function(){return Cr},StateProofSignature:function(){return jr},StateProofTracking:function(){return Pr},StateProofVerifier:function(){return qr},StateSchema:function(){return Jt},TealKeyValue:function(){return Xt},TealValue:function(){return $r},Transaction:function(){return At},TransactionApplication:function(){return Lr},TransactionAssetConfig:function(){return Or},TransactionAssetFreeze:function(){return Mr},TransactionAssetTransfer:function(){return Nr},TransactionKeyreg:function(){return Kr},TransactionPayment:function(){return zr},TransactionResponse:function(){return zn},TransactionSignature:function(){return Gr},TransactionSignatureLogicsig:function(){return Hr},TransactionSignatureMultisig:function(){return Yt},TransactionSignatureMultisigSubsignature:function(){return Vr},TransactionStateProof:function(){return Wr},TransactionsResponse:function(){return Gn}});var Z={};le.r(Z),le.d(Z,{ABIAddressType:function(){return Qt},ABIArrayDynamicType:function(){return tn},ABIArrayStaticType:function(){return en},ABIBoolType:function(){return at},ABIByteType:function(){return Zr},ABIContract:function(){return sa},ABIInterface:function(){return ia},ABIMethod:function(){return Pt},ABIReferenceType:function(){return ct},ABIStringType:function(){return Qr},ABITransactionType:function(){return st},ABITupleType:function(){return ut},ABIType:function(){return He},ABIUfixedType:function(){return Yr},ABIUintType:function(){return _t},ADDR_BYTE_SIZE:function(){return Hs},ALGORAND_MIN_TX_FEE:function(){return b},Algodv2:function(){return ji},AtomicTransactionComposer:function(){return pt},AtomicTransactionComposerStatus:function(){return Ye},DryrunResult:function(){return Po},ERROR_INVALID_MICROALGOS:function(){return pa},ERROR_MULTISIG_BAD_SENDER:function(){return da},INVALID_MICROALGOS_ERROR_MSG:function(){return cn},Indexer:function(){return no},IntDecoding:function(){return S},Kmd:function(){return Pi},LENGTH_ENCODE_BYTE_SIZE:function(){return Xe},LogicSig:function(){return dt},LogicSigAccount:function(){return Zt},MAX_LEN:function(){return vt},MULTISIG_BAD_SENDER_ERROR_MSG:function(){return Ys},OnApplicationComplete:function(){return q},SINGLE_BOOL_SIZE:function(){return Ws},SINGLE_BYTE_SIZE:function(){return Vs},SourceMap:function(){return So},Transaction:function(){return he},TransactionType:function(){return f},abiCheckTransactionType:function(){return Js},abiTypeIsReference:function(){return ts},abiTypeIsTransaction:function(){return rn},algosToMicroalgos:function(){return ei},appendSignMultisigTransaction:function(){return xo},appendSignRawMultisigSignature:function(){return Ao},assignGroupID:function(){return ms},bigIntToBytes:function(){return Ft},bytesToBigInt:function(){return Hn},computeGroupID:function(){return gs},createDryrun:function(){return Io},createMultisigTransaction:function(){return bs},decodeAddress:function(){return B},decodeObj:function(){return ha},decodeSignedTransaction:function(){return Ne},decodeUint64:function(){return pe},decodeUnsignedTransaction:function(){return Me},encodeAddress:function(){return te},encodeObj:function(){return la},encodeUint64:function(){return xe},encodeUnsignedTransaction:function(){return Oe},generateAccount:function(){return so},getApplicationAddress:function(){return it},getMethodByName:function(){return rs},indexerModels:function(){return we},instantiateTxnIfNeeded:function(){return Re},isTransactionWithSigner:function(){return es},isValidAddress:function(){return ee},logicSigFromByte:function(){return Eo},makeApplicationCallTxnFromObject:function(){return Gs},makeApplicationClearStateTxn:function(){return Ks},makeApplicationClearStateTxnFromObject:function(){return Jo},makeApplicationCloseOutTxn:function(){return Ns},makeApplicationCloseOutTxnFromObject:function(){return Wo},makeApplicationCreateTxn:function(){return $s},makeApplicationCreateTxnFromObject:function(){return zo},makeApplicationDeleteTxn:function(){return Os},makeApplicationDeleteTxnFromObject:function(){return Ho},makeApplicationNoOpTxn:function(){return zs},makeApplicationNoOpTxnFromObject:function(){return Xo},makeApplicationOptInTxn:function(){return Ms},makeApplicationOptInTxnFromObject:function(){return Vo},makeApplicationUpdateTxn:function(){return Ls},makeApplicationUpdateTxnFromObject:function(){return Go},makeAssetConfigTxnWithSuggestedParams:function(){return Cs},makeAssetConfigTxnWithSuggestedParamsFromObject:function(){return Oo},makeAssetCreateTxnWithSuggestedParams:function(){return Us},makeAssetCreateTxnWithSuggestedParamsFromObject:function(){return Lo},makeAssetDestroyTxnWithSuggestedParams:function(){return js},makeAssetDestroyTxnWithSuggestedParamsFromObject:function(){return Mo},makeAssetFreezeTxnWithSuggestedParams:function(){return Ps},makeAssetFreezeTxnWithSuggestedParamsFromObject:function(){return No},makeAssetTransferTxnWithSuggestedParams:function(){return qs},makeAssetTransferTxnWithSuggestedParamsFromObject:function(){return Ko},makeBasicAccountTransactionSigner:function(){return Yo},makeKeyRegistrationTxnWithSuggestedParams:function(){return Ds},makeKeyRegistrationTxnWithSuggestedParamsFromObject:function(){return $o},makeLogicSigAccountTransactionSigner:function(){return Zo},makeMultiSigAccountTransactionSigner:function(){return Qo},makePaymentTxnWithSuggestedParams:function(){return Is},makePaymentTxnWithSuggestedParamsFromObject:function(){return qo},masterDerivationKeyToMnemonic:function(){return fo},mergeMultisigTransactions:function(){return Jr},microalgosToAlgos:function(){return Qs},mnemonicFromSeed:function(){return Jn},mnemonicToMasterDerivationKey:function(){return co},mnemonicToSecretKey:function(){return ao},modelsv2:function(){return ye},multisigAddress:function(){return Fo},secretKeyToMnemonic:function(){return uo},seedFromMnemonic:function(){return Xn},signBid:function(){return ua},signBytes:function(){return ca},signLogicSigTransaction:function(){return _o},signLogicSigTransactionObject:function(){return Yn},signMultisigTransaction:function(){return Fs},signTransaction:function(){return aa},tealSign:function(){return Es},tealSignFromProgram:function(){return Ro},verifyBytes:function(){return fa},verifyMultisig:function(){return As},verifyTealSign:function(){return To},waitForConfirmation:function(){return fs}});var l=le(48764),K=le(50780),L=le.n(K),I=le(93434),D=le.n(I);function X(n){return D().sha512_256.array(n)}function Fe(n){return L().randomBytes(n)}function be(n){return L().sign.keyPair.fromSeed(n)}function m(){const n=Fe(L().box.secretKeyLength);return be(n)}function ce(n){return n===L().sign.signatureLength}function ie(n){return L().sign.keyPair.fromSecretKey(n)}function fe(n,e){return L().sign.detached(n,e)}function Ee(n,e){return L().verify(n,e)}function Y(n,e,t){return L().sign.detached.verify(n,e,t)}const _e=L().sign.publicKeyLength,A=L().sign.secretKeyLength,F=32,T=32;var j=le(89090),O=le.n(j),z=le(4400),g=le.n(z),U;(function(n){n.DEFAULT="default",n.SAFE="safe",n.MIXED="mixed",n.BIGINT="bigint"})(U||(U={}));var S=U,$=le(34155);const h=g()({useNativeBigInt:!0,strict:!0});function x(n,e){const t=e&&e.intDecoding?e.intDecoding:S.DEFAULT;return h.parse(n,(r,s)=>{if(s!=null&&typeof s=="object"&&Object.getPrototypeOf(s)==null&&Object.setPrototypeOf(s,Object.prototype),typeof s=="bigint"){if(t==="safe"&&s>Number.MAX_SAFE_INTEGER)throw new Error(`Integer exceeds maximum safe integer: ${s.toString()}. Try parsing with a different intDecoding option.`);return t==="bigint"||t==="mixed"&&s>Number.MAX_SAFE_INTEGER?s:Number(s)}return typeof s=="number"&&t==="bigint"&&Number.isInteger(s)?BigInt(s):s})}function v(n,e){return n.length!==e.length?!1:Array.from(n).every((t,r)=>t===e[r])}function R(...n){const e=n.reduce((s,o)=>s+o.length,0),t=new Uint8Array(e);let r=0;for(let s=0;s<n.length;s++)t.set(n[s],r),r+=n[s].length;return t}function W(n){const e={...n};return Object.keys(e).forEach(t=>{typeof e[t]>"u"&&delete e[t]}),e}function Q(){return typeof $=="object"&&typeof $.versions=="object"&&typeof $.versions.node<"u"}function xe(n){if(!(typeof n=="bigint"||Number.isInteger(n))||n<0||n>BigInt("0xffffffffffffffff"))throw new Error("Input is not a 64-bit unsigned integer");const t=new Uint8Array(8);return new DataView(t.buffer).setBigUint64(0,BigInt(n)),t}function pe(n,e="safe"){if(e!=="safe"&&e!=="mixed"&&e!=="bigint")throw new Error(`Unknown decodingMode option: ${e}`);if(n.byteLength===0||n.byteLength>8)throw new Error(`Data has unacceptable length. Expected length is between 1 and 8, got ${n.byteLength}`);const t=new Uint8Array(8-n.byteLength),r=R(t,n),o=new DataView(r.buffer).getBigUint64(0),d=o>BigInt(Number.MAX_SAFE_INTEGER);if(e==="safe"){if(d)throw new Error(`Integer exceeds maximum safe integer: ${o.toString()}. Try decoding with "mixed" or "safe" decodingMode.`);return Number(o)}return e==="mixed"&&!d?Number(o):o}const Ae=36,ve=4,Ie=58,Be="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ",ge=new Uint8Array([77,117,108,116,105,115,105,103,65,100,100,114]),ae=l.Buffer.from("appID"),Te="address seems to be malformed",De="wrong checksum for address",Ce="invalid multisig version",je="bad multisig threshold",M="bad multisig public key - wrong length",G="nacl public key length is not 32 bytes";function B(n){if(typeof n!="string"||n.length!==Ie)throw new Error(Te);const e=O().decode.asBytes(n.toString());if(e.length!==Ae)throw new Error(Te);const t=new Uint8Array(e.slice(0,Ae-ve)),r=new Uint8Array(e.slice(_e,Ae)),s=X(t).slice(F-ve,F);if(!v(s,r))throw new Error(De);return{publicKey:t,checksum:r}}function ee(n){try{B(n)}catch{return!1}return!0}function te(n){const e=X(n).slice(_e-ve,_e);return O().encode(R(n,e)).toString().slice(0,Ie)}function et({version:n,threshold:e,pks:t}){if(n!==1||n>255||n<0)throw new Error(Ce);if(e===0||t.length===0||e>t.length||e>255)throw new Error(je);const r=Ae-ve;if(r!==_e)throw new Error(G);const s=new Uint8Array(ge.length+2+r*t.length);s.set(ge,0),s.set([n],ge.length),s.set([e],ge.length+1);for(let o=0;o<t.length;o++){if(t[o].length!==r)throw new Error(M);s.set(t[o],ge.length+2+o*r)}return new Uint8Array(X(s))}function lt({version:n,threshold:e,addrs:t}){const r=t.map(s=>B(s).publicKey);return te(et({version:n,threshold:e,pks:r}))}function it(n){const e=R(ae,xe(n)),t=X(e);return te(new Uint8Array(t))}var ht=le(66424);const p="The object contains empty or 0 values. First empty or 0 value encountered during encoding: ";function i(n){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&(!n[e]||n[e].length===0))return{containsEmpty:!0,firstEmptyKey:e};return{containsEmpty:!1,firstEmptyKey:void 0}}function a(n){const e=i(n);if(e.containsEmpty)throw new Error(p+e.firstEmptyKey);const t={sortKeys:!0};return ht.encode(n,t)}function u(n){return ht.decode(n)}function c(n,e,t){const r=n.appIndex,s=n.name,o=r===0||r===t;let d=0;if(e!=null&&(d=e.indexOf(r)+1),d===0&&!o)throw new Error(`Box ref with appId ${r} not in foreign-apps`);return{i:d,n:s}}function y(n,e,t){return n==null?[]:n.map(r=>c(r,e,t))}var f;(function(n){n.pay="pay",n.keyreg="keyreg",n.acfg="acfg",n.axfer="axfer",n.afrz="afrz",n.appl="appl",n.stpf="stpf"})(f||(f={}));function k(n){return n===f.pay||n===f.keyreg||n===f.acfg||n===f.axfer||n===f.afrz||n===f.appl||n===f.stpf}var q;(function(n){n[n.NoOpOC=0]="NoOpOC",n[n.OptInOC=1]="OptInOC",n[n.CloseOutOC=2]="CloseOutOC",n[n.ClearStateOC=3]="ClearStateOC",n[n.UpdateApplicationOC=4]="UpdateApplicationOC",n[n.DeleteApplicationOC=5]="DeleteApplicationOC"})(q||(q={}));const V=52,b=1e3,H=32,re=19,me=75,de=5,Ue=32,$e=5,Le=32,Ke=32,ze=32,Ge=64;function Pe(n,e,t){if(n==null)return;let r;if(typeof n=="string"?r=l.Buffer.from(n,"base64"):n.constructor===Uint8Array?r=l.Buffer.from(n):l.Buffer.isBuffer(n)&&(r=n),r==null||r.byteLength!==t)throw Error(`${e} must be a ${t} byte Uint8Array or Buffer or base64 string.`);return r}class he{constructor({...e}){this.name="Transaction",this.tag=l.Buffer.from("TX");const t={type:f.pay,flatFee:!1,nonParticipation:!1};if(typeof e.type>"u"&&(e.type=t.type),typeof e.flatFee>"u"&&(e.flatFee=t.flatFee),e.type===f.keyreg&&typeof e.voteKey<"u"&&typeof e.nonParticipation>"u"&&(e.nonParticipation=t.nonParticipation),e.suggestedParams!==void 0){const s=e;s.genesisHash=s.suggestedParams.genesisHash,s.fee=s.suggestedParams.fee,s.suggestedParams.flatFee!==void 0&&(s.flatFee=s.suggestedParams.flatFee),s.firstRound=s.suggestedParams.firstRound,s.lastRound=s.suggestedParams.lastRound,s.genesisID=s.suggestedParams.genesisID}const r=e;if(r.from=B(r.from),r.to!==void 0&&(r.to=B(r.to)),r.closeRemainderTo!==void 0&&(r.closeRemainderTo=B(r.closeRemainderTo)),r.assetManager!==void 0&&(r.assetManager=B(r.assetManager)),r.assetReserve!==void 0&&(r.assetReserve=B(r.assetReserve)),r.assetFreeze!==void 0&&(r.assetFreeze=B(r.assetFreeze)),r.assetClawback!==void 0&&(r.assetClawback=B(r.assetClawback)),r.assetRevocationTarget!==void 0&&(r.assetRevocationTarget=B(r.assetRevocationTarget)),r.freezeAccount!==void 0&&(r.freezeAccount=B(r.freezeAccount)),r.reKeyTo!==void 0&&(r.reKeyTo=B(r.reKeyTo)),r.genesisHash===void 0)throw Error("genesis hash must be specified and in a base64 string.");if(r.genesisHash=l.Buffer.from(r.genesisHash,"base64"),r.amount!==void 0&&(!(Number.isSafeInteger(r.amount)||typeof r.amount=="bigint"&&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(r.extraPages!==void 0&&(!Number.isInteger(r.extraPages)||r.extraPages<0||r.extraPages>3))throw Error("extraPages must be an Integer between and including 0 to 3");if(r.assetTotal!==void 0&&(!(Number.isSafeInteger(r.assetTotal)||typeof r.assetTotal=="bigint"&&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(r.assetDecimals!==void 0&&(!Number.isSafeInteger(r.assetDecimals)||r.assetDecimals<0||r.assetDecimals>re))throw Error(`assetDecimals must be a positive number and smaller than ${re.toString()}`);if(r.assetIndex!==void 0&&(!Number.isSafeInteger(r.assetIndex)||r.assetIndex<0))throw Error("Asset index must be a positive number and smaller than 2^53-1");if(r.appIndex!==void 0&&(!Number.isSafeInteger(r.appIndex)||r.appIndex<0))throw Error("Application index must be a positive number and smaller than 2^53-1");if(r.appLocalInts!==void 0&&(!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(r.appLocalByteSlices!==void 0&&(!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(r.appGlobalInts!==void 0&&(!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(r.appGlobalByteSlices!==void 0&&(!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(r.appApprovalProgram!==void 0&&r.appApprovalProgram.constructor!==Uint8Array)throw Error("appApprovalProgram must be a Uint8Array.");if(r.appClearProgram!==void 0&&r.appClearProgram.constructor!==Uint8Array)throw Error("appClearProgram must be a Uint8Array.");if(r.appArgs!==void 0){if(!Array.isArray(r.appArgs))throw Error("appArgs must be an Array of Uint8Array.");r.appArgs=r.appArgs.slice(),r.appArgs.forEach(s=>{if(s.constructor!==Uint8Array)throw Error("each element of AppArgs must be a Uint8Array.")})}else r.appArgs=[];if(r.appAccounts!==void 0){if(!Array.isArray(r.appAccounts))throw Error("appAccounts must be an Array of addresses.");r.appAccounts=r.appAccounts.map(s=>B(s))}if(r.appForeignApps!==void 0){if(!Array.isArray(r.appForeignApps))throw Error("appForeignApps must be an Array of integers.");r.appForeignApps=r.appForeignApps.slice(),r.appForeignApps.forEach(s=>{if(!Number.isSafeInteger(s)||s<0)throw Error("each foreign application index must be a positive number and smaller than 2^53-1")})}if(r.appForeignAssets!==void 0){if(!Array.isArray(r.appForeignAssets))throw Error("appForeignAssets must be an Array of integers.");r.appForeignAssets=r.appForeignAssets.slice(),r.appForeignAssets.forEach(s=>{if(!Number.isSafeInteger(s)||s<0)throw Error("each foreign asset index must be a positive number and smaller than 2^53-1")})}if(r.boxes!==void 0){if(!Array.isArray(r.boxes))throw Error("boxes must be an Array of BoxReference.");r.boxes=r.boxes.slice(),r.boxes.forEach(s=>{if(!Number.isSafeInteger(s.appIndex)||s.name.constructor!==Uint8Array)throw Error("box app index must be a number and name must be an Uint8Array.")})}if(r.assetMetadataHash!==void 0&&r.assetMetadataHash.length!==0){if(typeof r.assetMetadataHash=="string"&&(r.assetMetadataHash=new Uint8Array(l.Buffer.from(r.assetMetadataHash))),r.assetMetadataHash.constructor!==Uint8Array||r.assetMetadataHash.byteLength!==Le)throw Error(`assetMetadataHash must be a ${Le} byte Uint8Array or string.`);r.assetMetadataHash.every(s=>s===0)&&(r.assetMetadataHash=void 0)}else r.assetMetadataHash=void 0;if(r.note!==void 0){if(r.note.constructor!==Uint8Array)throw Error("note must be a Uint8Array.")}else r.note=new Uint8Array(0);if(r.lease!==void 0){if(r.lease.constructor!==Uint8Array)throw Error("lease must be a Uint8Array.");if(r.lease.length!==H)throw Error(`lease must be of length ${H.toString()}.`);r.lease.every(s=>s===0)&&(r.lease=new Uint8Array(0))}else r.lease=new Uint8Array(0);if(r.voteKey=Pe(r.voteKey,"voteKey",Ke),r.selectionKey=Pe(r.selectionKey,"selectionKey",ze),r.stateProofKey=Pe(r.stateProofKey,"stateProofKey",Ge),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");if(delete r.suggestedParams,Object.assign(this,W(r)),r.flatFee||(this.fee*=this.estimateSize(),this.fee<b&&(this.fee=b)),this.group=void 0,r.stateProofType!==void 0&&(!Number.isSafeInteger(r.stateProofType)||r.stateProofType<0))throw Error("State Proof type must be a positive number and smaller than 2^53-1");if(r.stateProofMessage!==void 0){if(r.stateProofMessage.constructor!==Uint8Array)throw Error("stateProofMessage must be a Uint8Array.")}else r.stateProofMessage=new Uint8Array(0);if(r.stateProof!==void 0){if(r.stateProof.constructor!==Uint8Array)throw Error("stateProof must be a Uint8Array.")}else r.stateProof=new Uint8Array(0)}get_obj_for_encoding(){if(this.type==="pay"){const e={amt:this.amount,fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:l.Buffer.from(this.note),snd:l.Buffer.from(this.from.publicKey),type:"pay",gen:this.genesisID,gh:this.genesisHash,lx:l.Buffer.from(this.lease),grp:this.group};return this.closeRemainderTo!==void 0&&te(this.closeRemainderTo.publicKey)!==Be&&(e.close=l.Buffer.from(this.closeRemainderTo.publicKey)),this.reKeyTo!==void 0&&(e.rekey=l.Buffer.from(this.reKeyTo.publicKey)),this.to!==void 0&&(e.rcv=l.Buffer.from(this.to.publicKey)),e.note.length||delete e.note,e.amt||delete e.amt,e.fee||delete e.fee,e.fv||delete e.fv,e.gen||delete e.gen,e.grp===void 0&&delete e.grp,e.lx.length||delete e.lx,e.rekey||delete e.rekey,e}if(this.type==="keyreg"){const e={fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:l.Buffer.from(this.note),snd:l.Buffer.from(this.from.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:l.Buffer.from(this.lease),grp:this.group,votekey:this.voteKey,selkey:this.selectionKey,sprfkey:this.stateProofKey,votefst:this.voteFirst,votelst:this.voteLast,votekd:this.voteKeyDilution};return e.note.length||delete e.note,e.lx.length||delete e.lx,e.fee||delete e.fee,e.fv||delete e.fv,e.gen||delete e.gen,e.grp===void 0&&delete e.grp,this.reKeyTo!==void 0&&(e.rekey=l.Buffer.from(this.reKeyTo.publicKey)),this.nonParticipation&&(e.nonpart=!0),e.selkey||delete e.selkey,e.votekey||delete e.votekey,e.sprfkey||delete e.sprfkey,e.votefst||delete e.votefst,e.votelst||delete e.votelst,e.votekd||delete e.votekd,e}if(this.type==="acfg"){const e={fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:l.Buffer.from(this.note),snd:l.Buffer.from(this.from.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:l.Buffer.from(this.lease),grp:this.group,caid:this.assetIndex,apar:{t:this.assetTotal,df:this.assetDefaultFrozen,dc:this.assetDecimals}};return this.assetManager!==void 0&&(e.apar.m=l.Buffer.from(this.assetManager.publicKey)),this.assetReserve!==void 0&&(e.apar.r=l.Buffer.from(this.assetReserve.publicKey)),this.assetFreeze!==void 0&&(e.apar.f=l.Buffer.from(this.assetFreeze.publicKey)),this.assetClawback!==void 0&&(e.apar.c=l.Buffer.from(this.assetClawback.publicKey)),this.assetName!==void 0&&(e.apar.an=this.assetName),this.assetUnitName!==void 0&&(e.apar.un=this.assetUnitName),this.assetURL!==void 0&&(e.apar.au=this.assetURL),this.assetMetadataHash!==void 0&&(e.apar.am=l.Buffer.from(this.assetMetadataHash)),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,this.reKeyTo!==void 0&&(e.rekey=l.Buffer.from(this.reKeyTo.publicKey)),e.caid||delete e.caid,!e.apar.t&&!e.apar.un&&!e.apar.an&&!e.apar.df&&!e.apar.m&&!e.apar.r&&!e.apar.f&&!e.apar.c&&!e.apar.au&&!e.apar.am&&!e.apar.dc?delete e.apar:(e.apar.t||delete e.apar.t,e.apar.dc||delete e.apar.dc,e.apar.un||delete e.apar.un,e.apar.an||delete e.apar.an,e.apar.df||delete e.apar.df,e.apar.m||delete e.apar.m,e.apar.r||delete e.apar.r,e.apar.f||delete e.apar.f,e.apar.c||delete e.apar.c,e.apar.au||delete e.apar.au,e.apar.am||delete e.apar.am),e.grp===void 0&&delete e.grp,e}if(this.type==="axfer"){const e={aamt:this.amount,fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:l.Buffer.from(this.note),snd:l.Buffer.from(this.from.publicKey),arcv:l.Buffer.from(this.to.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:l.Buffer.from(this.lease),grp:this.group,xaid:this.assetIndex};return this.closeRemainderTo!==void 0&&(e.aclose=l.Buffer.from(this.closeRemainderTo.publicKey)),this.assetRevocationTarget!==void 0&&(e.asnd=l.Buffer.from(this.assetRevocationTarget.publicKey)),e.note.length||delete e.note,e.lx.length||delete e.lx,e.aamt||delete e.aamt,e.amt||delete e.amt,e.fee||delete e.fee,e.fv||delete e.fv,e.gen||delete e.gen,e.grp===void 0&&delete e.grp,e.aclose||delete e.aclose,e.asnd||delete e.asnd,e.rekey||delete e.rekey,this.reKeyTo!==void 0&&(e.rekey=l.Buffer.from(this.reKeyTo.publicKey)),e}if(this.type==="afrz"){const e={fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:l.Buffer.from(this.note),snd:l.Buffer.from(this.from.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:l.Buffer.from(this.lease),grp:this.group,faid:this.assetIndex,afrz:this.freezeState};return this.freezeAccount!==void 0&&(e.fadd=l.Buffer.from(this.freezeAccount.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.afrz||delete e.afrz,e.grp===void 0&&delete e.grp,this.reKeyTo!==void 0&&(e.rekey=l.Buffer.from(this.reKeyTo.publicKey)),e}if(this.type==="appl"){const e={fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:l.Buffer.from(this.note),snd:l.Buffer.from(this.from.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:l.Buffer.from(this.lease),grp:this.group,apid:this.appIndex,apan:this.appOnComplete,apls:{nui:this.appLocalInts,nbs:this.appLocalByteSlices},apgs:{nui:this.appGlobalInts,nbs:this.appGlobalByteSlices},apfa:this.appForeignApps,apas:this.appForeignAssets,apep:this.extraPages,apbx:y(this.boxes,this.appForeignApps,this.appIndex)};this.reKeyTo!==void 0&&(e.rekey=l.Buffer.from(this.reKeyTo.publicKey)),this.appApprovalProgram!==void 0&&(e.apap=l.Buffer.from(this.appApprovalProgram)),this.appClearProgram!==void 0&&(e.apsu=l.Buffer.from(this.appClearProgram)),this.appArgs!==void 0&&(e.apaa=this.appArgs.map(t=>l.Buffer.from(t))),this.appAccounts!==void 0&&(e.apat=this.appAccounts.map(t=>l.Buffer.from(t.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;for(const t of e.apbx)t.i||delete t.i,(!t.n||!t.n.length)&&delete t.n;return(!e.apbx||!e.apbx.length)&&delete e.apbx,(!e.apat||!e.apat.length)&&delete e.apat,e.apep||delete e.apep,e.grp===void 0&&delete e.grp,e}if(this.type==="stpf"){const e={fee:this.fee,fv:this.firstRound,lv:this.lastRound,note:l.Buffer.from(this.note),snd:l.Buffer.from(this.from.publicKey),type:this.type,gen:this.genesisID,gh:this.genesisHash,lx:l.Buffer.from(this.lease),sptype:this.stateProofType,spmsg:l.Buffer.from(this.stateProofMessage),sp:l.Buffer.from(this.stateProof)};return e.sptype||delete e.sptype,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.apaa||!e.apaa.length)&&delete e.apaa,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,e.grp===void 0&&delete e.grp,e}}static from_obj_for_encoding(e){const t=Object.create(this.prototype);if(t.name="Transaction",t.tag=l.Buffer.from("TX"),t.genesisID=e.gen,t.genesisHash=l.Buffer.from(e.gh),!k(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=B(te(new Uint8Array(e.snd))),e.grp!==void 0&&(t.group=l.Buffer.from(e.grp)),e.rekey!==void 0&&(t.reKeyTo=B(te(new Uint8Array(e.rekey)))),e.type==="pay"?(t.amount=e.amt,t.to=B(te(new Uint8Array(e.rcv))),e.close!==void 0&&(t.closeRemainderTo=B(te(e.close)))):e.type==="keyreg"?(e.votekey!==void 0&&(t.voteKey=l.Buffer.from(e.votekey)),e.selkey!==void 0&&(t.selectionKey=l.Buffer.from(e.selkey)),e.sprfkey!==void 0&&(t.stateProofKey=l.Buffer.from(e.sprfkey)),e.votekd!==void 0&&(t.voteKeyDilution=e.votekd),e.votefst!==void 0&&(t.voteFirst=e.votefst),e.votelst!==void 0&&(t.voteLast=e.votelst),e.nonpart!==void 0&&(t.nonParticipation=e.nonpart)):e.type==="acfg"?(e.caid!==void 0&&(t.assetIndex=e.caid),e.apar!==void 0&&(t.assetTotal=e.apar.t,t.assetDefaultFrozen=e.apar.df,e.apar.dc!==void 0&&(t.assetDecimals=e.apar.dc),e.apar.m!==void 0&&(t.assetManager=B(te(new Uint8Array(e.apar.m)))),e.apar.r!==void 0&&(t.assetReserve=B(te(new Uint8Array(e.apar.r)))),e.apar.f!==void 0&&(t.assetFreeze=B(te(new Uint8Array(e.apar.f)))),e.apar.c!==void 0&&(t.assetClawback=B(te(new Uint8Array(e.apar.c)))),e.apar.un!==void 0&&(t.assetUnitName=e.apar.un),e.apar.an!==void 0&&(t.assetName=e.apar.an),e.apar.au!==void 0&&(t.assetURL=e.apar.au),e.apar.am!==void 0&&(t.assetMetadataHash=e.apar.am))):e.type==="axfer"?(e.xaid!==void 0&&(t.assetIndex=e.xaid),e.aamt!==void 0&&(t.amount=e.aamt),e.aclose!==void 0&&(t.closeRemainderTo=B(te(new Uint8Array(e.aclose)))),e.asnd!==void 0&&(t.assetRevocationTarget=B(te(new Uint8Array(e.asnd)))),t.to=B(te(new Uint8Array(e.arcv)))):e.type==="afrz"?(e.afrz!==void 0&&(t.freezeState=e.afrz),e.faid!==void 0&&(t.assetIndex=e.faid),t.freezeAccount=B(te(new Uint8Array(e.fadd)))):e.type==="appl"?(e.apid!==void 0&&(t.appIndex=e.apid),e.apan!==void 0&&(t.appOnComplete=e.apan),e.apls!==void 0&&(e.apls.nui!==void 0&&(t.appLocalInts=e.apls.nui),e.apls.nbs!==void 0&&(t.appLocalByteSlices=e.apls.nbs)),e.apgs!==void 0&&(e.apgs.nui!==void 0&&(t.appGlobalInts=e.apgs.nui),e.apgs.nbs!==void 0&&(t.appGlobalByteSlices=e.apgs.nbs)),e.apep!==void 0&&(t.extraPages=e.apep),e.apap!==void 0&&(t.appApprovalProgram=new Uint8Array(e.apap)),e.apsu!==void 0&&(t.appClearProgram=new Uint8Array(e.apsu)),e.apaa!==void 0&&(t.appArgs=e.apaa.map(r=>new Uint8Array(r))),e.apat!==void 0&&(t.appAccounts=e.apat.map(r=>B(te(new Uint8Array(r))))),e.apfa!==void 0&&(t.appForeignApps=e.apfa),e.apas!==void 0&&(t.appForeignAssets=e.apas),e.apbx!==void 0&&(t.boxes=e.apbx.map(r=>({appIndex:r.i?t.appForeignApps[r.i-1]:0,name:r.n})))):e.type==="stpf"&&(e.sptype!==void 0&&(t.stateProofType=e.sptype),e.sp!==void 0&&(t.stateProof=e.sp),e.spmsg!==void 0&&(t.stateProofMessage=e.spmsg)),t}estimateSize(){return this.toByte().length+me}bytesToSign(){const e=this.toByte();return l.Buffer.from(R(this.tag,e))}toByte(){return a(this.get_obj_for_encoding())}rawSignTxn(e){const t=this.bytesToSign(),r=fe(t,e);return l.Buffer.from(r)}signTxn(e){const t={sig:this.rawSignTxn(e),txn:this.get_obj_for_encoding()},s=ie(e).publicKey;return te(s)!==te(this.from.publicKey)&&(t.sgnr=l.Buffer.from(s)),new Uint8Array(a(t))}attachSignature(e,t){if(!ce(t.length))throw new Error("Invalid signature length");const r={sig:l.Buffer.from(t),txn:this.get_obj_for_encoding()};if(e!==te(this.from.publicKey)){const s=B(e).publicKey;r.sgnr=l.Buffer.from(s)}return new Uint8Array(a(r))}rawTxID(){const e=this.toByte(),t=l.Buffer.from(R(this.tag,e));return l.Buffer.from(X(t))}txID(){const e=this.rawTxID();return O().encode(e).slice(0,V)}addLease(e,t=0){let r;if(e!==void 0){if(e.constructor!==Uint8Array)throw Error("lease must be a Uint8Array.");if(e.length!==H)throw Error(`lease must be of length ${H.toString()}.`);r=new Uint8Array(e)}else r=new Uint8Array(0);this.lease=r,t!==0&&(this.fee+=(de+H)*t)}addRekey(e,t=0){e!==void 0&&(this.reKeyTo=B(e)),t!==0&&(this.fee+=($e+Ue)*t)}_getDictForDisplay(){const e={...this};return e.tag=e.tag.toString(),e.from=te(e.from.publicKey),e.to!==void 0&&(e.to=te(e.to.publicKey)),e.freezeAccount!==void 0&&(e.freezeAccount=te(e.freezeAccount.publicKey)),e.closeRemainderTo!==void 0&&(e.closeRemainderTo=te(e.closeRemainderTo.publicKey)),e.assetManager!==void 0&&(e.assetManager=te(e.assetManager.publicKey)),e.assetReserve!==void 0&&(e.assetReserve=te(e.assetReserve.publicKey)),e.assetFreeze!==void 0&&(e.assetFreeze=te(e.assetFreeze.publicKey)),e.assetClawback!==void 0&&(e.assetClawback=te(e.assetClawback.publicKey)),e.assetRevocationTarget!==void 0&&(e.assetRevocationTarget=te(e.assetRevocationTarget.publicKey)),e.reKeyTo!==void 0&&(e.reKeyTo=te(e.reKeyTo.publicKey)),e.genesisHash=e.genesisHash.toString("base64"),e}prettyPrint(){console.log(this._getDictForDisplay())}toString(){return JSON.stringify(this._getDictForDisplay())}}function Oe(n){const e=n.get_obj_for_encoding();return a(e)}function Me(n){const e=u(n);return he.from_obj_for_encoding(e)}function Ne(n){const e=u(n);return{...e,txn:he.from_obj_for_encoding(e.txn)}}function Re(n){return n instanceof he?n:new he(n)}var ma=null;class Zs{constructor({bidderKey:e,bidAmount:t,bidID:r,auctionKey:s,auctionID:o,maxPrice:d}){this.name="Bid",this.tag=l.Buffer.from([97,66]);const w=B(e),E=B(s);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(o)||o<0)throw Error("auctionID must be positive");Object.assign(this,{bidderKey:w,bidAmount:t,bidID:r,auctionKey:E,auctionID:o,maxPrice:d})}get_obj_for_encoding(){return{bidder:l.Buffer.from(this.bidderKey.publicKey),cur:this.bidAmount,price:this.maxPrice,id:this.bidID,auc:l.Buffer.from(this.auctionKey.publicKey),aid:this.auctionID}}signBid(e){const t=a(this.get_obj_for_encoding()),r=l.Buffer.from(R(this.tag,t)),s=fe(r,e),d={t:"b",b:{sig:l.Buffer.from(s),bid:this.get_obj_for_encoding()}};return new Uint8Array(a(d))}}const os=1e6,cn="Microalgos should be positive and less than 2^53 - 1.";function Qs(n){if(n<0||!Number.isSafeInteger(n))throw new Error(cn);return n/os}function ei(n){const e=n*os;return Math.round(e)}var fn=le(54098);class ti extends Error{constructor(e,t){super(e),this.response=t,this.name="URLTokenBaseHTTPError",this.response=t}}class bt{constructor(e,t,r,s={}){this.defaultHeaders=s;const o=t.endsWith("/")?t:`${t}/`,d=new URL(o);if(typeof r<"u"&&(d.port=r.toString()),d.protocol.length===0)throw new Error("Invalid base server URL, protocol must be defined.");this.baseURL=d,this.tokenHeader=e}getURL(e,t){let r;e.startsWith("./")?r=e:e.startsWith("/")?r=`.${e}`:r=`./${e}`;const s=new URL(r,this.baseURL);if(t)for(const[o,d]of Object.entries(t))s.searchParams.set(o,d);return s.toString()}static formatFetchResponseHeaders(e){const t={};return e.forEach((r,s)=>{t[r]=s}),t}static async checkHttpError(e){if(e.ok)return;let t=null,r=null;try{t=new Uint8Array(await e.arrayBuffer());const o=JSON.parse(l.Buffer.from(t).toString());o.message&&(r=o.message)}catch{}let s=`Network request error. Received status ${e.status} (${e.statusText})`;throw r&&(s+=`: ${r}`),new ti(s,{body:t,status:e.status,headers:bt.formatFetchResponseHeaders(e.headers)})}static async formatFetchResponse(e){return await this.checkHttpError(e),{body:new Uint8Array(await e.arrayBuffer()),status:e.status,headers:bt.formatFetchResponseHeaders(e.headers)}}async get(e,t,r={}){const s={...this.tokenHeader,...this.defaultHeaders,...r},o=await(0,fn.fetch)(this.getURL(e,t),{mode:"cors",headers:s});return bt.formatFetchResponse(o)}async post(e,t,r,s={}){const o={...this.tokenHeader,...this.defaultHeaders,...s},d=await(0,fn.fetch)(this.getURL(e,r),{method:"POST",mode:"cors",body:t,headers:o});return bt.formatFetchResponse(d)}async delete(e,t,r,s={}){const o={...this.tokenHeader,...this.defaultHeaders,...s},d=await(0,fn.fetch)(this.getURL(e,r),{method:"DELETE",mode:"cors",body:t,headers:o});return bt.formatFetchResponse(d)}}function ri(n){for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&(!n[e]||n[e].length===0)&&delete n[e];return n}function as(n){return Object.keys(n).reduce((e,t)=>(e[t.toLowerCase()]=n[t],e),{})}function ni(n){if(n!==void 0&&Object.prototype.hasOwnProperty.call(n,"format"))switch(n.format){case"msgpack":return"application/msgpack";case"json":default:return"application/json"}else return"application/json"}class rt{constructor(e,t,r,s={}){t!==void 0?this.bc=new bt(e,t,r,s):this.bc=e}static parseJSON(e,t,r={}){try{return Object.keys(r).length===0?e&&JSON.parse(e):e&&x(e,r)}catch(s){const o=s;throw o.rawResponse=e||null,o.statusCode=t,o}}static serializeData(e,t){if(!e)return new Uint8Array(0);if(t["content-type"]==="application/json")return new Uint8Array(l.Buffer.from(JSON.stringify(e)));if(typeof e=="string")return new Uint8Array(l.Buffer.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,s={}){let{body:o}=e,d;return t!=="application/msgpack"&&(d=o&&l.Buffer.from(o).toString()||""),r&&t==="application/json"&&(o=rt.parseJSON(d,e.status,s)),{...e,body:o,text:d,ok:Math.trunc(e.status/100)===2}}static prepareResponseError(e){return e.response&&(e.response=rt.prepareResponse(e.response,"application/json",!0),e.status=e.response.status),e}async get(e,t,r={},s={},o=!0){const d=ni(t),w={...r,accept:d};try{const E=await this.bc.get(e,ri(t),w);return rt.prepareResponse(E,d,o,s)}catch(E){throw rt.prepareResponseError(E)}}async post(e,t,r={},s,o=!0){const d={"content-type":"application/json",...as(r)};try{const w=await this.bc.post(e,rt.serializeData(t,d),s,d);return rt.prepareResponse(w,"application/json",o)}catch(w){throw rt.prepareResponseError(w)}}async delete(e,t,r={},s=!0){const o={"content-type":"application/json",...as(r)},d=await this.bc.delete(e,rt.serializeData(t,o),void 0,o);return rt.prepareResponse(d,"application/json",s)}}function si(n="",e){const t={};return t[e]=n,t}function ii(n){return typeof n.get=="function"}class ln{constructor(e,t,r,s,o={}){if(ii(t))this.c=new rt(t);else{let d;typeof t=="string"?d=si(t,e):d=t,this.c=new rt(d,r,s,o)}this.intDecoding=S.DEFAULT}setIntEncoding(e){this.intDecoding=e}getIntEncoding(){return this.intDecoding}}class ue{constructor(e,t){this.c=e,this.query={},this.intDecoding=t||S.DEFAULT}prepare(e){return e}async do(e={}){const t={};this.intDecoding!=="default"&&(t.intDecoding=this.intDecoding);const r=await this.c.get(this.path(),this.query,e,t);return this.prepare(r.body)}async doRaw(e={}){return(await this.c.get(this.path(),this.query,e,{},!1)).body}setIntDecoding(e){if(e!=="default"&&e!=="safe"&&e!=="mixed"&&e!=="bigint")throw new Error(`Invalid method for int decoding: ${e}`);return this.intDecoding=e,this}}class oi extends ue{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}`}exclude(e){return this.query.exclude=e,this}}class ai extends ue{constructor(e,t,r,s){super(e,t),this.account=r,this.assetID=s,this.account=r,this.assetID=s}path(){return`/v2/accounts/${this.account}/assets/${this.assetID}`}}class ui extends ue{constructor(e,t,r,s){super(e,t),this.account=r,this.applicationID=s,this.account=r,this.applicationID=s}path(){return`/v2/accounts/${this.account}/applications/${this.applicationID}`}}class ci extends ue{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 u(e)}}function us(n={}){let e=n;return Object.keys(e).every(t=>t.toLowerCase()!=="content-type")&&(e={...n},e["Content-Type"]="text/plain"),e}class fi extends ue{constructor(e,t){super(e),this.source=t,this.source=t}path(){return"/v2/teal/compile"}sourcemap(e=!0){return this.query.sourcemap=e,this}async do(e={}){const t=us(e);return(await this.c.post(this.path(),l.Buffer.from(this.source),t,this.query)).body}}class li extends ue{constructor(e,t){super(e),this.blob=a(t.get_obj_for_encoding(!0))}path(){return"/v2/teal/dryrun"}async do(e={}){const t=us(e);return(await this.c.post(this.path(),l.Buffer.from(this.blob),t)).body}}class hi extends ue{path(){return"/genesis"}}class di extends ue{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/assets/${this.index}`}}class pi extends ue{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/applications/${this.index}`}}class gi extends ue{constructor(e,t,r){if(super(e,t),!Number.isInteger(r))throw Error("roundNumber should be an integer");this.round=r}path(){return`/v2/blocks/${this.round}/hash`}}function mi(n){return n===void 0||n==null||typeof n!="object"&&typeof n!="function"}function hn(n,e){let t;if(n instanceof Uint8Array)t=e?n:l.Buffer.from(n).toString("base64");else if(typeof n.get_obj_for_encoding=="function")t=n.get_obj_for_encoding(e);else if(Array.isArray(n)){t=[];for(const r of n)t.push(hn(r,e))}else if(typeof n=="object"){const r={};for(const s of Object.keys(n))r[s]=hn(n[s],e);t=r}else if(mi(n))t=n;else throw new Error(`Unsupported value: ${String(n)}`);return t}class P{get_obj_for_encoding(e=!1){const t={};for(const r of Object.keys(this.attribute_map)){const s=this.attribute_map[r],o=this[r];typeof o<"u"&&(t[s]=o===null?null:hn(o,e))}return t}}class nr extends P{constructor({address:e,amount:t,amountWithoutPendingRewards:r,minBalance:s,pendingRewards:o,rewards:d,round:w,status:E,totalAppsOptedIn:C,totalAssetsOptedIn:_,totalCreatedApps:N,totalCreatedAssets:ne,appsLocalState:oe,appsTotalExtraPages:J,appsTotalSchema:se,assets:qe,authAddr:Ve,createdApps:tt,createdAssets:Et,participation:Tt,rewardBase:Rt,sigType:Ze,totalBoxBytes:Qe,totalBoxes:gt}){super(),this.address=e,this.amount=t,this.amountWithoutPendingRewards=r,this.minBalance=s,this.pendingRewards=o,this.rewards=d,this.round=w,this.status=E,this.totalAppsOptedIn=C,this.totalAssetsOptedIn=_,this.totalCreatedApps=N,this.totalCreatedAssets=ne,this.appsLocalState=oe,this.appsTotalExtraPages=J,this.appsTotalSchema=se,this.assets=qe,this.authAddr=Ve,this.createdApps=tt,this.createdAssets=Et,this.participation=Tt,this.rewardBase=Rt,this.sigType=Ze,this.totalBoxBytes=Qe,this.totalBoxes=gt,this.attribute_map={address:"address",amount:"amount",amountWithoutPendingRewards:"amount-without-pending-rewards",minBalance:"min-balance",pendingRewards:"pending-rewards",rewards:"rewards",round:"round",status:"status",totalAppsOptedIn:"total-apps-opted-in",totalAssetsOptedIn:"total-assets-opted-in",totalCreatedApps:"total-created-apps",totalCreatedAssets:"total-created-assets",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",totalBoxBytes:"total-box-bytes",totalBoxes:"total-boxes"}}static from_obj_for_encoding(e){if(typeof e.address>"u")throw new Error(`Response is missing required field 'address': ${e}`);if(typeof e.amount>"u")throw new Error(`Response is missing required field 'amount': ${e}`);if(typeof e["amount-without-pending-rewards"]>"u")throw new Error(`Response is missing required field 'amount-without-pending-rewards': ${e}`);if(typeof e["min-balance"]>"u")throw new Error(`Response is missing required field 'min-balance': ${e}`);if(typeof e["pending-rewards"]>"u")throw new Error(`Response is missing required field 'pending-rewards': ${e}`);if(typeof e.rewards>"u")throw new Error(`Response is missing required field 'rewards': ${e}`);if(typeof e.round>"u")throw new Error(`Response is missing required field 'round': ${e}`);if(typeof e.status>"u")throw new Error(`Response is missing required field 'status': ${e}`);if(typeof e["total-apps-opted-in"]>"u")throw new Error(`Response is missing required field 'total-apps-opted-in': ${e}`);if(typeof e["total-assets-opted-in"]>"u")throw new Error(`Response is missing required field 'total-assets-opted-in': ${e}`);if(typeof e["total-created-apps"]>"u")throw new Error(`Response is missing required field 'total-created-apps': ${e}`);if(typeof e["total-created-assets"]>"u")throw new Error(`Response is missing required field 'total-created-assets': ${e}`);return new nr({address:e.address,amount:e.amount,amountWithoutPendingRewards:e["amount-without-pending-rewards"],minBalance:e["min-balance"],pendingRewards:e["pending-rewards"],rewards:e.rewards,round:e.round,status:e.status,totalAppsOptedIn:e["total-apps-opted-in"],totalAssetsOptedIn:e["total-assets-opted-in"],totalCreatedApps:e["total-created-apps"],totalCreatedAssets:e["total-created-assets"],appsLocalState:typeof e["apps-local-state"]<"u"?e["apps-local-state"].map(Lt.from_obj_for_encoding):void 0,appsTotalExtraPages:e["apps-total-extra-pages"],appsTotalSchema:typeof e["apps-total-schema"]<"u"?ot.from_obj_for_encoding(e["apps-total-schema"]):void 0,assets:typeof e.assets<"u"?e.assets.map(Ot.from_obj_for_encoding):void 0,authAddr:e["auth-addr"],createdApps:typeof e["created-apps"]<"u"?e["created-apps"].map(Bt.from_obj_for_encoding):void 0,createdAssets:typeof e["created-assets"]<"u"?e["created-assets"].map(ir.from_obj_for_encoding):void 0,participation:typeof e.participation<"u"?sr.from_obj_for_encoding(e.participation):void 0,rewardBase:e["reward-base"],sigType:e["sig-type"],totalBoxBytes:e["total-box-bytes"],totalBoxes:e["total-boxes"]})}}class dn extends P{constructor({round:e,appLocalState:t,createdApp:r}){super(),this.round=e,this.appLocalState=t,this.createdApp=r,this.attribute_map={round:"round",appLocalState:"app-local-state",createdApp:"created-app"}}static from_obj_for_encoding(e){if(typeof e.round>"u")throw new Error(`Response is missing required field 'round': ${e}`);return new dn({round:e.round,appLocalState:typeof e["app-local-state"]<"u"?Lt.from_obj_for_encoding(e["app-local-state"]):void 0,createdApp:typeof e["created-app"]<"u"?St.from_obj_for_encoding(e["created-app"]):void 0})}}class pn extends P{constructor({round:e,assetHolding:t,createdAsset:r}){super(),this.round=e,this.assetHolding=t,this.createdAsset=r,this.attribute_map={round:"round",assetHolding:"asset-holding",createdAsset:"created-asset"}}static from_obj_for_encoding(e){if(typeof e.round>"u")throw new Error(`Response is missing required field 'round': ${e}`);return new pn({round:e.round,assetHolding:typeof e["asset-holding"]<"u"?Ot.from_obj_for_encoding(e["asset-holding"]):void 0,createdAsset:typeof e["created-asset"]<"u"?Mt.from_obj_for_encoding(e["created-asset"]):void 0})}}class sr extends P{constructor({selectionParticipationKey:e,voteFirstValid:t,voteKeyDilution:r,voteLastValid:s,voteParticipationKey:o,stateProofKey:d}){super(),this.selectionParticipationKey=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.voteFirstValid=t,this.voteKeyDilution=r,this.voteLastValid=s,this.voteParticipationKey=typeof o=="string"?new Uint8Array(l.Buffer.from(o,"base64")):o,this.stateProofKey=typeof d=="string"?new Uint8Array(l.Buffer.from(d,"base64")):d,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"}}static from_obj_for_encoding(e){if(typeof e["selection-participation-key"]>"u")throw new Error(`Response is missing required field 'selection-participation-key': ${e}`);if(typeof e["vote-first-valid"]>"u")throw new Error(`Response is missing required field 'vote-first-valid': ${e}`);if(typeof e["vote-key-dilution"]>"u")throw new Error(`Response is missing required field 'vote-key-dilution': ${e}`);if(typeof e["vote-last-valid"]>"u")throw new Error(`Response is missing required field 'vote-last-valid': ${e}`);if(typeof e["vote-participation-key"]>"u")throw new Error(`Response is missing required field 'vote-participation-key': ${e}`);return new sr({selectionParticipationKey:e["selection-participation-key"],voteFirstValid:e["vote-first-valid"],voteKeyDilution:e["vote-key-dilution"],voteLastValid:e["vote-last-valid"],voteParticipationKey:e["vote-participation-key"],stateProofKey:e["state-proof-key"]})}}class $t extends P{constructor({address:e,delta:t}){super(),this.address=e,this.delta=t,this.attribute_map={address:"address",delta:"delta"}}static from_obj_for_encoding(e){if(typeof e.address>"u")throw new Error(`Response is missing required field 'address': ${e}`);if(!Array.isArray(e.delta))throw new Error(`Response is missing required array field 'delta': ${e}`);return new $t({address:e.address,delta:e.delta.map(kt.from_obj_for_encoding)})}}class Bt extends P{constructor({id:e,params:t}){super(),this.id=e,this.params=t,this.attribute_map={id:"id",params:"params"}}static from_obj_for_encoding(e){if(typeof e.id>"u")throw new Error(`Response is missing required field 'id': ${e}`);if(typeof e.params>"u")throw new Error(`Response is missing required field 'params': ${e}`);return new Bt({id:e.id,params:St.from_obj_for_encoding(e.params)})}}class Lt extends P{constructor({id:e,schema:t,keyValue:r}){super(),this.id=e,this.schema=t,this.keyValue=r,this.attribute_map={id:"id",schema:"schema",keyValue:"key-value"}}static from_obj_for_encoding(e){if(typeof e.id>"u")throw new Error(`Response is missing required field 'id': ${e}`);if(typeof e.schema>"u")throw new Error(`Response is missing required field 'schema': ${e}`);return new Lt({id:e.id,schema:ot.from_obj_for_encoding(e.schema),keyValue:typeof e["key-value"]<"u"?e["key-value"].map(Kt.from_obj_for_encoding):void 0})}}class St extends P{constructor({approvalProgram:e,clearStateProgram:t,creator:r,extraProgramPages:s,globalState:o,globalStateSchema:d,localStateSchema:w}){super(),this.approvalProgram=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.clearStateProgram=typeof t=="string"?new Uint8Array(l.Buffer.from(t,"base64")):t,this.creator=r,this.extraProgramPages=s,this.globalState=o,this.globalStateSchema=d,this.localStateSchema=w,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"}}static from_obj_for_encoding(e){if(typeof e["approval-program"]>"u")throw new Error(`Response is missing required field 'approval-program': ${e}`);if(typeof e["clear-state-program"]>"u")throw new Error(`Response is missing required field 'clear-state-program': ${e}`);if(typeof e.creator>"u")throw new Error(`Response is missing required field 'creator': ${e}`);return new St({approvalProgram:e["approval-program"],clearStateProgram:e["clear-state-program"],creator:e.creator,extraProgramPages:e["extra-program-pages"],globalState:typeof e["global-state"]<"u"?e["global-state"].map(Kt.from_obj_for_encoding):void 0,globalStateSchema:typeof e["global-state-schema"]<"u"?ot.from_obj_for_encoding(e["global-state-schema"]):void 0,localStateSchema:typeof e["local-state-schema"]<"u"?ot.from_obj_for_encoding(e["local-state-schema"]):void 0})}}class ot extends P{constructor({numUint:e,numByteSlice:t}){super(),this.numUint=e,this.numByteSlice=t,this.attribute_map={numUint:"num-uint",numByteSlice:"num-byte-slice"}}static from_obj_for_encoding(e){if(typeof e["num-uint"]>"u")throw new Error(`Response is missing required field 'num-uint': ${e}`);if(typeof e["num-byte-slice"]>"u")throw new Error(`Response is missing required field 'num-byte-slice': ${e}`);return new ot({numUint:e["num-uint"],numByteSlice:e["num-byte-slice"]})}}class ir extends P{constructor({index:e,params:t}){super(),this.index=e,this.params=t,this.attribute_map={index:"index",params:"params"}}static from_obj_for_encoding(e){if(typeof e.index>"u")throw new Error(`Response is missing required field 'index': ${e}`);if(typeof e.params>"u")throw new Error(`Response is missing required field 'params': ${e}`);return new ir({index:e.index,params:Mt.from_obj_for_encoding(e.params)})}}class Ot extends P{constructor({amount:e,assetId:t,isFrozen:r}){super(),this.amount=e,this.assetId=t,this.isFrozen=r,this.attribute_map={amount:"amount",assetId:"asset-id",isFrozen:"is-frozen"}}static from_obj_for_encoding(e){if(typeof e.amount>"u")throw new Error(`Response is missing required field 'amount': ${e}`);if(typeof e["asset-id"]>"u")throw new Error(`Response is missing required field 'asset-id': ${e}`);if(typeof e["is-frozen"]>"u")throw new Error(`Response is missing required field 'is-frozen': ${e}`);return new Ot({amount:e.amount,assetId:e["asset-id"],isFrozen:e["is-frozen"]})}}class Mt extends P{constructor({creator:e,decimals:t,total:r,clawback:s,defaultFrozen:o,freeze:d,manager:w,metadataHash:E,name:C,nameB64:_,reserve:N,unitName:ne,unitNameB64:oe,url:J,urlB64:se}){super(),this.creator=e,this.decimals=t,this.total=r,this.clawback=s,this.defaultFrozen=o,this.freeze=d,this.manager=w,this.metadataHash=typeof E=="string"?new Uint8Array(l.Buffer.from(E,"base64")):E,this.name=C,this.nameB64=typeof _=="string"?new Uint8Array(l.Buffer.from(_,"base64")):_,this.reserve=N,this.unitName=ne,this.unitNameB64=typeof oe=="string"?new Uint8Array(l.Buffer.from(oe,"base64")):oe,this.url=J,this.urlB64=typeof se=="string"?new Uint8Array(l.Buffer.from(se,"base64")):se,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"}}static from_obj_for_encoding(e){if(typeof e.creator>"u")throw new Error(`Response is missing required field 'creator': ${e}`);if(typeof e.decimals>"u")throw new Error(`Response is missing required field 'decimals': ${e}`);if(typeof e.total>"u")throw new Error(`Response is missing required field 'total': ${e}`);return new Mt({creator:e.creator,decimals:e.decimals,total:e.total,clawback:e.clawback,defaultFrozen:e["default-frozen"],freeze:e.freeze,manager:e.manager,metadataHash:e["metadata-hash"],name:e.name,nameB64:e["name-b64"],reserve:e.reserve,unitName:e["unit-name"],unitNameB64:e["unit-name-b64"],url:e.url,urlB64:e["url-b64"]})}}class gn extends P{constructor({blockhash:e}){super(),this.blockhash=e,this.attribute_map={blockhash:"blockHash"}}static from_obj_for_encoding(e){if(typeof e.blockHash>"u")throw new Error(`Response is missing required field 'blockHash': ${e}`);return new gn({blockhash:e.blockHash})}}class mn extends P{constructor({block:e,cert:t}){super(),this.block=e,this.cert=t,this.attribute_map={block:"block",cert:"cert"}}static from_obj_for_encoding(e){if(typeof e.block>"u")throw new Error(`Response is missing required field 'block': ${e}`);return new mn({block:e.block,cert:e.cert})}}class or extends P{constructor({name:e,value:t}){super(),this.name=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.value=typeof t=="string"?new Uint8Array(l.Buffer.from(t,"base64")):t,this.attribute_map={name:"name",value:"value"}}static from_obj_for_encoding(e){if(typeof e.name>"u")throw new Error(`Response is missing required field 'name': ${e}`);if(typeof e.value>"u")throw new Error(`Response is missing required field 'value': ${e}`);return new or({name:e.name,value:e.value})}}class ar extends P{constructor({name:e}){super(),this.name=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.attribute_map={name:"name"}}static from_obj_for_encoding(e){if(typeof e.name>"u")throw new Error(`Response is missing required field 'name': ${e}`);return new ar({name:e.name})}}class ur extends P{constructor({boxes:e}){super(),this.boxes=e,this.attribute_map={boxes:"boxes"}}static from_obj_for_encoding(e){if(!Array.isArray(e.boxes))throw new Error(`Response is missing required array field 'boxes': ${e}`);return new ur({boxes:e.boxes.map(ar.from_obj_for_encoding)})}}class cr extends P{constructor({branch:e,buildNumber:t,channel:r,commitHash:s,major:o,minor:d}){super(),this.branch=e,this.buildNumber=t,this.channel=r,this.commitHash=s,this.major=o,this.minor=d,this.attribute_map={branch:"branch",buildNumber:"build_number",channel:"channel",commitHash:"commit_hash",major:"major",minor:"minor"}}static from_obj_for_encoding(e){if(typeof e.branch>"u")throw new Error(`Response is missing required field 'branch': ${e}`);if(typeof e.build_number>"u")throw new Error(`Response is missing required field 'build_number': ${e}`);if(typeof e.channel>"u")throw new Error(`Response is missing required field 'channel': ${e}`);if(typeof e.commit_hash>"u")throw new Error(`Response is missing required field 'commit_hash': ${e}`);if(typeof e.major>"u")throw new Error(`Response is missing required field 'major': ${e}`);if(typeof e.minor>"u")throw new Error(`Response is missing required field 'minor': ${e}`);return new cr({branch:e.branch,buildNumber:e.build_number,channel:e.channel,commitHash:e.commit_hash,major:e.major,minor:e.minor})}}class yn extends P{constructor({hash:e,result:t,sourcemap:r}){super(),this.hash=e,this.result=t,this.sourcemap=r,this.attribute_map={hash:"hash",result:"result",sourcemap:"sourcemap"}}static from_obj_for_encoding(e){if(typeof e.hash>"u")throw new Error(`Response is missing required field 'hash': ${e}`);if(typeof e.result>"u")throw new Error(`Response is missing required field 'result': ${e}`);return new yn({hash:e.hash,result:e.result,sourcemap:e.sourcemap})}}class wn extends P{constructor({result:e}){super(),this.result=e,this.attribute_map={result:"result"}}static from_obj_for_encoding(e){if(typeof e.result>"u")throw new Error(`Response is missing required field 'result': ${e}`);return new wn({result:e.result})}}class fr extends P{constructor({accounts:e,apps:t,latestTimestamp:r,protocolVersion:s,round:o,sources:d,txns:w}){super(),this.accounts=e,this.apps=t,this.latestTimestamp=r,this.protocolVersion=s,this.round=o,this.sources=d,this.txns=w,this.attribute_map={accounts:"accounts",apps:"apps",latestTimestamp:"latest-timestamp",protocolVersion:"protocol-version",round:"round",sources:"sources",txns:"txns"}}static from_obj_for_encoding(e){if(!Array.isArray(e.accounts))throw new Error(`Response is missing required array field 'accounts': ${e}`);if(!Array.isArray(e.apps))throw new Error(`Response is missing required array field 'apps': ${e}`);if(typeof e["latest-timestamp"]>"u")throw new Error(`Response is missing required field 'latest-timestamp': ${e}`);if(typeof e["protocol-version"]>"u")throw new Error(`Response is missing required field 'protocol-version': ${e}`);if(typeof e.round>"u")throw new Error(`Response is missing required field 'round': ${e}`);if(!Array.isArray(e.sources))throw new Error(`Response is missing required array field 'sources': ${e}`);if(!Array.isArray(e.txns))throw new Error(`Response is missing required array field 'txns': ${e}`);return new fr({accounts:e.accounts.map(nr.from_obj_for_encoding),apps:e.apps.map(Bt.from_obj_for_encoding),latestTimestamp:e["latest-timestamp"],protocolVersion:e["protocol-version"],round:e.round,sources:e.sources.map(lr.from_obj_for_encoding),txns:e.txns})}}class bn extends P{constructor({error:e,protocolVersion:t,txns:r}){super(),this.error=e,this.protocolVersion=t,this.txns=r,this.attribute_map={error:"error",protocolVersion:"protocol-version",txns:"txns"}}static from_obj_for_encoding(e){if(typeof e.error>"u")throw new Error(`Response is missing required field 'error': ${e}`);if(typeof e["protocol-version"]>"u")throw new Error(`Response is missing required field 'protocol-version': ${e}`);if(!Array.isArray(e.txns))throw new Error(`Response is missing required array field 'txns': ${e}`);return new bn({error:e.error,protocolVersion:e["protocol-version"],txns:e.txns.map(hr.from_obj_for_encoding)})}}class lr extends P{constructor({fieldName:e,source:t,txnIndex:r,appIndex:s}){super(),this.fieldName=e,this.source=t,this.txnIndex=r,this.appIndex=s,this.attribute_map={fieldName:"field-name",source:"source",txnIndex:"txn-index",appIndex:"app-index"}}static from_obj_for_encoding(e){if(typeof e["field-name"]>"u")throw new Error(`Response is missing required field 'field-name': ${e}`);if(typeof e.source>"u")throw new Error(`Response is missing required field 'source': ${e}`);if(typeof e["txn-index"]>"u")throw new Error(`Response is missing required field 'txn-index': ${e}`);if(typeof e["app-index"]>"u")throw new Error(`Response is missing required field 'app-index': ${e}`);return new lr({fieldName:e["field-name"],source:e.source,txnIndex:e["txn-index"],appIndex:e["app-index"]})}}class Nt extends P{constructor({line:e,pc:t,stack:r,error:s,scratch:o}){super(),this.line=e,this.pc=t,this.stack=r,this.error=s,this.scratch=o,this.attribute_map={line:"line",pc:"pc",stack:"stack",error:"error",scratch:"scratch"}}static from_obj_for_encoding(e){if(typeof e.line>"u")throw new Error(`Response is missing required field 'line': ${e}`);if(typeof e.pc>"u")throw new Error(`Response is missing required field 'pc': ${e}`);if(!Array.isArray(e.stack))throw new Error(`Response is missing required array field 'stack': ${e}`);return new Nt({line:e.line,pc:e.pc,stack:e.stack.map(It.from_obj_for_encoding),error:e.error,scratch:typeof e.scratch<"u"?e.scratch.map(It.from_obj_for_encoding):void 0})}}class hr extends P{constructor({disassembly:e,appCallMessages:t,appCallTrace:r,budgetAdded:s,budgetConsumed:o,globalDelta:d,localDeltas:w,logicSigDisassembly:E,logicSigMessages:C,logicSigTrace:_,logs:N}){super(),this.disassembly=e,this.appCallMessages=t,this.appCallTrace=r,this.budgetAdded=s,this.budgetConsumed=o,this.globalDelta=d,this.localDeltas=w,this.logicSigDisassembly=E,this.logicSigMessages=C,this.logicSigTrace=_,this.logs=N,this.attribute_map={disassembly:"disassembly",appCallMessages:"app-call-messages",appCallTrace:"app-call-trace",budgetAdded:"budget-added",budgetConsumed:"budget-consumed",globalDelta:"global-delta",localDeltas:"local-deltas",logicSigDisassembly:"logic-sig-disassembly",logicSigMessages:"logic-sig-messages",logicSigTrace:"logic-sig-trace",logs:"logs"}}static from_obj_for_encoding(e){if(!Array.isArray(e.disassembly))throw new Error(`Response is missing required array field 'disassembly': ${e}`);return new hr({disassembly:e.disassembly,appCallMessages:e["app-call-messages"],appCallTrace:typeof e["app-call-trace"]<"u"?e["app-call-trace"].map(Nt.from_obj_for_encoding):void 0,budgetAdded:e["budget-added"],budgetConsumed:e["budget-consumed"],globalDelta:typeof e["global-delta"]<"u"?e["global-delta"].map(kt.from_obj_for_encoding):void 0,localDeltas:typeof e["local-deltas"]<"u"?e["local-deltas"].map($t.from_obj_for_encoding):void 0,logicSigDisassembly:e["logic-sig-disassembly"],logicSigMessages:e["logic-sig-messages"],logicSigTrace:typeof e["logic-sig-trace"]<"u"?e["logic-sig-trace"].map(Nt.from_obj_for_encoding):void 0,logs:e.logs})}}class xn extends P{constructor({message:e,data:t}){super(),this.message=e,this.data=t,this.attribute_map={message:"message",data:"data"}}static from_obj_for_encoding(e){if(typeof e.message>"u")throw new Error(`Response is missing required field 'message': ${e}`);return new xn({message:e.message,data:e.data})}}class dr extends P{constructor({action:e,bytes:t,uint:r}){super(),this.action=e,this.bytes=t,this.uint=r,this.attribute_map={action:"action",bytes:"bytes",uint:"uint"}}static from_obj_for_encoding(e){if(typeof e.action>"u")throw new Error(`Response is missing required field 'action': ${e}`);return new dr({action:e.action,bytes:e.bytes,uint:e.uint})}}class kt extends P{constructor({key:e,value:t}){super(),this.key=e,this.value=t,this.attribute_map={key:"key",value:"value"}}static from_obj_for_encoding(e){if(typeof e.key>"u")throw new Error(`Response is missing required field 'key': ${e}`);if(typeof e.value>"u")throw new Error(`Response is missing required field 'value': ${e}`);return new kt({key:e.key,value:dr.from_obj_for_encoding(e.value)})}}class An extends P{constructor({index:e,proof:t,treedepth:r}){super(),this.index=e,this.proof=typeof t=="string"?new Uint8Array(l.Buffer.from(t,"base64")):t,this.treedepth=r,this.attribute_map={index:"index",proof:"proof",treedepth:"treedepth"}}static from_obj_for_encoding(e){if(typeof e.index>"u")throw new Error(`Response is missing required field 'index': ${e}`);if(typeof e.proof>"u")throw new Error(`Response is missing required field 'proof': ${e}`);if(typeof e.treedepth>"u")throw new Error(`Response is missing required field 'treedepth': ${e}`);return new An({index:e.index,proof:e.proof,treedepth:e.treedepth})}}class Fn extends P{constructor({catchupTime:e,lastRound:t,lastVersion:r,nextVersion:s,nextVersionRound:o,nextVersionSupported:d,stoppedAtUnsupportedRound:w,timeSinceLastRound:E,catchpoint:C,catchpointAcquiredBlocks:_,catchpointProcessedAccounts:N,catchpointProcessedKvs:ne,catchpointTotalAccounts:oe,catchpointTotalBlocks:J,catchpointTotalKvs:se,catchpointVerifiedAccounts:qe,catchpointVerifiedKvs:Ve,lastCatchpoint:tt}){super(),this.catchupTime=e,this.lastRound=t,this.lastVersion=r,this.nextVersion=s,this.nextVersionRound=o,this.nextVersionSupported=d,this.stoppedAtUnsupportedRound=w,this.timeSinceLastRound=E,this.catchpoint=C,this.catchpointAcquiredBlocks=_,this.catchpointProcessedAccounts=N,this.catchpointProcessedKvs=ne,this.catchpointTotalAccounts=oe,this.catchpointTotalBlocks=J,this.catchpointTotalKvs=se,this.catchpointVerifiedAccounts=qe,this.catchpointVerifiedKvs=Ve,this.lastCatchpoint=tt,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",catchpointProcessedKvs:"catchpoint-processed-kvs",catchpointTotalAccounts:"catchpoint-total-accounts",catchpointTotalBlocks:"catchpoint-total-blocks",catchpointTotalKvs:"catchpoint-total-kvs",catchpointVerifiedAccounts:"catchpoint-verified-accounts",catchpointVerifiedKvs:"catchpoint-verified-kvs",lastCatchpoint:"last-catchpoint"}}static from_obj_for_encoding(e){if(typeof e["catchup-time"]>"u")throw new Error(`Response is missing required field 'catchup-time': ${e}`);if(typeof e["last-round"]>"u")throw new Error(`Response is missing required field 'last-round': ${e}`);if(typeof e["last-version"]>"u")throw new Error(`Response is missing required field 'last-version': ${e}`);if(typeof e["next-version"]>"u")throw new Error(`Response is missing required field 'next-version': ${e}`);if(typeof e["next-version-round"]>"u")throw new Error(`Response is missing required field 'next-version-round': ${e}`);if(typeof e["next-version-supported"]>"u")throw new Error(`Response is missing required field 'next-version-supported': ${e}`);if(typeof e["stopped-at-unsupported-round"]>"u")throw new Error(`Response is missing required field 'stopped-at-unsupported-round': ${e}`);if(typeof e["time-since-last-round"]>"u")throw new Error(`Response is missing required field 'time-since-last-round': ${e}`);return new Fn({catchupTime:e["catchup-time"],lastRound:e["last-round"],lastVersion:e["last-version"],nextVersion:e["next-version"],nextVersionRound:e["next-version-round"],nextVersionSupported:e["next-version-supported"],stoppedAtUnsupportedRound:e["stopped-at-unsupported-round"],timeSinceLastRound:e["time-since-last-round"],catchpoint:e.catchpoint,catchpointAcquiredBlocks:e["catchpoint-acquired-blocks"],catchpointProcessedAccounts:e["catchpoint-processed-accounts"],catchpointProcessedKvs:e["catchpoint-processed-kvs"],catchpointTotalAccounts:e["catchpoint-total-accounts"],catchpointTotalBlocks:e["catchpoint-total-blocks"],catchpointTotalKvs:e["catchpoint-total-kvs"],catchpointVerifiedAccounts:e["catchpoint-verified-accounts"],catchpointVerifiedKvs:e["catchpoint-verified-kvs"],lastCatchpoint:e["last-catchpoint"]})}}class pr extends P{constructor({poolError:e,txn:t,applicationIndex:r,assetClosingAmount:s,assetIndex:o,closeRewards:d,closingAmount:w,confirmedRound:E,globalStateDelta:C,innerTxns:_,localStateDelta:N,logs:ne,receiverRewards:oe,senderRewards:J}){super(),this.poolError=e,this.txn=t,this.applicationIndex=r,this.assetClosingAmount=s,this.assetIndex=o,this.closeRewards=d,this.closingAmount=w,this.confirmedRound=E,this.globalStateDelta=C,this.innerTxns=_,this.localStateDelta=N,this.logs=ne,this.receiverRewards=oe,this.senderRewards=J,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"}}static from_obj_for_encoding(e){if(typeof e["pool-error"]>"u")throw new Error(`Response is missing required field 'pool-error': ${e}`);if(typeof e.txn>"u")throw new Error(`Response is missing required field 'txn': ${e}`);return new pr({poolError:e["pool-error"],txn:e.txn,applicationIndex:e["application-index"],assetClosingAmount:e["asset-closing-amount"],assetIndex:e["asset-index"],closeRewards:e["close-rewards"],closingAmount:e["closing-amount"],confirmedRound:e["confirmed-round"],globalStateDelta:typeof e["global-state-delta"]<"u"?e["global-state-delta"].map(kt.from_obj_for_encoding):void 0,innerTxns:typeof e["inner-txns"]<"u"?e["inner-txns"].map(pr.from_obj_for_encoding):void 0,localStateDelta:typeof e["local-state-delta"]<"u"?e["local-state-delta"].map($t.from_obj_for_encoding):void 0,logs:e.logs,receiverRewards:e["receiver-rewards"],senderRewards:e["sender-rewards"]})}}class vn extends P{constructor({topTransactions:e,totalTransactions:t}){super(),this.topTransactions=e,this.totalTransactions=t,this.attribute_map={topTransactions:"top-transactions",totalTransactions:"total-transactions"}}static from_obj_for_encoding(e){if(!Array.isArray(e["top-transactions"]))throw new Error(`Response is missing required array field 'top-transactions': ${e}`);if(typeof e["total-transactions"]>"u")throw new Error(`Response is missing required field 'total-transactions': ${e}`);return new vn({topTransactions:e["top-transactions"],totalTransactions:e["total-transactions"]})}}class _n extends P{constructor({txid:e}){super(),this.txid=e,this.attribute_map={txid:"txId"}}static from_obj_for_encoding(e){if(typeof e.txId>"u")throw new Error(`Response is missing required field 'txId': ${e}`);return new _n({txid:e.txId})}}class En extends P{constructor({message:e,stateproof:t}){super(),this.message=e,this.stateproof=typeof t=="string"?new Uint8Array(l.Buffer.from(t,"base64")):t,this.attribute_map={message:"Message",stateproof:"StateProof"}}static from_obj_for_encoding(e){if(typeof e.Message>"u")throw new Error(`Response is missing required field 'Message': ${e}`);if(typeof e.StateProof>"u")throw new Error(`Response is missing required field 'StateProof': ${e}`);return new En({message:gr.from_obj_for_encoding(e.Message),stateproof:e.StateProof})}}class gr extends P{constructor({blockheaderscommitment:e,firstattestedround:t,lastattestedround:r,lnprovenweight:s,voterscommitment:o}){super(),this.blockheaderscommitment=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.firstattestedround=t,this.lastattestedround=r,this.lnprovenweight=s,this.voterscommitment=typeof o=="string"?new Uint8Array(l.Buffer.from(o,"base64")):o,this.attribute_map={blockheaderscommitment:"BlockHeadersCommitment",firstattestedround:"FirstAttestedRound",lastattestedround:"LastAttestedRound",lnprovenweight:"LnProvenWeight",voterscommitment:"VotersCommitment"}}static from_obj_for_encoding(e){if(typeof e.BlockHeadersCommitment>"u")throw new Error(`Response is missing required field 'BlockHeadersCommitment': ${e}`);if(typeof e.FirstAttestedRound>"u")throw new Error(`Response is missing required field 'FirstAttestedRound': ${e}`);if(typeof e.LastAttestedRound>"u")throw new Error(`Response is missing required field 'LastAttestedRound': ${e}`);if(typeof e.LnProvenWeight>"u")throw new Error(`Response is missing required field 'LnProvenWeight': ${e}`);if(typeof e.VotersCommitment>"u")throw new Error(`Response is missing required field 'VotersCommitment': ${e}`);return new gr({blockheaderscommitment:e.BlockHeadersCommitment,firstattestedround:e.FirstAttestedRound,lastattestedround:e.LastAttestedRound,lnprovenweight:e.LnProvenWeight,voterscommitment:e.VotersCommitment})}}class Tn extends P{constructor({currentRound:e,onlineMoney:t,totalMoney:r}){super(),this.currentRound=e,this.onlineMoney=t,this.totalMoney=r,this.attribute_map={currentRound:"current_round",onlineMoney:"online-money",totalMoney:"total-money"}}static from_obj_for_encoding(e){if(typeof e.current_round>"u")throw new Error(`Response is missing required field 'current_round': ${e}`);if(typeof e["online-money"]>"u")throw new Error(`Response is missing required field 'online-money': ${e}`);if(typeof e["total-money"]>"u")throw new Error(`Response is missing required field 'total-money': ${e}`);return new Tn({currentRound:e.current_round,onlineMoney:e["online-money"],totalMoney:e["total-money"]})}}class Kt extends P{constructor({key:e,value:t}){super(),this.key=e,this.value=t,this.attribute_map={key:"key",value:"value"}}static from_obj_for_encoding(e){if(typeof e.key>"u")throw new Error(`Response is missing required field 'key': ${e}`);if(typeof e.value>"u")throw new Error(`Response is missing required field 'value': ${e}`);return new Kt({key:e.key,value:It.from_obj_for_encoding(e.value)})}}class It extends P{constructor({type:e,bytes:t,uint:r}){super(),this.type=e,this.bytes=t,this.uint=r,this.attribute_map={type:"type",bytes:"bytes",uint:"uint"}}static from_obj_for_encoding(e){if(typeof e.type>"u")throw new Error(`Response is missing required field 'type': ${e}`);if(typeof e.bytes>"u")throw new Error(`Response is missing required field 'bytes': ${e}`);if(typeof e.uint>"u")throw new Error(`Response is missing required field 'uint': ${e}`);return new It({type:e.type,bytes:e.bytes,uint:e.uint})}}class Rn extends P{constructor({consensusVersion:e,fee:t,genesisHash:r,genesisId:s,lastRound:o,minFee:d}){super(),this.consensusVersion=e,this.fee=t,this.genesisHash=typeof r=="string"?new Uint8Array(l.Buffer.from(r,"base64")):r,this.genesisId=s,this.lastRound=o,this.minFee=d,this.attribute_map={consensusVersion:"consensus-version",fee:"fee",genesisHash:"genesis-hash",genesisId:"genesis-id",lastRound:"last-round",minFee:"min-fee"}}static from_obj_for_encoding(e){if(typeof e["consensus-version"]>"u")throw new Error(`Response is missing required field 'consensus-version': ${e}`);if(typeof e.fee>"u")throw new Error(`Response is missing required field 'fee': ${e}`);if(typeof e["genesis-hash"]>"u")throw new Error(`Response is missing required field 'genesis-hash': ${e}`);if(typeof e["genesis-id"]>"u")throw new Error(`Response is missing required field 'genesis-id': ${e}`);if(typeof e["last-round"]>"u")throw new Error(`Response is missing required field 'last-round': ${e}`);if(typeof e["min-fee"]>"u")throw new Error(`Response is missing required field 'min-fee': ${e}`);return new Rn({consensusVersion:e["consensus-version"],fee:e.fee,genesisHash:e["genesis-hash"],genesisId:e["genesis-id"],lastRound:e["last-round"],minFee:e["min-fee"]})}}class Bn extends P{constructor({idx:e,proof:t,stibhash:r,treedepth:s,hashtype:o}){super(),this.idx=e,this.proof=typeof t=="string"?new Uint8Array(l.Buffer.from(t,"base64")):t,this.stibhash=typeof r=="string"?new Uint8Array(l.Buffer.from(r,"base64")):r,this.treedepth=s,this.hashtype=o,this.attribute_map={idx:"idx",proof:"proof",stibhash:"stibhash",treedepth:"treedepth",hashtype:"hashtype"}}static from_obj_for_encoding(e){if(typeof e.idx>"u")throw new Error(`Response is missing required field 'idx': ${e}`);if(typeof e.proof>"u")throw new Error(`Response is missing required field 'proof': ${e}`);if(typeof e.stibhash>"u")throw new Error(`Response is missing required field 'stibhash': ${e}`);if(typeof e.treedepth>"u")throw new Error(`Response is missing required field 'treedepth': ${e}`);return new Bn({idx:e.idx,proof:e.proof,stibhash:e.stibhash,treedepth:e.treedepth,hashtype:e.hashtype})}}class Sn extends P{constructor({build:e,genesisHashB64:t,genesisId:r,versions:s}){super(),this.build=e,this.genesisHashB64=typeof t=="string"?new Uint8Array(l.Buffer.from(t,"base64")):t,this.genesisId=r,this.versions=s,this.attribute_map={build:"build",genesisHashB64:"genesis_hash_b64",genesisId:"genesis_id",versions:"versions"}}static from_obj_for_encoding(e){if(typeof e.build>"u")throw new Error(`Response is missing required field 'build': ${e}`);if(typeof e.genesis_hash_b64>"u")throw new Error(`Response is missing required field 'genesis_hash_b64': ${e}`);if(typeof e.genesis_id>"u")throw new Error(`Response is missing required field 'genesis_id': ${e}`);if(!Array.isArray(e.versions))throw new Error(`Response is missing required array field 'versions': ${e}`);return new Sn({build:cr.from_obj_for_encoding(e.build),genesisHashB64:e.genesis_hash_b64,genesisId:e.genesis_id,versions:e.versions})}}class yi extends ue{constructor(e,t,r,s){super(e,t),this.index=r,this.index=r;const o=l.Buffer.from(s).toString("base64");this.query.name=encodeURI(`b64:${o}`)}path(){return`/v2/applications/${this.index}/box`}prepare(e){return or.from_obj_for_encoding(e)}}class wi extends ue{constructor(e,t,r){super(e,t),this.index=r,this.index=r,this.query.max=0}path(){return`/v2/applications/${this.index}/boxes`}max(e){return this.query.max=e,this}prepare(e){return ur.from_obj_for_encoding(e)}}class bi extends ue{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 xi extends ue{constructor(e,t){super(e),this.txid=t,this.txid=t,this.query.format="msgpack"}prepare(e){if(e&&e.byteLength>0)return u(e)}path(){return`/v2/transactions/pending/${this.txid}`}max(e){return this.query.max=e,this}}class Ai extends ue{constructor(e){super(e),this.query.format="msgpack"}path(){return"/v2/transactions/pending"}prepare(e){if(e&&e.byteLength>0)return u(e)}max(e){return this.query.max=e,this}}class Fi extends ue{constructor(e,t){super(e),this.address=t,this.address=t,this.query.format="msgpack"}prepare(e){if(e&&e.byteLength>0)return u(e)}path(){return`/v2/accounts/${this.address}/transactions/pending`}max(e){return this.query.max=e,this}}class vi extends ue{constructor(e,t,r,s){super(e,t),this.round=r,this.txID=s,this.round=r,this.txID=s}path(){return`/v2/blocks/${this.round}/transactions/${this.txID}/proof`}hashType(e){return this.query.hashtype=e,this}}function _i(n={}){let e=n;return Object.keys(e).every(t=>t.toLowerCase()!=="content-type")&&(e={...n},e["Content-Type"]="application/x-binary"),e}function cs(n){return n&&n.byteLength!==void 0}class Ei extends ue{constructor(e,t){super(e);let r=t;if(Array.isArray(t)){if(!t.every(cs))throw new TypeError("Array elements must be byte arrays");r=R(...t)}else if(!cs(r))throw new TypeError("Argument must be byte array");this.txnBytesToPost=r}path(){return"/v2/transactions"}async do(e={}){const t=_i(e);return(await this.c.post(this.path(),l.Buffer.from(this.txnBytesToPost),t)).body}}class Ti extends ue{path(){return"/v2/status"}}class Ri extends ue{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 Bi extends ue{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 Si extends ue{path(){return"/v2/ledger/supply"}}class ki extends ue{path(){return"/versions"}}class Ii extends ue{constructor(e,t,r){super(e,t),this.round=r,this.round=r}path(){return`/v2/blocks/${this.round}/lightheader/proof`}}class Di extends ue{constructor(e,t,r){super(e,t),this.round=r,this.round=r}path(){return`/v2/stateproofs/${this.round}`}}function Ui(n={}){let e=n;return Object.keys(e).every(t=>t.toLowerCase()!=="content-type")&&(e={...n},e["Content-Type"]="text/plain"),e}class Ci extends ue{constructor(e,t){super(e),this.source=t,this.source=t}path(){return"/v2/teal/disassemble"}async do(e={}){const t=Ui(e);return(await this.c.post(this.path(),l.Buffer.from(this.source),t,this.query)).body}}class ji extends ln{constructor(e,t,r,s={}){super("X-Algo-API-Token",e,t,r,s)}healthCheck(){return new bi(this.c)}versionsCheck(){return new ki(this.c)}sendRawTransaction(e){return new Ei(this.c,e)}accountInformation(e){return new oi(this.c,this.intDecoding,e)}accountAssetInformation(e,t){return new ai(this.c,this.intDecoding,e,t)}accountApplicationInformation(e,t){return new ui(this.c,this.intDecoding,e,t)}block(e){return new ci(this.c,e)}getBlockHash(e){return new gi(this.c,this.intDecoding,e)}pendingTransactionInformation(e){return new xi(this.c,e)}pendingTransactionsInformation(){return new Ai(this.c)}pendingTransactionByAddress(e){return new Fi(this.c,e)}status(){return new Ti(this.c,this.intDecoding)}statusAfterBlock(e){return new Ri(this.c,this.intDecoding,e)}getTransactionParams(){return new Bi(this.c)}supply(){return new Si(this.c,this.intDecoding)}compile(e){return new fi(this.c,e)}disassemble(e){return new Ci(this.c,e)}dryrun(e){return new li(this.c,e)}getAssetByID(e){return new di(this.c,this.intDecoding,e)}getApplicationByID(e){return new pi(this.c,this.intDecoding,e)}getApplicationBoxByName(e,t){return new yi(this.c,this.intDecoding,e,t)}getApplicationBoxes(e){return new wi(this.c,this.intDecoding,e)}genesis(){return new hi(this.c,this.intDecoding)}getTransactionProof(e,t){return new vi(this.c,this.intDecoding,e,t)}getLightBlockHeaderProof(e){return new Ii(this.c,this.intDecoding,e)}getStateProof(e){return new Di(this.c,this.intDecoding,e)}}class Pi extends ln{constructor(e,t="http://127.0.0.1",r=7833,s={}){super("X-KMD-API-Token",e,t,r,s)}async versions(){return(await this.c.get("/versions")).body}async listWallets(){return(await this.c.get("/v1/wallets")).body}async createWallet(e,t,r=new Uint8Array,s="sqlite"){const o={wallet_name:e,wallet_driver_name:s,wallet_password:t,master_derivation_key:l.Buffer.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 s={wallet_id:e,wallet_password:t,wallet_name:r};return(await this.c.post("/v1/wallet/rename",s)).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},s=await this.c.post("/v1/master-key/export",r);return{master_derivation_key:l.Buffer.from(s.body.master_derivation_key,"base64")}}async importKey(e,t){const r={wallet_handle_token:e,private_key:l.Buffer.from(t).toString("base64")};return(await this.c.post("/v1/key/import",r)).body}async exportKey(e,t,r){const s={wallet_handle_token:e,address:r,wallet_password:t},o=await this.c.post("/v1/key/export",s);return{private_key:l.Buffer.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 s={wallet_handle_token:e,address:r,wallet_password:t};return(await this.c.delete("/v1/key",s)).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 s=Re(r),o={wallet_handle_token:e,wallet_password:t,transaction:l.Buffer.from(s.toByte()).toString("base64")},d=await this.c.post("/v1/transaction/sign",o);return d.status===200?l.Buffer.from(d.body.signed_transaction,"base64"):d.body}async signTransactionWithSpecificPublicKey(e,t,r,s){const o=Re(r),d={wallet_handle_token:e,wallet_password:t,transaction:l.Buffer.from(o.toByte()).toString("base64"),public_key:l.Buffer.from(s).toString("base64")},w=await this.c.post("/v1/transaction/sign",d);return w.status===200?l.Buffer.from(w.body.signed_transaction,"base64"):w.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,s){const o={wallet_handle_token:e,multisig_version:t,threshold:r,pks:s};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,s,o){const d=Re(r),w={wallet_handle_token:e,transaction:l.Buffer.from(d.toByte()).toString("base64"),public_key:l.Buffer.from(s).toString("base64"),partial_multisig:o,wallet_password:t};return(await this.c.post("/v1/multisig/sign",w)).body}async deleteMultisig(e,t,r){const s={wallet_handle_token:e,address:r,wallet_password:t};return(await this.c.delete("/v1/multisig",s)).body}}class qi extends ue{path(){return"/health"}}class $i extends ue{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}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}}function kn(n){return typeof n=="string"?n:l.Buffer.from(n).toString("base64")}class Li extends ue{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"]=kn(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 Oi extends ue{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"]=kn(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}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 Mi extends ue{constructor(e,t,r){super(e,t),this.round=r,this.round=r}path(){return`/v2/blocks/${this.round}`}headerOnly(e){return this.query["header-only"]=e,this}}class Ni extends ue{constructor(e,t,r){super(e,t),this.txID=r,this.txID=r}path(){return`/v2/transactions/${this.txID}`}}class Ki extends ue{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}exclude(e){return this.query.exclude=e,this}}class zi extends ue{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}/assets`}limit(e){return this.query.limit=e,this}round(e){return this.query.round=e,this}nextToken(e){return this.query.next=e,this}includeAll(e=!0){return this.query["include-all"]=e,this}assetId(e){return this.query["asset-id"]=e,this}}class Gi extends ue{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}/created-assets`}limit(e){return this.query.limit=e,this}round(e){return this.query.round=e,this}nextToken(e){return this.query.next=e,this}includeAll(e=!0){return this.query["include-all"]=e,this}assetID(e){return this.query["asset-id"]=e,this}}class Hi extends ue{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}/apps-local-state`}limit(e){return this.query.limit=e,this}round(e){return this.query.round=e,this}nextToken(e){return this.query.next=e,this}includeAll(e=!0){return this.query["include-all"]=e,this}applicationID(e){return this.query["application-id"]=e,this}}class Vi extends ue{constructor(e,t,r){super(e,t),this.account=r,this.account=r}path(){return`/v2/accounts/${this.account}/created-applications`}limit(e){return this.query.limit=e,this}round(e){return this.query.round=e,this}nextToken(e){return this.query.next=e,this}includeAll(e=!0){return this.query["include-all"]=e,this}applicationID(e){return this.query["application-id"]=e,this}}class Wi extends ue{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 Ji extends ue{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 Xi extends ue{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 zt extends P{constructor({address:e,amount:t,amountWithoutPendingRewards:r,pendingRewards:s,rewards:o,round:d,status:w,totalAppsOptedIn:E,totalAssetsOptedIn:C,totalBoxBytes:_,totalBoxes:N,totalCreatedApps:ne,totalCreatedAssets:oe,appsLocalState:J,appsTotalExtraPages:se,appsTotalSchema:qe,assets:Ve,authAddr:tt,closedAtRound:Et,createdApps:Tt,createdAssets:Rt,createdAtRound:Ze,deleted:Qe,participation:gt,rewardBase:mt,sigType:yt}){super(),this.address=e,this.amount=t,this.amountWithoutPendingRewards=r,this.pendingRewards=s,this.rewards=o,this.round=d,this.status=w,this.totalAppsOptedIn=E,this.totalAssetsOptedIn=C,this.totalBoxBytes=_,this.totalBoxes=N,this.totalCreatedApps=ne,this.totalCreatedAssets=oe,this.appsLocalState=J,this.appsTotalExtraPages=se,this.appsTotalSchema=qe,this.assets=Ve,this.authAddr=tt,this.closedAtRound=Et,this.createdApps=Tt,this.createdAssets=Rt,this.createdAtRound=Ze,this.deleted=Qe,this.participation=gt,this.rewardBase=mt,this.sigType=yt,this.attribute_map={address:"address",amount:"amount",amountWithoutPendingRewards:"amount-without-pending-rewards",pendingRewards:"pending-rewards",rewards:"rewards",round:"round",status:"status",totalAppsOptedIn:"total-apps-opted-in",totalAssetsOptedIn:"total-assets-opted-in",totalBoxBytes:"total-box-bytes",totalBoxes:"total-boxes",totalCreatedApps:"total-created-apps",totalCreatedAssets:"total-created-assets",appsLocalState:"apps-local-state",appsTotalExtraPages:"apps-total-extra-pages",appsTotalSchema:"apps-total-schema",assets:"assets",authAddr:"auth-addr",closedAtRound:"closed-at-round",createdApps:"created-apps",createdAssets:"created-assets",createdAtRound:"created-at-round",deleted:"deleted",participation:"participation",rewardBase:"reward-base",sigType:"sig-type"}}static from_obj_for_encoding(e){if(typeof e.address>"u")throw new Error(`Response is missing required field 'address': ${e}`);if(typeof e.amount>"u")throw new Error(`Response is missing required field 'amount': ${e}`);if(typeof e["amount-without-pending-rewards"]>"u")throw new Error(`Response is missing required field 'amount-without-pending-rewards': ${e}`);if(typeof e["pending-rewards"]>"u")throw new Error(`Response is missing required field 'pending-rewards': ${e}`);if(typeof e.rewards>"u")throw new Error(`Response is missing required field 'rewards': ${e}`);if(typeof e.round>"u")throw new Error(`Response is missing required field 'round': ${e}`);if(typeof e.status>"u")throw new Error(`Response is missing required field 'status': ${e}`);if(typeof e["total-apps-opted-in"]>"u")throw new Error(`Response is missing required field 'total-apps-opted-in': ${e}`);if(typeof e["total-assets-opted-in"]>"u")throw new Error(`Response is missing required field 'total-assets-opted-in': ${e}`);if(typeof e["total-box-bytes"]>"u")throw new Error(`Response is missing required field 'total-box-bytes': ${e}`);if(typeof e["total-boxes"]>"u")throw new Error(`Response is missing required field 'total-boxes': ${e}`);if(typeof e["total-created-apps"]>"u")throw new Error(`Response is missing required field 'total-created-apps': ${e}`);if(typeof e["total-created-assets"]>"u")throw new Error(`Response is missing required field 'total-created-assets': ${e}`);return new zt({address:e.address,amount:e.amount,amountWithoutPendingRewards:e["amount-without-pending-rewards"],pendingRewards:e["pending-rewards"],rewards:e.rewards,round:e.round,status:e.status,totalAppsOptedIn:e["total-apps-opted-in"],totalAssetsOptedIn:e["total-assets-opted-in"],totalBoxBytes:e["total-box-bytes"],totalBoxes:e["total-boxes"],totalCreatedApps:e["total-created-apps"],totalCreatedAssets:e["total-created-assets"],appsLocalState:typeof e["apps-local-state"]<"u"?e["apps-local-state"].map(Gt.from_obj_for_encoding):void 0,appsTotalExtraPages:e["apps-total-extra-pages"],appsTotalSchema:typeof e["apps-total-schema"]<"u"?xt.from_obj_for_encoding(e["apps-total-schema"]):void 0,assets:typeof e.assets<"u"?e.assets.map(Ht.from_obj_for_encoding):void 0,authAddr:e["auth-addr"],closedAtRound:e["closed-at-round"],createdApps:typeof e["created-apps"]<"u"?e["created-apps"].map(Dt.from_obj_for_encoding):void 0,createdAssets:typeof e["created-assets"]<"u"?e["created-assets"].map(Ut.from_obj_for_encoding):void 0,createdAtRound:e["created-at-round"],deleted:e.deleted,participation:typeof e.participation<"u"?mr.from_obj_for_encoding(e.participation):void 0,rewardBase:e["reward-base"],sigType:e["sig-type"]})}}class mr extends P{constructor({selectionParticipationKey:e,voteFirstValid:t,voteKeyDilution:r,voteLastValid:s,voteParticipationKey:o,stateProofKey:d}){super(),this.selectionParticipationKey=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.voteFirstValid=t,this.voteKeyDilution=r,this.voteLastValid=s,this.voteParticipationKey=typeof o=="string"?new Uint8Array(l.Buffer.from(o,"base64")):o,this.stateProofKey=typeof d=="string"?new Uint8Array(l.Buffer.from(d,"base64")):d,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"}}static from_obj_for_encoding(e){if(typeof e["selection-participation-key"]>"u")throw new Error(`Response is missing required field 'selection-participation-key': ${e}`);if(typeof e["vote-first-valid"]>"u")throw new Error(`Response is missing required field 'vote-first-valid': ${e}`);if(typeof e["vote-key-dilution"]>"u")throw new Error(`Response is missing required field 'vote-key-dilution': ${e}`);if(typeof e["vote-last-valid"]>"u")throw new Error(`Response is missing required field 'vote-last-valid': ${e}`);if(typeof e["vote-participation-key"]>"u")throw new Error(`Response is missing required field 'vote-participation-key': ${e}`);return new mr({selectionParticipationKey:e["selection-participation-key"],voteFirstValid:e["vote-first-valid"],voteKeyDilution:e["vote-key-dilution"],voteLastValid:e["vote-last-valid"],voteParticipationKey:e["vote-participation-key"],stateProofKey:e["state-proof-key"]})}}class In extends P{constructor({account:e,currentRound:t}){super(),this.account=e,this.currentRound=t,this.attribute_map={account:"account",currentRound:"current-round"}}static from_obj_for_encoding(e){if(typeof e.account>"u")throw new Error(`Response is missing required field 'account': ${e}`);if(typeof e["current-round"]>"u")throw new Error(`Response is missing required field 'current-round': ${e}`);return new In({account:zt.from_obj_for_encoding(e.account),currentRound:e["current-round"]})}}class yr extends P{constructor({address:e,delta:t}){super(),this.address=e,this.delta=t,this.attribute_map={address:"address",delta:"delta"}}static from_obj_for_encoding(e){if(typeof e.address>"u")throw new Error(`Response is missing required field 'address': ${e}`);if(!Array.isArray(e.delta))throw new Error(`Response is missing required array field 'delta': ${e}`);return new yr({address:e.address,delta:e.delta.map(Wt.from_obj_for_encoding)})}}class Dn extends P{constructor({accounts:e,currentRound:t,nextToken:r}){super(),this.accounts=e,this.currentRound=t,this.nextToken=r,this.attribute_map={accounts:"accounts",currentRound:"current-round",nextToken:"next-token"}}static from_obj_for_encoding(e){if(!Array.isArray(e.accounts))throw new Error(`Response is missing required array field 'accounts': ${e}`);if(typeof e["current-round"]>"u")throw new Error(`Response is missing required field 'current-round': ${e}`);return new Dn({accounts:e.accounts.map(zt.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}class Dt extends P{constructor({id:e,params:t,createdAtRound:r,deleted:s,deletedAtRound:o}){super(),this.id=e,this.params=t,this.createdAtRound=r,this.deleted=s,this.deletedAtRound=o,this.attribute_map={id:"id",params:"params",createdAtRound:"created-at-round",deleted:"deleted",deletedAtRound:"deleted-at-round"}}static from_obj_for_encoding(e){if(typeof e.id>"u")throw new Error(`Response is missing required field 'id': ${e}`);if(typeof e.params>"u")throw new Error(`Response is missing required field 'params': ${e}`);return new Dt({id:e.id,params:br.from_obj_for_encoding(e.params),createdAtRound:e["created-at-round"],deleted:e.deleted,deletedAtRound:e["deleted-at-round"]})}}class Gt extends P{constructor({id:e,schema:t,closedOutAtRound:r,deleted:s,keyValue:o,optedInAtRound:d}){super(),this.id=e,this.schema=t,this.closedOutAtRound=r,this.deleted=s,this.keyValue=o,this.optedInAtRound=d,this.attribute_map={id:"id",schema:"schema",closedOutAtRound:"closed-out-at-round",deleted:"deleted",keyValue:"key-value",optedInAtRound:"opted-in-at-round"}}static from_obj_for_encoding(e){if(typeof e.id>"u")throw new Error(`Response is missing required field 'id': ${e}`);if(typeof e.schema>"u")throw new Error(`Response is missing required field 'schema': ${e}`);return new Gt({id:e.id,schema:xt.from_obj_for_encoding(e.schema),closedOutAtRound:e["closed-out-at-round"],deleted:e.deleted,keyValue:typeof e["key-value"]<"u"?e["key-value"].map(Xt.from_obj_for_encoding):void 0,optedInAtRound:e["opted-in-at-round"]})}}class Un extends P{constructor({appsLocalStates:e,currentRound:t,nextToken:r}){super(),this.appsLocalStates=e,this.currentRound=t,this.nextToken=r,this.attribute_map={appsLocalStates:"apps-local-states",currentRound:"current-round",nextToken:"next-token"}}static from_obj_for_encoding(e){if(!Array.isArray(e["apps-local-states"]))throw new Error(`Response is missing required array field 'apps-local-states': ${e}`);if(typeof e["current-round"]>"u")throw new Error(`Response is missing required field 'current-round': ${e}`);return new Un({appsLocalStates:e["apps-local-states"].map(Gt.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}class wr extends P{constructor({logs:e,txid:t}){super(),this.logs=e,this.txid=t,this.attribute_map={logs:"logs",txid:"txid"}}static from_obj_for_encoding(e){if(!Array.isArray(e.logs))throw new Error(`Response is missing required array field 'logs': ${e}`);if(typeof e.txid>"u")throw new Error(`Response is missing required field 'txid': ${e}`);return new wr({logs:e.logs,txid:e.txid})}}class Cn extends P{constructor({applicationId:e,currentRound:t,logData:r,nextToken:s}){super(),this.applicationId=e,this.currentRound=t,this.logData=r,this.nextToken=s,this.attribute_map={applicationId:"application-id",currentRound:"current-round",logData:"log-data",nextToken:"next-token"}}static from_obj_for_encoding(e){if(typeof e["application-id"]>"u")throw new Error(`Response is missing required field 'application-id': ${e}`);if(typeof e["current-round"]>"u")throw new Error(`Response is missing required field 'current-round': ${e}`);return new Cn({applicationId:e["application-id"],currentRound:e["current-round"],logData:typeof e["log-data"]<"u"?e["log-data"].map(wr.from_obj_for_encoding):void 0,nextToken:e["next-token"]})}}class br extends P{constructor({approvalProgram:e,clearStateProgram:t,creator:r,extraProgramPages:s,globalState:o,globalStateSchema:d,localStateSchema:w}){super(),this.approvalProgram=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.clearStateProgram=typeof t=="string"?new Uint8Array(l.Buffer.from(t,"base64")):t,this.creator=r,this.extraProgramPages=s,this.globalState=o,this.globalStateSchema=d,this.localStateSchema=w,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"}}static from_obj_for_encoding(e){if(typeof e["approval-program"]>"u")throw new Error(`Response is missing required field 'approval-program': ${e}`);if(typeof e["clear-state-program"]>"u")throw new Error(`Response is missing required field 'clear-state-program': ${e}`);return new br({approvalProgram:e["approval-program"],clearStateProgram:e["clear-state-program"],creator:e.creator,extraProgramPages:e["extra-program-pages"],globalState:typeof e["global-state"]<"u"?e["global-state"].map(Xt.from_obj_for_encoding):void 0,globalStateSchema:typeof e["global-state-schema"]<"u"?xt.from_obj_for_encoding(e["global-state-schema"]):void 0,localStateSchema:typeof e["local-state-schema"]<"u"?xt.from_obj_for_encoding(e["local-state-schema"]):void 0})}}class jn extends P{constructor({currentRound:e,application:t}){super(),this.currentRound=e,this.application=t,this.attribute_map={currentRound:"current-round",application:"application"}}static from_obj_for_encoding(e){if(typeof e["current-round"]>"u")throw new Error(`Response is missing required field 'current-round': ${e}`);return new jn({currentRound:e["current-round"],application:typeof e.application<"u"?Dt.from_obj_for_encoding(e.application):void 0})}}class xt extends P{constructor({numByteSlice:e,numUint:t}){super(),this.numByteSlice=e,this.numUint=t,this.attribute_map={numByteSlice:"num-byte-slice",numUint:"num-uint"}}static from_obj_for_encoding(e){if(typeof e["num-byte-slice"]>"u")throw new Error(`Response is missing required field 'num-byte-slice': ${e}`);if(typeof e["num-uint"]>"u")throw new Error(`Response is missing required field 'num-uint': ${e}`);return new xt({numByteSlice:e["num-byte-slice"],numUint:e["num-uint"]})}}class Pn extends P{constructor({applications:e,currentRound:t,nextToken:r}){super(),this.applications=e,this.currentRound=t,this.nextToken=r,this.attribute_map={applications:"applications",currentRound:"current-round",nextToken:"next-token"}}static from_obj_for_encoding(e){if(!Array.isArray(e.applications))throw new Error(`Response is missing required array field 'applications': ${e}`);if(typeof e["current-round"]>"u")throw new Error(`Response is missing required field 'current-round': ${e}`);return new Pn({applications:e.applications.map(Dt.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}class Ut extends P{constructor({index:e,params:t,createdAtRound:r,deleted:s,destroyedAtRound:o}){super(),this.index=e,this.params=t,this.createdAtRound=r,this.deleted=s,this.destroyedAtRound=o,this.attribute_map={index:"index",params:"params",createdAtRound:"created-at-round",deleted:"deleted",destroyedAtRound:"destroyed-at-round"}}static from_obj_for_encoding(e){if(typeof e.index>"u")throw new Error(`Response is missing required field 'index': ${e}`);if(typeof e.params>"u")throw new Error(`Response is missing required field 'params': ${e}`);return new Ut({index:e.index,params:Vt.from_obj_for_encoding(e.params),createdAtRound:e["created-at-round"],deleted:e.deleted,destroyedAtRound:e["destroyed-at-round"]})}}class qn extends P{constructor({balances:e,currentRound:t,nextToken:r}){super(),this.balances=e,this.currentRound=t,this.nextToken=r,this.attribute_map={balances:"balances",currentRound:"current-round",nextToken:"next-token"}}static from_obj_for_encoding(e){if(!Array.isArray(e.balances))throw new Error(`Response is missing required array field 'balances': ${e}`);if(typeof e["current-round"]>"u")throw new Error(`Response is missing required field 'current-round': ${e}`);return new qn({balances:e.balances.map(Sr.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}class Ht extends P{constructor({amount:e,assetId:t,isFrozen:r,deleted:s,optedInAtRound:o,optedOutAtRound:d}){super(),this.amount=e,this.assetId=t,this.isFrozen=r,this.deleted=s,this.optedInAtRound=o,this.optedOutAtRound=d,this.attribute_map={amount:"amount",assetId:"asset-id",isFrozen:"is-frozen",deleted:"deleted",optedInAtRound:"opted-in-at-round",optedOutAtRound:"opted-out-at-round"}}static from_obj_for_encoding(e){if(typeof e.amount>"u")throw new Error(`Response is missing required field 'amount': ${e}`);if(typeof e["asset-id"]>"u")throw new Error(`Response is missing required field 'asset-id': ${e}`);if(typeof e["is-frozen"]>"u")throw new Error(`Response is missing required field 'is-frozen': ${e}`);return new Ht({amount:e.amount,assetId:e["asset-id"],isFrozen:e["is-frozen"],deleted:e.deleted,optedInAtRound:e["opted-in-at-round"],optedOutAtRound:e["opted-out-at-round"]})}}class $n extends P{constructor({assets:e,currentRound:t,nextToken:r}){super(),this.assets=e,this.currentRound=t,this.nextToken=r,this.attribute_map={assets:"assets",currentRound:"current-round",nextToken:"next-token"}}static from_obj_for_encoding(e){if(!Array.isArray(e.assets))throw new Error(`Response is missing required array field 'assets': ${e}`);if(typeof e["current-round"]>"u")throw new Error(`Response is missing required field 'current-round': ${e}`);return new $n({assets:e.assets.map(Ht.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}class Vt extends P{constructor({creator:e,decimals:t,total:r,clawback:s,defaultFrozen:o,freeze:d,manager:w,metadataHash:E,name:C,nameB64:_,reserve:N,unitName:ne,unitNameB64:oe,url:J,urlB64:se}){super(),this.creator=e,this.decimals=t,this.total=r,this.clawback=s,this.defaultFrozen=o,this.freeze=d,this.manager=w,this.metadataHash=typeof E=="string"?new Uint8Array(l.Buffer.from(E,"base64")):E,this.name=C,this.nameB64=typeof _=="string"?new Uint8Array(l.Buffer.from(_,"base64")):_,this.reserve=N,this.unitName=ne,this.unitNameB64=typeof oe=="string"?new Uint8Array(l.Buffer.from(oe,"base64")):oe,this.url=J,this.urlB64=typeof se=="string"?new Uint8Array(l.Buffer.from(se,"base64")):se,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"}}static from_obj_for_encoding(e){if(typeof e.creator>"u")throw new Error(`Response is missing required field 'creator': ${e}`);if(typeof e.decimals>"u")throw new Error(`Response is missing required field 'decimals': ${e}`);if(typeof e.total>"u")throw new Error(`Response is missing required field 'total': ${e}`);return new Vt({creator:e.creator,decimals:e.decimals,total:e.total,clawback:e.clawback,defaultFrozen:e["default-frozen"],freeze:e.freeze,manager:e.manager,metadataHash:e["metadata-hash"],name:e.name,nameB64:e["name-b64"],reserve:e.reserve,unitName:e["unit-name"],unitNameB64:e["unit-name-b64"],url:e.url,urlB64:e["url-b64"]})}}class Ln extends P{constructor({asset:e,currentRound:t}){super(),this.asset=e,this.currentRound=t,this.attribute_map={asset:"asset",currentRound:"current-round"}}static from_obj_for_encoding(e){if(typeof e.asset>"u")throw new Error(`Response is missing required field 'asset': ${e}`);if(typeof e["current-round"]>"u")throw new Error(`Response is missing required field 'current-round': ${e}`);return new Ln({asset:Ut.from_obj_for_encoding(e.asset),currentRound:e["current-round"]})}}class On extends P{constructor({assets:e,currentRound:t,nextToken:r}){super(),this.assets=e,this.currentRound=t,this.nextToken=r,this.attribute_map={assets:"assets",currentRound:"current-round",nextToken:"next-token"}}static from_obj_for_encoding(e){if(!Array.isArray(e.assets))throw new Error(`Response is missing required array field 'assets': ${e}`);if(typeof e["current-round"]>"u")throw new Error(`Response is missing required field 'current-round': ${e}`);return new On({assets:e.assets.map(Ut.from_obj_for_encoding),currentRound:e["current-round"],nextToken:e["next-token"]})}}class Mn extends P{constructor({genesisHash:e,genesisId:t,previousBlockHash:r,round:s,seed:o,timestamp:d,transactionsRoot:w,transactionsRootSha256:E,participationUpdates:C,rewards:_,stateProofTracking:N,transactions:ne,txnCounter:oe,upgradeState:J,upgradeVote:se}){super(),this.genesisHash=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.genesisId=t,this.previousBlockHash=typeof r=="string"?new Uint8Array(l.Buffer.from(r,"base64")):r,this.round=s,this.seed=typeof o=="string"?new Uint8Array(l.Buffer.from(o,"base64")):o,this.timestamp=d,this.transactionsRoot=typeof w=="string"?new Uint8Array(l.Buffer.from(w,"base64")):w,this.transactionsRootSha256=typeof E=="string"?new Uint8Array(l.Buffer.from(E,"base64")):E,this.participationUpdates=C,this.rewards=_,this.stateProofTracking=N,this.transactions=ne,this.txnCounter=oe,this.upgradeState=J,this.upgradeVote=se,this.attribute_map={genesisHash:"genesis-hash",genesisId:"genesis-id",previousBlockHash:"previous-block-hash",round:"round",seed:"seed",timestamp:"timestamp",transactionsRoot:"transactions-root",transactionsRootSha256:"transactions-root-sha256",participationUpdates:"participation-updates",rewards:"rewards",stateProofTracking:"state-proof-tracking",transactions:"transactions",txnCounter:"txn-counter",upgradeState:"upgrade-state",upgradeVote:"upgrade-vote"}}static from_obj_for_encoding(e){if(typeof e["genesis-hash"]>"u")throw new Error(`Response is missing required field 'genesis-hash': ${e}`);if(typeof e["genesis-id"]>"u")throw new Error(`Response is missing required field 'genesis-id': ${e}`);if(typeof e["previous-block-hash"]>"u")throw new Error(`Response is missing required field 'previous-block-hash': ${e}`);if(typeof e.round>"u")throw new Error(`Response is missing required field 'round': ${e}`);if(typeof e.seed>"u")throw new Error(`Response is missing required field 'seed': ${e}`);if(typeof e.timestamp>"u")throw new Error(`Response is missing required field 'timestamp': ${e}`);if(typeof e["transactions-root"]>"u")throw new Error(`Response is missing required field 'transactions-root': ${e}`);if(typeof e["transactions-root-sha256"]>"u")throw new Error(`Response is missing required field 'transactions-root-sha256': ${e}`);return new Mn({genesisHash:e["genesis-hash"],genesisId:e["genesis-id"],previousBlockHash:e["previous-block-hash"],round:e.round,seed:e.seed,timestamp:e.timestamp,transactionsRoot:e["transactions-root"],transactionsRootSha256:e["transactions-root-sha256"],participationUpdates:typeof e["participation-updates"]<"u"?kr.from_obj_for_encoding(e["participation-updates"]):void 0,rewards:typeof e.rewards<"u"?xr.from_obj_for_encoding(e.rewards):void 0,stateProofTracking:typeof e["state-proof-tracking"]<"u"?e["state-proof-tracking"].map(Pr.from_obj_for_encoding):void 0,transactions:typeof e.transactions<"u"?e.transactions.map(At.from_obj_for_encoding):void 0,txnCounter:e["txn-counter"],upgradeState:typeof e["upgrade-state"]<"u"?Ar.from_obj_for_encoding(e["upgrade-state"]):void 0,upgradeVote:typeof e["upgrade-vote"]<"u"?Fr.from_obj_for_encoding(e["upgrade-vote"]):void 0})}}class xr extends P{constructor({feeSink:e,rewardsCalculationRound:t,rewardsLevel:r,rewardsPool:s,rewardsRate:o,rewardsResidue:d}){super(),this.feeSink=e,this.rewardsCalculationRound=t,this.rewardsLevel=r,this.rewardsPool=s,this.rewardsRate=o,this.rewardsResidue=d,this.attribute_map={feeSink:"fee-sink",rewardsCalculationRound:"rewards-calculation-round",rewardsLevel:"rewards-level",rewardsPool:"rewards-pool",rewardsRate:"rewards-rate",rewardsResidue:"rewards-residue"}}static from_obj_for_encoding(e){if(typeof e["fee-sink"]>"u")throw new Error(`Response is missing required field 'fee-sink': ${e}`);if(typeof e["rewards-calculation-round"]>"u")throw new Error(`Response is missing required field 'rewards-calculation-round': ${e}`);if(typeof e["rewards-level"]>"u")throw new Error(`Response is missing required field 'rewards-level': ${e}`);if(typeof e["rewards-pool"]>"u")throw new Error(`Response is missing required field 'rewards-pool': ${e}`);if(typeof e["rewards-rate"]>"u")throw new Error(`Response is missing required field 'rewards-rate': ${e}`);if(typeof e["rewards-residue"]>"u")throw new Error(`Response is missing required field 'rewards-residue': ${e}`);return new xr({feeSink:e["fee-sink"],rewardsCalculationRound:e["rewards-calculation-round"],rewardsLevel:e["rewards-level"],rewardsPool:e["rewards-pool"],rewardsRate:e["rewards-rate"],rewardsResidue:e["rewards-residue"]})}}class Ar extends P{constructor({currentProtocol:e,nextProtocol:t,nextProtocolApprovals:r,nextProtocolSwitchOn:s,nextProtocolVoteBefore:o}){super(),this.currentProtocol=e,this.nextProtocol=t,this.nextProtocolApprovals=r,this.nextProtocolSwitchOn=s,this.nextProtocolVoteBefore=o,this.attribute_map={currentProtocol:"current-protocol",nextProtocol:"next-protocol",nextProtocolApprovals:"next-protocol-approvals",nextProtocolSwitchOn:"next-protocol-switch-on",nextProtocolVoteBefore:"next-protocol-vote-before"}}static from_obj_for_encoding(e){if(typeof e["current-protocol"]>"u")throw new Error(`Response is missing required field 'current-protocol': ${e}`);return new Ar({currentProtocol:e["current-protocol"],nextProtocol:e["next-protocol"],nextProtocolApprovals:e["next-protocol-approvals"],nextProtocolSwitchOn:e["next-protocol-switch-on"],nextProtocolVoteBefore:e["next-protocol-vote-before"]})}}class Fr extends P{constructor({upgradeApprove:e,upgradeDelay:t,upgradePropose:r}){super(),this.upgradeApprove=e,this.upgradeDelay=t,this.upgradePropose=r,this.attribute_map={upgradeApprove:"upgrade-approve",upgradeDelay:"upgrade-delay",upgradePropose:"upgrade-propose"}}static from_obj_for_encoding(e){return new Fr({upgradeApprove:e["upgrade-approve"],upgradeDelay:e["upgrade-delay"],upgradePropose:e["upgrade-propose"]})}}class vr extends P{constructor({name:e,value:t}){super(),this.name=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.value=typeof t=="string"?new Uint8Array(l.Buffer.from(t,"base64")):t,this.attribute_map={name:"name",value:"value"}}static from_obj_for_encoding(e){if(typeof e.name>"u")throw new Error(`Response is missing required field 'name': ${e}`);if(typeof e.value>"u")throw new Error(`Response is missing required field 'value': ${e}`);return new vr({name:e.name,value:e.value})}}class _r extends P{constructor({name:e}){super(),this.name=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.attribute_map={name:"name"}}static from_obj_for_encoding(e){if(typeof e.name>"u")throw new Error(`Response is missing required field 'name': ${e}`);return new _r({name:e.name})}}class Er extends P{constructor({applicationId:e,boxes:t,nextToken:r}){super(),this.applicationId=e,this.boxes=t,this.nextToken=r,this.attribute_map={applicationId:"application-id",boxes:"boxes",nextToken:"next-token"}}static from_obj_for_encoding(e){if(typeof e["application-id"]>"u")throw new Error(`Response is missing required field 'application-id': ${e}`);if(!Array.isArray(e.boxes))throw new Error(`Response is missing required array field 'boxes': ${e}`);return new Er({applicationId:e["application-id"],boxes:e.boxes.map(_r.from_obj_for_encoding),nextToken:e["next-token"]})}}class Nn extends P{constructor({message:e,data:t}){super(),this.message=e,this.data=t,this.attribute_map={message:"message",data:"data"}}static from_obj_for_encoding(e){if(typeof e.message>"u")throw new Error(`Response is missing required field 'message': ${e}`);return new Nn({message:e.message,data:e.data})}}class Tr extends P{constructor({action:e,bytes:t,uint:r}){super(),this.action=e,this.bytes=t,this.uint=r,this.attribute_map={action:"action",bytes:"bytes",uint:"uint"}}static from_obj_for_encoding(e){if(typeof e.action>"u")throw new Error(`Response is missing required field 'action': ${e}`);return new Tr({action:e.action,bytes:e.bytes,uint:e.uint})}}class Wt extends P{constructor({key:e,value:t}){super(),this.key=e,this.value=t,this.attribute_map={key:"key",value:"value"}}static from_obj_for_encoding(e){if(typeof e.key>"u")throw new Error(`Response is missing required field 'key': ${e}`);if(typeof e.value>"u")throw new Error(`Response is missing required field 'value': ${e}`);return new Wt({key:e.key,value:Tr.from_obj_for_encoding(e.value)})}}class Rr extends P{constructor({hashType:e}){super(),this.hashType=e,this.attribute_map={hashType:"hash-type"}}static from_obj_for_encoding(e){return new Rr({hashType:e["hash-type"]})}}class Kn extends P{constructor({dbAvailable:e,isMigrating:t,message:r,round:s,version:o,data:d,errors:w}){super(),this.dbAvailable=e,this.isMigrating=t,this.message=r,this.round=s,this.version=o,this.data=d,this.errors=w,this.attribute_map={dbAvailable:"db-available",isMigrating:"is-migrating",message:"message",round:"round",version:"version",data:"data",errors:"errors"}}static from_obj_for_encoding(e){if(typeof e["db-available"]>"u")throw new Error(`Response is missing required field 'db-available': ${e}`);if(typeof e["is-migrating"]>"u")throw new Error(`Response is missing required field 'is-migrating': ${e}`);if(typeof e.message>"u")throw new Error(`Response is missing required field 'message': ${e}`);if(typeof e.round>"u")throw new Error(`Response is missing required field 'round': ${e}`);if(typeof e.version>"u")throw new Error(`Response is missing required field 'version': ${e}`);return new Kn({dbAvailable:e["db-available"],isMigrating:e["is-migrating"],message:e.message,round:e.round,version:e.version,data:e.data,errors:e.errors})}}class Br extends P{constructor({blockHeadersCommitment:e,firstAttestedRound:t,latestAttestedRound:r,lnProvenWeight:s,votersCommitment:o}){super(),this.blockHeadersCommitment=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.firstAttestedRound=t,this.latestAttestedRound=r,this.lnProvenWeight=s,this.votersCommitment=typeof o=="string"?new Uint8Array(l.Buffer.from(o,"base64")):o,this.attribute_map={blockHeadersCommitment:"block-headers-commitment",firstAttestedRound:"first-attested-round",latestAttestedRound:"latest-attested-round",lnProvenWeight:"ln-proven-weight",votersCommitment:"voters-commitment"}}static from_obj_for_encoding(e){return new Br({blockHeadersCommitment:e["block-headers-commitment"],firstAttestedRound:e["first-attested-round"],latestAttestedRound:e["latest-attested-round"],lnProvenWeight:e["ln-proven-weight"],votersCommitment:e["voters-commitment"]})}}class Ct extends P{constructor({hashFactory:e,path:t,treeDepth:r}){super(),this.hashFactory=e,this.path=t,this.treeDepth=r,this.attribute_map={hashFactory:"hash-factory",path:"path",treeDepth:"tree-depth"}}static from_obj_for_encoding(e){return new Ct({hashFactory:typeof e["hash-factory"]<"u"?Rr.from_obj_for_encoding(e["hash-factory"]):void 0,path:e.path,treeDepth:e["tree-depth"]})}}class Sr extends P{constructor({address:e,amount:t,isFrozen:r,deleted:s,optedInAtRound:o,optedOutAtRound:d}){super(),this.address=e,this.amount=t,this.isFrozen=r,this.deleted=s,this.optedInAtRound=o,this.optedOutAtRound=d,this.attribute_map={address:"address",amount:"amount",isFrozen:"is-frozen",deleted:"deleted",optedInAtRound:"opted-in-at-round",optedOutAtRound:"opted-out-at-round"}}static from_obj_for_encoding(e){if(typeof e.address>"u")throw new Error(`Response is missing required field 'address': ${e}`);if(typeof e.amount>"u")throw new Error(`Response is missing required field 'amount': ${e}`);if(typeof e["is-frozen"]>"u")throw new Error(`Response is missing required field 'is-frozen': ${e}`);return new Sr({address:e.address,amount:e.amount,isFrozen:e["is-frozen"],deleted:e.deleted,optedInAtRound:e["opted-in-at-round"],optedOutAtRound:e["opted-out-at-round"]})}}class kr extends P{constructor({expiredParticipationAccounts:e}){super(),this.expiredParticipationAccounts=e,this.attribute_map={expiredParticipationAccounts:"expired-participation-accounts"}}static from_obj_for_encoding(e){return new kr({expiredParticipationAccounts:e["expired-participation-accounts"]})}}class Ir extends P{constructor({partProofs:e,positionsToReveal:t,reveals:r,saltVersion:s,sigCommit:o,sigProofs:d,signedWeight:w}){super(),this.partProofs=e,this.positionsToReveal=t,this.reveals=r,this.saltVersion=s,this.sigCommit=typeof o=="string"?new Uint8Array(l.Buffer.from(o,"base64")):o,this.sigProofs=d,this.signedWeight=w,this.attribute_map={partProofs:"part-proofs",positionsToReveal:"positions-to-reveal",reveals:"reveals",saltVersion:"salt-version",sigCommit:"sig-commit",sigProofs:"sig-proofs",signedWeight:"signed-weight"}}static from_obj_for_encoding(e){return new Ir({partProofs:typeof e["part-proofs"]<"u"?Ct.from_obj_for_encoding(e["part-proofs"]):void 0,positionsToReveal:e["positions-to-reveal"],reveals:typeof e.reveals<"u"?e.reveals.map(Ur.from_obj_for_encoding):void 0,saltVersion:e["salt-version"],sigCommit:e["sig-commit"],sigProofs:typeof e["sig-proofs"]<"u"?Ct.from_obj_for_encoding(e["sig-proofs"]):void 0,signedWeight:e["signed-weight"]})}}class Dr extends P{constructor({verifier:e,weight:t}){super(),this.verifier=e,this.weight=t,this.attribute_map={verifier:"verifier",weight:"weight"}}static from_obj_for_encoding(e){return new Dr({verifier:typeof e.verifier<"u"?qr.from_obj_for_encoding(e.verifier):void 0,weight:e.weight})}}class Ur extends P{constructor({participant:e,position:t,sigSlot:r}){super(),this.participant=e,this.position=t,this.sigSlot=r,this.attribute_map={participant:"participant",position:"position",sigSlot:"sig-slot"}}static from_obj_for_encoding(e){return new Ur({participant:typeof e.participant<"u"?Dr.from_obj_for_encoding(e.participant):void 0,position:e.position,sigSlot:typeof e["sig-slot"]<"u"?Cr.from_obj_for_encoding(e["sig-slot"]):void 0})}}class Cr extends P{constructor({lowerSigWeight:e,signature:t}){super(),this.lowerSigWeight=e,this.signature=t,this.attribute_map={lowerSigWeight:"lower-sig-weight",signature:"signature"}}static from_obj_for_encoding(e){return new Cr({lowerSigWeight:e["lower-sig-weight"],signature:typeof e.signature<"u"?jr.from_obj_for_encoding(e.signature):void 0})}}class jr extends P{constructor({falconSignature:e,merkleArrayIndex:t,proof:r,verifyingKey:s}){super(),this.falconSignature=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.merkleArrayIndex=t,this.proof=r,this.verifyingKey=typeof s=="string"?new Uint8Array(l.Buffer.from(s,"base64")):s,this.attribute_map={falconSignature:"falcon-signature",merkleArrayIndex:"merkle-array-index",proof:"proof",verifyingKey:"verifying-key"}}static from_obj_for_encoding(e){return new jr({falconSignature:e["falcon-signature"],merkleArrayIndex:e["merkle-array-index"],proof:typeof e.proof<"u"?Ct.from_obj_for_encoding(e.proof):void 0,verifyingKey:e["verifying-key"]})}}class Pr extends P{constructor({nextRound:e,onlineTotalWeight:t,type:r,votersCommitment:s}){super(),this.nextRound=e,this.onlineTotalWeight=t,this.type=r,this.votersCommitment=typeof s=="string"?new Uint8Array(l.Buffer.from(s,"base64")):s,this.attribute_map={nextRound:"next-round",onlineTotalWeight:"online-total-weight",type:"type",votersCommitment:"voters-commitment"}}static from_obj_for_encoding(e){return new Pr({nextRound:e["next-round"],onlineTotalWeight:e["online-total-weight"],type:e.type,votersCommitment:e["voters-commitment"]})}}class qr extends P{constructor({commitment:e,keyLifetime:t}){super(),this.commitment=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.keyLifetime=t,this.attribute_map={commitment:"commitment",keyLifetime:"key-lifetime"}}static from_obj_for_encoding(e){return new qr({commitment:e.commitment,keyLifetime:e["key-lifetime"]})}}class Jt extends P{constructor({numByteSlice:e,numUint:t}){super(),this.numByteSlice=e,this.numUint=t,this.attribute_map={numByteSlice:"num-byte-slice",numUint:"num-uint"}}static from_obj_for_encoding(e){if(typeof e["num-byte-slice"]>"u")throw new Error(`Response is missing required field 'num-byte-slice': ${e}`);if(typeof e["num-uint"]>"u")throw new Error(`Response is missing required field 'num-uint': ${e}`);return new Jt({numByteSlice:e["num-byte-slice"],numUint:e["num-uint"]})}}class Xt extends P{constructor({key:e,value:t}){super(),this.key=e,this.value=t,this.attribute_map={key:"key",value:"value"}}static from_obj_for_encoding(e){if(typeof e.key>"u")throw new Error(`Response is missing required field 'key': ${e}`);if(typeof e.value>"u")throw new Error(`Response is missing required field 'value': ${e}`);return new Xt({key:e.key,value:$r.from_obj_for_encoding(e.value)})}}class $r extends P{constructor({bytes:e,type:t,uint:r}){super(),this.bytes=e,this.type=t,this.uint=r,this.attribute_map={bytes:"bytes",type:"type",uint:"uint"}}static from_obj_for_encoding(e){if(typeof e.bytes>"u")throw new Error(`Response is missing required field 'bytes': ${e}`);if(typeof e.type>"u")throw new Error(`Response is missing required field 'type': ${e}`);if(typeof e.uint>"u")throw new Error(`Response is missing required field 'uint': ${e}`);return new $r({bytes:e.bytes,type:e.type,uint:e.uint})}}class At extends P{constructor({fee:e,firstValid:t,lastValid:r,sender:s,applicationTransaction:o,assetConfigTransaction:d,assetFreezeTransaction:w,assetTransferTransaction:E,authAddr:C,closeRewards:_,closingAmount:N,confirmedRound:ne,createdApplicationIndex:oe,createdAssetIndex:J,genesisHash:se,genesisId:qe,globalStateDelta:Ve,group:tt,id:Et,innerTxns:Tt,intraRoundOffset:Rt,keyregTransaction:Ze,lease:Qe,localStateDelta:gt,logs:mt,note:yt,paymentTransaction:nn,receiverRewards:ss,rekeyTo:rr,roundTime:sn,senderRewards:on,signature:an,stateProofTransaction:un,txType:is}){super(),this.fee=e,this.firstValid=t,this.lastValid=r,this.sender=s,this.applicationTransaction=o,this.assetConfigTransaction=d,this.assetFreezeTransaction=w,this.assetTransferTransaction=E,this.authAddr=C,this.closeRewards=_,this.closingAmount=N,this.confirmedRound=ne,this.createdApplicationIndex=oe,this.createdAssetIndex=J,this.genesisHash=typeof se=="string"?new Uint8Array(l.Buffer.from(se,"base64")):se,this.genesisId=qe,this.globalStateDelta=Ve,this.group=typeof tt=="string"?new Uint8Array(l.Buffer.from(tt,"base64")):tt,this.id=Et,this.innerTxns=Tt,this.intraRoundOffset=Rt,this.keyregTransaction=Ze,this.lease=typeof Qe=="string"?new Uint8Array(l.Buffer.from(Qe,"base64")):Qe,this.localStateDelta=gt,this.logs=mt,this.note=typeof yt=="string"?new Uint8Array(l.Buffer.from(yt,"base64")):yt,this.paymentTransaction=nn,this.receiverRewards=ss,this.rekeyTo=rr,this.roundTime=sn,this.senderRewards=on,this.signature=an,this.stateProofTransaction=un,this.txType=is,this.attribute_map={fee:"fee",firstValid:"first-valid",lastValid:"last-valid",sender:"sender",applicationTransaction:"application-transaction",assetConfigTransaction:"asset-config-transaction",assetFreezeTransaction:"asset-freeze-transaction",assetTransferTransaction:"asset-transfer-transaction",authAddr:"auth-addr",closeRewards:"close-rewards",closingAmount:"closing-amount",confirmedRound:"confirmed-round",createdApplicationIndex:"created-application-index",createdAssetIndex:"created-asset-index",genesisHash:"genesis-hash",genesisId:"genesis-id",globalStateDelta:"global-state-delta",group:"group",id:"id",innerTxns:"inner-txns",intraRoundOffset:"intra-round-offset",keyregTransaction:"keyreg-transaction",lease:"lease",localStateDelta:"local-state-delta",logs:"logs",note:"note",paymentTransaction:"payment-transaction",receiverRewards:"receiver-rewards",rekeyTo:"rekey-to",roundTime:"round-time",senderRewards:"sender-rewards",signature:"signature",stateProofTransaction:"state-proof-transaction",txType:"tx-type"}}static from_obj_for_encoding(e){if(typeof e.fee>"u")throw new Error(`Response is missing required field 'fee': ${e}`);if(typeof e["first-valid"]>"u")throw new Error(`Response is missing required field 'first-valid': ${e}`);if(typeof e["last-valid"]>"u")throw new Error(`Response is missing required field 'last-valid': ${e}`);if(typeof e.sender>"u")throw new Error(`Response is missing required field 'sender': ${e}`);return new At({fee:e.fee,firstValid:e["first-valid"],lastValid:e["last-valid"],sender:e.sender,applicationTransaction:typeof e["application-transaction"]<"u"?Lr.from_obj_for_encoding(e["application-transaction"]):void 0,assetConfigTransaction:typeof e["asset-config-transaction"]<"u"?Or.from_obj_for_encoding(e["asset-config-transaction"]):void 0,assetFreezeTransaction:typeof e["asset-freeze-transaction"]<"u"?Mr.from_obj_for_encoding(e["asset-freeze-transaction"]):void 0,assetTransferTransaction:typeof e["asset-transfer-transaction"]<"u"?Nr.from_obj_for_encoding(e["asset-transfer-transaction"]):void 0,authAddr:e["auth-addr"],closeRewards:e["close-rewards"],closingAmount:e["closing-amount"],confirmedRound:e["confirmed-round"],createdApplicationIndex:e["created-application-index"],createdAssetIndex:e["created-asset-index"],genesisHash:e["genesis-hash"],genesisId:e["genesis-id"],globalStateDelta:typeof e["global-state-delta"]<"u"?e["global-state-delta"].map(Wt.from_obj_for_encoding):void 0,group:e.group,id:e.id,innerTxns:typeof e["inner-txns"]<"u"?e["inner-txns"].map(At.from_obj_for_encoding):void 0,intraRoundOffset:e["intra-round-offset"],keyregTransaction:typeof e["keyreg-transaction"]<"u"?Kr.from_obj_for_encoding(e["keyreg-transaction"]):void 0,lease:e.lease,localStateDelta:typeof e["local-state-delta"]<"u"?e["local-state-delta"].map(yr.from_obj_for_encoding):void 0,logs:e.logs,note:e.note,paymentTransaction:typeof e["payment-transaction"]<"u"?zr.from_obj_for_encoding(e["payment-transaction"]):void 0,receiverRewards:e["receiver-rewards"],rekeyTo:e["rekey-to"],roundTime:e["round-time"],senderRewards:e["sender-rewards"],signature:typeof e.signature<"u"?Gr.from_obj_for_encoding(e.signature):void 0,stateProofTransaction:typeof e["state-proof-transaction"]<"u"?Wr.from_obj_for_encoding(e["state-proof-transaction"]):void 0,txType:e["tx-type"]})}}class Lr extends P{constructor({applicationId:e,accounts:t,applicationArgs:r,approvalProgram:s,clearStateProgram:o,extraProgramPages:d,foreignApps:w,foreignAssets:E,globalStateSchema:C,localStateSchema:_,onCompletion:N}){super(),this.applicationId=e,this.accounts=t,this.applicationArgs=r,this.approvalProgram=typeof s=="string"?new Uint8Array(l.Buffer.from(s,"base64")):s,this.clearStateProgram=typeof o=="string"?new Uint8Array(l.Buffer.from(o,"base64")):o,this.extraProgramPages=d,this.foreignApps=w,this.foreignAssets=E,this.globalStateSchema=C,this.localStateSchema=_,this.onCompletion=N,this.attribute_map={applicationId:"application-id",accounts:"accounts",applicationArgs:"application-args",approvalProgram:"approval-program",clearStateProgram:"clear-state-program",extraProgramPages:"extra-program-pages",foreignApps:"foreign-apps",foreignAssets:"foreign-assets",globalStateSchema:"global-state-schema",localStateSchema:"local-state-schema",onCompletion:"on-completion"}}static from_obj_for_encoding(e){if(typeof e["application-id"]>"u")throw new Error(`Response is missing required field 'application-id': ${e}`);return new Lr({applicationId:e["application-id"],accounts:e.accounts,applicationArgs:e["application-args"],approvalProgram:e["approval-program"],clearStateProgram:e["clear-state-program"],extraProgramPages:e["extra-program-pages"],foreignApps:e["foreign-apps"],foreignAssets:e["foreign-assets"],globalStateSchema:typeof e["global-state-schema"]<"u"?Jt.from_obj_for_encoding(e["global-state-schema"]):void 0,localStateSchema:typeof e["local-state-schema"]<"u"?Jt.from_obj_for_encoding(e["local-state-schema"]):void 0,onCompletion:e["on-completion"]})}}class Or extends P{constructor({assetId:e,params:t}){super(),this.assetId=e,this.params=t,this.attribute_map={assetId:"asset-id",params:"params"}}static from_obj_for_encoding(e){return new Or({assetId:e["asset-id"],params:typeof e.params<"u"?Vt.from_obj_for_encoding(e.params):void 0})}}class Mr extends P{constructor({address:e,assetId:t,newFreezeStatus:r}){super(),this.address=e,this.assetId=t,this.newFreezeStatus=r,this.attribute_map={address:"address",assetId:"asset-id",newFreezeStatus:"new-freeze-status"}}static from_obj_for_encoding(e){if(typeof e.address>"u")throw new Error(`Response is missing required field 'address': ${e}`);if(typeof e["asset-id"]>"u")throw new Error(`Response is missing required field 'asset-id': ${e}`);if(typeof e["new-freeze-status"]>"u")throw new Error(`Response is missing required field 'new-freeze-status': ${e}`);return new Mr({address:e.address,assetId:e["asset-id"],newFreezeStatus:e["new-freeze-status"]})}}class Nr extends P{constructor({amount:e,assetId:t,receiver:r,closeAmount:s,closeTo:o,sender:d}){super(),this.amount=e,this.assetId=t,this.receiver=r,this.closeAmount=s,this.closeTo=o,this.sender=d,this.attribute_map={amount:"amount",assetId:"asset-id",receiver:"receiver",closeAmount:"close-amount",closeTo:"close-to",sender:"sender"}}static from_obj_for_encoding(e){if(typeof e.amount>"u")throw new Error(`Response is missing required field 'amount': ${e}`);if(typeof e["asset-id"]>"u")throw new Error(`Response is missing required field 'asset-id': ${e}`);if(typeof e.receiver>"u")throw new Error(`Response is missing required field 'receiver': ${e}`);return new Nr({amount:e.amount,assetId:e["asset-id"],receiver:e.receiver,closeAmount:e["close-amount"],closeTo:e["close-to"],sender:e.sender})}}class Kr extends P{constructor({nonParticipation:e,selectionParticipationKey:t,stateProofKey:r,voteFirstValid:s,voteKeyDilution:o,voteLastValid:d,voteParticipationKey:w}){super(),this.nonParticipation=e,this.selectionParticipationKey=typeof t=="string"?new Uint8Array(l.Buffer.from(t,"base64")):t,this.stateProofKey=typeof r=="string"?new Uint8Array(l.Buffer.from(r,"base64")):r,this.voteFirstValid=s,this.voteKeyDilution=o,this.voteLastValid=d,this.voteParticipationKey=typeof w=="string"?new Uint8Array(l.Buffer.from(w,"base64")):w,this.attribute_map={nonParticipation:"non-participation",selectionParticipationKey:"selection-participation-key",stateProofKey:"state-proof-key",voteFirstValid:"vote-first-valid",voteKeyDilution:"vote-key-dilution",voteLastValid:"vote-last-valid",voteParticipationKey:"vote-participation-key"}}static from_obj_for_encoding(e){return new Kr({nonParticipation:e["non-participation"],selectionParticipationKey:e["selection-participation-key"],stateProofKey:e["state-proof-key"],voteFirstValid:e["vote-first-valid"],voteKeyDilution:e["vote-key-dilution"],voteLastValid:e["vote-last-valid"],voteParticipationKey:e["vote-participation-key"]})}}class zr extends P{constructor({amount:e,receiver:t,closeAmount:r,closeRemainderTo:s}){super(),this.amount=e,this.receiver=t,this.closeAmount=r,this.closeRemainderTo=s,this.attribute_map={amount:"amount",receiver:"receiver",closeAmount:"close-amount",closeRemainderTo:"close-remainder-to"}}static from_obj_for_encoding(e){if(typeof e.amount>"u")throw new Error(`Response is missing required field 'amount': ${e}`);if(typeof e.receiver>"u")throw new Error(`Response is missing required field 'receiver': ${e}`);return new zr({amount:e.amount,receiver:e.receiver,closeAmount:e["close-amount"],closeRemainderTo:e["close-remainder-to"]})}}class zn extends P{constructor({currentRound:e,transaction:t}){super(),this.currentRound=e,this.transaction=t,this.attribute_map={currentRound:"current-round",transaction:"transaction"}}static from_obj_for_encoding(e){if(typeof e["current-round"]>"u")throw new Error(`Response is missing required field 'current-round': ${e}`);if(typeof e.transaction>"u")throw new Error(`Response is missing required field 'transaction': ${e}`);return new zn({currentRound:e["current-round"],transaction:At.from_obj_for_encoding(e.transaction)})}}class Gr extends P{constructor({logicsig:e,multisig:t,sig:r}){super(),this.logicsig=e,this.multisig=t,this.sig=typeof r=="string"?new Uint8Array(l.Buffer.from(r,"base64")):r,this.attribute_map={logicsig:"logicsig",multisig:"multisig",sig:"sig"}}static from_obj_for_encoding(e){return new Gr({logicsig:typeof e.logicsig<"u"?Hr.from_obj_for_encoding(e.logicsig):void 0,multisig:typeof e.multisig<"u"?Yt.from_obj_for_encoding(e.multisig):void 0,sig:e.sig})}}class Hr extends P{constructor({logic:e,args:t,multisigSignature:r,signature:s}){super(),this.logic=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.args=t,this.multisigSignature=r,this.signature=typeof s=="string"?new Uint8Array(l.Buffer.from(s,"base64")):s,this.attribute_map={logic:"logic",args:"args",multisigSignature:"multisig-signature",signature:"signature"}}static from_obj_for_encoding(e){if(typeof e.logic>"u")throw new Error(`Response is missing required field 'logic': ${e}`);return new Hr({logic:e.logic,args:e.args,multisigSignature:typeof e["multisig-signature"]<"u"?Yt.from_obj_for_encoding(e["multisig-signature"]):void 0,signature:e.signature})}}class Yt extends P{constructor({subsignature:e,threshold:t,version:r}){super(),this.subsignature=e,this.threshold=t,this.version=r,this.attribute_map={subsignature:"subsignature",threshold:"threshold",version:"version"}}static from_obj_for_encoding(e){return new Yt({subsignature:typeof e.subsignature<"u"?e.subsignature.map(Vr.from_obj_for_encoding):void 0,threshold:e.threshold,version:e.version})}}class Vr extends P{constructor({publicKey:e,signature:t}){super(),this.publicKey=typeof e=="string"?new Uint8Array(l.Buffer.from(e,"base64")):e,this.signature=typeof t=="string"?new Uint8Array(l.Buffer.from(t,"base64")):t,this.attribute_map={publicKey:"public-key",signature:"signature"}}static from_obj_for_encoding(e){return new Vr({publicKey:e["public-key"],signature:e.signature})}}class Wr extends P{constructor({message:e,stateProof:t,stateProofType:r}){super(),this.message=e,this.stateProof=t,this.stateProofType=r,this.attribute_map={message:"message",stateProof:"state-proof",stateProofType:"state-proof-type"}}static from_obj_for_encoding(e){return new Wr({message:typeof e.message<"u"?Br.from_obj_for_encoding(e.message):void 0,stateProof:typeof e["state-proof"]<"u"?Ir.from_obj_for_encoding(e["state-proof"]):void 0,stateProofType:e["state-proof-type"]})}}class Gn extends P{constructor({currentRound:e,transactions:t,nextToken:r}){super(),this.currentRound=e,this.transactions=t,this.nextToken=r,this.attribute_map={currentRound:"current-round",transactions:"transactions",nextToken:"next-token"}}static from_obj_for_encoding(e){if(typeof e["current-round"]>"u")throw new Error(`Response is missing required field 'current-round': ${e}`);if(!Array.isArray(e.transactions))throw new Error(`Response is missing required array field 'transactions': ${e}`);return new Gn({currentRound:e["current-round"],transactions:e.transactions.map(At.from_obj_for_encoding),nextToken:e["next-token"]})}}class Yi extends ue{constructor(e,t,r,s){super(e,t),this.index=r,this.index=r;const o=l.Buffer.from(s).toString("base64");this.query.name=encodeURI(`b64:${o}`)}path(){return`/v2/applications/${this.index}/box`}prepare(e){return vr.from_obj_for_encoding(e)}}class Zi extends ue{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}exclude(e){return this.query.exclude=e,this}}class Qi extends ue{path(){return"/v2/transactions"}notePrefix(e){return this.query["note-prefix"]=kn(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 eo extends ue{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 to extends ue{path(){return"/v2/applications"}index(e){return this.query["application-id"]=e,this}creator(e){return this.query.creator=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 ro extends ue{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/applications/${this.index}/boxes`}nextToken(e){return this.query.next=e,this}limit(e){return this.query.limit=e,this}prepare(e){return Er.from_obj_for_encoding(e)}}class no extends ln{constructor(e,t="http://127.0.0.1",r=8080,s={}){super("X-Indexer-API-Token",e,t,r,s)}makeHealthCheck(){return new qi(this.c,this.intDecoding)}lookupAssetBalances(e){return new $i(this.c,this.intDecoding,e)}lookupAssetTransactions(e){return new Oi(this.c,this.intDecoding,e)}lookupAccountTransactions(e){return new Li(this.c,this.intDecoding,e)}lookupBlock(e){return new Mi(this.c,this.intDecoding,e)}lookupTransactionByID(e){return new Ni(this.c,this.intDecoding,e)}lookupAccountByID(e){return new Ki(this.c,this.intDecoding,e)}lookupAccountAssets(e){return new zi(this.c,this.intDecoding,e)}lookupAccountCreatedAssets(e){return new Gi(this.c,this.intDecoding,e)}lookupAccountAppLocalStates(e){return new Hi(this.c,this.intDecoding,e)}lookupAccountCreatedApplications(e){return new Vi(this.c,this.intDecoding,e)}lookupAssetByID(e){return new Wi(this.c,this.intDecoding,e)}lookupApplications(e){return new Ji(this.c,this.intDecoding,e)}lookupApplicationLogs(e){return new Xi(this.c,this.intDecoding,e)}searchAccounts(){return new Zi(this.c,this.intDecoding)}searchForTransactions(){return new Qi(this.c,this.intDecoding)}searchForAssets(){return new eo(this.c,this.intDecoding)}searchForApplications(){return new to(this.c,this.intDecoding)}searchForApplicationBoxes(e){return new ro(this.c,this.intDecoding,e)}lookupApplicationBoxByIDandName(e,t){return new Yi(this.c,this.intDecoding,e,t)}}async function fs(n,e,t){const r=await n.status().do();if(typeof r>"u")throw new Error("Unable to get node status");const s=r["last-round"]+1;let o=s;for(;o<s+t;){let d=!1;try{const w=await n.pendingTransactionInformation(e).do();if(w["confirmed-round"])return w;if(w["pool-error"])throw d=!0,new Error(`Transaction Rejected: ${w["pool-error"]}`)}catch(w){if(d)throw w}await n.statusAfterBlock(o).do(),o+=1}throw new Error(`Transaction not confirmed after ${t} rounds`)}function Ft(n,e){let t=n.toString(16);t.length!==e*2&&(t=t.padStart(e*2,"0"));const r=new Uint8Array(t.length/2);for(let s=0,o=0;s<t.length/2;s++,o+=2)r[s]=parseInt(t.slice(o,o+2),16);return r}function Hn(n){let e=BigInt(0);const t=l.Buffer.from(n);for(let r=0;r<n.length;r++)e=BigInt(Number(t.readUIntBE(r,1)))+e*BigInt(256);return e}function so(){const n=m();return{addr:te(n.publicKey),sk:n.secretKey}}var Vn=["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"];const Wn="failed to decode mnemonic",io="the mnemonic contains a word that is not in the wordlist";function ls(n){const e=[];let t=0,r=0;function s(d){t|=d<<r,r+=8,r>=11&&(e.push(t&2047),t>>=11,r-=11)}function o(){r&&e.push(t)}return n.forEach(s),o(),e}function hs(n){return n.map(e=>Vn[e])}function ds(n){const e=X(n),t=ls(e);return hs(t)[0]}function Jn(n){if(n.length!==T)throw new RangeError(`Seed length must be ${T}`);const e=ls(n),t=hs(e),r=ds(n);return`${t.join(" ")} ${r}`}function oo(n){const e=[];let t=0,r=0;function s(d){for(t|=d<<r,r+=11;r>=8;)e.push(t&255),t>>=8,r-=8}function o(){r&&e.push(t)}return n.forEach(s),o(),new Uint8Array(e)}function Xn(n){const e=n.split(" "),t=e.slice(0,24);for(const w of t)if(Vn.indexOf(w)===-1)throw new Error(io);const r=e[e.length-1],s=t.map(w=>Vn.indexOf(w));let o=oo(s);if(o.length!==33)throw new Error(Wn);if(o[o.length-1]!==0)throw new Error(Wn);if(o=o.slice(0,o.length-1),ds(o)===r)return o;throw new Error(Wn)}function ao(n){const e=Xn(n),t=be(e);return{addr:te(t.publicKey),sk:t.secretKey}}function uo(n){const e=n.slice(0,T);return Jn(e)}function co(n){return Xn(n)}function fo(n){return Jn(n)}const ps=16;class lo{constructor(e){if(this.name="Transaction group",this.tag=l.Buffer.from("TG"),e.length>ps){const t=`${e.length.toString()} transactions grouped together but max group size is ${ps.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=l.Buffer.from("TG"),t.txGroupHashes=[];for(const r of e.txlist)t.txGroupHashes.push(l.Buffer.from(r));return t}toByte(){return a(this.get_obj_for_encoding())}}function gs(n){const e=[];for(const d of n){const w=Re(d);e.push(w.rawTxID())}const t=new lo(e),r=t.toByte(),s=l.Buffer.from(R(t.tag,r)),o=X(s);return l.Buffer.from(o)}function ms(n,e){const t=gs(n),r=[];for(const s of n){const o=Re(s);(!e||te(o.from.publicKey)===e)&&(o.group=t,r.push(o))}return r}var wa=null;const ho="Not enough multisig transactions to merge. Need at least two",po="Cannot merge txs. txIDs differ",go="Cannot merge txs. Auth addrs differ",ys="Cannot merge txs. Multisig preimages differ",mo="Cannot merge txs. subsigs are mismatched.",yo="Key does not exist",ws="Cannot mutate a multisig field as it would invalidate all existing signatures.",wo="Cannot sign a multisig transaction using `signTxn`. Use `partialSignTxn` instead.",bo="Cannot add multisig signature. Signature is not of the correct length.";function bs(n,{version:e,threshold:t,addrs:r}){const s=r.map(_=>B(_).publicKey),o=s.map(_=>({pk:l.Buffer.from(_)})),d={v:e,thr:t,subsig:o},w=n.get_obj_for_encoding(),E={msig:d,txn:w},C=et({version:e,threshold:t,pks:s});return te(w.snd)!==te(C)&&(E.sgnr=l.Buffer.from(C)),new Uint8Array(a(E))}function xs(n,{rawSig:e,myPk:t},{version:r,threshold:s,pks:o}){const d=bs(n,{version:r,threshold:s,addrs:o.map(_=>te(_))}),w=u(d);let E=!1;if(w.msig.subsig.forEach((_,N)=>{Ee(_.pk,t)&&(E=!0,w.msig.subsig[N].s=e)}),E===!1)throw new Error(yo);const C=et({version:r,threshold:s,pks:o});return te(w.txn.snd)!==te(C)&&(w.sgnr=l.Buffer.from(C)),new Uint8Array(a(w))}class jt extends he{addLease(){throw new Error(ws)}addRekey(){throw new Error(ws)}signTxn(e){throw new Error(wo)}partialSignTxn({version:e,threshold:t,pks:r},s){const o=ie(s).publicKey;return xs(this,{rawSig:this.rawSignTxn(s),myPk:o},{version:e,threshold:t,pks:r})}partialSignWithMultisigSignature(e,t,r){if(!ce(r.length))throw new Error(bo);return xs(this,{rawSig:r,myPk:B(t).publicKey},e)}static from_obj_for_encoding(e){return super.from_obj_for_encoding(e)}}function Jr(n){if(n.length<2)throw new Error(ho);const e=u(n[0]),t=jt.from_obj_for_encoding(e.txn).txID(),r=e.sgnr?te(e.sgnr):void 0,s={version:e.msig.v,threshold:e.msig.thr,pks:e.msig.subsig.map(C=>C.pk)},o=te(et(s)),d=e.msig.subsig.map(C=>({...C}));for(let C=1;C<n.length;C++){const _=u(n[C]);if(jt.from_obj_for_encoding(_.txn).txID()!==t)throw new Error(po);const ne=_.sgnr?te(_.sgnr):void 0;if(r!==ne)throw new Error(go);if(_.msig.subsig.length!==e.msig.subsig.length)throw new Error(ys);const oe={version:_.msig.v,threshold:_.msig.thr,pks:_.msig.subsig.map(se=>se.pk)},J=te(et(oe));if(o!==J)throw new Error(ys);_.msig.subsig.forEach((se,qe)=>{if(!se.s)return;const Ve=d[qe];if(Ve.s&&l.Buffer.compare(l.Buffer.from(se.s),l.Buffer.from(Ve.s))!==0)throw new Error(mo);Ve.s=se.s})}const E={msig:{v:e.msig.v,thr:e.msig.thr,subsig:d},txn:e.txn};return typeof r<"u"&&(E.sgnr=l.Buffer.from(B(r).publicKey)),new Uint8Array(a(E))}function As(n,e,t){const r=e.v,s=e.thr,o=e.subsig,d=o.map(_=>_.pk);if(e.subsig.length<s)return!1;let w;try{w=et({version:r,threshold:s,pks:d})}catch{return!1}if(!v(w,t))return!1;let E=0;for(const _ of o)_.s!==void 0&&(E+=1);if(E<s)return!1;let C=0;for(const _ of o)_.s!==void 0&&Y(n,_.s,_.pk)&&(C+=1);return!(C<s)}function Fs(n,{version:e,threshold:t,addrs:r},s){const o=lt({version:e,threshold:t,addrs:r});Object.prototype.hasOwnProperty.call(n,"from")||(n.from=o);const d=r.map(_=>B(_).publicKey),w=n instanceof he;let E,C;return w?(E=n,C=jt.prototype.partialSignTxn.call(E,{version:e,threshold:t,pks:d},s)):(E=new jt(n),C=E.partialSignTxn({version:e,threshold:t,pks:d},s)),{txID:E.txID().toString(),blob:C}}function xo(n,{version:e,threshold:t,addrs:r},s){const o=r.map(C=>B(C).publicKey),d=u(n),w=jt.from_obj_for_encoding(d.txn),E=w.partialSignTxn({version:e,threshold:t,pks:o},s);return{txID:w.txID().toString(),blob:Jr([n,E])}}function Ao(n,{version:e,threshold:t,addrs:r},s,o){const d=r.map(_=>B(_).publicKey),w=u(n),E=jt.from_obj_for_encoding(w.txn),C=E.partialSignWithMultisigSignature({version:e,threshold:t,pks:d},s,o);return{txID:E.txID().toString(),blob:Jr([n,C])}}function Fo({version:n,threshold:e,addrs:t}){return lt({version:n,threshold:e,addrs:t})}function vs(n){if(!n||n.length===0)throw new Error("empty program");const e=`
2
+ `.charCodeAt(0),t=" ".charCodeAt(0),r="~".charCodeAt(0),s=d=>t<=d&&d<=r;if(n.every(d=>d===e||s(d))){const d=l.Buffer.from(n).toString();throw ee(d)?new Error("requesting program bytes, get Algorand address"):l.Buffer.from(d,"base64").toString("base64")===d?new Error("program should not be b64 encoded"):new Error("program bytes are all ASCII printable characters, not looking like Teal byte code")}}class dt{constructor(e,t){if(this.tag=l.Buffer.from("Program"),t&&(!Array.isArray(t)||!t.every(s=>s.constructor===Uint8Array||l.Buffer.isBuffer(s))))throw new TypeError("Invalid arguments");let r;t!=null&&(r=t.map(s=>new Uint8Array(s))),vs(e),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 dt(e.l,e.arg);return t.sig=e.sig,t.msig=e.msig,t}verify(e){if(this.sig&&this.msig)return!1;try{vs(this.logic)}catch{return!1}const t=R(this.tag,this.logic);if(!this.sig&&!this.msig){const r=X(t);return v(r,e)}return this.sig?Y(t,this.sig,e):As(t,this.msig,e)}address(){const e=R(this.tag,this.logic),t=X(e);return te(new Uint8Array(t))}sign(e,t){if(t==null)this.sig=this.signProgram(e);else{const r=t.addrs.map(d=>({pk:B(d).publicKey}));this.msig={v:t.version,thr:t.threshold,subsig:r};const[s,o]=this.singleSignMultisig(e,this.msig);this.msig.subsig[o].s=s}}appendToMultisig(e){if(this.msig===void 0)throw new Error("no multisig present");const[t,r]=this.singleSignMultisig(e,this.msig);this.msig.subsig[r].s=t}signProgram(e){const t=R(this.tag,this.logic);return fe(t,e)}singleSignMultisig(e,t){let r=-1;const s=ie(e).publicKey;for(let d=0;d<t.subsig.length;d++){const{pk:w}=t.subsig[d];if(v(w,s)){r=d;break}}if(r===-1)throw new Error("invalid secret key");return[this.signProgram(e),r]}toByte(){return a(this.get_obj_for_encoding())}static fromByte(e){const t=u(e);return dt.from_obj_for_encoding(t)}}class Zt{constructor(e,t){this.lsig=new dt(e,t),this.sigkey=void 0}get_obj_for_encoding(){const e={lsig:this.lsig.get_obj_for_encoding()};return this.sigkey&&(e.sigkey=this.sigkey),e}static from_obj_for_encoding(e){const t=new Zt(e.lsig.l,e.lsig.arg);return t.lsig=dt.from_obj_for_encoding(e.lsig),t.sigkey=e.sigkey,t}toByte(){return a(this.get_obj_for_encoding())}static fromByte(e){const t=u(e);return Zt.from_obj_for_encoding(t)}isDelegated(){return!!(this.lsig.sig||this.lsig.msig)}verify(){const e=this.address();return this.lsig.verify(B(e).publicKey)}address(){if(this.lsig.sig&&this.lsig.msig)throw new Error("LogicSig has too many signatures. At most one of sig or msig may be present");if(this.lsig.sig){if(!this.sigkey)throw new Error("Signing key for delegated account is missing");return te(this.sigkey)}if(this.lsig.msig){const e={version:this.lsig.msig.v,threshold:this.lsig.msig.thr,pks:this.lsig.msig.subsig.map(t=>t.pk)};return te(et(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=ie(e).publicKey}}function vo(n,e,t){if(!e.verify(t))throw new Error("Logic signature verification failed. Ensure the program and signature are valid.");const r={lsig:e.get_obj_for_encoding(),txn:n.get_obj_for_encoding()};return Ee(t,n.from.publicKey)||(r.sgnr=l.Buffer.from(t)),{txID:n.txID().toString(),blob:a(r)}}function Yn(n,e){let t,r;if(e instanceof Zt)t=e.lsig,r=B(e.address()).publicKey;else if(t=e,t.sig)r=n.from.publicKey;else if(t.msig){const s={version:t.msig.v,threshold:t.msig.thr,pks:t.msig.subsig.map(o=>o.pk)};r=et(s)}else r=B(t.address()).publicKey;return vo(n,t,r)}function _o(n,e){const t=Re(n);return Yn(t,e)}function Eo(n){return dt.fromByte(n)}const _s=l.Buffer.from("ProgData");function Es(n,e,t){const r=R(B(t).publicKey,e),s=l.Buffer.from(R(_s,r));return fe(s,n)}function To(n,e,t,r){const s=R(B(e).publicKey,n),o=l.Buffer.from(R(_s,s));return Y(o,t,r)}function Ro(n,e,t){const s=new dt(t).address();return Es(n,e,s)}let Ts={},Rs={};"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split("").forEach(function(n,e){Ts[n]=e,Rs[e]=n});function Bo(n){let e=[],t=0,r=0;for(let s=0;s<n.length;s+=1){let o=Ts[n[s]];if(o===void 0)throw new Error("Invalid character ("+n[s]+")");const d=o&32;if(o&=31,r+=o<<t,d)t+=5;else{const w=r&1;r>>>=1,w?e.push(r===0?-2147483648:-r):e.push(r),r=t=0}}return e}function ba(n){if(typeof n=="number")return Bs(n);let e="";for(let t=0;t<n.length;t+=1)e+=Bs(n[t]);return e}function Bs(n){let e="";n<0?n=-n<<1|1:n<<=1;do{let t=n&31;n>>>=5,n>0&&(t|=32),e+=Rs[t]}while(n>0);return e}class So{constructor({version:e,sources:t,names:r,mappings:s}){if(this.version=e,this.sources=t,this.names=r,this.mappings=s,this.version!==3)throw new Error(`Only version 3 is supported, got ${this.version}`);if(this.mappings===void 0)throw new Error("mapping undefined, cannot build source map without `mapping`");const o=this.mappings.split(";").map(w=>{const E=Bo(w);if(E.length>2)return E[2]});this.pcToLine={},this.lineToPc={};let d=0;for(const[w,E]of o.entries())E!==void 0&&(d+=E),d in this.lineToPc||(this.lineToPc[d]=[]),this.lineToPc[d].push(w),this.pcToLine[w]=d}getLineForPc(e){return this.pcToLine[e]}getPcsForLine(e){return this.lineToPc[e]}}const ko=1380011588,Zn=30;function Ss(n){return n.params["approval-program"]=l.Buffer.from(n.params["approval-program"].toString(),"base64"),n.params["clear-state-program"]=l.Buffer.from(n.params["clear-state-program"].toString(),"base64"),n}async function Io({client:n,txns:e,protocolVersion:t,latestTimestamp:r,round:s,sources:o}){const d=[],w=[],E=[],C=[],_=[];for(const J of e)J.txn.type===f.appl&&(_.push(te(J.txn.from.publicKey)),J.txn.appAccounts&&_.push(...J.txn.appAccounts.map(se=>te(se.publicKey))),J.txn.appForeignApps&&(E.push(...J.txn.appForeignApps),_.push(...J.txn.appForeignApps.map(se=>it(se)))),J.txn.appForeignAssets&&C.push(...J.txn.appForeignAssets),J.txn.appIndex===void 0||J.txn.appIndex===0?d.push(new Bt({id:ko,params:new St({creator:te(J.txn.from.publicKey),approvalProgram:J.txn.appApprovalProgram,clearStateProgram:J.txn.appClearProgram,localStateSchema:new ot({numUint:J.txn.appLocalInts,numByteSlice:J.txn.appLocalByteSlices}),globalStateSchema:new ot({numUint:J.txn.appGlobalInts,numByteSlice:J.txn.appGlobalByteSlices})})})):(E.push(J.txn.appIndex),_.push(it(J.txn.appIndex))));const N=[];for(const J of[...new Set(C)])N.push(n.getAssetByID(J).do().then(se=>{_.push(se.params.creator)}));await Promise.all(N);const ne=[];for(const J of[...new Set(E)])ne.push(n.getApplicationByID(J).do().then(se=>{const qe=Ss(se);d.push(qe),_.push(qe.params.creator)}));await Promise.all(ne);const oe=[];for(const J of[...new Set(_)])oe.push(n.accountInformation(J).do().then(se=>{"created-apps"in se&&(se["created-apps"]=se["created-apps"].map(qe=>Ss(qe))),w.push(se)}));return await Promise.all(oe),new fr({txns:e.map(J=>({...J,txn:J.txn.get_obj_for_encoding()})),accounts:w,apps:d,latestTimestamp:r,round:s,protocolVersion:t,sources:o})}class Do{constructor(e){this.type=0,this.bytes="",this.uint=0,this.type=e.type,this.bytes=e.bytes,this.uint=e.uint}toString(){return this.type===1?`0x${l.Buffer.from(this.bytes,"base64").toString("hex")}`:this.uint.toString()}}class Uo{constructor(e){this.error="",this.line=0,this.pc=0,this.scratch=[],this.stack=[],this.error=e.error===void 0?"":e.error,this.line=e.line,this.pc=e.pc,this.scratch=e.scratch,this.stack=e.stack.map(t=>new Do(t))}}class ks{constructor(e){this.trace=[],e!=null&&(this.trace=e.map(t=>new Uo(t)))}}function Qn(n,e){return n.length>e&&e>0?`${n.slice(0,e)}...`:n}function Co(n,e){if(e.length===0)return"";let t=null;for(let s=0;s<e.length;s++){if(s>n.length){t=s;continue}JSON.stringify(n[s])!==JSON.stringify(e[s])&&(t=s)}if(t==null)return"";const r=e[t];return r.bytes.length>0?`${t} = 0x${l.Buffer.from(r.bytes,"base64").toString("hex")}`:`${t} = ${r.uint.toString()}`}function jo(n,e){return`[${(e?n.reverse():n).map(r=>{switch(r.type){case 1:return`0x${l.Buffer.from(r.bytes,"base64").toString("hex")}`;case 2:return`${r.uint.toString()}`;default:return""}}).join(", ")}]`}class Xr{constructor(e){this.disassembly=[],this.appCallMessages=[],this.localDeltas=[],this.globalDelta=[],this.cost=0,this.logicSigMessages=[],this.logicSigDisassembly=[],this.logs=[],this.appCallTrace=void 0,this.logicSigTrace=void 0,this.required=["disassembly"],this.optionals=["app-call-messages","local-deltas","global-delta","cost","logic-sig-messages","logic-sig-disassembly","logs"],this.traces=["app-call-trace","logic-sig-trace"],this.disassembly=e.disassembly,this.appCallMessages=e["app-call-messages"],this.localDeltas=e["local-deltas"],this.globalDelta=e["global-delta"],this.cost=e.cost,this.logicSigMessages=e["logic-sig-messages"],this.logicSigDisassembly=e["logic-sig-disassembly"],this.logs=e.logs,this.appCallTrace=new ks(e["app-call-trace"]),this.logicSigTrace=new ks(e["logic-sig-trace"])}appCallRejected(){return this.appCallMessages!==void 0&&this.appCallMessages.includes("REJECT")}logicSigRejected(){return this.logicSigMessages!==void 0&&this.logicSigMessages.includes("REJECT")}static trace(e,t,r){const s=r.maxValueWidth||Zn,o=[["pc#","ln#","source","scratch","stack"]];for(let w=0;w<e.trace.length;w++){const{line:E,error:C,pc:_,scratch:N,stack:ne}=e.trace[w],oe=N!==void 0?N:[],J=w>0&&e.trace[w-1].scratch!==void 0?e.trace[w-1].scratch:[],se=C===""?t[E]:`!! ${C} !!`;o.push([_.toString().padEnd(3," "),E.toString().padEnd(3," "),Qn(se,s),Qn(Co(J,oe),s),Qn(jo(ne,r.topOfStackFirst),s)])}const d=o.reduce((w,E)=>{const C=new Array(o[0].length).fill(0);for(let _=0;_<w.length;_++)C[_]=E[_].length>w[_]?E[_].length:w[_];return C},new Array(o[0].length).fill(0));return`${o.map(w=>w.map((E,C)=>E.padEnd(d[C]+1," ")).join("|").trim()).join(`
3
3
  `)}
4
- `}appTrace(e){if(this.appCallTrace===void 0||!this.disassembly)return"";let t=e;return e===void 0&&(t={maxValueWidth:Zn,topOfStackFirst:!1}),Jr.trace(this.appCallTrace,this.disassembly,t)}lsigTrace(e){if(this.logicSigTrace===void 0||this.logicSigDisassembly===void 0)return"";let t=e;return e===void 0&&(t={maxValueWidth:Zn,topOfStackFirst:!0}),Jr.trace(this.logicSigTrace,this.logicSigDisassembly,t)}}class Po{constructor(e){this.error="",this.protocolVersion="",this.txns=[],this.error=e.error,this.protocolVersion=e["protocol-version"],this.txns=e.txns.map(t=>new Jr(t))}}function Is(n,e,t,r,s,o,d){const w={from:n,to:e,amount:t,closeRemainderTo:r,note:s,suggestedParams:o,type:f.pay,reKeyTo:d};return new he(w)}function qo(n){return Is(n.from,n.to,n.amount,n.closeRemainderTo,n.note,n.suggestedParams,n.rekeyTo)}function Ds(n,e,t,r,s,o,d,w,E,C=!1,_=void 0){const K={from:n,note:e,voteKey:t,selectionKey:r,voteFirst:s,voteLast:o,voteKeyDilution:d,suggestedParams:w,type:f.keyreg,reKeyTo:E,nonParticipation:C,stateProofKey:_};return new he(K)}function $o(n){return Ds(n.from,n.note,n.voteKey,n.selectionKey,n.voteFirst,n.voteLast,n.voteKeyDilution,n.suggestedParams,n.rekeyTo,n.nonParticipation,n.stateProofKey)}function Us(n,e,t,r,s,o,d,w,E,C,_,K,ne,oe,X){const se={from:n,note:e,suggestedParams:oe,assetTotal:t,assetDecimals:r,assetDefaultFrozen:s,assetUnitName:C,assetName:_,assetURL:K,assetMetadataHash:ne,assetManager:o,assetReserve:d,assetFreeze:w,assetClawback:E,type:f.acfg,reKeyTo:X};return new he(se)}function Lo(n){return Us(n.from,n.note,n.total,n.decimals,n.defaultFrozen,n.manager,n.reserve,n.freeze,n.clawback,n.unitName,n.assetName,n.assetURL,n.assetMetadataHash,n.suggestedParams,n.rekeyTo)}function Cs(n,e,t,r,s,o,d,w,E=!0,C){if(E&&(r===void 0||s===void 0||o===void 0||d===void 0))throw Error("strict empty address checking was turned on, but at least one empty address was provided");const _={from:n,suggestedParams:w,assetIndex:t,assetManager:r,assetReserve:s,assetFreeze:o,assetClawback:d,type:f.acfg,note:e,reKeyTo:C};return new he(_)}function Oo(n){return Cs(n.from,n.note,n.assetIndex,n.manager,n.reserve,n.freeze,n.clawback,n.suggestedParams,n.strictEmptyAddressChecking,n.rekeyTo)}function js(n,e,t,r,s){const o={from:n,suggestedParams:r,assetIndex:t,type:f.acfg,note:e,reKeyTo:s};return new he(o)}function Mo(n){return js(n.from,n.note,n.assetIndex,n.suggestedParams,n.rekeyTo)}function Ps(n,e,t,r,s,o,d){const w={from:n,type:f.afrz,freezeAccount:r,assetIndex:t,freezeState:s,note:e,suggestedParams:o,reKeyTo:d};return new he(w)}function No(n){return Ps(n.from,n.note,n.assetIndex,n.freezeTarget,n.freezeState,n.suggestedParams,n.rekeyTo)}function qs(n,e,t,r,s,o,d,w,E){const C={type:f.axfer,from:n,to:e,amount:s,suggestedParams:w,assetIndex:d,note:o,assetRevocationTarget:r,closeRemainderTo:t,reKeyTo:E};return new he(C)}function Ko(n){return qs(n.from,n.to,n.closeRemainderTo,n.revocationTarget,n.amount,n.note,n.assetIndex,n.suggestedParams,n.rekeyTo)}function $s(n,e,t,r,s,o,d,w,E,C,_,K,ne,oe,X,se,qe,We){const tt={type:f.appl,from:n,suggestedParams:e,appIndex:0,appOnComplete:t,appLocalInts:o,appLocalByteSlices:d,appGlobalInts:w,appGlobalByteSlices:E,appApprovalProgram:r,appClearProgram:s,appArgs:C,appAccounts:_,appForeignApps:K,appForeignAssets:ne,boxes:We,note:oe,lease:X,reKeyTo:se,extraPages:qe};return new he(tt)}function zo(n){return $s(n.from,n.suggestedParams,n.onComplete,n.approvalProgram,n.clearProgram,n.numLocalInts,n.numLocalByteSlices,n.numGlobalInts,n.numGlobalByteSlices,n.appArgs,n.accounts,n.foreignApps,n.foreignAssets,n.note,n.lease,n.rekeyTo,n.extraPages,n.boxes)}function Ls(n,e,t,r,s,o,d,w,E,C,_,K,ne){const oe={type:f.appl,from:n,suggestedParams:e,appIndex:t,appApprovalProgram:r,appOnComplete:q.UpdateApplicationOC,appClearProgram:s,appArgs:o,appAccounts:d,appForeignApps:w,appForeignAssets:E,boxes:ne,note:C,lease:_,reKeyTo:K};return new he(oe)}function Go(n){return Ls(n.from,n.suggestedParams,n.appIndex,n.approvalProgram,n.clearProgram,n.appArgs,n.accounts,n.foreignApps,n.foreignAssets,n.note,n.lease,n.rekeyTo,n.boxes)}function Os(n,e,t,r,s,o,d,w,E,C,_){const K={type:f.appl,from:n,suggestedParams:e,appIndex:t,appOnComplete:q.DeleteApplicationOC,appArgs:r,appAccounts:s,appForeignApps:o,appForeignAssets:d,boxes:_,note:w,lease:E,reKeyTo:C};return new he(K)}function Ho(n){return Os(n.from,n.suggestedParams,n.appIndex,n.appArgs,n.accounts,n.foreignApps,n.foreignAssets,n.note,n.lease,n.rekeyTo,n.boxes)}function Ms(n,e,t,r,s,o,d,w,E,C,_){const K={type:f.appl,from:n,suggestedParams:e,appIndex:t,appOnComplete:q.OptInOC,appArgs:r,appAccounts:s,appForeignApps:o,appForeignAssets:d,boxes:_,note:w,lease:E,reKeyTo:C};return new he(K)}function Vo(n){return Ms(n.from,n.suggestedParams,n.appIndex,n.appArgs,n.accounts,n.foreignApps,n.foreignAssets,n.note,n.lease,n.rekeyTo,n.boxes)}function Ns(n,e,t,r,s,o,d,w,E,C,_){const K={type:f.appl,from:n,suggestedParams:e,appIndex:t,appOnComplete:q.CloseOutOC,appArgs:r,appAccounts:s,appForeignApps:o,appForeignAssets:d,boxes:_,note:w,lease:E,reKeyTo:C};return new he(K)}function Wo(n){return Ns(n.from,n.suggestedParams,n.appIndex,n.appArgs,n.accounts,n.foreignApps,n.foreignAssets,n.note,n.lease,n.rekeyTo,n.boxes)}function Ks(n,e,t,r,s,o,d,w,E,C,_){const K={type:f.appl,from:n,suggestedParams:e,appIndex:t,appOnComplete:q.ClearStateOC,appArgs:r,appAccounts:s,appForeignApps:o,appForeignAssets:d,boxes:_,note:w,lease:E,reKeyTo:C};return new he(K)}function Xo(n){return Ks(n.from,n.suggestedParams,n.appIndex,n.appArgs,n.accounts,n.foreignApps,n.foreignAssets,n.note,n.lease,n.rekeyTo,n.boxes)}function zs(n,e,t,r,s,o,d,w,E,C,_){const K={type:f.appl,from:n,suggestedParams:e,appIndex:t,appOnComplete:q.NoOpOC,appArgs:r,appAccounts:s,appForeignApps:o,appForeignAssets:d,boxes:_,note:w,lease:E,reKeyTo:C};return new he(K)}function Jo(n){return zs(n.from,n.suggestedParams,n.appIndex,n.appArgs,n.accounts,n.foreignApps,n.foreignAssets,n.note,n.lease,n.rekeyTo,n.boxes)}function Gs(n){const e={type:f.appl,from:n.from,suggestedParams:n.suggestedParams,appIndex:n.appIndex,appOnComplete:n.onComplete,appLocalInts:n.numLocalInts,appLocalByteSlices:n.numLocalByteSlices,appGlobalInts:n.numGlobalInts,appGlobalByteSlices:n.numGlobalByteSlices,appApprovalProgram:n.approvalProgram,appClearProgram:n.clearProgram,appArgs:n.appArgs,appAccounts:n.accounts,appForeignApps:n.foreignApps,appForeignAssets:n.foreignAssets,boxes:n.boxes,note:n.note,lease:n.lease,reKeyTo:n.rekeyTo,extraPages:n.extraPages};return new he(e)}function Yo(n){return(e,t)=>{const r=[];for(const s of t)r.push(e[s].signTxn(n.sk));return Promise.resolve(r)}}function Zo(n){return(e,t)=>{const r=[];for(const s of t){const{blob:o}=Yn(e[s],n);r.push(o)}return Promise.resolve(r)}}function Qo(n,e){return(t,r)=>{const s=[];for(const o of r){const d=t[o],w=[];for(const E of e){const{blob:C}=Fs(d,n,E);w.push(C)}s.push(Xr(w))}return Promise.resolve(s)}}function es(n){return typeof n=="object"&&Object.keys(n).length===2&&typeof n.txn=="object"&&typeof n.signer=="function"}const vt=2**16-1,Hs=32,Vs=1,Ws=1,Je=2,ea=/^([a-z\d[\](),]+)\[(0|[1-9][\d]*)]$/,ta=/^ufixed([1-9][\d]*)x([1-9][\d]*)$/;class Ve{static from(e){if(e.endsWith("[]")){const t=Ve.from(e.slice(0,e.length-2));return new tn(t)}if(e.endsWith("]")){const t=e.match(ea);if(t.length!==3)throw new Error(`malformed static array string: ${e}`);const r=t[2],s=parseInt(r,10);if(s>vt)throw new Error(`array length exceeds limit ${vt}`);const o=Ve.from(t[1]);return new en(o,s)}if(e.startsWith("uint")){const t=o=>[...o].every(d=>"0123456789".includes(d)),r=e.slice(4,e.length);if(!t(r))throw new Error(`malformed uint string: ${r}`);const s=parseInt(r,10);if(s>vt)throw new Error(`malformed uint string: ${s}`);return new _t(s)}if(e==="byte")return new Zr;if(e.startsWith("ufixed")){const t=e.match(ta);if(t.length!==3)throw new Error(`malformed ufixed type: ${e}`);const r=parseInt(t[1],10),s=parseInt(t[2],10);return new Yr(r,s)}if(e==="bool")return new at;if(e==="address")return new Qt;if(e==="string")return new Qr;if(e.length>=2&&e[0]==="("&&e[e.length-1]===")"){const t=ut.parseTupleContent(e.slice(1,e.length-1)),r=[];for(let s=0;s<t.length;s++){const o=Ve.from(t[s]);r.push(o)}return new ut(r)}throw new Error(`cannot convert a string ${e} to an ABI type`)}}class _t extends Ve{constructor(e){if(super(),e%8!==0||e<8||e>512)throw new Error(`unsupported uint type bitSize: ${e}`);this.bitSize=e}toString(){return`uint${this.bitSize}`}equals(e){return e instanceof _t&&this.bitSize===e.bitSize}isDynamic(){return!1}byteLen(){return this.bitSize/8}encode(e){if(typeof e!="bigint"&&typeof e!="number")throw new Error(`Cannot encode value as uint${this.bitSize}: ${e}`);if(e>=BigInt(2**this.bitSize)||e<BigInt(0))throw new Error(`${e} is not a non-negative int or too big to fit in size uint${this.bitSize}`);if(typeof e=="number"&&!Number.isSafeInteger(e))throw new Error(`${e} should be converted into a BigInt before it is encoded`);return Ft(e,this.bitSize/8)}decode(e){if(e.length!==this.bitSize/8)throw new Error(`byte string must correspond to a uint${this.bitSize}`);return Hn(e)}}class Yr extends Ve{constructor(e,t){if(super(),e%8!==0||e<8||e>512)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 Yr&&this.bitSize===e.bitSize&&this.precision===e.precision}isDynamic(){return!1}byteLen(){return this.bitSize/8}encode(e){if(typeof e!="bigint"&&typeof e!="number")throw new Error(`Cannot encode value as ${this.toString()}: ${e}`);if(e>=BigInt(2**this.bitSize)||e<BigInt(0))throw new Error(`${e} is not a non-negative int or too big to fit in size ${this.toString()}`);if(typeof e=="number"&&!Number.isSafeInteger(e))throw new Error(`${e} should be converted into a BigInt before it is encoded`);return Ft(e,this.bitSize/8)}decode(e){if(e.length!==this.bitSize/8)throw new Error(`byte string must correspond to a ${this.toString()}`);return Hn(e)}}class Qt extends Ve{toString(){return"address"}equals(e){return e instanceof Qt}isDynamic(){return!1}byteLen(){return Hs}encode(e){if(typeof e!="string"&&!(e instanceof Uint8Array))throw new Error(`Cannot encode value as ${this.toString()}: ${e}`);if(typeof e=="string")return B(e).publicKey;if(e.byteLength!==32)throw new Error("byte string must be 32 bytes long for an address");return e}decode(e){if(e.byteLength!==32)throw new Error("byte string must be 32 bytes long for an address");return te(e)}}class at extends Ve{toString(){return"bool"}equals(e){return e instanceof at}isDynamic(){return!1}byteLen(){return Ws}encode(e){if(typeof e!="boolean")throw new Error(`Cannot encode value as bool: ${e}`);return e?new Uint8Array([128]):new Uint8Array([0])}decode(e){if(e.byteLength!==1)throw new Error("bool string must be 1 byte long");const t=e[0];if(t===128)return!0;if(t===0)return!1;throw new Error("boolean could not be decoded from the byte string")}}class Zr extends Ve{toString(){return"byte"}equals(e){return e instanceof Zr}isDynamic(){return!1}byteLen(){return Vs}encode(e){if(typeof e!="number"&&typeof e!="bigint")throw new Error(`Cannot encode value as byte: ${e}`);if(typeof e=="bigint"&&(e=Number(e)),e<0||e>255)throw new Error(`${e} cannot be encoded into a byte`);return new Uint8Array([e])}decode(e){if(e.byteLength!==1)throw new Error("byte string must be 1 byte long");return e[0]}}class Qr extends Ve{toString(){return"string"}equals(e){return e instanceof Qr}isDynamic(){return!0}byteLen(){throw new Error(`${this.toString()} is a dynamic type`)}encode(e){if(typeof e!="string"&&!(e instanceof Uint8Array))throw new Error(`Cannot encode value as string: ${e}`);const t=l.Buffer.from(e),r=Ft(t.length,Je),s=new Uint8Array(t.length+Je);return s.set(r),s.set(t,Je),s}decode(e){if(e.length<Je)throw new Error(`byte string is too short to be decoded. Actual length is ${e.length}, but expected at least ${Je}`);const r=l.Buffer.from(e).readUIntBE(0,Je),s=e.slice(Je,e.length);if(r!==s.length)throw new Error(`string length bytes do not match the actual length of string. Expected ${r}, got ${s.length}`);return l.Buffer.from(s).toString("utf-8")}}class en extends Ve{constructor(e,t){if(super(),t<0)throw new Error(`static array must have a non negative length: ${t}`);this.childType=e,this.staticLength=t}toString(){return`${this.childType.toString()}[${this.staticLength}]`}equals(e){return e instanceof en&&this.staticLength===e.staticLength&&this.childType.equals(e.childType)}isDynamic(){return this.childType.isDynamic()}byteLen(){return this.childType.constructor===at?Math.ceil(this.staticLength/8):this.staticLength*this.childType.byteLen()}encode(e){if(!Array.isArray(e)&&!(e instanceof Uint8Array))throw new Error(`Cannot encode value as ${this.toString()}: ${e}`);if(e.length!==this.staticLength)throw new Error(`Value array does not match static array length. Expected ${this.staticLength}, got ${e.length}`);return this.toABITupleType().encode(e)}decode(e){return this.toABITupleType().decode(e)}toABITupleType(){return new ut(Array(this.staticLength).fill(this.childType))}}class tn extends Ve{constructor(e){super(),this.childType=e}toString(){return`${this.childType.toString()}[]`}equals(e){return e instanceof tn&&this.childType.equals(e.childType)}isDynamic(){return!0}byteLen(){throw new Error(`${this.toString()} is a dynamic type`)}encode(e){if(!Array.isArray(e)&&!(e instanceof Uint8Array))throw new Error(`Cannot encode value as ${this.toString()}: ${e}`);const t=this.toABITupleType(e.length),r=t.encode(e),s=Ft(t.childTypes.length,Je);return R(s,r)}decode(e){const r=l.Buffer.from(e).readUIntBE(0,Je);return this.toABITupleType(r).decode(e.slice(Je,e.length))}toABITupleType(e){return new ut(Array(e).fill(this.childType))}}class ut extends Ve{constructor(e){if(super(),e.length>=vt)throw new Error("tuple type child type number larger than maximum uint16 error");this.childTypes=e}toString(){const e=[];for(let t=0;t<this.childTypes.length;t++)e[t]=this.childTypes[t].toString();return`(${e.join(",")})`}equals(e){return e instanceof ut&&this.childTypes.length===e.childTypes.length&&this.childTypes.every((t,r)=>t.equals(e.childTypes[r]))}isDynamic(){const e=t=>t.isDynamic();return this.childTypes.some(e)}byteLen(){let e=0;for(let t=0;t<this.childTypes.length;t++)if(this.childTypes[t].constructor===at){const r=er(this.childTypes,t,1),s=r+1;t+=r,e+=Math.trunc((s+7)/8)}else{const r=this.childTypes[t].byteLen();e+=r}return e}encode(e){if(!Array.isArray(e)&&!(e instanceof Uint8Array))throw new Error(`Cannot encode value as ${this.toString()}: ${e}`);const t=Array.from(e);if(e.length>vt)throw new Error("length of tuple array should not exceed a uint16");const r=this.childTypes,s=[],o=[],d=new Map;let w=0;for(;w<r.length;){const _=r[w];if(_.isDynamic())d.set(s.length,!0),s.push(new Uint8Array([0,0])),o.push(_.encode(t[w]));else{if(_.constructor===at){const K=er(r,w,-1);let ne=er(r,w,1);if(K%8!==0)throw new Error("expected before index should have number of bool mod 8 equal 0");ne=Math.min(7,ne);const oe=ra(t.slice(w,w+ne+1));s.push(Ft(oe,1)),w+=ne}else{const K=_.encode(t[w]);s.push(K)}d.set(w,!1),o.push(new Uint8Array)}w+=1}let E=0;for(const _ of s)E+=_.length;let C=0;for(let _=0;_<s.length;_++){if(d.get(_)){const K=E+C;if(K>vt)throw new Error(`byte length of ${K} should not exceed a uint16`);s[_]=Ft(K,Je)}C+=o[_].length}return R(...s,...o)}decode(e){const t=this.childTypes,r=[],s=[];let o=0,d=0;const w=l.Buffer.from(e);for(;o<t.length;){const _=t[o];if(_.isDynamic()){if(e.slice(d,e.length).length<Je)throw new Error("dynamic type in tuple is too short to be decoded");const K=w.readUIntBE(d,Je);if(r.length>0&&(r[r.length-1].right=K,K<r[r.length-1].left))throw new Error("dynamic index segment miscalculation: left is greater than right index");const ne={left:K,right:-1};r.push(ne),s.push(null),d+=Je}else if(_.constructor===at){const K=er(this.childTypes,o,-1);let ne=er(this.childTypes,o,1);if(K%8!==0)throw new Error("expected before bool number mod 8 === 0");ne=Math.min(7,ne);for(let oe=0;oe<=ne;oe++){const X=128>>oe;(e[d]&X)>0?s.push(new Uint8Array([128])):s.push(new Uint8Array([0]))}o+=ne,d+=1}else{const K=_.byteLen();s.push(e.slice(d,d+K)),d+=K}if(o!==t.length-1&&d>=e.length)throw new Error("input byte not enough to decode");o+=1}if(r.length>0&&(r[r.length-1].right=e.length,d=e.length),d<e.length)throw new Error("input byte not fully consumed");for(let _=0;_<r.length;_++){const K=r[_];if(K.left>K.right)throw new Error("dynamic segment should display a [l, r] space with l <= r");if(_!==r.length-1&&K.right!==r[_+1].left)throw new Error("dynamic segment should be consecutive")}let E=0;for(let _=0;_<t.length;_++)t[_].isDynamic()&&(s[_]=e.slice(r[E].left,r[E].right),E+=1);const C=[];for(let _=0;_<t.length;_++){const K=t[_].decode(s[_]);C.push(K)}return C}static parseTupleContent(e){if(e.length===0)return[];if(e.endsWith(",")||e.startsWith(","))throw new Error("tuple string should not start with comma");if(e.includes(",,"))throw new Error("tuple string should not have consecutive commas");const t=[];let r=0,s="";for(const o of e)s+=o,o==="("?r+=1:o===")"?r-=1:o===","&&r===0&&(t.push(s.slice(0,s.length-1)),s="");if(s.length!==0&&t.push(s),r!==0)throw new Error("tuple string has mismatched parentheses");return t}}function ra(n){let e=0;if(n.length>8)throw new Error("value list passed in should be no greater than length 8");for(let t=0;t<n.length;t++){const r=n[t];if(typeof r!="boolean")throw new Error("non-boolean values cannot be compressed into a byte");r&&(e|=1<<7-t)}return e}function er(n,e,t){let r=0;for(;;){const s=e+t*r;if(n[s].constructor===at)if(s!==n.length-1&&t===1)r+=1;else if(s>0&&t===-1)r+=1;else break;else{r-=1;break}}return r}var st;(function(n){n.any="txn",n.pay="pay",n.keyreg="keyreg",n.acfg="acfg",n.axfer="axfer",n.afrz="afrz",n.appl="appl"})(st||(st={}));function rn(n){return n===st.any||n===st.pay||n===st.keyreg||n===st.acfg||n===st.axfer||n===st.afrz||n===st.appl}function Xs(n,e){return n===st.any?!0:e.type&&e.type.toString()===n.toString()}var ct;(function(n){n.account="account",n.application="application",n.asset="asset"})(ct||(ct={}));function ts(n){return n===ct.account||n===ct.application||n===ct.asset}function na(n){const e=n.indexOf("(");if(e===-1)throw new Error(`Invalid method signature: ${n}`);let t=-1,r=0;for(let s=e;s<n.length;s++){const o=n[s];if(o==="(")r+=1;else if(o===")"){if(r===0)break;if(r-=1,r===0){t=s;break}}}if(t===-1)throw new Error(`Invalid method signature: ${n}`);return{name:n.slice(0,e),args:ut.parseTupleContent(n.slice(e+1,t)),returns:n.slice(t+1)}}class Pt{constructor(e){if(typeof e.name!="string"||typeof e.returns!="object"||!Array.isArray(e.args))throw new Error("Invalid ABIMethod parameters");this.name=e.name,this.description=e.desc,this.args=e.args.map(({type:t,name:r,desc:s})=>rn(t)||ts(t)?{type:t,name:r,description:s}:{type:Ve.from(t),name:r,description:s}),this.returns={type:e.returns.type==="void"?e.returns.type:Ve.from(e.returns.type),description:e.returns.desc}}getSignature(){const e=this.args.map(r=>r.type.toString()).join(","),t=this.returns.type.toString();return`${this.name}(${e})${t}`}getSelector(){const e=Y(this.getSignature());return new Uint8Array(e.slice(0,4))}txnCount(){let e=1;for(const t of this.args)typeof t.type=="string"&&rn(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:s}=na(e);return new Pt({name:t,args:r.map(o=>({type:o})),returns:{type:s}})}}function rs(n,e){if(n===null||!Array.isArray(n)||!n.every(r=>r instanceof Pt))throw new Error("Methods list provided is null or not the correct type");const t=n.filter(r=>r.name===e);if(t.length>1)throw new Error(`found ${t.length} methods with the same name ${t.map(r=>r.getSignature()).join(",")}`);if(t.length===0)throw new Error(`found 0 methods with the name ${e}`);return t[0]}class sa{constructor(e){if(typeof e.name!="string"||!Array.isArray(e.methods)||e.networks&&typeof e.networks!="object")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(t=>new Pt(t))}toJSON(){return{name:this.name,desc:this.description,networks:this.networks,methods:this.methods.map(e=>e.toJSON())}}getMethodByName(e){return rs(this.methods,e)}}class ia{constructor(e){if(typeof e.name!="string"||!Array.isArray(e.methods))throw new Error("Invalid ABIInterface parameters");this.name=e.name,this.description=e.desc,this.methods=e.methods.map(t=>new Pt(t))}toJSON(){return{name:this.name,desc:this.description,methods:this.methods.map(e=>e.toJSON())}}getMethodByName(e){return rs(this.methods,e)}}const oa=l.Buffer.from([21,31,124,117]),tr=16;var Ye;(function(n){n[n.BUILDING=0]="BUILDING",n[n.BUILT=1]="BUILT",n[n.SIGNED=2]="SIGNED",n[n.SUBMITTED=3]="SUBMITTED",n[n.COMMITTED=4]="COMMITTED"})(Ye||(Ye={}));function ns(n,e,t){if(t!=null&&n===t)return 0;const r=t==null?0:1;for(let s=0;s<e.length;s++)if(n===e[s])return s+r;return e.push(n),e.length-1+r}class pt{constructor(){this.status=Ye.BUILDING,this.transactions=[],this.methodCalls=new Map,this.signedTxns=[],this.txIDs=[]}getStatus(){return this.status}count(){return this.transactions.length}clone(){const e=new pt;return e.transactions=this.transactions.map(({txn:t,signer:r})=>({txn:he.from_obj_for_encoding({...t.get_obj_for_encoding(),grp:void 0}),signer:r})),e.methodCalls=new Map(this.methodCalls),e}addTransaction(e){if(this.status!==Ye.BUILDING)throw new Error("Cannot add transactions when composer status is not BUILDING");if(this.transactions.length===pt.MAX_GROUP_SIZE)throw new Error(`Adding an additional transaction exceeds the maximum atomic group size of ${pt.MAX_GROUP_SIZE}`);if(e.txn.group&&e.txn.group.some(t=>t!==0))throw new Error("Cannot add a transaction with nonzero group ID");this.transactions.push(e)}addMethodCall({appID:e,method:t,methodArgs:r,sender:s,suggestedParams:o,onComplete:d,approvalProgram:w,clearProgram:E,numGlobalInts:C,numGlobalByteSlices:_,numLocalInts:K,numLocalByteSlices:ne,extraPages:oe,appAccounts:X,appForeignApps:se,appForeignAssets:qe,boxes:We,note:tt,lease:Et,rekeyTo:Tt,signer:Rt}){if(this.status!==Ye.BUILDING)throw new Error("Cannot add transactions when composer status is not BUILDING");if(this.transactions.length+t.txnCount()>pt.MAX_GROUP_SIZE)throw new Error(`Adding additional transactions exceeds the maximum atomic group size of ${pt.MAX_GROUP_SIZE}`);if(e===0){if(w==null||E==null||C==null||_==null||K==null||ne==null)throw new Error("One of the following required parameters for application creation is missing: approvalProgram, clearProgram, numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices")}else if(d===q.UpdateApplicationOC){if(w==null||E==null)throw new Error("One of the following required parameters for OnApplicationComplete.UpdateApplicationOC is missing: approvalProgram, clearProgram");if(C!=null||_!=null||K!=null||ne!=null||oe!=null)throw new Error("One of the following application creation parameters were set on a non-creation call: numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices, extraPages")}else if(w!=null||E!=null||C!=null||_!=null||K!=null||ne!=null||oe!=null)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(r==null&&(r=[]),r.length!==t.args.length)throw new Error(`Incorrect number of method arguments. Expected ${t.args.length}, got ${r.length}`);let Ze=[],Qe=[];const gt=[],mt=[],yt=[],nn=new Map,ss=We||[];for(let ke=0;ke<r.length;ke++){let Xe=t.args[ke].type;const nt=r[ke];if(rn(Xe)){if(!es(nt)||!Xs(Xe,nt.txn))throw new Error(`Expected ${Xe} transaction for argument at index ${ke}`);if(nt.txn.group&&nt.txn.group.some(qt=>qt!==0))throw new Error("Cannot add a transaction with nonzero group ID");gt.push(nt);continue}if(es(nt))throw new Error(`Expected non-transaction value for argument at index ${ke}`);if(ts(Xe)&&(nn.set(mt.length,Ze.length),mt.push(Xe),yt.push(nt),Xe=new _t(8)),typeof Xe=="string")throw new Error(`Unknown ABI type: ${Xe}`);Ze.push(Xe),Qe.push(nt)}const rr=[],sn=X==null?[]:X.slice(),on=se==null?[]:se.slice(),an=qe==null?[]:qe.slice();for(let ke=0;ke<mt.length;ke++){const Xe=mt[ke],nt=yt[ke];let qt=0;switch(Xe){case ct.account:{const wt=new Qt,ft=wt.decode(wt.encode(nt));qt=ns(ft,sn,s);break}case ct.application:{const wt=new _t(64),ft=wt.decode(wt.encode(nt));if(ft>Number.MAX_SAFE_INTEGER)throw new Error(`Expected safe integer for application value, got ${ft}`);qt=ns(Number(ft),on,e);break}case ct.asset:{const wt=new _t(64),ft=wt.decode(wt.encode(nt));if(ft>Number.MAX_SAFE_INTEGER)throw new Error(`Expected safe integer for asset value, got ${ft}`);qt=ns(Number(ft),an);break}default:throw new Error(`Unknown reference type: ${Xe}`)}rr.push(qt)}for(let ke=0;ke<rr.length;ke++){const Xe=nn.get(ke);Qe[Xe]=rr[ke]}if(Ze.length>tr-1){const ke=Ze.slice(tr-2),Xe=Qe.slice(tr-2);Ze=Ze.slice(0,tr-2),Qe=Qe.slice(0,tr-2),Ze.push(new ut(ke)),Qe.push(Xe)}const un=[t.getSelector()];for(let ke=0;ke<Ze.length;ke++)un.push(Ze[ke].encode(Qe[ke]));const is={txn:Gs({from:s,appIndex:e,appArgs:un,accounts:sn,foreignApps:on,foreignAssets:an,boxes:ss,onComplete:d==null?q.NoOpOC:d,approvalProgram:w,clearProgram:E,numGlobalInts:C,numGlobalByteSlices:_,numLocalInts:K,numLocalByteSlices:ne,extraPages:oe,lease:Et,note:tt,rekeyTo:Tt,suggestedParams:o}),signer:Rt};this.transactions.push(...gt,is),this.methodCalls.set(this.transactions.length-1,t)}buildGroup(){if(this.status===Ye.BUILDING){if(this.transactions.length===0)throw new Error("Cannot build a group with 0 transactions");this.transactions.length>1&&ms(this.transactions.map(e=>e.txn)),this.status=Ye.BUILT}return this.transactions}async gatherSignatures(){if(this.status>=Ye.SIGNED)return this.signedTxns;const e=this.buildGroup(),t=e.map(E=>E.txn),r=new Map;for(let E=0;E<e.length;E++){const{signer:C}=e[E];r.has(C)||r.set(C,[]),r.get(C).push(E)}const s=Array.from(r),o=await Promise.all(s.map(([E,C])=>E(t,C))),d=e.map(()=>null);for(let E=0;E<s.length;E++){const C=s[E][1],_=o[E];for(let K=0;K<C.length;K++)d[C[K]]=_[K]}if(!d.every(E=>E!=null))throw new Error(`Missing signatures. Got ${d}`);const w=d.map((E,C)=>{try{return Ne(E).txn.txID()}catch(_){throw new Error(`Cannot decode signed transaction at index ${C}. ${_}`)}});return this.signedTxns=d,this.txIDs=w,this.status=Ye.SIGNED,d}async submit(e){if(this.status>Ye.SUBMITTED)throw new Error("Transaction group cannot be resubmitted");const t=await this.gatherSignatures();return await e.sendRawTransaction(t).do(),this.status=Ye.SUBMITTED,this.txIDs}async execute(e,t){if(this.status===Ye.COMMITTED)throw new Error("Transaction group has already been executed successfully");const r=await this.submit(e);this.status=Ye.SUBMITTED;const s=this.transactions.findIndex((C,_)=>this.methodCalls.has(_)),d=await fs(e,r[s===-1?0:s],t);this.status=Ye.COMMITTED;const w=d["confirmed-round"],E=[];for(const[C,_]of this.methodCalls){const K=r[C],ne={txID:K,rawReturnValue:new Uint8Array,method:_};try{const oe=C===s?d:await e.pendingTransactionInformation(K).do();if(ne.txInfo=oe,_.returns.type!=="void"){const X=oe.logs||[];if(X.length===0)throw new Error("App call transaction did not log a return value");const se=l.Buffer.from(X[X.length-1],"base64");if(se.byteLength<4||!se.slice(0,4).equals(oa))throw new Error("App call transaction did not log a return value");ne.rawReturnValue=new Uint8Array(se.slice(4)),ne.returnValue=_.returns.type.decode(ne.rawReturnValue)}}catch(oe){ne.decodeError=oe}E.push(ne)}return{confirmedRound:w,txIDs:r,methodResults:E}}}pt.MAX_GROUP_SIZE=16;const Js=l.Buffer.from([77,88]),Ys="The transaction sender address and multisig preimage do not match.";function aa(n,e){if(typeof n.from>"u"){const r=ie(e);n.from=te(r.publicKey)}const t=Re(n);return{txID:t.txID().toString(),blob:t.signTxn(e)}}function ua(n,e){return new Zs(n).signBid(e)}function ca(n,e){const t=l.Buffer.from(R(Js,n));return le(t,e)}function fa(n,e,t){const r=l.Buffer.from(R(Js,n)),s=B(t).publicKey;return Z(r,e,s)}function la(n){return new Uint8Array(a(n))}function ha(n){return u(n)}const da=new Error(Ys),pa=new Error(cn);var ga=J},54098:function(Be,Ke){var ce=typeof self<"u"?self:this,de=function(){function J(){this.fetch=!1,this.DOMException=ce.DOMException}return J.prototype=ce,new J}();(function(J){var l=function(N){var L={searchParams:"URLSearchParams"in J,iterable:"Symbol"in J&&"iterator"in Symbol,blob:"FileReader"in J&&"Blob"in J&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in J,arrayBuffer:"ArrayBuffer"in J};function k(h){return h&&DataView.prototype.isPrototypeOf(h)}if(L.arrayBuffer)var D=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Y=ArrayBuffer.isView||function(h){return h&&D.indexOf(Object.prototype.toString.call(h))>-1};function Fe(h){if(typeof h!="string"&&(h=String(h)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(h))throw new TypeError("Invalid character in header field name");return h.toLowerCase()}function be(h){return typeof h!="string"&&(h=String(h)),h}function m(h){var x={next:function(){var v=h.shift();return{done:v===void 0,value:v}}};return L.iterable&&(x[Symbol.iterator]=function(){return x}),x}function fe(h){this.map={},h instanceof fe?h.forEach(function(x,v){this.append(v,x)},this):Array.isArray(h)?h.forEach(function(x){this.append(x[0],x[1])},this):h&&Object.getOwnPropertyNames(h).forEach(function(x){this.append(x,h[x])},this)}fe.prototype.append=function(h,x){h=Fe(h),x=be(x);var v=this.map[h];this.map[h]=v?v+", "+x:x},fe.prototype.delete=function(h){delete this.map[Fe(h)]},fe.prototype.get=function(h){return h=Fe(h),this.has(h)?this.map[h]:null},fe.prototype.has=function(h){return this.map.hasOwnProperty(Fe(h))},fe.prototype.set=function(h,x){this.map[Fe(h)]=be(x)},fe.prototype.forEach=function(h,x){for(var v in this.map)this.map.hasOwnProperty(v)&&h.call(x,this.map[v],v,this)},fe.prototype.keys=function(){var h=[];return this.forEach(function(x,v){h.push(v)}),m(h)},fe.prototype.values=function(){var h=[];return this.forEach(function(x){h.push(x)}),m(h)},fe.prototype.entries=function(){var h=[];return this.forEach(function(x,v){h.push([v,x])}),m(h)},L.iterable&&(fe.prototype[Symbol.iterator]=fe.prototype.entries);function ie(h){if(h.bodyUsed)return Promise.reject(new TypeError("Already read"));h.bodyUsed=!0}function le(h){return new Promise(function(x,v){h.onload=function(){x(h.result)},h.onerror=function(){v(h.error)}})}function Ee(h){var x=new FileReader,v=le(x);return x.readAsArrayBuffer(h),v}function Z(h){var x=new FileReader,v=le(x);return x.readAsText(h),v}function _e(h){for(var x=new Uint8Array(h),v=new Array(x.length),R=0;R<x.length;R++)v[R]=String.fromCharCode(x[R]);return v.join("")}function A(h){if(h.slice)return h.slice(0);var x=new Uint8Array(h.byteLength);return x.set(new Uint8Array(h)),x.buffer}function F(){return this.bodyUsed=!1,this._initBody=function(h){this._bodyInit=h,h?typeof h=="string"?this._bodyText=h:L.blob&&Blob.prototype.isPrototypeOf(h)?this._bodyBlob=h:L.formData&&FormData.prototype.isPrototypeOf(h)?this._bodyFormData=h:L.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)?this._bodyText=h.toString():L.arrayBuffer&&L.blob&&k(h)?(this._bodyArrayBuffer=A(h.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):L.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(h)||Y(h))?this._bodyArrayBuffer=A(h):this._bodyText=h=Object.prototype.toString.call(h):this._bodyText="",this.headers.get("content-type")||(typeof h=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):L.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},L.blob&&(this.blob=function(){var h=ie(this);if(h)return h;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?ie(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(Ee)}),this.text=function(){var h=ie(this);if(h)return h;if(this._bodyBlob)return Z(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(_e(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},L.formData&&(this.formData=function(){return this.text().then(z)}),this.json=function(){return this.text().then(JSON.parse)},this}var T=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function j(h){var x=h.toUpperCase();return T.indexOf(x)>-1?x:h}function O(h,x){x=x||{};var v=x.body;if(h instanceof O){if(h.bodyUsed)throw new TypeError("Already read");this.url=h.url,this.credentials=h.credentials,x.headers||(this.headers=new fe(h.headers)),this.method=h.method,this.mode=h.mode,this.signal=h.signal,!v&&h._bodyInit!=null&&(v=h._bodyInit,h.bodyUsed=!0)}else this.url=String(h);if(this.credentials=x.credentials||this.credentials||"same-origin",(x.headers||!this.headers)&&(this.headers=new fe(x.headers)),this.method=j(x.method||this.method||"GET"),this.mode=x.mode||this.mode||null,this.signal=x.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&v)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(v)}O.prototype.clone=function(){return new O(this,{body:this._bodyInit})};function z(h){var x=new FormData;return h.trim().split("&").forEach(function(v){if(v){var R=v.split("="),W=R.shift().replace(/\+/g," "),Q=R.join("=").replace(/\+/g," ");x.append(decodeURIComponent(W),decodeURIComponent(Q))}}),x}function g(h){var x=new fe,v=h.replace(/\r?\n[\t ]+/g," ");return v.split(/\r?\n/).forEach(function(R){var W=R.split(":"),Q=W.shift().trim();if(Q){var xe=W.join(":").trim();x.append(Q,xe)}}),x}F.call(O.prototype);function U(h,x){x||(x={}),this.type="default",this.status=x.status===void 0?200:x.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in x?x.statusText:"OK",this.headers=new fe(x.headers),this.url=x.url||"",this._initBody(h)}F.call(U.prototype),U.prototype.clone=function(){return new U(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new fe(this.headers),url:this.url})},U.error=function(){var h=new U(null,{status:0,statusText:""});return h.type="error",h};var S=[301,302,303,307,308];U.redirect=function(h,x){if(S.indexOf(x)===-1)throw new RangeError("Invalid status code");return new U(null,{status:x,headers:{location:h}})},N.DOMException=J.DOMException;try{new N.DOMException}catch{N.DOMException=function(x,v){this.message=x,this.name=v;var R=Error(x);this.stack=R.stack},N.DOMException.prototype=Object.create(Error.prototype),N.DOMException.prototype.constructor=N.DOMException}function $(h,x){return new Promise(function(v,R){var W=new O(h,x);if(W.signal&&W.signal.aborted)return R(new N.DOMException("Aborted","AbortError"));var Q=new XMLHttpRequest;function xe(){Q.abort()}Q.onload=function(){var ge={status:Q.status,statusText:Q.statusText,headers:g(Q.getAllResponseHeaders()||"")};ge.url="responseURL"in Q?Q.responseURL:ge.headers.get("X-Request-URL");var Ae="response"in Q?Q.response:Q.responseText;v(new U(Ae,ge))},Q.onerror=function(){R(new TypeError("Network request failed"))},Q.ontimeout=function(){R(new TypeError("Network request failed"))},Q.onabort=function(){R(new N.DOMException("Aborted","AbortError"))},Q.open(W.method,W.url,!0),W.credentials==="include"?Q.withCredentials=!0:W.credentials==="omit"&&(Q.withCredentials=!1),"responseType"in Q&&L.blob&&(Q.responseType="blob"),W.headers.forEach(function(ge,Ae){Q.setRequestHeader(Ae,ge)}),W.signal&&(W.signal.addEventListener("abort",xe),Q.onreadystatechange=function(){Q.readyState===4&&W.signal.removeEventListener("abort",xe)}),Q.send(typeof W._bodyInit>"u"?null:W._bodyInit)})}return $.polyfill=!0,J.fetch||(J.fetch=$,J.Headers=fe,J.Request=O,J.Response=U),N.Headers=fe,N.Request=O,N.Response=U,N.fetch=$,Object.defineProperty(N,"__esModule",{value:!0}),N}({})})(de),de.fetch.ponyfill=!0,delete de.fetch.polyfill;var ye=de;Ke=ye.fetch,Ke.default=ye.fetch,Ke.fetch=ye.fetch,Ke.Headers=ye.Headers,Ke.Request=ye.Request,Ke.Response=ye.Response,Be.exports=Ke},89090:function(Be,Ke,ce){var de=ce(34155),ye;/*
4
+ `}appTrace(e){if(this.appCallTrace===void 0||!this.disassembly)return"";let t=e;return e===void 0&&(t={maxValueWidth:Zn,topOfStackFirst:!1}),Xr.trace(this.appCallTrace,this.disassembly,t)}lsigTrace(e){if(this.logicSigTrace===void 0||this.logicSigDisassembly===void 0)return"";let t=e;return e===void 0&&(t={maxValueWidth:Zn,topOfStackFirst:!0}),Xr.trace(this.logicSigTrace,this.logicSigDisassembly,t)}}class Po{constructor(e){this.error="",this.protocolVersion="",this.txns=[],this.error=e.error,this.protocolVersion=e["protocol-version"],this.txns=e.txns.map(t=>new Xr(t))}}function Is(n,e,t,r,s,o,d){const w={from:n,to:e,amount:t,closeRemainderTo:r,note:s,suggestedParams:o,type:f.pay,reKeyTo:d};return new he(w)}function qo(n){return Is(n.from,n.to,n.amount,n.closeRemainderTo,n.note,n.suggestedParams,n.rekeyTo)}function Ds(n,e,t,r,s,o,d,w,E,C=!1,_=void 0){const N={from:n,note:e,voteKey:t,selectionKey:r,voteFirst:s,voteLast:o,voteKeyDilution:d,suggestedParams:w,type:f.keyreg,reKeyTo:E,nonParticipation:C,stateProofKey:_};return new he(N)}function $o(n){return Ds(n.from,n.note,n.voteKey,n.selectionKey,n.voteFirst,n.voteLast,n.voteKeyDilution,n.suggestedParams,n.rekeyTo,n.nonParticipation,n.stateProofKey)}function Us(n,e,t,r,s,o,d,w,E,C,_,N,ne,oe,J){const se={from:n,note:e,suggestedParams:oe,assetTotal:t,assetDecimals:r,assetDefaultFrozen:s,assetUnitName:C,assetName:_,assetURL:N,assetMetadataHash:ne,assetManager:o,assetReserve:d,assetFreeze:w,assetClawback:E,type:f.acfg,reKeyTo:J};return new he(se)}function Lo(n){return Us(n.from,n.note,n.total,n.decimals,n.defaultFrozen,n.manager,n.reserve,n.freeze,n.clawback,n.unitName,n.assetName,n.assetURL,n.assetMetadataHash,n.suggestedParams,n.rekeyTo)}function Cs(n,e,t,r,s,o,d,w,E=!0,C){if(E&&(r===void 0||s===void 0||o===void 0||d===void 0))throw Error("strict empty address checking was turned on, but at least one empty address was provided");const _={from:n,suggestedParams:w,assetIndex:t,assetManager:r,assetReserve:s,assetFreeze:o,assetClawback:d,type:f.acfg,note:e,reKeyTo:C};return new he(_)}function Oo(n){return Cs(n.from,n.note,n.assetIndex,n.manager,n.reserve,n.freeze,n.clawback,n.suggestedParams,n.strictEmptyAddressChecking,n.rekeyTo)}function js(n,e,t,r,s){const o={from:n,suggestedParams:r,assetIndex:t,type:f.acfg,note:e,reKeyTo:s};return new he(o)}function Mo(n){return js(n.from,n.note,n.assetIndex,n.suggestedParams,n.rekeyTo)}function Ps(n,e,t,r,s,o,d){const w={from:n,type:f.afrz,freezeAccount:r,assetIndex:t,freezeState:s,note:e,suggestedParams:o,reKeyTo:d};return new he(w)}function No(n){return Ps(n.from,n.note,n.assetIndex,n.freezeTarget,n.freezeState,n.suggestedParams,n.rekeyTo)}function qs(n,e,t,r,s,o,d,w,E){const C={type:f.axfer,from:n,to:e,amount:s,suggestedParams:w,assetIndex:d,note:o,assetRevocationTarget:r,closeRemainderTo:t,reKeyTo:E};return new he(C)}function Ko(n){return qs(n.from,n.to,n.closeRemainderTo,n.revocationTarget,n.amount,n.note,n.assetIndex,n.suggestedParams,n.rekeyTo)}function $s(n,e,t,r,s,o,d,w,E,C,_,N,ne,oe,J,se,qe,Ve){const tt={type:f.appl,from:n,suggestedParams:e,appIndex:0,appOnComplete:t,appLocalInts:o,appLocalByteSlices:d,appGlobalInts:w,appGlobalByteSlices:E,appApprovalProgram:r,appClearProgram:s,appArgs:C,appAccounts:_,appForeignApps:N,appForeignAssets:ne,boxes:Ve,note:oe,lease:J,reKeyTo:se,extraPages:qe};return new he(tt)}function zo(n){return $s(n.from,n.suggestedParams,n.onComplete,n.approvalProgram,n.clearProgram,n.numLocalInts,n.numLocalByteSlices,n.numGlobalInts,n.numGlobalByteSlices,n.appArgs,n.accounts,n.foreignApps,n.foreignAssets,n.note,n.lease,n.rekeyTo,n.extraPages,n.boxes)}function Ls(n,e,t,r,s,o,d,w,E,C,_,N,ne){const oe={type:f.appl,from:n,suggestedParams:e,appIndex:t,appApprovalProgram:r,appOnComplete:q.UpdateApplicationOC,appClearProgram:s,appArgs:o,appAccounts:d,appForeignApps:w,appForeignAssets:E,boxes:ne,note:C,lease:_,reKeyTo:N};return new he(oe)}function Go(n){return Ls(n.from,n.suggestedParams,n.appIndex,n.approvalProgram,n.clearProgram,n.appArgs,n.accounts,n.foreignApps,n.foreignAssets,n.note,n.lease,n.rekeyTo,n.boxes)}function Os(n,e,t,r,s,o,d,w,E,C,_){const N={type:f.appl,from:n,suggestedParams:e,appIndex:t,appOnComplete:q.DeleteApplicationOC,appArgs:r,appAccounts:s,appForeignApps:o,appForeignAssets:d,boxes:_,note:w,lease:E,reKeyTo:C};return new he(N)}function Ho(n){return Os(n.from,n.suggestedParams,n.appIndex,n.appArgs,n.accounts,n.foreignApps,n.foreignAssets,n.note,n.lease,n.rekeyTo,n.boxes)}function Ms(n,e,t,r,s,o,d,w,E,C,_){const N={type:f.appl,from:n,suggestedParams:e,appIndex:t,appOnComplete:q.OptInOC,appArgs:r,appAccounts:s,appForeignApps:o,appForeignAssets:d,boxes:_,note:w,lease:E,reKeyTo:C};return new he(N)}function Vo(n){return Ms(n.from,n.suggestedParams,n.appIndex,n.appArgs,n.accounts,n.foreignApps,n.foreignAssets,n.note,n.lease,n.rekeyTo,n.boxes)}function Ns(n,e,t,r,s,o,d,w,E,C,_){const N={type:f.appl,from:n,suggestedParams:e,appIndex:t,appOnComplete:q.CloseOutOC,appArgs:r,appAccounts:s,appForeignApps:o,appForeignAssets:d,boxes:_,note:w,lease:E,reKeyTo:C};return new he(N)}function Wo(n){return Ns(n.from,n.suggestedParams,n.appIndex,n.appArgs,n.accounts,n.foreignApps,n.foreignAssets,n.note,n.lease,n.rekeyTo,n.boxes)}function Ks(n,e,t,r,s,o,d,w,E,C,_){const N={type:f.appl,from:n,suggestedParams:e,appIndex:t,appOnComplete:q.ClearStateOC,appArgs:r,appAccounts:s,appForeignApps:o,appForeignAssets:d,boxes:_,note:w,lease:E,reKeyTo:C};return new he(N)}function Jo(n){return Ks(n.from,n.suggestedParams,n.appIndex,n.appArgs,n.accounts,n.foreignApps,n.foreignAssets,n.note,n.lease,n.rekeyTo,n.boxes)}function zs(n,e,t,r,s,o,d,w,E,C,_){const N={type:f.appl,from:n,suggestedParams:e,appIndex:t,appOnComplete:q.NoOpOC,appArgs:r,appAccounts:s,appForeignApps:o,appForeignAssets:d,boxes:_,note:w,lease:E,reKeyTo:C};return new he(N)}function Xo(n){return zs(n.from,n.suggestedParams,n.appIndex,n.appArgs,n.accounts,n.foreignApps,n.foreignAssets,n.note,n.lease,n.rekeyTo,n.boxes)}function Gs(n){const e={type:f.appl,from:n.from,suggestedParams:n.suggestedParams,appIndex:n.appIndex,appOnComplete:n.onComplete,appLocalInts:n.numLocalInts,appLocalByteSlices:n.numLocalByteSlices,appGlobalInts:n.numGlobalInts,appGlobalByteSlices:n.numGlobalByteSlices,appApprovalProgram:n.approvalProgram,appClearProgram:n.clearProgram,appArgs:n.appArgs,appAccounts:n.accounts,appForeignApps:n.foreignApps,appForeignAssets:n.foreignAssets,boxes:n.boxes,note:n.note,lease:n.lease,reKeyTo:n.rekeyTo,extraPages:n.extraPages};return new he(e)}function Yo(n){return(e,t)=>{const r=[];for(const s of t)r.push(e[s].signTxn(n.sk));return Promise.resolve(r)}}function Zo(n){return(e,t)=>{const r=[];for(const s of t){const{blob:o}=Yn(e[s],n);r.push(o)}return Promise.resolve(r)}}function Qo(n,e){return(t,r)=>{const s=[];for(const o of r){const d=t[o],w=[];for(const E of e){const{blob:C}=Fs(d,n,E);w.push(C)}s.push(Jr(w))}return Promise.resolve(s)}}function es(n){return typeof n=="object"&&Object.keys(n).length===2&&typeof n.txn=="object"&&typeof n.signer=="function"}const vt=2**16-1,Hs=32,Vs=1,Ws=1,Xe=2,ea=/^([a-z\d[\](),]+)\[(0|[1-9][\d]*)]$/,ta=/^ufixed([1-9][\d]*)x([1-9][\d]*)$/;class He{static from(e){if(e.endsWith("[]")){const t=He.from(e.slice(0,e.length-2));return new tn(t)}if(e.endsWith("]")){const t=e.match(ea);if(t.length!==3)throw new Error(`malformed static array string: ${e}`);const r=t[2],s=parseInt(r,10);if(s>vt)throw new Error(`array length exceeds limit ${vt}`);const o=He.from(t[1]);return new en(o,s)}if(e.startsWith("uint")){const t=o=>[...o].every(d=>"0123456789".includes(d)),r=e.slice(4,e.length);if(!t(r))throw new Error(`malformed uint string: ${r}`);const s=parseInt(r,10);if(s>vt)throw new Error(`malformed uint string: ${s}`);return new _t(s)}if(e==="byte")return new Zr;if(e.startsWith("ufixed")){const t=e.match(ta);if(t.length!==3)throw new Error(`malformed ufixed type: ${e}`);const r=parseInt(t[1],10),s=parseInt(t[2],10);return new Yr(r,s)}if(e==="bool")return new at;if(e==="address")return new Qt;if(e==="string")return new Qr;if(e.length>=2&&e[0]==="("&&e[e.length-1]===")"){const t=ut.parseTupleContent(e.slice(1,e.length-1)),r=[];for(let s=0;s<t.length;s++){const o=He.from(t[s]);r.push(o)}return new ut(r)}throw new Error(`cannot convert a string ${e} to an ABI type`)}}class _t extends He{constructor(e){if(super(),e%8!==0||e<8||e>512)throw new Error(`unsupported uint type bitSize: ${e}`);this.bitSize=e}toString(){return`uint${this.bitSize}`}equals(e){return e instanceof _t&&this.bitSize===e.bitSize}isDynamic(){return!1}byteLen(){return this.bitSize/8}encode(e){if(typeof e!="bigint"&&typeof e!="number")throw new Error(`Cannot encode value as uint${this.bitSize}: ${e}`);if(e>=BigInt(2**this.bitSize)||e<BigInt(0))throw new Error(`${e} is not a non-negative int or too big to fit in size uint${this.bitSize}`);if(typeof e=="number"&&!Number.isSafeInteger(e))throw new Error(`${e} should be converted into a BigInt before it is encoded`);return Ft(e,this.bitSize/8)}decode(e){if(e.length!==this.bitSize/8)throw new Error(`byte string must correspond to a uint${this.bitSize}`);return Hn(e)}}class Yr extends He{constructor(e,t){if(super(),e%8!==0||e<8||e>512)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 Yr&&this.bitSize===e.bitSize&&this.precision===e.precision}isDynamic(){return!1}byteLen(){return this.bitSize/8}encode(e){if(typeof e!="bigint"&&typeof e!="number")throw new Error(`Cannot encode value as ${this.toString()}: ${e}`);if(e>=BigInt(2**this.bitSize)||e<BigInt(0))throw new Error(`${e} is not a non-negative int or too big to fit in size ${this.toString()}`);if(typeof e=="number"&&!Number.isSafeInteger(e))throw new Error(`${e} should be converted into a BigInt before it is encoded`);return Ft(e,this.bitSize/8)}decode(e){if(e.length!==this.bitSize/8)throw new Error(`byte string must correspond to a ${this.toString()}`);return Hn(e)}}class Qt extends He{toString(){return"address"}equals(e){return e instanceof Qt}isDynamic(){return!1}byteLen(){return Hs}encode(e){if(typeof e!="string"&&!(e instanceof Uint8Array))throw new Error(`Cannot encode value as ${this.toString()}: ${e}`);if(typeof e=="string")return B(e).publicKey;if(e.byteLength!==32)throw new Error("byte string must be 32 bytes long for an address");return e}decode(e){if(e.byteLength!==32)throw new Error("byte string must be 32 bytes long for an address");return te(e)}}class at extends He{toString(){return"bool"}equals(e){return e instanceof at}isDynamic(){return!1}byteLen(){return Ws}encode(e){if(typeof e!="boolean")throw new Error(`Cannot encode value as bool: ${e}`);return e?new Uint8Array([128]):new Uint8Array([0])}decode(e){if(e.byteLength!==1)throw new Error("bool string must be 1 byte long");const t=e[0];if(t===128)return!0;if(t===0)return!1;throw new Error("boolean could not be decoded from the byte string")}}class Zr extends He{toString(){return"byte"}equals(e){return e instanceof Zr}isDynamic(){return!1}byteLen(){return Vs}encode(e){if(typeof e!="number"&&typeof e!="bigint")throw new Error(`Cannot encode value as byte: ${e}`);if(typeof e=="bigint"&&(e=Number(e)),e<0||e>255)throw new Error(`${e} cannot be encoded into a byte`);return new Uint8Array([e])}decode(e){if(e.byteLength!==1)throw new Error("byte string must be 1 byte long");return e[0]}}class Qr extends He{toString(){return"string"}equals(e){return e instanceof Qr}isDynamic(){return!0}byteLen(){throw new Error(`${this.toString()} is a dynamic type`)}encode(e){if(typeof e!="string"&&!(e instanceof Uint8Array))throw new Error(`Cannot encode value as string: ${e}`);const t=l.Buffer.from(e),r=Ft(t.length,Xe),s=new Uint8Array(t.length+Xe);return s.set(r),s.set(t,Xe),s}decode(e){if(e.length<Xe)throw new Error(`byte string is too short to be decoded. Actual length is ${e.length}, but expected at least ${Xe}`);const r=l.Buffer.from(e).readUIntBE(0,Xe),s=e.slice(Xe,e.length);if(r!==s.length)throw new Error(`string length bytes do not match the actual length of string. Expected ${r}, got ${s.length}`);return l.Buffer.from(s).toString("utf-8")}}class en extends He{constructor(e,t){if(super(),t<0)throw new Error(`static array must have a non negative length: ${t}`);this.childType=e,this.staticLength=t}toString(){return`${this.childType.toString()}[${this.staticLength}]`}equals(e){return e instanceof en&&this.staticLength===e.staticLength&&this.childType.equals(e.childType)}isDynamic(){return this.childType.isDynamic()}byteLen(){return this.childType.constructor===at?Math.ceil(this.staticLength/8):this.staticLength*this.childType.byteLen()}encode(e){if(!Array.isArray(e)&&!(e instanceof Uint8Array))throw new Error(`Cannot encode value as ${this.toString()}: ${e}`);if(e.length!==this.staticLength)throw new Error(`Value array does not match static array length. Expected ${this.staticLength}, got ${e.length}`);return this.toABITupleType().encode(e)}decode(e){return this.toABITupleType().decode(e)}toABITupleType(){return new ut(Array(this.staticLength).fill(this.childType))}}class tn extends He{constructor(e){super(),this.childType=e}toString(){return`${this.childType.toString()}[]`}equals(e){return e instanceof tn&&this.childType.equals(e.childType)}isDynamic(){return!0}byteLen(){throw new Error(`${this.toString()} is a dynamic type`)}encode(e){if(!Array.isArray(e)&&!(e instanceof Uint8Array))throw new Error(`Cannot encode value as ${this.toString()}: ${e}`);const t=this.toABITupleType(e.length),r=t.encode(e),s=Ft(t.childTypes.length,Xe);return R(s,r)}decode(e){const r=l.Buffer.from(e).readUIntBE(0,Xe);return this.toABITupleType(r).decode(e.slice(Xe,e.length))}toABITupleType(e){return new ut(Array(e).fill(this.childType))}}class ut extends He{constructor(e){if(super(),e.length>=vt)throw new Error("tuple type child type number larger than maximum uint16 error");this.childTypes=e}toString(){const e=[];for(let t=0;t<this.childTypes.length;t++)e[t]=this.childTypes[t].toString();return`(${e.join(",")})`}equals(e){return e instanceof ut&&this.childTypes.length===e.childTypes.length&&this.childTypes.every((t,r)=>t.equals(e.childTypes[r]))}isDynamic(){const e=t=>t.isDynamic();return this.childTypes.some(e)}byteLen(){let e=0;for(let t=0;t<this.childTypes.length;t++)if(this.childTypes[t].constructor===at){const r=er(this.childTypes,t,1),s=r+1;t+=r,e+=Math.trunc((s+7)/8)}else{const r=this.childTypes[t].byteLen();e+=r}return e}encode(e){if(!Array.isArray(e)&&!(e instanceof Uint8Array))throw new Error(`Cannot encode value as ${this.toString()}: ${e}`);const t=Array.from(e);if(e.length>vt)throw new Error("length of tuple array should not exceed a uint16");const r=this.childTypes,s=[],o=[],d=new Map;let w=0;for(;w<r.length;){const _=r[w];if(_.isDynamic())d.set(s.length,!0),s.push(new Uint8Array([0,0])),o.push(_.encode(t[w]));else{if(_.constructor===at){const N=er(r,w,-1);let ne=er(r,w,1);if(N%8!==0)throw new Error("expected before index should have number of bool mod 8 equal 0");ne=Math.min(7,ne);const oe=ra(t.slice(w,w+ne+1));s.push(Ft(oe,1)),w+=ne}else{const N=_.encode(t[w]);s.push(N)}d.set(w,!1),o.push(new Uint8Array)}w+=1}let E=0;for(const _ of s)E+=_.length;let C=0;for(let _=0;_<s.length;_++){if(d.get(_)){const N=E+C;if(N>vt)throw new Error(`byte length of ${N} should not exceed a uint16`);s[_]=Ft(N,Xe)}C+=o[_].length}return R(...s,...o)}decode(e){const t=this.childTypes,r=[],s=[];let o=0,d=0;const w=l.Buffer.from(e);for(;o<t.length;){const _=t[o];if(_.isDynamic()){if(e.slice(d,e.length).length<Xe)throw new Error("dynamic type in tuple is too short to be decoded");const N=w.readUIntBE(d,Xe);if(r.length>0&&(r[r.length-1].right=N,N<r[r.length-1].left))throw new Error("dynamic index segment miscalculation: left is greater than right index");const ne={left:N,right:-1};r.push(ne),s.push(null),d+=Xe}else if(_.constructor===at){const N=er(this.childTypes,o,-1);let ne=er(this.childTypes,o,1);if(N%8!==0)throw new Error("expected before bool number mod 8 === 0");ne=Math.min(7,ne);for(let oe=0;oe<=ne;oe++){const J=128>>oe;(e[d]&J)>0?s.push(new Uint8Array([128])):s.push(new Uint8Array([0]))}o+=ne,d+=1}else{const N=_.byteLen();s.push(e.slice(d,d+N)),d+=N}if(o!==t.length-1&&d>=e.length)throw new Error("input byte not enough to decode");o+=1}if(r.length>0&&(r[r.length-1].right=e.length,d=e.length),d<e.length)throw new Error("input byte not fully consumed");for(let _=0;_<r.length;_++){const N=r[_];if(N.left>N.right)throw new Error("dynamic segment should display a [l, r] space with l <= r");if(_!==r.length-1&&N.right!==r[_+1].left)throw new Error("dynamic segment should be consecutive")}let E=0;for(let _=0;_<t.length;_++)t[_].isDynamic()&&(s[_]=e.slice(r[E].left,r[E].right),E+=1);const C=[];for(let _=0;_<t.length;_++){const N=t[_].decode(s[_]);C.push(N)}return C}static parseTupleContent(e){if(e.length===0)return[];if(e.endsWith(",")||e.startsWith(","))throw new Error("tuple string should not start with comma");if(e.includes(",,"))throw new Error("tuple string should not have consecutive commas");const t=[];let r=0,s="";for(const o of e)s+=o,o==="("?r+=1:o===")"?r-=1:o===","&&r===0&&(t.push(s.slice(0,s.length-1)),s="");if(s.length!==0&&t.push(s),r!==0)throw new Error("tuple string has mismatched parentheses");return t}}function ra(n){let e=0;if(n.length>8)throw new Error("value list passed in should be no greater than length 8");for(let t=0;t<n.length;t++){const r=n[t];if(typeof r!="boolean")throw new Error("non-boolean values cannot be compressed into a byte");r&&(e|=1<<7-t)}return e}function er(n,e,t){let r=0;for(;;){const s=e+t*r;if(n[s].constructor===at)if(s!==n.length-1&&t===1)r+=1;else if(s>0&&t===-1)r+=1;else break;else{r-=1;break}}return r}var st;(function(n){n.any="txn",n.pay="pay",n.keyreg="keyreg",n.acfg="acfg",n.axfer="axfer",n.afrz="afrz",n.appl="appl"})(st||(st={}));function rn(n){return n===st.any||n===st.pay||n===st.keyreg||n===st.acfg||n===st.axfer||n===st.afrz||n===st.appl}function Js(n,e){return n===st.any?!0:e.type&&e.type.toString()===n.toString()}var ct;(function(n){n.account="account",n.application="application",n.asset="asset"})(ct||(ct={}));function ts(n){return n===ct.account||n===ct.application||n===ct.asset}function na(n){const e=n.indexOf("(");if(e===-1)throw new Error(`Invalid method signature: ${n}`);let t=-1,r=0;for(let s=e;s<n.length;s++){const o=n[s];if(o==="(")r+=1;else if(o===")"){if(r===0)break;if(r-=1,r===0){t=s;break}}}if(t===-1)throw new Error(`Invalid method signature: ${n}`);return{name:n.slice(0,e),args:ut.parseTupleContent(n.slice(e+1,t)),returns:n.slice(t+1)}}class Pt{constructor(e){if(typeof e.name!="string"||typeof e.returns!="object"||!Array.isArray(e.args))throw new Error("Invalid ABIMethod parameters");this.name=e.name,this.description=e.desc,this.args=e.args.map(({type:t,name:r,desc:s})=>rn(t)||ts(t)?{type:t,name:r,description:s}:{type:He.from(t),name:r,description:s}),this.returns={type:e.returns.type==="void"?e.returns.type:He.from(e.returns.type),description:e.returns.desc}}getSignature(){const e=this.args.map(r=>r.type.toString()).join(","),t=this.returns.type.toString();return`${this.name}(${e})${t}`}getSelector(){const e=X(this.getSignature());return new Uint8Array(e.slice(0,4))}txnCount(){let e=1;for(const t of this.args)typeof t.type=="string"&&rn(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:s}=na(e);return new Pt({name:t,args:r.map(o=>({type:o})),returns:{type:s}})}}function rs(n,e){if(n===null||!Array.isArray(n)||!n.every(r=>r instanceof Pt))throw new Error("Methods list provided is null or not the correct type");const t=n.filter(r=>r.name===e);if(t.length>1)throw new Error(`found ${t.length} methods with the same name ${t.map(r=>r.getSignature()).join(",")}`);if(t.length===0)throw new Error(`found 0 methods with the name ${e}`);return t[0]}class sa{constructor(e){if(typeof e.name!="string"||!Array.isArray(e.methods)||e.networks&&typeof e.networks!="object")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(t=>new Pt(t))}toJSON(){return{name:this.name,desc:this.description,networks:this.networks,methods:this.methods.map(e=>e.toJSON())}}getMethodByName(e){return rs(this.methods,e)}}class ia{constructor(e){if(typeof e.name!="string"||!Array.isArray(e.methods))throw new Error("Invalid ABIInterface parameters");this.name=e.name,this.description=e.desc,this.methods=e.methods.map(t=>new Pt(t))}toJSON(){return{name:this.name,desc:this.description,methods:this.methods.map(e=>e.toJSON())}}getMethodByName(e){return rs(this.methods,e)}}const oa=l.Buffer.from([21,31,124,117]),tr=16;var Ye;(function(n){n[n.BUILDING=0]="BUILDING",n[n.BUILT=1]="BUILT",n[n.SIGNED=2]="SIGNED",n[n.SUBMITTED=3]="SUBMITTED",n[n.COMMITTED=4]="COMMITTED"})(Ye||(Ye={}));function ns(n,e,t){if(t!=null&&n===t)return 0;const r=t==null?0:1;for(let s=0;s<e.length;s++)if(n===e[s])return s+r;return e.push(n),e.length-1+r}class pt{constructor(){this.status=Ye.BUILDING,this.transactions=[],this.methodCalls=new Map,this.signedTxns=[],this.txIDs=[]}getStatus(){return this.status}count(){return this.transactions.length}clone(){const e=new pt;return e.transactions=this.transactions.map(({txn:t,signer:r})=>({txn:he.from_obj_for_encoding({...t.get_obj_for_encoding(),grp:void 0}),signer:r})),e.methodCalls=new Map(this.methodCalls),e}addTransaction(e){if(this.status!==Ye.BUILDING)throw new Error("Cannot add transactions when composer status is not BUILDING");if(this.transactions.length===pt.MAX_GROUP_SIZE)throw new Error(`Adding an additional transaction exceeds the maximum atomic group size of ${pt.MAX_GROUP_SIZE}`);if(e.txn.group&&e.txn.group.some(t=>t!==0))throw new Error("Cannot add a transaction with nonzero group ID");this.transactions.push(e)}addMethodCall({appID:e,method:t,methodArgs:r,sender:s,suggestedParams:o,onComplete:d,approvalProgram:w,clearProgram:E,numGlobalInts:C,numGlobalByteSlices:_,numLocalInts:N,numLocalByteSlices:ne,extraPages:oe,appAccounts:J,appForeignApps:se,appForeignAssets:qe,boxes:Ve,note:tt,lease:Et,rekeyTo:Tt,signer:Rt}){if(this.status!==Ye.BUILDING)throw new Error("Cannot add transactions when composer status is not BUILDING");if(this.transactions.length+t.txnCount()>pt.MAX_GROUP_SIZE)throw new Error(`Adding additional transactions exceeds the maximum atomic group size of ${pt.MAX_GROUP_SIZE}`);if(e===0){if(w==null||E==null||C==null||_==null||N==null||ne==null)throw new Error("One of the following required parameters for application creation is missing: approvalProgram, clearProgram, numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices")}else if(d===q.UpdateApplicationOC){if(w==null||E==null)throw new Error("One of the following required parameters for OnApplicationComplete.UpdateApplicationOC is missing: approvalProgram, clearProgram");if(C!=null||_!=null||N!=null||ne!=null||oe!=null)throw new Error("One of the following application creation parameters were set on a non-creation call: numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices, extraPages")}else if(w!=null||E!=null||C!=null||_!=null||N!=null||ne!=null||oe!=null)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(r==null&&(r=[]),r.length!==t.args.length)throw new Error(`Incorrect number of method arguments. Expected ${t.args.length}, got ${r.length}`);let Ze=[],Qe=[];const gt=[],mt=[],yt=[],nn=new Map,ss=Ve||[];for(let Se=0;Se<r.length;Se++){let We=t.args[Se].type;const nt=r[Se];if(rn(We)){if(!es(nt)||!Js(We,nt.txn))throw new Error(`Expected ${We} transaction for argument at index ${Se}`);if(nt.txn.group&&nt.txn.group.some(qt=>qt!==0))throw new Error("Cannot add a transaction with nonzero group ID");gt.push(nt);continue}if(es(nt))throw new Error(`Expected non-transaction value for argument at index ${Se}`);if(ts(We)&&(nn.set(mt.length,Ze.length),mt.push(We),yt.push(nt),We=new _t(8)),typeof We=="string")throw new Error(`Unknown ABI type: ${We}`);Ze.push(We),Qe.push(nt)}const rr=[],sn=J==null?[]:J.slice(),on=se==null?[]:se.slice(),an=qe==null?[]:qe.slice();for(let Se=0;Se<mt.length;Se++){const We=mt[Se],nt=yt[Se];let qt=0;switch(We){case ct.account:{const wt=new Qt,ft=wt.decode(wt.encode(nt));qt=ns(ft,sn,s);break}case ct.application:{const wt=new _t(64),ft=wt.decode(wt.encode(nt));if(ft>Number.MAX_SAFE_INTEGER)throw new Error(`Expected safe integer for application value, got ${ft}`);qt=ns(Number(ft),on,e);break}case ct.asset:{const wt=new _t(64),ft=wt.decode(wt.encode(nt));if(ft>Number.MAX_SAFE_INTEGER)throw new Error(`Expected safe integer for asset value, got ${ft}`);qt=ns(Number(ft),an);break}default:throw new Error(`Unknown reference type: ${We}`)}rr.push(qt)}for(let Se=0;Se<rr.length;Se++){const We=nn.get(Se);Qe[We]=rr[Se]}if(Ze.length>tr-1){const Se=Ze.slice(tr-2),We=Qe.slice(tr-2);Ze=Ze.slice(0,tr-2),Qe=Qe.slice(0,tr-2),Ze.push(new ut(Se)),Qe.push(We)}const un=[t.getSelector()];for(let Se=0;Se<Ze.length;Se++)un.push(Ze[Se].encode(Qe[Se]));const is={txn:Gs({from:s,appIndex:e,appArgs:un,accounts:sn,foreignApps:on,foreignAssets:an,boxes:ss,onComplete:d==null?q.NoOpOC:d,approvalProgram:w,clearProgram:E,numGlobalInts:C,numGlobalByteSlices:_,numLocalInts:N,numLocalByteSlices:ne,extraPages:oe,lease:Et,note:tt,rekeyTo:Tt,suggestedParams:o}),signer:Rt};this.transactions.push(...gt,is),this.methodCalls.set(this.transactions.length-1,t)}buildGroup(){if(this.status===Ye.BUILDING){if(this.transactions.length===0)throw new Error("Cannot build a group with 0 transactions");this.transactions.length>1&&ms(this.transactions.map(e=>e.txn)),this.status=Ye.BUILT}return this.transactions}async gatherSignatures(){if(this.status>=Ye.SIGNED)return this.signedTxns;const e=this.buildGroup(),t=e.map(E=>E.txn),r=new Map;for(let E=0;E<e.length;E++){const{signer:C}=e[E];r.has(C)||r.set(C,[]),r.get(C).push(E)}const s=Array.from(r),o=await Promise.all(s.map(([E,C])=>E(t,C))),d=e.map(()=>null);for(let E=0;E<s.length;E++){const C=s[E][1],_=o[E];for(let N=0;N<C.length;N++)d[C[N]]=_[N]}if(!d.every(E=>E!=null))throw new Error(`Missing signatures. Got ${d}`);const w=d.map((E,C)=>{try{return Ne(E).txn.txID()}catch(_){throw new Error(`Cannot decode signed transaction at index ${C}. ${_}`)}});return this.signedTxns=d,this.txIDs=w,this.status=Ye.SIGNED,d}async submit(e){if(this.status>Ye.SUBMITTED)throw new Error("Transaction group cannot be resubmitted");const t=await this.gatherSignatures();return await e.sendRawTransaction(t).do(),this.status=Ye.SUBMITTED,this.txIDs}async execute(e,t){if(this.status===Ye.COMMITTED)throw new Error("Transaction group has already been executed successfully");const r=await this.submit(e);this.status=Ye.SUBMITTED;const s=this.transactions.findIndex((C,_)=>this.methodCalls.has(_)),d=await fs(e,r[s===-1?0:s],t);this.status=Ye.COMMITTED;const w=d["confirmed-round"],E=[];for(const[C,_]of this.methodCalls){const N=r[C],ne={txID:N,rawReturnValue:new Uint8Array,method:_};try{const oe=C===s?d:await e.pendingTransactionInformation(N).do();if(ne.txInfo=oe,_.returns.type!=="void"){const J=oe.logs||[];if(J.length===0)throw new Error("App call transaction did not log a return value");const se=l.Buffer.from(J[J.length-1],"base64");if(se.byteLength<4||!se.slice(0,4).equals(oa))throw new Error("App call transaction did not log a return value");ne.rawReturnValue=new Uint8Array(se.slice(4)),ne.returnValue=_.returns.type.decode(ne.rawReturnValue)}}catch(oe){ne.decodeError=oe}E.push(ne)}return{confirmedRound:w,txIDs:r,methodResults:E}}}pt.MAX_GROUP_SIZE=16;const Xs=l.Buffer.from([77,88]),Ys="The transaction sender address and multisig preimage do not match.";function aa(n,e){if(typeof n.from>"u"){const r=ie(e);n.from=te(r.publicKey)}const t=Re(n);return{txID:t.txID().toString(),blob:t.signTxn(e)}}function ua(n,e){return new Zs(n).signBid(e)}function ca(n,e){const t=l.Buffer.from(R(Xs,n));return fe(t,e)}function fa(n,e,t){const r=l.Buffer.from(R(Xs,n)),s=B(t).publicKey;return Y(r,e,s)}function la(n){return new Uint8Array(a(n))}function ha(n){return u(n)}const da=new Error(Ys),pa=new Error(cn);var ga=Z},54098:function(ke,Je){var le=typeof self<"u"?self:this,ye=function(){function Z(){this.fetch=!1,this.DOMException=le.DOMException}return Z.prototype=le,new Z}();(function(Z){var l=function(K){var L={searchParams:"URLSearchParams"in Z,iterable:"Symbol"in Z&&"iterator"in Symbol,blob:"FileReader"in Z&&"Blob"in Z&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in Z,arrayBuffer:"ArrayBuffer"in Z};function I(h){return h&&DataView.prototype.isPrototypeOf(h)}if(L.arrayBuffer)var D=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],X=ArrayBuffer.isView||function(h){return h&&D.indexOf(Object.prototype.toString.call(h))>-1};function Fe(h){if(typeof h!="string"&&(h=String(h)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(h))throw new TypeError("Invalid character in header field name");return h.toLowerCase()}function be(h){return typeof h!="string"&&(h=String(h)),h}function m(h){var x={next:function(){var v=h.shift();return{done:v===void 0,value:v}}};return L.iterable&&(x[Symbol.iterator]=function(){return x}),x}function ce(h){this.map={},h instanceof ce?h.forEach(function(x,v){this.append(v,x)},this):Array.isArray(h)?h.forEach(function(x){this.append(x[0],x[1])},this):h&&Object.getOwnPropertyNames(h).forEach(function(x){this.append(x,h[x])},this)}ce.prototype.append=function(h,x){h=Fe(h),x=be(x);var v=this.map[h];this.map[h]=v?v+", "+x:x},ce.prototype.delete=function(h){delete this.map[Fe(h)]},ce.prototype.get=function(h){return h=Fe(h),this.has(h)?this.map[h]:null},ce.prototype.has=function(h){return this.map.hasOwnProperty(Fe(h))},ce.prototype.set=function(h,x){this.map[Fe(h)]=be(x)},ce.prototype.forEach=function(h,x){for(var v in this.map)this.map.hasOwnProperty(v)&&h.call(x,this.map[v],v,this)},ce.prototype.keys=function(){var h=[];return this.forEach(function(x,v){h.push(v)}),m(h)},ce.prototype.values=function(){var h=[];return this.forEach(function(x){h.push(x)}),m(h)},ce.prototype.entries=function(){var h=[];return this.forEach(function(x,v){h.push([v,x])}),m(h)},L.iterable&&(ce.prototype[Symbol.iterator]=ce.prototype.entries);function ie(h){if(h.bodyUsed)return Promise.reject(new TypeError("Already read"));h.bodyUsed=!0}function fe(h){return new Promise(function(x,v){h.onload=function(){x(h.result)},h.onerror=function(){v(h.error)}})}function Ee(h){var x=new FileReader,v=fe(x);return x.readAsArrayBuffer(h),v}function Y(h){var x=new FileReader,v=fe(x);return x.readAsText(h),v}function _e(h){for(var x=new Uint8Array(h),v=new Array(x.length),R=0;R<x.length;R++)v[R]=String.fromCharCode(x[R]);return v.join("")}function A(h){if(h.slice)return h.slice(0);var x=new Uint8Array(h.byteLength);return x.set(new Uint8Array(h)),x.buffer}function F(){return this.bodyUsed=!1,this._initBody=function(h){this._bodyInit=h,h?typeof h=="string"?this._bodyText=h:L.blob&&Blob.prototype.isPrototypeOf(h)?this._bodyBlob=h:L.formData&&FormData.prototype.isPrototypeOf(h)?this._bodyFormData=h:L.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)?this._bodyText=h.toString():L.arrayBuffer&&L.blob&&I(h)?(this._bodyArrayBuffer=A(h.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):L.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(h)||X(h))?this._bodyArrayBuffer=A(h):this._bodyText=h=Object.prototype.toString.call(h):this._bodyText="",this.headers.get("content-type")||(typeof h=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):L.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},L.blob&&(this.blob=function(){var h=ie(this);if(h)return h;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?ie(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(Ee)}),this.text=function(){var h=ie(this);if(h)return h;if(this._bodyBlob)return Y(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(_e(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},L.formData&&(this.formData=function(){return this.text().then(z)}),this.json=function(){return this.text().then(JSON.parse)},this}var T=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function j(h){var x=h.toUpperCase();return T.indexOf(x)>-1?x:h}function O(h,x){x=x||{};var v=x.body;if(h instanceof O){if(h.bodyUsed)throw new TypeError("Already read");this.url=h.url,this.credentials=h.credentials,x.headers||(this.headers=new ce(h.headers)),this.method=h.method,this.mode=h.mode,this.signal=h.signal,!v&&h._bodyInit!=null&&(v=h._bodyInit,h.bodyUsed=!0)}else this.url=String(h);if(this.credentials=x.credentials||this.credentials||"same-origin",(x.headers||!this.headers)&&(this.headers=new ce(x.headers)),this.method=j(x.method||this.method||"GET"),this.mode=x.mode||this.mode||null,this.signal=x.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&v)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(v)}O.prototype.clone=function(){return new O(this,{body:this._bodyInit})};function z(h){var x=new FormData;return h.trim().split("&").forEach(function(v){if(v){var R=v.split("="),W=R.shift().replace(/\+/g," "),Q=R.join("=").replace(/\+/g," ");x.append(decodeURIComponent(W),decodeURIComponent(Q))}}),x}function g(h){var x=new ce,v=h.replace(/\r?\n[\t ]+/g," ");return v.split(/\r?\n/).forEach(function(R){var W=R.split(":"),Q=W.shift().trim();if(Q){var xe=W.join(":").trim();x.append(Q,xe)}}),x}F.call(O.prototype);function U(h,x){x||(x={}),this.type="default",this.status=x.status===void 0?200:x.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in x?x.statusText:"OK",this.headers=new ce(x.headers),this.url=x.url||"",this._initBody(h)}F.call(U.prototype),U.prototype.clone=function(){return new U(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new ce(this.headers),url:this.url})},U.error=function(){var h=new U(null,{status:0,statusText:""});return h.type="error",h};var S=[301,302,303,307,308];U.redirect=function(h,x){if(S.indexOf(x)===-1)throw new RangeError("Invalid status code");return new U(null,{status:x,headers:{location:h}})},K.DOMException=Z.DOMException;try{new K.DOMException}catch{K.DOMException=function(x,v){this.message=x,this.name=v;var R=Error(x);this.stack=R.stack},K.DOMException.prototype=Object.create(Error.prototype),K.DOMException.prototype.constructor=K.DOMException}function $(h,x){return new Promise(function(v,R){var W=new O(h,x);if(W.signal&&W.signal.aborted)return R(new K.DOMException("Aborted","AbortError"));var Q=new XMLHttpRequest;function xe(){Q.abort()}Q.onload=function(){var pe={status:Q.status,statusText:Q.statusText,headers:g(Q.getAllResponseHeaders()||"")};pe.url="responseURL"in Q?Q.responseURL:pe.headers.get("X-Request-URL");var Ae="response"in Q?Q.response:Q.responseText;v(new U(Ae,pe))},Q.onerror=function(){R(new TypeError("Network request failed"))},Q.ontimeout=function(){R(new TypeError("Network request failed"))},Q.onabort=function(){R(new K.DOMException("Aborted","AbortError"))},Q.open(W.method,W.url,!0),W.credentials==="include"?Q.withCredentials=!0:W.credentials==="omit"&&(Q.withCredentials=!1),"responseType"in Q&&L.blob&&(Q.responseType="blob"),W.headers.forEach(function(pe,Ae){Q.setRequestHeader(Ae,pe)}),W.signal&&(W.signal.addEventListener("abort",xe),Q.onreadystatechange=function(){Q.readyState===4&&W.signal.removeEventListener("abort",xe)}),Q.send(typeof W._bodyInit>"u"?null:W._bodyInit)})}return $.polyfill=!0,Z.fetch||(Z.fetch=$,Z.Headers=ce,Z.Request=O,Z.Response=U),K.Headers=ce,K.Request=O,K.Response=U,K.fetch=$,Object.defineProperty(K,"__esModule",{value:!0}),K}({})})(ye),ye.fetch.ponyfill=!0,delete ye.fetch.polyfill;var we=ye;Je=we.fetch,Je.default=we.fetch,Je.fetch=we.fetch,Je.Headers=we.Headers,Je.Request=we.Request,Je.Response=we.Response,ke.exports=Je},89090:function(ke,Je,le){var ye=le(34155),we;/*
5
5
  * [hi-base32]{@link https://github.com/emn178/hi-base32}
6
6
  *
7
7
  * @version 0.5.0
8
8
  * @author Chen, Yi-Cyuan [emn178@gmail.com]
9
9
  * @copyright Chen, Yi-Cyuan 2015-2018
10
10
  * @license MIT
11
- */(function(){"use strict";var J=typeof window=="object"?window:{},l=!J.HI_BASE32_NO_NODE_JS&&typeof de=="object"&&de.versions&&de.versions.node;l&&(J=ce.g);var N=!J.HI_BASE32_NO_COMMON_JS&&!0&&Be.exports,L=ce.amdO,k="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".split(""),D={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},Y=[0,0,0,0,0,0,0,0],Fe=function(A,F){F.length>10&&(F="..."+F.substr(-10));var T=new Error("Decoded data is not valid UTF-8. Maybe try base32.decode.asBytes()? Partial data after reading "+A+" bytes: "+F+" <-");throw T.position=A,T},be=function(A){for(var F="",T=A.length,j=0,O=0,z,g;j<T;){if(z=A[j++],z<=127){F+=String.fromCharCode(z);continue}else z>191&&z<=223?(g=z&31,O=1):z<=239?(g=z&15,O=2):z<=247?(g=z&7,O=3):Fe(j,F);for(var U=0;U<O;++U)z=A[j++],(z<128||z>191)&&Fe(j,F),g<<=6,g+=z&63;g>=55296&&g<=57343&&Fe(j,F),g>1114111&&Fe(j,F),g<=65535?F+=String.fromCharCode(g):(g-=65536,F+=String.fromCharCode((g>>10)+55296),F+=String.fromCharCode((g&1023)+56320))}return F},m=function(A){if(A==="")return[];if(!/^[A-Z2-7=]+$/.test(A))throw new Error("Invalid base32 characters");A=A.replace(/=/g,"");for(var F,T,j,O,z,g,U,S,$=[],h=0,x=A.length,v=0,R=x>>3<<3;v<R;)F=D[A.charAt(v++)],T=D[A.charAt(v++)],j=D[A.charAt(v++)],O=D[A.charAt(v++)],z=D[A.charAt(v++)],g=D[A.charAt(v++)],U=D[A.charAt(v++)],S=D[A.charAt(v++)],$[h++]=(F<<3|T>>>2)&255,$[h++]=(T<<6|j<<1|O>>>4)&255,$[h++]=(O<<4|z>>>1)&255,$[h++]=(z<<7|g<<2|U>>>3)&255,$[h++]=(U<<5|S)&255;var W=x-R;return W===2?(F=D[A.charAt(v++)],T=D[A.charAt(v++)],$[h++]=(F<<3|T>>>2)&255):W===4?(F=D[A.charAt(v++)],T=D[A.charAt(v++)],j=D[A.charAt(v++)],O=D[A.charAt(v++)],$[h++]=(F<<3|T>>>2)&255,$[h++]=(T<<6|j<<1|O>>>4)&255):W===5?(F=D[A.charAt(v++)],T=D[A.charAt(v++)],j=D[A.charAt(v++)],O=D[A.charAt(v++)],z=D[A.charAt(v++)],$[h++]=(F<<3|T>>>2)&255,$[h++]=(T<<6|j<<1|O>>>4)&255,$[h++]=(O<<4|z>>>1)&255):W===7&&(F=D[A.charAt(v++)],T=D[A.charAt(v++)],j=D[A.charAt(v++)],O=D[A.charAt(v++)],z=D[A.charAt(v++)],g=D[A.charAt(v++)],U=D[A.charAt(v++)],$[h++]=(F<<3|T>>>2)&255,$[h++]=(T<<6|j<<1|O>>>4)&255,$[h++]=(O<<4|z>>>1)&255,$[h++]=(z<<7|g<<2|U>>>3)&255),$},fe=function(A){for(var F,T,j,O,z,g="",U=A.length,S=0,$=parseInt(U/5)*5;S<$;)F=A.charCodeAt(S++),T=A.charCodeAt(S++),j=A.charCodeAt(S++),O=A.charCodeAt(S++),z=A.charCodeAt(S++),g+=k[F>>>3]+k[(F<<2|T>>>6)&31]+k[T>>>1&31]+k[(T<<4|j>>>4)&31]+k[(j<<1|O>>>7)&31]+k[O>>>2&31]+k[(O<<3|z>>>5)&31]+k[z&31];var h=U-$;return h===1?(F=A.charCodeAt(S),g+=k[F>>>3]+k[F<<2&31]+"======"):h===2?(F=A.charCodeAt(S++),T=A.charCodeAt(S),g+=k[F>>>3]+k[(F<<2|T>>>6)&31]+k[T>>>1&31]+k[T<<4&31]+"===="):h===3?(F=A.charCodeAt(S++),T=A.charCodeAt(S++),j=A.charCodeAt(S),g+=k[F>>>3]+k[(F<<2|T>>>6)&31]+k[T>>>1&31]+k[(T<<4|j>>>4)&31]+k[j<<1&31]+"==="):h===4&&(F=A.charCodeAt(S++),T=A.charCodeAt(S++),j=A.charCodeAt(S++),O=A.charCodeAt(S),g+=k[F>>>3]+k[(F<<2|T>>>6)&31]+k[T>>>1&31]+k[(T<<4|j>>>4)&31]+k[(j<<1|O>>>7)&31]+k[O>>>2&31]+k[O<<3&31]+"="),g},ie=function(A){var F,T,j,O,z,g,U=!1,S="",$=0,h,x=0,v=0,R=A.length;if(A==="")return S;do{for(Y[0]=Y[5],Y[1]=Y[6],Y[2]=Y[7],h=x;$<R&&h<5;++$)g=A.charCodeAt($),g<128?Y[h++]=g:g<2048?(Y[h++]=192|g>>6,Y[h++]=128|g&63):g<55296||g>=57344?(Y[h++]=224|g>>12,Y[h++]=128|g>>6&63,Y[h++]=128|g&63):(g=65536+((g&1023)<<10|A.charCodeAt(++$)&1023),Y[h++]=240|g>>18,Y[h++]=128|g>>12&63,Y[h++]=128|g>>6&63,Y[h++]=128|g&63);v+=h-x,x=h-5,$===R&&++$,$>R&&h<6&&(U=!0),F=Y[0],h>4?(T=Y[1],j=Y[2],O=Y[3],z=Y[4],S+=k[F>>>3]+k[(F<<2|T>>>6)&31]+k[T>>>1&31]+k[(T<<4|j>>>4)&31]+k[(j<<1|O>>>7)&31]+k[O>>>2&31]+k[(O<<3|z>>>5)&31]+k[z&31]):h===1?S+=k[F>>>3]+k[F<<2&31]+"======":h===2?(T=Y[1],S+=k[F>>>3]+k[(F<<2|T>>>6)&31]+k[T>>>1&31]+k[T<<4&31]+"===="):h===3?(T=Y[1],j=Y[2],S+=k[F>>>3]+k[(F<<2|T>>>6)&31]+k[T>>>1&31]+k[(T<<4|j>>>4)&31]+k[j<<1&31]+"==="):(T=Y[1],j=Y[2],O=Y[3],S+=k[F>>>3]+k[(F<<2|T>>>6)&31]+k[T>>>1&31]+k[(T<<4|j>>>4)&31]+k[(j<<1|O>>>7)&31]+k[O>>>2&31]+k[O<<3&31]+"=")}while(!U);return S},le=function(A){for(var F,T,j,O,z,g="",U=A.length,S=0,$=parseInt(U/5)*5;S<$;)F=A[S++],T=A[S++],j=A[S++],O=A[S++],z=A[S++],g+=k[F>>>3]+k[(F<<2|T>>>6)&31]+k[T>>>1&31]+k[(T<<4|j>>>4)&31]+k[(j<<1|O>>>7)&31]+k[O>>>2&31]+k[(O<<3|z>>>5)&31]+k[z&31];var h=U-$;return h===1?(F=A[S],g+=k[F>>>3]+k[F<<2&31]+"======"):h===2?(F=A[S++],T=A[S],g+=k[F>>>3]+k[(F<<2|T>>>6)&31]+k[T>>>1&31]+k[T<<4&31]+"===="):h===3?(F=A[S++],T=A[S++],j=A[S],g+=k[F>>>3]+k[(F<<2|T>>>6)&31]+k[T>>>1&31]+k[(T<<4|j>>>4)&31]+k[j<<1&31]+"==="):h===4&&(F=A[S++],T=A[S++],j=A[S++],O=A[S],g+=k[F>>>3]+k[(F<<2|T>>>6)&31]+k[T>>>1&31]+k[(T<<4|j>>>4)&31]+k[(j<<1|O>>>7)&31]+k[O>>>2&31]+k[O<<3&31]+"="),g},Ee=function(A,F){var T=typeof A!="string";return T&&A.constructor===ArrayBuffer&&(A=new Uint8Array(A)),T?le(A):F?fe(A):ie(A)},Z=function(A,F){if(!F)return be(m(A));if(A==="")return"";if(!/^[A-Z2-7=]+$/.test(A))throw new Error("Invalid base32 characters");var T,j,O,z,g,U,S,$,h="",x=A.indexOf("=");x===-1&&(x=A.length);for(var v=0,R=x>>3<<3;v<R;)T=D[A.charAt(v++)],j=D[A.charAt(v++)],O=D[A.charAt(v++)],z=D[A.charAt(v++)],g=D[A.charAt(v++)],U=D[A.charAt(v++)],S=D[A.charAt(v++)],$=D[A.charAt(v++)],h+=String.fromCharCode((T<<3|j>>>2)&255)+String.fromCharCode((j<<6|O<<1|z>>>4)&255)+String.fromCharCode((z<<4|g>>>1)&255)+String.fromCharCode((g<<7|U<<2|S>>>3)&255)+String.fromCharCode((S<<5|$)&255);var W=x-R;return W===2?(T=D[A.charAt(v++)],j=D[A.charAt(v++)],h+=String.fromCharCode((T<<3|j>>>2)&255)):W===4?(T=D[A.charAt(v++)],j=D[A.charAt(v++)],O=D[A.charAt(v++)],z=D[A.charAt(v++)],h+=String.fromCharCode((T<<3|j>>>2)&255)+String.fromCharCode((j<<6|O<<1|z>>>4)&255)):W===5?(T=D[A.charAt(v++)],j=D[A.charAt(v++)],O=D[A.charAt(v++)],z=D[A.charAt(v++)],g=D[A.charAt(v++)],h+=String.fromCharCode((T<<3|j>>>2)&255)+String.fromCharCode((j<<6|O<<1|z>>>4)&255)+String.fromCharCode((z<<4|g>>>1)&255)):W===7&&(T=D[A.charAt(v++)],j=D[A.charAt(v++)],O=D[A.charAt(v++)],z=D[A.charAt(v++)],g=D[A.charAt(v++)],U=D[A.charAt(v++)],S=D[A.charAt(v++)],h+=String.fromCharCode((T<<3|j>>>2)&255)+String.fromCharCode((j<<6|O<<1|z>>>4)&255)+String.fromCharCode((z<<4|g>>>1)&255)+String.fromCharCode((g<<7|U<<2|S>>>3)&255)),h},_e={encode:Ee,decode:Z};Z.asBytes=m,N?Be.exports=_e:(J.base32=_e,L&&(ye=function(){return _e}.call(_e,ce,_e,Be),ye!==void 0&&(Be.exports=ye)))})()},93434:function(Be,Ke,ce){var de=ce(34155),ye;/*
11
+ */(function(){"use strict";var Z=typeof window=="object"?window:{},l=!Z.HI_BASE32_NO_NODE_JS&&typeof ye=="object"&&ye.versions&&ye.versions.node;l&&(Z=le.g);var K=!Z.HI_BASE32_NO_COMMON_JS&&!0&&ke.exports,L=le.amdO,I="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".split(""),D={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},X=[0,0,0,0,0,0,0,0],Fe=function(A,F){F.length>10&&(F="..."+F.substr(-10));var T=new Error("Decoded data is not valid UTF-8. Maybe try base32.decode.asBytes()? Partial data after reading "+A+" bytes: "+F+" <-");throw T.position=A,T},be=function(A){for(var F="",T=A.length,j=0,O=0,z,g;j<T;){if(z=A[j++],z<=127){F+=String.fromCharCode(z);continue}else z>191&&z<=223?(g=z&31,O=1):z<=239?(g=z&15,O=2):z<=247?(g=z&7,O=3):Fe(j,F);for(var U=0;U<O;++U)z=A[j++],(z<128||z>191)&&Fe(j,F),g<<=6,g+=z&63;g>=55296&&g<=57343&&Fe(j,F),g>1114111&&Fe(j,F),g<=65535?F+=String.fromCharCode(g):(g-=65536,F+=String.fromCharCode((g>>10)+55296),F+=String.fromCharCode((g&1023)+56320))}return F},m=function(A){if(A==="")return[];if(!/^[A-Z2-7=]+$/.test(A))throw new Error("Invalid base32 characters");A=A.replace(/=/g,"");for(var F,T,j,O,z,g,U,S,$=[],h=0,x=A.length,v=0,R=x>>3<<3;v<R;)F=D[A.charAt(v++)],T=D[A.charAt(v++)],j=D[A.charAt(v++)],O=D[A.charAt(v++)],z=D[A.charAt(v++)],g=D[A.charAt(v++)],U=D[A.charAt(v++)],S=D[A.charAt(v++)],$[h++]=(F<<3|T>>>2)&255,$[h++]=(T<<6|j<<1|O>>>4)&255,$[h++]=(O<<4|z>>>1)&255,$[h++]=(z<<7|g<<2|U>>>3)&255,$[h++]=(U<<5|S)&255;var W=x-R;return W===2?(F=D[A.charAt(v++)],T=D[A.charAt(v++)],$[h++]=(F<<3|T>>>2)&255):W===4?(F=D[A.charAt(v++)],T=D[A.charAt(v++)],j=D[A.charAt(v++)],O=D[A.charAt(v++)],$[h++]=(F<<3|T>>>2)&255,$[h++]=(T<<6|j<<1|O>>>4)&255):W===5?(F=D[A.charAt(v++)],T=D[A.charAt(v++)],j=D[A.charAt(v++)],O=D[A.charAt(v++)],z=D[A.charAt(v++)],$[h++]=(F<<3|T>>>2)&255,$[h++]=(T<<6|j<<1|O>>>4)&255,$[h++]=(O<<4|z>>>1)&255):W===7&&(F=D[A.charAt(v++)],T=D[A.charAt(v++)],j=D[A.charAt(v++)],O=D[A.charAt(v++)],z=D[A.charAt(v++)],g=D[A.charAt(v++)],U=D[A.charAt(v++)],$[h++]=(F<<3|T>>>2)&255,$[h++]=(T<<6|j<<1|O>>>4)&255,$[h++]=(O<<4|z>>>1)&255,$[h++]=(z<<7|g<<2|U>>>3)&255),$},ce=function(A){for(var F,T,j,O,z,g="",U=A.length,S=0,$=parseInt(U/5)*5;S<$;)F=A.charCodeAt(S++),T=A.charCodeAt(S++),j=A.charCodeAt(S++),O=A.charCodeAt(S++),z=A.charCodeAt(S++),g+=I[F>>>3]+I[(F<<2|T>>>6)&31]+I[T>>>1&31]+I[(T<<4|j>>>4)&31]+I[(j<<1|O>>>7)&31]+I[O>>>2&31]+I[(O<<3|z>>>5)&31]+I[z&31];var h=U-$;return h===1?(F=A.charCodeAt(S),g+=I[F>>>3]+I[F<<2&31]+"======"):h===2?(F=A.charCodeAt(S++),T=A.charCodeAt(S),g+=I[F>>>3]+I[(F<<2|T>>>6)&31]+I[T>>>1&31]+I[T<<4&31]+"===="):h===3?(F=A.charCodeAt(S++),T=A.charCodeAt(S++),j=A.charCodeAt(S),g+=I[F>>>3]+I[(F<<2|T>>>6)&31]+I[T>>>1&31]+I[(T<<4|j>>>4)&31]+I[j<<1&31]+"==="):h===4&&(F=A.charCodeAt(S++),T=A.charCodeAt(S++),j=A.charCodeAt(S++),O=A.charCodeAt(S),g+=I[F>>>3]+I[(F<<2|T>>>6)&31]+I[T>>>1&31]+I[(T<<4|j>>>4)&31]+I[(j<<1|O>>>7)&31]+I[O>>>2&31]+I[O<<3&31]+"="),g},ie=function(A){var F,T,j,O,z,g,U=!1,S="",$=0,h,x=0,v=0,R=A.length;if(A==="")return S;do{for(X[0]=X[5],X[1]=X[6],X[2]=X[7],h=x;$<R&&h<5;++$)g=A.charCodeAt($),g<128?X[h++]=g:g<2048?(X[h++]=192|g>>6,X[h++]=128|g&63):g<55296||g>=57344?(X[h++]=224|g>>12,X[h++]=128|g>>6&63,X[h++]=128|g&63):(g=65536+((g&1023)<<10|A.charCodeAt(++$)&1023),X[h++]=240|g>>18,X[h++]=128|g>>12&63,X[h++]=128|g>>6&63,X[h++]=128|g&63);v+=h-x,x=h-5,$===R&&++$,$>R&&h<6&&(U=!0),F=X[0],h>4?(T=X[1],j=X[2],O=X[3],z=X[4],S+=I[F>>>3]+I[(F<<2|T>>>6)&31]+I[T>>>1&31]+I[(T<<4|j>>>4)&31]+I[(j<<1|O>>>7)&31]+I[O>>>2&31]+I[(O<<3|z>>>5)&31]+I[z&31]):h===1?S+=I[F>>>3]+I[F<<2&31]+"======":h===2?(T=X[1],S+=I[F>>>3]+I[(F<<2|T>>>6)&31]+I[T>>>1&31]+I[T<<4&31]+"===="):h===3?(T=X[1],j=X[2],S+=I[F>>>3]+I[(F<<2|T>>>6)&31]+I[T>>>1&31]+I[(T<<4|j>>>4)&31]+I[j<<1&31]+"==="):(T=X[1],j=X[2],O=X[3],S+=I[F>>>3]+I[(F<<2|T>>>6)&31]+I[T>>>1&31]+I[(T<<4|j>>>4)&31]+I[(j<<1|O>>>7)&31]+I[O>>>2&31]+I[O<<3&31]+"=")}while(!U);return S},fe=function(A){for(var F,T,j,O,z,g="",U=A.length,S=0,$=parseInt(U/5)*5;S<$;)F=A[S++],T=A[S++],j=A[S++],O=A[S++],z=A[S++],g+=I[F>>>3]+I[(F<<2|T>>>6)&31]+I[T>>>1&31]+I[(T<<4|j>>>4)&31]+I[(j<<1|O>>>7)&31]+I[O>>>2&31]+I[(O<<3|z>>>5)&31]+I[z&31];var h=U-$;return h===1?(F=A[S],g+=I[F>>>3]+I[F<<2&31]+"======"):h===2?(F=A[S++],T=A[S],g+=I[F>>>3]+I[(F<<2|T>>>6)&31]+I[T>>>1&31]+I[T<<4&31]+"===="):h===3?(F=A[S++],T=A[S++],j=A[S],g+=I[F>>>3]+I[(F<<2|T>>>6)&31]+I[T>>>1&31]+I[(T<<4|j>>>4)&31]+I[j<<1&31]+"==="):h===4&&(F=A[S++],T=A[S++],j=A[S++],O=A[S],g+=I[F>>>3]+I[(F<<2|T>>>6)&31]+I[T>>>1&31]+I[(T<<4|j>>>4)&31]+I[(j<<1|O>>>7)&31]+I[O>>>2&31]+I[O<<3&31]+"="),g},Ee=function(A,F){var T=typeof A!="string";return T&&A.constructor===ArrayBuffer&&(A=new Uint8Array(A)),T?fe(A):F?ce(A):ie(A)},Y=function(A,F){if(!F)return be(m(A));if(A==="")return"";if(!/^[A-Z2-7=]+$/.test(A))throw new Error("Invalid base32 characters");var T,j,O,z,g,U,S,$,h="",x=A.indexOf("=");x===-1&&(x=A.length);for(var v=0,R=x>>3<<3;v<R;)T=D[A.charAt(v++)],j=D[A.charAt(v++)],O=D[A.charAt(v++)],z=D[A.charAt(v++)],g=D[A.charAt(v++)],U=D[A.charAt(v++)],S=D[A.charAt(v++)],$=D[A.charAt(v++)],h+=String.fromCharCode((T<<3|j>>>2)&255)+String.fromCharCode((j<<6|O<<1|z>>>4)&255)+String.fromCharCode((z<<4|g>>>1)&255)+String.fromCharCode((g<<7|U<<2|S>>>3)&255)+String.fromCharCode((S<<5|$)&255);var W=x-R;return W===2?(T=D[A.charAt(v++)],j=D[A.charAt(v++)],h+=String.fromCharCode((T<<3|j>>>2)&255)):W===4?(T=D[A.charAt(v++)],j=D[A.charAt(v++)],O=D[A.charAt(v++)],z=D[A.charAt(v++)],h+=String.fromCharCode((T<<3|j>>>2)&255)+String.fromCharCode((j<<6|O<<1|z>>>4)&255)):W===5?(T=D[A.charAt(v++)],j=D[A.charAt(v++)],O=D[A.charAt(v++)],z=D[A.charAt(v++)],g=D[A.charAt(v++)],h+=String.fromCharCode((T<<3|j>>>2)&255)+String.fromCharCode((j<<6|O<<1|z>>>4)&255)+String.fromCharCode((z<<4|g>>>1)&255)):W===7&&(T=D[A.charAt(v++)],j=D[A.charAt(v++)],O=D[A.charAt(v++)],z=D[A.charAt(v++)],g=D[A.charAt(v++)],U=D[A.charAt(v++)],S=D[A.charAt(v++)],h+=String.fromCharCode((T<<3|j>>>2)&255)+String.fromCharCode((j<<6|O<<1|z>>>4)&255)+String.fromCharCode((z<<4|g>>>1)&255)+String.fromCharCode((g<<7|U<<2|S>>>3)&255)),h},_e={encode:Ee,decode:Y};Y.asBytes=m,K?ke.exports=_e:(Z.base32=_e,L&&(we=function(){return _e}.call(_e,le,_e,ke),we!==void 0&&(ke.exports=we)))})()},93434:function(ke,Je,le){var ye=le(34155),we;/*
12
12
  * [js-sha512]{@link https://github.com/emn178/js-sha512}
13
13
  *
14
14
  * @version 0.8.0
15
15
  * @author Chen, Yi-Cyuan [emn178@gmail.com]
16
16
  * @copyright Chen, Yi-Cyuan 2014-2018
17
17
  * @license MIT
18
- */(function(){"use strict";var J="input is invalid type",l="finalize already called",N=typeof window=="object",L=N?window:{};L.JS_SHA512_NO_WINDOW&&(N=!1);var k=!N&&typeof self=="object",D=!L.JS_SHA512_NO_NODE_JS&&typeof de=="object"&&de.versions&&de.versions.node;D?L=ce.g:k&&(L=self);var Y=!L.JS_SHA512_NO_COMMON_JS&&!0&&Be.exports,Fe=ce.amdO,be=!L.JS_SHA512_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",m="0123456789abcdef".split(""),fe=[-2147483648,8388608,32768,128],ie=[24,16,8,0],le=[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],Ee=["hex","array","digest","arrayBuffer"],Z=[];(L.JS_SHA512_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(g){return Object.prototype.toString.call(g)==="[object Array]"}),be&&(L.JS_SHA512_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(g){return typeof g=="object"&&g.buffer&&g.buffer.constructor===ArrayBuffer});var _e=function(g,U){return function(S){return new j(U,!0).update(S)[g]()}},A=function(g){var U=_e("hex",g);U.create=function(){return new j(g)},U.update=function(h){return U.create().update(h)};for(var S=0;S<Ee.length;++S){var $=Ee[S];U[$]=_e($,g)}return U},F=function(g,U){return function(S,$){return new O(S,U,!0).update($)[g]()}},T=function(g){var U=F("hex",g);U.create=function(h){return new O(h,g)},U.update=function(h,x){return U.create(h).update(x)};for(var S=0;S<Ee.length;++S){var $=Ee[S];U[$]=F($,g)}return U};function j(g,U){U?(Z[0]=Z[1]=Z[2]=Z[3]=Z[4]=Z[5]=Z[6]=Z[7]=Z[8]=Z[9]=Z[10]=Z[11]=Z[12]=Z[13]=Z[14]=Z[15]=Z[16]=Z[17]=Z[18]=Z[19]=Z[20]=Z[21]=Z[22]=Z[23]=Z[24]=Z[25]=Z[26]=Z[27]=Z[28]=Z[29]=Z[30]=Z[31]=Z[32]=0,this.blocks=Z):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g==384?(this.h0h=3418070365,this.h0l=3238371032,this.h1h=1654270250,this.h1l=914150663,this.h2h=2438529370,this.h2l=812702999,this.h3h=355462360,this.h3l=4144912697,this.h4h=1731405415,this.h4l=4290775857,this.h5h=2394180231,this.h5l=1750603025,this.h6h=3675008525,this.h6l=1694076839,this.h7h=1203062813,this.h7l=3204075428):g==256?(this.h0h=573645204,this.h0l=4230739756,this.h1h=2673172387,this.h1l=3360449730,this.h2h=596883563,this.h2l=1867755857,this.h3h=2520282905,this.h3l=1497426621,this.h4h=2519219938,this.h4l=2827943907,this.h5h=3193839141,this.h5l=1401305490,this.h6h=721525244,this.h6l=746961066,this.h7h=246885852,this.h7l=2177182882):g==224?(this.h0h=2352822216,this.h0l=424955298,this.h1h=1944164710,this.h1l=2312950998,this.h2h=502970286,this.h2l=855612546,this.h3h=1738396948,this.h3l=1479516111,this.h4h=258812777,this.h4l=2077511080,this.h5h=2011393907,this.h5l=79989058,this.h6h=1067287976,this.h6l=1780299464,this.h7h=286451373,this.h7l=2446758561):(this.h0h=1779033703,this.h0l=4089235720,this.h1h=3144134277,this.h1l=2227873595,this.h2h=1013904242,this.h2l=4271175723,this.h3h=2773480762,this.h3l=1595750129,this.h4h=1359893119,this.h4l=2917565137,this.h5h=2600822924,this.h5l=725511199,this.h6h=528734635,this.h6l=4215389547,this.h7h=1541459225,this.h7l=327033209),this.bits=g,this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1}j.prototype.update=function(g){if(this.finalized)throw new Error(l);var U,S=typeof g;if(S!=="string"){if(S==="object"){if(g===null)throw new Error(J);if(be&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!Array.isArray(g)&&(!be||!ArrayBuffer.isView(g)))throw new Error(J)}else throw new Error(J);U=!0}for(var $,h=0,x,v=g.length,R=this.blocks;h<v;){if(this.hashed&&(this.hashed=!1,R[0]=this.block,R[1]=R[2]=R[3]=R[4]=R[5]=R[6]=R[7]=R[8]=R[9]=R[10]=R[11]=R[12]=R[13]=R[14]=R[15]=R[16]=R[17]=R[18]=R[19]=R[20]=R[21]=R[22]=R[23]=R[24]=R[25]=R[26]=R[27]=R[28]=R[29]=R[30]=R[31]=R[32]=0),U)for(x=this.start;h<v&&x<128;++h)R[x>>2]|=g[h]<<ie[x++&3];else for(x=this.start;h<v&&x<128;++h)$=g.charCodeAt(h),$<128?R[x>>2]|=$<<ie[x++&3]:$<2048?(R[x>>2]|=(192|$>>6)<<ie[x++&3],R[x>>2]|=(128|$&63)<<ie[x++&3]):$<55296||$>=57344?(R[x>>2]|=(224|$>>12)<<ie[x++&3],R[x>>2]|=(128|$>>6&63)<<ie[x++&3],R[x>>2]|=(128|$&63)<<ie[x++&3]):($=65536+(($&1023)<<10|g.charCodeAt(++h)&1023),R[x>>2]|=(240|$>>18)<<ie[x++&3],R[x>>2]|=(128|$>>12&63)<<ie[x++&3],R[x>>2]|=(128|$>>6&63)<<ie[x++&3],R[x>>2]|=(128|$&63)<<ie[x++&3]);this.lastByteIndex=x,this.bytes+=x-this.start,x>=128?(this.block=R[32],this.start=x-128,this.hash(),this.hashed=!0):this.start=x}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},j.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var g=this.blocks,U=this.lastByteIndex;g[32]=this.block,g[U>>2]|=fe[U&3],this.block=g[32],U>=112&&(this.hashed||this.hash(),g[0]=this.block,g[1]=g[2]=g[3]=g[4]=g[5]=g[6]=g[7]=g[8]=g[9]=g[10]=g[11]=g[12]=g[13]=g[14]=g[15]=g[16]=g[17]=g[18]=g[19]=g[20]=g[21]=g[22]=g[23]=g[24]=g[25]=g[26]=g[27]=g[28]=g[29]=g[30]=g[31]=g[32]=0),g[30]=this.hBytes<<3|this.bytes>>>29,g[31]=this.bytes<<3,this.hash()}},j.prototype.hash=function(){var g=this.h0h,U=this.h0l,S=this.h1h,$=this.h1l,h=this.h2h,x=this.h2l,v=this.h3h,R=this.h3l,W=this.h4h,Q=this.h4l,xe=this.h5h,ge=this.h5l,Ae=this.h6h,ve=this.h6l,Ie=this.h7h,Se=this.h7l,me=this.blocks,ae,Te,De,Ce,je,M,G,B,ee,te,et,lt,it,ht,p,i,a,u,c,y,f,I,q,V,b;for(ae=32;ae<160;ae+=2)y=me[ae-30],f=me[ae-29],Te=(y>>>1|f<<31)^(y>>>8|f<<24)^y>>>7,De=(f>>>1|y<<31)^(f>>>8|y<<24)^(f>>>7|y<<25),y=me[ae-4],f=me[ae-3],Ce=(y>>>19|f<<13)^(f>>>29|y<<3)^y>>>6,je=(f>>>19|y<<13)^(y>>>29|f<<3)^(f>>>6|y<<26),y=me[ae-32],f=me[ae-31],I=me[ae-14],q=me[ae-13],M=(q&65535)+(f&65535)+(De&65535)+(je&65535),G=(q>>>16)+(f>>>16)+(De>>>16)+(je>>>16)+(M>>>16),B=(I&65535)+(y&65535)+(Te&65535)+(Ce&65535)+(G>>>16),ee=(I>>>16)+(y>>>16)+(Te>>>16)+(Ce>>>16)+(B>>>16),me[ae]=ee<<16|B&65535,me[ae+1]=G<<16|M&65535;var H=g,re=U,we=S,pe=$,Ue=h,$e=x,Le=v,ze=R,Ge=W,He=Q,Pe=xe,he=ge,Oe=Ae,Me=ve,Ne=Ie,Re=Se;for(i=we&Ue,a=pe&$e,ae=0;ae<160;ae+=8)Te=(H>>>28|re<<4)^(re>>>2|H<<30)^(re>>>7|H<<25),De=(re>>>28|H<<4)^(H>>>2|re<<30)^(H>>>7|re<<25),Ce=(Ge>>>14|He<<18)^(Ge>>>18|He<<14)^(He>>>9|Ge<<23),je=(He>>>14|Ge<<18)^(He>>>18|Ge<<14)^(Ge>>>9|He<<23),te=H&we,et=re&pe,u=te^H&Ue^i,c=et^re&$e^a,V=Ge&Pe^~Ge&Oe,b=He&he^~He&Me,y=me[ae],f=me[ae+1],I=le[ae],q=le[ae+1],M=(q&65535)+(f&65535)+(b&65535)+(je&65535)+(Re&65535),G=(q>>>16)+(f>>>16)+(b>>>16)+(je>>>16)+(Re>>>16)+(M>>>16),B=(I&65535)+(y&65535)+(V&65535)+(Ce&65535)+(Ne&65535)+(G>>>16),ee=(I>>>16)+(y>>>16)+(V>>>16)+(Ce>>>16)+(Ne>>>16)+(B>>>16),y=ee<<16|B&65535,f=G<<16|M&65535,M=(c&65535)+(De&65535),G=(c>>>16)+(De>>>16)+(M>>>16),B=(u&65535)+(Te&65535)+(G>>>16),ee=(u>>>16)+(Te>>>16)+(B>>>16),I=ee<<16|B&65535,q=G<<16|M&65535,M=(ze&65535)+(f&65535),G=(ze>>>16)+(f>>>16)+(M>>>16),B=(Le&65535)+(y&65535)+(G>>>16),ee=(Le>>>16)+(y>>>16)+(B>>>16),Ne=ee<<16|B&65535,Re=G<<16|M&65535,M=(q&65535)+(f&65535),G=(q>>>16)+(f>>>16)+(M>>>16),B=(I&65535)+(y&65535)+(G>>>16),ee=(I>>>16)+(y>>>16)+(B>>>16),Le=ee<<16|B&65535,ze=G<<16|M&65535,Te=(Le>>>28|ze<<4)^(ze>>>2|Le<<30)^(ze>>>7|Le<<25),De=(ze>>>28|Le<<4)^(Le>>>2|ze<<30)^(Le>>>7|ze<<25),Ce=(Ne>>>14|Re<<18)^(Ne>>>18|Re<<14)^(Re>>>9|Ne<<23),je=(Re>>>14|Ne<<18)^(Re>>>18|Ne<<14)^(Ne>>>9|Re<<23),lt=Le&H,it=ze&re,u=lt^Le&we^te,c=it^ze&pe^et,V=Ne&Ge^~Ne&Pe,b=Re&He^~Re&he,y=me[ae+2],f=me[ae+3],I=le[ae+2],q=le[ae+3],M=(q&65535)+(f&65535)+(b&65535)+(je&65535)+(Me&65535),G=(q>>>16)+(f>>>16)+(b>>>16)+(je>>>16)+(Me>>>16)+(M>>>16),B=(I&65535)+(y&65535)+(V&65535)+(Ce&65535)+(Oe&65535)+(G>>>16),ee=(I>>>16)+(y>>>16)+(V>>>16)+(Ce>>>16)+(Oe>>>16)+(B>>>16),y=ee<<16|B&65535,f=G<<16|M&65535,M=(c&65535)+(De&65535),G=(c>>>16)+(De>>>16)+(M>>>16),B=(u&65535)+(Te&65535)+(G>>>16),ee=(u>>>16)+(Te>>>16)+(B>>>16),I=ee<<16|B&65535,q=G<<16|M&65535,M=($e&65535)+(f&65535),G=($e>>>16)+(f>>>16)+(M>>>16),B=(Ue&65535)+(y&65535)+(G>>>16),ee=(Ue>>>16)+(y>>>16)+(B>>>16),Oe=ee<<16|B&65535,Me=G<<16|M&65535,M=(q&65535)+(f&65535),G=(q>>>16)+(f>>>16)+(M>>>16),B=(I&65535)+(y&65535)+(G>>>16),ee=(I>>>16)+(y>>>16)+(B>>>16),Ue=ee<<16|B&65535,$e=G<<16|M&65535,Te=(Ue>>>28|$e<<4)^($e>>>2|Ue<<30)^($e>>>7|Ue<<25),De=($e>>>28|Ue<<4)^(Ue>>>2|$e<<30)^(Ue>>>7|$e<<25),Ce=(Oe>>>14|Me<<18)^(Oe>>>18|Me<<14)^(Me>>>9|Oe<<23),je=(Me>>>14|Oe<<18)^(Me>>>18|Oe<<14)^(Oe>>>9|Me<<23),ht=Ue&Le,p=$e&ze,u=ht^Ue&H^lt,c=p^$e&re^it,V=Oe&Ne^~Oe&Ge,b=Me&Re^~Me&He,y=me[ae+4],f=me[ae+5],I=le[ae+4],q=le[ae+5],M=(q&65535)+(f&65535)+(b&65535)+(je&65535)+(he&65535),G=(q>>>16)+(f>>>16)+(b>>>16)+(je>>>16)+(he>>>16)+(M>>>16),B=(I&65535)+(y&65535)+(V&65535)+(Ce&65535)+(Pe&65535)+(G>>>16),ee=(I>>>16)+(y>>>16)+(V>>>16)+(Ce>>>16)+(Pe>>>16)+(B>>>16),y=ee<<16|B&65535,f=G<<16|M&65535,M=(c&65535)+(De&65535),G=(c>>>16)+(De>>>16)+(M>>>16),B=(u&65535)+(Te&65535)+(G>>>16),ee=(u>>>16)+(Te>>>16)+(B>>>16),I=ee<<16|B&65535,q=G<<16|M&65535,M=(pe&65535)+(f&65535),G=(pe>>>16)+(f>>>16)+(M>>>16),B=(we&65535)+(y&65535)+(G>>>16),ee=(we>>>16)+(y>>>16)+(B>>>16),Pe=ee<<16|B&65535,he=G<<16|M&65535,M=(q&65535)+(f&65535),G=(q>>>16)+(f>>>16)+(M>>>16),B=(I&65535)+(y&65535)+(G>>>16),ee=(I>>>16)+(y>>>16)+(B>>>16),we=ee<<16|B&65535,pe=G<<16|M&65535,Te=(we>>>28|pe<<4)^(pe>>>2|we<<30)^(pe>>>7|we<<25),De=(pe>>>28|we<<4)^(we>>>2|pe<<30)^(we>>>7|pe<<25),Ce=(Pe>>>14|he<<18)^(Pe>>>18|he<<14)^(he>>>9|Pe<<23),je=(he>>>14|Pe<<18)^(he>>>18|Pe<<14)^(Pe>>>9|he<<23),i=we&Ue,a=pe&$e,u=i^we&Le^ht,c=a^pe&ze^p,V=Pe&Oe^~Pe&Ne,b=he&Me^~he&Re,y=me[ae+6],f=me[ae+7],I=le[ae+6],q=le[ae+7],M=(q&65535)+(f&65535)+(b&65535)+(je&65535)+(He&65535),G=(q>>>16)+(f>>>16)+(b>>>16)+(je>>>16)+(He>>>16)+(M>>>16),B=(I&65535)+(y&65535)+(V&65535)+(Ce&65535)+(Ge&65535)+(G>>>16),ee=(I>>>16)+(y>>>16)+(V>>>16)+(Ce>>>16)+(Ge>>>16)+(B>>>16),y=ee<<16|B&65535,f=G<<16|M&65535,M=(c&65535)+(De&65535),G=(c>>>16)+(De>>>16)+(M>>>16),B=(u&65535)+(Te&65535)+(G>>>16),ee=(u>>>16)+(Te>>>16)+(B>>>16),I=ee<<16|B&65535,q=G<<16|M&65535,M=(re&65535)+(f&65535),G=(re>>>16)+(f>>>16)+(M>>>16),B=(H&65535)+(y&65535)+(G>>>16),ee=(H>>>16)+(y>>>16)+(B>>>16),Ge=ee<<16|B&65535,He=G<<16|M&65535,M=(q&65535)+(f&65535),G=(q>>>16)+(f>>>16)+(M>>>16),B=(I&65535)+(y&65535)+(G>>>16),ee=(I>>>16)+(y>>>16)+(B>>>16),H=ee<<16|B&65535,re=G<<16|M&65535;M=(U&65535)+(re&65535),G=(U>>>16)+(re>>>16)+(M>>>16),B=(g&65535)+(H&65535)+(G>>>16),ee=(g>>>16)+(H>>>16)+(B>>>16),this.h0h=ee<<16|B&65535,this.h0l=G<<16|M&65535,M=($&65535)+(pe&65535),G=($>>>16)+(pe>>>16)+(M>>>16),B=(S&65535)+(we&65535)+(G>>>16),ee=(S>>>16)+(we>>>16)+(B>>>16),this.h1h=ee<<16|B&65535,this.h1l=G<<16|M&65535,M=(x&65535)+($e&65535),G=(x>>>16)+($e>>>16)+(M>>>16),B=(h&65535)+(Ue&65535)+(G>>>16),ee=(h>>>16)+(Ue>>>16)+(B>>>16),this.h2h=ee<<16|B&65535,this.h2l=G<<16|M&65535,M=(R&65535)+(ze&65535),G=(R>>>16)+(ze>>>16)+(M>>>16),B=(v&65535)+(Le&65535)+(G>>>16),ee=(v>>>16)+(Le>>>16)+(B>>>16),this.h3h=ee<<16|B&65535,this.h3l=G<<16|M&65535,M=(Q&65535)+(He&65535),G=(Q>>>16)+(He>>>16)+(M>>>16),B=(W&65535)+(Ge&65535)+(G>>>16),ee=(W>>>16)+(Ge>>>16)+(B>>>16),this.h4h=ee<<16|B&65535,this.h4l=G<<16|M&65535,M=(ge&65535)+(he&65535),G=(ge>>>16)+(he>>>16)+(M>>>16),B=(xe&65535)+(Pe&65535)+(G>>>16),ee=(xe>>>16)+(Pe>>>16)+(B>>>16),this.h5h=ee<<16|B&65535,this.h5l=G<<16|M&65535,M=(ve&65535)+(Me&65535),G=(ve>>>16)+(Me>>>16)+(M>>>16),B=(Ae&65535)+(Oe&65535)+(G>>>16),ee=(Ae>>>16)+(Oe>>>16)+(B>>>16),this.h6h=ee<<16|B&65535,this.h6l=G<<16|M&65535,M=(Se&65535)+(Re&65535),G=(Se>>>16)+(Re>>>16)+(M>>>16),B=(Ie&65535)+(Ne&65535)+(G>>>16),ee=(Ie>>>16)+(Ne>>>16)+(B>>>16),this.h7h=ee<<16|B&65535,this.h7l=G<<16|M&65535},j.prototype.hex=function(){this.finalize();var g=this.h0h,U=this.h0l,S=this.h1h,$=this.h1l,h=this.h2h,x=this.h2l,v=this.h3h,R=this.h3l,W=this.h4h,Q=this.h4l,xe=this.h5h,ge=this.h5l,Ae=this.h6h,ve=this.h6l,Ie=this.h7h,Se=this.h7l,me=this.bits,ae=m[g>>28&15]+m[g>>24&15]+m[g>>20&15]+m[g>>16&15]+m[g>>12&15]+m[g>>8&15]+m[g>>4&15]+m[g&15]+m[U>>28&15]+m[U>>24&15]+m[U>>20&15]+m[U>>16&15]+m[U>>12&15]+m[U>>8&15]+m[U>>4&15]+m[U&15]+m[S>>28&15]+m[S>>24&15]+m[S>>20&15]+m[S>>16&15]+m[S>>12&15]+m[S>>8&15]+m[S>>4&15]+m[S&15]+m[$>>28&15]+m[$>>24&15]+m[$>>20&15]+m[$>>16&15]+m[$>>12&15]+m[$>>8&15]+m[$>>4&15]+m[$&15]+m[h>>28&15]+m[h>>24&15]+m[h>>20&15]+m[h>>16&15]+m[h>>12&15]+m[h>>8&15]+m[h>>4&15]+m[h&15]+m[x>>28&15]+m[x>>24&15]+m[x>>20&15]+m[x>>16&15]+m[x>>12&15]+m[x>>8&15]+m[x>>4&15]+m[x&15]+m[v>>28&15]+m[v>>24&15]+m[v>>20&15]+m[v>>16&15]+m[v>>12&15]+m[v>>8&15]+m[v>>4&15]+m[v&15];return me>=256&&(ae+=m[R>>28&15]+m[R>>24&15]+m[R>>20&15]+m[R>>16&15]+m[R>>12&15]+m[R>>8&15]+m[R>>4&15]+m[R&15]),me>=384&&(ae+=m[W>>28&15]+m[W>>24&15]+m[W>>20&15]+m[W>>16&15]+m[W>>12&15]+m[W>>8&15]+m[W>>4&15]+m[W&15]+m[Q>>28&15]+m[Q>>24&15]+m[Q>>20&15]+m[Q>>16&15]+m[Q>>12&15]+m[Q>>8&15]+m[Q>>4&15]+m[Q&15]+m[xe>>28&15]+m[xe>>24&15]+m[xe>>20&15]+m[xe>>16&15]+m[xe>>12&15]+m[xe>>8&15]+m[xe>>4&15]+m[xe&15]+m[ge>>28&15]+m[ge>>24&15]+m[ge>>20&15]+m[ge>>16&15]+m[ge>>12&15]+m[ge>>8&15]+m[ge>>4&15]+m[ge&15]),me==512&&(ae+=m[Ae>>28&15]+m[Ae>>24&15]+m[Ae>>20&15]+m[Ae>>16&15]+m[Ae>>12&15]+m[Ae>>8&15]+m[Ae>>4&15]+m[Ae&15]+m[ve>>28&15]+m[ve>>24&15]+m[ve>>20&15]+m[ve>>16&15]+m[ve>>12&15]+m[ve>>8&15]+m[ve>>4&15]+m[ve&15]+m[Ie>>28&15]+m[Ie>>24&15]+m[Ie>>20&15]+m[Ie>>16&15]+m[Ie>>12&15]+m[Ie>>8&15]+m[Ie>>4&15]+m[Ie&15]+m[Se>>28&15]+m[Se>>24&15]+m[Se>>20&15]+m[Se>>16&15]+m[Se>>12&15]+m[Se>>8&15]+m[Se>>4&15]+m[Se&15]),ae},j.prototype.toString=j.prototype.hex,j.prototype.digest=function(){this.finalize();var g=this.h0h,U=this.h0l,S=this.h1h,$=this.h1l,h=this.h2h,x=this.h2l,v=this.h3h,R=this.h3l,W=this.h4h,Q=this.h4l,xe=this.h5h,ge=this.h5l,Ae=this.h6h,ve=this.h6l,Ie=this.h7h,Se=this.h7l,me=this.bits,ae=[g>>24&255,g>>16&255,g>>8&255,g&255,U>>24&255,U>>16&255,U>>8&255,U&255,S>>24&255,S>>16&255,S>>8&255,S&255,$>>24&255,$>>16&255,$>>8&255,$&255,h>>24&255,h>>16&255,h>>8&255,h&255,x>>24&255,x>>16&255,x>>8&255,x&255,v>>24&255,v>>16&255,v>>8&255,v&255];return me>=256&&ae.push(R>>24&255,R>>16&255,R>>8&255,R&255),me>=384&&ae.push(W>>24&255,W>>16&255,W>>8&255,W&255,Q>>24&255,Q>>16&255,Q>>8&255,Q&255,xe>>24&255,xe>>16&255,xe>>8&255,xe&255,ge>>24&255,ge>>16&255,ge>>8&255,ge&255),me==512&&ae.push(Ae>>24&255,Ae>>16&255,Ae>>8&255,Ae&255,ve>>24&255,ve>>16&255,ve>>8&255,ve&255,Ie>>24&255,Ie>>16&255,Ie>>8&255,Ie&255,Se>>24&255,Se>>16&255,Se>>8&255,Se&255),ae},j.prototype.array=j.prototype.digest,j.prototype.arrayBuffer=function(){this.finalize();var g=this.bits,U=new ArrayBuffer(g/8),S=new DataView(U);return S.setUint32(0,this.h0h),S.setUint32(4,this.h0l),S.setUint32(8,this.h1h),S.setUint32(12,this.h1l),S.setUint32(16,this.h2h),S.setUint32(20,this.h2l),S.setUint32(24,this.h3h),g>=256&&S.setUint32(28,this.h3l),g>=384&&(S.setUint32(32,this.h4h),S.setUint32(36,this.h4l),S.setUint32(40,this.h5h),S.setUint32(44,this.h5l)),g==512&&(S.setUint32(48,this.h6h),S.setUint32(52,this.h6l),S.setUint32(56,this.h7h),S.setUint32(60,this.h7l)),U},j.prototype.clone=function(){var g=new j(this.bits,!1);return this.copyTo(g),g},j.prototype.copyTo=function(g){var U=0,S=["h0h","h0l","h1h","h1l","h2h","h2l","h3h","h3l","h4h","h4l","h5h","h5l","h6h","h6l","h7h","h7l","start","bytes","hBytes","finalized","hashed","lastByteIndex"];for(U=0;U<S.length;++U)g[S[U]]=this[S[U]];for(U=0;U<this.blocks.length;++U)g.blocks[U]=this.blocks[U]};function O(g,U,S){var $,h=typeof g;if(h!=="string"){if(h==="object"){if(g===null)throw new Error(J);if(be&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!Array.isArray(g)&&(!be||!ArrayBuffer.isView(g)))throw new Error(J)}else throw new Error(J);$=!0}var x=g.length;if(!$){for(var v=[],x=g.length,R=0,W,Q=0;Q<x;++Q)W=g.charCodeAt(Q),W<128?v[R++]=W:W<2048?(v[R++]=192|W>>6,v[R++]=128|W&63):W<55296||W>=57344?(v[R++]=224|W>>12,v[R++]=128|W>>6&63,v[R++]=128|W&63):(W=65536+((W&1023)<<10|g.charCodeAt(++Q)&1023),v[R++]=240|W>>18,v[R++]=128|W>>12&63,v[R++]=128|W>>6&63,v[R++]=128|W&63);g=v}g.length>128&&(g=new j(U,!0).update(g).array());for(var xe=[],ge=[],Q=0;Q<128;++Q){var Ae=g[Q]||0;xe[Q]=92^Ae,ge[Q]=54^Ae}j.call(this,U,S),this.update(ge),this.oKeyPad=xe,this.inner=!0,this.sharedMemory=S}O.prototype=new j,O.prototype.finalize=function(){if(j.prototype.finalize.call(this),this.inner){this.inner=!1;var g=this.array();j.call(this,this.bits,this.sharedMemory),this.update(this.oKeyPad),this.update(g),j.prototype.finalize.call(this)}},O.prototype.clone=function(){var g=new O([],this.bits,!1);this.copyTo(g),g.inner=this.inner;for(var U=0;U<this.oKeyPad.length;++U)g.oKeyPad[U]=this.oKeyPad[U];return g};var z=A(512);z.sha512=z,z.sha384=A(384),z.sha512_256=A(256),z.sha512_224=A(224),z.sha512.hmac=T(512),z.sha384.hmac=T(384),z.sha512_256.hmac=T(256),z.sha512_224.hmac=T(224),Y?Be.exports=z:(L.sha512=z.sha512,L.sha384=z.sha384,L.sha512_256=z.sha512_256,L.sha512_224=z.sha512_224,Fe&&(ye=function(){return z}.call(z,ce,z,Be),ye!==void 0&&(Be.exports=ye)))})()},4400:function(Be,Ke,ce){var de=ce(54123).stringify,ye=ce(26813);Be.exports=function(J){return{parse:ye(J),stringify:de}},Be.exports.parse=ye(),Be.exports.stringify=de},26813:function(Be,Ke,ce){var de=null;const ye=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,J=/(?: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)/;var l=function(N){"use strict";var L={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(N!=null){if(N.strict===!0&&(L.strict=!0),N.storeAsString===!0&&(L.storeAsString=!0),L.alwaysParseAsBig=N.alwaysParseAsBig===!0?N.alwaysParseAsBig:!1,L.useNativeBigInt=N.useNativeBigInt===!0?N.useNativeBigInt:!1,typeof N.constructorAction<"u")if(N.constructorAction==="error"||N.constructorAction==="ignore"||N.constructorAction==="preserve")L.constructorAction=N.constructorAction;else throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${N.constructorAction}`);if(typeof N.protoAction<"u")if(N.protoAction==="error"||N.protoAction==="ignore"||N.protoAction==="preserve")L.protoAction=N.protoAction;else throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${N.protoAction}`)}var k,D,Y={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
19
- `,r:"\r",t:" "},Fe,be=function(F){throw{name:"SyntaxError",message:F,at:k,text:Fe}},m=function(F){return F&&F!==D&&be("Expected '"+F+"' instead of '"+D+"'"),D=Fe.charAt(k),k+=1,D},fe=function(){var F,T="";for(D==="-"&&(T="-",m("-"));D>="0"&&D<="9";)T+=D,m();if(D===".")for(T+=".";m()&&D>="0"&&D<="9";)T+=D;if(D==="e"||D==="E")for(T+=D,m(),(D==="-"||D==="+")&&(T+=D,m());D>="0"&&D<="9";)T+=D,m();if(F=+T,!isFinite(F))be("Bad number");else return de==null&&(de=ce(44431)),T.length>15?L.storeAsString?T:L.useNativeBigInt?BigInt(T):new de(T):L.alwaysParseAsBig?L.useNativeBigInt?BigInt(F):new de(F):F},ie=function(){var F,T,j="",O;if(D==='"')for(var z=k;m();){if(D==='"')return k-1>z&&(j+=Fe.substring(z,k-1)),m(),j;if(D==="\\"){if(k-1>z&&(j+=Fe.substring(z,k-1)),m(),D==="u"){for(O=0,T=0;T<4&&(F=parseInt(m(),16),!!isFinite(F));T+=1)O=O*16+F;j+=String.fromCharCode(O)}else if(typeof Y[D]=="string")j+=Y[D];else break;z=k}}be("Bad string")},le=function(){for(;D&&D<=" ";)m()},Ee=function(){switch(D){case"t":return m("t"),m("r"),m("u"),m("e"),!0;case"f":return m("f"),m("a"),m("l"),m("s"),m("e"),!1;case"n":return m("n"),m("u"),m("l"),m("l"),null}be("Unexpected '"+D+"'")},Z,_e=function(){var F=[];if(D==="["){if(m("["),le(),D==="]")return m("]"),F;for(;D;){if(F.push(Z()),le(),D==="]")return m("]"),F;m(","),le()}}be("Bad array")},A=function(){var F,T=Object.create(null);if(D==="{"){if(m("{"),le(),D==="}")return m("}"),T;for(;D;){if(F=ie(),le(),m(":"),L.strict===!0&&Object.hasOwnProperty.call(T,F)&&be('Duplicate key "'+F+'"'),ye.test(F)===!0?L.protoAction==="error"?be("Object contains forbidden prototype property"):L.protoAction==="ignore"?Z():T[F]=Z():J.test(F)===!0?L.constructorAction==="error"?be("Object contains forbidden constructor property"):L.constructorAction==="ignore"?Z():T[F]=Z():T[F]=Z(),le(),D==="}")return m("}"),T;m(","),le()}}be("Bad object")};return Z=function(){switch(le(),D){case"{":return A();case"[":return _e();case'"':return ie();case"-":return fe();default:return D>="0"&&D<="9"?fe():Ee()}},function(F,T){var j;return Fe=F+"",k=0,D=" ",j=Z(),le(),D&&be("Syntax error"),typeof T=="function"?function O(z,g){var U,S,$=z[g];return $&&typeof $=="object"&&Object.keys($).forEach(function(h){S=O($,h),S!==void 0?$[h]=S:delete $[h]}),T.call(z,g,$)}({"":j},""):j}};Be.exports=l},54123:function(Be,Ke,ce){var de=ce(44431),ye=Be.exports;(function(){"use strict";function J(m){return m<10?"0"+m:m}var l=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,N=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,L,k,D={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},Y;function Fe(m){return N.lastIndex=0,N.test(m)?'"'+m.replace(N,function(fe){var ie=D[fe];return typeof ie=="string"?ie:"\\u"+("0000"+fe.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+m+'"'}function be(m,fe){var ie,le,Ee,Z,_e=L,A,F=fe[m],T=F!=null&&(F instanceof de||de.isBigNumber(F));switch(F&&typeof F=="object"&&typeof F.toJSON=="function"&&(F=F.toJSON(m)),typeof Y=="function"&&(F=Y.call(fe,m,F)),typeof F){case"string":return T?F:Fe(F);case"number":return isFinite(F)?String(F):"null";case"boolean":case"null":case"bigint":return String(F);case"object":if(!F)return"null";if(L+=k,A=[],Object.prototype.toString.apply(F)==="[object Array]"){for(Z=F.length,ie=0;ie<Z;ie+=1)A[ie]=be(ie,F)||"null";return Ee=A.length===0?"[]":L?`[
18
+ */(function(){"use strict";var Z="input is invalid type",l="finalize already called",K=typeof window=="object",L=K?window:{};L.JS_SHA512_NO_WINDOW&&(K=!1);var I=!K&&typeof self=="object",D=!L.JS_SHA512_NO_NODE_JS&&typeof ye=="object"&&ye.versions&&ye.versions.node;D?L=le.g:I&&(L=self);var X=!L.JS_SHA512_NO_COMMON_JS&&!0&&ke.exports,Fe=le.amdO,be=!L.JS_SHA512_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",m="0123456789abcdef".split(""),ce=[-2147483648,8388608,32768,128],ie=[24,16,8,0],fe=[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],Ee=["hex","array","digest","arrayBuffer"],Y=[];(L.JS_SHA512_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(g){return Object.prototype.toString.call(g)==="[object Array]"}),be&&(L.JS_SHA512_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(g){return typeof g=="object"&&g.buffer&&g.buffer.constructor===ArrayBuffer});var _e=function(g,U){return function(S){return new j(U,!0).update(S)[g]()}},A=function(g){var U=_e("hex",g);U.create=function(){return new j(g)},U.update=function(h){return U.create().update(h)};for(var S=0;S<Ee.length;++S){var $=Ee[S];U[$]=_e($,g)}return U},F=function(g,U){return function(S,$){return new O(S,U,!0).update($)[g]()}},T=function(g){var U=F("hex",g);U.create=function(h){return new O(h,g)},U.update=function(h,x){return U.create(h).update(x)};for(var S=0;S<Ee.length;++S){var $=Ee[S];U[$]=F($,g)}return U};function j(g,U){U?(Y[0]=Y[1]=Y[2]=Y[3]=Y[4]=Y[5]=Y[6]=Y[7]=Y[8]=Y[9]=Y[10]=Y[11]=Y[12]=Y[13]=Y[14]=Y[15]=Y[16]=Y[17]=Y[18]=Y[19]=Y[20]=Y[21]=Y[22]=Y[23]=Y[24]=Y[25]=Y[26]=Y[27]=Y[28]=Y[29]=Y[30]=Y[31]=Y[32]=0,this.blocks=Y):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g==384?(this.h0h=3418070365,this.h0l=3238371032,this.h1h=1654270250,this.h1l=914150663,this.h2h=2438529370,this.h2l=812702999,this.h3h=355462360,this.h3l=4144912697,this.h4h=1731405415,this.h4l=4290775857,this.h5h=2394180231,this.h5l=1750603025,this.h6h=3675008525,this.h6l=1694076839,this.h7h=1203062813,this.h7l=3204075428):g==256?(this.h0h=573645204,this.h0l=4230739756,this.h1h=2673172387,this.h1l=3360449730,this.h2h=596883563,this.h2l=1867755857,this.h3h=2520282905,this.h3l=1497426621,this.h4h=2519219938,this.h4l=2827943907,this.h5h=3193839141,this.h5l=1401305490,this.h6h=721525244,this.h6l=746961066,this.h7h=246885852,this.h7l=2177182882):g==224?(this.h0h=2352822216,this.h0l=424955298,this.h1h=1944164710,this.h1l=2312950998,this.h2h=502970286,this.h2l=855612546,this.h3h=1738396948,this.h3l=1479516111,this.h4h=258812777,this.h4l=2077511080,this.h5h=2011393907,this.h5l=79989058,this.h6h=1067287976,this.h6l=1780299464,this.h7h=286451373,this.h7l=2446758561):(this.h0h=1779033703,this.h0l=4089235720,this.h1h=3144134277,this.h1l=2227873595,this.h2h=1013904242,this.h2l=4271175723,this.h3h=2773480762,this.h3l=1595750129,this.h4h=1359893119,this.h4l=2917565137,this.h5h=2600822924,this.h5l=725511199,this.h6h=528734635,this.h6l=4215389547,this.h7h=1541459225,this.h7l=327033209),this.bits=g,this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1}j.prototype.update=function(g){if(this.finalized)throw new Error(l);var U,S=typeof g;if(S!=="string"){if(S==="object"){if(g===null)throw new Error(Z);if(be&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!Array.isArray(g)&&(!be||!ArrayBuffer.isView(g)))throw new Error(Z)}else throw new Error(Z);U=!0}for(var $,h=0,x,v=g.length,R=this.blocks;h<v;){if(this.hashed&&(this.hashed=!1,R[0]=this.block,R[1]=R[2]=R[3]=R[4]=R[5]=R[6]=R[7]=R[8]=R[9]=R[10]=R[11]=R[12]=R[13]=R[14]=R[15]=R[16]=R[17]=R[18]=R[19]=R[20]=R[21]=R[22]=R[23]=R[24]=R[25]=R[26]=R[27]=R[28]=R[29]=R[30]=R[31]=R[32]=0),U)for(x=this.start;h<v&&x<128;++h)R[x>>2]|=g[h]<<ie[x++&3];else for(x=this.start;h<v&&x<128;++h)$=g.charCodeAt(h),$<128?R[x>>2]|=$<<ie[x++&3]:$<2048?(R[x>>2]|=(192|$>>6)<<ie[x++&3],R[x>>2]|=(128|$&63)<<ie[x++&3]):$<55296||$>=57344?(R[x>>2]|=(224|$>>12)<<ie[x++&3],R[x>>2]|=(128|$>>6&63)<<ie[x++&3],R[x>>2]|=(128|$&63)<<ie[x++&3]):($=65536+(($&1023)<<10|g.charCodeAt(++h)&1023),R[x>>2]|=(240|$>>18)<<ie[x++&3],R[x>>2]|=(128|$>>12&63)<<ie[x++&3],R[x>>2]|=(128|$>>6&63)<<ie[x++&3],R[x>>2]|=(128|$&63)<<ie[x++&3]);this.lastByteIndex=x,this.bytes+=x-this.start,x>=128?(this.block=R[32],this.start=x-128,this.hash(),this.hashed=!0):this.start=x}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},j.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var g=this.blocks,U=this.lastByteIndex;g[32]=this.block,g[U>>2]|=ce[U&3],this.block=g[32],U>=112&&(this.hashed||this.hash(),g[0]=this.block,g[1]=g[2]=g[3]=g[4]=g[5]=g[6]=g[7]=g[8]=g[9]=g[10]=g[11]=g[12]=g[13]=g[14]=g[15]=g[16]=g[17]=g[18]=g[19]=g[20]=g[21]=g[22]=g[23]=g[24]=g[25]=g[26]=g[27]=g[28]=g[29]=g[30]=g[31]=g[32]=0),g[30]=this.hBytes<<3|this.bytes>>>29,g[31]=this.bytes<<3,this.hash()}},j.prototype.hash=function(){var g=this.h0h,U=this.h0l,S=this.h1h,$=this.h1l,h=this.h2h,x=this.h2l,v=this.h3h,R=this.h3l,W=this.h4h,Q=this.h4l,xe=this.h5h,pe=this.h5l,Ae=this.h6h,ve=this.h6l,Ie=this.h7h,Be=this.h7l,ge=this.blocks,ae,Te,De,Ce,je,M,G,B,ee,te,et,lt,it,ht,p,i,a,u,c,y,f,k,q,V,b;for(ae=32;ae<160;ae+=2)y=ge[ae-30],f=ge[ae-29],Te=(y>>>1|f<<31)^(y>>>8|f<<24)^y>>>7,De=(f>>>1|y<<31)^(f>>>8|y<<24)^(f>>>7|y<<25),y=ge[ae-4],f=ge[ae-3],Ce=(y>>>19|f<<13)^(f>>>29|y<<3)^y>>>6,je=(f>>>19|y<<13)^(y>>>29|f<<3)^(f>>>6|y<<26),y=ge[ae-32],f=ge[ae-31],k=ge[ae-14],q=ge[ae-13],M=(q&65535)+(f&65535)+(De&65535)+(je&65535),G=(q>>>16)+(f>>>16)+(De>>>16)+(je>>>16)+(M>>>16),B=(k&65535)+(y&65535)+(Te&65535)+(Ce&65535)+(G>>>16),ee=(k>>>16)+(y>>>16)+(Te>>>16)+(Ce>>>16)+(B>>>16),ge[ae]=ee<<16|B&65535,ge[ae+1]=G<<16|M&65535;var H=g,re=U,me=S,de=$,Ue=h,$e=x,Le=v,Ke=R,ze=W,Ge=Q,Pe=xe,he=pe,Oe=Ae,Me=ve,Ne=Ie,Re=Be;for(i=me&Ue,a=de&$e,ae=0;ae<160;ae+=8)Te=(H>>>28|re<<4)^(re>>>2|H<<30)^(re>>>7|H<<25),De=(re>>>28|H<<4)^(H>>>2|re<<30)^(H>>>7|re<<25),Ce=(ze>>>14|Ge<<18)^(ze>>>18|Ge<<14)^(Ge>>>9|ze<<23),je=(Ge>>>14|ze<<18)^(Ge>>>18|ze<<14)^(ze>>>9|Ge<<23),te=H&me,et=re&de,u=te^H&Ue^i,c=et^re&$e^a,V=ze&Pe^~ze&Oe,b=Ge&he^~Ge&Me,y=ge[ae],f=ge[ae+1],k=fe[ae],q=fe[ae+1],M=(q&65535)+(f&65535)+(b&65535)+(je&65535)+(Re&65535),G=(q>>>16)+(f>>>16)+(b>>>16)+(je>>>16)+(Re>>>16)+(M>>>16),B=(k&65535)+(y&65535)+(V&65535)+(Ce&65535)+(Ne&65535)+(G>>>16),ee=(k>>>16)+(y>>>16)+(V>>>16)+(Ce>>>16)+(Ne>>>16)+(B>>>16),y=ee<<16|B&65535,f=G<<16|M&65535,M=(c&65535)+(De&65535),G=(c>>>16)+(De>>>16)+(M>>>16),B=(u&65535)+(Te&65535)+(G>>>16),ee=(u>>>16)+(Te>>>16)+(B>>>16),k=ee<<16|B&65535,q=G<<16|M&65535,M=(Ke&65535)+(f&65535),G=(Ke>>>16)+(f>>>16)+(M>>>16),B=(Le&65535)+(y&65535)+(G>>>16),ee=(Le>>>16)+(y>>>16)+(B>>>16),Ne=ee<<16|B&65535,Re=G<<16|M&65535,M=(q&65535)+(f&65535),G=(q>>>16)+(f>>>16)+(M>>>16),B=(k&65535)+(y&65535)+(G>>>16),ee=(k>>>16)+(y>>>16)+(B>>>16),Le=ee<<16|B&65535,Ke=G<<16|M&65535,Te=(Le>>>28|Ke<<4)^(Ke>>>2|Le<<30)^(Ke>>>7|Le<<25),De=(Ke>>>28|Le<<4)^(Le>>>2|Ke<<30)^(Le>>>7|Ke<<25),Ce=(Ne>>>14|Re<<18)^(Ne>>>18|Re<<14)^(Re>>>9|Ne<<23),je=(Re>>>14|Ne<<18)^(Re>>>18|Ne<<14)^(Ne>>>9|Re<<23),lt=Le&H,it=Ke&re,u=lt^Le&me^te,c=it^Ke&de^et,V=Ne&ze^~Ne&Pe,b=Re&Ge^~Re&he,y=ge[ae+2],f=ge[ae+3],k=fe[ae+2],q=fe[ae+3],M=(q&65535)+(f&65535)+(b&65535)+(je&65535)+(Me&65535),G=(q>>>16)+(f>>>16)+(b>>>16)+(je>>>16)+(Me>>>16)+(M>>>16),B=(k&65535)+(y&65535)+(V&65535)+(Ce&65535)+(Oe&65535)+(G>>>16),ee=(k>>>16)+(y>>>16)+(V>>>16)+(Ce>>>16)+(Oe>>>16)+(B>>>16),y=ee<<16|B&65535,f=G<<16|M&65535,M=(c&65535)+(De&65535),G=(c>>>16)+(De>>>16)+(M>>>16),B=(u&65535)+(Te&65535)+(G>>>16),ee=(u>>>16)+(Te>>>16)+(B>>>16),k=ee<<16|B&65535,q=G<<16|M&65535,M=($e&65535)+(f&65535),G=($e>>>16)+(f>>>16)+(M>>>16),B=(Ue&65535)+(y&65535)+(G>>>16),ee=(Ue>>>16)+(y>>>16)+(B>>>16),Oe=ee<<16|B&65535,Me=G<<16|M&65535,M=(q&65535)+(f&65535),G=(q>>>16)+(f>>>16)+(M>>>16),B=(k&65535)+(y&65535)+(G>>>16),ee=(k>>>16)+(y>>>16)+(B>>>16),Ue=ee<<16|B&65535,$e=G<<16|M&65535,Te=(Ue>>>28|$e<<4)^($e>>>2|Ue<<30)^($e>>>7|Ue<<25),De=($e>>>28|Ue<<4)^(Ue>>>2|$e<<30)^(Ue>>>7|$e<<25),Ce=(Oe>>>14|Me<<18)^(Oe>>>18|Me<<14)^(Me>>>9|Oe<<23),je=(Me>>>14|Oe<<18)^(Me>>>18|Oe<<14)^(Oe>>>9|Me<<23),ht=Ue&Le,p=$e&Ke,u=ht^Ue&H^lt,c=p^$e&re^it,V=Oe&Ne^~Oe&ze,b=Me&Re^~Me&Ge,y=ge[ae+4],f=ge[ae+5],k=fe[ae+4],q=fe[ae+5],M=(q&65535)+(f&65535)+(b&65535)+(je&65535)+(he&65535),G=(q>>>16)+(f>>>16)+(b>>>16)+(je>>>16)+(he>>>16)+(M>>>16),B=(k&65535)+(y&65535)+(V&65535)+(Ce&65535)+(Pe&65535)+(G>>>16),ee=(k>>>16)+(y>>>16)+(V>>>16)+(Ce>>>16)+(Pe>>>16)+(B>>>16),y=ee<<16|B&65535,f=G<<16|M&65535,M=(c&65535)+(De&65535),G=(c>>>16)+(De>>>16)+(M>>>16),B=(u&65535)+(Te&65535)+(G>>>16),ee=(u>>>16)+(Te>>>16)+(B>>>16),k=ee<<16|B&65535,q=G<<16|M&65535,M=(de&65535)+(f&65535),G=(de>>>16)+(f>>>16)+(M>>>16),B=(me&65535)+(y&65535)+(G>>>16),ee=(me>>>16)+(y>>>16)+(B>>>16),Pe=ee<<16|B&65535,he=G<<16|M&65535,M=(q&65535)+(f&65535),G=(q>>>16)+(f>>>16)+(M>>>16),B=(k&65535)+(y&65535)+(G>>>16),ee=(k>>>16)+(y>>>16)+(B>>>16),me=ee<<16|B&65535,de=G<<16|M&65535,Te=(me>>>28|de<<4)^(de>>>2|me<<30)^(de>>>7|me<<25),De=(de>>>28|me<<4)^(me>>>2|de<<30)^(me>>>7|de<<25),Ce=(Pe>>>14|he<<18)^(Pe>>>18|he<<14)^(he>>>9|Pe<<23),je=(he>>>14|Pe<<18)^(he>>>18|Pe<<14)^(Pe>>>9|he<<23),i=me&Ue,a=de&$e,u=i^me&Le^ht,c=a^de&Ke^p,V=Pe&Oe^~Pe&Ne,b=he&Me^~he&Re,y=ge[ae+6],f=ge[ae+7],k=fe[ae+6],q=fe[ae+7],M=(q&65535)+(f&65535)+(b&65535)+(je&65535)+(Ge&65535),G=(q>>>16)+(f>>>16)+(b>>>16)+(je>>>16)+(Ge>>>16)+(M>>>16),B=(k&65535)+(y&65535)+(V&65535)+(Ce&65535)+(ze&65535)+(G>>>16),ee=(k>>>16)+(y>>>16)+(V>>>16)+(Ce>>>16)+(ze>>>16)+(B>>>16),y=ee<<16|B&65535,f=G<<16|M&65535,M=(c&65535)+(De&65535),G=(c>>>16)+(De>>>16)+(M>>>16),B=(u&65535)+(Te&65535)+(G>>>16),ee=(u>>>16)+(Te>>>16)+(B>>>16),k=ee<<16|B&65535,q=G<<16|M&65535,M=(re&65535)+(f&65535),G=(re>>>16)+(f>>>16)+(M>>>16),B=(H&65535)+(y&65535)+(G>>>16),ee=(H>>>16)+(y>>>16)+(B>>>16),ze=ee<<16|B&65535,Ge=G<<16|M&65535,M=(q&65535)+(f&65535),G=(q>>>16)+(f>>>16)+(M>>>16),B=(k&65535)+(y&65535)+(G>>>16),ee=(k>>>16)+(y>>>16)+(B>>>16),H=ee<<16|B&65535,re=G<<16|M&65535;M=(U&65535)+(re&65535),G=(U>>>16)+(re>>>16)+(M>>>16),B=(g&65535)+(H&65535)+(G>>>16),ee=(g>>>16)+(H>>>16)+(B>>>16),this.h0h=ee<<16|B&65535,this.h0l=G<<16|M&65535,M=($&65535)+(de&65535),G=($>>>16)+(de>>>16)+(M>>>16),B=(S&65535)+(me&65535)+(G>>>16),ee=(S>>>16)+(me>>>16)+(B>>>16),this.h1h=ee<<16|B&65535,this.h1l=G<<16|M&65535,M=(x&65535)+($e&65535),G=(x>>>16)+($e>>>16)+(M>>>16),B=(h&65535)+(Ue&65535)+(G>>>16),ee=(h>>>16)+(Ue>>>16)+(B>>>16),this.h2h=ee<<16|B&65535,this.h2l=G<<16|M&65535,M=(R&65535)+(Ke&65535),G=(R>>>16)+(Ke>>>16)+(M>>>16),B=(v&65535)+(Le&65535)+(G>>>16),ee=(v>>>16)+(Le>>>16)+(B>>>16),this.h3h=ee<<16|B&65535,this.h3l=G<<16|M&65535,M=(Q&65535)+(Ge&65535),G=(Q>>>16)+(Ge>>>16)+(M>>>16),B=(W&65535)+(ze&65535)+(G>>>16),ee=(W>>>16)+(ze>>>16)+(B>>>16),this.h4h=ee<<16|B&65535,this.h4l=G<<16|M&65535,M=(pe&65535)+(he&65535),G=(pe>>>16)+(he>>>16)+(M>>>16),B=(xe&65535)+(Pe&65535)+(G>>>16),ee=(xe>>>16)+(Pe>>>16)+(B>>>16),this.h5h=ee<<16|B&65535,this.h5l=G<<16|M&65535,M=(ve&65535)+(Me&65535),G=(ve>>>16)+(Me>>>16)+(M>>>16),B=(Ae&65535)+(Oe&65535)+(G>>>16),ee=(Ae>>>16)+(Oe>>>16)+(B>>>16),this.h6h=ee<<16|B&65535,this.h6l=G<<16|M&65535,M=(Be&65535)+(Re&65535),G=(Be>>>16)+(Re>>>16)+(M>>>16),B=(Ie&65535)+(Ne&65535)+(G>>>16),ee=(Ie>>>16)+(Ne>>>16)+(B>>>16),this.h7h=ee<<16|B&65535,this.h7l=G<<16|M&65535},j.prototype.hex=function(){this.finalize();var g=this.h0h,U=this.h0l,S=this.h1h,$=this.h1l,h=this.h2h,x=this.h2l,v=this.h3h,R=this.h3l,W=this.h4h,Q=this.h4l,xe=this.h5h,pe=this.h5l,Ae=this.h6h,ve=this.h6l,Ie=this.h7h,Be=this.h7l,ge=this.bits,ae=m[g>>28&15]+m[g>>24&15]+m[g>>20&15]+m[g>>16&15]+m[g>>12&15]+m[g>>8&15]+m[g>>4&15]+m[g&15]+m[U>>28&15]+m[U>>24&15]+m[U>>20&15]+m[U>>16&15]+m[U>>12&15]+m[U>>8&15]+m[U>>4&15]+m[U&15]+m[S>>28&15]+m[S>>24&15]+m[S>>20&15]+m[S>>16&15]+m[S>>12&15]+m[S>>8&15]+m[S>>4&15]+m[S&15]+m[$>>28&15]+m[$>>24&15]+m[$>>20&15]+m[$>>16&15]+m[$>>12&15]+m[$>>8&15]+m[$>>4&15]+m[$&15]+m[h>>28&15]+m[h>>24&15]+m[h>>20&15]+m[h>>16&15]+m[h>>12&15]+m[h>>8&15]+m[h>>4&15]+m[h&15]+m[x>>28&15]+m[x>>24&15]+m[x>>20&15]+m[x>>16&15]+m[x>>12&15]+m[x>>8&15]+m[x>>4&15]+m[x&15]+m[v>>28&15]+m[v>>24&15]+m[v>>20&15]+m[v>>16&15]+m[v>>12&15]+m[v>>8&15]+m[v>>4&15]+m[v&15];return ge>=256&&(ae+=m[R>>28&15]+m[R>>24&15]+m[R>>20&15]+m[R>>16&15]+m[R>>12&15]+m[R>>8&15]+m[R>>4&15]+m[R&15]),ge>=384&&(ae+=m[W>>28&15]+m[W>>24&15]+m[W>>20&15]+m[W>>16&15]+m[W>>12&15]+m[W>>8&15]+m[W>>4&15]+m[W&15]+m[Q>>28&15]+m[Q>>24&15]+m[Q>>20&15]+m[Q>>16&15]+m[Q>>12&15]+m[Q>>8&15]+m[Q>>4&15]+m[Q&15]+m[xe>>28&15]+m[xe>>24&15]+m[xe>>20&15]+m[xe>>16&15]+m[xe>>12&15]+m[xe>>8&15]+m[xe>>4&15]+m[xe&15]+m[pe>>28&15]+m[pe>>24&15]+m[pe>>20&15]+m[pe>>16&15]+m[pe>>12&15]+m[pe>>8&15]+m[pe>>4&15]+m[pe&15]),ge==512&&(ae+=m[Ae>>28&15]+m[Ae>>24&15]+m[Ae>>20&15]+m[Ae>>16&15]+m[Ae>>12&15]+m[Ae>>8&15]+m[Ae>>4&15]+m[Ae&15]+m[ve>>28&15]+m[ve>>24&15]+m[ve>>20&15]+m[ve>>16&15]+m[ve>>12&15]+m[ve>>8&15]+m[ve>>4&15]+m[ve&15]+m[Ie>>28&15]+m[Ie>>24&15]+m[Ie>>20&15]+m[Ie>>16&15]+m[Ie>>12&15]+m[Ie>>8&15]+m[Ie>>4&15]+m[Ie&15]+m[Be>>28&15]+m[Be>>24&15]+m[Be>>20&15]+m[Be>>16&15]+m[Be>>12&15]+m[Be>>8&15]+m[Be>>4&15]+m[Be&15]),ae},j.prototype.toString=j.prototype.hex,j.prototype.digest=function(){this.finalize();var g=this.h0h,U=this.h0l,S=this.h1h,$=this.h1l,h=this.h2h,x=this.h2l,v=this.h3h,R=this.h3l,W=this.h4h,Q=this.h4l,xe=this.h5h,pe=this.h5l,Ae=this.h6h,ve=this.h6l,Ie=this.h7h,Be=this.h7l,ge=this.bits,ae=[g>>24&255,g>>16&255,g>>8&255,g&255,U>>24&255,U>>16&255,U>>8&255,U&255,S>>24&255,S>>16&255,S>>8&255,S&255,$>>24&255,$>>16&255,$>>8&255,$&255,h>>24&255,h>>16&255,h>>8&255,h&255,x>>24&255,x>>16&255,x>>8&255,x&255,v>>24&255,v>>16&255,v>>8&255,v&255];return ge>=256&&ae.push(R>>24&255,R>>16&255,R>>8&255,R&255),ge>=384&&ae.push(W>>24&255,W>>16&255,W>>8&255,W&255,Q>>24&255,Q>>16&255,Q>>8&255,Q&255,xe>>24&255,xe>>16&255,xe>>8&255,xe&255,pe>>24&255,pe>>16&255,pe>>8&255,pe&255),ge==512&&ae.push(Ae>>24&255,Ae>>16&255,Ae>>8&255,Ae&255,ve>>24&255,ve>>16&255,ve>>8&255,ve&255,Ie>>24&255,Ie>>16&255,Ie>>8&255,Ie&255,Be>>24&255,Be>>16&255,Be>>8&255,Be&255),ae},j.prototype.array=j.prototype.digest,j.prototype.arrayBuffer=function(){this.finalize();var g=this.bits,U=new ArrayBuffer(g/8),S=new DataView(U);return S.setUint32(0,this.h0h),S.setUint32(4,this.h0l),S.setUint32(8,this.h1h),S.setUint32(12,this.h1l),S.setUint32(16,this.h2h),S.setUint32(20,this.h2l),S.setUint32(24,this.h3h),g>=256&&S.setUint32(28,this.h3l),g>=384&&(S.setUint32(32,this.h4h),S.setUint32(36,this.h4l),S.setUint32(40,this.h5h),S.setUint32(44,this.h5l)),g==512&&(S.setUint32(48,this.h6h),S.setUint32(52,this.h6l),S.setUint32(56,this.h7h),S.setUint32(60,this.h7l)),U},j.prototype.clone=function(){var g=new j(this.bits,!1);return this.copyTo(g),g},j.prototype.copyTo=function(g){var U=0,S=["h0h","h0l","h1h","h1l","h2h","h2l","h3h","h3l","h4h","h4l","h5h","h5l","h6h","h6l","h7h","h7l","start","bytes","hBytes","finalized","hashed","lastByteIndex"];for(U=0;U<S.length;++U)g[S[U]]=this[S[U]];for(U=0;U<this.blocks.length;++U)g.blocks[U]=this.blocks[U]};function O(g,U,S){var $,h=typeof g;if(h!=="string"){if(h==="object"){if(g===null)throw new Error(Z);if(be&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!Array.isArray(g)&&(!be||!ArrayBuffer.isView(g)))throw new Error(Z)}else throw new Error(Z);$=!0}var x=g.length;if(!$){for(var v=[],x=g.length,R=0,W,Q=0;Q<x;++Q)W=g.charCodeAt(Q),W<128?v[R++]=W:W<2048?(v[R++]=192|W>>6,v[R++]=128|W&63):W<55296||W>=57344?(v[R++]=224|W>>12,v[R++]=128|W>>6&63,v[R++]=128|W&63):(W=65536+((W&1023)<<10|g.charCodeAt(++Q)&1023),v[R++]=240|W>>18,v[R++]=128|W>>12&63,v[R++]=128|W>>6&63,v[R++]=128|W&63);g=v}g.length>128&&(g=new j(U,!0).update(g).array());for(var xe=[],pe=[],Q=0;Q<128;++Q){var Ae=g[Q]||0;xe[Q]=92^Ae,pe[Q]=54^Ae}j.call(this,U,S),this.update(pe),this.oKeyPad=xe,this.inner=!0,this.sharedMemory=S}O.prototype=new j,O.prototype.finalize=function(){if(j.prototype.finalize.call(this),this.inner){this.inner=!1;var g=this.array();j.call(this,this.bits,this.sharedMemory),this.update(this.oKeyPad),this.update(g),j.prototype.finalize.call(this)}},O.prototype.clone=function(){var g=new O([],this.bits,!1);this.copyTo(g),g.inner=this.inner;for(var U=0;U<this.oKeyPad.length;++U)g.oKeyPad[U]=this.oKeyPad[U];return g};var z=A(512);z.sha512=z,z.sha384=A(384),z.sha512_256=A(256),z.sha512_224=A(224),z.sha512.hmac=T(512),z.sha384.hmac=T(384),z.sha512_256.hmac=T(256),z.sha512_224.hmac=T(224),X?ke.exports=z:(L.sha512=z.sha512,L.sha384=z.sha384,L.sha512_256=z.sha512_256,L.sha512_224=z.sha512_224,Fe&&(we=function(){return z}.call(z,le,z,ke),we!==void 0&&(ke.exports=we)))})()},4400:function(ke,Je,le){var ye=le(54123).stringify,we=le(26813);ke.exports=function(Z){return{parse:we(Z),stringify:ye}},ke.exports.parse=we(),ke.exports.stringify=ye},26813:function(ke,Je,le){var ye=null;const we=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,Z=/(?: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)/;var l=function(K){"use strict";var L={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(K!=null){if(K.strict===!0&&(L.strict=!0),K.storeAsString===!0&&(L.storeAsString=!0),L.alwaysParseAsBig=K.alwaysParseAsBig===!0?K.alwaysParseAsBig:!1,L.useNativeBigInt=K.useNativeBigInt===!0?K.useNativeBigInt:!1,typeof K.constructorAction<"u")if(K.constructorAction==="error"||K.constructorAction==="ignore"||K.constructorAction==="preserve")L.constructorAction=K.constructorAction;else throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${K.constructorAction}`);if(typeof K.protoAction<"u")if(K.protoAction==="error"||K.protoAction==="ignore"||K.protoAction==="preserve")L.protoAction=K.protoAction;else throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${K.protoAction}`)}var I,D,X={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
19
+ `,r:"\r",t:" "},Fe,be=function(F){throw{name:"SyntaxError",message:F,at:I,text:Fe}},m=function(F){return F&&F!==D&&be("Expected '"+F+"' instead of '"+D+"'"),D=Fe.charAt(I),I+=1,D},ce=function(){var F,T="";for(D==="-"&&(T="-",m("-"));D>="0"&&D<="9";)T+=D,m();if(D===".")for(T+=".";m()&&D>="0"&&D<="9";)T+=D;if(D==="e"||D==="E")for(T+=D,m(),(D==="-"||D==="+")&&(T+=D,m());D>="0"&&D<="9";)T+=D,m();if(F=+T,!isFinite(F))be("Bad number");else return ye==null&&(ye=le(44431)),T.length>15?L.storeAsString?T:L.useNativeBigInt?BigInt(T):new ye(T):L.alwaysParseAsBig?L.useNativeBigInt?BigInt(F):new ye(F):F},ie=function(){var F,T,j="",O;if(D==='"')for(var z=I;m();){if(D==='"')return I-1>z&&(j+=Fe.substring(z,I-1)),m(),j;if(D==="\\"){if(I-1>z&&(j+=Fe.substring(z,I-1)),m(),D==="u"){for(O=0,T=0;T<4&&(F=parseInt(m(),16),!!isFinite(F));T+=1)O=O*16+F;j+=String.fromCharCode(O)}else if(typeof X[D]=="string")j+=X[D];else break;z=I}}be("Bad string")},fe=function(){for(;D&&D<=" ";)m()},Ee=function(){switch(D){case"t":return m("t"),m("r"),m("u"),m("e"),!0;case"f":return m("f"),m("a"),m("l"),m("s"),m("e"),!1;case"n":return m("n"),m("u"),m("l"),m("l"),null}be("Unexpected '"+D+"'")},Y,_e=function(){var F=[];if(D==="["){if(m("["),fe(),D==="]")return m("]"),F;for(;D;){if(F.push(Y()),fe(),D==="]")return m("]"),F;m(","),fe()}}be("Bad array")},A=function(){var F,T=Object.create(null);if(D==="{"){if(m("{"),fe(),D==="}")return m("}"),T;for(;D;){if(F=ie(),fe(),m(":"),L.strict===!0&&Object.hasOwnProperty.call(T,F)&&be('Duplicate key "'+F+'"'),we.test(F)===!0?L.protoAction==="error"?be("Object contains forbidden prototype property"):L.protoAction==="ignore"?Y():T[F]=Y():Z.test(F)===!0?L.constructorAction==="error"?be("Object contains forbidden constructor property"):L.constructorAction==="ignore"?Y():T[F]=Y():T[F]=Y(),fe(),D==="}")return m("}"),T;m(","),fe()}}be("Bad object")};return Y=function(){switch(fe(),D){case"{":return A();case"[":return _e();case'"':return ie();case"-":return ce();default:return D>="0"&&D<="9"?ce():Ee()}},function(F,T){var j;return Fe=F+"",I=0,D=" ",j=Y(),fe(),D&&be("Syntax error"),typeof T=="function"?function O(z,g){var U,S,$=z[g];return $&&typeof $=="object"&&Object.keys($).forEach(function(h){S=O($,h),S!==void 0?$[h]=S:delete $[h]}),T.call(z,g,$)}({"":j},""):j}};ke.exports=l},54123:function(ke,Je,le){var ye=le(44431),we=ke.exports;(function(){"use strict";function Z(m){return m<10?"0"+m:m}var l=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,K=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,L,I,D={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},X;function Fe(m){return K.lastIndex=0,K.test(m)?'"'+m.replace(K,function(ce){var ie=D[ce];return typeof ie=="string"?ie:"\\u"+("0000"+ce.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+m+'"'}function be(m,ce){var ie,fe,Ee,Y,_e=L,A,F=ce[m],T=F!=null&&(F instanceof ye||ye.isBigNumber(F));switch(F&&typeof F=="object"&&typeof F.toJSON=="function"&&(F=F.toJSON(m)),typeof X=="function"&&(F=X.call(ce,m,F)),typeof F){case"string":return T?F:Fe(F);case"number":return isFinite(F)?String(F):"null";case"boolean":case"null":case"bigint":return String(F);case"object":if(!F)return"null";if(L+=I,A=[],Object.prototype.toString.apply(F)==="[object Array]"){for(Y=F.length,ie=0;ie<Y;ie+=1)A[ie]=be(ie,F)||"null";return Ee=A.length===0?"[]":L?`[
20
20
  `+L+A.join(`,
21
21
  `+L)+`
22
- `+_e+"]":"["+A.join(",")+"]",L=_e,Ee}if(Y&&typeof Y=="object")for(Z=Y.length,ie=0;ie<Z;ie+=1)typeof Y[ie]=="string"&&(le=Y[ie],Ee=be(le,F),Ee&&A.push(Fe(le)+(L?": ":":")+Ee));else Object.keys(F).forEach(function(j){var O=be(j,F);O&&A.push(Fe(j)+(L?": ":":")+O)});return Ee=A.length===0?"{}":L?`{
22
+ `+_e+"]":"["+A.join(",")+"]",L=_e,Ee}if(X&&typeof X=="object")for(Y=X.length,ie=0;ie<Y;ie+=1)typeof X[ie]=="string"&&(fe=X[ie],Ee=be(fe,F),Ee&&A.push(Fe(fe)+(L?": ":":")+Ee));else Object.keys(F).forEach(function(j){var O=be(j,F);O&&A.push(Fe(j)+(L?": ":":")+O)});return Ee=A.length===0?"{}":L?`{
23
23
  `+L+A.join(`,
24
24
  `+L)+`
25
- `+_e+"}":"{"+A.join(",")+"}",L=_e,Ee}}typeof ye.stringify!="function"&&(ye.stringify=function(m,fe,ie){var le;if(L="",k="",typeof ie=="number")for(le=0;le<ie;le+=1)k+=" ";else typeof ie=="string"&&(k=ie);if(Y=fe,fe&&typeof fe!="function"&&(typeof fe!="object"||typeof fe.length!="number"))throw new Error("JSON.stringify");return be("",{"":m})})})()},35620:function(Be,Ke,ce){"use strict";ce.d(Ke,{US:function(){return N},YU:function(){return ye}});var de=ce(79911);const ye=de.base16,J=de.base32,l=de.base32hex,N=de.base64,L=de.base64url,k=de.codec;var D=null}}]);
25
+ `+_e+"}":"{"+A.join(",")+"}",L=_e,Ee}}typeof we.stringify!="function"&&(we.stringify=function(m,ce,ie){var fe;if(L="",I="",typeof ie=="number")for(fe=0;fe<ie;fe+=1)I+=" ";else typeof ie=="string"&&(I=ie);if(X=ce,ce&&typeof ce!="function"&&(typeof ce!="object"||typeof ce.length!="number"))throw new Error("JSON.stringify");return be("",{"":m})})})()}}]);