>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new b;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return g[e]=t,t},x.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},x.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},x.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},x.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},x.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},x.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},x.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},x.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},x.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},x.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},x.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},x.prototype.isqr=function(e){return this.imul(e,e.clone())},x.prototype.sqr=function(e){return this.mul(e,e)},x.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var n=this.m.add(new a(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);r(!i.isZero());var s=new a(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new a(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var d=this.pow(l,i),f=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=o;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g=0;r--){for(var c=t.words[r],l=u-1;l>=0;l--){var d=c>>l&1;i!==n[0]&&(i=this.sqr(i)),0!==d||0!==o?(o<<=1,o|=d,(4===++s||0===r&&0===l)&&(i=this.mul(i,n[o]),s=0,o=0)):s=0}u=26}return i},x.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},x.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new A(e)},i(A,x),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},A.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(209)(e))},function(e){e.exports=JSON.parse('{"EvalMaxVersion":6,"LogicSigVersion":5,"Ops":[{"Opcode":0,"Name":"err","Cost":1,"Size":1,"Doc":"Fail immediately.","Groups":["Flow Control"]},{"Opcode":1,"Name":"sha256","Args":"B","Returns":"B","Cost":35,"Size":1,"Doc":"SHA256 hash of value A, yields [32]byte","Groups":["Arithmetic"]},{"Opcode":2,"Name":"keccak256","Args":"B","Returns":"B","Cost":130,"Size":1,"Doc":"Keccak256 hash of value A, yields [32]byte","Groups":["Arithmetic"]},{"Opcode":3,"Name":"sha512_256","Args":"B","Returns":"B","Cost":45,"Size":1,"Doc":"SHA512_256 hash of value A, yields [32]byte","Groups":["Arithmetic"]},{"Opcode":4,"Name":"ed25519verify","Args":"BBB","Returns":"U","Cost":1900,"Size":1,"Doc":"for (data A, signature B, pubkey C) verify the signature of (\\"ProgData\\" || program_hash || data) against the pubkey => {0 or 1}","DocExtra":"The 32 byte public key is the last element on the stack, preceded by the 64 byte signature at the second-to-last element on the stack, preceded by the data which was signed at the third-to-last element on the stack.","Groups":["Arithmetic"]},{"Opcode":5,"Name":"ecdsa_verify","Args":"BBBBB","Returns":"U","Cost":1700,"Size":2,"Doc":"for (data A, signature B, C and pubkey D, E) verify the signature of the data against the pubkey => {0 or 1}","DocExtra":"The 32 byte Y-component of a public key is the last element on the stack, preceded by X-component of a pubkey, preceded by S and R components of a signature, preceded by the data that is fifth element on the stack. All values are big-endian encoded. The signed data must be 32 bytes long, and signatures in lower-S form are only accepted.","ImmediateNote":"{uint8 curve index}","Groups":["Arithmetic"]},{"Opcode":6,"Name":"ecdsa_pk_decompress","Args":"B","Returns":"BB","Cost":650,"Size":2,"Doc":"decompress pubkey A into components X, Y","DocExtra":"The 33 byte public key in a compressed form to be decompressed into X and Y (top) components. All values are big-endian encoded.","ImmediateNote":"{uint8 curve index}","Groups":["Arithmetic"]},{"Opcode":7,"Name":"ecdsa_pk_recover","Args":"BUBB","Returns":"BB","Cost":2000,"Size":2,"Doc":"for (data A, recovery id B, signature C, D) recover a public key","DocExtra":"S (top) and R elements of a signature, recovery id and data (bottom) are expected on the stack and used to deriver a public key. All values are big-endian encoded. The signed data must be 32 bytes long.","ImmediateNote":"{uint8 curve index}","Groups":["Arithmetic"]},{"Opcode":8,"Name":"+","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A plus B. Fail on overflow.","DocExtra":"Overflow is an error condition which halts execution and fails the transaction. Full precision is available from `addw`.","Groups":["Arithmetic"]},{"Opcode":9,"Name":"-","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A minus B. Fail if B > A.","Groups":["Arithmetic"]},{"Opcode":10,"Name":"/","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A divided by B (truncated division). Fail if B == 0.","DocExtra":"`divmodw` is available to divide the two-element values produced by `mulw` and `addw`.","Groups":["Arithmetic"]},{"Opcode":11,"Name":"*","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A times B. Fail on overflow.","DocExtra":"Overflow is an error condition which halts execution and fails the transaction. Full precision is available from `mulw`.","Groups":["Arithmetic"]},{"Opcode":12,"Name":"<","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A less than B => {0 or 1}","Groups":["Arithmetic"]},{"Opcode":13,"Name":">","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A greater than B => {0 or 1}","Groups":["Arithmetic"]},{"Opcode":14,"Name":"<=","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A less than or equal to B => {0 or 1}","Groups":["Arithmetic"]},{"Opcode":15,"Name":">=","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A greater than or equal to B => {0 or 1}","Groups":["Arithmetic"]},{"Opcode":16,"Name":"&&","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A is not zero and B is not zero => {0 or 1}","Groups":["Arithmetic"]},{"Opcode":17,"Name":"||","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A is not zero or B is not zero => {0 or 1}","Groups":["Arithmetic"]},{"Opcode":18,"Name":"==","Args":"..","Returns":"U","Cost":1,"Size":1,"Doc":"A is equal to B => {0 or 1}","Groups":["Arithmetic"]},{"Opcode":19,"Name":"!=","Args":"..","Returns":"U","Cost":1,"Size":1,"Doc":"A is not equal to B => {0 or 1}","Groups":["Arithmetic"]},{"Opcode":20,"Name":"!","Args":"U","Returns":"U","Cost":1,"Size":1,"Doc":"A == 0 yields 1; else 0","Groups":["Arithmetic"]},{"Opcode":21,"Name":"len","Args":"B","Returns":"U","Cost":1,"Size":1,"Doc":"yields length of byte value A","Groups":["Arithmetic"]},{"Opcode":22,"Name":"itob","Args":"U","Returns":"B","Cost":1,"Size":1,"Doc":"converts uint64 A to big endian bytes","Groups":["Arithmetic"]},{"Opcode":23,"Name":"btoi","Args":"B","Returns":"U","Cost":1,"Size":1,"Doc":"converts bytes A as big endian to uint64","DocExtra":"`btoi` fails if the input is longer than 8 bytes.","Groups":["Arithmetic"]},{"Opcode":24,"Name":"%","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A modulo B. Fail if B == 0.","Groups":["Arithmetic"]},{"Opcode":25,"Name":"|","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A bitwise-or B","Groups":["Arithmetic"]},{"Opcode":26,"Name":"&","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A bitwise-and B","Groups":["Arithmetic"]},{"Opcode":27,"Name":"^","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A bitwise-xor B","Groups":["Arithmetic"]},{"Opcode":28,"Name":"~","Args":"U","Returns":"U","Cost":1,"Size":1,"Doc":"bitwise invert value A","Groups":["Arithmetic"]},{"Opcode":29,"Name":"mulw","Args":"UU","Returns":"UU","Cost":1,"Size":1,"Doc":"A times B as a 128-bit result in two uint64s. X is the high 64 bits, Y is the low","Groups":["Arithmetic"]},{"Opcode":30,"Name":"addw","Args":"UU","Returns":"UU","Cost":1,"Size":1,"Doc":"A plus B as a 128-bit result. X is the carry-bit, Y is the low-order 64 bits.","Groups":["Arithmetic"]},{"Opcode":31,"Name":"divmodw","Args":"UUUU","Returns":"UUUU","Cost":20,"Size":1,"Doc":"W,X = (A,B / C,D); Y,Z = (A,B modulo C,D)","DocExtra":"The notation J,K indicates that two uint64 values J and K are interpreted as a uint128 value, with J as the high uint64 and K the low.","Groups":["Arithmetic"]},{"Opcode":32,"Name":"intcblock","Cost":1,"Size":0,"Doc":"prepare block of uint64 constants for use by intc","DocExtra":"`intcblock` loads following program bytes into an array of integer constants in the evaluator. These integer constants can be referred to by `intc` and `intc_*` which will push the value onto the stack. Subsequent calls to `intcblock` reset and replace the integer constants available to the script.","ImmediateNote":"{varuint length} [{varuint value}, ...]","Groups":["Loading Values"]},{"Opcode":33,"Name":"intc","Returns":"U","Cost":1,"Size":2,"Doc":"Ith constant from intcblock","ImmediateNote":"{uint8 int constant index}","Groups":["Loading Values"]},{"Opcode":34,"Name":"intc_0","Returns":"U","Cost":1,"Size":1,"Doc":"constant 0 from intcblock","Groups":["Loading Values"]},{"Opcode":35,"Name":"intc_1","Returns":"U","Cost":1,"Size":1,"Doc":"constant 1 from intcblock","Groups":["Loading Values"]},{"Opcode":36,"Name":"intc_2","Returns":"U","Cost":1,"Size":1,"Doc":"constant 2 from intcblock","Groups":["Loading Values"]},{"Opcode":37,"Name":"intc_3","Returns":"U","Cost":1,"Size":1,"Doc":"constant 3 from intcblock","Groups":["Loading Values"]},{"Opcode":38,"Name":"bytecblock","Cost":1,"Size":0,"Doc":"prepare block of byte-array constants for use by bytec","DocExtra":"`bytecblock` loads the following program bytes into an array of byte-array constants in the evaluator. These constants can be referred to by `bytec` and `bytec_*` which will push the value onto the stack. Subsequent calls to `bytecblock` reset and replace the bytes constants available to the script.","ImmediateNote":"{varuint length} [({varuint value length} bytes), ...]","Groups":["Loading Values"]},{"Opcode":39,"Name":"bytec","Returns":"B","Cost":1,"Size":2,"Doc":"Ith constant from bytecblock","ImmediateNote":"{uint8 byte constant index}","Groups":["Loading Values"]},{"Opcode":40,"Name":"bytec_0","Returns":"B","Cost":1,"Size":1,"Doc":"constant 0 from bytecblock","Groups":["Loading Values"]},{"Opcode":41,"Name":"bytec_1","Returns":"B","Cost":1,"Size":1,"Doc":"constant 1 from bytecblock","Groups":["Loading Values"]},{"Opcode":42,"Name":"bytec_2","Returns":"B","Cost":1,"Size":1,"Doc":"constant 2 from bytecblock","Groups":["Loading Values"]},{"Opcode":43,"Name":"bytec_3","Returns":"B","Cost":1,"Size":1,"Doc":"constant 3 from bytecblock","Groups":["Loading Values"]},{"Opcode":44,"Name":"arg","Returns":"B","Cost":1,"Size":2,"Doc":"Nth LogicSig argument","ImmediateNote":"{uint8 arg index N}","Groups":["Loading Values"]},{"Opcode":45,"Name":"arg_0","Returns":"B","Cost":1,"Size":1,"Doc":"LogicSig argument 0","Groups":["Loading Values"]},{"Opcode":46,"Name":"arg_1","Returns":"B","Cost":1,"Size":1,"Doc":"LogicSig argument 1","Groups":["Loading Values"]},{"Opcode":47,"Name":"arg_2","Returns":"B","Cost":1,"Size":1,"Doc":"LogicSig argument 2","Groups":["Loading Values"]},{"Opcode":48,"Name":"arg_3","Returns":"B","Cost":1,"Size":1,"Doc":"LogicSig argument 3","Groups":["Loading Values"]},{"Opcode":49,"Name":"txn","Returns":".","Cost":1,"Size":2,"ArgEnum":["Sender","Fee","FirstValid","FirstValidTime","LastValid","Note","Lease","Receiver","Amount","CloseRemainderTo","VotePK","SelectionPK","VoteFirst","VoteLast","VoteKeyDilution","Type","TypeEnum","XferAsset","AssetAmount","AssetSender","AssetReceiver","AssetCloseTo","GroupIndex","TxID","ApplicationID","OnCompletion","ApplicationArgs","NumAppArgs","Accounts","NumAccounts","ApprovalProgram","ClearStateProgram","RekeyTo","ConfigAsset","ConfigAssetTotal","ConfigAssetDecimals","ConfigAssetDefaultFrozen","ConfigAssetUnitName","ConfigAssetName","ConfigAssetURL","ConfigAssetMetadataHash","ConfigAssetManager","ConfigAssetReserve","ConfigAssetFreeze","ConfigAssetClawback","FreezeAsset","FreezeAssetAccount","FreezeAssetFrozen","Assets","NumAssets","Applications","NumApplications","GlobalNumUint","GlobalNumByteSlice","LocalNumUint","LocalNumByteSlice","ExtraProgramPages","Nonparticipation","Logs","NumLogs","CreatedAssetID","CreatedApplicationID","LastLog","StateProofPK"],"ArgEnumTypes":"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB","Doc":"field F of current transaction","DocExtra":"FirstValidTime causes the program to fail. The field is reserved for future use.","ImmediateNote":"{uint8 transaction field index}","Groups":["Loading Values"]},{"Opcode":50,"Name":"global","Returns":".","Cost":1,"Size":2,"Doc":"global field F","ImmediateNote":"{uint8 global field index}","Groups":["Loading Values"]},{"Opcode":51,"Name":"gtxn","Returns":".","Cost":1,"Size":3,"ArgEnum":["Sender","Fee","FirstValid","FirstValidTime","LastValid","Note","Lease","Receiver","Amount","CloseRemainderTo","VotePK","SelectionPK","VoteFirst","VoteLast","VoteKeyDilution","Type","TypeEnum","XferAsset","AssetAmount","AssetSender","AssetReceiver","AssetCloseTo","GroupIndex","TxID","ApplicationID","OnCompletion","ApplicationArgs","NumAppArgs","Accounts","NumAccounts","ApprovalProgram","ClearStateProgram","RekeyTo","ConfigAsset","ConfigAssetTotal","ConfigAssetDecimals","ConfigAssetDefaultFrozen","ConfigAssetUnitName","ConfigAssetName","ConfigAssetURL","ConfigAssetMetadataHash","ConfigAssetManager","ConfigAssetReserve","ConfigAssetFreeze","ConfigAssetClawback","FreezeAsset","FreezeAssetAccount","FreezeAssetFrozen","Assets","NumAssets","Applications","NumApplications","GlobalNumUint","GlobalNumByteSlice","LocalNumUint","LocalNumByteSlice","ExtraProgramPages","Nonparticipation","Logs","NumLogs","CreatedAssetID","CreatedApplicationID","LastLog","StateProofPK"],"ArgEnumTypes":"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB","Doc":"field F of the Tth transaction in the current group","DocExtra":"for notes on transaction fields available, see `txn`. If this transaction is _i_ in the group, `gtxn i field` is equivalent to `txn field`.","ImmediateNote":"{uint8 transaction group index} {uint8 transaction field index}","Groups":["Loading Values"]},{"Opcode":52,"Name":"load","Returns":".","Cost":1,"Size":2,"Doc":"Ith scratch space value. All scratch spaces are 0 at program start.","ImmediateNote":"{uint8 position in scratch space to load from}","Groups":["Loading Values"]},{"Opcode":53,"Name":"store","Args":".","Cost":1,"Size":2,"Doc":"store A to the Ith scratch space","ImmediateNote":"{uint8 position in scratch space to store to}","Groups":["Loading Values"]},{"Opcode":54,"Name":"txna","Returns":".","Cost":1,"Size":3,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ith value of the array field F of the current transaction","ImmediateNote":"{uint8 transaction field index} {uint8 transaction field array index}","Groups":["Loading Values"]},{"Opcode":55,"Name":"gtxna","Returns":".","Cost":1,"Size":4,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ith value of the array field F from the Tth transaction in the current group","ImmediateNote":"{uint8 transaction group index} {uint8 transaction field index} {uint8 transaction field array index}","Groups":["Loading Values"]},{"Opcode":56,"Name":"gtxns","Args":"U","Returns":".","Cost":1,"Size":2,"ArgEnum":["Sender","Fee","FirstValid","FirstValidTime","LastValid","Note","Lease","Receiver","Amount","CloseRemainderTo","VotePK","SelectionPK","VoteFirst","VoteLast","VoteKeyDilution","Type","TypeEnum","XferAsset","AssetAmount","AssetSender","AssetReceiver","AssetCloseTo","GroupIndex","TxID","ApplicationID","OnCompletion","ApplicationArgs","NumAppArgs","Accounts","NumAccounts","ApprovalProgram","ClearStateProgram","RekeyTo","ConfigAsset","ConfigAssetTotal","ConfigAssetDecimals","ConfigAssetDefaultFrozen","ConfigAssetUnitName","ConfigAssetName","ConfigAssetURL","ConfigAssetMetadataHash","ConfigAssetManager","ConfigAssetReserve","ConfigAssetFreeze","ConfigAssetClawback","FreezeAsset","FreezeAssetAccount","FreezeAssetFrozen","Assets","NumAssets","Applications","NumApplications","GlobalNumUint","GlobalNumByteSlice","LocalNumUint","LocalNumByteSlice","ExtraProgramPages","Nonparticipation","Logs","NumLogs","CreatedAssetID","CreatedApplicationID","LastLog","StateProofPK"],"ArgEnumTypes":"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB","Doc":"field F of the Ath transaction in the current group","DocExtra":"for notes on transaction fields available, see `txn`. If top of stack is _i_, `gtxns field` is equivalent to `gtxn _i_ field`. gtxns exists so that _i_ can be calculated, often based on the index of the current transaction.","ImmediateNote":"{uint8 transaction field index}","Groups":["Loading Values"]},{"Opcode":57,"Name":"gtxnsa","Args":"U","Returns":".","Cost":1,"Size":3,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ith value of the array field F from the Ath transaction in the current group","ImmediateNote":"{uint8 transaction field index} {uint8 transaction field array index}","Groups":["Loading Values"]},{"Opcode":58,"Name":"gload","Returns":".","Cost":1,"Size":3,"Doc":"Ith scratch space value of the Tth transaction in the current group","DocExtra":"`gload` fails unless the requested transaction is an ApplicationCall and T < GroupIndex.","ImmediateNote":"{uint8 transaction group index} {uint8 position in scratch space to load from}","Groups":["Loading Values"]},{"Opcode":59,"Name":"gloads","Args":"U","Returns":".","Cost":1,"Size":2,"Doc":"Ith scratch space value of the Ath transaction in the current group","DocExtra":"`gloads` fails unless the requested transaction is an ApplicationCall and A < GroupIndex.","ImmediateNote":"{uint8 position in scratch space to load from}","Groups":["Loading Values"]},{"Opcode":60,"Name":"gaid","Returns":"U","Cost":1,"Size":2,"Doc":"ID of the asset or application created in the Tth transaction of the current group","DocExtra":"`gaid` fails unless the requested transaction created an asset or application and T < GroupIndex.","ImmediateNote":"{uint8 transaction group index}","Groups":["Loading Values"]},{"Opcode":61,"Name":"gaids","Args":"U","Returns":"U","Cost":1,"Size":1,"Doc":"ID of the asset or application created in the Ath transaction of the current group","DocExtra":"`gaids` fails unless the requested transaction created an asset or application and A < GroupIndex.","Groups":["Loading Values"]},{"Opcode":62,"Name":"loads","Args":"U","Returns":".","Cost":1,"Size":1,"Doc":"Ath scratch space value. All scratch spaces are 0 at program start.","Groups":["Loading Values"]},{"Opcode":63,"Name":"stores","Args":"U.","Cost":1,"Size":1,"Doc":"store B to the Ath scratch space","Groups":["Loading Values"]},{"Opcode":64,"Name":"bnz","Args":"U","Cost":1,"Size":3,"Doc":"branch to TARGET if value A is not zero","DocExtra":"The `bnz` instruction opcode 0x40 is followed by two immediate data bytes which are a high byte first and low byte second which together form a 16 bit offset which the instruction may branch to. For a bnz instruction at `pc`, if the last element of the stack is not zero then branch to instruction at `pc + 3 + N`, else proceed to next instruction at `pc + 3`. Branch targets must be aligned instructions. (e.g. Branching to the second byte of a 2 byte op will be rejected.) Starting at v4, the offset is treated as a signed 16 bit integer allowing for backward branches and looping. In prior version (v1 to v3), branch offsets are limited to forward branches only, 0-0x7fff.\\n\\nAt v2 it became allowed to branch to the end of the program exactly after the last instruction: bnz to byte N (with 0-indexing) was illegal for a TEAL program with N bytes before v2, and is legal after it. This change eliminates the need for a last instruction of no-op as a branch target at the end. (Branching beyond the end--in other words, to a byte larger than N--is still illegal and will cause the program to fail.)","ImmediateNote":"{int16 branch offset, big endian}","Groups":["Flow Control"]},{"Opcode":65,"Name":"bz","Args":"U","Cost":1,"Size":3,"Doc":"branch to TARGET if value A is zero","DocExtra":"See `bnz` for details on how branches work. `bz` inverts the behavior of `bnz`.","ImmediateNote":"{int16 branch offset, big endian}","Groups":["Flow Control"]},{"Opcode":66,"Name":"b","Cost":1,"Size":3,"Doc":"branch unconditionally to TARGET","DocExtra":"See `bnz` for details on how branches work. `b` always jumps to the offset.","ImmediateNote":"{int16 branch offset, big endian}","Groups":["Flow Control"]},{"Opcode":67,"Name":"return","Args":"U","Cost":1,"Size":1,"Doc":"use A as success value; end","Groups":["Flow Control"]},{"Opcode":68,"Name":"assert","Args":"U","Cost":1,"Size":1,"Doc":"immediately fail unless A is a non-zero number","Groups":["Flow Control"]},{"Opcode":72,"Name":"pop","Args":".","Cost":1,"Size":1,"Doc":"discard A","Groups":["Flow Control"]},{"Opcode":73,"Name":"dup","Args":".","Returns":"..","Cost":1,"Size":1,"Doc":"duplicate A","Groups":["Flow Control"]},{"Opcode":74,"Name":"dup2","Args":"..","Returns":"....","Cost":1,"Size":1,"Doc":"duplicate A and B","Groups":["Flow Control"]},{"Opcode":75,"Name":"dig","Args":".","Returns":"..","Cost":1,"Size":2,"Doc":"Nth value from the top of the stack. dig 0 is equivalent to dup","ImmediateNote":"{uint8 depth}","Groups":["Flow Control"]},{"Opcode":76,"Name":"swap","Args":"..","Returns":"..","Cost":1,"Size":1,"Doc":"swaps A and B on stack","Groups":["Flow Control"]},{"Opcode":77,"Name":"select","Args":"..U","Returns":".","Cost":1,"Size":1,"Doc":"selects one of two values based on top-of-stack: B if C != 0, else A","Groups":["Flow Control"]},{"Opcode":78,"Name":"cover","Args":".","Returns":".","Cost":1,"Size":2,"Doc":"remove top of stack, and place it deeper in the stack such that N elements are above it. Fails if stack depth <= N.","ImmediateNote":"{uint8 depth}","Groups":["Flow Control"]},{"Opcode":79,"Name":"uncover","Args":".","Returns":".","Cost":1,"Size":2,"Doc":"remove the value at depth N in the stack and shift above items down so the Nth deep value is on top of the stack. Fails if stack depth <= N.","ImmediateNote":"{uint8 depth}","Groups":["Flow Control"]},{"Opcode":80,"Name":"concat","Args":"BB","Returns":"B","Cost":1,"Size":1,"Doc":"join A and B","DocExtra":"`concat` fails if the result would be greater than 4096 bytes.","Groups":["Arithmetic"]},{"Opcode":81,"Name":"substring","Args":"B","Returns":"B","Cost":1,"Size":3,"Doc":"A range of bytes from A starting at S up to but not including E. If E < S, or either is larger than the array length, the program fails","ImmediateNote":"{uint8 start position} {uint8 end position}","Groups":["Byte Array Manipulation"]},{"Opcode":82,"Name":"substring3","Args":"BUU","Returns":"B","Cost":1,"Size":1,"Doc":"A range of bytes from A starting at B up to but not including C. If C < B, or either is larger than the array length, the program fails","Groups":["Byte Array Manipulation"]},{"Opcode":83,"Name":"getbit","Args":".U","Returns":"U","Cost":1,"Size":1,"Doc":"Bth bit of (byte-array or integer) A.","DocExtra":"see explanation of bit ordering in setbit","Groups":["Arithmetic"]},{"Opcode":84,"Name":"setbit","Args":".UU","Returns":".","Cost":1,"Size":1,"Doc":"Copy of (byte-array or integer) A, with the Bth bit set to (0 or 1) C","DocExtra":"When A is a uint64, index 0 is the least significant bit. Setting bit 3 to 1 on the integer 0 yields 8, or 2^3. When A is a byte array, index 0 is the leftmost bit of the leftmost byte. Setting bits 0 through 11 to 1 in a 4-byte-array of 0s yields the byte array 0xfff00000. Setting bit 3 to 1 on the 1-byte-array 0x00 yields the byte array 0x10.","Groups":["Arithmetic"]},{"Opcode":85,"Name":"getbyte","Args":"BU","Returns":"U","Cost":1,"Size":1,"Doc":"Bth byte of A, as an integer","Groups":["Arithmetic"]},{"Opcode":86,"Name":"setbyte","Args":"BUU","Returns":"B","Cost":1,"Size":1,"Doc":"Copy of A with the Bth byte set to small integer (between 0..255) C","Groups":["Arithmetic"]},{"Opcode":87,"Name":"extract","Args":"B","Returns":"B","Cost":1,"Size":3,"Doc":"A range of bytes from A starting at S up to but not including S+L. If L is 0, then extract to the end of the string. If S or S+L is larger than the array length, the program fails","ImmediateNote":"{uint8 start position} {uint8 length}","Groups":["Byte Array Manipulation"]},{"Opcode":88,"Name":"extract3","Args":"BUU","Returns":"B","Cost":1,"Size":1,"Doc":"A range of bytes from A starting at B up to but not including B+C. If B+C is larger than the array length, the program fails","Groups":["Byte Array Manipulation"]},{"Opcode":89,"Name":"extract_uint16","Args":"BU","Returns":"U","Cost":1,"Size":1,"Doc":"A uint16 formed from a range of big-endian bytes from A starting at B up to but not including B+2. If B+2 is larger than the array length, the program fails","Groups":["Byte Array Manipulation"]},{"Opcode":90,"Name":"extract_uint32","Args":"BU","Returns":"U","Cost":1,"Size":1,"Doc":"A uint32 formed from a range of big-endian bytes from A starting at B up to but not including B+4. If B+4 is larger than the array length, the program fails","Groups":["Byte Array Manipulation"]},{"Opcode":91,"Name":"extract_uint64","Args":"BU","Returns":"U","Cost":1,"Size":1,"Doc":"A uint64 formed from a range of big-endian bytes from A starting at B up to but not including B+8. If B+8 is larger than the array length, the program fails","Groups":["Byte Array Manipulation"]},{"Opcode":96,"Name":"balance","Args":".","Returns":"U","Cost":1,"Size":1,"Doc":"get balance for account A, in microalgos. The balance is observed after the effects of previous transactions in the group, and after the fee for the current transaction is deducted.","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset). Return: value.","Groups":["State Access"]},{"Opcode":97,"Name":"app_opted_in","Args":".U","Returns":"U","Cost":1,"Size":1,"Doc":"1 if account A is opted in to application B, else 0","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset). Return: 1 if opted in and 0 otherwise.","Groups":["State Access"]},{"Opcode":98,"Name":"app_local_get","Args":".B","Returns":".","Cost":1,"Size":1,"Doc":"local state of the key B in the current application in account A","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), state key. Return: value. The value is zero (of type uint64) if the key does not exist.","Groups":["State Access"]},{"Opcode":99,"Name":"app_local_get_ex","Args":".UB","Returns":".U","Cost":1,"Size":1,"Doc":"X is the local state of application B, key C in account A. Y is 1 if key existed, else 0","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset), state key. Return: did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.","Groups":["State Access"]},{"Opcode":100,"Name":"app_global_get","Args":"B","Returns":".","Cost":1,"Size":1,"Doc":"global state of the key A in the current application","DocExtra":"params: state key. Return: value. The value is zero (of type uint64) if the key does not exist.","Groups":["State Access"]},{"Opcode":101,"Name":"app_global_get_ex","Args":"UB","Returns":".U","Cost":1,"Size":1,"Doc":"X is the global state of application A, key B. Y is 1 if key existed, else 0","DocExtra":"params: Txn.ForeignApps offset (or, since v4, an _available_ application id), state key. Return: did_exist flag (top of the stack, 1 if the application and key existed and 0 otherwise), value. The value is zero (of type uint64) if the key does not exist.","Groups":["State Access"]},{"Opcode":102,"Name":"app_local_put","Args":".B.","Cost":1,"Size":1,"Doc":"write C to key B in account A\'s local state of the current application","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), state key, value.","Groups":["State Access"]},{"Opcode":103,"Name":"app_global_put","Args":"B.","Cost":1,"Size":1,"Doc":"write B to key A in the global state of the current application","Groups":["State Access"]},{"Opcode":104,"Name":"app_local_del","Args":".B","Cost":1,"Size":1,"Doc":"delete key B from account A\'s local state of the current application","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), state key.\\n\\nDeleting a key which is already absent has no effect on the application local state. (In particular, it does _not_ cause the program to fail.)","Groups":["State Access"]},{"Opcode":105,"Name":"app_global_del","Args":"B","Cost":1,"Size":1,"Doc":"delete key A from the global state of the current application","DocExtra":"params: state key.\\n\\nDeleting a key which is already absent has no effect on the application global state. (In particular, it does _not_ cause the program to fail.)","Groups":["State Access"]},{"Opcode":112,"Name":"asset_holding_get","Args":".U","Returns":".U","Cost":1,"Size":2,"ArgEnum":["AssetBalance","AssetFrozen"],"ArgEnumTypes":"UU","Doc":"X is field F from account A\'s holding of asset B. Y is 1 if A is opted into B, else 0","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ address), asset id (or, since v4, a Txn.ForeignAssets offset). Return: did_exist flag (1 if the asset existed and 0 otherwise), value.","ImmediateNote":"{uint8 asset holding field index}","Groups":["State Access"]},{"Opcode":113,"Name":"asset_params_get","Args":"U","Returns":".U","Cost":1,"Size":2,"ArgEnum":["AssetTotal","AssetDecimals","AssetDefaultFrozen","AssetUnitName","AssetName","AssetURL","AssetMetadataHash","AssetManager","AssetReserve","AssetFreeze","AssetClawback","AssetCreator"],"ArgEnumTypes":"UUUBBBBBBBBB","Doc":"X is field F from asset A. Y is 1 if A exists, else 0","DocExtra":"params: Txn.ForeignAssets offset (or, since v4, an _available_ asset id. Return: did_exist flag (1 if the asset existed and 0 otherwise), value.","ImmediateNote":"{uint8 asset params field index}","Groups":["State Access"]},{"Opcode":114,"Name":"app_params_get","Args":"U","Returns":".U","Cost":1,"Size":2,"ArgEnum":["AppApprovalProgram","AppClearStateProgram","AppGlobalNumUint","AppGlobalNumByteSlice","AppLocalNumUint","AppLocalNumByteSlice","AppExtraProgramPages","AppCreator","AppAddress"],"ArgEnumTypes":"BBUUUUUBB","Doc":"X is field F from app A. Y is 1 if A exists, else 0","DocExtra":"params: Txn.ForeignApps offset or an _available_ app id. Return: did_exist flag (1 if the application existed and 0 otherwise), value.","ImmediateNote":"{uint8 app params field index}","Groups":["State Access"]},{"Opcode":115,"Name":"acct_params_get","Args":".","Returns":".U","Cost":1,"Size":2,"Doc":"X is field F from account A. Y is 1 if A owns positive algos, else 0","ImmediateNote":"{uint8 account params field index}","Groups":["State Access"]},{"Opcode":120,"Name":"min_balance","Args":".","Returns":"U","Cost":1,"Size":1,"Doc":"get minimum required balance for account A, in microalgos. Required balance is affected by [ASA](https://developer.algorand.org/docs/features/asa/#assets-overview) and [App](https://developer.algorand.org/docs/features/asc1/stateful/#minimum-balance-requirement-for-a-smart-contract) usage. When creating or opting into an app, the minimum balance grows before the app code runs, therefore the increase is visible there. When deleting or closing out, the minimum balance decreases after the app executes.","DocExtra":"params: Txn.Accounts offset (or, since v4, an _available_ account address), _available_ application id (or, since v4, a Txn.ForeignApps offset). Return: value.","Groups":["State Access"]},{"Opcode":128,"Name":"pushbytes","Returns":"B","Cost":1,"Size":0,"Doc":"immediate BYTES","DocExtra":"pushbytes args are not added to the bytecblock during assembly processes","ImmediateNote":"{varuint length} {bytes}","Groups":["Loading Values"]},{"Opcode":129,"Name":"pushint","Returns":"U","Cost":1,"Size":0,"Doc":"immediate UINT","DocExtra":"pushint args are not added to the intcblock during assembly processes","ImmediateNote":"{varuint int}","Groups":["Loading Values"]},{"Opcode":136,"Name":"callsub","Cost":1,"Size":3,"Doc":"branch unconditionally to TARGET, saving the next instruction on the call stack","DocExtra":"The call stack is separate from the data stack. Only `callsub` and `retsub` manipulate it.","ImmediateNote":"{int16 branch offset, big endian}","Groups":["Flow Control"]},{"Opcode":137,"Name":"retsub","Cost":1,"Size":1,"Doc":"pop the top instruction from the call stack and branch to it","DocExtra":"The call stack is separate from the data stack. Only `callsub` and `retsub` manipulate it.","Groups":["Flow Control"]},{"Opcode":144,"Name":"shl","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A times 2^B, modulo 2^64","Groups":["Arithmetic"]},{"Opcode":145,"Name":"shr","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A divided by 2^B","Groups":["Arithmetic"]},{"Opcode":146,"Name":"sqrt","Args":"U","Returns":"U","Cost":4,"Size":1,"Doc":"The largest integer I such that I^2 <= A","Groups":["Arithmetic"]},{"Opcode":147,"Name":"bitlen","Args":".","Returns":"U","Cost":1,"Size":1,"Doc":"The highest set bit in A. If A is a byte-array, it is interpreted as a big-endian unsigned integer. bitlen of 0 is 0, bitlen of 8 is 4","DocExtra":"bitlen interprets arrays as big-endian integers, unlike setbit/getbit","Groups":["Arithmetic"]},{"Opcode":148,"Name":"exp","Args":"UU","Returns":"U","Cost":1,"Size":1,"Doc":"A raised to the Bth power. Fail if A == B == 0 and on overflow","Groups":["Arithmetic"]},{"Opcode":149,"Name":"expw","Args":"UU","Returns":"UU","Cost":10,"Size":1,"Doc":"A raised to the Bth power as a 128-bit result in two uint64s. X is the high 64 bits, Y is the low. Fail if A == B == 0 or if the results exceeds 2^128-1","Groups":["Arithmetic"]},{"Opcode":150,"Name":"bsqrt","Args":"B","Returns":"B","Cost":40,"Size":1,"Doc":"The largest integer I such that I^2 <= A. A and I are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":151,"Name":"divw","Args":"UUU","Returns":"U","Cost":1,"Size":1,"Doc":"A,B / C. Fail if C == 0 or if result overflows.","DocExtra":"The notation A,B indicates that A and B are interpreted as a uint128 value, with A as the high uint64 and B the low.","Groups":["Arithmetic"]},{"Opcode":160,"Name":"b+","Args":"BB","Returns":"B","Cost":10,"Size":1,"Doc":"A plus B. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":161,"Name":"b-","Args":"BB","Returns":"B","Cost":10,"Size":1,"Doc":"A minus B. A and B are interpreted as big-endian unsigned integers. Fail on underflow.","Groups":["Byte Array Arithmetic"]},{"Opcode":162,"Name":"b/","Args":"BB","Returns":"B","Cost":20,"Size":1,"Doc":"A divided by B (truncated division). A and B are interpreted as big-endian unsigned integers. Fail if B is zero.","Groups":["Byte Array Arithmetic"]},{"Opcode":163,"Name":"b*","Args":"BB","Returns":"B","Cost":20,"Size":1,"Doc":"A times B. A and B are interpreted as big-endian unsigned integers.","Groups":["Byte Array Arithmetic"]},{"Opcode":164,"Name":"b<","Args":"BB","Returns":"U","Cost":1,"Size":1,"Doc":"1 if A is less than B, else 0. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":165,"Name":"b>","Args":"BB","Returns":"U","Cost":1,"Size":1,"Doc":"1 if A is greater than B, else 0. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":166,"Name":"b<=","Args":"BB","Returns":"U","Cost":1,"Size":1,"Doc":"1 if A is less than or equal to B, else 0. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":167,"Name":"b>=","Args":"BB","Returns":"U","Cost":1,"Size":1,"Doc":"1 if A is greater than or equal to B, else 0. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":168,"Name":"b==","Args":"BB","Returns":"U","Cost":1,"Size":1,"Doc":"1 if A is equal to B, else 0. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":169,"Name":"b!=","Args":"BB","Returns":"U","Cost":1,"Size":1,"Doc":"0 if A is equal to B, else 1. A and B are interpreted as big-endian unsigned integers","Groups":["Byte Array Arithmetic"]},{"Opcode":170,"Name":"b%","Args":"BB","Returns":"B","Cost":20,"Size":1,"Doc":"A modulo B. A and B are interpreted as big-endian unsigned integers. Fail if B is zero.","Groups":["Byte Array Arithmetic"]},{"Opcode":171,"Name":"b|","Args":"BB","Returns":"B","Cost":6,"Size":1,"Doc":"A bitwise-or B. A and B are zero-left extended to the greater of their lengths","Groups":["Byte Array Logic"]},{"Opcode":172,"Name":"b&","Args":"BB","Returns":"B","Cost":6,"Size":1,"Doc":"A bitwise-and B. A and B are zero-left extended to the greater of their lengths","Groups":["Byte Array Logic"]},{"Opcode":173,"Name":"b^","Args":"BB","Returns":"B","Cost":6,"Size":1,"Doc":"A bitwise-xor B. A and B are zero-left extended to the greater of their lengths","Groups":["Byte Array Logic"]},{"Opcode":174,"Name":"b~","Args":"B","Returns":"B","Cost":4,"Size":1,"Doc":"A with all bits inverted","Groups":["Byte Array Logic"]},{"Opcode":175,"Name":"bzero","Args":"U","Returns":"B","Cost":1,"Size":1,"Doc":"zero filled byte-array of length A","Groups":["Loading Values"]},{"Opcode":176,"Name":"log","Args":"B","Cost":1,"Size":1,"Doc":"write A to log state of the current application","DocExtra":"`log` fails if called more than MaxLogCalls times in a program, or if the sum of logged bytes exceeds 1024 bytes.","Groups":["State Access"]},{"Opcode":177,"Name":"itxn_begin","Cost":1,"Size":1,"Doc":"begin preparation of a new inner transaction in a new transaction group","DocExtra":"`itxn_begin` initializes Sender to the application address; Fee to the minimum allowable, taking into account MinTxnFee and credit from overpaying in earlier transactions; FirstValid/LastValid to the values in the invoking transaction, and all other fields to zero or empty values.","Groups":["Inner Transactions"]},{"Opcode":178,"Name":"itxn_field","Args":".","Cost":1,"Size":2,"ArgEnum":["Sender","Fee","FirstValid","FirstValidTime","LastValid","Note","Lease","Receiver","Amount","CloseRemainderTo","VotePK","SelectionPK","VoteFirst","VoteLast","VoteKeyDilution","Type","TypeEnum","XferAsset","AssetAmount","AssetSender","AssetReceiver","AssetCloseTo","GroupIndex","TxID","ApplicationID","OnCompletion","ApplicationArgs","NumAppArgs","Accounts","NumAccounts","ApprovalProgram","ClearStateProgram","RekeyTo","ConfigAsset","ConfigAssetTotal","ConfigAssetDecimals","ConfigAssetDefaultFrozen","ConfigAssetUnitName","ConfigAssetName","ConfigAssetURL","ConfigAssetMetadataHash","ConfigAssetManager","ConfigAssetReserve","ConfigAssetFreeze","ConfigAssetClawback","FreezeAsset","FreezeAssetAccount","FreezeAssetFrozen","Assets","NumAssets","Applications","NumApplications","GlobalNumUint","GlobalNumByteSlice","LocalNumUint","LocalNumByteSlice","ExtraProgramPages","Nonparticipation","Logs","NumLogs","CreatedAssetID","CreatedApplicationID","LastLog","StateProofPK"],"ArgEnumTypes":"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB","Doc":"set field F of the current inner transaction to A","DocExtra":"`itxn_field` fails if A is of the wrong type for F, including a byte array of the wrong size for use as an address when F is an address field. `itxn_field` also fails if A is an account, asset, or app that is not _available_, or an attempt is made extend an array field beyond the limit imposed by consensus parameters. (Addresses set into asset params of acfg transactions need not be _available_.)","ImmediateNote":"{uint8 transaction field index}","Groups":["Inner Transactions"]},{"Opcode":179,"Name":"itxn_submit","Cost":1,"Size":1,"Doc":"execute the current inner transaction group. Fail if executing this group would exceed the inner transaction limit, or if any transaction in the group fails.","DocExtra":"`itxn_submit` resets the current transaction so that it can not be resubmitted. A new `itxn_begin` is required to prepare another inner transaction.","Groups":["Inner Transactions"]},{"Opcode":180,"Name":"itxn","Returns":".","Cost":1,"Size":2,"ArgEnum":["Sender","Fee","FirstValid","FirstValidTime","LastValid","Note","Lease","Receiver","Amount","CloseRemainderTo","VotePK","SelectionPK","VoteFirst","VoteLast","VoteKeyDilution","Type","TypeEnum","XferAsset","AssetAmount","AssetSender","AssetReceiver","AssetCloseTo","GroupIndex","TxID","ApplicationID","OnCompletion","ApplicationArgs","NumAppArgs","Accounts","NumAccounts","ApprovalProgram","ClearStateProgram","RekeyTo","ConfigAsset","ConfigAssetTotal","ConfigAssetDecimals","ConfigAssetDefaultFrozen","ConfigAssetUnitName","ConfigAssetName","ConfigAssetURL","ConfigAssetMetadataHash","ConfigAssetManager","ConfigAssetReserve","ConfigAssetFreeze","ConfigAssetClawback","FreezeAsset","FreezeAssetAccount","FreezeAssetFrozen","Assets","NumAssets","Applications","NumApplications","GlobalNumUint","GlobalNumByteSlice","LocalNumUint","LocalNumByteSlice","ExtraProgramPages","Nonparticipation","Logs","NumLogs","CreatedAssetID","CreatedApplicationID","LastLog","StateProofPK"],"ArgEnumTypes":"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB","Doc":"field F of the last inner transaction","ImmediateNote":"{uint8 transaction field index}","Groups":["Inner Transactions"]},{"Opcode":181,"Name":"itxna","Returns":".","Cost":1,"Size":3,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ith value of the array field F of the last inner transaction","ImmediateNote":"{uint8 transaction field index} {uint8 transaction field array index}","Groups":["Inner Transactions"]},{"Opcode":182,"Name":"itxn_next","Cost":1,"Size":1,"Doc":"begin preparation of a new inner transaction in the same transaction group","DocExtra":"`itxn_next` initializes the transaction exactly as `itxn_begin` does","Groups":["Inner Transactions"]},{"Opcode":183,"Name":"gitxn","Returns":".","Cost":1,"Size":3,"ArgEnum":["Sender","Fee","FirstValid","FirstValidTime","LastValid","Note","Lease","Receiver","Amount","CloseRemainderTo","VotePK","SelectionPK","VoteFirst","VoteLast","VoteKeyDilution","Type","TypeEnum","XferAsset","AssetAmount","AssetSender","AssetReceiver","AssetCloseTo","GroupIndex","TxID","ApplicationID","OnCompletion","ApplicationArgs","NumAppArgs","Accounts","NumAccounts","ApprovalProgram","ClearStateProgram","RekeyTo","ConfigAsset","ConfigAssetTotal","ConfigAssetDecimals","ConfigAssetDefaultFrozen","ConfigAssetUnitName","ConfigAssetName","ConfigAssetURL","ConfigAssetMetadataHash","ConfigAssetManager","ConfigAssetReserve","ConfigAssetFreeze","ConfigAssetClawback","FreezeAsset","FreezeAssetAccount","FreezeAssetFrozen","Assets","NumAssets","Applications","NumApplications","GlobalNumUint","GlobalNumByteSlice","LocalNumUint","LocalNumByteSlice","ExtraProgramPages","Nonparticipation","Logs","NumLogs","CreatedAssetID","CreatedApplicationID","LastLog","StateProofPK"],"ArgEnumTypes":"BUUUUBBBUBBBUUUBUUUBBBUBUUBUBUBBBUUUUBBBBBBBBUBUUUUUUUUUUUBUUUBB","Doc":"field F of the Tth transaction in the last inner group submitted","ImmediateNote":"{uint8 transaction group index} {uint8 transaction field index}","Groups":["Inner Transactions"]},{"Opcode":184,"Name":"gitxna","Returns":".","Cost":1,"Size":4,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ith value of the array field F from the Tth transaction in the last inner group submitted","ImmediateNote":"{uint8 transaction group index} {uint8 transaction field index} {uint8 transaction field array index}","Groups":["Inner Transactions"]},{"Opcode":192,"Name":"txnas","Args":"U","Returns":".","Cost":1,"Size":2,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ath value of the array field F of the current transaction","ImmediateNote":"{uint8 transaction field index}","Groups":["Loading Values"]},{"Opcode":193,"Name":"gtxnas","Args":"U","Returns":".","Cost":1,"Size":3,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Ath value of the array field F from the Tth transaction in the current group","ImmediateNote":"{uint8 transaction group index} {uint8 transaction field index}","Groups":["Loading Values"]},{"Opcode":194,"Name":"gtxnsas","Args":"UU","Returns":".","Cost":1,"Size":2,"ArgEnum":["ApplicationArgs","Accounts","Assets","Applications","Logs"],"ArgEnumTypes":"BBUUB","Doc":"Bth value of the array field F from the Ath transaction in the current group","ImmediateNote":"{uint8 transaction field index}","Groups":["Loading Values"]},{"Opcode":195,"Name":"args","Args":"U","Returns":"B","Cost":1,"Size":1,"Doc":"Ath LogicSig argument","Groups":["Loading Values"]},{"Opcode":196,"Name":"gloadss","Args":"UU","Returns":".","Cost":1,"Size":1,"Doc":"Bth scratch space value of the Ath transaction in the current group","Groups":["Loading Values"]},{"Opcode":197,"Name":"itxnas","Args":"U","Returns":".","Cost":1,"Size":2,"Doc":"Ath value of the array field F of the last inner transaction","ImmediateNote":"{uint8 transaction field index}","Groups":["Inner Transactions"]},{"Opcode":198,"Name":"gitxnas","Args":"U","Returns":".","Cost":1,"Size":3,"Doc":"Ath value of the array field F from the Tth transaction in the last inner group submitted","ImmediateNote":"{uint8 transaction group index} {uint8 transaction field index}","Groups":["Inner Transactions"]}]}')},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i=n(13),a=r(i),o=r(n(25)),s=n(33),u=n(49);function c(){var e="undefined"!=typeof navigator?navigator.userAgent||navigator.vendor:"";return[/Android/i,/iPhone/i,/iPad/i].some((function(t){return e.match(t)}))}var l=a.forwardRef((function(e,t){var n,r=e.testid,l=e.value,d=e.type,f=void 0===d?"text":d,h=e.isDisabled,p=e.hasError,m=e.customClassName,g=e.leftIcon,v=e.rightIcon,y=e.localizationOptions,b=void 0===y?{}:y,w=e.role,_=e.autoComplete,x=void 0===_?"off":_,A=e.autoCorrect,k=void 0===A?"off":A,S=e.onChange,E=s.__rest(e,["testid","value","type","isDisabled","hasError","customClassName","leftIcon","rightIcon","localizationOptions","role","autoComplete","autoCorrect","onChange"]),O=function(e){return c()?{shouldFormatToLocaleString:!1,locale:void 0,maximumFractionDigits:e.maximumFractionDigits}:e}(b),C=O.shouldFormatToLocaleString,T=void 0!==C&&C,M=O.locale,j=O.maximumFractionDigits,R=void 0===j?0:j,I=s.__read(i.useState((function(){return s.__assign(s.__assign({},u.getNumberSeparators(M)),u.getNegativeZero(M))})),2),P=I[0],L=P.DECIMAL_NUMBER_SEPARATOR,D=P.MINUS_SIGN,B=P.LOCALE_NEGATIVE_ZERO,N=I[1],F="number"===f,U=o("input-container",m,"input-container--type-"+f,{"input-container--is-disabled":h,"input-container--has-error":p}),z=l;if(!("number"==typeof R&&Number.isInteger(R)&&R>=0))throw new Error("maximumFractionDigits should be zero or a positive integer.");if(F&&"string"==typeof l&&T){var q=s.__read(String(l).split("."),2),H=q[0],V=q[1],W=u.formatNumber({maximumFractionDigits:R,locale:M});(null===(n=l.match(/\.$/))||void 0===n?void 0:n.length)||V?z=""+W(parseInt(H))+L+u.mapDigitsToLocalVersion({locale:M},V):H&&(z=H!==D&&H!==B?W(parseInt(H)):""+D+u.mapDigitsToLocalVersion({locale:M},H))}return i.useEffect((function(){N(s.__assign(s.__assign({},u.getNumberSeparators(M)),u.getNegativeZero(M)))}),[M]),a.createElement("div",{role:w,className:U,"data-testid":r},g&&a.createElement("span",{className:"input-container__icon input-container__left-icon"},g),a.createElement("input",s.__assign({ref:t,className:"input",type:F?"text":f,autoComplete:x,value:z,autoCorrect:k,disabled:h,onChange:function(e){var t,n;if(F){var r=e.currentTarget.value;if(r){var i=u.parseNumber((n={locale:M,maximumFractionDigits:R},c()?s.__assign(s.__assign({},n),{locale:"en-US"}):n),r),a=""===i||"-"!==r&&Number.isNaN(Number(i)),o=i?String(i):"";if(!a&&(null===(t=i.match(/./))||void 0===t?void 0:t.length)?o=String(i):a&&(o=l),!a&&(T||R>0||o.includes("-"))&&(o=u.removeLeadingZeros(M,o)),0===R&&"-0"===o&&(o="0"),T){var d=u.getThousandthSeparatorCount(o),f=u.getThousandthSeparatorCount(l),h=e.currentTarget,p=e.currentTarget.selectionStart||0;!o||String(l).length!==o.length+1&&String(l).length!==o.length-1||(f===d+1?p-=1:f===d-1&&(p+=1),window.requestAnimationFrame((function(){h.selectionStart=p,h.selectionEnd=p})))}e.currentTarget.value=o}}S(e)}},E)),v&&a.createElement("span",{className:"input-container__icon input-container__right-icon"},v))}));e.exports=l},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){"use strict";var r;n.r(t),n.d(t,"v1",(function(){return m})),n.d(t,"v3",(function(){return S})),n.d(t,"v4",(function(){return E})),n.d(t,"v5",(function(){return T})),n.d(t,"NIL",(function(){return M})),n.d(t,"version",(function(){return j})),n.d(t,"validate",(function(){return s})),n.d(t,"stringify",(function(){return f})),n.d(t,"parse",(function(){return g}));var i=new Uint8Array(16);function a(){if(!r&&!(r="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!==typeof msCrypto&&"function"===typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}var o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var s=function(e){return"string"===typeof e&&o.test(e)},u=[],c=0;c<256;++c)u.push((c+256).toString(16).substr(1));var l,d,f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(u[e[t+0]]+u[e[t+1]]+u[e[t+2]]+u[e[t+3]]+"-"+u[e[t+4]]+u[e[t+5]]+"-"+u[e[t+6]]+u[e[t+7]]+"-"+u[e[t+8]]+u[e[t+9]]+"-"+u[e[t+10]]+u[e[t+11]]+u[e[t+12]]+u[e[t+13]]+u[e[t+14]]+u[e[t+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n},h=0,p=0;var m=function(e,t,n){var r=t&&n||0,i=t||new Array(16),o=(e=e||{}).node||l,s=void 0!==e.clockseq?e.clockseq:d;if(null==o||null==s){var u=e.random||(e.rng||a)();null==o&&(o=l=[1|u[0],u[1],u[2],u[3],u[4],u[5]]),null==s&&(s=d=16383&(u[6]<<8|u[7]))}var c=void 0!==e.msecs?e.msecs:Date.now(),m=void 0!==e.nsecs?e.nsecs:p+1,g=c-h+(m-p)/1e4;if(g<0&&void 0===e.clockseq&&(s=s+1&16383),(g<0||c>h)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");h=c,p=m,d=s;var v=(1e4*(268435455&(c+=122192928e5))+m)%4294967296;i[r++]=v>>>24&255,i[r++]=v>>>16&255,i[r++]=v>>>8&255,i[r++]=255&v;var y=c/4294967296*1e4&268435455;i[r++]=y>>>8&255,i[r++]=255&y,i[r++]=y>>>24&15|16,i[r++]=y>>>16&255,i[r++]=s>>>8|128,i[r++]=255&s;for(var b=0;b<6;++b)i[r+b]=o[b];return t||f(i)};var g=function(e){if(!s(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n};var v=function(e,t,n){function r(e,r,i,a){if("string"===typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n>>9<<4)+1}function b(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function w(e,t,n,r,i,a){return b((o=b(b(t,e),b(r,a)))<<(s=i)|o>>>32-s,n);var o,s}function _(e,t,n,r,i,a,o){return w(t&n|~t&r,e,t,i,a,o)}function x(e,t,n,r,i,a,o){return w(t&r|n&~r,e,t,i,a,o)}function A(e,t,n,r,i,a,o){return w(t^n^r,e,t,i,a,o)}function k(e,t,n,r,i,a,o){return w(n^(t|~r),e,t,i,a,o)}var S=v("v3",48,(function(e){if("string"===typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n>5]>>>i%32&255,o=parseInt(r.charAt(a>>>4&15)+r.charAt(15&a),16);t.push(o)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[r/8])<>>32-t}var T=v("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"===typeof e){var r=unescape(encodeURIComponent(e));e=[];for(var i=0;i>>0;b=y,y=v,v=C(g,30)>>>0,g=m,m=x}n[0]=n[0]+m>>>0,n[1]=n[1]+g>>>0,n[2]=n[2]+v>>>0,n[3]=n[3]+y>>>0,n[4]=n[4]+b>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]})),M="00000000-0000-0000-0000-000000000000";var j=function(e){if(!s(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"MULTISIG_BAD_SENDER_ERROR_MSG",(function(){return D})),n.d(t,"signTransaction",(function(){return B})),n.d(t,"signBid",(function(){return N})),n.d(t,"signBytes",(function(){return F})),n.d(t,"verifyBytes",(function(){return U})),n.d(t,"encodeObj",(function(){return z})),n.d(t,"decodeObj",(function(){return q})),n.d(t,"ERROR_MULTISIG_BAD_SENDER",(function(){return H})),n.d(t,"ERROR_INVALID_MICROALGOS",(function(){return V})),n.d(t,"LogicTemplates",(function(){return W}));var r=n(17),i=n(9),a=n(20),o=n(22),s=n(167),u=n.n(s),c=n(168),l=n(58),d=n(24),f=n(143);for(var h in f)["default","MULTISIG_BAD_SENDER_ERROR_MSG","signTransaction","signBid","signBytes","verifyBytes","encodeObj","decodeObj","ERROR_MULTISIG_BAD_SENDER","ERROR_INVALID_MICROALGOS","Algodv2","Kmd","IntDecoding","Indexer","waitForConfirmation","isValidAddress","encodeAddress","decodeAddress","getApplicationAddress","bytesToBigInt","bigIntToBytes","encodeUint64","decodeUint64","generateAccount","modelsv2","indexerModels","mnemonicToMasterDerivationKey","masterDerivationKeyToMnemonic","secretKeyToMnemonic","mnemonicToSecretKey","seedFromMnemonic","mnemonicFromSeed","microalgosToAlgos","algosToMicroalgos","INVALID_MICROALGOS_ERROR_MSG","computeGroupID","assignGroupID","LogicSigAccount","makeLogicSig","signLogicSigTransaction","signLogicSigTransactionObject","logicSigFromByte","tealSign","tealSignFromProgram","signMultisigTransaction","mergeMultisigTransactions","appendSignMultisigTransaction","createMultisigTransaction","appendSignRawMultisigSignature","verifyMultisig","multisigAddress","SourceMap","LogicTemplates"].indexOf(h)<0&&function(e){n.d(t,e,(function(){return f[e]}))}(h);var p=n(152);n.d(t,"Algodv2",(function(){return p.a}));var m=n(144);n.d(t,"Kmd",(function(){return m.a}));var g=n(47);n.d(t,"IntDecoding",(function(){return g.a}));var v=n(153);n.d(t,"Indexer",(function(){return v.a}));var y=n(85);n.d(t,"waitForConfirmation",(function(){return y.a})),n.d(t,"isValidAddress",(function(){return i.isValidAddress})),n.d(t,"encodeAddress",(function(){return i.encodeAddress})),n.d(t,"decodeAddress",(function(){return i.decodeAddress})),n.d(t,"getApplicationAddress",(function(){return i.getApplicationAddress}));var b=n(38);n.d(t,"bytesToBigInt",(function(){return b.b})),n.d(t,"bigIntToBytes",(function(){return b.a}));var w=n(73);n.d(t,"encodeUint64",(function(){return w.b})),n.d(t,"decodeUint64",(function(){return w.a}));var _=n(145);n.d(t,"generateAccount",(function(){return _.a}));var x=n(37);n.d(t,"modelsv2",(function(){return x}));var A=n(59);n.d(t,"indexerModels",(function(){return A}));var k=n(53);n.d(t,"mnemonicToMasterDerivationKey",(function(){return k.c})),n.d(t,"masterDerivationKeyToMnemonic",(function(){return k.a})),n.d(t,"secretKeyToMnemonic",(function(){return k.e})),n.d(t,"mnemonicToSecretKey",(function(){return k.d})),n.d(t,"seedFromMnemonic",(function(){return k.f})),n.d(t,"mnemonicFromSeed",(function(){return k.b})),n.d(t,"microalgosToAlgos",(function(){return l.c})),n.d(t,"algosToMicroalgos",(function(){return l.b})),n.d(t,"INVALID_MICROALGOS_ERROR_MSG",(function(){return l.a}));var S=n(46);n.d(t,"computeGroupID",(function(){return S.computeGroupID})),n.d(t,"assignGroupID",(function(){return S.assignGroupID}));var E=n(32);n.d(t,"LogicSigAccount",(function(){return E.LogicSigAccount})),n.d(t,"makeLogicSig",(function(){return E.makeLogicSig})),n.d(t,"signLogicSigTransaction",(function(){return E.signLogicSigTransaction})),n.d(t,"signLogicSigTransactionObject",(function(){return E.signLogicSigTransactionObject})),n.d(t,"logicSigFromByte",(function(){return E.logicSigFromByte})),n.d(t,"tealSign",(function(){return E.tealSign})),n.d(t,"tealSignFromProgram",(function(){return E.tealSignFromProgram}));var O=n(36);n.d(t,"signMultisigTransaction",(function(){return O.f})),n.d(t,"mergeMultisigTransactions",(function(){return O.d})),n.d(t,"appendSignMultisigTransaction",(function(){return O.a})),n.d(t,"createMultisigTransaction",(function(){return O.c})),n.d(t,"appendSignRawMultisigSignature",(function(){return O.b})),n.d(t,"verifyMultisig",(function(){return O.g})),n.d(t,"multisigAddress",(function(){return O.e}));var C=n(157);n.d(t,"SourceMap",(function(){return C.a}));var T=n(146);n.d(t,"createDryrun",(function(){return T.b})),n.d(t,"DryrunResult",(function(){return T.a}));var M=n(54);n.d(t,"makePaymentTxnWithSuggestedParams",(function(){return M.makePaymentTxnWithSuggestedParams})),n.d(t,"makePaymentTxn",(function(){return M.makePaymentTxn})),n.d(t,"makePaymentTxnWithSuggestedParamsFromObject",(function(){return M.makePaymentTxnWithSuggestedParamsFromObject})),n.d(t,"makeKeyRegistrationTxnWithSuggestedParams",(function(){return M.makeKeyRegistrationTxnWithSuggestedParams})),n.d(t,"makeKeyRegistrationTxn",(function(){return M.makeKeyRegistrationTxn})),n.d(t,"makeKeyRegistrationTxnWithSuggestedParamsFromObject",(function(){return M.makeKeyRegistrationTxnWithSuggestedParamsFromObject})),n.d(t,"makeAssetCreateTxnWithSuggestedParams",(function(){return M.makeAssetCreateTxnWithSuggestedParams})),n.d(t,"makeAssetCreateTxn",(function(){return M.makeAssetCreateTxn})),n.d(t,"makeAssetCreateTxnWithSuggestedParamsFromObject",(function(){return M.makeAssetCreateTxnWithSuggestedParamsFromObject})),n.d(t,"makeAssetConfigTxnWithSuggestedParams",(function(){return M.makeAssetConfigTxnWithSuggestedParams})),n.d(t,"makeAssetConfigTxn",(function(){return M.makeAssetConfigTxn})),n.d(t,"makeAssetConfigTxnWithSuggestedParamsFromObject",(function(){return M.makeAssetConfigTxnWithSuggestedParamsFromObject})),n.d(t,"makeAssetDestroyTxnWithSuggestedParams",(function(){return M.makeAssetDestroyTxnWithSuggestedParams})),n.d(t,"makeAssetDestroyTxn",(function(){return M.makeAssetDestroyTxn})),n.d(t,"makeAssetDestroyTxnWithSuggestedParamsFromObject",(function(){return M.makeAssetDestroyTxnWithSuggestedParamsFromObject})),n.d(t,"makeAssetFreezeTxnWithSuggestedParams",(function(){return M.makeAssetFreezeTxnWithSuggestedParams})),n.d(t,"makeAssetFreezeTxn",(function(){return M.makeAssetFreezeTxn})),n.d(t,"makeAssetFreezeTxnWithSuggestedParamsFromObject",(function(){return M.makeAssetFreezeTxnWithSuggestedParamsFromObject})),n.d(t,"makeAssetTransferTxnWithSuggestedParams",(function(){return M.makeAssetTransferTxnWithSuggestedParams})),n.d(t,"makeAssetTransferTxn",(function(){return M.makeAssetTransferTxn})),n.d(t,"makeAssetTransferTxnWithSuggestedParamsFromObject",(function(){return M.makeAssetTransferTxnWithSuggestedParamsFromObject})),n.d(t,"makeApplicationCreateTxn",(function(){return M.makeApplicationCreateTxn})),n.d(t,"makeApplicationCreateTxnFromObject",(function(){return M.makeApplicationCreateTxnFromObject})),n.d(t,"makeApplicationUpdateTxn",(function(){return M.makeApplicationUpdateTxn})),n.d(t,"makeApplicationUpdateTxnFromObject",(function(){return M.makeApplicationUpdateTxnFromObject})),n.d(t,"makeApplicationDeleteTxn",(function(){return M.makeApplicationDeleteTxn})),n.d(t,"makeApplicationDeleteTxnFromObject",(function(){return M.makeApplicationDeleteTxnFromObject})),n.d(t,"makeApplicationOptInTxn",(function(){return M.makeApplicationOptInTxn})),n.d(t,"makeApplicationOptInTxnFromObject",(function(){return M.makeApplicationOptInTxnFromObject})),n.d(t,"makeApplicationCloseOutTxn",(function(){return M.makeApplicationCloseOutTxn})),n.d(t,"makeApplicationCloseOutTxnFromObject",(function(){return M.makeApplicationCloseOutTxnFromObject})),n.d(t,"makeApplicationClearStateTxn",(function(){return M.makeApplicationClearStateTxn})),n.d(t,"makeApplicationClearStateTxnFromObject",(function(){return M.makeApplicationClearStateTxnFromObject})),n.d(t,"makeApplicationNoOpTxn",(function(){return M.makeApplicationNoOpTxn})),n.d(t,"makeApplicationNoOpTxnFromObject",(function(){return M.makeApplicationNoOpTxnFromObject})),n.d(t,"OnApplicationComplete",(function(){return M.OnApplicationComplete})),n.d(t,"makeApplicationCallTxnFromObject",(function(){return M.makeApplicationCallTxnFromObject})),n.d(t,"ALGORAND_MIN_TX_FEE",(function(){return o.ALGORAND_MIN_TX_FEE})),n.d(t,"Transaction",(function(){return o.Transaction})),n.d(t,"encodeUnsignedTransaction",(function(){return o.encodeUnsignedTransaction})),n.d(t,"decodeUnsignedTransaction",(function(){return o.decodeUnsignedTransaction})),n.d(t,"decodeSignedTransaction",(function(){return o.decodeSignedTransaction})),n.d(t,"instantiateTxnIfNeeded",(function(){return o.instantiateTxnIfNeeded}));var j=n(75);n.d(t,"makeBasicAccountTransactionSigner",(function(){return j.b})),n.d(t,"makeLogicSigAccountTransactionSigner",(function(){return j.c})),n.d(t,"makeMultiSigAccountTransactionSigner",(function(){return j.d})),n.d(t,"isTransactionWithSigner",(function(){return j.a}));var R=n(147);n.d(t,"AtomicTransactionComposerStatus",(function(){return R.b})),n.d(t,"AtomicTransactionComposer",(function(){return R.a}));var I=n(156);n.d(t,"TransactionType",(function(){return I.a}));var P=n(34);n.d(t,"MAX_LEN",(function(){return P.r})),n.d(t,"ADDR_BYTE_SIZE",(function(){return P.p})),n.d(t,"SINGLE_BYTE_SIZE",(function(){return P.t})),n.d(t,"SINGLE_BOOL_SIZE",(function(){return P.s})),n.d(t,"LENGTH_ENCODE_BYTE_SIZE",(function(){return P.q})),n.d(t,"ABIType",(function(){return P.m})),n.d(t,"ABIUintType",(function(){return P.o})),n.d(t,"ABIUfixedType",(function(){return P.n})),n.d(t,"ABIAddressType",(function(){return P.a})),n.d(t,"ABIBoolType",(function(){return P.d})),n.d(t,"ABIByteType",(function(){return P.e})),n.d(t,"ABIStringType",(function(){return P.j})),n.d(t,"ABIArrayStaticType",(function(){return P.c})),n.d(t,"ABIArrayDynamicType",(function(){return P.b})),n.d(t,"ABITupleType",(function(){return P.l})),n.d(t,"ABIContract",(function(){return P.f})),n.d(t,"ABIInterface",(function(){return P.g})),n.d(t,"ABIMethod",(function(){return P.h})),n.d(t,"getMethodByName",(function(){return P.x})),n.d(t,"ABITransactionType",(function(){return P.k})),n.d(t,"abiTypeIsTransaction",(function(){return P.w})),n.d(t,"abiCheckTransactionType",(function(){return P.u})),n.d(t,"ABIReferenceType",(function(){return P.i})),n.d(t,"abiTypeIsReference",(function(){return P.v}));var L=e.from([77,88]),D="The transaction sender address and multisig preimage do not match.";function B(e,t){if("undefined"===typeof e.from){var n=r.keyPairFromSecretKey(t);e.from=i.encodeAddress(n.publicKey)}var a=o.instantiateTxnIfNeeded(e);return{txID:a.txID().toString(),blob:a.signTxn(t)}}function N(e,t){return new c.a(e).signBid(t)}function F(t,n){var i=e.from(d.concatArrays(L,t));return r.sign(i,n)}function U(t,n,a){var o=e.from(d.concatArrays(L,t)),s=i.decodeAddress(a).publicKey;return r.verify(o,n,s)}function z(e){return new Uint8Array(a.encode(e))}function q(e){return a.decode(e)}var H=new Error(D),V=new Error(l.a),W=u.a}.call(this,n(19).Buffer)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),i=n(6);function a(e,t,n){return o.apply(this,arguments)}function o(){return(o=Object(i.a)(Object(r.a)().mark((function e(t,n,i){var a,o,s,u,c;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.status().do();case 2:if("undefined"!==typeof(a=e.sent)){e.next=5;break}throw new Error("Unable to get node status");case 5:o=a["last-round"]+1,s=o;case 7:if(!(s=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(87),i=n(62);function a(e,t){if(t&&("object"===Object(r.a)(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Object(i.a)(e)}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"default",(function(){return h}));var r=n(0),i=n(8),a=n(6),o=n(2),s=n(1),u=n(24),c=n(169);function l(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(e[t]&&0!==e[t].length||delete e[t]);return e}function d(e){return Object.keys(e).reduce((function(t,n){return t[n.toLowerCase()]=e[n],t}),{})}function f(e){return void 0!==e&&Object.prototype.hasOwnProperty.call(e,"format")&&"msgpack"===e.format?"application/msgpack":"application/json"}var h=function(){function t(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Object(o.a)(this,t),this.bc=void 0!==n?new c.a(e,n,r,i):e}return Object(s.a)(t,[{key:"get",value:function(){var e=Object(a.a)(Object(r.a)().mark((function e(n,a){var o,s,u,c,d,h,p=arguments;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=p.length>2&&void 0!==p[2]?p[2]:{},s=p.length>3&&void 0!==p[3]?p[3]:{},u=!(p.length>4&&void 0!==p[4])||p[4],c=f(a),d=Object(i.a)(Object(i.a)({},o),{},{accept:c}),e.prev=5,e.next=8,this.bc.get(n,l(a),d);case 8:return h=e.sent,e.abrupt("return",t.prepareResponse(h,c,u,s));case 12:throw e.prev=12,e.t0=e.catch(5),t.prepareResponseError(e.t0);case 15:case"end":return e.stop()}}),e,this,[[5,12]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"post",value:function(){var e=Object(a.a)(Object(r.a)().mark((function e(n,a){var o,s,u,c,l,f=arguments;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=f.length>2&&void 0!==f[2]?f[2]:{},s=f.length>3?f[3]:void 0,u=!(f.length>4&&void 0!==f[4])||f[4],c=Object(i.a)({"content-type":"application/json"},d(o)),e.prev=4,e.next=7,this.bc.post(n,t.serializeData(a,c),s,c);case 7:return l=e.sent,e.abrupt("return",t.prepareResponse(l,"application/json",u));case 11:throw e.prev=11,e.t0=e.catch(4),t.prepareResponseError(e.t0);case 14:case"end":return e.stop()}}),e,this,[[4,11]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"delete",value:function(){var e=Object(a.a)(Object(r.a)().mark((function e(n,a){var o,s,u,c,l=arguments;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=l.length>2&&void 0!==l[2]?l[2]:{},s=!(l.length>3&&void 0!==l[3])||l[3],u=Object(i.a)({"content-type":"application/json"},d(o)),e.next=5,this.bc.delete(n,t.serializeData(a,u),void 0,u);case 5:return c=e.sent,e.abrupt("return",t.prepareResponse(c,"application/json",s));case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}],[{key:"parseJSON",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{return 0===Object.keys(n).length?e&&JSON.parse(e):e&&u.parseJSON(e,n)}catch(i){var r=i;throw r.rawResponse=e||null,r.statusCode=t,r}}},{key:"serializeData",value:function(t,n){if(!t)return new Uint8Array(0);if("application/json"===n["content-type"])return new Uint8Array(e.from(JSON.stringify(t)));if("string"===typeof t)return new Uint8Array(e.from(t));if(t instanceof Uint8Array)return t;throw new Error("provided data is neither a string nor a Uint8Array and content-type is not application/json")}},{key:"prepareResponse",value:function(n,r,a){var o,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},u=n.body;return"application/msgpack"!==r&&(o=u&&e.from(u).toString()||""),a&&"application/json"===r&&(u=t.parseJSON(o,n.status,s)),Object(i.a)(Object(i.a)({},n),{},{body:u,text:o,ok:2===Math.trunc(n.status/100)})}},{key:"prepareResponseError",value:function(e){return e.response&&(e.response=t.prepareResponse(e.response,"application/json",!0),e.status=e.response.status),e}}]),t}()}.call(this,n(19).Buffer)},function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return d}));var r=n(0),i=n(6),a=n(2),o=n(1),s=n(4),u=n(5),c=n(8);function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e;return Object.keys(t).every((function(e){return"content-type"!==e.toLowerCase()}))&&((t=Object(c.a)({},e))["Content-Type"]="text/plain"),t}var d=function(t){Object(s.a)(c,t);var n=Object(u.a)(c);function c(e,t){var r;return Object(a.a)(this,c),(r=n.call(this,e)).source=t,r.source=t,r}return Object(o.a)(c,[{key:"path",value:function(){return"/v2/teal/compile"}},{key:"sourcemap",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.query.sourcemap=e,this}},{key:"do",value:function(){var t=Object(i.a)(Object(r.a)().mark((function t(){var n,i,a,o=arguments;return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=o.length>0&&void 0!==o[0]?o[0]:{},i=l(n),t.next=4,this.c.post(this.path(),e.from(this.source),i,this.query);case 4:return a=t.sent,t.abrupt("return",a.body);case 6:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()}]),c}(n(14).a)}).call(this,n(19).Buffer)},,function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return s}));var r=n(2),i=n(1),a=n(3),o=n(56),s=function(){function t(e,n){Object(r.a)(this,t),this.client=e,this.indexer=n}return Object(i.a)(t,[{key:"convertToIntArray",value:function(t){return new Uint8Array(e.from(t))}},{key:"convertToString",value:function(e){return new TextDecoder("utf-8").decode(e)}},{key:"convertToArrayBuffer",value:function(t){var n=[];return n.push([e.from(t)]),n}},{key:"encodeUint",value:function(e){return a.default.encodeUint64(e)}},{key:"encodeString",value:function(t){return new Uint8Array(e.from(t,"utf-8"))}},{key:"base32EncodeArrayBuffer",value:function(t){return o.encode(e.from(t,"base64"))}},{key:"decodeNote",value:function(t){return e.from(t,"base64").toString("utf-8")}},{key:"createNoopTransactions",value:function(e,t,n,r,i,o){for(var s=[],u=0;u-1};function c(e){if("string"!==typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!==typeof e&&(e=String(e)),e}function d(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function f(e){this.map={},e instanceof f?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function p(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function m(e){var t=new FileReader,n=p(t);return t.readAsArrayBuffer(e),n}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"===typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&i&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"===typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=h(this);if(e)return e;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(m)}),this.text=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=p(t);return t.readAsText(e),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function w(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function _(e){var t=new f;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t}function x(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},v.call(b.prototype),v.call(x.prototype),x.prototype.clone=function(){return new x(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},x.error=function(){var e=new x(null,{status:0,statusText:""});return e.type="error",e};var A=[301,302,303,307,308];x.redirect=function(e,t){if(-1===A.indexOf(t))throw new RangeError("Invalid status code");return new x(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(S){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function k(e,n){return new Promise((function(r,a){var o=new b(e,n);if(o.signal&&o.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function u(){s.abort()}s.onload=function(){var e={status:s.status,statusText:s.statusText,headers:_(s.getAllResponseHeaders()||"")};e.url="responseURL"in s?s.responseURL:e.headers.get("X-Request-URL");var t="response"in s?s.response:s.responseText;r(new x(t,e))},s.onerror=function(){a(new TypeError("Network request failed"))},s.ontimeout=function(){a(new TypeError("Network request failed"))},s.onabort=function(){a(new t.DOMException("Aborted","AbortError"))},s.open(o.method,o.url,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),o.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",u),s.onreadystatechange=function(){4===s.readyState&&o.signal.removeEventListener("abort",u)}),s.send("undefined"===typeof o._bodyInit?null:o._bodyInit)}))}k.polyfill=!0,e.fetch||(e.fetch=k,e.Headers=f,e.Request=b,e.Response=x),t.Headers=f,t.Request=b,t.Response=x,t.fetch=k,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(242),a=(r=i)&&r.__esModule?r:{default:r};t.default=a.default,e.exports=t.default},function(e,t,n){var r=n(193);e.exports=function(e,t){if(null==e)return{};var n,i,a=r(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r=n(33),i=n(49);t.filterOutItemsByKey=function(e,t,n){var r=n.map((function(e){return e[t]}));return e.reduce((function(e,n){return r.includes(n[t])||e.push(n),e}),[])},t.limitArrayLengthFromTheEnd=function(e,t){var n=t;return i.isNonNegativeNumber(e)&&t.length>e&&(n=t.slice(t.length-e)),n},t.updateAtIndex=function(e,t,n){var i=r.__spread(e);return i.splice(t,1,n),i}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t,r)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(132);e.exports=function(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),a=e.getVersionPrecision(n),o=Math.max(i,a),s=0,u=e.map([t,n],(function(t){var n=o-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(r&&(s=o-Math.min(i,a)),o-=1;o>=s;){if(u[0][o]>u[1][o])return 1;if(u[0][o]===u[1][o]){if(o===s)return 0;o-=1}else if(u[0][o]1?i-1:0),o=1;o0){var o=Object.keys(n),u=s.default.find(o,(function(e){return t.isOS(e)}));if(u){var c=this.satisfies(n[u]);if(void 0!==c)return c}var l=s.default.find(o,(function(e){return t.isPlatform(e)}));if(l){var d=this.satisfies(n[l]);if(void 0!==d)return d}}if(a>0){var f=Object.keys(i),h=s.default.find(f,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(i[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=s.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(s.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=c,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(a,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(a,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=o,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=n(18),o=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:a.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:a.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:a.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:a.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:a.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:a.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:a.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:a.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:a.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:a.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:a.OS_MAP.PlayStation4,version:t}}}];t.default=o,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:a.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:a.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}}];t.default=o,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},a=n(18),o=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:a.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:a.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:a.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:a.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:a.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:a.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:a.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=o,e.exports=t.default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var r,i=n(249);var a=((r=i)&&r.__esModule?r:{default:r}).default,o=a.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=a.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=a.canUseDOM?window.NodeList:{},t.canUseDOM=a.canUseDOM;t.default=o},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"generateKey",(function(){return E})),n.d(r,"verifyHmac",(function(){return C})),n.d(r,"encrypt",(function(){return M})),n.d(r,"decrypt",(function(){return R}));var i=n(1),a=n(2),o=n(4),s=n(5),u=n(0),c=n(6),l=n(27),d=n(16),f=n(162),h="Session currently connected",p="Session currently disconnected",m="JSON RPC response format is invalid",g="User close QRCode Modal",v=function(){function e(){Object(a.a)(this,e),this._eventEmitters=[]}return Object(i.a)(e,[{key:"subscribe",value:function(e){this._eventEmitters.push(e)}},{key:"unsubscribe",value:function(e){this._eventEmitters=this._eventEmitters.filter((function(t){return t.event!==e}))}},{key:"trigger",value:function(e){var t,n=[];(t=Object(d.o)(e)?e.method:Object(d.q)(e)||Object(d.p)(e)?"response:".concat(e.id):Object(d.n)(e)?e.event:"")&&(n=this._eventEmitters.filter((function(e){return e.event===t}))),n&&n.length||Object(d.s)(t)||Object(d.n)(t)||(n=this._eventEmitters.filter((function(e){return"call_request"===e.event}))),n.forEach((function(t){if(Object(d.p)(e)){var n=new Error(e.error.message);t.callback(n,null)}else t.callback(null,e)}))}}]),e}(),y=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"walletconnect";Object(a.a)(this,e),this.storageId=t}return Object(i.a)(e,[{key:"getSession",value:function(){var e=null,t=Object(d.j)(this.storageId);return t&&Object(d.u)(t)&&(e=t),e}},{key:"setSession",value:function(e){return Object(d.B)(this.storageId,e),e}},{key:"removeSession",value:function(){Object(d.A)(this.storageId)}}]),e}(),b=y,w="abcdefghijklmnopqrstuvwxyz0123456789".split("").map((function(e){return"https://".concat(e,".bridge.walletconnect.org")}));function _(){return w[Math.floor(Math.random()*w.length)]}var x=function(){function e(t){if(Object(a.a)(this,e),this.protocol="wc",this.version=1,this._bridge="",this._key=null,this._clientId="",this._clientMeta=null,this._peerId="",this._peerMeta=null,this._handshakeId=0,this._handshakeTopic="",this._connected=!1,this._accounts=[],this._chainId=0,this._networkId=0,this._rpcUrl="",this._eventManager=new v,this._clientMeta=Object(d.i)()||t.connectorOpts.clientMeta||null,this._cryptoLib=t.cryptoLib,this._sessionStorage=t.sessionStorage||new b(t.connectorOpts.storageId),this._qrcodeModal=t.connectorOpts.qrcodeModal,this._qrcodeModalOptions=t.connectorOpts.qrcodeModalOptions,this._signingMethods=[].concat(Object(l.a)(d.C),Object(l.a)(t.connectorOpts.signingMethods||[])),!t.connectorOpts.bridge&&!t.connectorOpts.uri&&!t.connectorOpts.session)throw new Error("Missing one of the required parameters: bridge / uri / session");var n;t.connectorOpts.bridge&&(this.bridge=function(e){return"walletconnect.org"===function(e){return function(e){var t=e.indexOf("//")>-1?e.split("/")[2]:e.split("/")[0];return(t=t.split(":")[0]).split("?")[0]}(e).split(".").slice(-2).join(".")}(e)}(n=t.connectorOpts.bridge)?_():n),t.connectorOpts.uri&&(this.uri=t.connectorOpts.uri);var r=t.connectorOpts.session||this._getStorageSession();r&&(this.session=r),this.handshakeId&&this._subscribeToSessionResponse(this.handshakeId,"Session request rejected"),this._transport=t.transport||new f.a({protocol:this.protocol,version:this.version,url:this.bridge,subscriptions:[this.clientId]}),this._subscribeToInternalEvents(),this._initTransport(),t.connectorOpts.uri&&this._subscribeToSessionRequest(),t.pushServerOpts&&this._registerPushServer(t.pushServerOpts)}return Object(i.a)(e,[{key:"bridge",get:function(){return this._bridge},set:function(e){e&&(this._bridge=e)}},{key:"key",get:function(){return this._key?Object(d.c)(this._key,!0):""},set:function(e){if(e){var t=Object(d.e)(e);this._key=t}}},{key:"clientId",get:function(){var e=this._clientId;return e||(e=this._clientId=Object(d.D)()),this._clientId},set:function(e){e&&(this._clientId=e)}},{key:"peerId",get:function(){return this._peerId},set:function(e){e&&(this._peerId=e)}},{key:"clientMeta",get:function(){var e=this._clientMeta;return e||(e=this._clientMeta=Object(d.i)()),e},set:function(e){}},{key:"peerMeta",get:function(){return this._peerMeta},set:function(e){this._peerMeta=e}},{key:"handshakeTopic",get:function(){return this._handshakeTopic},set:function(e){e&&(this._handshakeTopic=e)}},{key:"handshakeId",get:function(){return this._handshakeId},set:function(e){e&&(this._handshakeId=e)}},{key:"uri",get:function(){return this._formatUri()},set:function(e){if(e){var t=this._parseUri(e),n=t.handshakeTopic,r=t.bridge,i=t.key;this.handshakeTopic=n,this.bridge=r,this.key=i}}},{key:"chainId",get:function(){return this._chainId},set:function(e){this._chainId=e}},{key:"networkId",get:function(){return this._networkId},set:function(e){this._networkId=e}},{key:"accounts",get:function(){return this._accounts},set:function(e){this._accounts=e}},{key:"rpcUrl",get:function(){return this._rpcUrl},set:function(e){this._rpcUrl=e}},{key:"connected",get:function(){return this._connected},set:function(e){}},{key:"pending",get:function(){return!!this._handshakeTopic},set:function(e){}},{key:"session",get:function(){return{connected:this.connected,accounts:this.accounts,chainId:this.chainId,bridge:this.bridge,key:this.key,clientId:this.clientId,clientMeta:this.clientMeta,peerId:this.peerId,peerMeta:this.peerMeta,handshakeId:this.handshakeId,handshakeTopic:this.handshakeTopic}},set:function(e){e&&(this._connected=e.connected,this.accounts=e.accounts,this.chainId=e.chainId,this.bridge=e.bridge,this.key=e.key,this.clientId=e.clientId,this.clientMeta=e.clientMeta,this.peerId=e.peerId,this.peerMeta=e.peerMeta,this.handshakeId=e.handshakeId,this.handshakeTopic=e.handshakeTopic)}},{key:"on",value:function(e,t){var n={event:e,callback:t};this._eventManager.subscribe(n)}},{key:"off",value:function(e){this._eventManager.unsubscribe(e)}},{key:"createInstantRequest",value:function(){var e=Object(c.a)(Object(u.a)().mark((function e(t){var n,r,i,a=this;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._generateKey();case 2:return this._key=e.sent,n=this._formatRequest({method:"wc_instantRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,request:this._formatRequest(t)}]}),this.handshakeId=n.id,this.handshakeTopic=Object(d.D)(),this._eventManager.trigger({event:"display_uri",params:[this.uri]}),this.on("modal_closed",(function(){throw new Error(g)})),r=function(){a.killSession()},e.prev=9,e.next=12,this._sendCallRequest(n);case 12:return(i=e.sent)&&r(),e.abrupt("return",i);case 17:throw e.prev=17,e.t0=e.catch(9),r(),e.t0;case 21:case"end":return e.stop()}}),e,this,[[9,17]])})));return function(t){return e.apply(this,arguments)}}()},{key:"connect",value:function(){var e=Object(c.a)(Object(u.a)().mark((function e(t){var n=this;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._qrcodeModal){e.next=2;break}throw new Error("QRCode Modal not provided");case 2:if(!this.connected){e.next=4;break}return e.abrupt("return",{chainId:this.chainId,accounts:this.accounts});case 4:return e.next=6,this.createSession(t);case 6:return e.abrupt("return",new Promise(function(){var e=Object(c.a)(Object(u.a)().mark((function e(t,r){return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.on("modal_closed",(function(){return r(new Error(g))})),n.on("connect",(function(e,n){if(e)return r(e);t(n.params[0])}));case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"createSession",value:function(){var e=Object(c.a)(Object(u.a)().mark((function e(t){var n;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._connected){e.next=2;break}throw new Error(h);case 2:if(!this.pending){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,this._generateKey();case 6:this._key=e.sent,n=this._formatRequest({method:"wc_sessionRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,chainId:t&&t.chainId?t.chainId:null}]}),this.handshakeId=n.id,this.handshakeTopic=Object(d.D)(),this._sendSessionRequest(n,"Session update rejected",{topic:this.handshakeTopic}),this._eventManager.trigger({event:"display_uri",params:[this.uri]});case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"approveSession",value:function(e){if(this._connected)throw new Error(h);this.chainId=e.chainId,this.accounts=e.accounts,this.networkId=e.networkId||0,this.rpcUrl=e.rpcUrl||"";var t={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl,peerId:this.clientId,peerMeta:this.clientMeta},n={id:this.handshakeId,jsonrpc:"2.0",result:t};this._sendResponse(n),this._connected=!0,this._setStorageSession(),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})}},{key:"rejectSession",value:function(e){if(this._connected)throw new Error(h);var t=e&&e.message?e.message:"Session Rejected",n=this._formatResponse({id:this.handshakeId,error:{message:t}});this._sendResponse(n),this._connected=!1,this._eventManager.trigger({event:"disconnect",params:[{message:t}]}),this._removeStorageSession()}},{key:"updateSession",value:function(e){if(!this._connected)throw new Error(p);this.chainId=e.chainId,this.accounts=e.accounts,this.networkId=e.networkId||0,this.rpcUrl=e.rpcUrl||"";var t={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl},n=this._formatRequest({method:"wc_sessionUpdate",params:[t]});this._sendSessionRequest(n,"Session update rejected"),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]}),this._manageStorageSession()}},{key:"killSession",value:function(){var e=Object(c.a)(Object(u.a)().mark((function e(t){var n,r,i;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t?t.message:"Session Disconnected",r={approved:!1,chainId:null,networkId:null,accounts:null},i=this._formatRequest({method:"wc_sessionUpdate",params:[r]}),e.next=5,this._sendRequest(i);case 5:this._handleSessionDisconnect(n);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"sendTransaction",value:function(){var e=Object(c.a)(Object(u.a)().mark((function e(t){var n,r,i;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._connected){e.next=2;break}throw new Error(p);case 2:return n=Object(d.x)(t),r=this._formatRequest({method:"eth_sendTransaction",params:[n]}),e.next=6,this._sendCallRequest(r);case 6:return i=e.sent,e.abrupt("return",i);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"signTransaction",value:function(){var e=Object(c.a)(Object(u.a)().mark((function e(t){var n,r,i;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._connected){e.next=2;break}throw new Error(p);case 2:return n=Object(d.x)(t),r=this._formatRequest({method:"eth_signTransaction",params:[n]}),e.next=6,this._sendCallRequest(r);case 6:return i=e.sent,e.abrupt("return",i);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"signMessage",value:function(){var e=Object(c.a)(Object(u.a)().mark((function e(t){var n,r;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._connected){e.next=2;break}throw new Error(p);case 2:return n=this._formatRequest({method:"eth_sign",params:t}),e.next=5,this._sendCallRequest(n);case 5:return r=e.sent,e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"signPersonalMessage",value:function(){var e=Object(c.a)(Object(u.a)().mark((function e(t){var n,r;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._connected){e.next=2;break}throw new Error(p);case 2:return t=Object(d.w)(t),n=this._formatRequest({method:"personal_sign",params:t}),e.next=6,this._sendCallRequest(n);case 6:return r=e.sent,e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"signTypedData",value:function(){var e=Object(c.a)(Object(u.a)().mark((function e(t){var n,r;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._connected){e.next=2;break}throw new Error(p);case 2:return n=this._formatRequest({method:"eth_signTypedData",params:t}),e.next=5,this._sendCallRequest(n);case 5:return r=e.sent,e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"updateChain",value:function(){var e=Object(c.a)(Object(u.a)().mark((function e(t){var n,r;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._connected){e.next=2;break}throw new Error("Session currently disconnected");case 2:return n=this._formatRequest({method:"wallet_updateChain",params:[t]}),e.next=5,this._sendCallRequest(n);case 5:return r=e.sent,e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"unsafeSend",value:function(e,t){var n=this;return this._sendRequest(e,t),this._eventManager.trigger({event:"call_request_sent",params:[{request:e,options:t}]}),new Promise((function(t,r){n._subscribeToResponse(e.id,(function(e,n){if(e)r(e);else{if(!n)throw new Error("Missing JSON RPC response");t(n)}}))}))}},{key:"sendCustomRequest",value:function(){var e=Object(c.a)(Object(u.a)().mark((function e(t,n){var r,i;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._connected){e.next=2;break}throw new Error(p);case 2:e.t0=t.method,e.next="eth_accounts"===e.t0?5:"eth_chainId"===e.t0?6:"eth_sendTransaction"===e.t0||"eth_signTransaction"===e.t0?7:"personal_sign"===e.t0?9:11;break;case 5:return e.abrupt("return",this.accounts);case 6:return e.abrupt("return",Object(d.f)(this.chainId));case 7:return t.params&&(t.params[0]=Object(d.x)(t.params[0])),e.abrupt("break",12);case 9:return t.params&&(t.params=Object(d.w)(t.params)),e.abrupt("break",12);case 11:return e.abrupt("break",12);case 12:return r=this._formatRequest(t),e.next=15,this._sendCallRequest(r,n);case 15:return i=e.sent,e.abrupt("return",i);case 17:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"approveRequest",value:function(e){if(!Object(d.q)(e))throw new Error('JSON-RPC success response must include "result" field');var t=this._formatResponse(e);this._sendResponse(t)}},{key:"rejectRequest",value:function(e){if(!Object(d.p)(e))throw new Error('JSON-RPC error response must include "error" field');var t=this._formatResponse(e);this._sendResponse(t)}},{key:"transportClose",value:function(){this._transport.close()}},{key:"_sendRequest",value:function(){var e=Object(c.a)(Object(u.a)().mark((function e(t,n){var r,i,a,o,s;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this._formatRequest(t),e.next=3,this._encrypt(r);case 3:i=e.sent,a="undefined"!==typeof(null===n||void 0===n?void 0:n.topic)?n.topic:this.peerId,o=JSON.stringify(i),s="undefined"!==typeof(null===n||void 0===n?void 0:n.forcePushNotification)?!n.forcePushNotification:Object(d.t)(r),this._transport.send(o,a,s);case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_sendResponse",value:function(){var e=Object(c.a)(Object(u.a)().mark((function e(t){var n,r,i;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._encrypt(t);case 2:n=e.sent,r=this.peerId,i=JSON.stringify(n),!0,this._transport.send(i,r,true);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_sendSessionRequest",value:function(){var e=Object(c.a)(Object(u.a)().mark((function e(t,n,r){return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this._sendRequest(t,r),this._subscribeToSessionResponse(t.id,n);case 2:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_sendCallRequest",value:function(e,t){return this._sendRequest(e,t),this._eventManager.trigger({event:"call_request_sent",params:[{request:e,options:t}]}),this._subscribeToCallResponse(e.id)}},{key:"_formatRequest",value:function(e){if("undefined"===typeof e.method)throw new Error('JSON RPC request must have valid "method" value');return{id:"undefined"===typeof e.id?Object(d.z)():e.id,jsonrpc:"2.0",method:e.method,params:"undefined"===typeof e.params?[]:e.params}}},{key:"_formatResponse",value:function(e){if("undefined"===typeof e.id)throw new Error('JSON RPC request must have valid "id" value');var t={id:e.id,jsonrpc:"2.0"};if(Object(d.p)(e)){var n=Object(d.h)(e.error);return Object.assign(Object.assign(Object.assign({},t),e),{error:n})}if(Object(d.q)(e))return Object.assign(Object.assign({},t),e);throw new Error(m)}},{key:"_handleSessionDisconnect",value:function(e){var t=e||"Session Disconnected";this._connected||(this._qrcodeModal&&this._qrcodeModal.close(),Object(d.A)(d.v)),this._connected&&(this._connected=!1),this._handshakeId&&(this._handshakeId=0),this._handshakeTopic&&(this._handshakeTopic=""),this._peerId&&(this._peerId=""),this._eventManager.trigger({event:"disconnect",params:[{message:t}]}),this._removeStorageSession(),this.transportClose()}},{key:"_handleSessionResponse",value:function(e,t){t&&t.approved?(this._connected?(t.chainId&&(this.chainId=t.chainId),t.accounts&&(this.accounts=t.accounts),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]})):(this._connected=!0,t.chainId&&(this.chainId=t.chainId),t.accounts&&(this.accounts=t.accounts),t.peerId&&!this.peerId&&(this.peerId=t.peerId),t.peerMeta&&!this.peerMeta&&(this.peerMeta=t.peerMeta),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})),this._manageStorageSession()):this._handleSessionDisconnect(e)}},{key:"_handleIncomingMessages",value:function(){var e=Object(c.a)(Object(u.a)().mark((function e(t){var n,r;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if([this.clientId,this.handshakeTopic].includes(t.topic)){e.next=3;break}return e.abrupt("return");case 3:e.prev=3,n=JSON.parse(t.payload),e.next=10;break;case 7:return e.prev=7,e.t0=e.catch(3),e.abrupt("return");case 10:return e.next=12,this._decrypt(n);case 12:(r=e.sent)&&this._eventManager.trigger(r);case 14:case"end":return e.stop()}}),e,this,[[3,7]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_subscribeToSessionRequest",value:function(){this._transport.subscribe(this.handshakeTopic)}},{key:"_subscribeToResponse",value:function(e,t){this.on("response:".concat(e),t)}},{key:"_subscribeToSessionResponse",value:function(e,t){var n=this;this._subscribeToResponse(e,(function(e,r){e?n._handleSessionResponse(e.message):Object(d.q)(r)?n._handleSessionResponse(t,r.result):r.error&&r.error.message?n._handleSessionResponse(r.error.message):n._handleSessionResponse(t)}))}},{key:"_subscribeToCallResponse",value:function(e){var t=this;return new Promise((function(n,r){t._subscribeToResponse(e,(function(e,t){e?r(e):Object(d.q)(t)?n(t.result):t.error&&t.error.message?r(t.error):r(new Error(m))}))}))}},{key:"_subscribeToInternalEvents",value:function(){var e=this;this.on("display_uri",(function(){e._qrcodeModal&&e._qrcodeModal.open(e.uri,(function(){e._eventManager.trigger({event:"modal_closed",params:[]})}),e._qrcodeModalOptions)})),this.on("connect",(function(){e._qrcodeModal&&e._qrcodeModal.close()})),this.on("call_request_sent",(function(t,n){var r=n.params[0].request;if(Object(d.r)()&&e._signingMethods.includes(r.method)){var i=Object(d.j)(d.v);i&&(window.location.href=i.href)}})),this.on("wc_sessionRequest",(function(t,n){t&&e._eventManager.trigger({event:"error",params:[{code:"SESSION_REQUEST_ERROR",message:t.toString()}]}),e.handshakeId=n.id,e.peerId=n.params[0].peerId,e.peerMeta=n.params[0].peerMeta;var r=Object.assign(Object.assign({},n),{method:"session_request"});e._eventManager.trigger(r)})),this.on("wc_sessionUpdate",(function(t,n){t&&e._handleSessionResponse(t.message),e._handleSessionResponse("Session disconnected",n.params[0])}))}},{key:"_initTransport",value:function(){var e=this;this._transport.on("message",(function(t){return e._handleIncomingMessages(t)})),this._transport.on("open",(function(){return e._eventManager.trigger({event:"transport_open",params:[]})})),this._transport.on("close",(function(){return e._eventManager.trigger({event:"transport_close",params:[]})})),this._transport.on("error",(function(){return e._eventManager.trigger({event:"transport_error",params:["Websocket connection failed"]})})),this._transport.open()}},{key:"_formatUri",value:function(){var e=this.protocol,t=this.handshakeTopic,n=this.version,r=encodeURIComponent(this.bridge),i=this.key;return"".concat(e,":").concat(t,"@").concat(n,"?bridge=").concat(r,"&key=").concat(i)}},{key:"_parseUri",value:function(e){var t=Object(d.y)(e);if(t.protocol===this.protocol){if(!t.handshakeTopic)throw Error("Invalid or missing handshakeTopic parameter value");var n=t.handshakeTopic;if(!t.bridge)throw Error("Invalid or missing bridge url parameter value");var r=decodeURIComponent(t.bridge);if(!t.key)throw Error("Invalid or missing key parameter value");return{handshakeTopic:n,bridge:r,key:t.key}}throw new Error("URI format is invalid")}},{key:"_generateKey",value:function(){var e=Object(c.a)(Object(u.a)().mark((function e(){var t;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._cryptoLib){e.next=5;break}return e.next=3,this._cryptoLib.generateKey();case 3:return t=e.sent,e.abrupt("return",t);case 5:return e.abrupt("return",null);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_encrypt",value:function(){var e=Object(c.a)(Object(u.a)().mark((function e(t){var n,r;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this._key,!this._cryptoLib||!n){e.next=6;break}return e.next=4,this._cryptoLib.encrypt(t,n);case 4:return r=e.sent,e.abrupt("return",r);case 6:return e.abrupt("return",null);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_decrypt",value:function(){var e=Object(c.a)(Object(u.a)().mark((function e(t){var n,r;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this._key,!this._cryptoLib||!n){e.next=6;break}return e.next=4,this._cryptoLib.decrypt(t,n);case 4:return r=e.sent,e.abrupt("return",r);case 6:return e.abrupt("return",null);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_getStorageSession",value:function(){var e=null;return this._sessionStorage&&(e=this._sessionStorage.getSession()),e}},{key:"_setStorageSession",value:function(){this._sessionStorage&&this._sessionStorage.setSession(this.session)}},{key:"_removeStorageSession",value:function(){this._sessionStorage&&this._sessionStorage.removeSession()}},{key:"_manageStorageSession",value:function(){this._connected?this._setStorageSession():this._removeStorageSession()}},{key:"_registerPushServer",value:function(e){if(!e.url||"string"!==typeof e.url)throw Error("Invalid or missing pushServerOpts.url parameter value");if(!e.type||"string"!==typeof e.type)throw Error("Invalid or missing pushServerOpts.type parameter value");if(!e.token||"string"!==typeof e.token)throw Error("Invalid or missing pushServerOpts.token parameter value");var t={bridge:this.bridge,topic:this.clientId,type:e.type,token:e.token,peerName:"",language:e.language||""};this.on("connect",function(){var n=Object(c.a)(Object(u.a)().mark((function n(r,i){var a,o;return Object(u.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!r){n.next=2;break}throw r;case 2:return e.peerMeta&&(a=i.params[0].peerMeta.name,t.peerName=a),n.prev=3,n.next=6,fetch("".concat(e.url,"/new"),{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)});case 6:return o=n.sent,n.next=9,o.json();case 9:if(n.sent.success){n.next=12;break}throw Error("Failed to register in Push Server");case 12:n.next=17;break;case 14:throw n.prev=14,n.t0=n.catch(3),Error("Failed to register in Push Server");case 17:case"end":return n.stop()}}),n,null,[[3,14]])})));return function(e,t){return n.apply(this,arguments)}}())}}]),e}(),A=x,k=n(67),S=n(15);function E(e){return O.apply(this,arguments)}function O(){return(O=Object(c.a)(Object(u.a)().mark((function e(t){var n,r,i;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(t||256)/8,r=k.randomBytes(n),i=Object(d.d)(S.arrayToBuffer(r)),e.abrupt("return",i);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function C(e,t){return T.apply(this,arguments)}function T(){return(T=Object(c.a)(Object(u.a)().mark((function e(t,n){var r,i,a,o,s,c,l;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=S.hexToArray(t.data),i=S.hexToArray(t.iv),a=S.hexToArray(t.hmac),o=S.arrayToHex(a,!1),s=S.concatArrays(r,i),e.next=7,k.hmacSha256Sign(n,s);case 7:if(c=e.sent,l=S.arrayToHex(c,!1),S.removeHexPrefix(o)!==S.removeHexPrefix(l)){e.next=11;break}return e.abrupt("return",!0);case 11:return e.abrupt("return",!1);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(e,t,n){return j.apply(this,arguments)}function j(){return(j=Object(c.a)(Object(u.a)().mark((function e(t,n,r){var i,a,o,s,c,l,f,h,p,m,g;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=S.bufferToArray(Object(d.b)(n)),e.t0=r,e.t0){e.next=6;break}return e.next=5,E(128);case 5:e.t0=e.sent;case 6:return a=e.t0,o=S.bufferToArray(Object(d.b)(a)),s=S.arrayToHex(o,!1),c=JSON.stringify(t),l=S.utf8ToArray(c),e.next=13,k.aesCbcEncrypt(o,i,l);case 13:return f=e.sent,h=S.arrayToHex(f,!1),p=S.concatArrays(f,o),e.next=18,k.hmacSha256Sign(i,p);case 18:return m=e.sent,g=S.arrayToHex(m,!1),e.abrupt("return",{data:h,hmac:g,iv:s});case 21:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function R(e,t){return I.apply(this,arguments)}function I(){return(I=Object(c.a)(Object(u.a)().mark((function e(t,n){var r,i,a,o,s,c;return Object(u.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=S.bufferToArray(Object(d.b)(n))){e.next=3;break}throw new Error("Missing key: required for decryption");case 3:return e.next=5,C(t,r);case 5:if(e.sent){e.next=8;break}return e.abrupt("return",null);case 8:return i=S.hexToArray(t.data),a=S.hexToArray(t.iv),e.next=12,k.aesCbcDecrypt(a,r,i);case 12:o=e.sent,s=S.arrayToUtf8(o),e.prev=14,c=JSON.parse(s),e.next=21;break;case 18:return e.prev=18,e.t0=e.catch(14),e.abrupt("return",null);case 21:return e.abrupt("return",c);case 22:case"end":return e.stop()}}),e,null,[[14,18]])})))).apply(this,arguments)}var P=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e,i){return Object(a.a)(this,n),t.call(this,{cryptoLib:r,connectorOpts:e,pushServerOpts:i})}return Object(i.a)(n)}(A);t.default=P},function(e,t){e.exports=i,i.strict=a,i.loose=o;var n=Object.prototype.toString,r={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function i(e){return a(e)||o(e)}function a(e){return e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function o(e){return r[n.call(e)]}},function(e,t,n){(function(r,i){var a;!function(){"use strict";var o="input is invalid type",s="object"===typeof window,u=s?window:{};u.JS_SHA3_NO_WINDOW&&(s=!1);var c=!s&&"object"===typeof self;!u.JS_SHA3_NO_NODE_JS&&"object"===typeof r&&r.versions&&r.versions.node?u=i:c&&(u=self);var l=!u.JS_SHA3_NO_COMMON_JS&&"object"===typeof e&&e.exports,d=n(82),f=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!==typeof ArrayBuffer,h="0123456789abcdef".split(""),p=[4,1024,262144,67108864],m=[0,8,16,24],g=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],v=[224,256,384,512],y=[128,256],b=["hex","buffer","arrayBuffer","array","digest"],w={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!f||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var _=function(e,t,n){return function(r){return new D(e,t,e).update(r)[n]()}},x=function(e,t,n){return function(r,i){return new D(e,t,i).update(r)[n]()}},A=function(e,t,n){return function(t,r,i,a){return C["cshake"+e].update(t,r,i,a)[n]()}},k=function(e,t,n){return function(t,r,i,a){return C["kmac"+e].update(t,r,i,a)[n]()}},S=function(e,t,n,r){for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=n>>5,this.extraBytes=(31&n)>>3;for(var r=0;r<50;++r)this.s[r]=0}function B(e,t,n){D.call(this,e,t,n)}D.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(o);if(null===e)throw new Error(o);if(f&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!f||!ArrayBuffer.isView(e)))throw new Error(o);t=!0}for(var r,i,a=this.blocks,s=this.byteCount,u=e.length,c=this.blockCount,l=0,d=this.s;l>2]|=e[l]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(a[r>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=s){for(this.start=r-s,this.block=a[c],r=0;r>=8);n>0;)i.unshift(n),n=255&(e>>=8),++r;return t?i.push(r):i.unshift(r),this.update(i),i.length},D.prototype.encodeString=function(e){var t,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(o);if(null===e)throw new Error(o);if(f&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!f||!ArrayBuffer.isView(e)))throw new Error(o);t=!0}var r=0,i=e.length;if(t)r=i;else for(var a=0;a=57344?r+=3:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++a)),r+=4)}return r+=this.encode(8*r),this.update(e),r},D.prototype.bytepad=function(e,t){for(var n=this.encode(t),r=0;r>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[n],t=1;t>4&15]+h[15&e]+h[e>>12&15]+h[e>>8&15]+h[e>>20&15]+h[e>>16&15]+h[e>>28&15]+h[e>>24&15];o%t===0&&(N(n),a=0)}return i&&(e=n[a],s+=h[e>>4&15]+h[15&e],i>1&&(s+=h[e>>12&15]+h[e>>8&15]),i>2&&(s+=h[e>>20&15]+h[e>>16&15])),s},D.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,n=this.s,r=this.outputBlocks,i=this.extraBytes,a=0,o=0,s=this.outputBits>>3;e=i?new ArrayBuffer(r+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);o>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%n===0&&N(r)}return a&&(e=s<<2,t=r[o],u[e]=255&t,a>1&&(u[e+1]=t>>8&255),a>2&&(u[e+2]=t>>16&255)),u},B.prototype=new D,B.prototype.finalize=function(){return this.encode(this.outputBits,!0),D.prototype.finalize.call(this)};var N=function(e){var t,n,r,i,a,o,s,u,c,l,d,f,h,p,m,v,y,b,w,_,x,A,k,S,E,O,C,T,M,j,R,I,P,L,D,B,N,F,U,z,q,H,V,W,G,K,Y,Z,X,Q,J,$,ee,te,ne,re,ie,ae,oe,se,ue,ce,le;for(r=0;r<48;r+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],a=e[1]^e[11]^e[21]^e[31]^e[41],o=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(f=e[8]^e[18]^e[28]^e[38]^e[48])^(o<<1|s>>>31),n=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|o>>>31),e[0]^=t,e[1]^=n,e[10]^=t,e[11]^=n,e[20]^=t,e[21]^=n,e[30]^=t,e[31]^=n,e[40]^=t,e[41]^=n,t=i^(u<<1|c>>>31),n=a^(c<<1|u>>>31),e[2]^=t,e[3]^=n,e[12]^=t,e[13]^=n,e[22]^=t,e[23]^=n,e[32]^=t,e[33]^=n,e[42]^=t,e[43]^=n,t=o^(l<<1|d>>>31),n=s^(d<<1|l>>>31),e[4]^=t,e[5]^=n,e[14]^=t,e[15]^=n,e[24]^=t,e[25]^=n,e[34]^=t,e[35]^=n,e[44]^=t,e[45]^=n,t=u^(f<<1|h>>>31),n=c^(h<<1|f>>>31),e[6]^=t,e[7]^=n,e[16]^=t,e[17]^=n,e[26]^=t,e[27]^=n,e[36]^=t,e[37]^=n,e[46]^=t,e[47]^=n,t=l^(i<<1|a>>>31),n=d^(a<<1|i>>>31),e[8]^=t,e[9]^=n,e[18]^=t,e[19]^=n,e[28]^=t,e[29]^=n,e[38]^=t,e[39]^=n,e[48]^=t,e[49]^=n,p=e[0],m=e[1],K=e[11]<<4|e[10]>>>28,Y=e[10]<<4|e[11]>>>28,T=e[20]<<3|e[21]>>>29,M=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,H=e[40]<<18|e[41]>>>14,V=e[41]<<18|e[40]>>>14,L=e[2]<<1|e[3]>>>31,D=e[3]<<1|e[2]>>>31,v=e[13]<<12|e[12]>>>20,y=e[12]<<12|e[13]>>>20,Z=e[22]<<10|e[23]>>>22,X=e[23]<<10|e[22]>>>22,j=e[33]<<13|e[32]>>>19,R=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,ne=e[4]<<30|e[5]>>>2,B=e[14]<<6|e[15]>>>26,N=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Q=e[34]<<15|e[35]>>>17,J=e[35]<<15|e[34]>>>17,I=e[45]<<29|e[44]>>>3,P=e[44]<<29|e[45]>>>3,S=e[6]<<28|e[7]>>>4,E=e[7]<<28|e[6]>>>4,re=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,x=e[37]<<21|e[36]>>>11,$=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,W=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,O=e[18]<<20|e[19]>>>12,C=e[19]<<20|e[18]>>>12,ae=e[29]<<7|e[28]>>>25,oe=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,q=e[39]<<8|e[38]>>>24,A=e[48]<<14|e[49]>>>18,k=e[49]<<14|e[48]>>>18,e[0]=p^~v&b,e[1]=m^~y&w,e[10]=S^~O&T,e[11]=E^~C&M,e[20]=L^~B&F,e[21]=D^~N&U,e[30]=W^~K&Z,e[31]=G^~Y&X,e[40]=te^~re&ae,e[41]=ne^~ie&oe,e[2]=v^~b&_,e[3]=y^~w&x,e[12]=O^~T&j,e[13]=C^~M&R,e[22]=B^~F&z,e[23]=N^~U&q,e[32]=K^~Z&Q,e[33]=Y^~X&J,e[42]=re^~ae&se,e[43]=ie^~oe&ue,e[4]=b^~_&A,e[5]=w^~x&k,e[14]=T^~j&I,e[15]=M^~R&P,e[24]=F^~z&H,e[25]=U^~q&V,e[34]=Z^~Q&$,e[35]=X^~J&ee,e[44]=ae^~se&ce,e[45]=oe^~ue&le,e[6]=_^~A&p,e[7]=x^~k&m,e[16]=j^~I&S,e[17]=R^~P&E,e[26]=z^~H&L,e[27]=q^~V&D,e[36]=Q^~$&W,e[37]=J^~ee&G,e[46]=se^~ce&te,e[47]=ue^~le&ne,e[8]=A^~p&v,e[9]=k^~m&y,e[18]=I^~S&O,e[19]=P^~E&C,e[28]=H^~L&B,e[29]=V^~D&N,e[38]=$^~W&K,e[39]=ee^~G&Y,e[48]=ce^~te&re,e[49]=le^~ne&ie,e[0]^=g[r],e[1]^=g[r+1]};if(l)e.exports=C;else{for(M=0;M0&&void 0!==arguments[0]?arguments[0]:{},t=e;return Object.keys(t).every((function(e){return"content-type"!==e.toLowerCase()}))&&((t=Object(l.a)({},e))["Content-Type"]="application/x-binary"),t}function p(e){return e&&void 0!==e.byteLength}var m=function(t){Object(u.a)(l,t);var n=Object(c.a)(l);function l(e,t){var r;Object(o.a)(this,l),r=n.call(this,e);var i=t;if(Array.isArray(t)){if(!t.every(p))throw new TypeError("Array elements must be byte arrays");i=f.concatArrays.apply(void 0,Object(a.a)(t))}else if(!p(i))throw new TypeError("Argument must be byte array");return r.txnBytesToPost=i,r}return Object(s.a)(l,[{key:"path",value:function(){return"/v2/transactions"}},{key:"do",value:function(){var t=Object(i.a)(Object(r.a)().mark((function t(){var n,i,a,o=arguments;return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=o.length>0&&void 0!==o[0]?o[0]:{},i=h(n),t.next=4,this.c.post(this.path(),e.from(this.txnBytesToPost),i);case 4:return a=t.sent,t.abrupt("return",a.body);case 6:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()}]),l}(d.a)}.call(this,n(19).Buffer)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(117);n(104),n(3),n(102),t.PeraWalletConnect=r.PeraWalletConnect,t.closePeraWalletSignTxnToast=r.closePeraWalletSignTxnToast},function(e,t,n){"use strict";var r=n(214).default,i=n(218).default,a=n(133).default,o=n(222),s=n(223),u=n(224);function c(e){if("string"!==typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function l(e,t){return t.encode?t.strict?o(e):encodeURIComponent(e):e}function d(e,t){return t.decode?s(e):e}function f(e){return Array.isArray(e)?e.sort():"object"===typeof e?f(Object.keys(e)).sort((function(e,t){return Number(e)-Number(t)})).map((function(t){return e[t]})):e}function h(e){var t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function p(e){var t=(e=h(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function m(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"===typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function g(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);var n=function(e){var t;switch(e.arrayFormat){case"index":return function(e,n,r){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return function(e,n,r){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return function(t,n,r){var i="string"===typeof n&&n.split("").indexOf(e.arrayFormatSeparator)>-1?n.split(e.arrayFormatSeparator).map((function(t){return d(t,e)})):null===n?n:d(n,e);r[t]=i};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),a=Object.create(null);if("string"!==typeof e)return a;if(!(e=e.trim().replace(/^[?#&]/,"")))return a;var o,s=i(e.split("&"));try{for(s.s();!(o=s.n()).done;){var l=o.value,h=u(t.decode?l.replace(/\+/g," "):l,"="),p=r(h,2),g=p[0],v=p[1];v=void 0===v?null:["comma","separator"].includes(t.arrayFormat)?v:d(v,t),n(d(g,t),v,a)}}catch(S){s.e(S)}finally{s.f()}for(var y=0,b=Object.keys(a);y0})).join("&")},t.parseUrl=function(e,t){t=Object.assign({decode:!0},t);var n=u(e,"#"),i=r(n,2),a=i[0],o=i[1];return Object.assign({url:a.split("?")[0]||"",query:g(p(e),t)},t&&t.parseFragmentIdentifier&&o?{fragmentIdentifier:d(o,t)}:{})},t.stringifyUrl=function(e,n){n=Object.assign({encode:!0,strict:!0},n);var r=h(e.url).split("?")[0]||"",i=t.extract(e.url),a=t.parse(i,{sort:!1}),o=Object.assign(a,e.query),s=t.stringify(o,n);s&&(s="?".concat(s));var u=function(e){var t="",n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);return e.fragmentIdentifier&&(u="#".concat(l(e.fragmentIdentifier,n))),"".concat(r).concat(s).concat(u)}},function(e,t,n){(function(t){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,n,r){"use strict";r.r(n),r.d(n,"encode",(function(){return T})),r.d(n,"decode",(function(){return V})),r.d(n,"decodeAsync",(function(){return J})),r.d(n,"decodeArrayStream",(function(){return $})),r.d(n,"decodeStream",(function(){return ee})),r.d(n,"Decoder",(function(){return q})),r.d(n,"Encoder",(function(){return O})),r.d(n,"ExtensionCodec",(function(){return k})),r.d(n,"ExtData",(function(){return p})),r.d(n,"EXT_TIMESTAMP",(function(){return v})),r.d(n,"encodeDateToTimeSpec",(function(){return b})),r.d(n,"encodeTimeSpecToTimestamp",(function(){return y})),r.d(n,"decodeTimestampToTimeSpec",(function(){return _})),r.d(n,"encodeTimestampExtension",(function(){return w})),r.d(n,"decodeTimestampExtension",(function(){return x}));var i=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o},a=function(){for(var e=[],t=0;t=55296&&i<=56319&&r65535&&(d-=65536,o.push(d>>>10&1023|55296),d=56320|1023&d),o.push(d)}else o.push(u);o.length>=4096&&(s+=String.fromCharCode.apply(String,a(o)),o.length=0)}return o.length>0&&(s+=String.fromCharCode.apply(String,a(o))),s}var f=o?new TextDecoder:null,h="undefined"!=typeof t?200:0,p=function(e,t){this.type=e,this.data=t};function m(e,t,n){var r=Math.floor(n/4294967296),i=n;e.setUint32(t,r),e.setUint32(t+4,i)}function g(e,t){var n=e.getInt32(t),r=e.getUint32(t+4),i=nMath.floor(Number.MAX_SAFE_INTEGER/4294967296);return i||a?BigInt(n)*BigInt(4294967296)+BigInt(r):4294967296*n+r}var v=-1;function y(e){var t,n=e.sec,r=e.nsec;if(n>=0&&r>=0&&n<=17179869183){if(0===r&&n<=4294967295){var i=new Uint8Array(4);return(t=new DataView(i.buffer)).setUint32(0,n),i}var a=n/4294967296,o=4294967295&n;return i=new Uint8Array(8),(t=new DataView(i.buffer)).setUint32(0,r<<2|3&a),t.setUint32(4,o),i}return i=new Uint8Array(12),(t=new DataView(i.buffer)).setUint32(0,r),m(t,4,n),i}function b(e){var t=e.getTime(),n=Math.floor(t/1e3),r=1e6*(t-1e3*n),i=Math.floor(r/1e9);return{sec:n+i,nsec:r-1e9*i}}function w(e){return e instanceof Date?y(b(e)):null}function _(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 4:return{sec:t.getUint32(0),nsec:0};case 8:var n=t.getUint32(0);return{sec:4294967296*(3&n)+t.getUint32(4),nsec:n>>>2};case 12:return{sec:g(t,4),nsec:t.getUint32(0)};default:throw new Error("Unrecognized data size for timestamp: "+e.length)}}function x(e){var t=_(e);return new Date(1e3*t.sec+t.nsec/1e6)}var A={type:v,encode:w,decode:x},k=function(){function e(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(A)}return e.prototype.register=function(e){var t=e.type,n=e.encode,r=e.decode;if(t>=0)this.encoders[t]=n,this.decoders[t]=r;else{var i=1+t;this.builtInEncoders[i]=n,this.builtInDecoders[i]=r}},e.prototype.tryToEncode=function(e,t){for(var n=0;n=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},O=function(){function e(e,t,n,r,i,a,o,s){void 0===e&&(e=k.defaultCodec),void 0===t&&(t=void 0),void 0===n&&(n=100),void 0===r&&(r=2048),void 0===i&&(i=!1),void 0===a&&(a=!1),void 0===o&&(o=!1),void 0===s&&(s=!1),this.extensionCodec=e,this.context=t,this.maxDepth=n,this.initialBufferSize=r,this.sortKeys=i,this.forceFloat32=a,this.ignoreUndefined=o,this.forceIntegerToFloat=s,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}return e.prototype.getUint8Array=function(){return this.bytes.subarray(0,this.pos)},e.prototype.reinitializeState=function(){this.pos=0},e.prototype.encode=function(e){return this.reinitializeState(),this.doEncode(e,1),this.getUint8Array()},e.prototype.doEncode=function(e,t){if(t>this.maxDepth)throw new Error("Too deep objects in depth "+t);null==e?this.encodeNil():"boolean"==typeof e?this.encodeBoolean(e):"number"==typeof e?this.encodeNumber(e):"string"==typeof e?this.encodeString(e):"bigint"==typeof e?this.encodebigint(e):this.encodeObject(e,t)},e.prototype.ensureBufferSizeToWrite=function(e){var t=this.pos+e;this.view.byteLength=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):(this.writeU8(211),this.writeI64(e)):this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))},e.prototype.encodebigint=function(e){e>=BigInt(0)?e=BigInt(-32)?this.writeU8(224|Number(e)+32):e>=BigInt(-128)?(this.writeU8(208),this.writeI8(Number(e))):e>=BigInt(-32768)?(this.writeU8(209),this.writeI16(Number(e))):e>=BigInt(-2147483648)?(this.writeU8(210),this.writeI32(Number(e))):(this.writeU8(211),this.writeBig64(e))},e.prototype.writeStringHeader=function(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else{if(!(e<4294967296))throw new Error("Too long string: "+e+" bytes in UTF-8");this.writeU8(219),this.writeU32(e)}},e.prototype.encodeString=function(e){var t=e.length;if(o&&t>c){var n=s(e);this.ensureBufferSizeToWrite(5+n),this.writeStringHeader(n),l(e,this.bytes,this.pos),this.pos+=n}else n=s(e),this.ensureBufferSizeToWrite(5+n),this.writeStringHeader(n),function(e,t,n){for(var r=e.length,i=n,a=0;a>6&31|192;else{if(o>=55296&&o<=56319&&a>12&15|224,t[i++]=o>>6&63|128):(t[i++]=o>>18&7|240,t[i++]=o>>12&63|128,t[i++]=o>>6&63|128)}t[i++]=63&o|128}else t[i++]=o}}(e,this.bytes,this.pos),this.pos+=n},e.prototype.encodeObject=function(e,t){var n=this.extensionCodec.tryToEncode(e,this.context);if(null!=n)this.encodeExtension(n);else if(Array.isArray(e))this.encodeArray(e,t);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else{if("object"!=typeof e)throw new Error("Unrecognized object: "+Object.prototype.toString.apply(e));this.encodeMap(e,t)}},e.prototype.encodeBinary=function(e){var t=e.byteLength;if(t<256)this.writeU8(196),this.writeU8(t);else if(t<65536)this.writeU8(197),this.writeU16(t);else{if(!(t<4294967296))throw new Error("Too large binary: "+t);this.writeU8(198),this.writeU32(t)}var n=S(e);this.writeU8a(n)},e.prototype.encodeArray=function(e,t){var n,r,i=e.length;if(i<16)this.writeU8(144+i);else if(i<65536)this.writeU8(220),this.writeU16(i);else{if(!(i<4294967296))throw new Error("Too large array: "+i);this.writeU8(221),this.writeU32(i)}try{for(var a=E(e),o=a.next();!o.done;o=a.next()){var s=o.value;this.doEncode(s,t+1)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}},e.prototype.countWithoutUndefined=function(e,t){var n,r,i=0;try{for(var a=E(t),o=a.next();!o.done;o=a.next())void 0!==e[o.value]&&i++}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},e.prototype.encodeMap=function(e,t){var n,r,i=Object.keys(e);this.sortKeys&&i.sort();var a=this.ignoreUndefined?this.countWithoutUndefined(e,i):i.length;if(a<16)this.writeU8(128+a);else if(a<65536)this.writeU8(222),this.writeU16(a);else{if(!(a<4294967296))throw new Error("Too large map object: "+a);this.writeU8(223),this.writeU32(a)}try{for(var o=E(i),s=o.next();!s.done;s=o.next()){var u=s.value,c=e[u];this.ignoreUndefined&&void 0===c||(this.encodeString(u),this.doEncode(c,t+1))}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.encodeExtension=function(e){var t=e.data.length;if(1===t)this.writeU8(212);else if(2===t)this.writeU8(213);else if(4===t)this.writeU8(214);else if(8===t)this.writeU8(215);else if(16===t)this.writeU8(216);else if(t<256)this.writeU8(199),this.writeU8(t);else if(t<65536)this.writeU8(200),this.writeU16(t);else{if(!(t<4294967296))throw new Error("Too large extension object: "+t);this.writeU8(201),this.writeU32(t)}this.writeI8(e.type),this.writeU8a(e.data)},e.prototype.writeU8=function(e){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,e),this.pos++},e.prototype.writeU8a=function(e){var t=e.length;this.ensureBufferSizeToWrite(t),this.bytes.set(e,this.pos),this.pos+=t},e.prototype.writeI8=function(e){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,e),this.pos++},e.prototype.writeU16=function(e){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,e),this.pos+=2},e.prototype.writeI16=function(e){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,e),this.pos+=2},e.prototype.writeU32=function(e){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,e),this.pos+=4},e.prototype.writeI32=function(e){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,e),this.pos+=4},e.prototype.writeF32=function(e){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,e),this.pos+=4},e.prototype.writeF64=function(e){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,e),this.pos+=8},e.prototype.writeU64=function(e){this.ensureBufferSizeToWrite(8),function(e,t,n){var r=n/4294967296,i=n;e.setUint32(t,r),e.setUint32(t+4,i)}(this.view,this.pos,e),this.pos+=8},e.prototype.writeI64=function(e){this.ensureBufferSizeToWrite(8),m(this.view,this.pos,e),this.pos+=8},e.prototype.writeBig64=function(e){this.ensureBufferSizeToWrite(8),function(e,t,n){var r=Number(n/BigInt(4294967296)),i=Number(n%BigInt(4294967296));r<0&&0!==i&&(r-=1),e.setUint32(t,r),e.setUint32(t+4,i)}(this.view,this.pos,e),this.pos+=8},e}(),C={};function T(e,t){return void 0===t&&(t=C),new O(t.extensionCodec,t.context,t.maxDepth,t.initialBufferSize,t.sortKeys,t.forceFloat32,t.ignoreUndefined,t.forceIntegerToFloat).encode(e)}function M(e){return(e<0?"-":"")+"0x"+Math.abs(e).toString(16).padStart(2,"0")}var j=function(){function e(e,t){void 0===e&&(e=16),void 0===t&&(t=16),this.maxKeyLength=e,this.maxLengthPerKey=t,this.hit=0,this.miss=0,this.caches=[];for(var n=0;n0&&e<=this.maxKeyLength},e.prototype.get=function(e,t,n){var r=this.caches[n-1],i=r.length;e:for(var a=0;a=this.maxLengthPerKey?n[Math.random()*n.length|0]=r:n.push(r)},e.prototype.decode=function(e,t,n){var r=this.get(e,t,n);if(null!=r)return this.hit++,r;this.miss++;var i=d(e,t,n),a=Uint8Array.prototype.slice.call(e,t,t+n);return this.store(a,i),i},e}(),R=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},I=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]1||s(e,t)}))})}function s(e,t){try{(n=i[e](t)).value instanceof L?Promise.resolve(n.value.v).then(u,c):l(a[0][2],n)}catch(e){l(a[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}},B=new DataView(new ArrayBuffer(0)),N=new Uint8Array(B.buffer),F=function(){try{B.getInt8(0)}catch(e){return e.constructor}throw new Error("never reached")}(),U=new F("Insufficient data"),z=new j,q=function(){function e(e,t,n,r,i,a,o,s){void 0===e&&(e=k.defaultCodec),void 0===t&&(t=void 0),void 0===n&&(n=4294967295),void 0===r&&(r=4294967295),void 0===i&&(i=4294967295),void 0===a&&(a=4294967295),void 0===o&&(o=4294967295),void 0===s&&(s=z),this.extensionCodec=e,this.context=t,this.maxStrLength=n,this.maxBinLength=r,this.maxArrayLength=i,this.maxMapLength=a,this.maxExtLength=o,this.keyDecoder=s,this.totalPos=0,this.pos=0,this.view=B,this.bytes=N,this.headByte=-1,this.stack=[]}return e.prototype.reinitializeState=function(){this.totalPos=0,this.headByte=-1},e.prototype.setBuffer=function(e){this.bytes=S(e),this.view=function(e){if(e instanceof ArrayBuffer)return new DataView(e);var t=S(e);return new DataView(t.buffer,t.byteOffset,t.byteLength)}(this.bytes),this.pos=0},e.prototype.appendBuffer=function(e){if(-1!==this.headByte||this.hasRemaining()){var t=this.bytes.subarray(this.pos),n=S(e),r=new Uint8Array(t.length+n.length);r.set(t),r.set(n,t.length),this.setBuffer(r)}else this.setBuffer(e)},e.prototype.hasRemaining=function(e){return void 0===e&&(e=1),this.view.byteLength-this.pos>=e},e.prototype.createNoExtraBytesError=function(e){var t=this.view,n=this.pos;return new RangeError("Extra "+(t.byteLength-n)+" of "+t.byteLength+" byte(s) found at buffer["+e+"]")},e.prototype.decode=function(e){return this.reinitializeState(),this.setBuffer(e),this.doDecodeSingleSync()},e.prototype.doDecodeSingleSync=function(){var e=this.doDecodeSync();if(this.hasRemaining())throw this.createNoExtraBytesError(this.pos);return e},e.prototype.decodeAsync=function(e){var t,n,r,i;return R(this,void 0,void 0,(function(){var a,o,s,u,c,l,d,f;return I(this,(function(h){switch(h.label){case 0:a=!1,h.label=1;case 1:h.trys.push([1,6,7,12]),t=P(e),h.label=2;case 2:return[4,t.next()];case 3:if((n=h.sent()).done)return[3,5];if(s=n.value,a)throw this.createNoExtraBytesError(this.totalPos);this.appendBuffer(s);try{o=this.doDecodeSync(),a=!0}catch(e){if(!(e instanceof F))throw e}this.totalPos+=this.pos,h.label=4;case 4:return[3,2];case 5:return[3,12];case 6:return u=h.sent(),r={error:u},[3,12];case 7:return h.trys.push([7,,10,11]),n&&!n.done&&(i=t.return)?[4,i.call(t)]:[3,9];case 8:h.sent(),h.label=9;case 9:return[3,11];case 10:if(r)throw r.error;return[7];case 11:return[7];case 12:if(a){if(this.hasRemaining())throw this.createNoExtraBytesError(this.totalPos);return[2,o]}throw l=(c=this).headByte,d=c.pos,f=c.totalPos,new RangeError("Insufficient data in parcing "+M(l)+" at "+f+" ("+d+" in the current buffer)")}}))}))},e.prototype.decodeArrayStream=function(e){return this.decodeMultiAsync(e,!0)},e.prototype.decodeStream=function(e){return this.decodeMultiAsync(e,!1)},e.prototype.decodeMultiAsync=function(e,t){return D(this,arguments,(function(){var n,r,i,a,o,s,u,c,l;return I(this,(function(d){switch(d.label){case 0:n=t,r=-1,d.label=1;case 1:d.trys.push([1,13,14,19]),i=P(e),d.label=2;case 2:return[4,L(i.next())];case 3:if((a=d.sent()).done)return[3,12];if(o=a.value,t&&0===r)throw this.createNoExtraBytesError(this.totalPos);this.appendBuffer(o),n&&(r=this.readArraySize(),n=!1,this.complete()),d.label=4;case 4:d.trys.push([4,9,,10]),d.label=5;case 5:return[4,L(this.doDecodeSync())];case 6:return[4,d.sent()];case 7:return d.sent(),0==--r?[3,8]:[3,5];case 8:return[3,10];case 9:if(!((s=d.sent())instanceof F))throw s;return[3,10];case 10:this.totalPos+=this.pos,d.label=11;case 11:return[3,2];case 12:return[3,19];case 13:return u=d.sent(),c={error:u},[3,19];case 14:return d.trys.push([14,,17,18]),a&&!a.done&&(l=i.return)?[4,L(l.call(i))]:[3,16];case 15:d.sent(),d.label=16;case 16:return[3,18];case 17:if(c)throw c.error;return[7];case 18:return[7];case 19:return[2]}}))}))},e.prototype.doDecodeSync=function(){e:for(;;){var e=this.readHeadByte(),t=void 0;if(e>=224)t=e-256;else if(e<192)if(e<128)t=e;else if(e<144){if(0!==(r=e-128)){this.pushMapState(r),this.complete();continue e}t={}}else if(e<160){if(0!==(r=e-144)){this.pushArrayState(r),this.complete();continue e}t=[]}else{var n=e-160;t=this.decodeUtf8String(n,0)}else if(192===e)t=null;else if(194===e)t=!1;else if(195===e)t=!0;else if(202===e)t=this.readF32();else if(203===e)t=this.readF64();else if(204===e)t=this.readU8();else if(205===e)t=this.readU16();else if(206===e)t=this.readU32();else if(207===e)t=this.readU64();else if(208===e)t=this.readI8();else if(209===e)t=this.readI16();else if(210===e)t=this.readI32();else if(211===e)t=this.readI64();else if(217===e)n=this.lookU8(),t=this.decodeUtf8String(n,1);else if(218===e)n=this.lookU16(),t=this.decodeUtf8String(n,2);else if(219===e)n=this.lookU32(),t=this.decodeUtf8String(n,4);else if(220===e){if(0!==(r=this.readU16())){this.pushArrayState(r),this.complete();continue e}t=[]}else if(221===e){if(0!==(r=this.readU32())){this.pushArrayState(r),this.complete();continue e}t=[]}else if(222===e){if(0!==(r=this.readU16())){this.pushMapState(r),this.complete();continue e}t={}}else if(223===e){if(0!==(r=this.readU32())){this.pushMapState(r),this.complete();continue e}t={}}else if(196===e){var r=this.lookU8();t=this.decodeBinary(r,1)}else if(197===e)r=this.lookU16(),t=this.decodeBinary(r,2);else if(198===e)r=this.lookU32(),t=this.decodeBinary(r,4);else if(212===e)t=this.decodeExtension(1,0);else if(213===e)t=this.decodeExtension(2,0);else if(214===e)t=this.decodeExtension(4,0);else if(215===e)t=this.decodeExtension(8,0);else if(216===e)t=this.decodeExtension(16,0);else if(199===e)r=this.lookU8(),t=this.decodeExtension(r,1);else if(200===e)r=this.lookU16(),t=this.decodeExtension(r,2);else{if(201!==e)throw new Error("Unrecognized type byte: "+M(e));r=this.lookU32(),t=this.decodeExtension(r,4)}this.complete();for(var i=this.stack;i.length>0;){var a=i[i.length-1];if(0===a.type){if(a.array[a.position]=t,a.position++,a.position!==a.size)continue e;i.pop(),t=a.array}else{if(1===a.type){if(o=void 0,"string"!==(o=typeof t)&&"number"!==o)throw new Error("The type of key must be string or number but "+typeof t);a.key=t,a.type=2;continue e}if(a.map[a.key]=t,a.readCount++,a.readCount!==a.size){a.key=null,a.type=1;continue e}i.pop(),t=a.map}}return t}var o},e.prototype.readHeadByte=function(){return-1===this.headByte&&(this.headByte=this.readU8()),this.headByte},e.prototype.complete=function(){this.headByte=-1},e.prototype.readArraySize=function(){var e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:if(e<160)return e-144;throw new Error("Unrecognized array type byte: "+M(e))}},e.prototype.pushMapState=function(e){if(e>this.maxMapLength)throw new Error("Max length exceeded: map length ("+e+") > maxMapLengthLength ("+this.maxMapLength+")");this.stack.push({type:1,size:e,key:null,readCount:0,map:{}})},e.prototype.pushArrayState=function(e){if(e>this.maxArrayLength)throw new Error("Max length exceeded: array length ("+e+") > maxArrayLength ("+this.maxArrayLength+")");this.stack.push({type:0,size:e,array:new Array(e),position:0})},e.prototype.decodeUtf8String=function(e,t){var n;if(e>this.maxStrLength)throw new Error("Max length exceeded: UTF-8 byte length ("+e+") > maxStrLength ("+this.maxStrLength+")");if(this.bytes.byteLengthh?function(e,t,n){var r=e.subarray(t,t+n);return f.decode(r)}(this.bytes,i,e):d(this.bytes,i,e),this.pos+=t+e,r},e.prototype.stateIsMapKey=function(){return this.stack.length>0&&1===this.stack[this.stack.length-1].type},e.prototype.decodeBinary=function(e,t){if(e>this.maxBinLength)throw new Error("Max length exceeded: bin length ("+e+") > maxBinLength ("+this.maxBinLength+")");if(!this.hasRemaining(e+t))throw U;var n=this.pos+t,r=this.bytes.subarray(n,n+e);return this.pos+=t+e,r},e.prototype.decodeExtension=function(e,t){if(e>this.maxExtLength)throw new Error("Max length exceeded: ext length ("+e+") > maxExtLength ("+this.maxExtLength+")");var n=this.view.getInt8(this.pos+t),r=this.decodeBinary(e,t+1);return this.extensionCodec.decode(r,n,this.context)},e.prototype.lookU8=function(){return this.view.getUint8(this.pos)},e.prototype.lookU16=function(){return this.view.getUint16(this.pos)},e.prototype.lookU32=function(){return this.view.getUint32(this.pos)},e.prototype.readU8=function(){var e=this.view.getUint8(this.pos);return this.pos++,e},e.prototype.readI8=function(){var e=this.view.getInt8(this.pos);return this.pos++,e},e.prototype.readU16=function(){var e=this.view.getUint16(this.pos);return this.pos+=2,e},e.prototype.readI16=function(){var e=this.view.getInt16(this.pos);return this.pos+=2,e},e.prototype.readU32=function(){var e=this.view.getUint32(this.pos);return this.pos+=4,e},e.prototype.readI32=function(){var e=this.view.getInt32(this.pos);return this.pos+=4,e},e.prototype.readU64=function(){var e,t,n,r,i=(e=this.view,t=this.pos,n=e.getUint32(t),r=e.getUint32(t+4),n>Math.floor(Number.MAX_SAFE_INTEGER/4294967296)?BigInt(n)*BigInt(4294967296)+BigInt(r):4294967296*n+r);return this.pos+=8,i},e.prototype.readI64=function(){var e=g(this.view,this.pos);return this.pos+=8,e},e.prototype.readF32=function(){var e=this.view.getFloat32(this.pos);return this.pos+=4,e},e.prototype.readF64=function(){var e=this.view.getFloat64(this.pos);return this.pos+=8,e},e}(),H={};function V(e,t){return void 0===t&&(t=H),new q(t.extensionCodec,t.context,t.maxStrLength,t.maxBinLength,t.maxArrayLength,t.maxMapLength,t.maxExtLength).decode(e)}var W=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]1||s(e,t)}))})}function s(e,t){try{(n=i[e](t)).value instanceof G?Promise.resolve(n.value.v).then(u,c):l(a[0][2],n)}catch(e){l(a[0][3],e)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}};function Y(e){if(null==e)throw new Error("Assertion Failure: value must not be null nor undefined")}function Z(e){return null!=e[Symbol.asyncIterator]?e:function(e){return K(this,arguments,(function(){var t,n,r,i;return W(this,(function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,G(t.read())];case 3:return n=a.sent(),r=n.done,i=n.value,r?[4,G(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return Y(i),[4,G(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}(e)}var X=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))},Q=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]i&&(s=i-r),s))}),[n,h]),s.createElement("ul",{ref:x,"data-testid":t,role:a,"aria-labelledby":c,"aria-hidden":l,"aria-multiselectable":d,className:k},r.length?r.map((function(e,n){return s.createElement(m,{key:e.id,focusedItemRef:e.id===(null==h?void 0:h.id)?A:void 0,testid:t+".item-"+n,option:e,selectedOption:f,focusedOption:h,onSelect:p,onMouseDown:y,onMouseUp:b,onFocus:g,onKeyDown:v,canSelectAlreadySelected:w})})):s.createElement("li",{className:"dropdown-list-item dropdown-list__empty-message-item"},s.createElement("p",{"data-testid":t+".empty-message",className:"dropdown-list__empty-message"},_||"No available options")))}function v(e,t,n){var r=t.findIndex((function(e){return e.id===(n&&n.id)})),i=0;return r>-1?i=r:"top"===e&&(i=t.length-1),i}var y={id:"DROPDOWN_DESELECT_OPTION",title:""},b=/^[a-z0-9]$/i;t.CaretDownIcon=p,t.Dropdown=function(e){var t=e.testid,n=e.header,r=e.placeholder,i=e.customClassName,a=e.position,h=void 0===a?"bottom":a,m=e.role,w=e.isMultiSelect,_=void 0!==w&&w,x=e.options,A=e.selectedOption,k=e.onSelect,S=e.canSelectAlreadySelected,E=void 0!==S&&S,O=e.hasHeaderBoxShadow,C=void 0!==O&&O,T=e.hasDeselectOption,M=void 0===T||T,j=e.hasError,R=e.isDisabled,I=e.isMenuOpenHook,P=e.headerWithoutButton,L=e.customSpinner,D=e.shouldCloseOnSelect,B=void 0===D||D,N=e.onMenuVisibilityChange,F=e.areOptionsFetching,U=void 0!==F&&F,z=e.deselectOptionTitle,q=void 0===z?"":z,H=e.noOptionsMessage,V=e.headerButtonClassName,W=e.shouldJumpToQuery,G=void 0===W||W,K=e.shouldShowEmptyOptions,Y=void 0===K||K,Z=e.canOpenDropdownMenu,X=void 0===Z||Z,Q=o.useRef(null),J=l.__read(o.useState([]),2),$=J[0],ee=J[1],te=o.useState(!1),ne=l.__read(I||te,2),re=ne[0],ie=ne[1],ae=l.__read(o.useState(!1),2),oe=ae[0],se=ae[1],ue=l.__read(o.useState(""),2),ce=ue[0],le=ue[1],de=l.__read(o.useState(v(h,$,A)),2),fe=de[0],he=de[1],pe=l.__read(o.useState(!1),2),me=pe[0],ge=pe[1],ve=u("dropdown",i,{"dropdown--is-open":re,"dropdown--has-selected-option":Boolean(A||q),"dropdown--has-header-box-shadow":C,"dropdown--has-error":j,"dropdown--is-disabled":R||U}),ye=re&&(Y||x.length>0),be=L||s.createElement(d,{customClassName:"dropdown__spinner"});o.useEffect((function(){ee(x.length&&M?l.__spread([l.__assign(l.__assign({},y),{title:q})],x):x)}),[x,q,M]),o.useEffect((function(){var e;if(ce&&re){var t=function(e,t){return e.findIndex((function(e){return e.title.toLocaleLowerCase().startsWith(t.toLocaleLowerCase())}))}($,ce);t>-1&&he(t),e=setTimeout((function(){le("")}),500)}return function(){clearTimeout(e)}}),[ce,$,re]);var we,_e,xe,Ae=s.createElement("div",{className:"dropdown__header-button__default-content"},A&&A.icon,s.createElement("span",{className:"dropdown__header-button__text"},A?A.title:q||r),U?be:s.createElement(p,{"aria-hidden":!0})),ke=s.createElement(f,{testid:t+".header-button",customClassName:u("button","dropdown__header-button",V,{"dropdown__header-button--has-header-box-shadow":C}),isDisabled:R||U,onMouseDown:Ce,onMouseUp:Te,onClick:Oe,tabIndex:-1,"aria-haspopup":m,"aria-expanded":re,shouldFocus:me},n||Ae);return P&&(ke=s.createElement(o.Fragment,null,P)),we=Q.current,_e=Ee,xe=o.useRef(_e),o.useEffect((function(){xe.current=_e}),[_e]),o.useEffect((function(){function e(e){we&&e.target instanceof HTMLElement&&!we.contains(e.target)&&xe.current()}return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}}),[we]),o.useEffect((function(){re?document.documentElement.classList.add("dropdown--is-menu-open"):document.documentElement.classList.remove("dropdown--is-menu-open"),N&&N(re?"open":"closed")}),[re,N]),s.createElement("div",{ref:Q,role:m,className:ve,tabIndex:R?-1:0,onFocus:function(){document.hidden||oe||!X||R||ie(!0)},onBlur:function(){document.hidden||oe||!re||Oe(),ge(!1)},onKeyDown:function(e){var t,n=e.key;switch(n){case c.KEYBOARD_EVENT_KEY.ESCAPE:re&&(e.stopPropagation(),Oe());break;case c.KEYBOARD_EVENT_KEY.ENTER:re&&(e.stopPropagation(),e.preventDefault(),(null===(t=$[fe])||void 0===t?void 0:t.isDisabled)||Se($[fe]));break;case c.KEYBOARD_EVENT_KEY.ARROW_DOWN:e.stopPropagation(),e.preventDefault(),he((fe+1)%$.length);break;case c.KEYBOARD_EVENT_KEY.ARROW_UP:e.stopPropagation(),e.preventDefault(),he((fe||$.length)-1);break;default:G&&n.match(b)&&le(ce+n)}}},ke,s.createElement(g,{testid:t,isVisible:ye,customClassName:h,role:m,options:$,selectedOption:A,focusedOption:$[fe],onSelect:Se,onFocus:function(e){he($.findIndex((function(t){return t.id===e.id})))},onMouseDown:Ce,onMouseUp:Te,ariaLabelledBy:t+".header-button",ariaHidden:!re,isMultiSelect:_,canSelectAlreadySelected:E,noOptionsMessage:H}));function Se(e,t){!R&&e&&("DROPDOWN_DESELECT_OPTION"===e.id?k(null,t):k(e,t),he(v(h,$,e))),B?Oe():ge(!0)}function Ee(){ie(!1)}function Oe(){re?Ee():R||ie(!0)}function Ce(){se(!0)}function Te(){se(!1)}}},function(e,t,n){"use strict";(function(e){var r=n(118).default,i=n(51).default,a=n(52).default,o=n(120).default,s=n(121).default,u=n(122).default,c=n(126).default,l=n(104),d=n(3),f=n(102);function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=h(l),m=h(d),g=h(f);function v(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(e){a(e)}}function s(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))}var y=function(e){s(n,e);var t=u(n);function n(e,r){var i;a(this,n);for(var s=arguments.length,u=new Array(s>2?s-2:0),c=2;c-1){var a=r.getAttribute("href");if(a&&-1===a.toLowerCase().indexOf("https:")&&-1===a.toLowerCase().indexOf("http:")&&0!==a.indexOf("//")){var o="".concat(window.location.protocol,"//").concat(window.location.host);if(0===a.indexOf("/"))o+=a;else{var s=window.location.pathname.split("/");s.pop(),o+="".concat(s.join("/"),"/").concat(a)}t.push(o)}else if(0===(null==a?void 0:a.indexOf("//"))){var u=window.location.protocol+a;t.push(u)}else a&&t.push(a)}}return t}function x(e){return new Promise((function(t,n){try{var r=window.open(e,"_blank"),i=0,a=setInterval((function(){if(50===(i+=1))return clearInterval(a),void n(new y({type:"MESSAGE_NOT_RECEIVED"},"Couldn't open Pera Wallet, please try again."));r&&(!0===r.closed&&(clearInterval(a),n(new y({type:"OPERATION_CANCELLED"},"Operation cancelled by user"))),b.sendMessage({message:{type:"TAB_OPEN"},origin:e,targetWindow:r}))}),700);b.setupListener({onReceiveMessage:function(e){"TAB_OPEN_RECEIVED"===e.data.message.type&&(clearInterval(a),t(r))}})}catch(e){n(e)}}))}function A(e){var t=document.createElement("div");return t.setAttribute("id",e),document.body.appendChild(t),t}function k(){A("pera-wallet-redirect-modal-wrapper").innerHTML=""}function S(){A("pera-wallet-sign-txn-toast-wrapper").innerHTML=""}function E(e){var t=document.getElementById(e);t&&t.remove()}var O="PeraWallet.Wallet",C="walletconnect";function T(){return"undefined"==typeof localStorage?void 0:localStorage}function M(e,t){var n;null===(n=T())||void 0===n||n.setItem(O,JSON.stringify({type:t||"pera-wallet",accounts:e,selectedAccount:e[0]}))}function j(){var e,t=null===(e=T())||void 0===e?void 0:e.getItem(O);return t?JSON.parse(t):null}function R(){return new Promise((function(e,t){var n,r;try{null===(n=T())||void 0===n||n.removeItem(C),null===(r=T())||void 0===r||r.removeItem(O),e(void 0)}catch(e){t(e)}}))}function I(e){for(var t=e.slice(),n=t.length-1;n>0;n--){var r=Math.floor(Math.random()*(n+1)),i=[t[r],t[n]];t[n]=i[0],t[r]=i[1]}return t}function P(){return v(this,void 0,void 0,r().mark((function e(){var t,n;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={bridgeURL:"",webWalletURL:"",isWebWalletAvailable:!1,shouldDisplayNewBadge:!1,shouldUseSound:!0,silent:!1,promoteMobile:!1},e.prev=1,e.next=4,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return fetch(e,t).then((function(e){return e.json()})).then((function(e){return e}))}("https://wc.perawallet.app/config.json",{cache:"no-store"});case 4:void 0!==(n=e.sent).web_wallet&&n.web_wallet_url&&(t.isWebWalletAvailable=n.web_wallet),void 0!==n.display_new_badge&&(t.shouldDisplayNewBadge=n.display_new_badge),void 0!==n.use_sound&&(t.shouldUseSound=n.use_sound),void 0!==n.silent&&(t.silent=n.silent),void 0!==n.promote_mobile&&(t.promoteMobile=n.promote_mobile),t=Object.assign(Object.assign({},t),{bridgeURL:I(n.servers||[])[0]||"",webWalletURL:n.web_wallet_url||""}),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),console.log(e.t0);case 11:return e.abrupt("return",t);case 12:case"end":return e.stop()}}),e,null,[[1,8]])})))}function L(e){return Uint8Array.from(window.atob(e),(function(e){return e.charCodeAt(0)}))}function D(e,t){return{id:Date.now()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3)),jsonrpc:"2.0",method:e,params:t}}function B(){return"undefined"!=typeof navigator}function N(){return B()&&/Android/i.test(navigator.userAgent)}function F(){return B()&&/iPhone|iPod|Android/i.test(navigator.userAgent)}var U=N()?"algorand://":"perawallet-wc://";function z(e){return{ROOT:"https://".concat(e),CONNECT:"https://".concat(e,"/connect"),TRANSACTION_SIGN:"https://".concat(e,"/transaction/sign")}}function q(e){var t=e.method,n=e.signTxnRequestParams,i=e.signer,a=e.chainId,o=e.webWalletURL,s=e.resolve,u=e.reject,c=z(o);!function(){v(this,void 0,void 0,r().mark((function e(){var o,l,d;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,x(c.TRANSACTION_SIGN);case 3:(o=e.sent)&&("SIGN_TXN"===t?l={type:"SIGN_TXN",txn:n}:"SIGN_DATA"===t&&i&&a&&(l={type:"SIGN_DATA",data:n,signer:i,chainId:a}),l&&b.sendMessage({message:l,origin:c.TRANSACTION_SIGN,targetWindow:o})),d=setInterval((function(){!0===(null==o?void 0:o.closed)&&(u(new y({type:"".concat(t,"_CANCELLED")},"Transaction signing is cancelled by user.")),clearInterval(d))}),2e3),b.setupListener({onReceiveMessage:function(e){return function(e){var t=e.event,n=e.newPeraWalletTab,r=e.method,i=e.resolve,a=e.reject;switch(t.data.message.type){case"SIGN_TXN_CALLBACK":null==n||n.close(),i(t.data.message.signedTxns.map((function(e){return L(e.signedTxn)})));break;case"SIGN_DATA_CALLBACK":null==n||n.close(),i(t.data.message.signedData.map((function(e){return L(e.signedData)})));break;case"SIGN_TXN_NETWORK_MISMATCH":a(new y({type:"".concat(r,"_NETWORK_MISMATCH"),detail:t.data.message.error},t.data.message.error||"Network mismatch"));break;case"SIGN_TXN_CALLBACK_ERROR":null==n||n.close(),a(new y({type:"".concat(r,"_CANCELLED")},t.data.message.error));break;case"SESSION_DISCONNECTED":null==n||n.close(),R(),a(new y({type:"SESSION_DISCONNECTED",detail:t.data.message.error},t.data.message.error))}}({event:e,newPeraWalletTab:o,method:t,resolve:s,reject:u})}}),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),u(e.t0);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))}()}function H(e){var t=e.webWalletURL,n=e.chainId,i=e.resolve,a=e.reject,o=z(t);return function(){return v(this,void 0,void 0,r().mark((function e(){var t,u;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,x(o.CONNECT);case 3:(t=e.sent)&&b.sendMessage({message:{type:"CONNECT",data:Object.assign(Object.assign({},w()),{chainId:n})},origin:o.CONNECT,targetWindow:t}),u=setInterval((function(){!0===(null==t?void 0:t.closed)&&(a(new y({type:"CONNECT_CANCELLED"},"Connect is cancelled by user")),clearInterval(u),s())}),2e3),b.setupListener({onReceiveMessage:function(e){return function(e){var t=e.event,n=e.newPeraWalletTab,r=e.resolve,i=e.reject;if(r&&"CONNECT_CALLBACK"===t.data.message.type){var a=t.data.message.data.addresses;M(a,"pera-wallet-web"),r(a),E("pera-wallet-connect-modal-wrapper"),null==n||n.close()}else"CONNECT_NETWORK_MISMATCH"===t.data.message.type&&(i(new y({type:"CONNECT_NETWORK_MISMATCH",detail:t.data.message.error},t.data.message.error||"Your wallet is connected to a different network to this dApp. Update your wallet to the correct network (MainNet or TestNet) to continue.")),E("pera-wallet-connect-modal-wrapper"),null==n||n.close())}({event:e,newPeraWalletTab:t,resolve:i,reject:a})}}),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),s(),a(e.t0);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))};function s(){E("pera-wallet-connect-modal-wrapper")}}function V(e){var t,n=e.isWebWalletAvailable,r=e.shouldDisplayNewBadge,i=e.shouldUseSound,a=e.compactMode,o=e.promoteMobile;return{open:(t={isWebWalletAvailable:n,shouldDisplayNewBadge:r,shouldUseSound:i,compactMode:a,promoteMobile:o},function(e){if(!document.getElementById("pera-wallet-connect-modal-wrapper")){var n=A("pera-wallet-connect-modal-wrapper"),r="".concat(e,"&algorand=true"),i=t.isWebWalletAvailable,a=t.shouldDisplayNewBadge,o=t.shouldUseSound,s=t.compactMode,u=t.promoteMobile;n.innerHTML='')}}),close:function(){return E("pera-wallet-connect-modal-wrapper")}}}"undefined"!=typeof window&&(window.global=window,window.Buffer=window.Buffer||n(19).Buffer,Promise.resolve().then((function(){return n(236)}))),t.PERA_DOWNLOAD_URL="https://perawallet.app/download/",t.PERA_WALLET_APP_DEEP_LINK=U,t.PERA_WALLET_CONNECT_MODAL_ID="pera-wallet-connect-modal-wrapper",t.PERA_WALLET_MODAL_CLASSNAME="pera-wallet-modal",t.PERA_WALLET_REDIRECT_MODAL_ID="pera-wallet-redirect-modal-wrapper",t.PERA_WALLET_SIGN_TXN_MODAL_ID="pera-wallet-sign-txn-modal-wrapper",t.PERA_WALLET_SIGN_TXN_TOAST_ID="pera-wallet-sign-txn-toast-wrapper",t.PeraWalletConnect=function(){function t(e){a(this,t),this.bridge=(null==e?void 0:e.bridge)||"",this.connector=null,this.shouldShowSignTxnToast=void 0===(null==e?void 0:e.shouldShowSignTxnToast)||e.shouldShowSignTxnToast,this.chainId=null==e?void 0:e.chainId,this.compactMode=(null==e?void 0:e.compactMode)||!1}return i(t,[{key:"platform",get:function(){return function(){var e=j(),t=null;return"pera-wallet"===(null==e?void 0:e.type)?t="mobile":"pera-wallet-web"===(null==e?void 0:e.type)&&(t="web"),t}()}},{key:"isConnected",get:function(){var e;return"mobile"===this.platform?!!this.connector:"web"===this.platform&&!!(null===(e=j())||void 0===e?void 0:e.accounts.length)}},{key:"connect",value:function(){var e=this;return new Promise((function(t,n){return v(e,void 0,void 0,r().mark((function e(){var i,a,o,s,u,c,l,d,f,h=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!(null===(i=this.connector)||void 0===i?void 0:i.connected)){e.next=9;break}return e.prev=2,e.next=5,this.connector.killSession();case 5:e.next=9;break;case 7:e.prev=7,e.t0=e.catch(2);case 9:return e.next=11,P();case 11:return a=e.sent,o=a.isWebWalletAvailable,s=a.bridgeURL,u=a.webWalletURL,c=a.shouldDisplayNewBadge,l=a.shouldUseSound,d=a.promoteMobile,f=H({resolve:t,reject:n,webWalletURL:u,chainId:this.chainId,isCompactMode:this.compactMode}),o&&(window.onWebWalletConnect=f),this.connector=new p.default({bridge:this.bridge||s||"https://bridge.walletconnect.org",qrcodeModal:V({isWebWalletAvailable:o,shouldDisplayNewBadge:c,shouldUseSound:l,compactMode:this.compactMode,promoteMobile:d})}),e.next=23,this.connector.createSession({chainId:this.chainId||4160});case 23:!function(e,t){var n,r,i,a,o=document.getElementById(e),s=null===(r=null===(n=null==o?void 0:o.querySelector(e.replace("-wrapper","")))||void 0===n?void 0:n.shadowRoot)||void 0===r?void 0:r.querySelector(".pera-wallet-modal"),u=null===(a=null===(i=null==s?void 0:s.querySelector("pera-wallet-modal-header"))||void 0===i?void 0:i.shadowRoot)||void 0===a?void 0:a.getElementById("pera-wallet-modal-header-close-button");null==u||u.addEventListener("click",(function(){t(),E(e)}))}("pera-wallet-connect-modal-wrapper",(function(){return n(new y({type:"CONNECT_MODAL_CLOSED"},"Connect modal is closed by user"))})),this.connector.on("connect",(function(e,r){var i,a;e&&n(e),t((null===(i=h.connector)||void 0===i?void 0:i.accounts)||[]),M((null===(a=h.connector)||void 0===a?void 0:a.accounts)||[])})),e.next=30;break;case 27:e.prev=27,e.t1=e.catch(0),console.log(e.t1),n(new y({type:"SESSION_CONNECT",detail:e.t1},e.t1.message||"There was an error while connecting to Pera Wallet"));case 30:case"end":return e.stop()}}),e,this,[[0,27],[2,7]])})))}))}},{key:"reconnectSession",value:function(){var e=this;return new Promise((function(t,n){return v(e,void 0,void 0,r().mark((function e(){var i,a,o,s;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,o=j()){e.next=4;break}return e.abrupt("return",void t([]));case 4:if("pera-wallet-web"!==(null==o?void 0:o.type)){e.next=10;break}return e.next=7,P();case 7:s=e.sent,s.isWebWalletAvailable?t(o.accounts||[]):n(new y({type:"SESSION_RECONNECT",detail:"Pera Web is not available"},"Pera Web is not available"));case 10:this.connector&&t(this.connector.accounts||[]),this.bridge=(null===(i=function(){var e,t=null===(e=T())||void 0===e?void 0:e.getItem(C);return t?JSON.parse(t):null}())||void 0===i?void 0:i.bridge)||"",this.bridge&&(this.connector=new p.default({bridge:this.bridge}),t((null===(a=this.connector)||void 0===a?void 0:a.accounts)||[])),this.isConnected||t([]),e.next=18;break;case 13:return e.prev=13,e.t0=e.catch(0),e.next=17,this.disconnect();case 17:n(new y({type:"SESSION_RECONNECT",detail:e.t0},e.t0.message||"There was an error while reconnecting to Pera Wallet"));case 18:case"end":return e.stop()}}),e,this,[[0,13]])})))}))}},{key:"disconnect",value:function(){var e;return v(this,void 0,void 0,r().mark((function t(){var n,i=this;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.isConnected&&"mobile"===this.platform&&(null==(n=null===(e=this.connector)||void 0===e?void 0:e.killSession())||n.then((function(){i.connector=null}))),t.next=3,R();case 3:case"end":return t.stop()}}),t,this)})))}},{key:"signTransactionWithMobile",value:function(e){return v(this,void 0,void 0,r().mark((function t(){var n,i,a,o;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=D("algo_signTxn",[e]),t.prev=1,t.prev=2,t.next=5,P();case 5:return i=t.sent,a=i.silent,t.next=9,this.connector.sendCustomRequest(n,{forcePushNotification:!a});case 9:return o=t.sent.filter(Boolean),t.abrupt("return","string"==typeof o[0]?o.map(L):o.map((function(e){return Uint8Array.from(e)})));case 13:return t.prev=13,t.t0=t.catch(2),t.next=17,Promise.reject(new y({type:"SIGN_TRANSACTIONS",detail:t.t0},t.t0.message||"Failed to sign transaction"));case 17:return t.abrupt("return",t.sent);case 18:return t.prev=18,E("pera-wallet-redirect-modal-wrapper"),E("pera-wallet-sign-txn-toast-wrapper"),t.finish(18);case 21:case"end":return t.stop()}}),t,this,[[1,,18,21],[2,13]])})))}},{key:"signTransactionWithWeb",value:function(e,t){return new Promise((function(n,r){return q({signTxnRequestParams:e,webWalletURL:t,method:"SIGN_TXN",resolve:n,reject:r})}))}},{key:"signDataWithMobile",value:function(e){var t=e.data,n=e.signer,i=e.chainId;return v(this,void 0,void 0,r().mark((function e(){var a,o,s,u;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=D("algo_signData",t.map((function(e){return Object.assign(Object.assign({},e),{signer:n,chainId:i})}))),e.prev=1,e.prev=2,e.next=5,P();case 5:return o=e.sent,s=o.silent,e.next=9,this.connector.sendCustomRequest(a,{forcePushNotification:!s});case 9:return u=e.sent.filter(Boolean),e.abrupt("return","string"==typeof u[0]?u.map(L):u.map((function(e){return Uint8Array.from(e)})));case 13:return e.prev=13,e.t0=e.catch(2),e.next=17,Promise.reject(new y({type:"SIGN_TRANSACTIONS",detail:e.t0},e.t0.message||"Failed to sign transaction"));case 17:return e.abrupt("return",e.sent);case 18:return e.prev=18,E("pera-wallet-redirect-modal-wrapper"),E("pera-wallet-sign-txn-toast-wrapper"),e.finish(18);case 21:case"end":return e.stop()}}),e,this,[[1,,18,21],[2,13]])})))}},{key:"signDataWithWeb",value:function(e){var t=e.data,n=e.signer,r=e.chainId,i=e.webWalletURL;return new Promise((function(e,a){return q({method:"SIGN_DATA",signTxnRequestParams:t,signer:n,chainId:r,webWalletURL:i,resolve:e,reject:a})}))}},{key:"signTransaction",value:function(t,n){return v(this,void 0,void 0,r().mark((function i(){var a,o,s;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if("mobile"!==this.platform||(F()?k():!F()&&this.shouldShowSignTxnToast&&S(),this.connector)){r.next=2;break}throw new Error("PeraWalletConnect was not initialized correctly.");case 2:if(a=t.flatMap((function(t){return t.map((function(t){return function(t,n){var r;n&&!(t.signers||[]).includes(n)&&(r=[]);var i,a={txn:(i=t.txn,e.from(m.default.encodeUnsignedTransaction(i)).toString("base64"))};return Array.isArray(r)&&(a.signers=r),t.authAddr&&(a.authAddr=t.authAddr),t.message&&(a.message=t.message),t.msig&&(a.msig=t.msig),a}(t,n)}))})),"web"!==this.platform){r.next=9;break}return r.next=6,P();case 6:return o=r.sent,s=o.webWalletURL,r.abrupt("return",this.signTransactionWithWeb(a,s));case 9:return r.abrupt("return",this.signTransactionWithMobile(a));case 10:case"end":return r.stop()}}),i,this)})))}},{key:"signData",value:function(t,n){return v(this,void 0,void 0,r().mark((function i(){var a,o,s,u;return r().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=this.chainId||4160,"mobile"!==this.platform||(F()?k():!F()&&this.shouldShowSignTxnToast&&S(),this.connector)){r.next=3;break}throw new Error("PeraWalletConnect was not initialized correctly.");case 3:if("web"!==this.platform){r.next=9;break}return r.next=6,P();case 6:return o=r.sent,s=o.webWalletURL,r.abrupt("return",this.signDataWithWeb({data:t,signer:n,chainId:a,webWalletURL:s}));case 9:return u=t.map((function(t){return Object.assign(Object.assign({},t),{data:e.from(t.data).toString("base64")})})),r.abrupt("return",this.signDataWithMobile({data:u,signer:n,chainId:a}));case 11:case"end":return r.stop()}}),i,this)})))}}]),t}(),t.closePeraWalletSignTxnToast=function(){E("pera-wallet-sign-txn-toast-wrapper")},t.detectBrowser=function(){if(!B())return null;var e=navigator.userAgent;return e.match(/DuckDuckGo/i)?"DuckDuckGo":e.match(/OPX/i)?"Opera GX":navigator.brave?"Brave":g.default.getParser(navigator.userAgent).getBrowserName()},t.isAndroid=N,t.isIOS=function(){return B()&&/iPhone|iPad|iPod/i.test(navigator.userAgent)},t.isMobile=F,t.removeModalWrapperFromDOM=E}).call(this,n(19).Buffer)},function(e,t,n){var r=n(119).default;function i(){"use strict";e.exports=i=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},n=Object.prototype,a=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(T){l=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var i=t&&t.prototype instanceof p?t:p,a=Object.create(i.prototype),o=new E(r||[]);return a._invoke=function(e,t,n){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return C()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=A(o,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=f(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,o),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(T){return{type:"throw",arg:T}}}t.wrap=d;var h={};function p(){}function m(){}function g(){}var v={};l(v,s,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(O([])));b&&b!==n&&a.call(b,s)&&(v=b);var w=g.prototype=p.prototype=Object.create(v);function _(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function n(i,o,s,u){var c=f(e[i],e,o);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==r(d)&&a.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):t.resolve(d).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var i;this._invoke=function(e,r){function a(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(a,a):a()}}function A(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,A(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=f(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,h;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function O(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=a.call(i,"catchLoc"),u=a.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:O(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(100);e.exports=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(123),i=n(124),a=n(125);e.exports=function(e){var t=i();return function(){var n,i=r(e);if(t){var o=r(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return a(this,n)}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(119).default,i=n(120);e.exports=function(e,t){if(t&&("object"===r(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(123),i=n(100),a=n(207),o=n(208);function s(t){var n="function"===typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!a(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return o(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,s(t)}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r=n(31);n.o(r,"payloadId")&&n.d(t,"payloadId",(function(){return r.payloadId}));r.isNode},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(55),n(30);function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=Date.now()*Math.pow(10,e),n=Math.floor(Math.random()*Math.pow(10,e));return t+n}},function(e,t,n){"use strict"},function(e,t,n){"use strict"},function(e,t,n){"use strict"},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0||e===t?t:t-1}function y(e){for(var t,n,r=1,i=e.length,a=e[0]+"";rc^n?1:-1;for(s=(u=i.length)<(c=a.length)?u:c,o=0;oa[o]^n?1:-1;return u==c?0:u>c^n?1:-1}function w(e,t,n,r){if(en||e!==u(e))throw Error(c+(r||"Argument")+("number"==typeof e?en?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function _(e){var t=e.c.length-1;return v(e.e/f)==t&&e.c[t]%2!=0}function x(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function A(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else tM?v.c=v.e=null:e.e=10;d/=10,c++);return void(c>M?v.c=v.e=null:(v.e=c,v.c=[e]))}g=String(e)}else{if(!o.test(g=String(e)))return i(v,g,p);v.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(c=g.indexOf("."))>-1&&(g=g.replace(".","")),(d=g.search(/e/i))>0?(c<0&&(c=d),c+=+g.slice(d+1),g=g.substring(0,d)):c<0&&(c=g.length)}else{if(w(t,2,L.length,"Base"),10==t&&D)return z(v=new B(e),S+v.e+1,E);if(g=String(e),p="number"==typeof e){if(0*e!=0)return i(v,g,p,t);if(v.s=1/e<0?(g=g.slice(1),-1):1,B.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(l+e)}else v.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(n=L.slice(0,t),c=d=0,m=g.length;dc){c=m;continue}}else if(!s&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){s=!0,d=-1,c=0;continue}return i(v,String(e),p,t)}p=!1,(c=(g=r(g,t,10,v.s)).indexOf("."))>-1?g=g.replace(".",""):c=g.length}for(d=0;48===g.charCodeAt(d);d++);for(m=g.length;48===g.charCodeAt(--m););if(g=g.slice(d,++m)){if(m-=d,p&&B.DEBUG&&m>15&&(e>h||e!==u(e)))throw Error(l+v.s*e);if((c=c-d-1)>M)v.c=v.e=null;else if(c=C)?x(u,o):A(u,o,"0");else if(a=(e=z(new B(e),t,n)).e,s=(u=y(e.c)).length,1==r||2==r&&(t<=a||a<=O)){for(;ss){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=a-s)>0)for(a+1==s&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function F(e,t){for(var n,r=1,i=new B(e[0]);r=10;i/=10,r++);return(n=r+n*f-1)>M?e.c=e.e=null:n=10;c/=10,i++);if((a=t-i)<0)a+=f,o=t,m=(l=g[h=0])/v[i-o-1]%10|0;else if((h=s((a+1)/f))>=g.length){if(!r)break e;for(;g.length<=h;g.push(0));l=m=0,i=1,o=(a%=f)-f+1}else{for(l=c=g[h],i=1;c>=10;c/=10,i++);m=(o=(a%=f)-f+i)<0?0:l/v[i-o-1]%10|0}if(r=r||t<0||null!=g[h+1]||(o<0?l:l%v[i-o-1]),r=n<4?(m||r)&&(0==n||n==(e.s<0?3:2)):m>5||5==m&&(4==n||r||6==n&&(a>0?o>0?l/v[i-o]:0:g[h-1])%10&1||n==(e.s<0?8:7)),t<1||!g[0])return g.length=0,r?(t-=e.e+1,g[0]=v[(f-t%f)%f],e.e=-t||0):g[0]=e.e=0,e;if(0==a?(g.length=h,c=1,h--):(g.length=h+1,c=v[f-a],g[h]=o>0?u(l/v[i-o]%v[o])*c:0),r)for(;;){if(0==h){for(a=1,o=g[0];o>=10;o/=10,a++);for(o=g[0]+=c,c=1;o>=10;o/=10,c++);a!=c&&(e.e++,g[0]==d&&(g[0]=1));break}if(g[h]+=c,g[h]!=d)break;g[h--]=0,c=1}for(a=g.length;0===g[--a];g.pop());}e.e>M?e.c=e.e=null:e.e=C?x(t,n):A(t,n,"0"),e.s<0?"-"+t:t)}return B.clone=e,B.ROUND_UP=0,B.ROUND_DOWN=1,B.ROUND_CEIL=2,B.ROUND_FLOOR=3,B.ROUND_HALF_UP=4,B.ROUND_HALF_DOWN=5,B.ROUND_HALF_EVEN=6,B.ROUND_HALF_CEIL=7,B.ROUND_HALF_FLOOR=8,B.EUCLID=9,B.config=B.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(c+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(w(n=e[t],0,g,t),S=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(w(n=e[t],0,8,t),E=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(w(n[0],-g,0,t),w(n[1],0,g,t),O=n[0],C=n[1]):(w(n,-g,g,t),O=-(C=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)w(n[0],-g,-1,t),w(n[1],1,g,t),T=n[0],M=n[1];else{if(w(n,-g,g,t),!n)throw Error(c+t+" cannot be zero: "+n);T=-(M=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(c+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw j=!n,Error(c+"crypto unavailable");j=n}else j=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(w(n=e[t],0,9,t),R=n),e.hasOwnProperty(t="POW_PRECISION")&&(w(n=e[t],0,g,t),I=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(c+t+" not an object: "+n);P=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(c+t+" invalid: "+n);D="0123456789"==n.slice(0,10),L=n}}return{DECIMAL_PLACES:S,ROUNDING_MODE:E,EXPONENTIAL_AT:[O,C],RANGE:[T,M],CRYPTO:j,MODULO_MODE:R,POW_PRECISION:I,FORMAT:P,ALPHABET:L}},B.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!B.DEBUG)return!0;var t,n,r=e.c,i=e.e,a=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===a||-1===a)&&i>=-g&&i<=g&&i===u(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break e}if((t=(i+1)%f)<1&&(t+=f),String(r[0]).length==t){for(t=0;t=d||n!==u(n))break e;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===a||1===a||-1===a))return!0;throw Error(c+"Invalid BigNumber: "+e)},B.maximum=B.max=function(){return F(arguments,a.lt)},B.minimum=B.min=function(){return F(arguments,a.gt)},B.random=function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return u(Math.random()*e)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var n,r,i,a,o,l=0,d=[],h=new B(k);if(null==e?e=S:w(e,0,g),a=s(e/f),j)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(a*=2));l>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),n[l]=r[0],n[l+1]=r[1]):(d.push(o%1e14),l+=2);l=a/2}else{if(!crypto.randomBytes)throw j=!1,Error(c+"crypto unavailable");for(n=crypto.randomBytes(a*=7);l=9e15?crypto.randomBytes(7).copy(n,l):(d.push(o%1e14),l+=7);l=a/7}if(!j)for(;l=10;o/=10,l++);ln-1&&(null==o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/n|0,o[i]%=n)}return o.reverse()}return function(r,i,a,o,s){var u,c,l,d,f,h,p,m,g=r.indexOf("."),v=S,b=E;for(g>=0&&(d=I,I=0,r=r.replace(".",""),h=(m=new B(i)).pow(r.length-g),I=d,m.c=t(A(y(h.c),h.e,"0"),10,a,e),m.e=m.c.length),l=d=(p=t(r,i,a,s?(u=L,e):(u=e,L))).length;0==p[--d];p.pop());if(!p[0])return u.charAt(0);if(g<0?--l:(h.c=p,h.e=l,h.s=o,p=(h=n(h,m,v,b,a)).c,f=h.r,l=h.e),g=p[c=l+v+1],d=a/2,f=f||c<0||null!=p[c+1],f=b<4?(null!=g||f)&&(0==b||b==(h.s<0?3:2)):g>d||g==d&&(4==b||f||6==b&&1&p[c-1]||b==(h.s<0?8:7)),c<1||!p[0])r=f?A(u.charAt(1),-v,u.charAt(0)):u.charAt(0);else{if(p.length=c,f)for(--a;++p[--c]>a;)p[c]=0,c||(++l,p=[1].concat(p));for(d=p.length;!p[--d];);for(g=0,r="";g<=d;r+=u.charAt(p[g++]));r=A(r,l,u.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,i,a,o,s=0,u=e.length,c=t%m,l=t/m|0;for(e=e.slice();u--;)s=((i=c*(a=e[u]%m)+(r=l*a+(o=e[u]/m|0)*c)%m*m+s)/n|0)+(r/m|0)+l*o,e[u]=i%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;it[i]?1:-1;break}return a}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]1;e.splice(0,1));}return function(r,i,a,o,s){var c,l,h,p,m,g,y,b,w,_,x,A,k,S,E,O,C,T=r.s==i.s?1:-1,M=r.c,j=i.c;if(!M||!M[0]||!j||!j[0])return new B(r.s&&i.s&&(M?!j||M[0]!=j[0]:j)?M&&0==M[0]||!j?0*T:T/0:NaN);for(w=(b=new B(T)).c=[],T=a+(l=r.e-i.e)+1,s||(s=d,l=v(r.e/f)-v(i.e/f),T=T/f|0),h=0;j[h]==(M[h]||0);h++);if(j[h]>(M[h]||0)&&l--,T<0)w.push(1),p=!0;else{for(S=M.length,O=j.length,h=0,T+=2,(m=u(s/(j[0]+1)))>1&&(j=e(j,m,s),M=e(M,m,s),O=j.length,S=M.length),k=O,x=(_=M.slice(0,O)).length;x=s/2&&E++;do{if(m=0,(c=t(j,_,O,x))<0){if(A=_[0],O!=x&&(A=A*s+(_[1]||0)),(m=u(A/E))>1)for(m>=s&&(m=s-1),y=(g=e(j,m,s)).length,x=_.length;1==t(g,_,y,x);)m--,n(g,O=10;T/=10,h++);z(b,a+(b.e=h+l*f-1)+1,o,p)}else b.e=l,b.r=+p;return b}}(),i=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,n=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(a,o,s,u){var l,d=s?o:o.replace(i,"");if(r.test(d))a.s=isNaN(d)?null:d<0?-1:1;else{if(!s&&(d=d.replace(e,(function(e,t,n){return l="x"==(n=n.toLowerCase())?16:"b"==n?2:8,u&&u!=l?e:t})),u&&(l=u,d=d.replace(t,"$1").replace(n,"0.$1")),o!=d))return new B(d,l);if(B.DEBUG)throw Error(c+"Not a"+(u?" base "+u:"")+" number: "+o);a.s=null}a.c=a.e=null}}(),a.absoluteValue=a.abs=function(){var e=new B(this);return e.s<0&&(e.s=1),e},a.comparedTo=function(e,t){return b(this,new B(e,t))},a.decimalPlaces=a.dp=function(e,t){var n,r,i,a=this;if(null!=e)return w(e,0,g),null==t?t=E:w(t,0,8),z(new B(a),e+a.e+1,t);if(!(n=a.c))return null;if(r=((i=n.length-1)-v(this.e/f))*f,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},a.dividedBy=a.div=function(e,t){return n(this,new B(e,t),S,E)},a.dividedToIntegerBy=a.idiv=function(e,t){return n(this,new B(e,t),0,1)},a.exponentiatedBy=a.pow=function(e,t){var n,r,i,a,o,l,d,h,p=this;if((e=new B(e)).c&&!e.isInteger())throw Error(c+"Exponent not an integer: "+q(e));if(null!=t&&(t=new B(t)),o=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return h=new B(Math.pow(+q(p),o?e.s*(2-_(e)):+q(e))),t?h.mod(t):h;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new B(NaN);(r=!l&&p.isInteger()&&t.isInteger())&&(p=p.mod(t))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||o&&p.c[1]>=24e7:p.c[0]<8e13||o&&p.c[0]<=9999975e7)))return a=p.s<0&&_(e)?-0:0,p.e>-1&&(a=1/a),new B(l?1/a:a);I&&(a=s(I/f+2))}for(o?(n=new B(.5),l&&(e.s=1),d=_(e)):d=(i=Math.abs(+q(e)))%2,h=new B(k);;){if(d){if(!(h=h.times(p)).c)break;a?h.c.length>a&&(h.c.length=a):r&&(h=h.mod(t))}if(i){if(0===(i=u(i/2)))break;d=i%2}else if(z(e=e.times(n),e.e+1,1),e.e>14)d=_(e);else{if(0===(i=+q(e)))break;d=i%2}p=p.times(p),a?p.c&&p.c.length>a&&(p.c.length=a):r&&(p=p.mod(t))}return r?h:(l&&(h=k.div(h)),t?h.mod(t):a?z(h,I,E,undefined):h)},a.integerValue=function(e){var t=new B(this);return null==e?e=E:w(e,0,8),z(t,t.e+1,e)},a.isEqualTo=a.eq=function(e,t){return 0===b(this,new B(e,t))},a.isFinite=function(){return!!this.c},a.isGreaterThan=a.gt=function(e,t){return b(this,new B(e,t))>0},a.isGreaterThanOrEqualTo=a.gte=function(e,t){return 1===(t=b(this,new B(e,t)))||0===t},a.isInteger=function(){return!!this.c&&v(this.e/f)>this.c.length-2},a.isLessThan=a.lt=function(e,t){return b(this,new B(e,t))<0},a.isLessThanOrEqualTo=a.lte=function(e,t){return-1===(t=b(this,new B(e,t)))||0===t},a.isNaN=function(){return!this.s},a.isNegative=function(){return this.s<0},a.isPositive=function(){return this.s>0},a.isZero=function(){return!!this.c&&0==this.c[0]},a.minus=function(e,t){var n,r,i,a,o=this,s=o.s;if(t=(e=new B(e,t)).s,!s||!t)return new B(NaN);if(s!=t)return e.s=-t,o.plus(e);var u=o.e/f,c=e.e/f,l=o.c,h=e.c;if(!u||!c){if(!l||!h)return l?(e.s=-t,e):new B(h?o:NaN);if(!l[0]||!h[0])return h[0]?(e.s=-t,e):new B(l[0]?o:3==E?-0:0)}if(u=v(u),c=v(c),l=l.slice(),s=u-c){for((a=s<0)?(s=-s,i=l):(c=u,i=h),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(r=(a=(s=l.length)<(t=h.length))?s:t,s=t=0;t0)for(;t--;l[n++]=0);for(t=d-1;r>s;){if(l[--r]=0;){for(n=0,p=A[i]%w,g=A[i]/w|0,a=i+(o=u);a>i;)n=((c=p*(c=x[--o]%w)+(s=g*c+(l=x[o]/w|0)*p)%w*w+y[a]+n)/b|0)+(s/w|0)+g*l,y[a--]=c%b;y[a]=n}return n?++r:y.splice(0,1),U(e,y,r)},a.negated=function(){var e=new B(this);return e.s=-e.s||null,e},a.plus=function(e,t){var n,r=this,i=r.s;if(t=(e=new B(e,t)).s,!i||!t)return new B(NaN);if(i!=t)return e.s=-t,r.minus(e);var a=r.e/f,o=e.e/f,s=r.c,u=e.c;if(!a||!o){if(!s||!u)return new B(i/0);if(!s[0]||!u[0])return u[0]?e:new B(s[0]?r:0*i)}if(a=v(a),o=v(o),s=s.slice(),i=a-o){for(i>0?(o=a,n=u):(i=-i,n=s),n.reverse();i--;n.push(0));n.reverse()}for((i=s.length)-(t=u.length)<0&&(n=u,u=s,s=n,t=i),i=0;t;)i=(s[--t]=s[t]+u[t]+i)/d|0,s[t]=d===s[t]?0:s[t]%d;return i&&(s=[i].concat(s),++o),U(e,s,o)},a.precision=a.sd=function(e,t){var n,r,i,a=this;if(null!=e&&e!==!!e)return w(e,1,g),null==t?t=E:w(t,0,8),z(new B(a),e,t);if(!(n=a.c))return null;if(r=(i=n.length-1)*f+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&a.e+1>r&&(r=a.e+1),r},a.shiftedBy=function(e){return w(e,-9007199254740991,h),this.times("1e"+e)},a.squareRoot=a.sqrt=function(){var e,t,r,i,a,o=this,s=o.c,u=o.s,c=o.e,l=S+4,d=new B("0.5");if(1!==u||!s||!s[0])return new B(!u||u<0&&(!s||s[0])?NaN:s?o:1/0);if(0==(u=Math.sqrt(+q(o)))||u==1/0?(((t=y(s)).length+c)%2==0&&(t+="0"),u=Math.sqrt(+t),c=v((c+1)/2)-(c<0||c%2),r=new B(t=u==1/0?"5e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):r=new B(u+""),r.c[0])for((u=(c=r.e)+l)<3&&(u=0);;)if(a=r,r=d.times(a.plus(n(o,a,l,1))),y(a.c).slice(0,u)===(t=y(r.c)).slice(0,u)){if(r.e0&&m>0){for(a=m%s||s,d=p.substr(0,a);a0&&(d+=l+p.slice(a)),h&&(d="-"+d)}r=f?d+(n.decimalSeparator||"")+((u=+n.fractionGroupSize)?f.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):f):d}return(n.prefix||"")+r+(n.suffix||"")},a.toFraction=function(e){var t,r,i,a,o,s,u,l,d,h,m,g,v=this,b=v.c;if(null!=e&&(!(u=new B(e)).isInteger()&&(u.c||1!==u.s)||u.lt(k)))throw Error(c+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+q(u));if(!b)return new B(v);for(t=new B(k),d=r=new B(k),i=l=new B(k),g=y(b),o=t.e=g.length-v.e-1,t.c[0]=p[(s=o%f)<0?f+s:s],e=!e||u.comparedTo(t)>0?o>0?t:d:u,s=M,M=1/0,u=new B(g),l.c[0]=0;h=n(u,t,0,1),1!=(a=r.plus(h.times(i))).comparedTo(e);)r=i,i=a,d=l.plus(h.times(a=d)),l=a,t=u.minus(h.times(a=t)),u=a;return a=n(e.minus(r),i,0,1),l=l.plus(a.times(d)),r=r.plus(a.times(i)),l.s=d.s=v.s,m=n(d,i,o*=2,E).minus(v).abs().comparedTo(n(l,r,o,E).minus(v).abs())<1?[d,i]:[l,r],M=s,m},a.toNumber=function(){return+q(this)},a.toPrecision=function(e,t){return null!=e&&w(e,1,g),N(this,e,t,2)},a.toString=function(e){var t,n=this,i=n.s,a=n.e;return null===a?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=a<=O||a>=C?x(y(n.c),a):A(y(n.c),a,"0"):10===e&&D?t=A(y((n=z(new B(n),S+a+1,E)).c),n.e,"0"):(w(e,2,L.length,"Base"),t=r(A(y(n.c),a,"0"),10,e,i,!0)),i<0&&n.c[0]&&(t="-"+t)),t},a.valueOf=a.toJSON=function(){return q(this)},a._isBigNumber=!0,null!=t&&B.set(t),B}(),a.default=a.BigNumber=a,void 0===(r=function(){return a}.call(t,n,t,e))||(e.exports=r)}()},function(e,t,n){(function(t){var r=n(133).default,i=n(118).default,a=n(235).default,o=n(90).default,s=n(107).setSendTransactionHeaders;e.exports={Algod:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"http://r2.algorand.network",c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4180,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},d=n;"string"===typeof d&&(d={"X-Algo-API-Token":d});var f=new o(d,u,c,l);function h(e){return void 0!==e.noteb64&&null!==e.noteb64&&(e.note=t.from(e.noteb64,"base64")),e}this.status=a(i().mark((function e(){var t,n,r=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},e.next=3,f.get("/v1/status",{},t);case 3:return n=e.sent,e.abrupt("return",n.body);case 5:case"end":return e.stop()}}),e)}))),this.healthCheck=a(i().mark((function e(){var t,n,r=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},e.next=3,f.get("/health",{},t);case 3:if((n=e.sent).ok){e.next=6;break}throw new Error("Health response: ".concat(n.status));case 6:return e.abrupt("return",{});case 7:case"end":return e.stop()}}),e)}))),this.statusAfterBlock=function(){var e=a(i().mark((function e(t){var n,r,a=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=a.length>1&&void 0!==a[1]?a[1]:{},Number.isInteger(t)){e.next=3;break}throw Error("roundNumber should be an integer");case 3:return e.next=5,f.get("/v1/status/wait-for-block-after/".concat(t),{},n);case 5:return r=e.sent,e.abrupt("return",r.body);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.pendingTransactions=function(){var e=a(i().mark((function e(t){var n,r,a,o=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=o.length>1&&void 0!==o[1]?o[1]:{},Number.isInteger(t)){e.next=3;break}throw Error("maxTxns should be an integer");case 3:return e.next=5,f.get("/v1/transactions/pending",{max:t},n);case 5:if(200===(r=e.sent).statusCode&&void 0!==r.body.truncatedTxns.transactions)for(a=0;a0&&void 0!==r[0]?r[0]:{},e.next=3,f.get("/versions",{},t);case 3:return n=e.sent,e.abrupt("return",n.body);case 5:case"end":return e.stop()}}),e)}))),this.ledgerSupply=a(i().mark((function e(){var t,n,r=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},e.next=3,f.get("/v1/ledger/supply",{},t);case 3:return n=e.sent,e.abrupt("return",n.body);case 5:case"end":return e.stop()}}),e)}))),this.transactionByAddress=function(){var e=a(i().mark((function e(t){var n,r,a,o,s,u,c=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=c.length>1&&void 0!==c[1]?c[1]:null,r=c.length>2&&void 0!==c[2]?c[2]:null,a=c.length>3&&void 0!==c[3]?c[3]:null,o=c.length>4&&void 0!==c[4]?c[4]:{},null===n||Number.isInteger(n)){e.next=6;break}throw Error("first round should be an integer");case 6:if(null===r||Number.isInteger(r)){e.next=8;break}throw Error("last round should be an integer");case 8:return e.next=10,f.get("/v1/account/".concat(t,"/transactions"),{firstRound:n,lastRound:r,max:a},o);case 10:if(200===(s=e.sent).statusCode&&void 0!==s.body.transactions)for(u=0;u3&&void 0!==c[3]?c[3]:null,o=c.length>4&&void 0!==c[4]?c[4]:{},e.next=4,f.get("/v1/account/".concat(t,"/transactions"),{fromDate:n,toDate:r,max:a},o);case 4:if(200===(s=e.sent).statusCode&&void 0!==s.body.transactions)for(u=0;u1&&void 0!==a[1]?a[1]:{},e.next=3,f.get("/v1/transaction/".concat(t),{},n);case 3:return 200===(r=e.sent).statusCode&&(r.body=h(r.body)),e.abrupt("return",r.body);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.transactionInformation=function(){var e=a(i().mark((function e(t,n){var r,a,o=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>2&&void 0!==o[2]?o[2]:{},e.next=3,f.get("/v1/account/".concat(t,"/transaction/").concat(n),{},r);case 3:return 200===(a=e.sent).statusCode&&(a.body=h(a.body)),e.abrupt("return",a.body);case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),this.pendingTransactionInformation=function(){var e=a(i().mark((function e(t){var n,r,a=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},e.next=3,f.get("/v1/transactions/pending/".concat(t),{},n);case 3:return 200===(r=e.sent).statusCode&&(r.body=h(r.body)),e.abrupt("return",r.body);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.accountInformation=function(){var e=a(i().mark((function e(t){var n,r,a=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},e.next=3,f.get("/v1/account/".concat(t),{},n);case 3:return r=e.sent,e.abrupt("return",r.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.assetInformation=function(){var e=a(i().mark((function e(t){var n,r,a=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},e.next=3,f.get("/v1/asset/".concat(t),{},n);case 3:return r=e.sent,e.abrupt("return",r.body);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.suggestedFee=a(i().mark((function e(){var t,n,r=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},e.next=3,f.get("/v1/transactions/fee",{},t);case 3:return n=e.sent,e.abrupt("return",n.body);case 5:case"end":return e.stop()}}),e)}))),this.sendRawTransaction=function(){var e=a(i().mark((function e(n){var r,a,o,u=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=u.length>1&&void 0!==u[1]?u[1]:{},a=s(r),e.next=4,f.post("/v1/transactions",t.from(n),a);case 4:return o=e.sent,e.abrupt("return",o.body);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.sendRawTransactions=function(){var e=a(i().mark((function e(n){var a,o,u,c,l,d=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=d.length>1&&void 0!==d[1]?d[1]:{},u=s(o),c=(a=Array.prototype).concat.apply(a,r(n.map((function(e){return Array.from(e)})))),e.next=5,f.post("/v1/transactions",t.from(c),u);case 5:return l=e.sent,e.abrupt("return",l.body);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.getTransactionParams=a(i().mark((function e(){var t,n,r=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},e.next=3,f.get("/v1/transactions/params",{},t);case 3:return n=e.sent,e.abrupt("return",n.body);case 5:case"end":return e.stop()}}),e)}))),this.suggestParams=a(i().mark((function t(){var n,r,a=arguments;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=a.length>0&&void 0!==a[0]?a[0]:{},t.next=3,e.getTransactionParams(n);case 3:return r=t.sent,t.abrupt("return",{flatFee:!1,fee:r.fee,firstRound:r.lastRound,lastRound:r.lastRound+1e3,genesisID:r.genesisID,genesisHash:r.genesishashb64});case 5:case"end":return t.stop()}}),t)}))),this.block=function(){var e=a(i().mark((function e(t){var n,r,a,o=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=o.length>1&&void 0!==o[1]?o[1]:{},Number.isInteger(t)){e.next=3;break}throw Error("roundNumber should be an integer");case 3:return e.next=5,f.get("/v1/block/".concat(t),{},n);case 5:if(200===(r=e.sent).statusCode&&void 0!==r.body.txns.transactions)for(a=0;a1&&void 0!==arguments[1]?arguments[1]:"http://127.0.0.1",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7833,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Object(a.a)(this,c),n.call(this,"X-KMD-API-Token",e,t,r,i)}return Object(o.a)(c,[{key:"versions",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(){var t;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.c.get("/versions");case 2:return t=e.sent,e.abrupt("return",t.body);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"listWallets",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(){var t;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.c.get("/v1/wallets");case 2:return t=e.sent,e.abrupt("return",t.body);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"createWallet",value:function(){var t=Object(i.a)(Object(r.a)().mark((function t(n,i){var a,o,s,u,c=arguments;return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=c.length>2&&void 0!==c[2]?c[2]:new Uint8Array,o=c.length>3&&void 0!==c[3]?c[3]:"sqlite",s={wallet_name:n,wallet_driver_name:o,wallet_password:i,master_derivation_key:e.from(a).toString("base64")},t.next=5,this.c.post("/v1/wallet",s);case 5:return u=t.sent,t.abrupt("return",u.body);case 7:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}()},{key:"initWalletHandle",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t,n){var i,a;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={wallet_id:t,wallet_password:n},e.next=3,this.c.post("/v1/wallet/init",i);case 3:return a=e.sent,e.abrupt("return",a.body);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"releaseWalletHandle",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={wallet_handle_token:t},e.next=3,this.c.post("/v1/wallet/release",n);case 3:return i=e.sent,e.abrupt("return",i.body);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"renewWalletHandle",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={wallet_handle_token:t},e.next=3,this.c.post("/v1/wallet/renew",n);case 3:return i=e.sent,e.abrupt("return",i.body);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"renameWallet",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t,n,i){var a,o;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a={wallet_id:t,wallet_password:n,wallet_name:i},e.next=3,this.c.post("/v1/wallet/rename",a);case 3:return o=e.sent,e.abrupt("return",o.body);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"getWallet",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={wallet_handle_token:t},e.next=3,this.c.post("/v1/wallet/info",n);case 3:return i=e.sent,e.abrupt("return",i.body);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"exportMasterDerivationKey",value:function(){var t=Object(i.a)(Object(r.a)().mark((function t(n,i){var a,o;return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a={wallet_handle_token:n,wallet_password:i},t.next=3,this.c.post("/v1/master-key/export",a);case 3:return o=t.sent,t.abrupt("return",{master_derivation_key:e.from(o.body.master_derivation_key,"base64")});case 5:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}()},{key:"importKey",value:function(){var t=Object(i.a)(Object(r.a)().mark((function t(n,i){var a,o;return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a={wallet_handle_token:n,private_key:e.from(i).toString("base64")},t.next=3,this.c.post("/v1/key/import",a);case 3:return o=t.sent,t.abrupt("return",o.body);case 5:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}()},{key:"exportKey",value:function(){var t=Object(i.a)(Object(r.a)().mark((function t(n,i,a){var o,s;return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o={wallet_handle_token:n,address:a,wallet_password:i},t.next=3,this.c.post("/v1/key/export",o);case 3:return s=t.sent,t.abrupt("return",{private_key:e.from(s.body.private_key,"base64")});case 5:case"end":return t.stop()}}),t,this)})));return function(e,n,r){return t.apply(this,arguments)}}()},{key:"generateKey",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={wallet_handle_token:t,display_mnemonic:!1},e.next=3,this.c.post("/v1/key",n);case 3:return i=e.sent,e.abrupt("return",i.body);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"deleteKey",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t,n,i){var a,o;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a={wallet_handle_token:t,address:i,wallet_password:n},e.next=3,this.c.delete("/v1/key",a);case 3:return o=e.sent,e.abrupt("return",o.body);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"listKeys",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={wallet_handle_token:t},e.next=3,this.c.post("/v1/key/list",n);case 3:return i=e.sent,e.abrupt("return",i.body);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"signTransaction",value:function(){var t=Object(i.a)(Object(r.a)().mark((function t(n,i,a){var o,s,u;return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=l.instantiateTxnIfNeeded(a),s={wallet_handle_token:n,wallet_password:i,transaction:e.from(o.toByte()).toString("base64")},t.next=4,this.c.post("/v1/transaction/sign",s);case 4:if(200!==(u=t.sent).status){t.next=7;break}return t.abrupt("return",e.from(u.body.signed_transaction,"base64"));case 7:return t.abrupt("return",u.body);case 8:case"end":return t.stop()}}),t,this)})));return function(e,n,r){return t.apply(this,arguments)}}()},{key:"signTransactionWithSpecificPublicKey",value:function(){var t=Object(i.a)(Object(r.a)().mark((function t(n,i,a,o){var s,u,c;return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=l.instantiateTxnIfNeeded(a),u={wallet_handle_token:n,wallet_password:i,transaction:e.from(s.toByte()).toString("base64"),public_key:e.from(o).toString("base64")},t.next=4,this.c.post("/v1/transaction/sign",u);case 4:if(200!==(c=t.sent).status){t.next=7;break}return t.abrupt("return",e.from(c.body.signed_transaction,"base64"));case 7:return t.abrupt("return",c.body);case 8:case"end":return t.stop()}}),t,this)})));return function(e,n,r,i){return t.apply(this,arguments)}}()},{key:"listMultisig",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={wallet_handle_token:t},e.next=3,this.c.post("/v1/multisig/list",n);case 3:return i=e.sent,e.abrupt("return",i.body);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"importMultisig",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t,n,i,a){var o,s;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o={wallet_handle_token:t,multisig_version:n,threshold:i,pks:a},e.next=3,this.c.post("/v1/multisig/import",o);case 3:return s=e.sent,e.abrupt("return",s.body);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}()},{key:"exportMultisig",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t,n){var i,a;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={wallet_handle_token:t,address:n},e.next=3,this.c.post("/v1/multisig/export",i);case 3:return a=e.sent,e.abrupt("return",a.body);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"signMultisigTransaction",value:function(){var t=Object(i.a)(Object(r.a)().mark((function t(n,i,a,o,s){var u,c,d;return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u=l.instantiateTxnIfNeeded(a),c={wallet_handle_token:n,transaction:e.from(u.toByte()).toString("base64"),public_key:e.from(o).toString("base64"),partial_multisig:s,wallet_password:i},t.next=4,this.c.post("/v1/multisig/sign",c);case 4:return d=t.sent,t.abrupt("return",d.body);case 6:case"end":return t.stop()}}),t,this)})));return function(e,n,r,i,a){return t.apply(this,arguments)}}()},{key:"deleteMultisig",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t,n,i){var a,o;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a={wallet_handle_token:t,address:i,wallet_password:n},e.next=3,this.c.delete("/v1/multisig",a);case 3:return o=e.sent,e.abrupt("return",o.body);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()}]),c}(c.a)}).call(this,n(19).Buffer)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(17),i=n(9);function a(){var e=r.keyPair();return{addr:i.encodeAddress(e.publicKey),sk:e.secretKey}}},function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return k}));var r=n(0),i=n(8),a=n(27),o=n(21),s=n(2),u=n(1),c=n(6),l=n(37),d=n(28),f=n(9),h=1380011588;function p(t){return t.params["approval-program"]=e.from(t.params["approval-program"].toString(),"base64"),t.params["clear-state-program"]=e.from(t.params["clear-state-program"].toString(),"base64"),t}function m(e){return g.apply(this,arguments)}function g(){return(g=Object(c.a)(Object(r.a)().mark((function e(t){var n,s,u,c,m,g,v,y,b,w,_,x,A,k,S,E,O,C,T,M,j,R,I,P,L,D;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.client,s=t.txns,u=t.protocolVersion,c=t.latestTimestamp,m=t.round,g=t.sources,v=[],y=[],b=[],w=[],_=[],x=Object(o.a)(s);try{for(x.s();!(A=x.n()).done;)(k=A.value).txn.type===d.a.appl&&(_.push(Object(f.encodeAddress)(k.txn.from.publicKey)),k.txn.appAccounts&&_.push.apply(_,Object(a.a)(k.txn.appAccounts.map((function(e){return Object(f.encodeAddress)(e.publicKey)})))),k.txn.appForeignApps&&(b.push.apply(b,Object(a.a)(k.txn.appForeignApps)),_.push.apply(_,Object(a.a)(k.txn.appForeignApps.map((function(e){return Object(f.getApplicationAddress)(e)}))))),k.txn.appForeignAssets&&w.push.apply(w,Object(a.a)(k.txn.appForeignAssets)),void 0===k.txn.appIndex||0===k.txn.appIndex?v.push(new l.Application(h,new l.ApplicationParams({creator:Object(f.encodeAddress)(k.txn.from.publicKey),approvalProgram:k.txn.appApprovalProgram,clearStateProgram:k.txn.appClearProgram,localStateSchema:new l.ApplicationStateSchema(k.txn.appLocalInts,k.txn.appLocalByteSlices),globalStateSchema:new l.ApplicationStateSchema(k.txn.appGlobalInts,k.txn.appGlobalByteSlices)}))):(b.push(k.txn.appIndex),_.push(Object(f.getApplicationAddress)(k.txn.appIndex))))}catch(r){x.e(r)}finally{x.f()}for(S=[],E=0,O=Object(a.a)(new Set(w));Et&&t>0?"".concat(e.slice(0,t),"..."):e}function _(t,n){if(0===n.length)return"";for(var r=null,i=0;it.length||JSON.stringify(t[i])!==JSON.stringify(n[i]))&&(r=i);if(null==r)return"";var a=n[r];return a.bytes.length>0?"".concat(r," = 0x").concat(e.from(a.bytes,"base64").toString("hex")):"".concat(r," = ").concat(a.uint.toString())}function x(t,n){var r=n?t.reverse():t;return"[".concat(r.map((function(t){switch(t.type){case 1:return"0x".concat(e.from(t.bytes,"base64").toString("hex"));case 2:return"".concat(t.uint.toString());default:return""}})).join(", "),"]")}var A=function(){function e(t){Object(s.a)(this,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=t.disassembly,this.appCallMessages=t["app-call-messages"],this.localDeltas=t["local-deltas"],this.globalDelta=t["global-delta"],this.cost=t.cost,this.logicSigMessages=t["logic-sig-messages"],this.logicSigDisassembly=t["logic-sig-disassembly"],this.logs=t.logs,this.appCallTrace=new b(t["app-call-trace"]),this.logicSigTrace=new b(t["logic-sig-trace"])}return Object(u.a)(e,[{key:"appCallRejected",value:function(){return void 0!==this.appCallMessages&&this.appCallMessages.includes("REJECT")}},{key:"logicSigRejected",value:function(){return void 0!==this.logicSigMessages&&this.logicSigMessages.includes("REJECT")}},{key:"appTrace",value:function(t){if(void 0===this.appCallTrace||!this.disassembly)return"";var n=t;return void 0===t&&(n={maxValueWidth:30,topOfStackFirst:!1}),e.trace(this.appCallTrace,this.disassembly,n)}},{key:"lsigTrace",value:function(t){if(void 0===this.logicSigTrace||void 0===this.logicSigDisassembly)return"";var n=t;return void 0===t&&(n={maxValueWidth:30,topOfStackFirst:!0}),e.trace(this.logicSigTrace,this.logicSigDisassembly,n)}}],[{key:"trace",value:function(e,t,n){for(var r=n.maxValueWidth||30,i=[["pc#","ln#","source","scratch","stack"]],a=0;a0&&void 0!==e.trace[a-1].scratch?e.trace[a-1].scratch:[],p=""===u?t[s]:"!! ".concat(u," !!");i.push([c.toString().padEnd(3," "),s.toString().padEnd(3," "),w(p,r),w(_(h,f),r),w(x(d,n.topOfStackFirst),r)])}var m=i.reduce((function(e,t){for(var n=new Array(i[0].length).fill(0),r=0;re[r]?t[r].length:e[r];return n}),new Array(i[0].length).fill(0));return"".concat(i.map((function(e){return e.map((function(e,t){return e.padEnd(m[t]+1," ")})).join("|").trim()})).join("\n"),"\n")}}]),e}(),k=Object(u.a)((function e(t){Object(s.a)(this,e),this.error="",this.protocolVersion="",this.txns=[],this.error=t.error,this.protocolVersion=t["protocol-version"],this.txns=t.txns.map((function(e){return new A(e)}))}))}).call(this,n(19).Buffer)},function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return w}));var r,i=n(21),a=n(0),o=n(18),s=n(6),u=n(8),c=n(2),l=n(1),d=n(34),f=n(22),h=n(54),p=n(46),m=n(85),g=n(75),v=n(29),y=e.from([21,31,124,117]);function b(e,t,n){if(null!=n&&e===n)return 0;for(var r=null==n?0:1,i=0;it.MAX_GROUP_SIZE)throw new Error("Adding additional transactions exceeds the maximum atomic group size of ".concat(t.MAX_GROUP_SIZE));if(0===i){if(null==l||null==f||null==p||null==m||null==y||null==w)throw new Error("One of the following required parameters for application creation is missing: approvalProgram, clearProgram, numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices")}else if(c===v.a.UpdateApplicationOC){if(null==l||null==f)throw new Error("One of the following required parameters for OnApplicationComplete.UpdateApplicationOC is missing: approvalProgram, clearProgram");if(null!=p||null!=m||null!=y||null!=w||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(null!=l||null!=f||null!=p||null!=m||null!=y||null!=w||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(null==o&&(o=[]),o.length!==a.args.length)throw new Error("Incorrect number of method arguments. Expected ".concat(a.args.length,", got ").concat(o.length));for(var O=[],C=[],T=[],M=[],j=[],R=new Map,I=x||[],P=0;PNumber.MAX_SAFE_INTEGER)throw new Error("Expected safe integer for application value, got ".concat(K));V=b(Number(K),F,i);break;case d.i.asset:var Y=new d.o(64),Z=Y.decode(Y.encode(H));if(Z>Number.MAX_SAFE_INTEGER)throw new Error("Expected safe integer for asset value, got ".concat(Z));V=b(Number(Z),U);break;default:throw new Error("Unknown reference type: ".concat(q))}B.push(V)}for(var X=0;X15){var Q=O.slice(14),J=C.slice(14);O=O.slice(0,14),C=C.slice(0,14),O.push(new d.l(Q)),C.push(J)}for(var $=[a.getSelector()],ee=0;ee1&&Object(p.assignGroupID)(this.transactions.map((function(e){return e.txn}))),this.status=r.BUILT}return this.transactions}},{key:"gatherSignatures",value:function(){var e=Object(s.a)(Object(a.a)().mark((function e(){var t,n,i,s,u,c,l,d,h,p,m,g,v;return Object(a.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this.status>=r.SIGNED)){e.next=2;break}return e.abrupt("return",this.signedTxns);case 2:for(t=this.buildGroup(),n=t.map((function(e){return e.txn})),i=new Map,s=0;sr.SUBMITTED)){e.next=2;break}throw new Error("Transaction group cannot be resubmitted");case 2:return e.next=4,this.gatherSignatures();case 4:return n=e.sent,e.next=7,t.sendRawTransaction(n).do();case 7:return this.status=r.SUBMITTED,e.abrupt("return",this.txIDs);case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"execute",value:function(){var t=Object(s.a)(Object(a.a)().mark((function t(n,s){var u,c,l,d,f,h,p,g,v,b,w,_,x,A,k,S,E=this;return Object(a.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.status!==r.COMMITTED){t.next=2;break}throw new Error("Transaction group has already been executed successfully");case 2:return t.next=4,this.submit(n);case 4:return u=t.sent,this.status=r.SUBMITTED,c=this.transactions.findIndex((function(e,t){return E.methodCalls.has(t)})),l=-1===c?0:c,t.next=10,Object(m.a)(n,u[l],s);case 10:d=t.sent,this.status=r.COMMITTED,f=d["confirmed-round"],h=[],p=Object(i.a)(this.methodCalls),t.prev=15,p.s();case 17:if((g=p.n()).done){t.next=48;break}if(v=Object(o.a)(g.value,2),b=v[0],w=v[1],_=u[b],x={txID:_,rawReturnValue:new Uint8Array,method:w},t.prev=21,b!==c){t.next=26;break}t.t0=d,t.next=29;break;case 26:return t.next=28,n.pendingTransactionInformation(_).do();case 28:t.t0=t.sent;case 29:if(A=t.t0,x.txInfo=A,"void"===w.returns.type){t.next=40;break}if(0!==(k=A.logs||[]).length){t.next=35;break}throw new Error("App call transaction did not log a return value");case 35:if(!((S=e.from(k[k.length-1],"base64")).byteLength<4)&&S.slice(0,4).equals(y)){t.next=38;break}throw new Error("App call transaction did not log a return value");case 38:x.rawReturnValue=new Uint8Array(S.slice(4)),x.returnValue=w.returns.type.decode(x.rawReturnValue);case 40:t.next=45;break;case 42:t.prev=42,t.t1=t.catch(21),x.decodeError=t.t1;case 45:h.push(x);case 46:t.next=17;break;case 48:t.next=53;break;case 50:t.prev=50,t.t2=t.catch(15),p.e(t.t2);case 53:return t.prev=53,p.f(),t.finish(53);case 56:return t.abrupt("return",{confirmedRound:f,txIDs:u,methodResults:h});case 57:case"end":return t.stop()}}),t,this,[[15,50,53,56],[21,42]])})));return function(e,n){return t.apply(this,arguments)}}()}]),t}();w.MAX_GROUP_SIZE=16}).call(this,n(19).Buffer)},function(e,t,n){e.exports=n(243)()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var n=[].slice.call(t.querySelectorAll("*"),0).reduce((function(t,n){return t.concat(n.shadowRoot?e(n.shadowRoot):[n])}),[]);return n.filter(o)};var r=/input|select|textarea|button|object|iframe/;function i(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;try{var n=window.getComputedStyle(e),r=n.getPropertyValue("display");return t?"contents"!==r&&function(e,t){return"visible"!==t.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0}(e,n):"none"===r}catch(i){return console.warn("Failed to inspect element style"),!1}}function a(e,t){var n=e.nodeName.toLowerCase();return(r.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e,n=e.getRootNode&&e.getRootNode();t&&t!==document.body;){if(n&&t===n&&(t=n.host.parentNode),i(t))return!1;t=t.parentNode}return!0}(e)}function o(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&a(e,!n)}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){s&&(s.removeAttribute?s.removeAttribute("aria-hidden"):null!=s.length?s.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(s).forEach((function(e){return e.removeAttribute("aria-hidden")})));s=null},t.log=function(){0},t.assertNodeList=u,t.setElement=function(e){var t=e;if("string"===typeof t&&o.canUseDOM){var n=document.querySelectorAll(t);u(n,t),t=n}return s=t||s},t.validateElement=c,t.hide=function(e){var t=!0,n=!1,r=void 0;try{for(var i,a=c(e)[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){i.value.setAttribute("aria-hidden","true")}}catch(o){n=!0,r=o}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}},t.show=function(e){var t=!0,n=!1,r=void 0;try{for(var i,a=c(e)[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){i.value.removeAttribute("aria-hidden")}}catch(o){n=!0,r=o}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}},t.documentNotReadyOrSSRTesting=function(){s=null};var r,i=n(248),a=(r=i)&&r.__esModule?r:{default:r},o=n(103);var s=null;function u(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function c(e){var t=e||s;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,a.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(i.openInstances.length),i.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){i=new r};var r=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},i=new r;t.default=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return N}));var r=n(2),i=n(1),a=n(4),o=n(5),s=n(63),u=n(14),c=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a){var o;return Object(r.a)(this,n),(o=t.call(this,e,i)).account=a,o.account=a,o}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/accounts/".concat(this.account)}},{key:"exclude",value:function(e){return this.query.exclude=e,this}}]),n}(u.a),l=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a,o){var s;return Object(r.a)(this,n),(s=t.call(this,e,i)).account=a,s.assetID=o,s.account=a,s.assetID=o,s}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/accounts/".concat(this.account,"/assets/").concat(this.assetID)}}]),n}(u.a),d=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a,o){var s;return Object(r.a)(this,n),(s=t.call(this,e,i)).account=a,s.applicationID=o,s.account=a,s.applicationID=o,s}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/accounts/".concat(this.account,"/applications/").concat(this.applicationID)}}]),n}(u.a),f=n(20),h=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i){var a;if(Object(r.a)(this,n),a=t.call(this,e),!Number.isInteger(i))throw Error("roundNumber should be an integer");return a.round=i,a.query={format:"msgpack"},a}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/blocks/".concat(this.round)}},{key:"prepare",value:function(e){if(e&&e.byteLength>0)return f.decode(e)}}]),n}(u.a),p=n(91),m=n(170),g=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"path",value:function(){return"/genesis"}}]),n}(u.a),v=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a){var o;return Object(r.a)(this,n),(o=t.call(this,e,i)).index=a,o.index=a,o}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/assets/".concat(this.index)}}]),n}(u.a),y=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a){var o;return Object(r.a)(this,n),(o=t.call(this,e,i)).index=a,o.index=a,o}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/applications/".concat(this.index)}}]),n}(u.a),b=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a){var o;if(Object(r.a)(this,n),o=t.call(this,e,i),!Number.isInteger(a))throw Error("roundNumber should be an integer");return o.round=a,o}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/blocks/".concat(this.round,"/hash")}}]),n}(u.a),w=n(171),_=n(37),x=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a){var o;return Object(r.a)(this,n),(o=t.call(this,e,i)).index=a,o.index=a,o.query.max=0,o}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/applications/".concat(this.index,"/boxes")}},{key:"max",value:function(e){return this.query.max=e,this}},{key:"prepare",value:function(e){return _.BoxesResponse.from_obj_for_encoding(e)}}]),n}(u.a),A=n(0),k=n(6),S=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"path",value:function(){return"/health"}},{key:"do",value:function(){var e=Object(k.a)(Object(A.a)().mark((function e(){var t,n,r=arguments;return Object(A.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},e.next=3,this.c.get(this.path(),{},t);case 3:if((n=e.sent).ok){e.next=6;break}throw new Error("Health response: ".concat(n.status));case 6:return e.abrupt("return",{});case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),n}(u.a),E=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i){var a;return Object(r.a)(this,n),(a=t.call(this,e)).txid=i,a.txid=i,a.query.format="msgpack",a}return Object(i.a)(n,[{key:"prepare",value:function(e){if(e&&e.byteLength>0)return f.decode(e)}},{key:"path",value:function(){return"/v2/transactions/pending/".concat(this.txid)}},{key:"max",value:function(e){return this.query.max=e,this}}]),n}(u.a),O=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i;return Object(r.a)(this,n),(i=t.call(this,e)).query.format="msgpack",i}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/transactions/pending"}},{key:"prepare",value:function(e){if(e&&e.byteLength>0)return f.decode(e)}},{key:"max",value:function(e){return this.query.max=e,this}}]),n}(u.a),C=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i){var a;return Object(r.a)(this,n),(a=t.call(this,e)).address=i,a.address=i,a.query.format="msgpack",a}return Object(i.a)(n,[{key:"prepare",value:function(e){if(e&&e.byteLength>0)return f.decode(e)}},{key:"path",value:function(){return"/v2/accounts/".concat(this.address,"/transactions/pending")}},{key:"max",value:function(e){return this.query.max=e,this}}]),n}(u.a),T=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a,o){var s;return Object(r.a)(this,n),(s=t.call(this,e,i)).round=a,s.txID=o,s.round=a,s.txID=o,s}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/blocks/".concat(this.round,"/transactions/").concat(this.txID,"/proof")}},{key:"hashType",value:function(e){return this.query.hashtype=e,this}}]),n}(u.a),M=n(107),j=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/status"}}]),n}(u.a),R=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a){var o;if(Object(r.a)(this,n),(o=t.call(this,e,i)).round=a,!Number.isInteger(a))throw Error("round should be an integer");return o.round=a,o}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/status/wait-for-block-after/".concat(this.round)}}]),n}(u.a),I=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/transactions/params"}},{key:"prepare",value:function(e){return{flatFee:!1,fee:e.fee,firstRound:e["last-round"],lastRound:e["last-round"]+1e3,genesisID:e["genesis-id"],genesisHash:e["genesis-hash"]}}}]),n}(u.a),P=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/ledger/supply"}}]),n}(u.a),L=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"path",value:function(){return"/versions"}}]),n}(u.a),D=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a){var o;return Object(r.a)(this,n),(o=t.call(this,e,i)).round=a,o.round=a,o}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/blocks/".concat(this.round,"/lightheader/proof")}}]),n}(u.a),B=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a){var o;return Object(r.a)(this,n),(o=t.call(this,e,i)).round=a,o.round=a,o}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/stateproofs/".concat(this.round)}}]),n}(u.a),N=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"http://r2.algorand.network",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4180,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Object(r.a)(this,n),t.call(this,"X-Algo-API-Token",e,i,a,o)}return Object(i.a)(n,[{key:"healthCheck",value:function(){return new S(this.c)}},{key:"versionsCheck",value:function(){return new L(this.c)}},{key:"sendRawTransaction",value:function(e){return new M.default(this.c,e)}},{key:"accountInformation",value:function(e){return new c(this.c,this.intDecoding,e)}},{key:"accountAssetInformation",value:function(e,t){return new l(this.c,this.intDecoding,e,t)}},{key:"accountApplicationInformation",value:function(e,t){return new d(this.c,this.intDecoding,e,t)}},{key:"block",value:function(e){return new h(this.c,e)}},{key:"getBlockHash",value:function(e){return new b(this.c,this.intDecoding,e)}},{key:"pendingTransactionInformation",value:function(e){return new E(this.c,e)}},{key:"pendingTransactionsInformation",value:function(){return new O(this.c)}},{key:"pendingTransactionByAddress",value:function(e){return new C(this.c,e)}},{key:"status",value:function(){return new j(this.c,this.intDecoding)}},{key:"statusAfterBlock",value:function(e){return new R(this.c,this.intDecoding,e)}},{key:"getTransactionParams",value:function(){return new I(this.c)}},{key:"supply",value:function(){return new P(this.c,this.intDecoding)}},{key:"compile",value:function(e){return new p.a(this.c,e)}},{key:"dryrun",value:function(e){return new m.a(this.c,e)}},{key:"getAssetByID",value:function(e){return new v(this.c,this.intDecoding,e)}},{key:"getApplicationByID",value:function(e){return new y(this.c,this.intDecoding,e)}},{key:"getApplicationBoxByName",value:function(e,t){return new w.a(this.c,this.intDecoding,e,t)}},{key:"getApplicationBoxes",value:function(e){return new x(this.c,this.intDecoding,e)}},{key:"genesis",value:function(){return new g(this.c,this.intDecoding)}},{key:"getTransactionProof",value:function(e,t){return new T(this.c,this.intDecoding,e,t)}},{key:"getLightBlockHeaderProof",value:function(e){return new D(this.c,this.intDecoding,e)}},{key:"getStateProof",value:function(e){return new B(this.c,this.intDecoding,e)}}]),n}(s.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return M}));var r=n(2),i=n(1),a=n(4),o=n(5),s=n(63),u=n(14),c=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"path",value:function(){return"/health"}}]),n}(u.a),l=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a){var o;return Object(r.a)(this,n),(o=t.call(this,e,i)).index=a,o.index=a,o}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/assets/".concat(this.index,"/balances")}},{key:"limit",value:function(e){return this.query.limit=e,this}},{key:"currencyGreaterThan",value:function(e){return this.query["currency-greater-than"]=e,this}},{key:"currencyLessThan",value:function(e){return this.query["currency-less-than"]=e,this}},{key:"nextToken",value:function(e){return this.query.next=e,this}},{key:"includeAll",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.query["include-all"]=e,this}}]),n}(u.a),d=n(64),f=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a){var o;return Object(r.a)(this,n),(o=t.call(this,e,i)).index=a,o.index=a,o}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/assets/".concat(this.index,"/transactions")}},{key:"notePrefix",value:function(e){return this.query["note-prefix"]=Object(d.a)(e),this}},{key:"txType",value:function(e){return this.query["tx-type"]=e,this}},{key:"sigType",value:function(e){return this.query["sig-type"]=e,this}},{key:"txid",value:function(e){return this.query.txid=e,this}},{key:"round",value:function(e){return this.query.round=e,this}},{key:"minRound",value:function(e){return this.query["min-round"]=e,this}},{key:"maxRound",value:function(e){return this.query["max-round"]=e,this}},{key:"assetID",value:function(e){return this.query["asset-id"]=e,this}},{key:"limit",value:function(e){return this.query.limit=e,this}},{key:"beforeTime",value:function(e){return this.query["before-time"]=e,this}},{key:"afterTime",value:function(e){return this.query["after-time"]=e,this}},{key:"currencyGreaterThan",value:function(e){return this.query["currency-greater-than"]=e,this}},{key:"currencyLessThan",value:function(e){return this.query["currency-less-than"]=e,this}},{key:"addressRole",value:function(e){return this.query["address-role"]=e,this}},{key:"address",value:function(e){return this.query.address=e,this}},{key:"excludeCloseTo",value:function(e){return this.query["exclude-close-to"]=e,this}},{key:"nextToken",value:function(e){return this.query.next=e,this}},{key:"rekeyTo",value:function(e){return this.query["rekey-to"]=e,this}}]),n}(u.a),h=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a){var o;return Object(r.a)(this,n),(o=t.call(this,e,i)).round=a,o.round=a,o}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/blocks/".concat(this.round)}},{key:"headerOnly",value:function(e){return this.query["header-only"]=e,this}}]),n}(u.a),p=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a){var o;return Object(r.a)(this,n),(o=t.call(this,e,i)).txID=a,o.txID=a,o}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/transactions/".concat(this.txID)}}]),n}(u.a),m=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a){var o;return Object(r.a)(this,n),(o=t.call(this,e,i)).account=a,o.account=a,o}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/accounts/".concat(this.account)}},{key:"round",value:function(e){return this.query.round=e,this}},{key:"includeAll",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.query["include-all"]=e,this}},{key:"exclude",value:function(e){return this.query.exclude=e,this}}]),n}(u.a),g=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a){var o;return Object(r.a)(this,n),(o=t.call(this,e,i)).account=a,o.account=a,o}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/accounts/".concat(this.account,"/assets")}},{key:"limit",value:function(e){return this.query.limit=e,this}},{key:"round",value:function(e){return this.query.round=e,this}},{key:"nextToken",value:function(e){return this.query.next=e,this}},{key:"includeAll",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.query["include-all"]=e,this}},{key:"assetId",value:function(e){return this.query["asset-id"]=e,this}}]),n}(u.a),v=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a){var o;return Object(r.a)(this,n),(o=t.call(this,e,i)).account=a,o.account=a,o}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/accounts/".concat(this.account,"/created-assets")}},{key:"limit",value:function(e){return this.query.limit=e,this}},{key:"round",value:function(e){return this.query.round=e,this}},{key:"nextToken",value:function(e){return this.query.next=e,this}},{key:"includeAll",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.query["include-all"]=e,this}},{key:"assetID",value:function(e){return this.query["asset-id"]=e,this}}]),n}(u.a),y=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a){var o;return Object(r.a)(this,n),(o=t.call(this,e,i)).account=a,o.account=a,o}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/accounts/".concat(this.account,"/apps-local-state")}},{key:"limit",value:function(e){return this.query.limit=e,this}},{key:"round",value:function(e){return this.query.round=e,this}},{key:"nextToken",value:function(e){return this.query.next=e,this}},{key:"includeAll",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.query["include-all"]=e,this}},{key:"applicationID",value:function(e){return this.query["application-id"]=e,this}}]),n}(u.a),b=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a){var o;return Object(r.a)(this,n),(o=t.call(this,e,i)).account=a,o.account=a,o}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/accounts/".concat(this.account,"/created-applications")}},{key:"limit",value:function(e){return this.query.limit=e,this}},{key:"round",value:function(e){return this.query.round=e,this}},{key:"nextToken",value:function(e){return this.query.next=e,this}},{key:"includeAll",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.query["include-all"]=e,this}},{key:"applicationID",value:function(e){return this.query["application-id"]=e,this}}]),n}(u.a),w=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a){var o;return Object(r.a)(this,n),(o=t.call(this,e,i)).index=a,o.index=a,o}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/assets/".concat(this.index)}},{key:"includeAll",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.query["include-all"]=e,this}}]),n}(u.a),_=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a){var o;return Object(r.a)(this,n),(o=t.call(this,e,i)).index=a,o.index=a,o}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/applications/".concat(this.index)}},{key:"includeAll",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.query["include-all"]=e,this}}]),n}(u.a),x=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a){var o;return Object(r.a)(this,n),(o=t.call(this,e,i)).appID=a,o.appID=a,o}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/applications/".concat(this.appID,"/logs")}},{key:"limit",value:function(e){return this.query.limit=e,this}},{key:"minRound",value:function(e){return this.query["min-round"]=e,this}},{key:"maxRound",value:function(e){return this.query["max-round"]=e,this}},{key:"nextToken",value:function(e){return this.query.next=e,this}},{key:"sender",value:function(e){return this.query["sender-address"]=e,this}},{key:"txid",value:function(e){return this.query.txid=e,this}}]),n}(u.a),A=n(172),k=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/accounts"}},{key:"currencyGreaterThan",value:function(e){return this.query["currency-greater-than"]=e,this}},{key:"currencyLessThan",value:function(e){return this.query["currency-less-than"]=e,this}},{key:"limit",value:function(e){return this.query.limit=e,this}},{key:"assetID",value:function(e){return this.query["asset-id"]=e,this}},{key:"nextToken",value:function(e){return this.query.next=e,this}},{key:"round",value:function(e){return this.query.round=e,this}},{key:"authAddr",value:function(e){return this.query["auth-addr"]=e,this}},{key:"applicationID",value:function(e){return this.query["application-id"]=e,this}},{key:"includeAll",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.query["include-all"]=e,this}},{key:"exclude",value:function(e){return this.query.exclude=e,this}}]),n}(u.a),S=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/transactions"}},{key:"notePrefix",value:function(e){return this.query["note-prefix"]=Object(d.a)(e),this}},{key:"txType",value:function(e){return this.query["tx-type"]=e,this}},{key:"sigType",value:function(e){return this.query["sig-type"]=e,this}},{key:"txid",value:function(e){return this.query.txid=e,this}},{key:"round",value:function(e){return this.query.round=e,this}},{key:"minRound",value:function(e){return this.query["min-round"]=e,this}},{key:"maxRound",value:function(e){return this.query["max-round"]=e,this}},{key:"assetID",value:function(e){return this.query["asset-id"]=e,this}},{key:"limit",value:function(e){return this.query.limit=e,this}},{key:"beforeTime",value:function(e){return this.query["before-time"]=e,this}},{key:"afterTime",value:function(e){return this.query["after-time"]=e,this}},{key:"currencyGreaterThan",value:function(e){return this.query["currency-greater-than"]=e,this}},{key:"currencyLessThan",value:function(e){return this.query["currency-less-than"]=e,this}},{key:"addressRole",value:function(e){return this.query["address-role"]=e,this}},{key:"address",value:function(e){return this.query.address=e,this}},{key:"excludeCloseTo",value:function(e){return this.query["exclude-close-to"]=e,this}},{key:"nextToken",value:function(e){return this.query.next=e,this}},{key:"rekeyTo",value:function(e){return this.query["rekey-to"]=e,this}},{key:"applicationID",value:function(e){return this.query["application-id"]=e,this}}]),n}(u.a),E=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/assets"}},{key:"limit",value:function(e){return this.query.limit=e,this}},{key:"creator",value:function(e){return this.query.creator=e,this}},{key:"name",value:function(e){return this.query.name=e,this}},{key:"unit",value:function(e){return this.query.unit=e,this}},{key:"index",value:function(e){return this.query["asset-id"]=e,this}},{key:"nextToken",value:function(e){return this.query.next=e,this}},{key:"includeAll",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.query["include-all"]=e,this}}]),n}(u.a),O=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/applications"}},{key:"index",value:function(e){return this.query["application-id"]=e,this}},{key:"creator",value:function(e){return this.query.creator=e,this}},{key:"nextToken",value:function(e){return this.query.next=e,this}},{key:"limit",value:function(e){return this.query.limit=e,this}},{key:"includeAll",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.query["include-all"]=e,this}}]),n}(u.a),C=n(59),T=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a){var o;return Object(r.a)(this,n),(o=t.call(this,e,i)).index=a,o.index=a,o}return Object(i.a)(n,[{key:"path",value:function(){return"/v2/applications/".concat(this.index,"/boxes")}},{key:"nextToken",value:function(e){return this.query.next=e,this}},{key:"limit",value:function(e){return this.query.limit=e,this}},{key:"prepare",value:function(e){return C.BoxesResponse.from_obj_for_encoding(e)}}]),n}(u.a),M=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"http://127.0.0.1",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8080,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Object(r.a)(this,n),t.call(this,"X-Indexer-API-Token",e,i,a,o)}return Object(i.a)(n,[{key:"makeHealthCheck",value:function(){return new c(this.c,this.intDecoding)}},{key:"lookupAssetBalances",value:function(e){return new l(this.c,this.intDecoding,e)}},{key:"lookupAssetTransactions",value:function(e){return new f(this.c,this.intDecoding,e)}},{key:"lookupAccountTransactions",value:function(e){return new d.b(this.c,this.intDecoding,e)}},{key:"lookupBlock",value:function(e){return new h(this.c,this.intDecoding,e)}},{key:"lookupTransactionByID",value:function(e){return new p(this.c,this.intDecoding,e)}},{key:"lookupAccountByID",value:function(e){return new m(this.c,this.intDecoding,e)}},{key:"lookupAccountAssets",value:function(e){return new g(this.c,this.intDecoding,e)}},{key:"lookupAccountCreatedAssets",value:function(e){return new v(this.c,this.intDecoding,e)}},{key:"lookupAccountAppLocalStates",value:function(e){return new y(this.c,this.intDecoding,e)}},{key:"lookupAccountCreatedApplications",value:function(e){return new b(this.c,this.intDecoding,e)}},{key:"lookupAssetByID",value:function(e){return new w(this.c,this.intDecoding,e)}},{key:"lookupApplications",value:function(e){return new _(this.c,this.intDecoding,e)}},{key:"lookupApplicationLogs",value:function(e){return new x(this.c,this.intDecoding,e)}},{key:"searchAccounts",value:function(){return new k(this.c,this.intDecoding)}},{key:"searchForTransactions",value:function(){return new S(this.c,this.intDecoding)}},{key:"searchForAssets",value:function(){return new E(this.c,this.intDecoding)}},{key:"searchForApplications",value:function(){return new O(this.c,this.intDecoding)}},{key:"searchForApplicationBoxes",value:function(e){return new T(this.c,this.intDecoding,e)}},{key:"lookupApplicationBoxByIDandName",value:function(e,t){return new A.a(this.c,this.intDecoding,e,t)}}]),n}(s.a)},function(e,t,n){"use strict";n(1),n(2),n(4),n(5)},function(e,t,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t>>=1,u?t.push(0===r?-2147483648:-r):t.push(r),r=n=0}}return t}(e);if(t.length>2)return t[2]}));this.pcToLine={},this.lineToPc={};var d,f=0,h=Object(i.a)(l.entries());try{for(h.s();!(d=h.n()).done;){var p=Object(r.a)(d.value,2),m=p[0],g=p[1];void 0!==g&&(f+=g),f in this.lineToPc||(this.lineToPc[f]=[]),this.lineToPc[f].push(m),this.pcToLine[m]=f}}catch(v){h.e(v)}finally{h.f()}}return Object(o.a)(e,[{key:"getLineForPc",value:function(e){return this.pcToLine[e]}},{key:"getPcsForLine",value:function(e){return this.lineToPc[e]}}]),e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWindowMetadata=void 0;var r=n(35);t.getWindowMetadata=function(){var e,t;try{e=r.getDocumentOrThrow(),t=r.getLocationOrThrow()}catch(a){return null}function n(){for(var t=arguments.length,n=new Array(t),r=0;r-1){var s=a.getAttribute("href");if(s)if(-1===s.toLowerCase().indexOf("https:")&&-1===s.toLowerCase().indexOf("http:")&&0!==s.indexOf("//")){var u=t.protocol+"//"+t.host;if(0===s.indexOf("/"))u+=s;else{var c=t.pathname.split("/");c.pop(),u+=c.join("/")+"/"+s}r.push(u)}else if(0===s.indexOf("//")){var l=t.protocol+s;r.push(l)}else r.push(s)}}return r}(),name:i}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return f}));var r=function(){for(var e=0,t=0,n=arguments.length;t>6,u[c++]=128|63&s):s<55296||s>=57344?(u[c++]=224|s>>12,u[c++]=128|s>>6&63,u[c++]=128|63&s):(s=65536+((1023&s)<<10|1023&e.charCodeAt(++l)),u[c++]=240|s>>18,u[c++]=128|s>>12&63,u[c++]=128|s>>6&63,u[c++]=128|63&s);e=u}e.length>128&&(e=new x(t,!0).update(e).array());var f=[],h=[];for(l=0;l<128;++l){var p=e[l]||0;f[l]=92^p,h[l]=54^p}x.call(this,t,n),this.update(h),this.oKeyPad=f,this.inner=!0,this.sharedMemory=n}x.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(a);if(null===e)throw new Error(a);if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!d||!ArrayBuffer.isView(e)))throw new Error(a);t=!0}for(var r,i,o=0,s=e.length,u=this.blocks;o>2]|=e[o]<>2]|=r<
>2]|=(192|r>>6)<
>2]|=(128|63&r)<
=57344?(u[i>>2]|=(224|r>>12)<
>2]|=(128|r>>6&63)<
>2]|=(128|63&r)<
>2]|=(240|r>>18)<
>2]|=(128|r>>12&63)<
>2]|=(128|r>>6&63)<
>2]|=(128|63&r)<
=128?(this.block=u[32],this.start=i-128,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},x.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[32]=this.block,e[t>>2]|=h[3&t],this.block=e[32],t>=112&&(this.hashed||this.hash(),e[0]=this.block,e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=e[16]=e[17]=e[18]=e[19]=e[20]=e[21]=e[22]=e[23]=e[24]=e[25]=e[26]=e[27]=e[28]=e[29]=e[30]=e[31]=e[32]=0),e[30]=this.hBytes<<3|this.bytes>>>29,e[31]=this.bytes<<3,this.hash()}},x.prototype.hash=function(){var e,t,n,r,i,a,o,s,u,c,l,d,f,h,p,g,v,y,b,w,_,x,A,k,S,E=this.h0h,O=this.h0l,C=this.h1h,T=this.h1l,M=this.h2h,j=this.h2l,R=this.h3h,I=this.h3l,P=this.h4h,L=this.h4l,D=this.h5h,B=this.h5l,N=this.h6h,F=this.h6l,U=this.h7h,z=this.h7l,q=this.blocks;for(e=32;e<160;e+=2)t=((w=q[e-30])>>>1|(_=q[e-29])<<31)^(w>>>8|_<<24)^w>>>7,n=(_>>>1|w<<31)^(_>>>8|w<<24)^(_>>>7|w<<25),r=((w=q[e-4])>>>19|(_=q[e-3])<<13)^(_>>>29|w<<3)^w>>>6,i=(_>>>19|w<<13)^(w>>>29|_<<3)^(_>>>6|w<<26),w=q[e-32],_=q[e-31],u=((x=q[e-14])>>>16)+(w>>>16)+(t>>>16)+(r>>>16)+((s=(65535&x)+(65535&w)+(65535&t)+(65535&r)+((o=((A=q[e-13])>>>16)+(_>>>16)+(n>>>16)+(i>>>16)+((a=(65535&A)+(65535&_)+(65535&n)+(65535&i))>>>16))>>>16))>>>16),q[e]=u<<16|65535&s,q[e+1]=o<<16|65535&a;var H=E,V=O,W=C,G=T,K=M,Y=j,Z=R,X=I,Q=P,J=L,$=D,ee=B,te=N,ne=F,re=U,ie=z;for(g=W&K,v=G&Y,e=0;e<160;e+=8)t=(H>>>28|V<<4)^(V>>>2|H<<30)^(V>>>7|H<<25),n=(V>>>28|H<<4)^(H>>>2|V<<30)^(H>>>7|V<<25),r=(Q>>>14|J<<18)^(Q>>>18|J<<14)^(J>>>9|Q<<23),i=(J>>>14|Q<<18)^(J>>>18|Q<<14)^(Q>>>9|J<<23),y=(c=H&W)^H&K^g,b=(l=V&G)^V&Y^v,k=Q&$^~Q&te,S=J&ee^~J&ne,w=q[e],_=q[e+1],w=(u=((x=m[e])>>>16)+(w>>>16)+(k>>>16)+(r>>>16)+(re>>>16)+((s=(65535&x)+(65535&w)+(65535&k)+(65535&r)+(65535&re)+((o=((A=m[e+1])>>>16)+(_>>>16)+(S>>>16)+(i>>>16)+(ie>>>16)+((a=(65535&A)+(65535&_)+(65535&S)+(65535&i)+(65535&ie))>>>16))>>>16))>>>16))<<16|65535&s,_=o<<16|65535&a,x=(u=(y>>>16)+(t>>>16)+((s=(65535&y)+(65535&t)+((o=(b>>>16)+(n>>>16)+((a=(65535&b)+(65535&n))>>>16))>>>16))>>>16))<<16|65535&s,A=o<<16|65535&a,re=(u=(Z>>>16)+(w>>>16)+((s=(65535&Z)+(65535&w)+((o=(X>>>16)+(_>>>16)+((a=(65535&X)+(65535&_))>>>16))>>>16))>>>16))<<16|65535&s,ie=o<<16|65535&a,t=((Z=(u=(x>>>16)+(w>>>16)+((s=(65535&x)+(65535&w)+((o=(A>>>16)+(_>>>16)+((a=(65535&A)+(65535&_))>>>16))>>>16))>>>16))<<16|65535&s)>>>28|(X=o<<16|65535&a)<<4)^(X>>>2|Z<<30)^(X>>>7|Z<<25),n=(X>>>28|Z<<4)^(Z>>>2|X<<30)^(Z>>>7|X<<25),r=(re>>>14|ie<<18)^(re>>>18|ie<<14)^(ie>>>9|re<<23),i=(ie>>>14|re<<18)^(ie>>>18|re<<14)^(re>>>9|ie<<23),y=(d=Z&H)^Z&W^c,b=(f=X&V)^X&G^l,k=re&Q^~re&$,S=ie&J^~ie&ee,w=q[e+2],_=q[e+3],w=(u=((x=m[e+2])>>>16)+(w>>>16)+(k>>>16)+(r>>>16)+(te>>>16)+((s=(65535&x)+(65535&w)+(65535&k)+(65535&r)+(65535&te)+((o=((A=m[e+3])>>>16)+(_>>>16)+(S>>>16)+(i>>>16)+(ne>>>16)+((a=(65535&A)+(65535&_)+(65535&S)+(65535&i)+(65535&ne))>>>16))>>>16))>>>16))<<16|65535&s,_=o<<16|65535&a,x=(u=(y>>>16)+(t>>>16)+((s=(65535&y)+(65535&t)+((o=(b>>>16)+(n>>>16)+((a=(65535&b)+(65535&n))>>>16))>>>16))>>>16))<<16|65535&s,A=o<<16|65535&a,te=(u=(K>>>16)+(w>>>16)+((s=(65535&K)+(65535&w)+((o=(Y>>>16)+(_>>>16)+((a=(65535&Y)+(65535&_))>>>16))>>>16))>>>16))<<16|65535&s,ne=o<<16|65535&a,t=((K=(u=(x>>>16)+(w>>>16)+((s=(65535&x)+(65535&w)+((o=(A>>>16)+(_>>>16)+((a=(65535&A)+(65535&_))>>>16))>>>16))>>>16))<<16|65535&s)>>>28|(Y=o<<16|65535&a)<<4)^(Y>>>2|K<<30)^(Y>>>7|K<<25),n=(Y>>>28|K<<4)^(K>>>2|Y<<30)^(K>>>7|Y<<25),r=(te>>>14|ne<<18)^(te>>>18|ne<<14)^(ne>>>9|te<<23),i=(ne>>>14|te<<18)^(ne>>>18|te<<14)^(te>>>9|ne<<23),y=(h=K&Z)^K&H^d,b=(p=Y&X)^Y&V^f,k=te&re^~te&Q,S=ne&ie^~ne&J,w=q[e+4],_=q[e+5],w=(u=((x=m[e+4])>>>16)+(w>>>16)+(k>>>16)+(r>>>16)+($>>>16)+((s=(65535&x)+(65535&w)+(65535&k)+(65535&r)+(65535&$)+((o=((A=m[e+5])>>>16)+(_>>>16)+(S>>>16)+(i>>>16)+(ee>>>16)+((a=(65535&A)+(65535&_)+(65535&S)+(65535&i)+(65535&ee))>>>16))>>>16))>>>16))<<16|65535&s,_=o<<16|65535&a,x=(u=(y>>>16)+(t>>>16)+((s=(65535&y)+(65535&t)+((o=(b>>>16)+(n>>>16)+((a=(65535&b)+(65535&n))>>>16))>>>16))>>>16))<<16|65535&s,A=o<<16|65535&a,$=(u=(W>>>16)+(w>>>16)+((s=(65535&W)+(65535&w)+((o=(G>>>16)+(_>>>16)+((a=(65535&G)+(65535&_))>>>16))>>>16))>>>16))<<16|65535&s,ee=o<<16|65535&a,t=((W=(u=(x>>>16)+(w>>>16)+((s=(65535&x)+(65535&w)+((o=(A>>>16)+(_>>>16)+((a=(65535&A)+(65535&_))>>>16))>>>16))>>>16))<<16|65535&s)>>>28|(G=o<<16|65535&a)<<4)^(G>>>2|W<<30)^(G>>>7|W<<25),n=(G>>>28|W<<4)^(W>>>2|G<<30)^(W>>>7|G<<25),r=($>>>14|ee<<18)^($>>>18|ee<<14)^(ee>>>9|$<<23),i=(ee>>>14|$<<18)^(ee>>>18|$<<14)^($>>>9|ee<<23),y=(g=W&K)^W&Z^h,b=(v=G&Y)^G&X^p,k=$&te^~$&re,S=ee&ne^~ee&ie,w=q[e+6],_=q[e+7],w=(u=((x=m[e+6])>>>16)+(w>>>16)+(k>>>16)+(r>>>16)+(Q>>>16)+((s=(65535&x)+(65535&w)+(65535&k)+(65535&r)+(65535&Q)+((o=((A=m[e+7])>>>16)+(_>>>16)+(S>>>16)+(i>>>16)+(J>>>16)+((a=(65535&A)+(65535&_)+(65535&S)+(65535&i)+(65535&J))>>>16))>>>16))>>>16))<<16|65535&s,_=o<<16|65535&a,x=(u=(y>>>16)+(t>>>16)+((s=(65535&y)+(65535&t)+((o=(b>>>16)+(n>>>16)+((a=(65535&b)+(65535&n))>>>16))>>>16))>>>16))<<16|65535&s,A=o<<16|65535&a,Q=(u=(H>>>16)+(w>>>16)+((s=(65535&H)+(65535&w)+((o=(V>>>16)+(_>>>16)+((a=(65535&V)+(65535&_))>>>16))>>>16))>>>16))<<16|65535&s,J=o<<16|65535&a,H=(u=(x>>>16)+(w>>>16)+((s=(65535&x)+(65535&w)+((o=(A>>>16)+(_>>>16)+((a=(65535&A)+(65535&_))>>>16))>>>16))>>>16))<<16|65535&s,V=o<<16|65535&a;u=(E>>>16)+(H>>>16)+((s=(65535&E)+(65535&H)+((o=(O>>>16)+(V>>>16)+((a=(65535&O)+(65535&V))>>>16))>>>16))>>>16),this.h0h=u<<16|65535&s,this.h0l=o<<16|65535&a,u=(C>>>16)+(W>>>16)+((s=(65535&C)+(65535&W)+((o=(T>>>16)+(G>>>16)+((a=(65535&T)+(65535&G))>>>16))>>>16))>>>16),this.h1h=u<<16|65535&s,this.h1l=o<<16|65535&a,u=(M>>>16)+(K>>>16)+((s=(65535&M)+(65535&K)+((o=(j>>>16)+(Y>>>16)+((a=(65535&j)+(65535&Y))>>>16))>>>16))>>>16),this.h2h=u<<16|65535&s,this.h2l=o<<16|65535&a,u=(R>>>16)+(Z>>>16)+((s=(65535&R)+(65535&Z)+((o=(I>>>16)+(X>>>16)+((a=(65535&I)+(65535&X))>>>16))>>>16))>>>16),this.h3h=u<<16|65535&s,this.h3l=o<<16|65535&a,u=(P>>>16)+(Q>>>16)+((s=(65535&P)+(65535&Q)+((o=(L>>>16)+(J>>>16)+((a=(65535&L)+(65535&J))>>>16))>>>16))>>>16),this.h4h=u<<16|65535&s,this.h4l=o<<16|65535&a,u=(D>>>16)+($>>>16)+((s=(65535&D)+(65535&$)+((o=(B>>>16)+(ee>>>16)+((a=(65535&B)+(65535&ee))>>>16))>>>16))>>>16),this.h5h=u<<16|65535&s,this.h5l=o<<16|65535&a,u=(N>>>16)+(te>>>16)+((s=(65535&N)+(65535&te)+((o=(F>>>16)+(ne>>>16)+((a=(65535&F)+(65535&ne))>>>16))>>>16))>>>16),this.h6h=u<<16|65535&s,this.h6l=o<<16|65535&a,u=(U>>>16)+(re>>>16)+((s=(65535&U)+(65535&re)+((o=(z>>>16)+(ie>>>16)+((a=(65535&z)+(65535&ie))>>>16))>>>16))>>>16),this.h7h=u<<16|65535&s,this.h7l=o<<16|65535&a},x.prototype.hex=function(){this.finalize();var e=this.h0h,t=this.h0l,n=this.h1h,r=this.h1l,i=this.h2h,a=this.h2l,o=this.h3h,s=this.h3l,u=this.h4h,c=this.h4l,l=this.h5h,d=this.h5l,h=this.h6h,p=this.h6l,m=this.h7h,g=this.h7l,v=this.bits,y=f[e>>28&15]+f[e>>24&15]+f[e>>20&15]+f[e>>16&15]+f[e>>12&15]+f[e>>8&15]+f[e>>4&15]+f[15&e]+f[t>>28&15]+f[t>>24&15]+f[t>>20&15]+f[t>>16&15]+f[t>>12&15]+f[t>>8&15]+f[t>>4&15]+f[15&t]+f[n>>28&15]+f[n>>24&15]+f[n>>20&15]+f[n>>16&15]+f[n>>12&15]+f[n>>8&15]+f[n>>4&15]+f[15&n]+f[r>>28&15]+f[r>>24&15]+f[r>>20&15]+f[r>>16&15]+f[r>>12&15]+f[r>>8&15]+f[r>>4&15]+f[15&r]+f[i>>28&15]+f[i>>24&15]+f[i>>20&15]+f[i>>16&15]+f[i>>12&15]+f[i>>8&15]+f[i>>4&15]+f[15&i]+f[a>>28&15]+f[a>>24&15]+f[a>>20&15]+f[a>>16&15]+f[a>>12&15]+f[a>>8&15]+f[a>>4&15]+f[15&a]+f[o>>28&15]+f[o>>24&15]+f[o>>20&15]+f[o>>16&15]+f[o>>12&15]+f[o>>8&15]+f[o>>4&15]+f[15&o];return v>=256&&(y+=f[s>>28&15]+f[s>>24&15]+f[s>>20&15]+f[s>>16&15]+f[s>>12&15]+f[s>>8&15]+f[s>>4&15]+f[15&s]),v>=384&&(y+=f[u>>28&15]+f[u>>24&15]+f[u>>20&15]+f[u>>16&15]+f[u>>12&15]+f[u>>8&15]+f[u>>4&15]+f[15&u]+f[c>>28&15]+f[c>>24&15]+f[c>>20&15]+f[c>>16&15]+f[c>>12&15]+f[c>>8&15]+f[c>>4&15]+f[15&c]+f[l>>28&15]+f[l>>24&15]+f[l>>20&15]+f[l>>16&15]+f[l>>12&15]+f[l>>8&15]+f[l>>4&15]+f[15&l]+f[d>>28&15]+f[d>>24&15]+f[d>>20&15]+f[d>>16&15]+f[d>>12&15]+f[d>>8&15]+f[d>>4&15]+f[15&d]),512==v&&(y+=f[h>>28&15]+f[h>>24&15]+f[h>>20&15]+f[h>>16&15]+f[h>>12&15]+f[h>>8&15]+f[h>>4&15]+f[15&h]+f[p>>28&15]+f[p>>24&15]+f[p>>20&15]+f[p>>16&15]+f[p>>12&15]+f[p>>8&15]+f[p>>4&15]+f[15&p]+f[m>>28&15]+f[m>>24&15]+f[m>>20&15]+f[m>>16&15]+f[m>>12&15]+f[m>>8&15]+f[m>>4&15]+f[15&m]+f[g>>28&15]+f[g>>24&15]+f[g>>20&15]+f[g>>16&15]+f[g>>12&15]+f[g>>8&15]+f[g>>4&15]+f[15&g]),y},x.prototype.toString=x.prototype.hex,x.prototype.digest=function(){this.finalize();var e=this.h0h,t=this.h0l,n=this.h1h,r=this.h1l,i=this.h2h,a=this.h2l,o=this.h3h,s=this.h3l,u=this.h4h,c=this.h4l,l=this.h5h,d=this.h5l,f=this.h6h,h=this.h6l,p=this.h7h,m=this.h7l,g=this.bits,v=[e>>24&255,e>>16&255,e>>8&255,255&e,t>>24&255,t>>16&255,t>>8&255,255&t,n>>24&255,n>>16&255,n>>8&255,255&n,r>>24&255,r>>16&255,r>>8&255,255&r,i>>24&255,i>>16&255,i>>8&255,255&i,a>>24&255,a>>16&255,a>>8&255,255&a,o>>24&255,o>>16&255,o>>8&255,255&o];return g>=256&&v.push(s>>24&255,s>>16&255,s>>8&255,255&s),g>=384&&v.push(u>>24&255,u>>16&255,u>>8&255,255&u,c>>24&255,c>>16&255,c>>8&255,255&c,l>>24&255,l>>16&255,l>>8&255,255&l,d>>24&255,d>>16&255,d>>8&255,255&d),512==g&&v.push(f>>24&255,f>>16&255,f>>8&255,255&f,h>>24&255,h>>16&255,h>>8&255,255&h,p>>24&255,p>>16&255,p>>8&255,255&p,m>>24&255,m>>16&255,m>>8&255,255&m),v},x.prototype.array=x.prototype.digest,x.prototype.arrayBuffer=function(){this.finalize();var e=this.bits,t=new ArrayBuffer(e/8),n=new DataView(t);return n.setUint32(0,this.h0h),n.setUint32(4,this.h0l),n.setUint32(8,this.h1h),n.setUint32(12,this.h1l),n.setUint32(16,this.h2h),n.setUint32(20,this.h2l),n.setUint32(24,this.h3h),e>=256&&n.setUint32(28,this.h3l),e>=384&&(n.setUint32(32,this.h4h),n.setUint32(36,this.h4l),n.setUint32(40,this.h5h),n.setUint32(44,this.h5l)),512==e&&(n.setUint32(48,this.h6h),n.setUint32(52,this.h6l),n.setUint32(56,this.h7h),n.setUint32(60,this.h7l)),t},x.prototype.clone=function(){var e=new x(this.bits,!1);return this.copyTo(e),e},x.prototype.copyTo=function(e){var t=0,n=["h0h","h0l","h1h","h1l","h2h","h2l","h3h","h3l","h4h","h4l","h5h","h5l","h6h","h6l","h7h","h7l","start","bytes","hBytes","finalized","hashed","lastByteIndex"];for(t=0;t3&&void 0!==arguments[3]?arguments[3]:{};Object(u.a)(this,t),this.defaultHeaders=i;var a=n.endsWith("/")?n:"".concat(n,"/"),o=new URL(a);if("undefined"!==typeof r&&(o.port=r.toString()),0===o.protocol.length)throw new Error("Invalid base server URL, protocol must be defined.");this.baseURL=o,this.tokenHeader=e}return Object(s.a)(t,[{key:"getURL",value:function(e,t){var n;n=e.startsWith("./")?e:e.startsWith("/")?".".concat(e):"./".concat(e);var r=new URL(n,this.baseURL);if(t)for(var i=0,a=Object.entries(t);i2&&void 0!==c[2]?c[2]:{},s=Object(i.a)(Object(i.a)(Object(i.a)({},this.tokenHeader),this.defaultHeaders),o),e.next=4,Object(f.fetch)(this.getURL(n,a),{mode:"cors",headers:s});case 4:return u=e.sent,e.abrupt("return",t.formatFetchResponse(u));case 6:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"post",value:function(){var e=Object(a.a)(Object(r.a)().mark((function e(n,a,o){var s,u,c,l=arguments;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=l.length>3&&void 0!==l[3]?l[3]:{},u=Object(i.a)(Object(i.a)(Object(i.a)({},this.tokenHeader),this.defaultHeaders),s),e.next=4,Object(f.fetch)(this.getURL(n,o),{method:"POST",mode:"cors",body:a,headers:u});case 4:return c=e.sent,e.abrupt("return",t.formatFetchResponse(c));case 6:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"delete",value:function(){var e=Object(a.a)(Object(r.a)().mark((function e(n,a,o){var s,u,c,l=arguments;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=l.length>3&&void 0!==l[3]?l[3]:{},u=Object(i.a)(Object(i.a)(Object(i.a)({},this.tokenHeader),this.defaultHeaders),s),e.next=4,Object(f.fetch)(this.getURL(n,o),{method:"DELETE",mode:"cors",body:a,headers:u});case 4:return c=e.sent,e.abrupt("return",t.formatFetchResponse(c));case 6:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()}],[{key:"formatFetchResponseHeaders",value:function(e){var t={};return e.forEach((function(e,n){t[e]=n})),t}},{key:"checkHttpError",value:function(){var n=Object(a.a)(Object(r.a)().mark((function n(i){var a,o,s,u;return Object(r.a)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!i.ok){n.next=2;break}return n.abrupt("return");case 2:return a=null,o=null,n.prev=4,n.t0=Uint8Array,n.next=8,i.arrayBuffer();case 8:n.t1=n.sent,a=new n.t0(n.t1),(s=JSON.parse(e.from(a).toString())).message&&(o=s.message),n.next=16;break;case 14:n.prev=14,n.t2=n.catch(4);case 16:throw u="Network request error. Received status ".concat(i.status," (").concat(i.statusText,")"),o&&(u+=": ".concat(o)),new h(u,{body:a,status:i.status,headers:t.formatFetchResponseHeaders(i.headers)});case 19:case"end":return n.stop()}}),n,null,[[4,14]])})));return function(e){return n.apply(this,arguments)}}()},{key:"formatFetchResponse",value:function(){var e=Object(a.a)(Object(r.a)().mark((function e(n){return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.checkHttpError(n);case 2:return e.t0=Uint8Array,e.next=5,n.arrayBuffer();case 5:return e.t1=e.sent,e.t2=new e.t0(e.t1),e.t3=n.status,e.t4=t.formatFetchResponseHeaders(n.headers),e.abrupt("return",{body:e.t2,status:e.t3,headers:e.t4});case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),t}()}).call(this,n(19).Buffer)},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return f}));var r=n(0),i=n(6),a=n(2),o=n(1),s=n(4),u=n(5),c=n(14),l=n(20),d=n(91),f=function(t){Object(s.a)(c,t);var n=Object(u.a)(c);function c(e,t){var r;return Object(a.a)(this,c),(r=n.call(this,e)).blob=l.encode(t.get_obj_for_encoding(!0)),r}return Object(o.a)(c,[{key:"path",value:function(){return"/v2/teal/dryrun"}},{key:"do",value:function(){var t=Object(i.a)(Object(r.a)().mark((function t(){var n,i,a,o=arguments;return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=o.length>0&&void 0!==o[0]?o[0]:{},i=Object(d.b)(n),t.next=4,this.c.post(this.path(),e.from(this.blob),i);case 4:return a=t.sent,t.abrupt("return",a.body);case 6:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()}]),c}(c.a)}).call(this,n(19).Buffer)},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return c}));var r=n(2),i=n(1),a=n(4),o=n(5),s=n(14),u=n(37),c=function(t){Object(a.a)(s,t);var n=Object(o.a)(s);function s(t,i,a,o){var u;Object(r.a)(this,s),(u=n.call(this,t,i)).index=a,u.index=a;var c=e.from(o).toString("base64");return u.query.name=encodeURI("b64:".concat(c)),u}return Object(i.a)(s,[{key:"path",value:function(){return"/v2/applications/".concat(this.index,"/box")}},{key:"prepare",value:function(e){return u.Box.from_obj_for_encoding(e)}}]),s}(s.a)}).call(this,n(19).Buffer)},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return c}));var r=n(2),i=n(1),a=n(4),o=n(5),s=n(14),u=n(59),c=function(t){Object(a.a)(s,t);var n=Object(o.a)(s);function s(t,i,a,o){var u;Object(r.a)(this,s),(u=n.call(this,t,i)).index=a,u.index=a;var c=e.from(o).toString("base64");return u.query.name=encodeURI("b64:".concat(c)),u}return Object(i.a)(s,[{key:"path",value:function(){return"/v2/applications/".concat(this.index,"/box")}},{key:"prepare",value:function(e){return u.Box.from_obj_for_encoding(e)}}]),s}(s.a)}).call(this,n(19).Buffer)},function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var r=n(89),i=n(1),a=n(2),o=n(62),s=n(4),u=n(5),c=n(57);function l(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}l(":root {\n --gray-800: #242424;\n}"),l(".pera-onramp-modal-wrapper {\n position: fixed;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n z-index: 999999;\n width: 100vw;\n min-height: calc(100 * var(--vh));\n background-color: rgba(0, 0, 0, 0.7);\n}\n\n@media only screen and (max-width: 706px) {\n .pera-onramp-modal-wrapper {\n overflow-y: hidden;\n min-height: 100%;\n }\n}");var d=function(e){Object(s.a)(n,e);var t=Object(u.a)(n);function n(e,r){var i;Object(a.a)(this,n);for(var s=arguments.length,u=new Array(s>2?s-2:0),c=2;c\n \n \n \n ')}},{key:"closeModal",value:function(){var e=document.querySelector(".pera-onramp-modal-wrapper");e&&e.remove()}}]),n}(Object(c.a)(HTMLElement));window.addEventListener("DOMContentLoaded",(function(){x()})),window.addEventListener("resize",(function(){x()}));var S=new(function(){function e(t){Object(a.a)(this,e),this.listener=void 0,this.channel=t.channel}return Object(i.a)(e,[{key:"setupListener",value:function(e){var t=this,n=e.onReceiveMessage;this.close(),this.listener=function(e){if("object"==typeof e.data)try{e.data.channel===t.channel&&n(e)}catch(n){console.error(n)}},window.addEventListener("message",this.listener)}},{key:"sendMessage",value:function(e){var t=this,n=e.message,r=e.targetWindow,i=e.origin,a=e.timeout;setTimeout((function(){var e={channel:t.channel,message:n};r.postMessage(e,{targetOrigin:i||"*"})}),void 0===a?1e3:a)}},{key:"close",value:function(){this.listener&&(window.removeEventListener("message",this.listener),this.listener=void 0)}}]),e}())({channel:"pera-onramp"}),E=["ALGO","USDC-A","USDT-A"],O=function(){function e(t){var n=this;Object(a.a)(this,e),this.availableAssets=E,(null==t?void 0:t.availableAssets)&&(null==t?void 0:t.availableAssets.length)&&(this.availableAssets=t.availableAssets),this.optInEnabled=(null==t?void 0:t.optInEnabled)||!1,this.platform=(null==t?void 0:t.platform)||"package",this.messagePromise=new Promise((function(e,t){n.messageResolve=e,n.messageReject=t})),S.setupListener({onReceiveMessage:function(e){"CONTINUE_CLICKED_AFTER_ADD_FUNDS_COMPLETED"===e.data.message.type&&n.messageResolve("ADDING_FUNDS_COMPLETED")}})}return Object(i.a)(e,[{key:"addFunds",value:function(e){var t,n,r=this;return function(e){var t=e.accountAddress,n=e.availableAssets,r=e.optInEnabled,i=e.platform,a=e.messageReject;if(!document.body.contains(document.querySelector("pera-onramp-modal"))){var o=document.createElement("div");o.className="pera-onramp-modal-wrapper";var s=document.createElement("pera-onramp-modal");s.setAttribute("account-address",t),s.setAttribute("available-assets",n),s.setAttribute("opt-in-enabled",r),s.setAttribute("platform",i),document.addEventListener("click",(function(e){var t;e.target===(null===(t=s.shadowRoot)||void 0===t?void 0:t.querySelector(g))||e.target!==document.querySelector(".pera-onramp-modal-wrapper")&&e.target!==document.querySelector("pera-onramp-modal")||(o.remove(),a(new d({type:"MODAL_CLOSED_BY_USER",detail:"Modal closed by user"},"Modal closed by user")))})),o.appendChild(s),document.body.appendChild(o)}}({accountAddress:e.accountAddress,availableAssets:this.availableAssets.join(","),optInEnabled:this.optInEnabled.toString(),platform:this.platform,messageReject:this.messageReject}),(null===(n=null===(t=document.querySelector("pera-onramp-modal"))||void 0===t?void 0:t.shadowRoot)||void 0===n?void 0:n.querySelector("".concat(p," ").concat(y))).addEventListener("click",(function(){r.messageReject(new d({type:"MODAL_CLOSED_BY_USER",detail:"Modal closed by user"},"Modal closed by user"))})),this.messagePromise}},{key:"on",value:function(e){var t=this;S.setupListener({onReceiveMessage:function(n){var r=n.data.message;"OPT_IN_REQUEST"===r.type&&e.OPT_IN_REQUEST&&e.OPT_IN_REQUEST({accountAddress:r.accountAddress,assetID:r.assetID}),"ADD_FUNDS_COMPLETED"===r.type&&e.ADD_FUNDS_COMPLETED&&e.ADD_FUNDS_COMPLETED(),"ADD_FUNDS_FAILED"===r.type&&e.ADD_FUNDS_FAILED&&e.ADD_FUNDS_FAILED(),"CONTINUE_CLICKED_AFTER_ADD_FUNDS_COMPLETED"===r.type&&t.messageResolve("ADDING_FUNDS_COMPLETED")}})}},{key:"close",value:function(){var e=document.querySelector(".pera-onramp-modal-wrapper");e&&(e.remove(),this.messageReject(new d({type:"MODAL_CLOSED_PROGRAMMATICALLY",detail:"Modal closed programmatically"},"Modal closed programmatically")))}}]),e}();"undefined"!=typeof window&&customElements.define("pera-onramp-modal",k)},,function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return p}));var r=n(0),i=n(6),a=n(2),o=n(1),s=n(4),u=n(5),c=n(3),l=n(23),d=n(93),f=n(176),h=n(177),p=function(t){Object(s.a)(d,t);var n=Object(u.a)(d);function d(){return Object(a.a)(this,d),n.apply(this,arguments)}return Object(o.a)(d,[{key:"notification",value:function(){return new f.a(this.client,this.indexer)}},{key:"isValidAddress",value:function(e){return c.default.isValidAddress(e)}},{key:"createChannel",value:function(){var t=Object(i.a)(Object(r.a)().mark((function t(n){var i,a,o,s,u,d;return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=Object(h.a)(),a=this.convertToIntArray(i),t.next=4,this.client.compile(a).do();case 4:return o=t.sent,s=new Uint8Array(e.from(o.result,"base64")),u=c.default.OnApplicationComplete.NoOpOC,t.next=9,this.client.getTransactionParams().do();case 9:return d=t.sent,t.abrupt("return",c.default.makeApplicationCreateTxnFromObject({onComplete:u,from:n,suggestedParams:d,approvalProgram:s,clearProgram:s,numLocalInts:l.k,numLocalByteSlices:l.j,numGlobalInts:l.i,numGlobalByteSlices:l.h,appArgs:l.a}));case 11:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"channelContractOptin",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t,n,i){var a,o,s,u,d,f,h,p;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=this.convertToIntArray(l.o),o=[{appIndex:0,name:a},{appIndex:0,name:a},{appIndex:0,name:a},{appIndex:0,name:a},{appIndex:0,name:a},{appIndex:0,name:a},{appIndex:0,name:a},{appIndex:0,name:a}],!(this.encodeString(i).length>10)){e.next=4;break}throw Error;case 4:return s=[this.convertToIntArray("dapp"),this.encodeString(i)],e.next=7,this.client.getTransactionParams().do();case 7:return u=e.sent,d=c.default.makeAssetTransferTxnWithSuggestedParamsFromObject({from:t,assetIndex:l.d,suggestedParams:u,to:l.g,amount:l.e}),f=c.default.makeApplicationOptInTxnFromObject({from:t,suggestedParams:u,appIndex:l.n,appArgs:s,foreignAssets:[l.d],foreignApps:[n]}),h=this.createNoopTransactions(l.f,t,u,l.n,o,[]),p=[d,f].concat(h),c.default.assignGroupID(p),e.abrupt("return",p);case 15:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"channelDelete",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t,n){var i;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.getTransactionParams().do();case 2:return i=e.sent,e.abrupt("return",c.default.makeApplicationDeleteTxnFromObject({from:t,appIndex:n,suggestedParams:i}));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"channelContractOptout",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t,n,i,a){var o,s,u,d,f,h,p;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this.convertToIntArray(l.o),s=[{appIndex:0,name:o},{appIndex:0,name:o},{appIndex:0,name:o},{appIndex:0,name:o},{appIndex:0,name:o},{appIndex:0,name:o},{appIndex:0,name:o},{appIndex:0,name:o}],u=[this.convertToIntArray("dapp"),this.encodeString(i),c.default.bigIntToBytes(a,8)],e.next=5,this.client.getTransactionParams().do();case 5:return d=e.sent,f=c.default.makeApplicationCloseOutTxnFromObject({from:t,appIndex:l.n,suggestedParams:d,foreignApps:[n],appArgs:u}),h=this.createNoopTransactions(l.f,t,d,l.n,s,[]),p=[f].concat(h),c.default.assignGroupID(p),e.abrupt("return",p);case 12:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}()},{key:"userContractOptin",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i,a,o,s,u,d;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.default.decodeAddress(t).publicKey,i=[{appIndex:0,name:n},{appIndex:0,name:n},{appIndex:0,name:n},{appIndex:0,name:n},{appIndex:0,name:n},{appIndex:0,name:n},{appIndex:0,name:n},{appIndex:0,name:n}],a=[this.convertToIntArray("user")],e.next=5,this.client.getTransactionParams().do();case 5:return o=e.sent,s=c.default.makePaymentTxnWithSuggestedParamsFromObject({from:t,suggestedParams:o,to:l.p,amount:l.q}),u=c.default.makeApplicationOptInTxnFromObject({from:t,suggestedParams:o,appIndex:l.n,appArgs:a,boxes:i}),d=[s,u],c.default.assignGroupID(d),e.abrupt("return",d);case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"userChannelOptin",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t,n){var i,a;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.getTransactionParams().do();case 2:return i=e.sent,a=c.default.makeApplicationOptInTxnFromObject({from:t,suggestedParams:i,appIndex:n}),e.abrupt("return",a);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"userChannelOptout",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t,n){var i,a;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.client.getTransactionParams().do();case 2:return i=e.sent,a=c.default.makeApplicationCloseOutTxnFromObject({from:t,suggestedParams:i,appIndex:n}),e.abrupt("return",a);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getChannelList",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(){var t,n,i,a,o,s,u;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.client.getApplicationBoxByName(l.n,this.convertToIntArray(l.o)).do();case 3:for(t=e.sent,n=t.value,i=[],a=[],o=0;o0){e.next=3;break}case 17:return e.abrupt("return",a);case 20:return e.prev=20,e.t0=e.catch(0),e.abrupt("return",["0"]);case 23:case"end":return e.stop()}}),e,this,[[0,20]])})));return function(t){return e.apply(this,arguments)}}()}]),d}(d.a)}).call(this,n(19).Buffer)},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return f}));var r=n(0),i=n(6),a=n(2),o=n(1),s=n(4),u=n(5),c=n(3),l=n(93),d=n(23),f=function(t){Object(s.a)(l,t);var n=Object(u.a)(l);function l(){return Object(a.a)(this,l),n.apply(this,arguments)}return Object(o.a)(l,[{key:"sendPublicNotification",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t,n,i){var a,o,s,u,l;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((a=this.encodeString(i)).length>180)){e.next=3;break}throw Error;case 3:return o=[this.encodeString(d.b)],s=[n],e.next=7,this.client.getTransactionParams().do();case 7:return u=e.sent,l=c.default.makeApplicationNoOpTxnFromObject({from:t,suggestedParams:u,appIndex:d.n,appArgs:o,foreignApps:s,note:a}),e.abrupt("return",l);case 10:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"sendPersonalNotification",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t,n,i,a,o){var s,u,l,f,h,p,m,g;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((s=this.encodeString(o)).length>280)){e.next=3;break}throw Error;case 3:return u=c.default.decodeAddress(n).publicKey,l=[{appIndex:0,name:u},{appIndex:0,name:u},{appIndex:0,name:u},{appIndex:0,name:u},{appIndex:0,name:u},{appIndex:0,name:u}],f=[this.encodeString(d.c),this.encodeString(a)],h=[i],p=[n],e.next=10,this.client.getTransactionParams().do();case 10:return m=e.sent,g=c.default.makeApplicationNoOpTxnFromObject({from:t,suggestedParams:m,appIndex:d.n,appArgs:f,accounts:p,foreignApps:h,note:s,boxes:l}),e.abrupt("return",g);case 13:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i,a){return e.apply(this,arguments)}}()},{key:"getPublicNotification",value:function(){var e=Object(i.a)(Object(r.a)().mark((function e(t){var n,i,a;return Object(r.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.indexer.lookupApplications(t).do();case 3:return n=e.sent,e.next=6,this.indexer.lookupAccountAppLocalStates(n.application.params.creator).applicationID(d.n).do();case 6:if(void 0!=(i=e.sent)["apps-local-states"]){e.next=9;break}return e.abrupt("return",[]);case 9:return a=i["apps-local-states"][0]["key-value"],e.abrupt("return",this.getLocalState(a));case 13:return e.prev=13,e.t0=e.catch(0),e.abrupt("return",[]);case 16:case"end":return e.stop()}}),e,this,[[0,13]])})));return function(t){return e.apply(this,arguments)}}()},{key:"getPersonalNotification",value:function(){var t=Object(i.a)(Object(r.a)().mark((function t(n){var i,a,o,s,u,l,f,h,p;return Object(r.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,i=c.default.decodeAddress(n).publicKey,t.next=4,this.client.getApplicationBoxByName(d.n,e.from(i)).do();case 4:for(a=t.sent,o=a.value,s=[],u=[],l=0;lt}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!d.call(p,e)||!d.call(h,e)&&(f.test(e)?p[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),x=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),E=Symbol.for("react.provider"),O=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),R=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var I=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var P=Symbol.iterator;function L(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=P&&e[P]||e["@@iterator"])?e:null}var D,B=Object.assign;function N(e){if(void 0===D)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);D=t&&t[1]||""}return"\n"+D+e}var F=!1;function U(e,t){if(!e||F)return"";F=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&"string"===typeof c.stack){for(var i=c.stack.split("\n"),a=r.stack.split("\n"),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(1!==o||1!==s)do{if(o--,0>--s||i[o]!==a[s]){var u="\n"+i[o].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}}while(1<=o&&0<=s);break}}}finally{F=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?N(e):""}function z(e){switch(e.tag){case 5:return N(e.type);case 16:return N("Lazy");case 13:return N("Suspense");case 19:return N("SuspenseList");case 0:case 2:case 15:return e=U(e.type,!1);case 11:return e=U(e.type.render,!1);case 1:return e=U(e.type,!0);default:return""}}function q(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case A:return"Fragment";case x:return"Portal";case S:return"Profiler";case k:return"StrictMode";case T:return"Suspense";case M:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case O:return(e.displayName||"Context")+".Consumer";case E:return(e._context.displayName||"Context")+".Provider";case C:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case j:return null!==(t=e.displayName||null)?t:q(e.type)||"Memo";case R:t=e._payload,e=e._init;try{return q(e(t))}catch(n){}}return null}function H(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return q(t);case 8:return t===k?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function V(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function W(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function G(e){e._valueTracker||(e._valueTracker=function(e){var t=W(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function K(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=W(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Y(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(e,t){var n=t.checked;return B({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function X(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=V(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Q(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function J(e,t){Q(e,t);var n=V(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,V(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function $(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&Y(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return le(e,t)}))}:le);function fe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var he={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pe=["Webkit","ms","Moz","O"];function me(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||he.hasOwnProperty(e)&&he[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=me(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(he).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),he[t]=he[e]}))}));var ve=B({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(a(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var we=null;function _e(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var xe=null,Ae=null,ke=null;function Se(e){if(e=bi(e)){if("function"!==typeof xe)throw Error(a(280));var t=e.stateNode;t&&(t=_i(t),xe(e.stateNode,e.type,t))}}function Ee(e){Ae?ke?ke.push(e):ke=[e]:Ae=e}function Oe(){if(Ae){var e=Ae,t=ke;if(ke=Ae=null,Se(e),t)for(e=0;e>>=0)?32:31-(st(e)/ut|0)|0},st=Math.log,ut=Math.LN2;var ct=64,lt=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ft(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=268435455&n;if(0!==o){var s=o&~i;0!==s?r=dt(s):0!==(a&=o)&&(r=dt(a))}else 0!==(o=n&~i)?r=dt(o):0!==a&&(r=dt(a));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(a=t&-t)||16===i&&0!==(4194240&a)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-ot(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ot(n),i=1<=Ln),Nn=String.fromCharCode(32),Fn=!1;function Un(e,t){switch(e){case"keyup":return-1!==In.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var qn=!1;var Hn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Vn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Hn[e.type]:"textarea"===t}function Wn(e,t,n,r){Ee(r),0<(t=Gr(t,"onChange")).length&&(n=new ln("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Gn=null,Kn=null;function Yn(e){Nr(e,0)}function Zn(e){if(K(wi(e)))return e}function Xn(e,t){if("change"===e)return t}var Qn=!1;if(l){var Jn;if(l){var $n="oninput"in document;if(!$n){var er=document.createElement("div");er.setAttribute("oninput","return;"),$n="function"===typeof er.oninput}Jn=$n}else Jn=!1;Qn=Jn&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=cr(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function fr(){for(var e=window,t=Y();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Y((e=t.contentWindow).document)}return t}function hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function pr(e){var t=fr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&hr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=void 0===r.end?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=lr(n,a);var o=lr(n,r);i&&o&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n=document.documentMode,gr=null,vr=null,yr=null,br=!1;function wr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==gr||gr!==Y(r)||("selectionStart"in(r=gr)&&hr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&ur(yr,r)||(yr=r,0<(r=Gr(vr,"onSelect")).length&&(t=new ln("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function _r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var xr={animationend:_r("Animation","AnimationEnd"),animationiteration:_r("Animation","AnimationIteration"),animationstart:_r("Animation","AnimationStart"),transitionend:_r("Transition","TransitionEnd")},Ar={},kr={};function Sr(e){if(Ar[e])return Ar[e];if(!xr[e])return e;var t,n=xr[e];for(t in n)if(n.hasOwnProperty(t)&&t in kr)return Ar[e]=n[t];return e}l&&(kr=document.createElement("div").style,"AnimationEvent"in window||(delete xr.animationend.animation,delete xr.animationiteration.animation,delete xr.animationstart.animation),"TransitionEvent"in window||delete xr.transitionend.transition);var Er=Sr("animationend"),Or=Sr("animationiteration"),Cr=Sr("animationstart"),Tr=Sr("transitionend"),Mr=new Map,jr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Rr(e,t){Mr.set(e,t),u(t,[e])}for(var Ir=0;IrAi||(e.current=xi[Ai],xi[Ai]=null,Ai--)}function Ei(e,t){Ai++,xi[Ai]=e.current,e.current=t}var Oi={},Ci=ki(Oi),Ti=ki(!1),Mi=Oi;function ji(e,t){var n=e.type.contextTypes;if(!n)return Oi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Ri(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Ii(){Si(Ti),Si(Ci)}function Pi(e,t,n){if(Ci.current!==Oi)throw Error(a(168));Ei(Ci,t),Ei(Ti,n)}function Li(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(a(108,H(e)||"Unknown",i));return B({},n,r)}function Di(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Oi,Mi=Ci.current,Ei(Ci,e),Ei(Ti,Ti.current),!0}function Bi(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=Li(e,t,Mi),r.__reactInternalMemoizedMergedChildContext=e,Si(Ti),Si(Ci),Ei(Ci,e)):Si(Ti),Ei(Ti,n)}var Ni=null,Fi=!1,Ui=!1;function zi(e){null===Ni?Ni=[e]:Ni.push(e)}function qi(){if(!Ui&&null!==Ni){Ui=!0;var e=0,t=bt;try{var n=Ni;for(bt=1;e>=o,i-=o,Xi=1<<32-ot(t)+i|n<m?(g=d,d=null):g=d.sibling;var v=h(i,d,s[m],u);if(null===v){null===d&&(d=g);break}e&&d&&null===v.alternate&&t(i,d),a=o(v,a,m),null===l?c=v:l.sibling=v,l=v,d=g}if(m===s.length)return n(i,d),ia&&Ji(i,m),c;if(null===d){for(;mg?(v=m,m=null):v=m.sibling;var b=h(i,m,y.value,c);if(null===b){null===m&&(m=v);break}e&&m&&null===b.alternate&&t(i,m),s=o(b,s,g),null===d?l=b:d.sibling=b,d=b,m=v}if(y.done)return n(i,m),ia&&Ji(i,g),l;if(null===m){for(;!y.done;g++,y=u.next())null!==(y=f(i,y.value,c))&&(s=o(y,s,g),null===d?l=y:d.sibling=y,d=y);return ia&&Ji(i,g),l}for(m=r(i,m);!y.done;g++,y=u.next())null!==(y=p(m,i,g,y.value,c))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),s=o(y,s,g),null===d?l=y:d.sibling=y,d=y);return e&&m.forEach((function(e){return t(i,e)})),ia&&Ji(i,g),l}return function e(r,a,o,u){if("object"===typeof o&&null!==o&&o.type===A&&null===o.key&&(o=o.props.children),"object"===typeof o&&null!==o){switch(o.$$typeof){case _:e:{for(var c=o.key,l=a;null!==l;){if(l.key===c){if((c=o.type)===A){if(7===l.tag){n(r,l.sibling),(a=i(l,o.props.children)).return=r,r=a;break e}}else if(l.elementType===c||"object"===typeof c&&null!==c&&c.$$typeof===R&&Ya(c)===l.type){n(r,l.sibling),(a=i(l,o.props)).ref=Ga(r,l,o),a.return=r,r=a;break e}n(r,l);break}t(r,l),l=l.sibling}o.type===A?((a=Lc(o.props.children,r.mode,u,o.key)).return=r,r=a):((u=Pc(o.type,o.key,o.props,null,r.mode,u)).ref=Ga(r,a,o),u.return=r,r=u)}return s(r);case x:e:{for(l=o.key;null!==a;){if(a.key===l){if(4===a.tag&&a.stateNode.containerInfo===o.containerInfo&&a.stateNode.implementation===o.implementation){n(r,a.sibling),(a=i(a,o.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=Nc(o,r.mode,u)).return=r,r=a}return s(r);case R:return e(r,a,(l=o._init)(o._payload),u)}if(te(o))return m(r,a,o,u);if(L(o))return g(r,a,o,u);Ka(r,o)}return"string"===typeof o&&""!==o||"number"===typeof o?(o=""+o,null!==a&&6===a.tag?(n(r,a.sibling),(a=i(a,o)).return=r,r=a):(n(r,a),(a=Bc(o,r.mode,u)).return=r,r=a),s(r)):n(r,a)}}var Xa=Za(!0),Qa=Za(!1),Ja={},$a=ki(Ja),eo=ki(Ja),to=ki(Ja);function no(e){if(e===Ja)throw Error(a(174));return e}function ro(e,t){switch(Ei(to,t),Ei(eo,e),Ei($a,Ja),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ue(null,"");break;default:t=ue(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Si($a),Ei($a,t)}function io(){Si($a),Si(eo),Si(to)}function ao(e){no(to.current);var t=no($a.current),n=ue(t,e.type);t!==n&&(Ei(eo,e),Ei($a,n))}function oo(e){eo.current===e&&(Si($a),Si(eo))}var so=ki(0);function uo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var co=[];function lo(){for(var e=0;en?n:4,e(!0);var r=ho.transition;ho.transition={};try{e(!1),t()}finally{bt=n,ho.transition=r}}function es(){return Oo().memoizedState}function ts(e,t,n){var r=tc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},rs(e))is(t,n);else if(null!==(n=Ca(e,t,n,r))){nc(n,e,r,ec()),as(n,t,r)}}function ns(e,t,n){var r=tc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(rs(e))is(t,i);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,sr(s,o)){var u=t.interleaved;return null===u?(i.next=i,Oa(t)):(i.next=u.next,u.next=i),void(t.interleaved=i)}}catch(c){}null!==(n=Ca(e,t,i,r))&&(nc(n,e,r,i=ec()),as(n,t,r))}}function rs(e){var t=e.alternate;return e===mo||null!==t&&t===mo}function is(e,t){bo=yo=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function as(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}var os={readContext:Sa,useCallback:xo,useContext:xo,useEffect:xo,useImperativeHandle:xo,useInsertionEffect:xo,useLayoutEffect:xo,useMemo:xo,useReducer:xo,useRef:xo,useState:xo,useDebugValue:xo,useDeferredValue:xo,useTransition:xo,useMutableSource:xo,useSyncExternalStore:xo,useId:xo,unstable_isNewReconciler:!1},ss={readContext:Sa,useCallback:function(e,t){return Eo().memoizedState=[e,void 0===t?null:t],e},useContext:Sa,useEffect:Ho,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,zo(4194308,4,Ko.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zo(4194308,4,e,t)},useInsertionEffect:function(e,t){return zo(4,2,e,t)},useMemo:function(e,t){var n=Eo();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Eo();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ts.bind(null,mo,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Eo().memoizedState=e},useState:No,useDebugValue:Zo,useDeferredValue:function(e){return Eo().memoizedState=e},useTransition:function(){var e=No(!1),t=e[0];return e=$o.bind(null,e[1]),Eo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=mo,i=Eo();if(ia){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===Tu)throw Error(a(349));0!==(30&po)||Io(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Ho(Lo.bind(null,r,o,e),[e]),r.flags|=2048,Fo(9,Po.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Eo(),t=Tu.identifierPrefix;if(ia){var n=Qi;t=":"+t+"R"+(n=(Xi&~(1<<32-ot(Xi)-1)).toString(32)+n),0<(n=wo++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=_o++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},us={readContext:Sa,useCallback:Xo,useContext:Sa,useEffect:Vo,useImperativeHandle:Yo,useInsertionEffect:Wo,useLayoutEffect:Go,useMemo:Qo,useReducer:To,useRef:Uo,useState:function(){return To(Co)},useDebugValue:Zo,useDeferredValue:function(e){return Jo(Oo(),go.memoizedState,e)},useTransition:function(){return[To(Co)[0],Oo().memoizedState]},useMutableSource:jo,useSyncExternalStore:Ro,useId:es,unstable_isNewReconciler:!1},cs={readContext:Sa,useCallback:Xo,useContext:Sa,useEffect:Vo,useImperativeHandle:Yo,useInsertionEffect:Wo,useLayoutEffect:Go,useMemo:Qo,useReducer:Mo,useRef:Uo,useState:function(){return Mo(Co)},useDebugValue:Zo,useDeferredValue:function(e){var t=Oo();return null===go?t.memoizedState=e:Jo(t,go.memoizedState,e)},useTransition:function(){return[Mo(Co)[0],Oo().memoizedState]},useMutableSource:jo,useSyncExternalStore:Ro,useId:es,unstable_isNewReconciler:!1};function ls(e,t){try{var n="",r=t;do{n+=z(r),r=r.return}while(r);var i=n}catch(a){i="\nError generating stack: "+a.message+"\n"+a.stack}return{value:e,source:t,stack:i,digest:null}}function ds(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function fs(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var hs="function"===typeof WeakMap?WeakMap:Map;function ps(e,t,n){(n=Ia(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Vu||(Vu=!0,Wu=r),fs(0,t)},n}function ms(e,t,n){(n=Ia(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){fs(0,t)}}var a=e.stateNode;return null!==a&&"function"===typeof a.componentDidCatch&&(n.callback=function(){fs(0,t),"function"!==typeof r&&(null===Gu?Gu=new Set([this]):Gu.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function gs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new hs;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Sc.bind(null,e,t,n),t.then(e,e))}function vs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ys(e,t,n,r,i){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Ia(-1,1)).tag=2,Pa(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var bs=w.ReactCurrentOwner,ws=!1;function _s(e,t,n,r){t.child=null===e?Qa(t,null,n,r):Xa(t,e.child,n,r)}function xs(e,t,n,r,i){n=n.render;var a=t.ref;return ka(t,i),r=ko(e,t,n,r,a,i),n=So(),null===e||ws?(ia&&n&&ea(t),t.flags|=1,_s(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Vs(e,t,i))}function As(e,t,n,r,i){if(null===e){var a=n.type;return"function"!==typeof a||Rc(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Pc(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,ks(e,t,a,r,i))}if(a=e.child,0===(e.lanes&i)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:ur)(o,r)&&e.ref===t.ref)return Vs(e,t,i)}return t.flags|=1,(e=Ic(a,r)).ref=t.ref,e.return=t,t.child=e}function ks(e,t,n,r,i){if(null!==e){var a=e.memoizedProps;if(ur(a,r)&&e.ref===t.ref){if(ws=!1,t.pendingProps=r=a,0===(e.lanes&i))return t.lanes=e.lanes,Vs(e,t,i);0!==(131072&e.flags)&&(ws=!0)}}return Os(e,t,n,r,i)}function Ss(e,t,n){var r=t.pendingProps,i=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ei(Iu,Ru),Ru|=n;else{if(0===(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ei(Iu,Ru),Ru|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,Ei(Iu,Ru),Ru|=r}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,Ei(Iu,Ru),Ru|=r;return _s(e,t,i,n),t.child}function Es(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Os(e,t,n,r,i){var a=Ri(n)?Mi:Ci.current;return a=ji(t,a),ka(t,i),n=ko(e,t,n,r,a,i),r=So(),null===e||ws?(ia&&r&&ea(t),t.flags|=1,_s(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Vs(e,t,i))}function Cs(e,t,n,r,i){if(Ri(n)){var a=!0;Di(t)}else a=!1;if(ka(t,i),null===t.stateNode)Hs(e,t),Ha(t,n,r),Wa(t,n,r,i),r=!0;else if(null===e){var o=t.stateNode,s=t.memoizedProps;o.props=s;var u=o.context,c=n.contextType;"object"===typeof c&&null!==c?c=Sa(c):c=ji(t,c=Ri(n)?Mi:Ci.current);var l=n.getDerivedStateFromProps,d="function"===typeof l||"function"===typeof o.getSnapshotBeforeUpdate;d||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(s!==r||u!==c)&&Va(t,o,r,c),Ma=!1;var f=t.memoizedState;o.state=f,Ba(t,r,o,i),u=t.memoizedState,s!==r||f!==u||Ti.current||Ma?("function"===typeof l&&(Ua(t,n,l,r),u=t.memoizedState),(s=Ma||qa(t,n,s,r,f,u,c))?(d||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||("function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"===typeof o.componentDidMount&&(t.flags|=4194308)):("function"===typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),o.props=r,o.state=u,o.context=c,r=s):("function"===typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Ra(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:ga(t.type,s),o.props=c,d=t.pendingProps,f=o.context,"object"===typeof(u=n.contextType)&&null!==u?u=Sa(u):u=ji(t,u=Ri(n)?Mi:Ci.current);var h=n.getDerivedStateFromProps;(l="function"===typeof h||"function"===typeof o.getSnapshotBeforeUpdate)||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(s!==d||f!==u)&&Va(t,o,r,u),Ma=!1,f=t.memoizedState,o.state=f,Ba(t,r,o,i);var p=t.memoizedState;s!==d||f!==p||Ti.current||Ma?("function"===typeof h&&(Ua(t,n,h,r),p=t.memoizedState),(c=Ma||qa(t,n,c,r,f,p,u)||!1)?(l||"function"!==typeof o.UNSAFE_componentWillUpdate&&"function"!==typeof o.componentWillUpdate||("function"===typeof o.componentWillUpdate&&o.componentWillUpdate(r,p,u),"function"===typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,p,u)),"function"===typeof o.componentDidUpdate&&(t.flags|=4),"function"===typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof o.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=u,r=c):("function"!==typeof o.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Ts(e,t,n,r,a,i)}function Ts(e,t,n,r,i,a){Es(e,t);var o=0!==(128&t.flags);if(!r&&!o)return i&&Bi(t,n,!1),Vs(e,t,a);r=t.stateNode,bs.current=t;var s=o&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=Xa(t,e.child,null,a),t.child=Xa(t,null,s,a)):_s(e,t,s,a),t.memoizedState=r.state,i&&Bi(t,n,!0),t.child}function Ms(e){var t=e.stateNode;t.pendingContext?Pi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Pi(0,t.context,!1),ro(e,t.containerInfo)}function js(e,t,n,r,i){return ha(),pa(i),t.flags|=256,_s(e,t,n,r),t.child}var Rs,Is,Ps,Ls={dehydrated:null,treeContext:null,retryLane:0};function Ds(e){return{baseLanes:e,cachePool:null,transitions:null}}function Bs(e,t,n){var r,i=t.pendingProps,o=so.current,s=!1,u=0!==(128&t.flags);if((r=u)||(r=(null===e||null!==e.memoizedState)&&0!==(2&o)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),Ei(so,1&o),null===e)return ca(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(u=i.children,e=i.fallback,s?(i=t.mode,s=t.child,u={mode:"hidden",children:u},0===(1&i)&&null!==s?(s.childLanes=0,s.pendingProps=u):s=Dc(u,i,0,null),e=Lc(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Ds(n),t.memoizedState=Ls,e):Ns(t,u));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,s){if(n)return 256&t.flags?(t.flags&=-257,Fs(e,t,s,r=ds(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Dc({mode:"visible",children:r.children},i,0,null),(o=Lc(o,i,s,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,0!==(1&t.mode)&&Xa(t,e.child,null,s),t.child.memoizedState=Ds(s),t.memoizedState=Ls,o);if(0===(1&t.mode))return Fs(e,t,s,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var u=r.dgst;return r=u,Fs(e,t,s,r=ds(o=Error(a(419)),r,void 0))}if(u=0!==(s&e.childLanes),ws||u){if(null!==(r=Tu)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(r.suspendedLanes|s))?0:i)&&i!==o.retryLane&&(o.retryLane=i,Ta(e,i),nc(r,e,i,-1))}return mc(),Fs(e,t,s,r=ds(Error(a(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Oc.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,ra=ci(i.nextSibling),na=t,ia=!0,aa=null,null!==e&&(Ki[Yi++]=Xi,Ki[Yi++]=Qi,Ki[Yi++]=Zi,Xi=e.id,Qi=e.overflow,Zi=t),(t=Ns(t,r.children)).flags|=4096,t)}(e,t,u,i,r,o,n);if(s){s=i.fallback,u=t.mode,r=(o=e.child).sibling;var c={mode:"hidden",children:i.children};return 0===(1&u)&&t.child!==o?((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null):(i=Ic(o,c)).subtreeFlags=14680064&o.subtreeFlags,null!==r?s=Ic(r,s):(s=Lc(s,u,n,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,u=null===(u=e.child.memoizedState)?Ds(n):{baseLanes:u.baseLanes|n,cachePool:null,transitions:u.transitions},s.memoizedState=u,s.childLanes=e.childLanes&~n,t.memoizedState=Ls,i}return e=(s=e.child).sibling,i=Ic(s,{mode:"visible",children:i.children}),0===(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Ns(e,t){return(t=Dc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Fs(e,t,n,r){return null!==r&&pa(r),Xa(t,e.child,null,n),(e=Ns(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Us(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Aa(e.return,t,n)}function zs(e,t,n,r,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function qs(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(_s(e,t,r.children,n),0!==(2&(r=so.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Us(e,n,t);else if(19===e.tag)Us(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ei(so,r),0===(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===uo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),zs(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===uo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}zs(t,!0,n,null,a);break;case"together":zs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Hs(e,t){0===(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Vs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Du|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Ic(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ic(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ws(e,t){if(!ia)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Gs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ks(e,t,n){var r=t.pendingProps;switch(ta(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Gs(t),null;case 1:case 17:return Ri(t.type)&&Ii(),Gs(t),null;case 3:return r=t.stateNode,io(),Si(Ti),Si(Ci),lo(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(da(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==aa&&(oc(aa),aa=null))),Gs(t),null;case 5:oo(t);var i=no(to.current);if(n=t.type,null!==e&&null!=t.stateNode)Is(e,t,n,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(a(166));return Gs(t),null}if(e=no($a.current),da(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[fi]=t,r[hi]=o,e=0!==(1&t.mode),n){case"dialog":Fr("cancel",r),Fr("close",r);break;case"iframe":case"object":case"embed":Fr("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),"select"===n&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[fi]=t,e[hi]=r,Rs(e,t),t.stateNode=e;e:{switch(u=be(n,r),n){case"dialog":Fr("cancel",e),Fr("close",e),i=r;break;case"iframe":case"object":case"embed":Fr("load",e),i=r;break;case"video":case"audio":for(i=0;iqu&&(t.flags|=128,r=!0,Ws(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=uo(u))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Ws(o,!0),null===o.tail&&"hidden"===o.tailMode&&!u.alternate&&!ia)return Gs(t),null}else 2*Qe()-o.renderingStartTime>qu&&1073741824!==n&&(t.flags|=128,r=!0,Ws(o,!1),t.lanes=4194304);o.isBackwards?(u.sibling=t.child,t.child=u):(null!==(n=o.last)?n.sibling=u:t.child=u,o.last=u)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Qe(),t.sibling=null,n=so.current,Ei(so,r?1&n|2:1&n),t):(Gs(t),null);case 22:case 23:return dc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Ru)&&(Gs(t),6&t.subtreeFlags&&(t.flags|=8192)):Gs(t),null;case 24:case 25:return null}throw Error(a(156,t.tag))}function Ys(e,t){switch(ta(t),t.tag){case 1:return Ri(t.type)&&Ii(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return io(),Si(Ti),Si(Ci),lo(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return oo(t),null;case 13:if(Si(so),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));ha()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Si(so),null;case 4:return io(),null;case 10:return xa(t.type._context),null;case 22:case 23:return dc(),null;default:return null}}Rs=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Is=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,no($a.current);var a,o=null;switch(n){case"input":i=Z(e,i),r=Z(e,r),o=[];break;case"select":i=B({},i,{value:void 0}),r=B({},r,{value:void 0}),o=[];break;case"textarea":i=re(e,i),r=re(e,r),o=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=$r)}for(l in ye(n,r),n=null,i)if(!r.hasOwnProperty(l)&&i.hasOwnProperty(l)&&null!=i[l])if("style"===l){var u=i[l];for(a in u)u.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(s.hasOwnProperty(l)?o||(o=[]):(o=o||[]).push(l,null));for(l in r){var c=r[l];if(u=null!=i?i[l]:void 0,r.hasOwnProperty(l)&&c!==u&&(null!=c||null!=u))if("style"===l)if(u){for(a in u)!u.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&u[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(o||(o=[]),o.push(l,n)),n=c;else"dangerouslySetInnerHTML"===l?(c=c?c.__html:void 0,u=u?u.__html:void 0,null!=c&&u!==c&&(o=o||[]).push(l,c)):"children"===l?"string"!==typeof c&&"number"!==typeof c||(o=o||[]).push(l,""+c):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(s.hasOwnProperty(l)?(null!=c&&"onScroll"===l&&Fr("scroll",e),o||u===c||(o=[])):(o=o||[]).push(l,c))}n&&(o=o||[]).push("style",n);var l=o;(t.updateQueue=l)&&(t.flags|=4)}},Ps=function(e,t,n,r){n!==r&&(t.flags|=4)};var Zs=!1,Xs=!1,Qs="function"===typeof WeakSet?WeakSet:Set,Js=null;function $s(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){kc(e,t,r)}else n.current=null}function eu(e,t,n){try{n()}catch(r){kc(e,t,r)}}var tu=!1;function nu(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,void 0!==a&&eu(t,n,a)}i=i.next}while(i!==r)}}function ru(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function iu(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function au(e){var t=e.alternate;null!==t&&(e.alternate=null,au(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[fi],delete t[hi],delete t[mi],delete t[gi],delete t[vi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ou(e){return 5===e.tag||3===e.tag||4===e.tag}function su(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||ou(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function uu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=$r));else if(4!==r&&null!==(e=e.child))for(uu(e,t,n),e=e.sibling;null!==e;)uu(e,t,n),e=e.sibling}function cu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cu(e,t,n),e=e.sibling;null!==e;)cu(e,t,n),e=e.sibling}var lu=null,du=!1;function fu(e,t,n){for(n=n.child;null!==n;)hu(e,t,n),n=n.sibling}function hu(e,t,n){if(at&&"function"===typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(it,n)}catch(s){}switch(n.tag){case 5:Xs||$s(n,t);case 6:var r=lu,i=du;lu=null,fu(e,t,n),du=i,null!==(lu=r)&&(du?(e=lu,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):lu.removeChild(n.stateNode));break;case 18:null!==lu&&(du?(e=lu,n=n.stateNode,8===e.nodeType?ui(e.parentNode,n):1===e.nodeType&&ui(e,n),qt(e)):ui(lu,n.stateNode));break;case 4:r=lu,i=du,lu=n.stateNode.containerInfo,du=!0,fu(e,t,n),lu=r,du=i;break;case 0:case 11:case 14:case 15:if(!Xs&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,void 0!==o&&(0!==(2&a)||0!==(4&a))&&eu(n,t,o),i=i.next}while(i!==r)}fu(e,t,n);break;case 1:if(!Xs&&($s(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){kc(n,t,s)}fu(e,t,n);break;case 21:fu(e,t,n);break;case 22:1&n.mode?(Xs=(r=Xs)||null!==n.memoizedState,fu(e,t,n),Xs=r):fu(e,t,n);break;default:fu(e,t,n)}}function pu(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Qs),t.forEach((function(t){var r=Cc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function mu(e,t){var n=t.deletions;if(null!==n)for(var r=0;ri&&(i=s),r&=~o}if(r=i,10<(r=(120>(r=Qe()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ku(r/1960))-r)){e.timeoutHandle=ri(_c.bind(null,e,Uu,Hu),r);break}_c(e,Uu,Hu);break;default:throw Error(a(329))}}}return rc(e,Qe()),e.callbackNode===n?ic.bind(null,e):null}function ac(e,t){var n=Fu;return e.current.memoizedState.isDehydrated&&(fc(e,t).flags|=256),2!==(e=gc(e,t))&&(t=Uu,Uu=n,null!==t&&oc(t)),e}function oc(e){null===Uu?Uu=e:Uu.push.apply(Uu,e)}function sc(e,t){for(t&=~Nu,t&=~Bu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0e?16:e,null===Yu)var r=!1;else{if(e=Yu,Yu=null,Zu=0,0!==(6&Cu))throw Error(a(331));var i=Cu;for(Cu|=4,Js=e.current;null!==Js;){var o=Js,s=o.child;if(0!==(16&Js.flags)){var u=o.deletions;if(null!==u){for(var c=0;cQe()-zu?fc(e,0):Nu|=n),rc(e,t)}function Ec(e,t){0===t&&(0===(1&e.mode)?t=1:(t=lt,0===(130023424&(lt<<=1))&&(lt=4194304)));var n=ec();null!==(e=Ta(e,t))&&(vt(e,t,n),rc(e,n))}function Oc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Ec(e,n)}function Cc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(a(314))}null!==r&&r.delete(t),Ec(e,n)}function Tc(e,t){return Ke(e,t)}function Mc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jc(e,t,n,r){return new Mc(e,t,n,r)}function Rc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ic(e,t){var n=e.alternate;return null===n?((n=jc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Pc(e,t,n,r,i,o){var s=2;if(r=e,"function"===typeof e)Rc(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case A:return Lc(n.children,i,o,t);case k:s=8,i|=8;break;case S:return(e=jc(12,n,t,2|i)).elementType=S,e.lanes=o,e;case T:return(e=jc(13,n,t,i)).elementType=T,e.lanes=o,e;case M:return(e=jc(19,n,t,i)).elementType=M,e.lanes=o,e;case I:return Dc(n,i,o,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case E:s=10;break e;case O:s=9;break e;case C:s=11;break e;case j:s=14;break e;case R:s=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=jc(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Lc(e,t,n,r){return(e=jc(7,e,r,t)).lanes=n,e}function Dc(e,t,n,r){return(e=jc(22,e,r,t)).elementType=I,e.lanes=n,e.stateNode={isHidden:!1},e}function Bc(e,t,n){return(e=jc(6,e,null,t)).lanes=n,e}function Nc(e,t,n){return(t=jc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Fc(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Uc(e,t,n,r,i,a,o,s,u){return e=new Fc(e,t,n,s,u),1===t?(t=1,!0===a&&(t|=8)):t=0,a=jc(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ja(a),e}function zc(e,t,n){var r=3>>1,i=e[r];if(!(0>>1;ra(u,n))ca(l,u)?(e[r]=l,e[c]=n,r=c):(e[r]=u,e[s]=n,r=s);else{if(!(ca(l,n)))break e;e[r]=l,e[c]=n,r=c}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,u=s.now();t.unstable_now=function(){return s.now()-u}}var c=[],l=[],d=1,f=null,h=3,p=!1,m=!1,g=!1,v="function"===typeof setTimeout?setTimeout:null,y="function"===typeof clearTimeout?clearTimeout:null,b="undefined"!==typeof e?e:null;function w(e){for(var t=r(l);null!==t;){if(null===t.callback)i(l);else{if(!(t.startTime<=e))break;i(l),t.sortIndex=t.expirationTime,n(c,t)}t=r(l)}}function _(e){if(g=!1,w(e),!m)if(null!==r(c))m=!0,I(x);else{var t=r(l);null!==t&&P(_,t.startTime-e)}}function x(e,n){m=!1,g&&(g=!1,y(E),E=-1),p=!0;var a=h;try{for(w(n),f=r(c);null!==f&&(!(f.expirationTime>n)||e&&!T());){var o=f.callback;if("function"===typeof o){f.callback=null,h=f.priorityLevel;var s=o(f.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?f.callback=s:f===r(c)&&i(c),w(n)}else i(c);f=r(c)}if(null!==f)var u=!0;else{var d=r(l);null!==d&&P(_,d.startTime-n),u=!1}return u}finally{f=null,h=a,p=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var A,k=!1,S=null,E=-1,O=5,C=-1;function T(){return!(t.unstable_now()-Ce||125o?(e.sortIndex=a,n(l,e),null===r(c)&&e===r(l)&&(g?(y(E),E=-1):g=!0,P(_,a-o))):(e.sortIndex=s,n(c,e),m||p||(m=!0,I(x))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}}).call(this,n(188).setImmediate)},function(e,t,n){(function(e){var r="undefined"!==typeof e&&e||"undefined"!==typeof self&&self||window,i=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new a(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(189),t.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(41))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i=1,a={},o=!1,s=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){l(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var t="setImmediate$"+Math.random()+"$",n=function(n){n.source===e&&"string"===typeof n.data&&0===n.data.indexOf(t)&&l(+n.data.slice(t.length))};e.addEventListener?e.addEventListener("message",n,!1):e.attachEvent("onmessage",n),r=function(n){e.postMessage(t+n,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){l(e.data)},r=function(t){e.port2.postMessage(t)}}():s&&"onreadystatechange"in s.createElement("script")?function(){var e=s.documentElement;r=function(t){var n=s.createElement("script");n.onreadystatechange=function(){l(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():r=function(e){setTimeout(l,0,e)},u.setImmediate=function(e){"function"!==typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n=0||(i[n]=e[n]);return i},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i=r(n(13)),a=r(n(25));n(83);var o=n(68);n(45);var s=n(48),u=n(114);e.exports=function(e){var t=e.items,n=e.testid,r=e.onSelect,c=e.selectedItem,l=e.customClassName,d=e.isDisabled;return i.createElement(o,{testid:n,items:t,customClassName:a("radio-group",l)},(function(e,t){return i.createElement(s,{customClassName:a("radio-group__item",e.customClassName)},i.createElement(u,{testid:t,isDisabled:d||e.isDisabled,item:e,onSelect:r,isSelected:Boolean(c&&c.id===e.id)}))}))}},function(e,t,n){"use strict";var r=n(98).default,i=["styles"];function a(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var o=n(13),s=a(o),u=a(n(25)),c=n(45),l=n(48),d=n(33);n(49),n(81);var f=n(50);n(69);var h=n(115),p=n(116),m=n(99);function g(e){return{id:e.id,content:e.title,context:e}}function v(){return(v=Object.assign||function(e){for(var t=1;t=b),Q=!b||b>1,J=!Q||Boolean(b&&r.length>=b-1),$=u("typeahead-select",y,{"typeahead-select--has-selected-options":Boolean(r.length),"typeahead-select--can-select-multiple":Q,"typeahead-select--is-dropdown-menu-open":B}),ee=j||s.createElement(f,{customClassName:"typeahead-select__spinner"});o.useEffect((function(){z(n)}),[n]),o.useEffect((function(){var e;return H&&(e=setTimeout((function(){L.current&&(L.current.focus(),V(!1))}))),function(){clearTimeout(e)}}),[H]);var te=s.createElement("div",{className:"typeahead-select__header-container"},s.createElement(w,{tags:x?Z:[],handleTagRemove:function(e){a&&(a(e.context),V(!0))},input:!X&&s.createElement(h,{testid:t+".search",customClassName:"typeahead-select__input",id:i.id,name:i.name,type:i.type,placeholder:i.placeholder,value:Y,onQueryChange:function(e){k&&z(function(e,t){var n=e;return t&&(n=e.filter((function(e){return!e.title||e.title.toLowerCase().includes(t.toLowerCase())}))),n}(n,e)),l&&l(e),void 0===P&&K(e)},onKeyDown:function(e){e.key===c.KEYBOARD_EVENT_KEY.BACKSPACE&&!Y&&a&&r.length&&(e.stopPropagation(),a(r[r.length-1]))},rightIcon:M?ee:s.createElement(p.CaretDownIcon,{"aria-hidden":!0}),onFocus:function(e){T&&!S&&N(!0),i.onFocus&&i.onFocus(e)},isDisabled:S})}));return s.createElement(p.Dropdown,{testid:t,customClassName:$,headerWithoutButton:te,role:"listbox",options:m.filterOutItemsByKey(U,"id",r),onSelect:function(e){X||(v(e),z(n),K(""),V(!0))},selectedOption:null,isMenuOpenHook:[B,N],hasDeselectOption:!1,shouldCloseOnSelect:J,shouldJumpToQuery:!1,isDisabled:S,areOptionsFetching:M,shouldShowEmptyOptions:O,canOpenDropdownMenu:T})}},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i=r(n(13)),a=r(n(25)),o=n(33);n(50);var s=n(113),u=i.forwardRef((function(e,t){var n=e.onFileSelect,r=e.children,u=e.customClassName,c=e.customLabelClassName,l=o.__rest(e,["onFileSelect","children","customClassName","customLabelClassName"]);return i.createElement(s,o.__assign({},l,{ref:t,customClassName:a("file-upload-button",u),customLabelClassName:a("file-upload-button__label","button",c),onChange:function(e){var t=e.currentTarget.files;n&&(null==t?void 0:t.length)&&n(t)}}),r)}));e.exports=u},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i=n(13),a=r(i),o=r(n(25)),s=n(45),u=n(33),c=r(n(155));e.exports=function(e){var t=e.name,n=e.value,r=e.isDisabled,l=e.customClassNames,d=e.testid,f=e.onKeyUp,h=e.style,p=e.autoSizeProps,m=e.onJustEnterPressed,g=e.isRequired,v=e.onShiftEnter,y=e.hasError,b=e.onKeyDown,w=e.autoComplete,_=void 0===w?"off":w,x=e.autoCorrect,A=void 0===x?"off":x,k=e.autoFocus,S=void 0!==k&&k,E=u.__rest(e,["name","value","isDisabled","customClassNames","testid","onKeyUp","style","autoSizeProps","onJustEnterPressed","isRequired","onShiftEnter","hasError","onKeyDown","autoComplete","autoCorrect","autoFocus"]),O=u.__read(i.useState(!1),2),C=O[0],T=O[1],M=o("textarea-container",null==l?void 0:l.container,{"textarea--has-error":y,"textarea--is-disabled":r}),j=o("textarea",null==l?void 0:l.textarea);return a.createElement("div",{"data-testid":"textarea-container",className:M},p?a.createElement(c,u.__assign({className:j,"data-testid":d,name:t,value:n,autoComplete:_,autoCorrect:A,disabled:r,onKeyDown:R,onKeyUp:I,style:p.style,maxRows:p.maxRows,minRows:p.minRows,onHeightChange:p.onHeightChange,required:g,autoFocus:S},E)):a.createElement("textarea",u.__assign({className:j,"data-testid":d,name:t,value:n,autoComplete:_,autoCorrect:A,disabled:r,onKeyDown:R,onKeyUp:I,style:h,required:g,autoFocus:S},E)));function R(e){var n=e.key,r=u.__assign({},e);r.currentTarget.name=t,n===s.KEYBOARD_EVENT_KEY.ENTER?!C&&m?(e.preventDefault(),m()):C&&v&&(e.preventDefault(),v()):n===s.KEYBOARD_EVENT_KEY.SHIFT&&T(!0),b&&b(r)}function I(e){e.key===s.KEYBOARD_EVENT_KEY.SHIFT&&T(!1),f&&f(e)}}},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var i=n(13),a=r(i),o=r(n(25));n(45);var s=n(48),u=n(33),c=i.createContext({selectedItems:[],onToggle:function(){},canSelectMultiple:!1});function l(e){var t=e.children,n=e.onToggle,r=e.selectedItems,i=void 0===r?[]:r,s=e.canSelectMultiple,u=void 0!==s&&s,l=e.position,d=void 0===l?"horizontal":l,f=e.isDisabled,h=e.customClassName,p=o("toggle",h,{"toggle--is-horizontal":"horizontal"===d,"toggle--is-vertical":"vertical"===d,"toggle--is-disabled":f});return a.createElement("ul",{className:p},a.createElement(c.Provider,{value:{selectedItems:i,onToggle:n,canSelectMultiple:u}},t))}c.displayName="ToggleContext",l.Item=function(e){var t=e.children,n=e.dataId,r=e.customClassName,l=e.isDisabled,d=e.testid,f=function(){var e=i.useContext(c);if(!e)throw new Error("Trying to consume ToggleContext outside of its provider.");return e}(),h=f.selectedItems,p=f.onToggle,m=f.canSelectMultiple,g=h.includes(n),v=o("toggle-item",r,{"toggle-item--is-selected":g,"toggle-item--is-disabled":l});return a.createElement(s,{testid:d,customClassName:v},a.createElement("label",{className:"toggle-item__label"},a.createElement("input",{type:"checkbox",className:"toggle-input",checked:g,disabled:l,onChange:function(){var e;e=g?h.filter((function(e){return e!==n})):m?u.__spread(h,[n]):[n],p(e)}}),t))},t.Toggle=l,t.ToggleContext=c},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i=r(n(13)),a=r(n(25));e.exports=function(e){var t=e.onToggle,n=e.isToggledOn,r=e.isDisabled,o=e.customClassName,s=e.testid,u=a("switch",o,{"switch--is-disabled":r});return i.createElement("label",{"data-testid":s,className:u},i.createElement("input",{className:"switch__controller",type:"checkbox",checked:n,disabled:r,onChange:t,role:"switch","aria-checked":n,"aria-readonly":r}),i.createElement("span",{className:"switch__slider"}))}},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i=n(13),a=r(i),o=r(n(25)),s=n(68),u=n(48),c=n(33);function l(e){return[e[0],e[1]].sort((function(e,t){return e.getTime()-t.getTime()}))}function d(e,t,n){var r,i,a;void 0===t&&(t=0),void 0===n&&(n="down"),e.length>1||"up"===n?(i=(r=c.__read(l([e[0],e[1]||new Date]),2))[0],a=r[1]):(a=e[0],i=new Date);var o=a.getTime()-i.getTime(),s=(o-t)/1e3;return{delta:o,days:Math.floor(s/86400),hours:Math.floor(s/3600%24),minutes:Math.floor(s%3600/60),seconds:Math.floor(s%3600%60)}}function f(e){var t=e.range,n=e.cadence,r=void 0===n?1e3:n,a=e.timerType,o=void 0===a?"down":a,s=e.onEnd,u=i.useRef(0),l=i.useRef(),f=c.__read(i.useState(d(t,u.current,o)),2),h=f[0],p=f[1],m=c.__read(t,2),g=m[0],v=m[1],y=i.useRef();return i.useLayoutEffect((function(){y.current=s}),[s]),i.useLayoutEffect((function(){return l.current=setInterval((function(){v&&(u.current+=r);var e=d([g,v],u.current,o);e.delta>=1e3?p(e):(clearInterval(l.current),p({delta:0,days:0,hours:0,minutes:0,seconds:0}))}),r),function(){clearInterval(l.current)}}),[r,g,v,o]),i.useEffect((function(){h.delta<=0&&(clearInterval(l.current),y.current&&y.current())}),[h.delta]),h}t.DateTimer=function(e){var t=e.testid,n=e.range,r=e.timerInterval,d=void 0===r?1:r,h=e.timerType,p=void 0===h?"down":h,m=e.alwaysShowSeconds,g=void 0!==m&&m,v=e.titleMap,y=e.onEnd,b=e.customClassName,w=function(e,t){var n=e.titleMap,r=e.alwaysShowSeconds,i=[];return i=t.days>=1?["days","hours","minutes"]:t.hours>=1?["hours","minutes"]:["minutes","seconds"],r&&t.hours>=1&&i.push("seconds"),i.map((function(e){return{id:e,count:t[e].toString().padStart(2,"0"),title:(n?n[e]:void 0)||e}}))}({titleMap:v,alwaysShowSeconds:g},f({range:n,cadence:1e3*d,timerType:p,onEnd:y}));return i.useEffect((function(){var e=c.__read(l([n[0],n[1]||new Date]),1)[0];"up"===p&&e.getTime()>(new Date).getTime()&&console.error("`timerType` is `up` but `range` is not in the past",n),"down"===p&&e.getTime()<(new Date).getTime()&&console.error("`timerType` is `down` but `range` is not in the future",n)}),[n,p]),a.createElement(s,{customClassName:o("date-timer",b),testid:t,items:w},(function(e,t){return a.createElement(u,{customClassName:"date-timer-box"},a.createElement("p",{"data-testid":t+"."+e.id+".count",className:"date-timer-box__count"},e.count),a.createElement("p",{"data-testid":t+"."+e.id+".title",className:"date-timer-box__title"},e.title))}))},t.useDateTimer=f},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i=r(n(13)),a=r(n(25));e.exports=function(e){var t=e.ariaLabelledBy,n=e.ariaLabel,r=e.title,o=e.ariaValueText,s=e.ariaDescribedBy,u=e.testid,c=e.percentage,l=e.style,d=e.children,f=e.customClassName,h=a("progress-bar",f),p=c>=100?100:c,m=l||{},g=m.trackColor,v=void 0===g?"blue":g,y=m.backgroundColor,b=void 0===y?"gray":y,w=m.completedColor,_=void 0===w?"green":w;return i.createElement("div",{className:h,style:{backgroundColor:b},role:"progressbar","aria-valuenow":p,"aria-valuemin":0,"aria-valuemax":100,"aria-labelledby":t,"aria-label":n,title:r,"aria-valuetext":o,"aria-describedby":s,"data-testid":u},i.createElement("div",{className:"progress-bar__track",style:{width:p+"%",backgroundColor:100===p?_:v},"data-testid":u+".track"}),d&&i.createElement("div",{className:"progress-bar__content"},d))}},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i=n(13),a=r(i),o=r(n(25)),s=n(68),u=n(48),c=n(33),l=n(49),d=n(69),f=n(99),h=r(n(72)),p=i.createContext({toastId:""});function m(e){var t=e.customRootId,n=c.__read(_(),1)[0],r=c.__read(i.useState(null),2),o=r[0],u=r[1];return i.useLayoutEffect((function(){var e=t&&document.querySelector("#"+t);if(e)u(e);else{var n=document.createElement("div");n.setAttribute("id","toast-root"),document.body.append(n),u(n)}}),[t]),o&&h.createPortal(n.toastStack.length?a.createElement(s,{testid:"ToastStack",items:n.toastStack,customClassName:"toast-stack"},(function(e,t){return a.createElement(A,{testid:t,data:e})})):a.createElement(i.Fragment,null),o)}p.displayName="ToastItemContext";var g={toastStack:[],autoCloseToasts:!0,defaultAutoCloseTimeout:4e3};function v(e){return function(t){return!e(t)}}function y(e){return function(t){return e===t.id}}function b(e,t){var n=e;switch(t.type){case"DISPLAY":var r=t.toastData,i=c.__spread(e.toastStack.filter(v(y(r.id))),[r]);n=c.__assign(c.__assign({},e),{toastStack:f.limitArrayLengthFromTheEnd(e.limit,i)});break;case"HIDE":n=c.__assign(c.__assign({},e),{toastStack:e.toastStack.filter(v(y(t.toastId)))});break;case"HIDE_ALL":n=c.__assign(c.__assign({},e),{toastStack:[]});break;case"UPDATE":var a=e.toastStack.findIndex(y(t.toastId));if(!(a>-1))throw new Error("Trying to update a Toast that is already removed");n=c.__assign(c.__assign({},e),{toastStack:f.updateAtIndex(e.toastStack,a,c.__assign(c.__assign({},e.toastStack[a]),t.toastData))});break;case"SET_LIMIT":var o=t.limit;n=c.__assign(c.__assign({},e),{limit:o,toastStack:f.limitArrayLengthFromTheEnd(o,e.toastStack)});break;case"SET_AUTO_CLOSE":n=c.__assign(c.__assign({},e),{autoCloseToasts:t.autoCloseToasts});break;case"SET_DEFAULT_AUTO_CLOSE_TIMEOUT_FOR_ALL_TOASTS":var s=t.timeout;l.isNonNegativeNumber(s)&&(n=c.__assign(c.__assign({},e),{defaultAutoCloseTimeout:s}))}return n}var w=i.createContext([g,function(){}]);function _(){var e=i.useContext(w);if(!e)throw new Error("Trying to consume ToastContext outside of its provider.");return e}function x(){var e=_()[1];return{display:i.useCallback((function(t){var n,r,i,a,o,s=t.id||(i=void 0===(r=(n={}).radix)?36:r,o=void 0===(a=n.substringStartIndex)?7:a,Math.random().toString(i).substring(o));return e({type:"DISPLAY",toastData:c.__assign(c.__assign({},t),{id:s})}),s}),[e]),hide:i.useCallback((function(t){e({type:"HIDE",toastId:t})}),[e]),update:i.useCallback((function(t,n){e({type:"UPDATE",toastId:t,toastData:n})}),[e]),hideAll:i.useCallback((function(){e({type:"HIDE_ALL"})}),[e])}}function A(e){var t=e.testid,n=e.data,r=c.__read(_(),1)[0],s=x().hide,l=n.timeout,d=void 0===l?r.defaultAutoCloseTimeout:l,f=n.render,h=n.customClassName,m=n.id,g="boolean"==typeof n.autoClose?n.autoClose:r.autoCloseToasts;return i.useLayoutEffect((function(){var e;return g&&(e=setTimeout((function(){s(m)}),d)),function(){e&&clearTimeout(e)}}),[g,d,s,m]),a.createElement(p.Provider,{value:{toastId:m}},a.createElement(u,{testid:t,customClassName:o("toast",h)},f()))}w.displayName="ToastContext",A.CloseButton=function(e){var t=e.children,n=e.testid,r=x().hide,o=function(){var e=i.useContext(p);if(!e)throw new Error("Trying to consume ToastItemContext outside of its provider");return e}().toastId;return a.createElement(d,{testid:n,onClick:function(){r(o)},customClassName:"toast-close-button"},t)},t.Toast=A,t.ToastContext=w,t.ToastContextProvider=function(e){var t=e.children,n=e.customRootId,r=e.autoCloseToasts,o=void 0===r||r,s=e.limit,u=e.defaultAutoCloseTimeout,d=void 0===u?4e3:u,f=c.__read(i.useReducer(b,c.__assign(c.__assign({},g),{autoCloseToasts:o,limit:s,defaultAutoCloseTimeout:d})),2),h=f[0],p=f[1];return i.useEffect((function(){l.isNonNegativeNumber(s)&&p({type:"SET_LIMIT",limit:s})}),[s]),i.useEffect((function(){p({type:"SET_AUTO_CLOSE",autoCloseToasts:o})}),[o]),i.useEffect((function(){p({type:"SET_DEFAULT_AUTO_CLOSE_TIMEOUT_FOR_ALL_TOASTS",timeout:d})}),[d]),a.createElement(w.Provider,{value:[h,p]},t,a.createElement(m,{customRootId:n}))},t.useToastContext=_,t.useToaster=x},,function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),o=r[0],s=r[1],u=new a(function(e,t,n){return 3*(t+n)/4-n}(0,o,s)),l=0,d=s>0?o-4:o;for(n=0;n>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[l++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=16383,s=0,u=n-i;su?u:s+o));1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return a.join("")};for(var r=[],i=[],a="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var i,a,o=[],s=t;s>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,u=(1<>1,l=-7,d=n?i-1:0,f=n?-1:1,h=e[t+d];for(d+=f,a=h&(1<<-l)-1,h>>=-l,l+=s;l>0;a=256*a+e[t+d],d+=f,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=r;l>0;o=256*o+e[t+d],d+=f,l-=8);if(0===a)a=1-c;else{if(a===u)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,r),a-=c}return(h?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,u,c=8*a-i-1,l=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:a-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+d>=1?f/u:f*Math.pow(2,1-d))*u>=2&&(o++,u/=2),o+d>=l?(s=0,o=l):o+d>=1?(s=(t*u-1)*Math.pow(2,i),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[n+h]=255&s,h+=p,s/=256,i-=8);for(o=o<0;e[n+h]=255&o,h+=p,o/=256,c-=8);e[n+h-p]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(100),i=n(124);function a(t,n,o){return i()?(e.exports=a=Reflect.construct.bind(),e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=a=function(e,t,n){var i=[null];i.push.apply(i,t);var a=new(Function.bind.apply(e,i));return n&&r(a,n.prototype),a},e.exports.__esModule=!0,e.exports.default=e.exports),a.apply(null,arguments)}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},,function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return i})),n.d(t,"__assign",(function(){return a})),n.d(t,"__rest",(function(){return o})),n.d(t,"__decorate",(function(){return s})),n.d(t,"__param",(function(){return u})),n.d(t,"__metadata",(function(){return c})),n.d(t,"__awaiter",(function(){return l})),n.d(t,"__generator",(function(){return d})),n.d(t,"__createBinding",(function(){return f})),n.d(t,"__exportStar",(function(){return h})),n.d(t,"__values",(function(){return p})),n.d(t,"__read",(function(){return m})),n.d(t,"__spread",(function(){return g})),n.d(t,"__spreadArrays",(function(){return v})),n.d(t,"__await",(function(){return y})),n.d(t,"__asyncGenerator",(function(){return b})),n.d(t,"__asyncDelegator",(function(){return w})),n.d(t,"__asyncValues",(function(){return _})),n.d(t,"__makeTemplateObject",(function(){return x})),n.d(t,"__importStar",(function(){return A})),n.d(t,"__importDefault",(function(){return k})),n.d(t,"__classPrivateFieldGet",(function(){return S})),n.d(t,"__classPrivateFieldSet",(function(){return E}));var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o}function u(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{u(r.next(e))}catch(t){a(t)}}function s(e){try{u(r.throw(e))}catch(t){a(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}u((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function g(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{(n=i[e](t)).value instanceof y?Promise.resolve(n.value.v).then(u,c):l(a[0][2],n)}catch(r){l(a[0][3],r)}var n}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:y(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function x(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function A(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function k(e){return e&&e.__esModule?e:{default:e}}function S(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function E(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},function(e,t,n){"use strict";(function(e){function n(){return(null===e||void 0===e?void 0:e.crypto)||(null===e||void 0===e?void 0:e.msCrypto)||{}}function r(){var e=n();return e.subtle||e.webkitSubtle}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowserCryptoAvailable=t.getSubtleCrypto=t.getBrowerCrypto=void 0,t.getBrowerCrypto=n,t.getSubtleCrypto=r,t.isBrowserCryptoAvailable=function(){return!!n()&&!!r()}}).call(this,n(41))},function(e,t,n){"use strict";(function(e){function n(){return"undefined"===typeof document&&"undefined"!==typeof navigator&&"ReactNative"===navigator.product}function r(){return"undefined"!==typeof e&&"undefined"!==typeof e.versions&&"undefined"!==typeof e.versions.node}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowser=t.isNode=t.isReactNative=void 0,t.isReactNative=n,t.isNode=r,t.isBrowser=function(){return!n()&&!r()}}).call(this,n(42))},function(e,t,n){var r=n(215),i=n(216),a=n(101),o=n(217);e.exports=function(e,t){return r(e)||i(e,t)||a(e,t)||o()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(u){s=!0,i=u}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(101);e.exports=function(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=r(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,a=function(){};return{s:a,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw o}}}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(132);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%".concat(e.charCodeAt(0).toString(16).toUpperCase())}))}},function(e,t,n){"use strict";var r="%[a-f0-9]{2}",i=new RegExp(r,"gi"),a=new RegExp("("+r+")+","gi");function o(e,t){try{return decodeURIComponent(e.join(""))}catch(i){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],o(n),o(r))}function s(e){try{return decodeURIComponent(e)}catch(r){for(var t=e.match(i),n=1;n="0"&&s<="9";)i+=s,f();if("."===s)for(i+=".";f()&&s>="0"&&s<="9";)i+=s;if("e"===s||"E"===s)for(i+=s,f(),"-"!==s&&"+"!==s||(i+=s,f());s>="0"&&s<="9";)i+=s,f();if(e=+i,isFinite(e))return null==r&&(r=n(142)),i.length>15?t.storeAsString?i:t.useNativeBigInt?BigInt(i):new r(i):t.alwaysParseAsBig?t.useNativeBigInt?BigInt(e):new r(e):e;d("Bad number")},p=function(){var e,t,n,r="";if('"'===s)for(var i=o;f();){if('"'===s)return o-1>i&&(r+=u.substring(i,o-1)),f(),r;if("\\"===s){if(o-1>i&&(r+=u.substring(i,o-1)),f(),"u"===s){for(n=0,t=0;t<4&&(e=parseInt(f(),16),isFinite(e));t+=1)n=16*n+e;r+=String.fromCharCode(n)}else{if("string"!==typeof l[s])break;r+=l[s]}i=o}}d("Bad string")},m=function(){for(;s&&s<=" ";)f()},g=function(){var e=[];if("["===s){if(f("["),m(),"]"===s)return f("]"),e;for(;s;){if(e.push(c()),m(),"]"===s)return f("]"),e;f(","),m()}}d("Bad array")},v=function(){var e,n=Object.create(null);if("{"===s){if(f("{"),m(),"}"===s)return f("}"),n;for(;s;){if(e=p(),m(),f(":"),!0===t.strict&&Object.hasOwnProperty.call(n,e)&&d('Duplicate key "'+e+'"'),!0===i.test(e)?"error"===t.protoAction?d("Object contains forbidden prototype property"):"ignore"===t.protoAction?c():n[e]=c():!0===a.test(e)?"error"===t.constructorAction?d("Object contains forbidden constructor property"):"ignore"===t.constructorAction?c():n[e]=c():n[e]=c(),m(),"}"===s)return f("}"),n;f(","),m()}}d("Bad object")};return c=function(){switch(m(),s){case"{":return v();case"[":return g();case'"':return p();case"-":return h();default:return s>="0"&&s<="9"?h():function(){switch(s){case"t":return f("t"),f("r"),f("u"),f("e"),!0;case"f":return f("f"),f("a"),f("l"),f("s"),f("e"),!1;case"n":return f("n"),f("u"),f("l"),f("l"),null}d("Unexpected '"+s+"'")}()}},function(e,t){var n;return u=e+"",o=0,s=" ",n=c(),m(),s&&d("Syntax error"),"function"===typeof t?function e(n,r){var i,a=n[r];return a&&"object"===typeof a&&Object.keys(a).forEach((function(t){void 0!==(i=e(a,t))?a[t]=i:delete a[t]})),t.call(n,r,a)}({"":n},""):n}}},function(e,t,n){(function(t){var r=n(52).default,i=n(51).default,a=n(9),o=n(20),s=n(46),u=n(70),c=n(32),l=n(17),d=n(71),f=n(22),h=function(){"use strict";function e(n,i,o,s,u,f){if(r(this,e),!Number.isSafeInteger(i)||i<0)throw Error("amount must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(o)||o<0)throw Error("firstValid must be a positive number and smaller than 2^53-1");if(!Number.isSafeInteger(s)||s<0)throw Error("lastValid must be a positive number and smaller than 2^53-1");if("undefined"===typeof u&&(u=a.ALGORAND_ZERO_ADDRESS_STRING),"undefined"===typeof f){var h=l.randomBytes(32);f=t.from(h).toString("base64")}var p=t.from("ASAFAgEHBgUmAyD+vKC7FEpaTqe0OKRoGsgObKEFvLYH/FZTJclWlfaiEyDmmpYeby1feshmB5JlUr6YI17TM2PKiJGLuck4qRW2+SB/g7Flf/H8U7ktwYFIodZd/C1LH6PWdyhK3dIAEm2QaTIEIhIzABAjEhAzAAcxABIQMwAIMQESEDEWIxIQMRAjEhAxBygSEDEJKRIQMQgkEhAxAiUSEDEEIQQSEDEGKhIQ","base64"),m=[i,o,s,n,u,f],g=[d.valTypes.INT,d.valTypes.INT,d.valTypes.INT,d.valTypes.ADDRESS,d.valTypes.ADDRESS,d.valTypes.BASE64],v=d.inject(p,[5,6,7,11,44,76],m,g);this.programBytes=v;var y=new c.LogicSig(v,void 0);this.address=y.address()}return i(e,[{key:"getProgram",value:function(){return this.programBytes}},{key:"getAddress",value:function(){return this.address}}]),e}();e.exports={DynamicFee:h,getDynamicFeeTransactions:function(e,t,n,r){if(!t.verify(a.decodeAddress(e.from).publicKey))throw new Error("invalid signature");e.fee=r,e.feey)throw new Error("final fee of payment transaction".concat(b.fee.toString(),"greater than transaction max fee").concat(y.toString()));return u.signLogicSigTransaction(n,v)}}}).call(this,n(19).Buffer)},function(module,exports,__webpack_require__){(function(process,global){var __WEBPACK_AMD_DEFINE_RESULT__;(function(){"use strict";var ERROR="input is invalid type",WINDOW="object"===typeof window,root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"===typeof self,NODE_JS=!root.JS_SHA256_NO_NODE_JS&&"object"===typeof process&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&"object"===typeof module&&module.exports,AMD=__webpack_require__(82),ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&"undefined"!==typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];!root.JS_SHA256_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!ARRAY_BUFFER||!root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e,t){return function(n){return new Sha256(t,!0).update(n)[e]()}},createMethod=function(e){var t=createOutputMethod("hex",e);NODE_JS&&(t=nodeWrap(t,e)),t.create=function(){return new Sha256(e)},t.update=function(e){return t.create().update(e)};for(var n=0;n>6,o[u++]=128|63&a):a<55296||a>=57344?(o[u++]=224|a>>12,o[u++]=128|a>>6&63,o[u++]=128|63&a):(a=65536+((1023&a)<<10|1023&e.charCodeAt(++r)),o[u++]=240|a>>18,o[u++]=128|a>>12&63,o[u++]=128|a>>6&63,o[u++]=128|63&a);e=o}else{if("object"!==i)throw new Error(ERROR);if(null===e)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(e)))throw new Error(ERROR)}e.length>64&&(e=new Sha256(t,!0).update(e).array());var c=[],l=[];for(r=0;r<64;++r){var d=e[r]||0;c[r]=92^d,l[r]=54^d}Sha256.call(this,t,n),this.update(l),this.oKeyPad=c,this.inner=!0,this.sharedMemory=n}Sha256.prototype.update=function(e){if(!this.finalized){var t,n=typeof e;if("string"!==n){if("object"!==n)throw new Error(ERROR);if(null===e)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(e)))throw new Error(ERROR);t=!0}for(var r,i,a=0,o=e.length,s=this.blocks;a>2]|=e[a]<>2]|=r<>2]|=(192|r>>6)<