edge-currency-accountbased 2.2.3 → 2.2.5

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 (76) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/android/src/main/assets/edge-currency-accountbased/1944.chunk.js +4 -0
  3. package/android/src/main/assets/edge-currency-accountbased/2153.chunk.js +2 -0
  4. package/android/src/main/assets/edge-currency-accountbased/2821.chunk.js +2 -0
  5. package/android/src/main/assets/edge-currency-accountbased/2896.chunk.js +35 -0
  6. package/android/src/main/assets/edge-currency-accountbased/2945.chunk.js +25 -0
  7. package/android/src/main/assets/edge-currency-accountbased/3491.chunk.js +1 -0
  8. package/android/src/main/assets/edge-currency-accountbased/{620.chunk.js → 3620.chunk.js} +1 -1
  9. package/android/src/main/assets/edge-currency-accountbased/{666.chunk.js → 3666.chunk.js} +1 -1
  10. package/android/src/main/assets/edge-currency-accountbased/3720.chunk.js +1 -0
  11. package/android/src/main/assets/edge-currency-accountbased/{978.chunk.js → 3978.chunk.js} +1 -1
  12. package/android/src/main/assets/edge-currency-accountbased/4251.chunk.js +4 -0
  13. package/android/src/main/assets/edge-currency-accountbased/4431.chunk.js +1 -0
  14. package/android/src/main/assets/edge-currency-accountbased/4618.chunk.js +20 -0
  15. package/android/src/main/assets/edge-currency-accountbased/{627.chunk.js → 4627.chunk.js} +1 -1
  16. package/android/src/main/assets/edge-currency-accountbased/4650.chunk.js +1 -0
  17. package/android/src/main/assets/edge-currency-accountbased/{826.chunk.js → 5179.chunk.js} +1 -1
  18. package/android/src/main/assets/edge-currency-accountbased/{835.chunk.js → 5835.chunk.js} +1 -1
  19. package/android/src/main/assets/edge-currency-accountbased/5836.chunk.js +1 -0
  20. package/android/src/main/assets/edge-currency-accountbased/6266.chunk.js +1 -0
  21. package/android/src/main/assets/edge-currency-accountbased/6291.chunk.js +58 -0
  22. package/android/src/main/assets/edge-currency-accountbased/6341.chunk.js +44 -0
  23. package/android/src/main/assets/edge-currency-accountbased/7221.chunk.js +1 -0
  24. package/android/src/main/assets/edge-currency-accountbased/7428.chunk.js +6 -0
  25. package/android/src/main/assets/edge-currency-accountbased/{481.chunk.js → 7481.chunk.js} +1 -1
  26. package/android/src/main/assets/edge-currency-accountbased/7542.chunk.js +1 -0
  27. package/android/src/main/assets/edge-currency-accountbased/7786.chunk.js +2 -0
  28. package/android/src/main/assets/edge-currency-accountbased/8190.chunk.js +1 -0
  29. package/android/src/main/assets/edge-currency-accountbased/{689.chunk.js → 8689.chunk.js} +1 -1
  30. package/android/src/main/assets/edge-currency-accountbased/{726.chunk.js → 8726.chunk.js} +1 -1
  31. package/android/src/main/assets/edge-currency-accountbased/9068.chunk.js +1 -0
  32. package/android/src/main/assets/edge-currency-accountbased/{223.chunk.js → 9223.chunk.js} +2 -2
  33. package/android/src/main/assets/edge-currency-accountbased/9539.chunk.js +10 -0
  34. package/android/src/main/assets/edge-currency-accountbased/{645.chunk.js → 9645.chunk.js} +6 -6
  35. package/android/src/main/assets/edge-currency-accountbased/9669.chunk.js +7 -0
  36. package/android/src/main/assets/edge-currency-accountbased/algorand.chunk.js +1 -1
  37. package/android/src/main/assets/edge-currency-accountbased/bnb.chunk.js +2 -2
  38. package/android/src/main/assets/edge-currency-accountbased/edge-currency-accountbased.js +2 -18
  39. package/android/src/main/assets/edge-currency-accountbased/eos.chunk.js +5 -5
  40. package/android/src/main/assets/edge-currency-accountbased/ethereum.chunk.js +2 -2
  41. package/android/src/main/assets/edge-currency-accountbased/filecoin.chunk.js +1 -1
  42. package/android/src/main/assets/edge-currency-accountbased/fio.chunk.js +2 -2
  43. package/android/src/main/assets/edge-currency-accountbased/hedera.chunk.js +2 -2
  44. package/android/src/main/assets/edge-currency-accountbased/polkadot.chunk.js +2 -2
  45. package/android/src/main/assets/edge-currency-accountbased/ripple.chunk.js +2 -2
  46. package/android/src/main/assets/edge-currency-accountbased/solana.chunk.js +2 -2
  47. package/android/src/main/assets/edge-currency-accountbased/stellar.chunk.js +2 -2
  48. package/android/src/main/assets/edge-currency-accountbased/tezos.chunk.js +2 -2
  49. package/android/src/main/assets/edge-currency-accountbased/tron.chunk.js +1 -1
  50. package/android/src/main/assets/edge-currency-accountbased/zcash.chunk.js +2 -2
  51. package/lib/ethereum/info/avalancheInfo.js +8 -0
  52. package/lib/ethereum/info/ethereumInfo.js +8 -0
  53. package/lib/filecoin/FilecoinEngine.js +112 -79
  54. package/lib/filecoin/Filfox.js +68 -1
  55. package/lib/filecoin/filecoinInfo.js +8 -3
  56. package/lib/filecoin/filecoinTypes.js +1 -6
  57. package/lib/zcash/ZcashEngine.js +11 -9
  58. package/package.json +1 -1
  59. package/android/src/main/assets/edge-currency-accountbased/124.chunk.js +0 -35
  60. package/android/src/main/assets/edge-currency-accountbased/17.chunk.js +0 -58
  61. package/android/src/main/assets/edge-currency-accountbased/190.chunk.js +0 -1
  62. package/android/src/main/assets/edge-currency-accountbased/221.chunk.js +0 -1
  63. package/android/src/main/assets/edge-currency-accountbased/298.chunk.js +0 -44
  64. package/android/src/main/assets/edge-currency-accountbased/431.chunk.js +0 -1
  65. package/android/src/main/assets/edge-currency-accountbased/491.chunk.js +0 -1
  66. package/android/src/main/assets/edge-currency-accountbased/539.chunk.js +0 -10
  67. package/android/src/main/assets/edge-currency-accountbased/542.chunk.js +0 -1
  68. package/android/src/main/assets/edge-currency-accountbased/618.chunk.js +0 -20
  69. package/android/src/main/assets/edge-currency-accountbased/650.chunk.js +0 -1
  70. package/android/src/main/assets/edge-currency-accountbased/68.chunk.js +0 -1
  71. package/android/src/main/assets/edge-currency-accountbased/720.chunk.js +0 -1
  72. package/android/src/main/assets/edge-currency-accountbased/786.chunk.js +0 -2
  73. package/android/src/main/assets/edge-currency-accountbased/836.chunk.js +0 -1
  74. package/android/src/main/assets/edge-currency-accountbased/935.chunk.js +0 -1
  75. package/android/src/main/assets/edge-currency-accountbased/944.chunk.js +0 -4
  76. package/android/src/main/assets/edge-currency-accountbased/945.chunk.js +0 -25
@@ -0,0 +1,25 @@
1
+ (self.webpackChunkedge_currency_accountbased=self.webpackChunkedge_currency_accountbased||[]).push([[2945],{66424:function(Te,de,ne){var ce=ne(34155);(function(ge,Y){Te.exports=Y()})(this,function(){return function(ge){var Y={};function l(O){if(Y[O])return Y[O].exports;var j=Y[O]={i:O,l:!1,exports:{}};return ge[O].call(j.exports,j,j.exports,l),j.l=!0,j.exports}return l.m=ge,l.c=Y,l.d=function(O,j,k){l.o(O,j)||Object.defineProperty(O,j,{enumerable:!0,get:k})},l.r=function(O){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(O,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(O,"__esModule",{value:!0})},l.t=function(O,j){if(1&j&&(O=l(O)),8&j||4&j&&typeof O=="object"&&O&&O.__esModule)return O;var k=Object.create(null);if(l.r(k),Object.defineProperty(k,"default",{enumerable:!0,value:O}),2&j&&typeof O!="string")for(var I in O)l.d(k,I,function(J){return O[J]}.bind(null,I));return k},l.n=function(O){var j=O&&O.__esModule?function(){return O.default}:function(){return O};return l.d(j,"a",j),j},l.o=function(O,j){return Object.prototype.hasOwnProperty.call(O,j)},l.p="",l(l.s=0)}([function(ge,Y,l){"use strict";l.r(Y),l.d(Y,"encode",function(){return x}),l.d(Y,"decode",function(){return je}),l.d(Y,"decodeAsync",function(){return lt}),l.d(Y,"decodeArrayStream",function(){return it}),l.d(Y,"decodeStream",function(){return ht}),l.d(Y,"Decoder",function(){return Be}),l.d(Y,"Encoder",function(){return L}),l.d(Y,"ExtensionCodec",function(){return g}),l.d(Y,"ExtData",function(){return se}),l.d(Y,"EXT_TIMESTAMP",function(){return Re}),l.d(Y,"encodeDateToTimeSpec",function(){return F}),l.d(Y,"encodeTimeSpecToTimestamp",function(){return A}),l.d(Y,"decodeTimestampToTimeSpec",function(){return P}),l.d(Y,"encodeTimestampExtension",function(){return T}),l.d(Y,"decodeTimestampExtension",function(){return M});var O=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(D){c={error:D}}finally{try{u&&!u.done&&(a=y.return)&&a.call(y)}finally{if(c)throw c.error}}return f},j=function(){for(var p=[],i=0;i<arguments.length;i++)p=p.concat(O(arguments[i]));return p},k=typeof ce<"u"&&typeof TextEncoder<"u"&&typeof TextDecoder<"u";function I(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 J=k?new TextEncoder:void 0,_e=typeof ce<"u"?200:0,be=J!=null&&J.encodeInto?function(p,i,a){J.encodeInto(p,i.subarray(a))}:function(p,i,a){i.set(J.encode(p),a)};function m(p,i,a){for(var u=i,c=u+a,y=[],f="";u<c;){var D=p[u++];if((128&D)==0)y.push(D);else if((224&D)==192){var $=63&p[u++];y.push((31&D)<<6|$)}else if((240&D)==224){$=63&p[u++];var W=63&p[u++];y.push((31&D)<<12|$<<6|W)}else if((248&D)==240){var b=(7&D)<<18|($=63&p[u++])<<12|(W=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(D);y.length>=4096&&(f+=String.fromCharCode.apply(String,j(y)),y.length=0)}return y.length>0&&(f+=String.fromCharCode.apply(String,j(y))),f}var oe=k?new TextDecoder:null,H=typeof ce<"u"?200:0,se=function(p,i){this.type=p,this.data=i};function Ae(p,i,a){var u=Math.floor(a/4294967296),c=a;p.setUint32(i,u),p.setUint32(i+4,c)}function Q(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 Re=-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),Ae(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 P(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:Q(i,4),nsec:i.getUint32(0)};default:throw new Error("Unrecognized data size for timestamp: "+p.length)}}function M(p){var i=P(p);return new Date(1e3*i.sec+i.nsec/1e6)}var z={type:Re,encode:T,decode:M},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 se(-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 se(u,y)}return i instanceof se?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 se(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.")},L=function(){function p(i,a,u,c,y,f,D,$){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),D===void 0&&(D=!1),$===void 0&&($=!1),this.extensionCodec=i,this.context=a,this.maxDepth=u,this.initialBufferSize=c,this.sortKeys=y,this.forceFloat32=f,this.ignoreUndefined=D,this.forceIntegerToFloat=$,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>_e){var u=I(i);this.ensureBufferSizeToWrite(5+u),this.writeStringHeader(u),be(i,this.bytes,this.pos),this.pos+=u}else u=I(i),this.ensureBufferSizeToWrite(5+u),this.writeStringHeader(u),function(c,y,f){for(var D=c.length,$=f,W=0;W<D;){var b=c.charCodeAt(W++);if((4294967168&b)!=0){if((4294965248&b)==0)y[$++]=b>>6&31|192;else{if(b>=55296&&b<=56319&&W<D){var V=c.charCodeAt(W);(64512&V)==56320&&(++W,b=((1023&b)<<10)+(1023&V)+65536)}(4294901760&b)==0?(y[$++]=b>>12&15|224,y[$++]=b>>6&63|128):(y[$++]=b>>18&7|240,y[$++]=b>>12&63|128,y[$++]=b>>6&63|128)}y[$++]=63&b|128}else y[$++]=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),D=f.next();!D.done;D=f.next()){var $=D.value;this.doEncode($,a+1)}}catch(W){u={error:W}}finally{try{D&&!D.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),D=f.next();!D.done;D=f.next())i[D.value]!==void 0&&y++}catch($){u={error:$}}finally{try{D&&!D.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 D=S(y),$=D.next();!$.done;$=D.next()){var W=$.value,b=i[W];this.ignoreUndefined&&b===void 0||(this.encodeString(W),this.doEncode(b,a+1))}}catch(V){u={error:V}}finally{try{$&&!$.done&&(c=D.return)&&c.call(D)}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),Ae(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 L(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 D=c[f],$=D.bytes,W=0;W<u;W++)if($[W]!==i[a+W])continue e;return D.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}(),X=function(p,i,a,u){return new(a||(a=Promise))(function(c,y){function f(W){try{$(u.next(W))}catch(b){y(b)}}function D(W){try{$(u.throw(W))}catch(b){y(b)}}function $(W){var b;W.done?c(W.value):(b=W.value,b instanceof a?b:new a(function(V){V(b)})).then(f,D)}$((u=u.apply(p,i||[])).next())})},ee=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:D(0),throw:D(1),return:D(2)},typeof Symbol=="function"&&(y[Symbol.iterator]=function(){return this}),y;function D($){return function(W){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(V){b=[6,V],u=0}finally{a=c=0}if(5&b[0])throw b[1];return{value:b[0]?b[1]:void 0,done:!0}}([$,W])}}},Fe=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,D){(function($,W,b,V){Promise.resolve(V).then(function(ie){$({value:ie,done:b})},W)})(f,D,(y=p[c](y)).done,y.value)})}}},ye=function(p){return this instanceof ye?(this.v=p,this):new ye(p)},ve=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(V){c[V]&&(u[V]=function(ie){return new Promise(function(xe,me){y.push([V,ie,xe,me])>1||D(V,ie)})})}function D(V,ie){try{(xe=c[V](ie)).value instanceof ye?Promise.resolve(xe.value.v).then($,W):b(y[0][2],xe)}catch(me){b(y[0][3],me)}var xe}function $(V){D("next",V)}function W(V){D("throw",V)}function b(V,ie){V(ie),y.shift(),y.length&&D(y[0][0],y[0][1])}},Ee=new DataView(new ArrayBuffer(0)),De=new Uint8Array(Ee.buffer),ke=function(){try{Ee.getInt8(0)}catch(p){return p.constructor}throw new Error("never reached")}(),we=new ke("Insufficient data"),le=new R,Be=function(){function p(i,a,u,c,y,f,D,$){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),D===void 0&&(D=4294967295),$===void 0&&($=le),this.extensionCodec=i,this.context=a,this.maxStrLength=u,this.maxBinLength=c,this.maxArrayLength=y,this.maxMapLength=f,this.maxExtLength=D,this.keyDecoder=$,this.totalPos=0,this.pos=0,this.view=Ee,this.bytes=De,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 X(this,void 0,void 0,function(){var f,D,$,W,b,V,ie,xe;return ee(this,function(me){switch(me.label){case 0:f=!1,me.label=1;case 1:me.trys.push([1,6,7,12]),a=Fe(i),me.label=2;case 2:return[4,a.next()];case 3:if((u=me.sent()).done)return[3,5];if($=u.value,f)throw this.createNoExtraBytesError(this.totalPos);this.appendBuffer($);try{D=this.doDecodeSync(),f=!0}catch(Ce){if(!(Ce instanceof ke))throw Ce}this.totalPos+=this.pos,me.label=4;case 4:return[3,2];case 5:return[3,12];case 6:return W=me.sent(),c={error:W},[3,12];case 7:return me.trys.push([7,,10,11]),u&&!u.done&&(y=a.return)?[4,y.call(a)]:[3,9];case 8:me.sent(),me.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,D]}throw V=(b=this).headByte,ie=b.pos,xe=b.totalPos,new RangeError("Insufficient data in parcing "+v(V)+" at "+xe+" ("+ie+" 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 ve(this,arguments,function(){var u,c,y,f,D,$,W,b,V;return ee(this,function(ie){switch(ie.label){case 0:u=a,c=-1,ie.label=1;case 1:ie.trys.push([1,13,14,19]),y=Fe(i),ie.label=2;case 2:return[4,ye(y.next())];case 3:if((f=ie.sent()).done)return[3,12];if(D=f.value,a&&c===0)throw this.createNoExtraBytesError(this.totalPos);this.appendBuffer(D),u&&(c=this.readArraySize(),u=!1,this.complete()),ie.label=4;case 4:ie.trys.push([4,9,,10]),ie.label=5;case 5:return[4,ye(this.doDecodeSync())];case 6:return[4,ie.sent()];case 7:return ie.sent(),--c==0?[3,8]:[3,5];case 8:return[3,10];case 9:if(!(($=ie.sent())instanceof ke))throw $;return[3,10];case 10:this.totalPos+=this.pos,ie.label=11;case 11:return[3,2];case 12:return[3,19];case 13:return W=ie.sent(),b={error:W},[3,19];case 14:return ie.trys.push([14,,17,18]),f&&!f.done&&(V=y.return)?[4,ye(V.call(y))]:[3,16];case 15:ie.sent(),ie.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(D=void 0,(D=typeof a)!="string"&&D!=="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 D},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 we;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>H?function(f,D,$){var W=f.subarray(D,D+$);return oe.decode(W)}(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 we;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=Q(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}(),Ue={};function je(p,i){return i===void 0&&(i=Ue),new Be(i.extensionCodec,i.context,i.maxStrLength,i.maxBinLength,i.maxArrayLength,i.maxMapLength,i.maxExtLength).decode(p)}var Pe=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:D(0),throw:D(1),return:D(2)},typeof Symbol=="function"&&(y[Symbol.iterator]=function(){return this}),y;function D($){return function(W){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(V){b=[6,V],u=0}finally{a=c=0}if(5&b[0])throw b[1];return{value:b[0]?b[1]:void 0,done:!0}}([$,W])}}},N=function(p){return this instanceof N?(this.v=p,this):new N(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(V){c[V]&&(u[V]=function(ie){return new Promise(function(xe,me){y.push([V,ie,xe,me])>1||D(V,ie)})})}function D(V,ie){try{(xe=c[V](ie)).value instanceof N?Promise.resolve(xe.value.v).then($,W):b(y[0][2],xe)}catch(me){b(y[0][3],me)}var xe}function $(V){D("next",V)}function W(V){D("throw",V)}function b(V,ie){V(ie),y.shift(),y.length&&D(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 te(p){return p[Symbol.asyncIterator]!=null?p:function(i){return G(this,arguments,function(){var a,u,c,y;return Pe(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,N(a.read())];case 3:return u=f.sent(),c=u.done,y=u.value,c?[4,N(void 0)]:[3,5];case 4:return[2,f.sent()];case 5:return B(y),[4,N(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 re=function(p,i,a,u){return new(a||(a=Promise))(function(c,y){function f(W){try{$(u.next(W))}catch(b){y(b)}}function D(W){try{$(u.throw(W))}catch(b){y(b)}}function $(W){var b;W.done?c(W.value):(b=W.value,b instanceof a?b:new a(function(V){V(b)})).then(f,D)}$((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:D(0),throw:D(1),return:D(2)},typeof Symbol=="function"&&(y[Symbol.iterator]=function(){return this}),y;function D($){return function(W){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(V){b=[6,V],u=0}finally{a=c=0}if(5&b[0])throw b[1];return{value:b[0]?b[1]:void 0,done:!0}}([$,W])}}};function lt(p,i){return i===void 0&&(i=Ue),re(this,void 0,void 0,function(){var a;return et(this,function(u){return a=te(p),[2,new Be(i.extensionCodec,i.context,i.maxStrLength,i.maxBinLength,i.maxArrayLength,i.maxMapLength,i.maxExtLength).decodeAsync(a)]})})}function it(p,i){i===void 0&&(i=Ue);var a=te(p);return new Be(i.extensionCodec,i.context,i.maxStrLength,i.maxBinLength,i.maxArrayLength,i.maxMapLength,i.maxExtLength).decodeArrayStream(a)}function ht(p,i){i===void 0&&(i=Ue);var a=te(p);return new Be(i.extensionCodec,i.context,i.maxStrLength,i.maxBinLength,i.maxArrayLength,i.maxMapLength,i.maxExtLength).decodeStream(a)}}])})},88814:function(Te,de,ne){"use strict";ne.d(de,{wj:function(){return Ne},ZP:function(){return ga},nJ:function(){return Me}});var ce={};ne.r(ce),ne.d(ce,{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 ge={};ne.r(ge),ne.d(ge,{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 Y={};ne.r(Y),ne.d(Y,{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 $},SINGLE_BOOL_SIZE:function(){return Ws},SINGLE_BYTE_SIZE:function(){return Vs},SourceMap:function(){return So},Transaction:function(){return pe},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 Ke},decodeUint64:function(){return ye},decodeUnsignedTransaction:function(){return Ne},encodeAddress:function(){return re},encodeObj:function(){return la},encodeUint64:function(){return Fe},encodeUnsignedTransaction:function(){return Me},generateAccount:function(){return so},getApplicationAddress:function(){return it},getMethodByName:function(){return rs},indexerModels:function(){return ge},instantiateTxnIfNeeded:function(){return Se},isTransactionWithSigner:function(){return es},isValidAddress:function(){return te},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 ce},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=ne(48764),O=ne(50780),j=ne.n(O),k=ne(93434),I=ne.n(k);function J(n){return I().sha512_256.array(n)}function _e(n){return j().randomBytes(n)}function be(n){return j().sign.keyPair.fromSeed(n)}function m(){const n=_e(j().box.secretKeyLength);return be(n)}function oe(n){return n===j().sign.signatureLength}function H(n){return j().sign.keyPair.fromSecretKey(n)}function se(n,e){return j().sign.detached(n,e)}function Ae(n,e){return j().verify(n,e)}function Q(n,e,t){return j().sign.detached.verify(n,e,t)}const Re=j().sign.publicKeyLength,A=j().sign.secretKeyLength,F=32,T=32;var P=ne(89090),M=ne.n(P),z=ne(4400),g=ne.n(z),U;(function(n){n.DEFAULT="default",n.SAFE="safe",n.MIXED="mixed",n.BIGINT="bigint"})(U||(U={}));var S=U,L=ne(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 X(n){const e={...n};return Object.keys(e).forEach(t=>{typeof e[t]>"u"&&delete e[t]}),e}function ee(){return typeof L=="object"&&typeof L.versions=="object"&&typeof L.versions.node<"u"}function Fe(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 ye(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 ve=36,Ee=4,De=58,ke="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ",we=new Uint8Array([77,117,108,116,105,115,105,103,65,100,100,114]),le=l.Buffer.from("appID"),Be="address seems to be malformed",Ue="wrong checksum for address",je="invalid multisig version",Pe="bad multisig threshold",N="bad multisig public key - wrong length",G="nacl public key length is not 32 bytes";function B(n){if(typeof n!="string"||n.length!==De)throw new Error(Be);const e=M().decode.asBytes(n.toString());if(e.length!==ve)throw new Error(Be);const t=new Uint8Array(e.slice(0,ve-Ee)),r=new Uint8Array(e.slice(Re,ve)),s=J(t).slice(F-Ee,F);if(!v(s,r))throw new Error(Ue);return{publicKey:t,checksum:r}}function te(n){try{B(n)}catch{return!1}return!0}function re(n){const e=J(n).slice(Re-Ee,Re);return M().encode(R(n,e)).toString().slice(0,De)}function et({version:n,threshold:e,pks:t}){if(n!==1||n>255||n<0)throw new Error(je);if(e===0||t.length===0||e>t.length||e>255)throw new Error(Pe);const r=ve-Ee;if(r!==Re)throw new Error(G);const s=new Uint8Array(we.length+2+r*t.length);s.set(we,0),s.set([n],we.length),s.set([e],we.length+1);for(let o=0;o<t.length;o++){if(t[o].length!==r)throw new Error(N);s.set(t[o],we.length+2+o*r)}return new Uint8Array(J(s))}function lt({version:n,threshold:e,addrs:t}){const r=t.map(s=>B(s).publicKey);return re(et({version:n,threshold:e,pks:r}))}function it(n){const e=R(le,Fe(n)),t=J(e);return re(new Uint8Array(t))}var ht=ne(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 D(n){return n===f.pay||n===f.keyreg||n===f.acfg||n===f.axfer||n===f.afrz||n===f.appl||n===f.stpf}var $;(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"})($||($={}));const W=52,b=1e3,V=32,ie=19,xe=75,me=5,Ce=32,Le=5,Oe=32,ze=32,Ge=32,He=64;function qe(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 pe{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>ie))throw Error(`assetDecimals must be a positive number and smaller than ${ie.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!==Oe)throw Error(`assetMetadataHash must be a ${Oe} 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!==V)throw Error(`lease must be of length ${V.toString()}.`);r.lease.every(s=>s===0)&&(r.lease=new Uint8Array(0))}else r.lease=new Uint8Array(0);if(r.voteKey=qe(r.voteKey,"voteKey",ze),r.selectionKey=qe(r.selectionKey,"selectionKey",Ge),r.stateProofKey=qe(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,X(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&&re(this.closeRemainderTo.publicKey)!==ke&&(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),!D(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(re(new Uint8Array(e.snd))),e.grp!==void 0&&(t.group=l.Buffer.from(e.grp)),e.rekey!==void 0&&(t.reKeyTo=B(re(new Uint8Array(e.rekey)))),e.type==="pay"?(t.amount=e.amt,t.to=B(re(new Uint8Array(e.rcv))),e.close!==void 0&&(t.closeRemainderTo=B(re(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(re(new Uint8Array(e.apar.m)))),e.apar.r!==void 0&&(t.assetReserve=B(re(new Uint8Array(e.apar.r)))),e.apar.f!==void 0&&(t.assetFreeze=B(re(new Uint8Array(e.apar.f)))),e.apar.c!==void 0&&(t.assetClawback=B(re(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(re(new Uint8Array(e.aclose)))),e.asnd!==void 0&&(t.assetRevocationTarget=B(re(new Uint8Array(e.asnd)))),t.to=B(re(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(re(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(re(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+xe}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=se(t,e);return l.Buffer.from(r)}signTxn(e){const t={sig:this.rawSignTxn(e),txn:this.get_obj_for_encoding()},s=H(e).publicKey;return re(s)!==re(this.from.publicKey)&&(t.sgnr=l.Buffer.from(s)),new Uint8Array(a(t))}attachSignature(e,t){if(!oe(t.length))throw new Error("Invalid signature length");const r={sig:l.Buffer.from(t),txn:this.get_obj_for_encoding()};if(e!==re(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(J(t))}txID(){const e=this.rawTxID();return M().encode(e).slice(0,W)}addLease(e,t=0){let r;if(e!==void 0){if(e.constructor!==Uint8Array)throw Error("lease must be a Uint8Array.");if(e.length!==V)throw Error(`lease must be of length ${V.toString()}.`);r=new Uint8Array(e)}else r=new Uint8Array(0);this.lease=r,t!==0&&(this.fee+=(me+V)*t)}addRekey(e,t=0){e!==void 0&&(this.reKeyTo=B(e)),t!==0&&(this.fee+=(Le+Ce)*t)}_getDictForDisplay(){const e={...this};return e.tag=e.tag.toString(),e.from=re(e.from.publicKey),e.to!==void 0&&(e.to=re(e.to.publicKey)),e.freezeAccount!==void 0&&(e.freezeAccount=re(e.freezeAccount.publicKey)),e.closeRemainderTo!==void 0&&(e.closeRemainderTo=re(e.closeRemainderTo.publicKey)),e.assetManager!==void 0&&(e.assetManager=re(e.assetManager.publicKey)),e.assetReserve!==void 0&&(e.assetReserve=re(e.assetReserve.publicKey)),e.assetFreeze!==void 0&&(e.assetFreeze=re(e.assetFreeze.publicKey)),e.assetClawback!==void 0&&(e.assetClawback=re(e.assetClawback.publicKey)),e.assetRevocationTarget!==void 0&&(e.assetRevocationTarget=re(e.assetRevocationTarget.publicKey)),e.reKeyTo!==void 0&&(e.reKeyTo=re(e.reKeyTo.publicKey)),e.genesisHash=e.genesisHash.toString("base64"),e}prettyPrint(){console.log(this._getDictForDisplay())}toString(){return JSON.stringify(this._getDictForDisplay())}}function Me(n){const e=n.get_obj_for_encoding();return a(e)}function Ne(n){const e=u(n);return pe.from_obj_for_encoding(e)}function Ke(n){const e=u(n);return{...e,txn:pe.from_obj_for_encoding(e.txn)}}function Se(n){return n instanceof pe?n:new pe(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=se(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=ne(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 he{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 he{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 he{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 he{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 he{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 he{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 he{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 he{path(){return"/genesis"}}class di extends he{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/assets/${this.index}`}}class pi extends he{constructor(e,t,r){super(e,t),this.index=r,this.index=r}path(){return`/v2/applications/${this.index}`}}class gi extends he{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 q{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 q{constructor({address:e,amount:t,amountWithoutPendingRewards:r,minBalance:s,pendingRewards:o,rewards:d,round:w,status:E,totalAppsOptedIn:C,totalAssetsOptedIn:_,totalCreatedApps:K,totalCreatedAssets:ae,appsLocalState:fe,appsTotalExtraPages:Z,appsTotalSchema:ue,assets:$e,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=ae,this.appsLocalState=fe,this.appsTotalExtraPages=Z,this.appsTotalSchema=ue,this.assets=$e,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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{constructor({creator:e,decimals:t,total:r,clawback:s,defaultFrozen:o,freeze:d,manager:w,metadataHash:E,name:C,nameB64:_,reserve:K,unitName:ae,unitNameB64:fe,url:Z,urlB64:ue}){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=ae,this.unitNameB64=typeof fe=="string"?new Uint8Array(l.Buffer.from(fe,"base64")):fe,this.url=Z,this.urlB64=typeof ue=="string"?new Uint8Array(l.Buffer.from(ue,"base64")):ue,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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{constructor({catchupTime:e,lastRound:t,lastVersion:r,nextVersion:s,nextVersionRound:o,nextVersionSupported:d,stoppedAtUnsupportedRound:w,timeSinceLastRound:E,catchpoint:C,catchpointAcquiredBlocks:_,catchpointProcessedAccounts:K,catchpointProcessedKvs:ae,catchpointTotalAccounts:fe,catchpointTotalBlocks:Z,catchpointTotalKvs:ue,catchpointVerifiedAccounts:$e,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=ae,this.catchpointTotalAccounts=fe,this.catchpointTotalBlocks=Z,this.catchpointTotalKvs=ue,this.catchpointVerifiedAccounts=$e,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 q{constructor({poolError:e,txn:t,applicationIndex:r,assetClosingAmount:s,assetIndex:o,closeRewards:d,closingAmount:w,confirmedRound:E,globalStateDelta:C,innerTxns:_,localStateDelta:K,logs:ae,receiverRewards:fe,senderRewards:Z}){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=ae,this.receiverRewards=fe,this.senderRewards=Z,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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 he{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 he{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 he{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 he{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 he{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 he{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 he{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 he{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 he{path(){return"/v2/status"}}class Ri extends he{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 he{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 he{path(){return"/v2/ledger/supply"}}class ki extends he{path(){return"/versions"}}class Ii extends he{constructor(e,t,r){super(e,t),this.round=r,this.round=r}path(){return`/v2/blocks/${this.round}/lightheader/proof`}}class Di extends he{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 he{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=Se(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=Se(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=Se(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 he{path(){return"/health"}}class $i extends he{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 he{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 he{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 he{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 he{constructor(e,t,r){super(e,t),this.txID=r,this.txID=r}path(){return`/v2/transactions/${this.txID}`}}class Ki extends he{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 he{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 he{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 he{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 he{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 he{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 he{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 he{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 q{constructor({address:e,amount:t,amountWithoutPendingRewards:r,pendingRewards:s,rewards:o,round:d,status:w,totalAppsOptedIn:E,totalAssetsOptedIn:C,totalBoxBytes:_,totalBoxes:K,totalCreatedApps:ae,totalCreatedAssets:fe,appsLocalState:Z,appsTotalExtraPages:ue,appsTotalSchema:$e,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=ae,this.totalCreatedAssets=fe,this.appsLocalState=Z,this.appsTotalExtraPages=ue,this.appsTotalSchema=$e,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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{constructor({creator:e,decimals:t,total:r,clawback:s,defaultFrozen:o,freeze:d,manager:w,metadataHash:E,name:C,nameB64:_,reserve:K,unitName:ae,unitNameB64:fe,url:Z,urlB64:ue}){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=ae,this.unitNameB64=typeof fe=="string"?new Uint8Array(l.Buffer.from(fe,"base64")):fe,this.url=Z,this.urlB64=typeof ue=="string"?new Uint8Array(l.Buffer.from(ue,"base64")):ue,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 q{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 q{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 q{constructor({genesisHash:e,genesisId:t,previousBlockHash:r,round:s,seed:o,timestamp:d,transactionsRoot:w,transactionsRootSha256:E,participationUpdates:C,rewards:_,stateProofTracking:K,transactions:ae,txnCounter:fe,upgradeState:Z,upgradeVote:ue}){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=ae,this.txnCounter=fe,this.upgradeState=Z,this.upgradeVote=ue,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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{constructor({fee:e,firstValid:t,lastValid:r,sender:s,applicationTransaction:o,assetConfigTransaction:d,assetFreezeTransaction:w,assetTransferTransaction:E,authAddr:C,closeRewards:_,closingAmount:K,confirmedRound:ae,createdApplicationIndex:fe,createdAssetIndex:Z,genesisHash:ue,genesisId:$e,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=ae,this.createdApplicationIndex=fe,this.createdAssetIndex=Z,this.genesisHash=typeof ue=="string"?new Uint8Array(l.Buffer.from(ue,"base64")):ue,this.genesisId=$e,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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 q{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 he{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 he{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 he{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 he{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 he{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 he{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:re(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=J(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:re(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=Se(d);e.push(w.rawTxID())}const t=new lo(e),r=t.toByte(),s=l.Buffer.from(R(t.tag,r)),o=J(s);return l.Buffer.from(o)}function ms(n,e){const t=gs(n),r=[];for(const s of n){const o=Se(s);(!e||re(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 re(w.snd)!==re(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(_=>re(_))}),w=u(d);let E=!1;if(w.msig.subsig.forEach((_,K)=>{Ae(_.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 re(w.txn.snd)!==re(C)&&(w.sgnr=l.Buffer.from(C)),new Uint8Array(a(w))}class jt extends pe{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=H(s).publicKey;return xs(this,{rawSig:this.rawSignTxn(s),myPk:o},{version:e,threshold:t,pks:r})}partialSignWithMultisigSignature(e,t,r){if(!oe(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?re(e.sgnr):void 0,s={version:e.msig.v,threshold:e.msig.thr,pks:e.msig.subsig.map(C=>C.pk)},o=re(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 ae=_.sgnr?re(_.sgnr):void 0;if(r!==ae)throw new Error(go);if(_.msig.subsig.length!==e.msig.subsig.length)throw new Error(ys);const fe={version:_.msig.v,threshold:_.msig.thr,pks:_.msig.subsig.map(ue=>ue.pk)},Z=re(et(fe));if(o!==Z)throw new Error(ys);_.msig.subsig.forEach((ue,$e)=>{if(!ue.s)return;const We=d[$e];if(We.s&&l.Buffer.compare(l.Buffer.from(ue.s),l.Buffer.from(We.s))!==0)throw new Error(mo);We.s=ue.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&&Q(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 pe;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 te(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=J(t);return v(r,e)}return this.sig?Q(t,this.sig,e):As(t,this.msig,e)}address(){const e=R(this.tag,this.logic),t=J(e);return re(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 se(t,e)}singleSignMultisig(e,t){let r=-1;const s=H(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 re(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 re(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=H(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 Ae(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=Se(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 se(s,n)}function To(n,e,t,r){const s=R(B(e).publicKey,n),o=l.Buffer.from(R(_s,s));return Q(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 Z of e)Z.txn.type===f.appl&&(_.push(re(Z.txn.from.publicKey)),Z.txn.appAccounts&&_.push(...Z.txn.appAccounts.map(ue=>re(ue.publicKey))),Z.txn.appForeignApps&&(E.push(...Z.txn.appForeignApps),_.push(...Z.txn.appForeignApps.map(ue=>it(ue)))),Z.txn.appForeignAssets&&C.push(...Z.txn.appForeignAssets),Z.txn.appIndex===void 0||Z.txn.appIndex===0?d.push(new Bt({id:ko,params:new St({creator:re(Z.txn.from.publicKey),approvalProgram:Z.txn.appApprovalProgram,clearStateProgram:Z.txn.appClearProgram,localStateSchema:new ot({numUint:Z.txn.appLocalInts,numByteSlice:Z.txn.appLocalByteSlices}),globalStateSchema:new ot({numUint:Z.txn.appGlobalInts,numByteSlice:Z.txn.appGlobalByteSlices})})})):(E.push(Z.txn.appIndex),_.push(it(Z.txn.appIndex))));const K=[];for(const Z of[...new Set(C)])K.push(n.getAssetByID(Z).do().then(ue=>{_.push(ue.params.creator)}));await Promise.all(K);const ae=[];for(const Z of[...new Set(E)])ae.push(n.getApplicationByID(Z).do().then(ue=>{const $e=Ss(ue);d.push($e),_.push($e.params.creator)}));await Promise.all(ae);const fe=[];for(const Z of[...new Set(_)])fe.push(n.accountInformation(Z).do().then(ue=>{"created-apps"in ue&&(ue["created-apps"]=ue["created-apps"].map($e=>Ss($e))),w.push(ue)}));return await Promise.all(fe),new fr({txns:e.map(Z=>({...Z,txn:Z.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:ae}=e.trace[w],fe=K!==void 0?K:[],Z=w>0&&e.trace[w-1].scratch!==void 0?e.trace[w-1].scratch:[],ue=C===""?t[E]:`!! ${C} !!`;o.push([_.toString().padEnd(3," "),E.toString().padEnd(3," "),Qn(ue,s),Qn(Co(Z,fe),s),Qn(jo(ae,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
+ `)}
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 pe(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 pe(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,ae,fe,Z){const ue={from:n,note:e,suggestedParams:fe,assetTotal:t,assetDecimals:r,assetDefaultFrozen:s,assetUnitName:C,assetName:_,assetURL:K,assetMetadataHash:ae,assetManager:o,assetReserve:d,assetFreeze:w,assetClawback:E,type:f.acfg,reKeyTo:Z};return new pe(ue)}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 pe(_)}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 pe(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 pe(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 pe(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,ae,fe,Z,ue,$e,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:ae,boxes:We,note:fe,lease:Z,reKeyTo:ue,extraPages:$e};return new pe(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,ae){const fe={type:f.appl,from:n,suggestedParams:e,appIndex:t,appApprovalProgram:r,appOnComplete:$.UpdateApplicationOC,appClearProgram:s,appArgs:o,appAccounts:d,appForeignApps:w,appForeignAssets:E,boxes:ae,note:C,lease:_,reKeyTo:K};return new pe(fe)}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:$.DeleteApplicationOC,appArgs:r,appAccounts:s,appForeignApps:o,appForeignAssets:d,boxes:_,note:w,lease:E,reKeyTo:C};return new pe(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:$.OptInOC,appArgs:r,appAccounts:s,appForeignApps:o,appForeignAssets:d,boxes:_,note:w,lease:E,reKeyTo:C};return new pe(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:$.CloseOutOC,appArgs:r,appAccounts:s,appForeignApps:o,appForeignAssets:d,boxes:_,note:w,lease:E,reKeyTo:C};return new pe(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:$.ClearStateOC,appArgs:r,appAccounts:s,appForeignApps:o,appForeignAssets:d,boxes:_,note:w,lease:E,reKeyTo:C};return new pe(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:$.NoOpOC,appArgs:r,appAccounts:s,appForeignApps:o,appForeignAssets:d,boxes:_,note:w,lease:E,reKeyTo:C};return new pe(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 pe(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 re(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 ae=er(r,w,1);if(K%8!==0)throw new Error("expected before index should have number of bool mod 8 equal 0");ae=Math.min(7,ae);const fe=ra(t.slice(w,w+ae+1));s.push(Ft(fe,1)),w+=ae}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 ae={left:K,right:-1};r.push(ae),s.push(null),d+=Je}else if(_.constructor===at){const K=er(this.childTypes,o,-1);let ae=er(this.childTypes,o,1);if(K%8!==0)throw new Error("expected before bool number mod 8 === 0");ae=Math.min(7,ae);for(let fe=0;fe<=ae;fe++){const Z=128>>fe;(e[d]&Z)>0?s.push(new Uint8Array([128])):s.push(new Uint8Array([0]))}o+=ae,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=J(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:pe.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:ae,extraPages:fe,appAccounts:Z,appForeignApps:ue,appForeignAssets:$e,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||ae==null)throw new Error("One of the following required parameters for application creation is missing: approvalProgram, clearProgram, numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices")}else if(d===$.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||ae!=null||fe!=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||ae!=null||fe!=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 Ie=0;Ie<r.length;Ie++){let Xe=t.args[Ie].type;const nt=r[Ie];if(rn(Xe)){if(!es(nt)||!Xs(Xe,nt.txn))throw new Error(`Expected ${Xe} transaction for argument at index ${Ie}`);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 ${Ie}`);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=Z==null?[]:Z.slice(),on=ue==null?[]:ue.slice(),an=$e==null?[]:$e.slice();for(let Ie=0;Ie<mt.length;Ie++){const Xe=mt[Ie],nt=yt[Ie];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 Ie=0;Ie<rr.length;Ie++){const Xe=nn.get(Ie);Qe[Xe]=rr[Ie]}if(Ze.length>tr-1){const Ie=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(Ie)),Qe.push(Xe)}const un=[t.getSelector()];for(let Ie=0;Ie<Ze.length;Ie++)un.push(Ze[Ie].encode(Qe[Ie]));const is={txn:Gs({from:s,appIndex:e,appArgs:un,accounts:sn,foreignApps:on,foreignAssets:an,boxes:ss,onComplete:d==null?$.NoOpOC:d,approvalProgram:w,clearProgram:E,numGlobalInts:C,numGlobalByteSlices:_,numLocalInts:K,numLocalByteSlices:ae,extraPages:fe,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 Ke(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],ae={txID:K,rawReturnValue:new Uint8Array,method:_};try{const fe=C===s?d:await e.pendingTransactionInformation(K).do();if(ae.txInfo=fe,_.returns.type!=="void"){const Z=fe.logs||[];if(Z.length===0)throw new Error("App call transaction did not log a return value");const ue=l.Buffer.from(Z[Z.length-1],"base64");if(ue.byteLength<4||!ue.slice(0,4).equals(oa))throw new Error("App call transaction did not log a return value");ae.rawReturnValue=new Uint8Array(ue.slice(4)),ae.returnValue=_.returns.type.decode(ae.rawReturnValue)}}catch(fe){ae.decodeError=fe}E.push(ae)}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=H(e);n.from=re(r.publicKey)}const t=Se(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 se(t,e)}function fa(n,e,t){const r=l.Buffer.from(R(Js,n)),s=B(t).publicKey;return Q(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=Y},54098:function(Te,de){var ne=typeof self<"u"?self:this,ce=function(){function Y(){this.fetch=!1,this.DOMException=ne.DOMException}return Y.prototype=ne,new Y}();(function(Y){var l=function(O){var j={searchParams:"URLSearchParams"in Y,iterable:"Symbol"in Y&&"iterator"in Symbol,blob:"FileReader"in Y&&"Blob"in Y&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in Y,arrayBuffer:"ArrayBuffer"in Y};function k(h){return h&&DataView.prototype.isPrototypeOf(h)}if(j.arrayBuffer)var I=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],J=ArrayBuffer.isView||function(h){return h&&I.indexOf(Object.prototype.toString.call(h))>-1};function _e(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 j.iterable&&(x[Symbol.iterator]=function(){return x}),x}function oe(h){this.map={},h instanceof oe?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)}oe.prototype.append=function(h,x){h=_e(h),x=be(x);var v=this.map[h];this.map[h]=v?v+", "+x:x},oe.prototype.delete=function(h){delete this.map[_e(h)]},oe.prototype.get=function(h){return h=_e(h),this.has(h)?this.map[h]:null},oe.prototype.has=function(h){return this.map.hasOwnProperty(_e(h))},oe.prototype.set=function(h,x){this.map[_e(h)]=be(x)},oe.prototype.forEach=function(h,x){for(var v in this.map)this.map.hasOwnProperty(v)&&h.call(x,this.map[v],v,this)},oe.prototype.keys=function(){var h=[];return this.forEach(function(x,v){h.push(v)}),m(h)},oe.prototype.values=function(){var h=[];return this.forEach(function(x){h.push(x)}),m(h)},oe.prototype.entries=function(){var h=[];return this.forEach(function(x,v){h.push([v,x])}),m(h)},j.iterable&&(oe.prototype[Symbol.iterator]=oe.prototype.entries);function H(h){if(h.bodyUsed)return Promise.reject(new TypeError("Already read"));h.bodyUsed=!0}function se(h){return new Promise(function(x,v){h.onload=function(){x(h.result)},h.onerror=function(){v(h.error)}})}function Ae(h){var x=new FileReader,v=se(x);return x.readAsArrayBuffer(h),v}function Q(h){var x=new FileReader,v=se(x);return x.readAsText(h),v}function Re(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:j.blob&&Blob.prototype.isPrototypeOf(h)?this._bodyBlob=h:j.formData&&FormData.prototype.isPrototypeOf(h)?this._bodyFormData=h:j.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)?this._bodyText=h.toString():j.arrayBuffer&&j.blob&&k(h)?(this._bodyArrayBuffer=A(h.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):j.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(h)||J(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):j.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},j.blob&&(this.blob=function(){var h=H(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?H(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(Ae)}),this.text=function(){var h=H(this);if(h)return h;if(this._bodyBlob)return Q(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(Re(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},j.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 P(h){var x=h.toUpperCase();return T.indexOf(x)>-1?x:h}function M(h,x){x=x||{};var v=x.body;if(h instanceof M){if(h.bodyUsed)throw new TypeError("Already read");this.url=h.url,this.credentials=h.credentials,x.headers||(this.headers=new oe(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 oe(x.headers)),this.method=P(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)}M.prototype.clone=function(){return new M(this,{body:this._bodyInit})};function z(h){var x=new FormData;return h.trim().split("&").forEach(function(v){if(v){var R=v.split("="),X=R.shift().replace(/\+/g," "),ee=R.join("=").replace(/\+/g," ");x.append(decodeURIComponent(X),decodeURIComponent(ee))}}),x}function g(h){var x=new oe,v=h.replace(/\r?\n[\t ]+/g," ");return v.split(/\r?\n/).forEach(function(R){var X=R.split(":"),ee=X.shift().trim();if(ee){var Fe=X.join(":").trim();x.append(ee,Fe)}}),x}F.call(M.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 oe(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 oe(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}})},O.DOMException=Y.DOMException;try{new O.DOMException}catch{O.DOMException=function(x,v){this.message=x,this.name=v;var R=Error(x);this.stack=R.stack},O.DOMException.prototype=Object.create(Error.prototype),O.DOMException.prototype.constructor=O.DOMException}function L(h,x){return new Promise(function(v,R){var X=new M(h,x);if(X.signal&&X.signal.aborted)return R(new O.DOMException("Aborted","AbortError"));var ee=new XMLHttpRequest;function Fe(){ee.abort()}ee.onload=function(){var ye={status:ee.status,statusText:ee.statusText,headers:g(ee.getAllResponseHeaders()||"")};ye.url="responseURL"in ee?ee.responseURL:ye.headers.get("X-Request-URL");var ve="response"in ee?ee.response:ee.responseText;v(new U(ve,ye))},ee.onerror=function(){R(new TypeError("Network request failed"))},ee.ontimeout=function(){R(new TypeError("Network request failed"))},ee.onabort=function(){R(new O.DOMException("Aborted","AbortError"))},ee.open(X.method,X.url,!0),X.credentials==="include"?ee.withCredentials=!0:X.credentials==="omit"&&(ee.withCredentials=!1),"responseType"in ee&&j.blob&&(ee.responseType="blob"),X.headers.forEach(function(ye,ve){ee.setRequestHeader(ve,ye)}),X.signal&&(X.signal.addEventListener("abort",Fe),ee.onreadystatechange=function(){ee.readyState===4&&X.signal.removeEventListener("abort",Fe)}),ee.send(typeof X._bodyInit>"u"?null:X._bodyInit)})}return L.polyfill=!0,Y.fetch||(Y.fetch=L,Y.Headers=oe,Y.Request=M,Y.Response=U),O.Headers=oe,O.Request=M,O.Response=U,O.fetch=L,Object.defineProperty(O,"__esModule",{value:!0}),O}({})})(ce),ce.fetch.ponyfill=!0,delete ce.fetch.polyfill;var ge=ce;de=ge.fetch,de.default=ge.fetch,de.fetch=ge.fetch,de.Headers=ge.Headers,de.Request=ge.Request,de.Response=ge.Response,Te.exports=de},89090:function(Te,de,ne){var ce=ne(34155),ge;/*
5
+ * [hi-base32]{@link https://github.com/emn178/hi-base32}
6
+ *
7
+ * @version 0.5.0
8
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
9
+ * @copyright Chen, Yi-Cyuan 2015-2018
10
+ * @license MIT
11
+ */(function(){"use strict";var Y=typeof window=="object"?window:{},l=!Y.HI_BASE32_NO_NODE_JS&&typeof ce=="object"&&ce.versions&&ce.versions.node;l&&(Y=ne.g);var O=!Y.HI_BASE32_NO_COMMON_JS&&!0&&Te.exports,j=ne.amdO,k="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".split(""),I={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},J=[0,0,0,0,0,0,0,0],_e=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,P=0,M=0,z,g;P<T;){if(z=A[P++],z<=127){F+=String.fromCharCode(z);continue}else z>191&&z<=223?(g=z&31,M=1):z<=239?(g=z&15,M=2):z<=247?(g=z&7,M=3):_e(P,F);for(var U=0;U<M;++U)z=A[P++],(z<128||z>191)&&_e(P,F),g<<=6,g+=z&63;g>=55296&&g<=57343&&_e(P,F),g>1114111&&_e(P,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,P,M,z,g,U,S,L=[],h=0,x=A.length,v=0,R=x>>3<<3;v<R;)F=I[A.charAt(v++)],T=I[A.charAt(v++)],P=I[A.charAt(v++)],M=I[A.charAt(v++)],z=I[A.charAt(v++)],g=I[A.charAt(v++)],U=I[A.charAt(v++)],S=I[A.charAt(v++)],L[h++]=(F<<3|T>>>2)&255,L[h++]=(T<<6|P<<1|M>>>4)&255,L[h++]=(M<<4|z>>>1)&255,L[h++]=(z<<7|g<<2|U>>>3)&255,L[h++]=(U<<5|S)&255;var X=x-R;return X===2?(F=I[A.charAt(v++)],T=I[A.charAt(v++)],L[h++]=(F<<3|T>>>2)&255):X===4?(F=I[A.charAt(v++)],T=I[A.charAt(v++)],P=I[A.charAt(v++)],M=I[A.charAt(v++)],L[h++]=(F<<3|T>>>2)&255,L[h++]=(T<<6|P<<1|M>>>4)&255):X===5?(F=I[A.charAt(v++)],T=I[A.charAt(v++)],P=I[A.charAt(v++)],M=I[A.charAt(v++)],z=I[A.charAt(v++)],L[h++]=(F<<3|T>>>2)&255,L[h++]=(T<<6|P<<1|M>>>4)&255,L[h++]=(M<<4|z>>>1)&255):X===7&&(F=I[A.charAt(v++)],T=I[A.charAt(v++)],P=I[A.charAt(v++)],M=I[A.charAt(v++)],z=I[A.charAt(v++)],g=I[A.charAt(v++)],U=I[A.charAt(v++)],L[h++]=(F<<3|T>>>2)&255,L[h++]=(T<<6|P<<1|M>>>4)&255,L[h++]=(M<<4|z>>>1)&255,L[h++]=(z<<7|g<<2|U>>>3)&255),L},oe=function(A){for(var F,T,P,M,z,g="",U=A.length,S=0,L=parseInt(U/5)*5;S<L;)F=A.charCodeAt(S++),T=A.charCodeAt(S++),P=A.charCodeAt(S++),M=A.charCodeAt(S++),z=A.charCodeAt(S++),g+=k[F>>>3]+k[(F<<2|T>>>6)&31]+k[T>>>1&31]+k[(T<<4|P>>>4)&31]+k[(P<<1|M>>>7)&31]+k[M>>>2&31]+k[(M<<3|z>>>5)&31]+k[z&31];var h=U-L;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++),P=A.charCodeAt(S),g+=k[F>>>3]+k[(F<<2|T>>>6)&31]+k[T>>>1&31]+k[(T<<4|P>>>4)&31]+k[P<<1&31]+"==="):h===4&&(F=A.charCodeAt(S++),T=A.charCodeAt(S++),P=A.charCodeAt(S++),M=A.charCodeAt(S),g+=k[F>>>3]+k[(F<<2|T>>>6)&31]+k[T>>>1&31]+k[(T<<4|P>>>4)&31]+k[(P<<1|M>>>7)&31]+k[M>>>2&31]+k[M<<3&31]+"="),g},H=function(A){var F,T,P,M,z,g,U=!1,S="",L=0,h,x=0,v=0,R=A.length;if(A==="")return S;do{for(J[0]=J[5],J[1]=J[6],J[2]=J[7],h=x;L<R&&h<5;++L)g=A.charCodeAt(L),g<128?J[h++]=g:g<2048?(J[h++]=192|g>>6,J[h++]=128|g&63):g<55296||g>=57344?(J[h++]=224|g>>12,J[h++]=128|g>>6&63,J[h++]=128|g&63):(g=65536+((g&1023)<<10|A.charCodeAt(++L)&1023),J[h++]=240|g>>18,J[h++]=128|g>>12&63,J[h++]=128|g>>6&63,J[h++]=128|g&63);v+=h-x,x=h-5,L===R&&++L,L>R&&h<6&&(U=!0),F=J[0],h>4?(T=J[1],P=J[2],M=J[3],z=J[4],S+=k[F>>>3]+k[(F<<2|T>>>6)&31]+k[T>>>1&31]+k[(T<<4|P>>>4)&31]+k[(P<<1|M>>>7)&31]+k[M>>>2&31]+k[(M<<3|z>>>5)&31]+k[z&31]):h===1?S+=k[F>>>3]+k[F<<2&31]+"======":h===2?(T=J[1],S+=k[F>>>3]+k[(F<<2|T>>>6)&31]+k[T>>>1&31]+k[T<<4&31]+"===="):h===3?(T=J[1],P=J[2],S+=k[F>>>3]+k[(F<<2|T>>>6)&31]+k[T>>>1&31]+k[(T<<4|P>>>4)&31]+k[P<<1&31]+"==="):(T=J[1],P=J[2],M=J[3],S+=k[F>>>3]+k[(F<<2|T>>>6)&31]+k[T>>>1&31]+k[(T<<4|P>>>4)&31]+k[(P<<1|M>>>7)&31]+k[M>>>2&31]+k[M<<3&31]+"=")}while(!U);return S},se=function(A){for(var F,T,P,M,z,g="",U=A.length,S=0,L=parseInt(U/5)*5;S<L;)F=A[S++],T=A[S++],P=A[S++],M=A[S++],z=A[S++],g+=k[F>>>3]+k[(F<<2|T>>>6)&31]+k[T>>>1&31]+k[(T<<4|P>>>4)&31]+k[(P<<1|M>>>7)&31]+k[M>>>2&31]+k[(M<<3|z>>>5)&31]+k[z&31];var h=U-L;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++],P=A[S],g+=k[F>>>3]+k[(F<<2|T>>>6)&31]+k[T>>>1&31]+k[(T<<4|P>>>4)&31]+k[P<<1&31]+"==="):h===4&&(F=A[S++],T=A[S++],P=A[S++],M=A[S],g+=k[F>>>3]+k[(F<<2|T>>>6)&31]+k[T>>>1&31]+k[(T<<4|P>>>4)&31]+k[(P<<1|M>>>7)&31]+k[M>>>2&31]+k[M<<3&31]+"="),g},Ae=function(A,F){var T=typeof A!="string";return T&&A.constructor===ArrayBuffer&&(A=new Uint8Array(A)),T?se(A):F?oe(A):H(A)},Q=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,P,M,z,g,U,S,L,h="",x=A.indexOf("=");x===-1&&(x=A.length);for(var v=0,R=x>>3<<3;v<R;)T=I[A.charAt(v++)],P=I[A.charAt(v++)],M=I[A.charAt(v++)],z=I[A.charAt(v++)],g=I[A.charAt(v++)],U=I[A.charAt(v++)],S=I[A.charAt(v++)],L=I[A.charAt(v++)],h+=String.fromCharCode((T<<3|P>>>2)&255)+String.fromCharCode((P<<6|M<<1|z>>>4)&255)+String.fromCharCode((z<<4|g>>>1)&255)+String.fromCharCode((g<<7|U<<2|S>>>3)&255)+String.fromCharCode((S<<5|L)&255);var X=x-R;return X===2?(T=I[A.charAt(v++)],P=I[A.charAt(v++)],h+=String.fromCharCode((T<<3|P>>>2)&255)):X===4?(T=I[A.charAt(v++)],P=I[A.charAt(v++)],M=I[A.charAt(v++)],z=I[A.charAt(v++)],h+=String.fromCharCode((T<<3|P>>>2)&255)+String.fromCharCode((P<<6|M<<1|z>>>4)&255)):X===5?(T=I[A.charAt(v++)],P=I[A.charAt(v++)],M=I[A.charAt(v++)],z=I[A.charAt(v++)],g=I[A.charAt(v++)],h+=String.fromCharCode((T<<3|P>>>2)&255)+String.fromCharCode((P<<6|M<<1|z>>>4)&255)+String.fromCharCode((z<<4|g>>>1)&255)):X===7&&(T=I[A.charAt(v++)],P=I[A.charAt(v++)],M=I[A.charAt(v++)],z=I[A.charAt(v++)],g=I[A.charAt(v++)],U=I[A.charAt(v++)],S=I[A.charAt(v++)],h+=String.fromCharCode((T<<3|P>>>2)&255)+String.fromCharCode((P<<6|M<<1|z>>>4)&255)+String.fromCharCode((z<<4|g>>>1)&255)+String.fromCharCode((g<<7|U<<2|S>>>3)&255)),h},Re={encode:Ae,decode:Q};Q.asBytes=m,O?Te.exports=Re:(Y.base32=Re,j&&(ge=function(){return Re}.call(Re,ne,Re,Te),ge!==void 0&&(Te.exports=ge)))})()},93434:function(Te,de,ne){var ce=ne(34155),ge;/*
12
+ * [js-sha512]{@link https://github.com/emn178/js-sha512}
13
+ *
14
+ * @version 0.8.0
15
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
16
+ * @copyright Chen, Yi-Cyuan 2014-2018
17
+ * @license MIT
18
+ */(function(){"use strict";var Y="input is invalid type",l="finalize already called",O=typeof window=="object",j=O?window:{};j.JS_SHA512_NO_WINDOW&&(O=!1);var k=!O&&typeof self=="object",I=!j.JS_SHA512_NO_NODE_JS&&typeof ce=="object"&&ce.versions&&ce.versions.node;I?j=ne.g:k&&(j=self);var J=!j.JS_SHA512_NO_COMMON_JS&&!0&&Te.exports,_e=ne.amdO,be=!j.JS_SHA512_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",m="0123456789abcdef".split(""),oe=[-2147483648,8388608,32768,128],H=[24,16,8,0],se=[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],Ae=["hex","array","digest","arrayBuffer"],Q=[];(j.JS_SHA512_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(g){return Object.prototype.toString.call(g)==="[object Array]"}),be&&(j.JS_SHA512_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(g){return typeof g=="object"&&g.buffer&&g.buffer.constructor===ArrayBuffer});var Re=function(g,U){return function(S){return new P(U,!0).update(S)[g]()}},A=function(g){var U=Re("hex",g);U.create=function(){return new P(g)},U.update=function(h){return U.create().update(h)};for(var S=0;S<Ae.length;++S){var L=Ae[S];U[L]=Re(L,g)}return U},F=function(g,U){return function(S,L){return new M(S,U,!0).update(L)[g]()}},T=function(g){var U=F("hex",g);U.create=function(h){return new M(h,g)},U.update=function(h,x){return U.create(h).update(x)};for(var S=0;S<Ae.length;++S){var L=Ae[S];U[L]=F(L,g)}return U};function P(g,U){U?(Q[0]=Q[1]=Q[2]=Q[3]=Q[4]=Q[5]=Q[6]=Q[7]=Q[8]=Q[9]=Q[10]=Q[11]=Q[12]=Q[13]=Q[14]=Q[15]=Q[16]=Q[17]=Q[18]=Q[19]=Q[20]=Q[21]=Q[22]=Q[23]=Q[24]=Q[25]=Q[26]=Q[27]=Q[28]=Q[29]=Q[30]=Q[31]=Q[32]=0,this.blocks=Q):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}P.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(Y);if(be&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!Array.isArray(g)&&(!be||!ArrayBuffer.isView(g)))throw new Error(Y)}else throw new Error(Y);U=!0}for(var L,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]<<H[x++&3];else for(x=this.start;h<v&&x<128;++h)L=g.charCodeAt(h),L<128?R[x>>2]|=L<<H[x++&3]:L<2048?(R[x>>2]|=(192|L>>6)<<H[x++&3],R[x>>2]|=(128|L&63)<<H[x++&3]):L<55296||L>=57344?(R[x>>2]|=(224|L>>12)<<H[x++&3],R[x>>2]|=(128|L>>6&63)<<H[x++&3],R[x>>2]|=(128|L&63)<<H[x++&3]):(L=65536+((L&1023)<<10|g.charCodeAt(++h)&1023),R[x>>2]|=(240|L>>18)<<H[x++&3],R[x>>2]|=(128|L>>12&63)<<H[x++&3],R[x>>2]|=(128|L>>6&63)<<H[x++&3],R[x>>2]|=(128|L&63)<<H[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},P.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var g=this.blocks,U=this.lastByteIndex;g[32]=this.block,g[U>>2]|=oe[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()}},P.prototype.hash=function(){var g=this.h0h,U=this.h0l,S=this.h1h,L=this.h1l,h=this.h2h,x=this.h2l,v=this.h3h,R=this.h3l,X=this.h4h,ee=this.h4l,Fe=this.h5h,ye=this.h5l,ve=this.h6h,Ee=this.h6l,De=this.h7h,ke=this.h7l,we=this.blocks,le,Be,Ue,je,Pe,N,G,B,te,re,et,lt,it,ht,p,i,a,u,c,y,f,D,$,W,b;for(le=32;le<160;le+=2)y=we[le-30],f=we[le-29],Be=(y>>>1|f<<31)^(y>>>8|f<<24)^y>>>7,Ue=(f>>>1|y<<31)^(f>>>8|y<<24)^(f>>>7|y<<25),y=we[le-4],f=we[le-3],je=(y>>>19|f<<13)^(f>>>29|y<<3)^y>>>6,Pe=(f>>>19|y<<13)^(y>>>29|f<<3)^(f>>>6|y<<26),y=we[le-32],f=we[le-31],D=we[le-14],$=we[le-13],N=($&65535)+(f&65535)+(Ue&65535)+(Pe&65535),G=($>>>16)+(f>>>16)+(Ue>>>16)+(Pe>>>16)+(N>>>16),B=(D&65535)+(y&65535)+(Be&65535)+(je&65535)+(G>>>16),te=(D>>>16)+(y>>>16)+(Be>>>16)+(je>>>16)+(B>>>16),we[le]=te<<16|B&65535,we[le+1]=G<<16|N&65535;var V=g,ie=U,xe=S,me=L,Ce=h,Le=x,Oe=v,ze=R,Ge=X,He=ee,qe=Fe,pe=ye,Me=ve,Ne=Ee,Ke=De,Se=ke;for(i=xe&Ce,a=me&Le,le=0;le<160;le+=8)Be=(V>>>28|ie<<4)^(ie>>>2|V<<30)^(ie>>>7|V<<25),Ue=(ie>>>28|V<<4)^(V>>>2|ie<<30)^(V>>>7|ie<<25),je=(Ge>>>14|He<<18)^(Ge>>>18|He<<14)^(He>>>9|Ge<<23),Pe=(He>>>14|Ge<<18)^(He>>>18|Ge<<14)^(Ge>>>9|He<<23),re=V&xe,et=ie&me,u=re^V&Ce^i,c=et^ie&Le^a,W=Ge&qe^~Ge&Me,b=He&pe^~He&Ne,y=we[le],f=we[le+1],D=se[le],$=se[le+1],N=($&65535)+(f&65535)+(b&65535)+(Pe&65535)+(Se&65535),G=($>>>16)+(f>>>16)+(b>>>16)+(Pe>>>16)+(Se>>>16)+(N>>>16),B=(D&65535)+(y&65535)+(W&65535)+(je&65535)+(Ke&65535)+(G>>>16),te=(D>>>16)+(y>>>16)+(W>>>16)+(je>>>16)+(Ke>>>16)+(B>>>16),y=te<<16|B&65535,f=G<<16|N&65535,N=(c&65535)+(Ue&65535),G=(c>>>16)+(Ue>>>16)+(N>>>16),B=(u&65535)+(Be&65535)+(G>>>16),te=(u>>>16)+(Be>>>16)+(B>>>16),D=te<<16|B&65535,$=G<<16|N&65535,N=(ze&65535)+(f&65535),G=(ze>>>16)+(f>>>16)+(N>>>16),B=(Oe&65535)+(y&65535)+(G>>>16),te=(Oe>>>16)+(y>>>16)+(B>>>16),Ke=te<<16|B&65535,Se=G<<16|N&65535,N=($&65535)+(f&65535),G=($>>>16)+(f>>>16)+(N>>>16),B=(D&65535)+(y&65535)+(G>>>16),te=(D>>>16)+(y>>>16)+(B>>>16),Oe=te<<16|B&65535,ze=G<<16|N&65535,Be=(Oe>>>28|ze<<4)^(ze>>>2|Oe<<30)^(ze>>>7|Oe<<25),Ue=(ze>>>28|Oe<<4)^(Oe>>>2|ze<<30)^(Oe>>>7|ze<<25),je=(Ke>>>14|Se<<18)^(Ke>>>18|Se<<14)^(Se>>>9|Ke<<23),Pe=(Se>>>14|Ke<<18)^(Se>>>18|Ke<<14)^(Ke>>>9|Se<<23),lt=Oe&V,it=ze&ie,u=lt^Oe&xe^re,c=it^ze&me^et,W=Ke&Ge^~Ke&qe,b=Se&He^~Se&pe,y=we[le+2],f=we[le+3],D=se[le+2],$=se[le+3],N=($&65535)+(f&65535)+(b&65535)+(Pe&65535)+(Ne&65535),G=($>>>16)+(f>>>16)+(b>>>16)+(Pe>>>16)+(Ne>>>16)+(N>>>16),B=(D&65535)+(y&65535)+(W&65535)+(je&65535)+(Me&65535)+(G>>>16),te=(D>>>16)+(y>>>16)+(W>>>16)+(je>>>16)+(Me>>>16)+(B>>>16),y=te<<16|B&65535,f=G<<16|N&65535,N=(c&65535)+(Ue&65535),G=(c>>>16)+(Ue>>>16)+(N>>>16),B=(u&65535)+(Be&65535)+(G>>>16),te=(u>>>16)+(Be>>>16)+(B>>>16),D=te<<16|B&65535,$=G<<16|N&65535,N=(Le&65535)+(f&65535),G=(Le>>>16)+(f>>>16)+(N>>>16),B=(Ce&65535)+(y&65535)+(G>>>16),te=(Ce>>>16)+(y>>>16)+(B>>>16),Me=te<<16|B&65535,Ne=G<<16|N&65535,N=($&65535)+(f&65535),G=($>>>16)+(f>>>16)+(N>>>16),B=(D&65535)+(y&65535)+(G>>>16),te=(D>>>16)+(y>>>16)+(B>>>16),Ce=te<<16|B&65535,Le=G<<16|N&65535,Be=(Ce>>>28|Le<<4)^(Le>>>2|Ce<<30)^(Le>>>7|Ce<<25),Ue=(Le>>>28|Ce<<4)^(Ce>>>2|Le<<30)^(Ce>>>7|Le<<25),je=(Me>>>14|Ne<<18)^(Me>>>18|Ne<<14)^(Ne>>>9|Me<<23),Pe=(Ne>>>14|Me<<18)^(Ne>>>18|Me<<14)^(Me>>>9|Ne<<23),ht=Ce&Oe,p=Le&ze,u=ht^Ce&V^lt,c=p^Le&ie^it,W=Me&Ke^~Me&Ge,b=Ne&Se^~Ne&He,y=we[le+4],f=we[le+5],D=se[le+4],$=se[le+5],N=($&65535)+(f&65535)+(b&65535)+(Pe&65535)+(pe&65535),G=($>>>16)+(f>>>16)+(b>>>16)+(Pe>>>16)+(pe>>>16)+(N>>>16),B=(D&65535)+(y&65535)+(W&65535)+(je&65535)+(qe&65535)+(G>>>16),te=(D>>>16)+(y>>>16)+(W>>>16)+(je>>>16)+(qe>>>16)+(B>>>16),y=te<<16|B&65535,f=G<<16|N&65535,N=(c&65535)+(Ue&65535),G=(c>>>16)+(Ue>>>16)+(N>>>16),B=(u&65535)+(Be&65535)+(G>>>16),te=(u>>>16)+(Be>>>16)+(B>>>16),D=te<<16|B&65535,$=G<<16|N&65535,N=(me&65535)+(f&65535),G=(me>>>16)+(f>>>16)+(N>>>16),B=(xe&65535)+(y&65535)+(G>>>16),te=(xe>>>16)+(y>>>16)+(B>>>16),qe=te<<16|B&65535,pe=G<<16|N&65535,N=($&65535)+(f&65535),G=($>>>16)+(f>>>16)+(N>>>16),B=(D&65535)+(y&65535)+(G>>>16),te=(D>>>16)+(y>>>16)+(B>>>16),xe=te<<16|B&65535,me=G<<16|N&65535,Be=(xe>>>28|me<<4)^(me>>>2|xe<<30)^(me>>>7|xe<<25),Ue=(me>>>28|xe<<4)^(xe>>>2|me<<30)^(xe>>>7|me<<25),je=(qe>>>14|pe<<18)^(qe>>>18|pe<<14)^(pe>>>9|qe<<23),Pe=(pe>>>14|qe<<18)^(pe>>>18|qe<<14)^(qe>>>9|pe<<23),i=xe&Ce,a=me&Le,u=i^xe&Oe^ht,c=a^me&ze^p,W=qe&Me^~qe&Ke,b=pe&Ne^~pe&Se,y=we[le+6],f=we[le+7],D=se[le+6],$=se[le+7],N=($&65535)+(f&65535)+(b&65535)+(Pe&65535)+(He&65535),G=($>>>16)+(f>>>16)+(b>>>16)+(Pe>>>16)+(He>>>16)+(N>>>16),B=(D&65535)+(y&65535)+(W&65535)+(je&65535)+(Ge&65535)+(G>>>16),te=(D>>>16)+(y>>>16)+(W>>>16)+(je>>>16)+(Ge>>>16)+(B>>>16),y=te<<16|B&65535,f=G<<16|N&65535,N=(c&65535)+(Ue&65535),G=(c>>>16)+(Ue>>>16)+(N>>>16),B=(u&65535)+(Be&65535)+(G>>>16),te=(u>>>16)+(Be>>>16)+(B>>>16),D=te<<16|B&65535,$=G<<16|N&65535,N=(ie&65535)+(f&65535),G=(ie>>>16)+(f>>>16)+(N>>>16),B=(V&65535)+(y&65535)+(G>>>16),te=(V>>>16)+(y>>>16)+(B>>>16),Ge=te<<16|B&65535,He=G<<16|N&65535,N=($&65535)+(f&65535),G=($>>>16)+(f>>>16)+(N>>>16),B=(D&65535)+(y&65535)+(G>>>16),te=(D>>>16)+(y>>>16)+(B>>>16),V=te<<16|B&65535,ie=G<<16|N&65535;N=(U&65535)+(ie&65535),G=(U>>>16)+(ie>>>16)+(N>>>16),B=(g&65535)+(V&65535)+(G>>>16),te=(g>>>16)+(V>>>16)+(B>>>16),this.h0h=te<<16|B&65535,this.h0l=G<<16|N&65535,N=(L&65535)+(me&65535),G=(L>>>16)+(me>>>16)+(N>>>16),B=(S&65535)+(xe&65535)+(G>>>16),te=(S>>>16)+(xe>>>16)+(B>>>16),this.h1h=te<<16|B&65535,this.h1l=G<<16|N&65535,N=(x&65535)+(Le&65535),G=(x>>>16)+(Le>>>16)+(N>>>16),B=(h&65535)+(Ce&65535)+(G>>>16),te=(h>>>16)+(Ce>>>16)+(B>>>16),this.h2h=te<<16|B&65535,this.h2l=G<<16|N&65535,N=(R&65535)+(ze&65535),G=(R>>>16)+(ze>>>16)+(N>>>16),B=(v&65535)+(Oe&65535)+(G>>>16),te=(v>>>16)+(Oe>>>16)+(B>>>16),this.h3h=te<<16|B&65535,this.h3l=G<<16|N&65535,N=(ee&65535)+(He&65535),G=(ee>>>16)+(He>>>16)+(N>>>16),B=(X&65535)+(Ge&65535)+(G>>>16),te=(X>>>16)+(Ge>>>16)+(B>>>16),this.h4h=te<<16|B&65535,this.h4l=G<<16|N&65535,N=(ye&65535)+(pe&65535),G=(ye>>>16)+(pe>>>16)+(N>>>16),B=(Fe&65535)+(qe&65535)+(G>>>16),te=(Fe>>>16)+(qe>>>16)+(B>>>16),this.h5h=te<<16|B&65535,this.h5l=G<<16|N&65535,N=(Ee&65535)+(Ne&65535),G=(Ee>>>16)+(Ne>>>16)+(N>>>16),B=(ve&65535)+(Me&65535)+(G>>>16),te=(ve>>>16)+(Me>>>16)+(B>>>16),this.h6h=te<<16|B&65535,this.h6l=G<<16|N&65535,N=(ke&65535)+(Se&65535),G=(ke>>>16)+(Se>>>16)+(N>>>16),B=(De&65535)+(Ke&65535)+(G>>>16),te=(De>>>16)+(Ke>>>16)+(B>>>16),this.h7h=te<<16|B&65535,this.h7l=G<<16|N&65535},P.prototype.hex=function(){this.finalize();var g=this.h0h,U=this.h0l,S=this.h1h,L=this.h1l,h=this.h2h,x=this.h2l,v=this.h3h,R=this.h3l,X=this.h4h,ee=this.h4l,Fe=this.h5h,ye=this.h5l,ve=this.h6h,Ee=this.h6l,De=this.h7h,ke=this.h7l,we=this.bits,le=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[L>>28&15]+m[L>>24&15]+m[L>>20&15]+m[L>>16&15]+m[L>>12&15]+m[L>>8&15]+m[L>>4&15]+m[L&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 we>=256&&(le+=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]),we>=384&&(le+=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[ee>>28&15]+m[ee>>24&15]+m[ee>>20&15]+m[ee>>16&15]+m[ee>>12&15]+m[ee>>8&15]+m[ee>>4&15]+m[ee&15]+m[Fe>>28&15]+m[Fe>>24&15]+m[Fe>>20&15]+m[Fe>>16&15]+m[Fe>>12&15]+m[Fe>>8&15]+m[Fe>>4&15]+m[Fe&15]+m[ye>>28&15]+m[ye>>24&15]+m[ye>>20&15]+m[ye>>16&15]+m[ye>>12&15]+m[ye>>8&15]+m[ye>>4&15]+m[ye&15]),we==512&&(le+=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[Ee>>28&15]+m[Ee>>24&15]+m[Ee>>20&15]+m[Ee>>16&15]+m[Ee>>12&15]+m[Ee>>8&15]+m[Ee>>4&15]+m[Ee&15]+m[De>>28&15]+m[De>>24&15]+m[De>>20&15]+m[De>>16&15]+m[De>>12&15]+m[De>>8&15]+m[De>>4&15]+m[De&15]+m[ke>>28&15]+m[ke>>24&15]+m[ke>>20&15]+m[ke>>16&15]+m[ke>>12&15]+m[ke>>8&15]+m[ke>>4&15]+m[ke&15]),le},P.prototype.toString=P.prototype.hex,P.prototype.digest=function(){this.finalize();var g=this.h0h,U=this.h0l,S=this.h1h,L=this.h1l,h=this.h2h,x=this.h2l,v=this.h3h,R=this.h3l,X=this.h4h,ee=this.h4l,Fe=this.h5h,ye=this.h5l,ve=this.h6h,Ee=this.h6l,De=this.h7h,ke=this.h7l,we=this.bits,le=[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,L>>24&255,L>>16&255,L>>8&255,L&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 we>=256&&le.push(R>>24&255,R>>16&255,R>>8&255,R&255),we>=384&&le.push(X>>24&255,X>>16&255,X>>8&255,X&255,ee>>24&255,ee>>16&255,ee>>8&255,ee&255,Fe>>24&255,Fe>>16&255,Fe>>8&255,Fe&255,ye>>24&255,ye>>16&255,ye>>8&255,ye&255),we==512&&le.push(ve>>24&255,ve>>16&255,ve>>8&255,ve&255,Ee>>24&255,Ee>>16&255,Ee>>8&255,Ee&255,De>>24&255,De>>16&255,De>>8&255,De&255,ke>>24&255,ke>>16&255,ke>>8&255,ke&255),le},P.prototype.array=P.prototype.digest,P.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},P.prototype.clone=function(){var g=new P(this.bits,!1);return this.copyTo(g),g},P.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 M(g,U,S){var L,h=typeof g;if(h!=="string"){if(h==="object"){if(g===null)throw new Error(Y);if(be&&g.constructor===ArrayBuffer)g=new Uint8Array(g);else if(!Array.isArray(g)&&(!be||!ArrayBuffer.isView(g)))throw new Error(Y)}else throw new Error(Y);L=!0}var x=g.length;if(!L){for(var v=[],x=g.length,R=0,X,ee=0;ee<x;++ee)X=g.charCodeAt(ee),X<128?v[R++]=X:X<2048?(v[R++]=192|X>>6,v[R++]=128|X&63):X<55296||X>=57344?(v[R++]=224|X>>12,v[R++]=128|X>>6&63,v[R++]=128|X&63):(X=65536+((X&1023)<<10|g.charCodeAt(++ee)&1023),v[R++]=240|X>>18,v[R++]=128|X>>12&63,v[R++]=128|X>>6&63,v[R++]=128|X&63);g=v}g.length>128&&(g=new P(U,!0).update(g).array());for(var Fe=[],ye=[],ee=0;ee<128;++ee){var ve=g[ee]||0;Fe[ee]=92^ve,ye[ee]=54^ve}P.call(this,U,S),this.update(ye),this.oKeyPad=Fe,this.inner=!0,this.sharedMemory=S}M.prototype=new P,M.prototype.finalize=function(){if(P.prototype.finalize.call(this),this.inner){this.inner=!1;var g=this.array();P.call(this,this.bits,this.sharedMemory),this.update(this.oKeyPad),this.update(g),P.prototype.finalize.call(this)}},M.prototype.clone=function(){var g=new M([],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),J?Te.exports=z:(j.sha512=z.sha512,j.sha384=z.sha384,j.sha512_256=z.sha512_256,j.sha512_224=z.sha512_224,_e&&(ge=function(){return z}.call(z,ne,z,Te),ge!==void 0&&(Te.exports=ge)))})()},4400:function(Te,de,ne){var ce=ne(54123).stringify,ge=ne(26813);Te.exports=function(Y){return{parse:ge(Y),stringify:ce}},Te.exports.parse=ge(),Te.exports.stringify=ce},26813:function(Te,de,ne){var ce=null;const ge=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,Y=/(?: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(O){"use strict";var j={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(O!=null){if(O.strict===!0&&(j.strict=!0),O.storeAsString===!0&&(j.storeAsString=!0),j.alwaysParseAsBig=O.alwaysParseAsBig===!0?O.alwaysParseAsBig:!1,j.useNativeBigInt=O.useNativeBigInt===!0?O.useNativeBigInt:!1,typeof O.constructorAction<"u")if(O.constructorAction==="error"||O.constructorAction==="ignore"||O.constructorAction==="preserve")j.constructorAction=O.constructorAction;else throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${O.constructorAction}`);if(typeof O.protoAction<"u")if(O.protoAction==="error"||O.protoAction==="ignore"||O.protoAction==="preserve")j.protoAction=O.protoAction;else throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${O.protoAction}`)}var k,I,J={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
19
+ `,r:"\r",t:" "},_e,be=function(F){throw{name:"SyntaxError",message:F,at:k,text:_e}},m=function(F){return F&&F!==I&&be("Expected '"+F+"' instead of '"+I+"'"),I=_e.charAt(k),k+=1,I},oe=function(){var F,T="";for(I==="-"&&(T="-",m("-"));I>="0"&&I<="9";)T+=I,m();if(I===".")for(T+=".";m()&&I>="0"&&I<="9";)T+=I;if(I==="e"||I==="E")for(T+=I,m(),(I==="-"||I==="+")&&(T+=I,m());I>="0"&&I<="9";)T+=I,m();if(F=+T,!isFinite(F))be("Bad number");else return ce==null&&(ce=ne(44431)),T.length>15?j.storeAsString?T:j.useNativeBigInt?BigInt(T):new ce(T):j.alwaysParseAsBig?j.useNativeBigInt?BigInt(F):new ce(F):F},H=function(){var F,T,P="",M;if(I==='"')for(var z=k;m();){if(I==='"')return k-1>z&&(P+=_e.substring(z,k-1)),m(),P;if(I==="\\"){if(k-1>z&&(P+=_e.substring(z,k-1)),m(),I==="u"){for(M=0,T=0;T<4&&(F=parseInt(m(),16),!!isFinite(F));T+=1)M=M*16+F;P+=String.fromCharCode(M)}else if(typeof J[I]=="string")P+=J[I];else break;z=k}}be("Bad string")},se=function(){for(;I&&I<=" ";)m()},Ae=function(){switch(I){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 '"+I+"'")},Q,Re=function(){var F=[];if(I==="["){if(m("["),se(),I==="]")return m("]"),F;for(;I;){if(F.push(Q()),se(),I==="]")return m("]"),F;m(","),se()}}be("Bad array")},A=function(){var F,T=Object.create(null);if(I==="{"){if(m("{"),se(),I==="}")return m("}"),T;for(;I;){if(F=H(),se(),m(":"),j.strict===!0&&Object.hasOwnProperty.call(T,F)&&be('Duplicate key "'+F+'"'),ge.test(F)===!0?j.protoAction==="error"?be("Object contains forbidden prototype property"):j.protoAction==="ignore"?Q():T[F]=Q():Y.test(F)===!0?j.constructorAction==="error"?be("Object contains forbidden constructor property"):j.constructorAction==="ignore"?Q():T[F]=Q():T[F]=Q(),se(),I==="}")return m("}"),T;m(","),se()}}be("Bad object")};return Q=function(){switch(se(),I){case"{":return A();case"[":return Re();case'"':return H();case"-":return oe();default:return I>="0"&&I<="9"?oe():Ae()}},function(F,T){var P;return _e=F+"",k=0,I=" ",P=Q(),se(),I&&be("Syntax error"),typeof T=="function"?function M(z,g){var U,S,L=z[g];return L&&typeof L=="object"&&Object.keys(L).forEach(function(h){S=M(L,h),S!==void 0?L[h]=S:delete L[h]}),T.call(z,g,L)}({"":P},""):P}};Te.exports=l},54123:function(Te,de,ne){var ce=ne(44431),ge=Te.exports;(function(){"use strict";function Y(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,O=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,j,k,I={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},J;function _e(m){return O.lastIndex=0,O.test(m)?'"'+m.replace(O,function(oe){var H=I[oe];return typeof H=="string"?H:"\\u"+("0000"+oe.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+m+'"'}function be(m,oe){var H,se,Ae,Q,Re=j,A,F=oe[m],T=F!=null&&(F instanceof ce||ce.isBigNumber(F));switch(F&&typeof F=="object"&&typeof F.toJSON=="function"&&(F=F.toJSON(m)),typeof J=="function"&&(F=J.call(oe,m,F)),typeof F){case"string":return T?F:_e(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(j+=k,A=[],Object.prototype.toString.apply(F)==="[object Array]"){for(Q=F.length,H=0;H<Q;H+=1)A[H]=be(H,F)||"null";return Ae=A.length===0?"[]":j?`[
20
+ `+j+A.join(`,
21
+ `+j)+`
22
+ `+Re+"]":"["+A.join(",")+"]",j=Re,Ae}if(J&&typeof J=="object")for(Q=J.length,H=0;H<Q;H+=1)typeof J[H]=="string"&&(se=J[H],Ae=be(se,F),Ae&&A.push(_e(se)+(j?": ":":")+Ae));else Object.keys(F).forEach(function(P){var M=be(P,F);M&&A.push(_e(P)+(j?": ":":")+M)});return Ae=A.length===0?"{}":j?`{
23
+ `+j+A.join(`,
24
+ `+j)+`
25
+ `+Re+"}":"{"+A.join(",")+"}",j=Re,Ae}}typeof ge.stringify!="function"&&(ge.stringify=function(m,oe,H){var se;if(j="",k="",typeof H=="number")for(se=0;se<H;se+=1)k+=" ";else typeof H=="string"&&(k=H);if(J=oe,oe&&typeof oe!="function"&&(typeof oe!="object"||typeof oe.length!="number"))throw new Error("JSON.stringify");return be("",{"":m})})})()},34155:function(Te){var de=Te.exports={},ne,ce;function ge(){throw new Error("setTimeout has not been defined")}function Y(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?ne=setTimeout:ne=ge}catch{ne=ge}try{typeof clearTimeout=="function"?ce=clearTimeout:ce=Y}catch{ce=Y}})();function l(H){if(ne===setTimeout)return setTimeout(H,0);if((ne===ge||!ne)&&setTimeout)return ne=setTimeout,setTimeout(H,0);try{return ne(H,0)}catch{try{return ne.call(null,H,0)}catch{return ne.call(this,H,0)}}}function O(H){if(ce===clearTimeout)return clearTimeout(H);if((ce===Y||!ce)&&clearTimeout)return ce=clearTimeout,clearTimeout(H);try{return ce(H)}catch{try{return ce.call(null,H)}catch{return ce.call(this,H)}}}var j=[],k=!1,I,J=-1;function _e(){!k||!I||(k=!1,I.length?j=I.concat(j):J=-1,j.length&&be())}function be(){if(!k){var H=l(_e);k=!0;for(var se=j.length;se;){for(I=j,j=[];++J<se;)I&&I[J].run();J=-1,se=j.length}I=null,k=!1,O(H)}}de.nextTick=function(H){var se=new Array(arguments.length-1);if(arguments.length>1)for(var Ae=1;Ae<arguments.length;Ae++)se[Ae-1]=arguments[Ae];j.push(new m(H,se)),j.length===1&&!k&&l(be)};function m(H,se){this.fun=H,this.array=se}m.prototype.run=function(){this.fun.apply(null,this.array)},de.title="browser",de.browser=!0,de.env={},de.argv=[],de.version="",de.versions={};function oe(){}de.on=oe,de.addListener=oe,de.once=oe,de.off=oe,de.removeListener=oe,de.removeAllListeners=oe,de.emit=oe,de.prependListener=oe,de.prependOnceListener=oe,de.listeners=function(H){return[]},de.binding=function(H){throw new Error("process.binding is not supported")},de.cwd=function(){return"/"},de.chdir=function(H){throw new Error("process.chdir is not supported")},de.umask=function(){return 0}},35620:function(Te,de,ne){"use strict";ne.d(de,{US:function(){return O},YU:function(){return ge}});var ce=ne(79911);const ge=ce.base16,Y=ce.base32,l=ce.base32hex,O=ce.base64,j=ce.base64url,k=ce.codec;var I=null}}]);