@stellar/stellar-base 11.1.0 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/CHANGELOG.md +11 -2
  2. package/dist/stellar-base.js +152 -142
  3. package/dist/stellar-base.min.js +1 -1
  4. package/lib/account.js +4 -4
  5. package/lib/address.js +4 -4
  6. package/lib/asset.js +4 -4
  7. package/lib/auth.js +3 -3
  8. package/lib/claimant.js +4 -4
  9. package/lib/contract.js +4 -4
  10. package/lib/events.js +2 -2
  11. package/lib/fee_bump_transaction.js +9 -9
  12. package/lib/get_liquidity_pool_id.js +1 -1
  13. package/lib/index.js +9 -1
  14. package/lib/jsxdr.js +12 -0
  15. package/lib/keypair.js +4 -4
  16. package/lib/liquidity_pool_asset.js +5 -5
  17. package/lib/liquidity_pool_id.js +4 -4
  18. package/lib/memo.js +4 -4
  19. package/lib/muxed_account.js +4 -4
  20. package/lib/numbers/int128.js +8 -8
  21. package/lib/numbers/int256.js +8 -8
  22. package/lib/numbers/sc_int.js +8 -8
  23. package/lib/numbers/uint128.js +8 -8
  24. package/lib/numbers/uint256.js +8 -8
  25. package/lib/numbers/xdr_large_int.js +5 -5
  26. package/lib/operation.js +4 -4
  27. package/lib/operations/account_merge.js +1 -1
  28. package/lib/operations/allow_trust.js +1 -1
  29. package/lib/operations/begin_sponsoring_future_reserves.js +1 -1
  30. package/lib/operations/bump_sequence.js +1 -1
  31. package/lib/operations/change_trust.js +1 -1
  32. package/lib/operations/claim_claimable_balance.js +1 -1
  33. package/lib/operations/clawback.js +1 -1
  34. package/lib/operations/clawback_claimable_balance.js +1 -1
  35. package/lib/operations/create_account.js +1 -1
  36. package/lib/operations/create_claimable_balance.js +1 -1
  37. package/lib/operations/create_passive_sell_offer.js +1 -1
  38. package/lib/operations/end_sponsoring_future_reserves.js +1 -1
  39. package/lib/operations/extend_footprint_ttl.js +1 -1
  40. package/lib/operations/inflation.js +1 -1
  41. package/lib/operations/invoke_host_function.js +5 -5
  42. package/lib/operations/liquidity_pool_deposit.js +1 -1
  43. package/lib/operations/liquidity_pool_withdraw.js +1 -1
  44. package/lib/operations/manage_buy_offer.js +1 -1
  45. package/lib/operations/manage_data.js +1 -1
  46. package/lib/operations/manage_sell_offer.js +1 -1
  47. package/lib/operations/path_payment_strict_receive.js +1 -1
  48. package/lib/operations/path_payment_strict_send.js +1 -1
  49. package/lib/operations/payment.js +1 -1
  50. package/lib/operations/restore_footprint.js +1 -1
  51. package/lib/operations/revoke_sponsorship.js +1 -1
  52. package/lib/operations/set_options.js +1 -1
  53. package/lib/operations/set_trustline_flags.js +1 -1
  54. package/lib/scval.js +5 -5
  55. package/lib/signerkey.js +4 -4
  56. package/lib/soroban.js +8 -8
  57. package/lib/sorobandata_builder.js +5 -5
  58. package/lib/strkey.js +5 -5
  59. package/lib/transaction.js +9 -9
  60. package/lib/transaction_base.js +4 -4
  61. package/lib/transaction_builder.js +10 -10
  62. package/lib/util/bignumber.js +1 -1
  63. package/lib/util/continued_fraction.js +5 -5
  64. package/lib/util/decode_encode_muxed_account.js +1 -1
  65. package/lib/xdr.js +1 -1
  66. package/package.json +12 -12
  67. package/types/index.d.ts +38 -0
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see stellar-base.min.js.LICENSE.txt */
2
- var StellarBase;(()=>{var e={3740:function(e,t,r){var n,o=r(6763);n=()=>(()=>{var e={616:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(287);n.hp.alloc(1).subarray(0,1)instanceof n.hp||(n.hp.prototype.subarray=function(e,t){const r=Uint8Array.prototype.subarray.call(this,e,t);return Object.setPrototypeOf(r,n.hp.prototype),r});const o=n.hp},281:(e,t,r)=>{const n=r(164);e.exports=n},164:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Array:()=>M,Bool:()=>B,Double:()=>I,Enum:()=>q,Float:()=>x,Hyper:()=>A,Int:()=>w,LargeInt:()=>E,Opaque:()=>N,Option:()=>D,Quadruple:()=>_,Reference:()=>K,String:()=>C,Struct:()=>H,Union:()=>X,UnsignedHyper:()=>P,UnsignedInt:()=>O,VarArray:()=>F,VarOpaque:()=>j,Void:()=>V,XdrReader:()=>u,XdrWriter:()=>f,config:()=>te});class n extends TypeError{constructor(e){super(`XDR Write Error: ${e}`)}}class o extends TypeError{constructor(e){super(`XDR Read Error: ${e}`)}}class i extends TypeError{constructor(e){super(`XDR Type Definition Error: ${e}`)}}class a extends i{constructor(){super("method not implemented, it should be overloaded in the descendant class.")}}var s=r(616).A;class u{constructor(e){if(!s.isBuffer(e)){if(!(e instanceof Array||Array.isArray(e)||ArrayBuffer.isView(e)))throw new o(`source invalid: ${e}`);e=s.from(e)}this._buffer=e,this._length=e.length,this._index=0}_buffer;_length;_index;get eof(){return this._index===this._length}advance(e){const t=this._index;if(this._index+=e,this._length<this._index)throw new o("attempt to read outside the boundary of the buffer");const r=4-(e%4||4);if(r>0){for(let e=0;e<r;e++)if(0!==this._buffer[this._index+e])throw new o("invalid padding");this._index+=r}return t}rewind(){this._index=0}read(e){const t=this.advance(e);return this._buffer.subarray(t,t+e)}readInt32BE(){return this._buffer.readInt32BE(this.advance(4))}readUInt32BE(){return this._buffer.readUInt32BE(this.advance(4))}readBigInt64BE(){return this._buffer.readBigInt64BE(this.advance(8))}readBigUInt64BE(){return this._buffer.readBigUInt64BE(this.advance(8))}readFloatBE(){return this._buffer.readFloatBE(this.advance(4))}readDoubleBE(){return this._buffer.readDoubleBE(this.advance(8))}ensureInputConsumed(){if(this._index!==this._length)throw new o("invalid XDR contract typecast - source buffer not entirely consumed")}}var c=r(616).A;const l=8192;class f{constructor(e){"number"==typeof e?e=c.allocUnsafe(e):e instanceof c||(e=c.allocUnsafe(l)),this._buffer=e,this._length=e.length}_buffer;_length;_index=0;alloc(e){const t=this._index;return this._index+=e,this._length<this._index&&this.resize(this._index),t}resize(e){const t=Math.ceil(e/l)*l,r=c.allocUnsafe(t);this._buffer.copy(r,0,0,this._length),this._buffer=r,this._length=t}finalize(){return this._buffer.subarray(0,this._index)}toArray(){return[...this.finalize()]}write(e,t){if("string"==typeof e){const r=this.alloc(t);this._buffer.write(e,r,"utf8")}else{e instanceof c||(e=c.from(e));const r=this.alloc(t);e.copy(this._buffer,r,0,t)}const r=4-(t%4||4);if(r>0){const e=this.alloc(r);this._buffer.fill(0,e,this._index)}}writeInt32BE(e){const t=this.alloc(4);this._buffer.writeInt32BE(e,t)}writeUInt32BE(e){const t=this.alloc(4);this._buffer.writeUInt32BE(e,t)}writeBigInt64BE(e){const t=this.alloc(8);this._buffer.writeBigInt64BE(e,t)}writeBigUInt64BE(e){const t=this.alloc(8);this._buffer.writeBigUInt64BE(e,t)}writeFloatBE(e){const t=this.alloc(4);this._buffer.writeFloatBE(e,t)}writeDoubleBE(e){const t=this.alloc(8);this._buffer.writeDoubleBE(e,t)}static bufferChunkSize=l}var p=r(616).A;class h{toXDR(e="raw"){if(!this.write)return this.constructor.toXDR(this,e);const t=new f;return this.write(this,t),g(t.finalize(),e)}fromXDR(e,t="raw"){if(!this.read)return this.constructor.fromXDR(e,t);const r=new u(v(e,t)),n=this.read(r);return r.ensureInputConsumed(),n}validateXDR(e,t="raw"){try{return this.fromXDR(e,t),!0}catch(e){return!1}}static toXDR(e,t="raw"){const r=new f;return this.write(e,r),g(r.finalize(),t)}static fromXDR(e,t="raw"){const r=new u(v(e,t)),n=this.read(r);return r.ensureInputConsumed(),n}static validateXDR(e,t="raw"){try{return this.fromXDR(e,t),!0}catch(e){return!1}}}class y extends h{static read(e){throw new a}static write(e,t){throw new a}static isValid(e){return!1}}class d extends h{isValid(e){return!1}}class m extends TypeError{constructor(e){super(`Invalid format ${e}, must be one of "raw", "hex", "base64"`)}}function g(e,t){switch(t){case"raw":return e;case"hex":return e.toString("hex");case"base64":return e.toString("base64");default:throw new m(t)}}function v(e,t){switch(t){case"raw":return e;case"hex":return p.from(e,"hex");case"base64":return p.from(e,"base64");default:throw new m(t)}}const b=2147483647;class w extends y{static read(e){return e.readInt32BE()}static write(e,t){if("number"!=typeof e)throw new n("not a number");if((0|e)!==e)throw new n("invalid i32 value");t.writeInt32BE(e)}static isValid(e){return"number"==typeof e&&(0|e)===e&&e>=-2147483648&&e<=b}}function S(e,t,r){if("bigint"!=typeof e)throw new TypeError("Expected bigint 'value', got "+typeof e);const n=t/r;if(1===n)return[e];if(r<32||r>128||2!==n&&4!==n&&8!==n)throw new TypeError(`invalid bigint (${e}) and slice size (${t} -> ${r}) combination`);const o=BigInt(r),i=new Array(n);for(let t=0;t<n;t++)i[t]=BigInt.asIntN(r,e),e>>=o;return i}function k(e,t){if(t)return[0n,(1n<<BigInt(e))-1n];const r=1n<<BigInt(e-1);return[0n-r,r-1n]}w.MAX_VALUE=b,w.MIN_VALUE=2147483648;class E extends y{constructor(e){super(),this._value=function(e,t,r){e instanceof Array?e.length&&e[0]instanceof Array&&(e=e[0]):e=[e];const n=t/e.length;switch(n){case 32:case 64:case 128:case 256:break;default:throw new RangeError(`expected slices to fit in 32/64/128/256 bits, got ${e}`)}try{for(let t=0;t<e.length;t++)"bigint"!=typeof e[t]&&(e[t]=BigInt(e[t].valueOf()))}catch(t){throw new TypeError(`expected bigint-like values, got: ${e} (${t})`)}if(r&&1===e.length&&e[0]<0n)throw new RangeError(`expected a positive value, got: ${e}`);let o=BigInt.asUintN(n,e[0]);for(let t=1;t<e.length;t++)o|=BigInt.asUintN(n,e[t])<<BigInt(t*n);r||(o=BigInt.asIntN(t,o));const[i,a]=k(t,r);if(o>=i&&o<=a)return o;throw new TypeError(`bigint values [${e}] for ${function(e,t){return`${t?"u":"i"}${e}`}(t,r)} out of range [${i}, ${a}]: ${o}`)}(e,this.size,this.unsigned)}get unsigned(){throw new a}get size(){throw new a}slice(e){return S(this._value,this.size,e)}toString(){return this._value.toString()}toJSON(){return{_value:this._value.toString()}}toBigInt(){return BigInt(this._value)}static read(e){const{size:t}=this.prototype;return 64===t?new this(e.readBigUInt64BE()):new this(...Array.from({length:t/64},(()=>e.readBigUInt64BE())).reverse())}static write(e,t){if(e instanceof this)e=e._value;else if("bigint"!=typeof e||e>this.MAX_VALUE||e<this.MIN_VALUE)throw new n(`${e} is not a ${this.name}`);const{unsigned:r,size:o}=this.prototype;if(64===o)r?t.writeBigUInt64BE(e):t.writeBigInt64BE(e);else for(const n of S(e,o,64).reverse())r?t.writeBigUInt64BE(n):t.writeBigInt64BE(n)}static isValid(e){return"bigint"==typeof e||e instanceof this}static fromString(e){return new this(e)}static MAX_VALUE=0n;static MIN_VALUE=0n;static defineIntBoundaries(){const[e,t]=k(this.prototype.size,this.prototype.unsigned);this.MIN_VALUE=e,this.MAX_VALUE=t}}class A extends E{constructor(...e){super(e)}get low(){return 0|Number(0xffffffffn&this._value)}get high(){return 0|Number(this._value>>32n)}get size(){return 64}get unsigned(){return!1}static fromBits(e,t){return new this(e,t)}}A.defineIntBoundaries();const T=4294967295;class O extends y{static read(e){return e.readUInt32BE()}static write(e,t){if("number"!=typeof e||!(e>=0&&e<=T)||e%1!=0)throw new n("invalid u32 value");t.writeUInt32BE(e)}static isValid(e){return"number"==typeof e&&e%1==0&&e>=0&&e<=T}}O.MAX_VALUE=T,O.MIN_VALUE=0;class P extends E{constructor(...e){super(e)}get low(){return 0|Number(0xffffffffn&this._value)}get high(){return 0|Number(this._value>>32n)}get size(){return 64}get unsigned(){return!0}static fromBits(e,t){return new this(e,t)}}P.defineIntBoundaries();class x extends y{static read(e){return e.readFloatBE()}static write(e,t){if("number"!=typeof e)throw new n("not a number");t.writeFloatBE(e)}static isValid(e){return"number"==typeof e}}class I extends y{static read(e){return e.readDoubleBE()}static write(e,t){if("number"!=typeof e)throw new n("not a number");t.writeDoubleBE(e)}static isValid(e){return"number"==typeof e}}class _ extends y{static read(){throw new i("quadruple not supported")}static write(){throw new i("quadruple not supported")}static isValid(){return!1}}class B extends y{static read(e){const t=w.read(e);switch(t){case 0:return!1;case 1:return!0;default:throw new o(`got ${t} when trying to read a bool`)}}static write(e,t){const r=e?1:0;w.write(r,t)}static isValid(e){return"boolean"==typeof e}}var R=r(616).A;class C extends d{constructor(e=O.MAX_VALUE){super(),this._maxLength=e}read(e){const t=O.read(e);if(t>this._maxLength)throw new o(`saw ${t} length String, max allowed is ${this._maxLength}`);return e.read(t)}readString(e){return this.read(e).toString("utf8")}write(e,t){const r="string"==typeof e?R.byteLength(e,"utf8"):e.length;if(r>this._maxLength)throw new n(`got ${e.length} bytes, max allowed is ${this._maxLength}`);O.write(r,t),t.write(e,r)}isValid(e){return"string"==typeof e?R.byteLength(e,"utf8")<=this._maxLength:!!(e instanceof Array||R.isBuffer(e))&&e.length<=this._maxLength}}var U=r(616).A;class N extends d{constructor(e){super(),this._length=e}read(e){return e.read(this._length)}write(e,t){const{length:r}=e;if(r!==this._length)throw new n(`got ${e.length} bytes, expected ${this._length}`);t.write(e,r)}isValid(e){return U.isBuffer(e)&&e.length===this._length}}var L=r(616).A;class j extends d{constructor(e=O.MAX_VALUE){super(),this._maxLength=e}read(e){const t=O.read(e);if(t>this._maxLength)throw new o(`saw ${t} length VarOpaque, max allowed is ${this._maxLength}`);return e.read(t)}write(e,t){const{length:r}=e;if(e.length>this._maxLength)throw new n(`got ${e.length} bytes, max allowed is ${this._maxLength}`);O.write(r,t),t.write(e,r)}isValid(e){return L.isBuffer(e)&&e.length<=this._maxLength}}class M extends d{constructor(e,t){super(),this._childType=e,this._length=t}read(e){const t=new r.g.Array(this._length);for(let r=0;r<this._length;r++)t[r]=this._childType.read(e);return t}write(e,t){if(!(e instanceof r.g.Array))throw new n("value is not array");if(e.length!==this._length)throw new n(`got array of size ${e.length}, expected ${this._length}`);for(const r of e)this._childType.write(r,t)}isValid(e){if(!(e instanceof r.g.Array)||e.length!==this._length)return!1;for(const t of e)if(!this._childType.isValid(t))return!1;return!0}}class F extends d{constructor(e,t=O.MAX_VALUE){super(),this._childType=e,this._maxLength=t}read(e){const t=O.read(e);if(t>this._maxLength)throw new o(`saw ${t} length VarArray, max allowed is ${this._maxLength}`);const r=new Array(t);for(let n=0;n<t;n++)r[n]=this._childType.read(e);return r}write(e,t){if(!(e instanceof Array))throw new n("value is not array");if(e.length>this._maxLength)throw new n(`got array of size ${e.length}, max allowed is ${this._maxLength}`);O.write(e.length,t);for(const r of e)this._childType.write(r,t)}isValid(e){if(!(e instanceof Array)||e.length>this._maxLength)return!1;for(const t of e)if(!this._childType.isValid(t))return!1;return!0}}class D extends y{constructor(e){super(),this._childType=e}read(e){if(B.read(e))return this._childType.read(e)}write(e,t){const r=null!=e;B.write(r,t),r&&this._childType.write(e,t)}isValid(e){return null==e||this._childType.isValid(e)}}class V extends y{static read(){}static write(e){if(void 0!==e)throw new n("trying to write value to a void slot")}static isValid(e){return void 0===e}}class q extends y{constructor(e,t){super(),this.name=e,this.value=t}static read(e){const t=w.read(e),r=this._byValue[t];if(void 0===r)throw new o(`unknown ${this.enumName} member for value ${t}`);return r}static write(e,t){if(!(e instanceof this))throw new n(`unknown ${e} is not a ${this.enumName}`);w.write(e.value,t)}static isValid(e){return e instanceof this}static members(){return this._members}static values(){return Object.values(this._members)}static fromName(e){const t=this._members[e];if(!t)throw new TypeError(`${e} is not a member of ${this.enumName}`);return t}static fromValue(e){const t=this._byValue[e];if(void 0===t)throw new TypeError(`${e} is not a value of any member of ${this.enumName}`);return t}static create(e,t,r){const n=class extends q{};n.enumName=t,e.results[t]=n,n._members={},n._byValue={};for(const[e,t]of Object.entries(r)){const r=new n(e,t);n._members[e]=r,n._byValue[t]=r,n[e]=()=>r}return n}}class K extends y{resolve(){throw new i('"resolve" method should be implemented in the descendant class')}}class H extends y{constructor(e){super(),this._attributes=e||{}}static read(e){const t={};for(const[r,n]of this._fields)t[r]=n.read(e);return new this(t)}static write(e,t){if(!(e instanceof this))throw new n(`${e} is not a ${this.structName}`);for(const[r,n]of this._fields){const o=e._attributes[r];n.write(o,t)}}static isValid(e){return e instanceof this}static create(e,t,r){const n=class extends H{};n.structName=t,e.results[t]=n;const o=new Array(r.length);for(let t=0;t<r.length;t++){const i=r[t],a=i[0];let s=i[1];s instanceof K&&(s=s.resolve(e)),o[t]=[a,s],n.prototype[a]=z(a)}return n._fields=o,n}}function z(e){return function(t){return void 0!==t&&(this._attributes[e]=t),this._attributes[e]}}class X extends d{constructor(e,t){super(),this.set(e,t)}set(e,t){"string"==typeof e&&(e=this.constructor._switchOn.fromName(e)),this._switch=e;const r=this.constructor.armForSwitch(this._switch);this._arm=r,this._armType=r===V?V:this.constructor._arms[r],this._value=t}get(e=this._arm){if(this._arm!==V&&this._arm!==e)throw new TypeError(`${e} not set`);return this._value}switch(){return this._switch}arm(){return this._arm}armType(){return this._armType}value(){return this._value}static armForSwitch(e){const t=this._switches.get(e);if(void 0!==t)return t;if(this._defaultArm)return this._defaultArm;throw new TypeError(`Bad union switch: ${e}`)}static armTypeForArm(e){return e===V?V:this._arms[e]}static read(e){const t=this._switchOn.read(e),r=this.armForSwitch(t),n=r===V?V:this._arms[r];let o;return o=void 0!==n?n.read(e):r.read(e),new this(t,o)}static write(e,t){if(!(e instanceof this))throw new n(`${e} is not a ${this.unionName}`);this._switchOn.write(e.switch(),t),e.armType().write(e.value(),t)}static isValid(e){return e instanceof this}static create(e,t,r){const n=class extends X{};n.unionName=t,e.results[t]=n,r.switchOn instanceof K?n._switchOn=r.switchOn.resolve(e):n._switchOn=r.switchOn,n._switches=new Map,n._arms={};let o=r.defaultArm;o instanceof K&&(o=o.resolve(e)),n._defaultArm=o;for(const[e,t]of r.switches){const r="string"==typeof e?n._switchOn.fromName(e):e;n._switches.set(r,t)}if(void 0!==n._switchOn.values)for(const e of n._switchOn.values())n[e.name]=function(t){return new n(e,t)},n.prototype[e.name]=function(t){return this.set(e,t)};if(r.arms)for(const[t,o]of Object.entries(r.arms))n._arms[t]=o instanceof K?o.resolve(e):o,o!==V&&(n.prototype[t]=function(){return this.get(t)});return n}}class $ extends K{constructor(e){super(),this.name=e}resolve(e){return e.definitions[this.name].resolve(e)}}class W extends K{constructor(e,t,r=!1){super(),this.childReference=e,this.length=t,this.variable=r}resolve(e){let t=this.childReference,r=this.length;return t instanceof K&&(t=t.resolve(e)),r instanceof K&&(r=r.resolve(e)),this.variable?new F(t,r):new M(t,r)}}class G extends K{constructor(e){super(),this.childReference=e,this.name=e.name}resolve(e){let t=this.childReference;return t instanceof K&&(t=t.resolve(e)),new D(t)}}class Y extends K{constructor(e,t){super(),this.sizedType=e,this.length=t}resolve(e){let t=this.length;return t instanceof K&&(t=t.resolve(e)),new this.sizedType(t)}}class J{constructor(e,t,r){this.constructor=e,this.name=t,this.config=r}resolve(e){return this.name in e.results?e.results[this.name]:this.constructor(e,this.name,this.config)}}function Z(e,t,r){return r instanceof K&&(r=r.resolve(e)),e.results[t]=r,r}function Q(e,t,r){return e.results[t]=r,r}class ee{constructor(e){this._destination=e,this._definitions={}}enum(e,t){const r=new J(q.create,e,t);this.define(e,r)}struct(e,t){const r=new J(H.create,e,t);this.define(e,r)}union(e,t){const r=new J(X.create,e,t);this.define(e,r)}typedef(e,t){const r=new J(Z,e,t);this.define(e,r)}const(e,t){const r=new J(Q,e,t);this.define(e,r)}void(){return V}bool(){return B}int(){return w}hyper(){return A}uint(){return O}uhyper(){return P}float(){return x}double(){return I}quadruple(){return _}string(e){return new Y(C,e)}opaque(e){return new Y(N,e)}varOpaque(e){return new Y(j,e)}array(e,t){return new W(e,t)}varArray(e,t){return new W(e,t,!0)}option(e){return new G(e)}define(e,t){if(void 0!==this._destination[e])throw new i(`${e} is already defined`);this._definitions[e]=t}lookup(e){return new $(e)}resolve(){for(const e of Object.values(this._definitions))e.resolve({definitions:this._definitions,results:this._destination})}}function te(e,t={}){if(e){const r=new ee(t);e(r),r.resolve()}return t}},526:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=s(e),a=i[0],u=i[1],c=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,u)),l=0,f=u>0?a-4:a;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=16383,s=0,c=n-o;s<c;s+=a)i.push(u(e,s,s+a>c?c:s+a));return 1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=i[a],n[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var o,i,a=[],s=t;s<n;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},287:(e,t,r)=>{"use strict";const n=r(526),i=r(251),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=c,t.IS=50;const s=2147483647;function u(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return p(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=u(r);const o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){const t=new Uint8Array(e);return y(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return y(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return y(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const o=function(e){if(c.isBuffer(e)){const t=0|d(e.length),r=u(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?u(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function p(e){return f(e),u(e<0?0:0|d(e))}function h(e){const t=e.length<0?0:0|d(e.length),r=u(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function y(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,c.prototype),n}function d(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function m(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(e).length;default:if(o)return n?-1:$(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return B(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return _(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:w(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function w(e,t,r,n,o){let i,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let n=-1;for(i=r;i<s;i++)if(c(e,i)===c(t,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===u)return n*a}else-1!==n&&(i-=i-n),n=-1}else for(r+u>s&&(r=s-u),i=r;i>=0;i--){let r=!0;for(let n=0;n<u;n++)if(c(e,i+n)!==c(t,n)){r=!1;break}if(r)return i}return-1}function S(e,t,r,n){r=Number(r)||0;const o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=t.length;let a;for(n>i/2&&(n=i/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(J(n))return a;e[r+a]=n}return a}function k(e,t,r,n){return G($(t,e.length-r),e,r,n)}function E(e,t,r,n){return G(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function A(e,t,r,n){return G(W(t),e,r,n)}function T(e,t,r,n){return G(function(e,t){let r,n,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function P(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o<r;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=r){let r,n,s,u;switch(a){case 1:t<128&&(i=t);break;case 2:r=e[o+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(i=u));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(i=u));break;case 4:r=e[o+1],n=e[o+2],s=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(i=u))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=a}return function(e){const t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=x));return r}(n)}c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||void 0===o||"function"!=typeof o.error||o.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return f(e),e<=0?u(e):void 0!==t?"string"==typeof r?u(e).fill(t,r):u(e).fill(t):u(e)}(e,t,r)},c.allocUnsafe=function(e){return p(e)},c.allocUnsafeSlow=function(e){return p(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=c.allocUnsafe(t);let o=0;for(r=0;r<e.length;++r){let t=e[r];if(Y(t,Uint8Array))o+t.length>n.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)v(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?P(this,0,e):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const r=t.IS;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},a&&(c.prototype[a]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,o){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(i,a),u=this.slice(n,o),l=e.slice(t,r);for(let e=0;e<s;++e)if(u[e]!==l[e]){i=u[e],a=l[e];break}return i<a?-1:a<i?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return S(this,e,t,r);case"utf8":case"utf-8":return k(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const x=4096;function I(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function _(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function B(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=t;n<r;++n)o+=Z[e[n]];return o}function R(e,t,r){const n=e.slice(t,r);let o="";for(let e=0;e<n.length-1;e+=2)o+=String.fromCharCode(n[e]+256*n[e+1]);return o}function C(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function U(e,t,r,n,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function N(e,t,r,n,o){K(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function L(e,t,r,n,o){K(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function j(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function M(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),c.prototype.readBigUInt64BE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||U(this,e,t,r,Math.pow(2,8*r)-1,0);let o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||U(this,e,t,r,Math.pow(2,8*r)-1,0);let o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=Q((function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=Q((function(e,t=0){return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);U(this,e,t,r,n-1,-n)}let o=0,i=1,a=0;for(this[t]=255&e;++o<r&&(i*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/i|0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);U(this,e,t,r,n-1,-n)}let o=r-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i|0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=Q((function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=Q((function(e,t=0){return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return M(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return M(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const o=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},c.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{const i=c.isBuffer(e)?e:c.from(e,n),a=i.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=i[o%a]}return this};const D={};function V(e,t,r){D[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function q(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function K(e,t,r,n,o,i){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let o;throw o=i>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new D.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||z(t,e.length-(r+1))}(n,o,i)}function H(e,t){if("number"!=typeof e)throw new D.ERR_INVALID_ARG_TYPE(t,"number",e)}function z(e,t,r){if(Math.floor(e)!==e)throw H(e,r),new D.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}V("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),V("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),V("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=q(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=q(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n}),RangeError);const X=/[^+/0-9A-Za-z-_]/g;function $(e,t){let r;t=t||1/0;const n=e.length;let o=null;const i=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function W(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(X,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function G(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const Z=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function Q(e){return"undefined"==typeof BigInt?ee:e}function ee(){throw new Error("BigInt not supported")}},251:(e,t)=>{t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?o-1:0,p=r?-1:1,h=e[t+f];for(f+=p,i=h&(1<<-l)-1,h>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=p,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+e[t+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),i-=c}return(h?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,f=l>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,y=n?1:-1,d=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[r+h]=255&s,h+=y,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[r+h]=255&a,h+=y,a/=256,c-=8);e[r+h-y]|=128*d}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}return r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r(281)})(),e.exports=n()},4148:(e,t,r)=>{"use strict";var n=r(5606),o=r(6763);function i(e){return i="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},i(e)}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,a=void 0,a=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===i(a)?a:String(a)),n)}var o,a}function s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var u,c,l=r(9597).codes,f=l.ERR_AMBIGUOUS_ARGUMENT,p=l.ERR_INVALID_ARG_TYPE,h=l.ERR_INVALID_ARG_VALUE,y=l.ERR_INVALID_RETURN_VALUE,d=l.ERR_MISSING_ARGS,m=r(3918),g=r(537).inspect,v=r(537).types,b=v.isPromise,w=v.isRegExp,S=r(1514)(),k=r(9394)(),E=r(8075)("RegExp.prototype.test");new Map;function A(){var e=r(2299);u=e.isDeepEqual,c=e.isDeepStrictEqual}var T=!1,O=e.exports=_,P={};function x(e){if(e.message instanceof Error)throw e.message;throw new m(e)}function I(e,t,r,n){if(!r){var o=!1;if(0===t)o=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var i=new m({actual:r,expected:!0,message:n,operator:"==",stackStartFn:e});throw i.generatedMessage=o,i}}function _(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];I.apply(void 0,[_,t.length].concat(t))}O.fail=function e(t,r,i,a,s){var u,c=arguments.length;if(0===c)u="Failed";else if(1===c)i=t,t=void 0;else{if(!1===T)T=!0,(n.emitWarning?n.emitWarning:o.warn.bind(o))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094");2===c&&(a="!=")}if(i instanceof Error)throw i;var l={actual:t,expected:r,operator:void 0===a?"fail":a,stackStartFn:s||e};void 0!==i&&(l.message=i);var f=new m(l);throw u&&(f.message=u,f.generatedMessage=!0),f},O.AssertionError=m,O.ok=_,O.equal=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");t!=r&&x({actual:t,expected:r,message:n,operator:"==",stackStartFn:e})},O.notEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");t==r&&x({actual:t,expected:r,message:n,operator:"!=",stackStartFn:e})},O.deepEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");void 0===u&&A(),u(t,r)||x({actual:t,expected:r,message:n,operator:"deepEqual",stackStartFn:e})},O.notDeepEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");void 0===u&&A(),u(t,r)&&x({actual:t,expected:r,message:n,operator:"notDeepEqual",stackStartFn:e})},O.deepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");void 0===u&&A(),c(t,r)||x({actual:t,expected:r,message:n,operator:"deepStrictEqual",stackStartFn:e})},O.notDeepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");void 0===u&&A();c(t,r)&&x({actual:t,expected:r,message:n,operator:"notDeepStrictEqual",stackStartFn:e})},O.strictEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");k(t,r)||x({actual:t,expected:r,message:n,operator:"strictEqual",stackStartFn:e})},O.notStrictEqual=function e(t,r,n){if(arguments.length<2)throw new d("actual","expected");k(t,r)&&x({actual:t,expected:r,message:n,operator:"notStrictEqual",stackStartFn:e})};var B=s((function e(t,r,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r.forEach((function(e){e in t&&(void 0!==n&&"string"==typeof n[e]&&w(t[e])&&E(t[e],n[e])?o[e]=n[e]:o[e]=t[e])}))}));function R(e,t,r,n){if("function"!=typeof t){if(w(t))return E(t,e);if(2===arguments.length)throw new p("expected",["Function","RegExp"],t);if("object"!==i(e)||null===e){var o=new m({actual:e,expected:t,message:r,operator:"deepStrictEqual",stackStartFn:n});throw o.operator=n.name,o}var a=Object.keys(t);if(t instanceof Error)a.push("name","message");else if(0===a.length)throw new h("error",t,"may not be an empty object");return void 0===u&&A(),a.forEach((function(o){"string"==typeof e[o]&&w(t[o])&&E(t[o],e[o])||function(e,t,r,n,o,i){if(!(r in e)||!c(e[r],t[r])){if(!n){var a=new B(e,o),s=new B(t,o,e),u=new m({actual:a,expected:s,operator:"deepStrictEqual",stackStartFn:i});throw u.actual=e,u.expected=t,u.operator=i.name,u}x({actual:e,expected:t,message:n,operator:i.name,stackStartFn:i})}}(e,t,o,r,a,n)})),!0}return void 0!==t.prototype&&e instanceof t||!Error.isPrototypeOf(t)&&!0===t.call({},e)}function C(e){if("function"!=typeof e)throw new p("fn","Function",e);try{e()}catch(e){return e}return P}function U(e){return b(e)||null!==e&&"object"===i(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function N(e){return Promise.resolve().then((function(){var t;if("function"==typeof e){if(!U(t=e()))throw new y("instance of Promise","promiseFn",t)}else{if(!U(e))throw new p("promiseFn",["Function","Promise"],e);t=e}return Promise.resolve().then((function(){return t})).then((function(){return P})).catch((function(e){return e}))}))}function L(e,t,r,n){if("string"==typeof r){if(4===arguments.length)throw new p("error",["Object","Error","Function","RegExp"],r);if("object"===i(t)&&null!==t){if(t.message===r)throw new f("error/message",'The error message "'.concat(t.message,'" is identical to the message.'))}else if(t===r)throw new f("error/message",'The error "'.concat(t,'" is identical to the message.'));n=r,r=void 0}else if(null!=r&&"object"!==i(r)&&"function"!=typeof r)throw new p("error",["Object","Error","Function","RegExp"],r);if(t===P){var o="";r&&r.name&&(o+=" (".concat(r.name,")")),o+=n?": ".concat(n):".";var a="rejects"===e.name?"rejection":"exception";x({actual:void 0,expected:r,operator:e.name,message:"Missing expected ".concat(a).concat(o),stackStartFn:e})}if(r&&!R(t,r,n,e))throw t}function j(e,t,r,n){if(t!==P){if("string"==typeof r&&(n=r,r=void 0),!r||R(t,r)){var o=n?": ".concat(n):".",i="doesNotReject"===e.name?"rejection":"exception";x({actual:t,expected:r,operator:e.name,message:"Got unwanted ".concat(i).concat(o,"\n")+'Actual message: "'.concat(t&&t.message,'"'),stackStartFn:e})}throw t}}function M(e,t,r,n,o){if(!w(t))throw new p("regexp","RegExp",t);var a="match"===o;if("string"!=typeof e||E(t,e)!==a){if(r instanceof Error)throw r;var s=!r;r=r||("string"!=typeof e?'The "string" argument must be of type string. Received type '+"".concat(i(e)," (").concat(g(e),")"):(a?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(g(t),". Input:\n\n").concat(g(e),"\n"));var u=new m({actual:e,expected:t,message:r,operator:o,stackStartFn:n});throw u.generatedMessage=s,u}}function F(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];I.apply(void 0,[F,t.length].concat(t))}O.throws=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];L.apply(void 0,[e,C(t)].concat(n))},O.rejects=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return N(t).then((function(t){return L.apply(void 0,[e,t].concat(n))}))},O.doesNotThrow=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];j.apply(void 0,[e,C(t)].concat(n))},O.doesNotReject=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return N(t).then((function(t){return j.apply(void 0,[e,t].concat(n))}))},O.ifError=function e(t){if(null!=t){var r="ifError got unwanted exception: ";"object"===i(t)&&"string"==typeof t.message?0===t.message.length&&t.constructor?r+=t.constructor.name:r+=t.message:r+=g(t);var n=new m({actual:t,expected:null,operator:"ifError",message:r,stackStartFn:e}),o=t.stack;if("string"==typeof o){var a=o.split("\n");a.shift();for(var s=n.stack.split("\n"),u=0;u<a.length;u++){var c=s.indexOf(a[u]);if(-1!==c){s=s.slice(0,c);break}}n.stack="".concat(s.join("\n"),"\n").concat(a.join("\n"))}throw n}},O.match=function e(t,r,n){M(t,r,n,e,"match")},O.doesNotMatch=function e(t,r,n){M(t,r,n,e,"doesNotMatch")},O.strict=S(F,O,{equal:O.strictEqual,deepEqual:O.deepStrictEqual,notEqual:O.notStrictEqual,notDeepEqual:O.notDeepStrictEqual}),O.strict.strict=O.strict},3918:(e,t,r)=>{"use strict";var n=r(5606);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=u(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function u(e){var t=function(e,t){if("object"!==m(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===m(t)?t:String(t)}function c(e,t){if(t&&("object"===m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){var t="function"==typeof Map?new Map:void 0;return f=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return p(e,arguments,d(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),y(n,e)},f(e)}function p(e,t,r){return p=h()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&y(o,r.prototype),o},p.apply(null,arguments)}function h(){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}}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function m(e){return m="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},m(e)}var g=r(537).inspect,v=r(9597).codes.ERR_INVALID_ARG_TYPE;function b(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}var w="",S="",k="",E="",A={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function T(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){r[t]=e[t]})),Object.defineProperty(r,"message",{value:e.message}),r}function O(e){return g(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function P(e,t,r){var o="",i="",a=0,s="",u=!1,c=O(e),l=c.split("\n"),f=O(t).split("\n"),p=0,h="";if("strictEqual"===r&&"object"===m(e)&&"object"===m(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===l.length&&1===f.length&&l[0]!==f[0]){var y=l[0].length+f[0].length;if(y<=10){if(!("object"===m(e)&&null!==e||"object"===m(t)&&null!==t||0===e&&0===t))return"".concat(A[r],"\n\n")+"".concat(l[0]," !== ").concat(f[0],"\n")}else if("strictEqualObject"!==r){if(y<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;l[0][p]===f[0][p];)p++;p>2&&(h="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(" ",p),"^"),p=0)}}}for(var d=l[l.length-1],g=f[f.length-1];d===g&&(p++<2?s="\n ".concat(d).concat(s):o=d,l.pop(),f.pop(),0!==l.length&&0!==f.length);)d=l[l.length-1],g=f[f.length-1];var v=Math.max(l.length,f.length);if(0===v){var T=c.split("\n");if(T.length>30)for(T[26]="".concat(w,"...").concat(E);T.length>27;)T.pop();return"".concat(A.notIdentical,"\n\n").concat(T.join("\n"),"\n")}p>3&&(s="\n".concat(w,"...").concat(E).concat(s),u=!0),""!==o&&(s="\n ".concat(o).concat(s),o="");var P=0,x=A[r]+"\n".concat(S,"+ actual").concat(E," ").concat(k,"- expected").concat(E),I=" ".concat(w,"...").concat(E," Lines skipped");for(p=0;p<v;p++){var _=p-a;if(l.length<p+1)_>1&&p>2&&(_>4?(i+="\n".concat(w,"...").concat(E),u=!0):_>3&&(i+="\n ".concat(f[p-2]),P++),i+="\n ".concat(f[p-1]),P++),a=p,o+="\n".concat(k,"-").concat(E," ").concat(f[p]),P++;else if(f.length<p+1)_>1&&p>2&&(_>4?(i+="\n".concat(w,"...").concat(E),u=!0):_>3&&(i+="\n ".concat(l[p-2]),P++),i+="\n ".concat(l[p-1]),P++),a=p,i+="\n".concat(S,"+").concat(E," ").concat(l[p]),P++;else{var B=f[p],R=l[p],C=R!==B&&(!b(R,",")||R.slice(0,-1)!==B);C&&b(B,",")&&B.slice(0,-1)===R&&(C=!1,R+=","),C?(_>1&&p>2&&(_>4?(i+="\n".concat(w,"...").concat(E),u=!0):_>3&&(i+="\n ".concat(l[p-2]),P++),i+="\n ".concat(l[p-1]),P++),a=p,i+="\n".concat(S,"+").concat(E," ").concat(R),o+="\n".concat(k,"-").concat(E," ").concat(B),P+=2):(i+=o,o="",1!==_&&0!==p||(i+="\n ".concat(R),P++))}if(P>20&&p<v-2)return"".concat(x).concat(I,"\n").concat(i,"\n").concat(w,"...").concat(E).concat(o,"\n")+"".concat(w,"...").concat(E)}return"".concat(x).concat(u?I:"","\n").concat(i).concat(o).concat(s).concat(h)}var x=function(e,t){!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&&y(e,t)}(b,e);var r,o,a,u,f,p=(r=b,o=h(),function(){var e,t=d(r);if(o){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return c(this,e)});function b(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),"object"!==m(e)||null===e)throw new v("options","Object",e);var r=e.message,o=e.operator,i=e.stackStartFn,a=e.actual,s=e.expected,u=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=r)t=p.call(this,String(r));else if(n.stderr&&n.stderr.isTTY&&(n.stderr&&n.stderr.getColorDepth&&1!==n.stderr.getColorDepth()?(w="\x1b[34m",S="\x1b[32m",E="\x1b[39m",k="\x1b[31m"):(w="",S="",E="",k="")),"object"===m(a)&&null!==a&&"object"===m(s)&&null!==s&&"stack"in a&&a instanceof Error&&"stack"in s&&s instanceof Error&&(a=T(a),s=T(s)),"deepStrictEqual"===o||"strictEqual"===o)t=p.call(this,P(a,s,o));else if("notDeepStrictEqual"===o||"notStrictEqual"===o){var f=A[o],h=O(a).split("\n");if("notStrictEqual"===o&&"object"===m(a)&&null!==a&&(f=A.notStrictEqualObject),h.length>30)for(h[26]="".concat(w,"...").concat(E);h.length>27;)h.pop();t=1===h.length?p.call(this,"".concat(f," ").concat(h[0])):p.call(this,"".concat(f,"\n\n").concat(h.join("\n"),"\n"))}else{var y=O(a),d="",g=A[o];"notDeepEqual"===o||"notEqual"===o?(y="".concat(A[o],"\n\n").concat(y)).length>1024&&(y="".concat(y.slice(0,1021),"...")):(d="".concat(O(s)),y.length>512&&(y="".concat(y.slice(0,509),"...")),d.length>512&&(d="".concat(d.slice(0,509),"...")),"deepEqual"===o||"equal"===o?y="".concat(g,"\n\n").concat(y,"\n\nshould equal\n\n"):d=" ".concat(o," ").concat(d)),t=p.call(this,"".concat(y).concat(d))}return Error.stackTraceLimit=u,t.generatedMessage=!r,Object.defineProperty(l(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=a,t.expected=s,t.operator=o,Error.captureStackTrace&&Error.captureStackTrace(l(t),i),t.stack,t.name="AssertionError",c(t)}return a=b,(u=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return g(this,i(i({},t),{},{customInspect:!1,depth:0}))}}])&&s(a.prototype,u),f&&s(a,f),Object.defineProperty(a,"prototype",{writable:!1}),b}(f(Error),g.custom);e.exports=x},9597:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(i=o.key,a=void 0,a=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===n(a)?a:String(a)),o)}var i,a}function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}function a(e){var t=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}}();return function(){var r,o=s(e);if(t){var i=s(this).constructor;r=Reflect.construct(o,arguments,i)}else r=o.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}var u,c,l={};function f(e,t,r){r||(r=Error);var n=function(r){!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&&i(e,t)}(l,r);var n,s,u,c=a(l);function l(r,n,o){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),i=c.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,o)),i.code=e,i}return n=l,s&&o(n.prototype,s),u&&o(n,u),Object.defineProperty(n,"prototype",{writable:!1}),n}(r);l[e]=n}function p(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}f("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),f("ERR_INVALID_ARG_TYPE",(function(e,t,o){var i,a,s,c;if(void 0===u&&(u=r(4148)),u("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(a="not ",t.substr(!s||s<0?0:+s,a.length)===a)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))c="The ".concat(e," ").concat(i," ").concat(p(t,"type"));else{var l=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";c='The "'.concat(e,'" ').concat(l," ").concat(i," ").concat(p(t,"type"))}return c+=". Received type ".concat(n(o))}),TypeError),f("ERR_INVALID_ARG_VALUE",(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===c&&(c=r(537));var o=c.inspect(t);return o.length>128&&(o="".concat(o.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(n,". Received ").concat(o)}),TypeError,RangeError),f("ERR_INVALID_RETURN_VALUE",(function(e,t,r){var o;return o=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(o,".")}),TypeError),f("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];void 0===u&&(u=r(4148)),u(t.length>0,"At least one arg needs to be specified");var o="The ",i=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),i){case 1:o+="".concat(t[0]," argument");break;case 2:o+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:o+=t.slice(0,i-1).join(", "),o+=", and ".concat(t[i-1]," arguments")}return"".concat(o," must be specified")}),TypeError),e.exports.codes=l},2299:(e,t,r)=>{"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||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.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i(e){return i="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},i(e)}var a=void 0!==/a/g.flags,s=function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t},u=function(e){var t=[];return e.forEach((function(e,r){return t.push([r,e])})),t},c=Object.is?Object.is:r(7653),l=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},f=Number.isNaN?Number.isNaN:r(4133);function p(e){return e.call.bind(e)}var h=p(Object.prototype.hasOwnProperty),y=p(Object.prototype.propertyIsEnumerable),d=p(Object.prototype.toString),m=r(537).types,g=m.isAnyArrayBuffer,v=m.isArrayBufferView,b=m.isDate,w=m.isMap,S=m.isRegExp,k=m.isSet,E=m.isNativeError,A=m.isBoxedPrimitive,T=m.isNumberObject,O=m.isStringObject,P=m.isBooleanObject,x=m.isBigIntObject,I=m.isSymbolObject,_=m.isFloat32Array,B=m.isFloat64Array;function R(e){if(0===e.length||e.length>10)return!0;for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);if(r<48||r>57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function C(e){return Object.keys(e).filter(R).concat(l(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function U(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0}var N=0,L=1,j=2,M=3;function F(e,t,r,n){if(e===t)return 0!==e||(!r||c(e,t));if(r){if("object"!==i(e))return"number"==typeof e&&f(e)&&f(t);if("object"!==i(t)||null===e||null===t)return!1;if(Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(null===e||"object"!==i(e))return(null===t||"object"!==i(t))&&e==t;if(null===t||"object"!==i(t))return!1}var o,s,u,l,p=d(e);if(p!==d(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var h=C(e),y=C(t);return h.length===y.length&&V(e,t,r,n,L,h)}if("[object Object]"===p&&(!w(e)&&w(t)||!k(e)&&k(t)))return!1;if(b(e)){if(!b(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(S(e)){if(!S(t)||(u=e,l=t,!(a?u.source===l.source&&u.flags===l.flags:RegExp.prototype.toString.call(u)===RegExp.prototype.toString.call(l))))return!1}else if(E(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else{if(v(e)){if(r||!_(e)&&!B(e)){if(!function(e,t){return e.byteLength===t.byteLength&&0===U(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}(e,t))return!1}else if(!function(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}(e,t))return!1;var m=C(e),R=C(t);return m.length===R.length&&V(e,t,r,n,N,m)}if(k(e))return!(!k(t)||e.size!==t.size)&&V(e,t,r,n,j);if(w(e))return!(!w(t)||e.size!==t.size)&&V(e,t,r,n,M);if(g(e)){if(s=t,(o=e).byteLength!==s.byteLength||0!==U(new Uint8Array(o),new Uint8Array(s)))return!1}else if(A(e)&&!function(e,t){return T(e)?T(t)&&c(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t)):O(e)?O(t)&&String.prototype.valueOf.call(e)===String.prototype.valueOf.call(t):P(e)?P(t)&&Boolean.prototype.valueOf.call(e)===Boolean.prototype.valueOf.call(t):x(e)?x(t)&&BigInt.prototype.valueOf.call(e)===BigInt.prototype.valueOf.call(t):I(t)&&Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t)}(e,t))return!1}return V(e,t,r,n,N)}function D(e,t){return t.filter((function(t){return y(e,t)}))}function V(e,t,r,o,a,c){if(5===arguments.length){c=Object.keys(e);var f=Object.keys(t);if(c.length!==f.length)return!1}for(var p=0;p<c.length;p++)if(!h(t,c[p]))return!1;if(r&&5===arguments.length){var d=l(e);if(0!==d.length){var m=0;for(p=0;p<d.length;p++){var g=d[p];if(y(e,g)){if(!y(t,g))return!1;c.push(g),m++}else if(y(t,g))return!1}var v=l(t);if(d.length!==v.length&&D(t,v).length!==m)return!1}else{var b=l(t);if(0!==b.length&&0!==D(t,b).length)return!1}}if(0===c.length&&(a===N||a===L&&0===e.length||0===e.size))return!0;if(void 0===o)o={val1:new Map,val2:new Map,position:0};else{var w=o.val1.get(e);if(void 0!==w){var S=o.val2.get(t);if(void 0!==S)return w===S}o.position++}o.val1.set(e,o.position),o.val2.set(t,o.position);var k=function(e,t,r,o,a,c){var l=0;if(c===j){if(!function(e,t,r,n){for(var o=null,a=s(e),u=0;u<a.length;u++){var c=a[u];if("object"===i(c)&&null!==c)null===o&&(o=new Set),o.add(c);else if(!t.has(c)){if(r)return!1;if(!H(e,t,c))return!1;null===o&&(o=new Set),o.add(c)}}if(null!==o){for(var l=s(t),f=0;f<l.length;f++){var p=l[f];if("object"===i(p)&&null!==p){if(!q(o,p,r,n))return!1}else if(!r&&!e.has(p)&&!q(o,p,r,n))return!1}return 0===o.size}return!0}(e,t,r,a))return!1}else if(c===M){if(!function(e,t,r,o){for(var a=null,s=u(e),c=0;c<s.length;c++){var l=n(s[c],2),f=l[0],p=l[1];if("object"===i(f)&&null!==f)null===a&&(a=new Set),a.add(f);else{var h=t.get(f);if(void 0===h&&!t.has(f)||!F(p,h,r,o)){if(r)return!1;if(!z(e,t,f,p,o))return!1;null===a&&(a=new Set),a.add(f)}}}if(null!==a){for(var y=u(t),d=0;d<y.length;d++){var m=n(y[d],2),g=m[0],v=m[1];if("object"===i(g)&&null!==g){if(!X(a,e,g,v,r,o))return!1}else if(!(r||e.has(g)&&F(e.get(g),v,!1,o)||X(a,e,g,v,!1,o)))return!1}return 0===a.size}return!0}(e,t,r,a))return!1}else if(c===L)for(;l<e.length;l++){if(!h(e,l)){if(h(t,l))return!1;for(var f=Object.keys(e);l<f.length;l++){var p=f[l];if(!h(t,p)||!F(e[p],t[p],r,a))return!1}return f.length===Object.keys(t).length}if(!h(t,l)||!F(e[l],t[l],r,a))return!1}for(l=0;l<o.length;l++){var y=o[l];if(!F(e[y],t[y],r,a))return!1}return!0}(e,t,r,c,o,a);return o.val1.delete(e),o.val2.delete(t),k}function q(e,t,r,n){for(var o=s(e),i=0;i<o.length;i++){var a=o[i];if(F(t,a,r,n))return e.delete(a),!0}return!1}function K(e){switch(i(e)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":e=+e;case"number":if(f(e))return!1}return!0}function H(e,t,r){var n=K(r);return null!=n?n:t.has(n)&&!e.has(n)}function z(e,t,r,n,o){var i=K(r);if(null!=i)return i;var a=t.get(i);return!(void 0===a&&!t.has(i)||!F(n,a,!1,o))&&(!e.has(i)&&F(n,a,!1,o))}function X(e,t,r,n,o,i){for(var a=s(e),u=0;u<a.length;u++){var c=a[u];if(F(r,c,o,i)&&F(n,t.get(c),o,i))return e.delete(c),!0}return!1}e.exports={isDeepEqual:function(e,t){return F(e,t,false)},isDeepStrictEqual:function(e,t){return F(e,t,true)}}},3626:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(8287);n.Buffer.alloc(1).subarray(0,1)instanceof n.Buffer||(n.Buffer.prototype.subarray=function(e,t){var r=Uint8Array.prototype.subarray.call(this,e,t);return Object.setPrototypeOf(r,n.Buffer.prototype),r});const o=n.Buffer},7687:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Account:()=>Mt,Address:()=>$e,Asset:()=>M,AuthClawbackEnabledFlag:()=>ot,AuthImmutableFlag:()=>nt,AuthRequiredFlag:()=>tt,AuthRevocableFlag:()=>rt,BASE_FEE:()=>ir,Claimant:()=>xe,Contract:()=>br,FastSigning:()=>l,FeeBumpTransaction:()=>Ut,Hyper:()=>n.Hyper,Int128:()=>Kr,Int256:()=>Jr,Keypair:()=>C,LiquidityPoolAsset:()=>Ae,LiquidityPoolFeeV18:()=>V,LiquidityPoolId:()=>Re,Memo:()=>mt,MemoHash:()=>yt,MemoID:()=>pt,MemoNone:()=>ft,MemoReturn:()=>dt,MemoText:()=>ht,MuxedAccount:()=>qt,Networks:()=>cr,Operation:()=>it,ScInt:()=>fn,SignerKey:()=>Yt,Soroban:()=>dr,SorobanDataBuilder:()=>Xt,StrKey:()=>A,TimeoutInfinite:()=>ar,Transaction:()=>Tt,TransactionBase:()=>$,TransactionBuilder:()=>sr,Uint128:()=>Pr,Uint256:()=>Nr,UnsignedHyper:()=>n.UnsignedHyper,XdrLargeInt:()=>rn,authorizeEntry:()=>In,authorizeInvocation:()=>Bn,buildInvocationTree:()=>Rn,decodeAddressToMuxedAccount:()=>Ue,default:()=>Nn,encodeMuxedAccount:()=>Le,encodeMuxedAccountToAddress:()=>Ne,extractBaseAddress:()=>je,getLiquidityPoolId:()=>q,hash:()=>s,humanizeEvents:()=>En,nativeToScVal:()=>gn,scValToBigInt:()=>pn,scValToNative:()=>vn,sign:()=>f,verify:()=>p,walkInvocationTree:()=>Cn,xdr:()=>i});var n=r(3740),o=n.config((function(e){var t=1024;e.typedef("Value",e.varOpaque()),e.struct("ScpBallot",[["counter",e.lookup("Uint32")],["value",e.lookup("Value")]]),e.enum("ScpStatementType",{scpStPrepare:0,scpStConfirm:1,scpStExternalize:2,scpStNominate:3}),e.struct("ScpNomination",[["quorumSetHash",e.lookup("Hash")],["votes",e.varArray(e.lookup("Value"),2147483647)],["accepted",e.varArray(e.lookup("Value"),2147483647)]]),e.struct("ScpStatementPrepare",[["quorumSetHash",e.lookup("Hash")],["ballot",e.lookup("ScpBallot")],["prepared",e.option(e.lookup("ScpBallot"))],["preparedPrime",e.option(e.lookup("ScpBallot"))],["nC",e.lookup("Uint32")],["nH",e.lookup("Uint32")]]),e.struct("ScpStatementConfirm",[["ballot",e.lookup("ScpBallot")],["nPrepared",e.lookup("Uint32")],["nCommit",e.lookup("Uint32")],["nH",e.lookup("Uint32")],["quorumSetHash",e.lookup("Hash")]]),e.struct("ScpStatementExternalize",[["commit",e.lookup("ScpBallot")],["nH",e.lookup("Uint32")],["commitQuorumSetHash",e.lookup("Hash")]]),e.union("ScpStatementPledges",{switchOn:e.lookup("ScpStatementType"),switchName:"type",switches:[["scpStPrepare","prepare"],["scpStConfirm","confirm"],["scpStExternalize","externalize"],["scpStNominate","nominate"]],arms:{prepare:e.lookup("ScpStatementPrepare"),confirm:e.lookup("ScpStatementConfirm"),externalize:e.lookup("ScpStatementExternalize"),nominate:e.lookup("ScpNomination")}}),e.struct("ScpStatement",[["nodeId",e.lookup("NodeId")],["slotIndex",e.lookup("Uint64")],["pledges",e.lookup("ScpStatementPledges")]]),e.struct("ScpEnvelope",[["statement",e.lookup("ScpStatement")],["signature",e.lookup("Signature")]]),e.struct("ScpQuorumSet",[["threshold",e.lookup("Uint32")],["validators",e.varArray(e.lookup("NodeId"),2147483647)],["innerSets",e.varArray(e.lookup("ScpQuorumSet"),2147483647)]]),e.typedef("Thresholds",e.opaque(4)),e.typedef("String32",e.string(32)),e.typedef("String64",e.string(64)),e.typedef("SequenceNumber",e.lookup("Int64")),e.typedef("DataValue",e.varOpaque(64)),e.typedef("PoolId",e.lookup("Hash")),e.typedef("AssetCode4",e.opaque(4)),e.typedef("AssetCode12",e.opaque(12)),e.enum("AssetType",{assetTypeNative:0,assetTypeCreditAlphanum4:1,assetTypeCreditAlphanum12:2,assetTypePoolShare:3}),e.union("AssetCode",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeCreditAlphanum4","assetCode4"],["assetTypeCreditAlphanum12","assetCode12"]],arms:{assetCode4:e.lookup("AssetCode4"),assetCode12:e.lookup("AssetCode12")}}),e.struct("AlphaNum4",[["assetCode",e.lookup("AssetCode4")],["issuer",e.lookup("AccountId")]]),e.struct("AlphaNum12",[["assetCode",e.lookup("AssetCode12")],["issuer",e.lookup("AccountId")]]),e.union("Asset",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",e.void()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"]],arms:{alphaNum4:e.lookup("AlphaNum4"),alphaNum12:e.lookup("AlphaNum12")}}),e.struct("Price",[["n",e.lookup("Int32")],["d",e.lookup("Int32")]]),e.struct("Liabilities",[["buying",e.lookup("Int64")],["selling",e.lookup("Int64")]]),e.enum("ThresholdIndices",{thresholdMasterWeight:0,thresholdLow:1,thresholdMed:2,thresholdHigh:3}),e.enum("LedgerEntryType",{account:0,trustline:1,offer:2,data:3,claimableBalance:4,liquidityPool:5,contractData:6,contractCode:7,configSetting:8,ttl:9}),e.struct("Signer",[["key",e.lookup("SignerKey")],["weight",e.lookup("Uint32")]]),e.enum("AccountFlags",{authRequiredFlag:1,authRevocableFlag:2,authImmutableFlag:4,authClawbackEnabledFlag:8}),e.const("MASK_ACCOUNT_FLAGS",7),e.const("MASK_ACCOUNT_FLAGS_V17",15),e.const("MAX_SIGNERS",20),e.typedef("SponsorshipDescriptor",e.option(e.lookup("AccountId"))),e.struct("AccountEntryExtensionV3",[["ext",e.lookup("ExtensionPoint")],["seqLedger",e.lookup("Uint32")],["seqTime",e.lookup("TimePoint")]]),e.union("AccountEntryExtensionV2Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[3,"v3"]],arms:{v3:e.lookup("AccountEntryExtensionV3")}}),e.struct("AccountEntryExtensionV2",[["numSponsored",e.lookup("Uint32")],["numSponsoring",e.lookup("Uint32")],["signerSponsoringIDs",e.varArray(e.lookup("SponsorshipDescriptor"),e.lookup("MAX_SIGNERS"))],["ext",e.lookup("AccountEntryExtensionV2Ext")]]),e.union("AccountEntryExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[2,"v2"]],arms:{v2:e.lookup("AccountEntryExtensionV2")}}),e.struct("AccountEntryExtensionV1",[["liabilities",e.lookup("Liabilities")],["ext",e.lookup("AccountEntryExtensionV1Ext")]]),e.union("AccountEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("AccountEntryExtensionV1")}}),e.struct("AccountEntry",[["accountId",e.lookup("AccountId")],["balance",e.lookup("Int64")],["seqNum",e.lookup("SequenceNumber")],["numSubEntries",e.lookup("Uint32")],["inflationDest",e.option(e.lookup("AccountId"))],["flags",e.lookup("Uint32")],["homeDomain",e.lookup("String32")],["thresholds",e.lookup("Thresholds")],["signers",e.varArray(e.lookup("Signer"),e.lookup("MAX_SIGNERS"))],["ext",e.lookup("AccountEntryExt")]]),e.enum("TrustLineFlags",{authorizedFlag:1,authorizedToMaintainLiabilitiesFlag:2,trustlineClawbackEnabledFlag:4}),e.const("MASK_TRUSTLINE_FLAGS",1),e.const("MASK_TRUSTLINE_FLAGS_V13",3),e.const("MASK_TRUSTLINE_FLAGS_V17",7),e.enum("LiquidityPoolType",{liquidityPoolConstantProduct:0}),e.union("TrustLineAsset",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",e.void()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"],["assetTypePoolShare","liquidityPoolId"]],arms:{alphaNum4:e.lookup("AlphaNum4"),alphaNum12:e.lookup("AlphaNum12"),liquidityPoolId:e.lookup("PoolId")}}),e.union("TrustLineEntryExtensionV2Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TrustLineEntryExtensionV2",[["liquidityPoolUseCount",e.lookup("Int32")],["ext",e.lookup("TrustLineEntryExtensionV2Ext")]]),e.union("TrustLineEntryV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[2,"v2"]],arms:{v2:e.lookup("TrustLineEntryExtensionV2")}}),e.struct("TrustLineEntryV1",[["liabilities",e.lookup("Liabilities")],["ext",e.lookup("TrustLineEntryV1Ext")]]),e.union("TrustLineEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("TrustLineEntryV1")}}),e.struct("TrustLineEntry",[["accountId",e.lookup("AccountId")],["asset",e.lookup("TrustLineAsset")],["balance",e.lookup("Int64")],["limit",e.lookup("Int64")],["flags",e.lookup("Uint32")],["ext",e.lookup("TrustLineEntryExt")]]),e.enum("OfferEntryFlags",{passiveFlag:1}),e.const("MASK_OFFERENTRY_FLAGS",1),e.union("OfferEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("OfferEntry",[["sellerId",e.lookup("AccountId")],["offerId",e.lookup("Int64")],["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["amount",e.lookup("Int64")],["price",e.lookup("Price")],["flags",e.lookup("Uint32")],["ext",e.lookup("OfferEntryExt")]]),e.union("DataEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("DataEntry",[["accountId",e.lookup("AccountId")],["dataName",e.lookup("String64")],["dataValue",e.lookup("DataValue")],["ext",e.lookup("DataEntryExt")]]),e.enum("ClaimPredicateType",{claimPredicateUnconditional:0,claimPredicateAnd:1,claimPredicateOr:2,claimPredicateNot:3,claimPredicateBeforeAbsoluteTime:4,claimPredicateBeforeRelativeTime:5}),e.union("ClaimPredicate",{switchOn:e.lookup("ClaimPredicateType"),switchName:"type",switches:[["claimPredicateUnconditional",e.void()],["claimPredicateAnd","andPredicates"],["claimPredicateOr","orPredicates"],["claimPredicateNot","notPredicate"],["claimPredicateBeforeAbsoluteTime","absBefore"],["claimPredicateBeforeRelativeTime","relBefore"]],arms:{andPredicates:e.varArray(e.lookup("ClaimPredicate"),2),orPredicates:e.varArray(e.lookup("ClaimPredicate"),2),notPredicate:e.option(e.lookup("ClaimPredicate")),absBefore:e.lookup("Int64"),relBefore:e.lookup("Int64")}}),e.enum("ClaimantType",{claimantTypeV0:0}),e.struct("ClaimantV0",[["destination",e.lookup("AccountId")],["predicate",e.lookup("ClaimPredicate")]]),e.union("Claimant",{switchOn:e.lookup("ClaimantType"),switchName:"type",switches:[["claimantTypeV0","v0"]],arms:{v0:e.lookup("ClaimantV0")}}),e.enum("ClaimableBalanceIdType",{claimableBalanceIdTypeV0:0}),e.union("ClaimableBalanceId",{switchOn:e.lookup("ClaimableBalanceIdType"),switchName:"type",switches:[["claimableBalanceIdTypeV0","v0"]],arms:{v0:e.lookup("Hash")}}),e.enum("ClaimableBalanceFlags",{claimableBalanceClawbackEnabledFlag:1}),e.const("MASK_CLAIMABLE_BALANCE_FLAGS",1),e.union("ClaimableBalanceEntryExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("ClaimableBalanceEntryExtensionV1",[["ext",e.lookup("ClaimableBalanceEntryExtensionV1Ext")],["flags",e.lookup("Uint32")]]),e.union("ClaimableBalanceEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("ClaimableBalanceEntryExtensionV1")}}),e.struct("ClaimableBalanceEntry",[["balanceId",e.lookup("ClaimableBalanceId")],["claimants",e.varArray(e.lookup("Claimant"),10)],["asset",e.lookup("Asset")],["amount",e.lookup("Int64")],["ext",e.lookup("ClaimableBalanceEntryExt")]]),e.struct("LiquidityPoolConstantProductParameters",[["assetA",e.lookup("Asset")],["assetB",e.lookup("Asset")],["fee",e.lookup("Int32")]]),e.struct("LiquidityPoolEntryConstantProduct",[["params",e.lookup("LiquidityPoolConstantProductParameters")],["reserveA",e.lookup("Int64")],["reserveB",e.lookup("Int64")],["totalPoolShares",e.lookup("Int64")],["poolSharesTrustLineCount",e.lookup("Int64")]]),e.union("LiquidityPoolEntryBody",{switchOn:e.lookup("LiquidityPoolType"),switchName:"type",switches:[["liquidityPoolConstantProduct","constantProduct"]],arms:{constantProduct:e.lookup("LiquidityPoolEntryConstantProduct")}}),e.struct("LiquidityPoolEntry",[["liquidityPoolId",e.lookup("PoolId")],["body",e.lookup("LiquidityPoolEntryBody")]]),e.enum("ContractDataDurability",{temporary:0,persistent:1}),e.struct("ContractDataEntry",[["ext",e.lookup("ExtensionPoint")],["contract",e.lookup("ScAddress")],["key",e.lookup("ScVal")],["durability",e.lookup("ContractDataDurability")],["val",e.lookup("ScVal")]]),e.struct("ContractCodeCostInputs",[["ext",e.lookup("ExtensionPoint")],["nInstructions",e.lookup("Uint32")],["nFunctions",e.lookup("Uint32")],["nGlobals",e.lookup("Uint32")],["nTableEntries",e.lookup("Uint32")],["nTypes",e.lookup("Uint32")],["nDataSegments",e.lookup("Uint32")],["nElemSegments",e.lookup("Uint32")],["nImports",e.lookup("Uint32")],["nExports",e.lookup("Uint32")],["nDataSegmentBytes",e.lookup("Uint32")]]),e.struct("ContractCodeEntryV1",[["ext",e.lookup("ExtensionPoint")],["costInputs",e.lookup("ContractCodeCostInputs")]]),e.union("ContractCodeEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("ContractCodeEntryV1")}}),e.struct("ContractCodeEntry",[["ext",e.lookup("ContractCodeEntryExt")],["hash",e.lookup("Hash")],["code",e.varOpaque()]]),e.struct("TtlEntry",[["keyHash",e.lookup("Hash")],["liveUntilLedgerSeq",e.lookup("Uint32")]]),e.union("LedgerEntryExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("LedgerEntryExtensionV1",[["sponsoringId",e.lookup("SponsorshipDescriptor")],["ext",e.lookup("LedgerEntryExtensionV1Ext")]]),e.union("LedgerEntryData",{switchOn:e.lookup("LedgerEntryType"),switchName:"type",switches:[["account","account"],["trustline","trustLine"],["offer","offer"],["data","data"],["claimableBalance","claimableBalance"],["liquidityPool","liquidityPool"],["contractData","contractData"],["contractCode","contractCode"],["configSetting","configSetting"],["ttl","ttl"]],arms:{account:e.lookup("AccountEntry"),trustLine:e.lookup("TrustLineEntry"),offer:e.lookup("OfferEntry"),data:e.lookup("DataEntry"),claimableBalance:e.lookup("ClaimableBalanceEntry"),liquidityPool:e.lookup("LiquidityPoolEntry"),contractData:e.lookup("ContractDataEntry"),contractCode:e.lookup("ContractCodeEntry"),configSetting:e.lookup("ConfigSettingEntry"),ttl:e.lookup("TtlEntry")}}),e.union("LedgerEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("LedgerEntryExtensionV1")}}),e.struct("LedgerEntry",[["lastModifiedLedgerSeq",e.lookup("Uint32")],["data",e.lookup("LedgerEntryData")],["ext",e.lookup("LedgerEntryExt")]]),e.struct("LedgerKeyAccount",[["accountId",e.lookup("AccountId")]]),e.struct("LedgerKeyTrustLine",[["accountId",e.lookup("AccountId")],["asset",e.lookup("TrustLineAsset")]]),e.struct("LedgerKeyOffer",[["sellerId",e.lookup("AccountId")],["offerId",e.lookup("Int64")]]),e.struct("LedgerKeyData",[["accountId",e.lookup("AccountId")],["dataName",e.lookup("String64")]]),e.struct("LedgerKeyClaimableBalance",[["balanceId",e.lookup("ClaimableBalanceId")]]),e.struct("LedgerKeyLiquidityPool",[["liquidityPoolId",e.lookup("PoolId")]]),e.struct("LedgerKeyContractData",[["contract",e.lookup("ScAddress")],["key",e.lookup("ScVal")],["durability",e.lookup("ContractDataDurability")]]),e.struct("LedgerKeyContractCode",[["hash",e.lookup("Hash")]]),e.struct("LedgerKeyConfigSetting",[["configSettingId",e.lookup("ConfigSettingId")]]),e.struct("LedgerKeyTtl",[["keyHash",e.lookup("Hash")]]),e.union("LedgerKey",{switchOn:e.lookup("LedgerEntryType"),switchName:"type",switches:[["account","account"],["trustline","trustLine"],["offer","offer"],["data","data"],["claimableBalance","claimableBalance"],["liquidityPool","liquidityPool"],["contractData","contractData"],["contractCode","contractCode"],["configSetting","configSetting"],["ttl","ttl"]],arms:{account:e.lookup("LedgerKeyAccount"),trustLine:e.lookup("LedgerKeyTrustLine"),offer:e.lookup("LedgerKeyOffer"),data:e.lookup("LedgerKeyData"),claimableBalance:e.lookup("LedgerKeyClaimableBalance"),liquidityPool:e.lookup("LedgerKeyLiquidityPool"),contractData:e.lookup("LedgerKeyContractData"),contractCode:e.lookup("LedgerKeyContractCode"),configSetting:e.lookup("LedgerKeyConfigSetting"),ttl:e.lookup("LedgerKeyTtl")}}),e.enum("EnvelopeType",{envelopeTypeTxV0:0,envelopeTypeScp:1,envelopeTypeTx:2,envelopeTypeAuth:3,envelopeTypeScpvalue:4,envelopeTypeTxFeeBump:5,envelopeTypeOpId:6,envelopeTypePoolRevokeOpId:7,envelopeTypeContractId:8,envelopeTypeSorobanAuthorization:9}),e.typedef("UpgradeType",e.varOpaque(128)),e.enum("StellarValueType",{stellarValueBasic:0,stellarValueSigned:1}),e.struct("LedgerCloseValueSignature",[["nodeId",e.lookup("NodeId")],["signature",e.lookup("Signature")]]),e.union("StellarValueExt",{switchOn:e.lookup("StellarValueType"),switchName:"v",switches:[["stellarValueBasic",e.void()],["stellarValueSigned","lcValueSignature"]],arms:{lcValueSignature:e.lookup("LedgerCloseValueSignature")}}),e.struct("StellarValue",[["txSetHash",e.lookup("Hash")],["closeTime",e.lookup("TimePoint")],["upgrades",e.varArray(e.lookup("UpgradeType"),6)],["ext",e.lookup("StellarValueExt")]]),e.const("MASK_LEDGER_HEADER_FLAGS",7),e.enum("LedgerHeaderFlags",{disableLiquidityPoolTradingFlag:1,disableLiquidityPoolDepositFlag:2,disableLiquidityPoolWithdrawalFlag:4}),e.union("LedgerHeaderExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("LedgerHeaderExtensionV1",[["flags",e.lookup("Uint32")],["ext",e.lookup("LedgerHeaderExtensionV1Ext")]]),e.union("LedgerHeaderExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("LedgerHeaderExtensionV1")}}),e.struct("LedgerHeader",[["ledgerVersion",e.lookup("Uint32")],["previousLedgerHash",e.lookup("Hash")],["scpValue",e.lookup("StellarValue")],["txSetResultHash",e.lookup("Hash")],["bucketListHash",e.lookup("Hash")],["ledgerSeq",e.lookup("Uint32")],["totalCoins",e.lookup("Int64")],["feePool",e.lookup("Int64")],["inflationSeq",e.lookup("Uint32")],["idPool",e.lookup("Uint64")],["baseFee",e.lookup("Uint32")],["baseReserve",e.lookup("Uint32")],["maxTxSetSize",e.lookup("Uint32")],["skipList",e.array(e.lookup("Hash"),4)],["ext",e.lookup("LedgerHeaderExt")]]),e.enum("LedgerUpgradeType",{ledgerUpgradeVersion:1,ledgerUpgradeBaseFee:2,ledgerUpgradeMaxTxSetSize:3,ledgerUpgradeBaseReserve:4,ledgerUpgradeFlags:5,ledgerUpgradeConfig:6,ledgerUpgradeMaxSorobanTxSetSize:7}),e.struct("ConfigUpgradeSetKey",[["contractId",e.lookup("Hash")],["contentHash",e.lookup("Hash")]]),e.union("LedgerUpgrade",{switchOn:e.lookup("LedgerUpgradeType"),switchName:"type",switches:[["ledgerUpgradeVersion","newLedgerVersion"],["ledgerUpgradeBaseFee","newBaseFee"],["ledgerUpgradeMaxTxSetSize","newMaxTxSetSize"],["ledgerUpgradeBaseReserve","newBaseReserve"],["ledgerUpgradeFlags","newFlags"],["ledgerUpgradeConfig","newConfig"],["ledgerUpgradeMaxSorobanTxSetSize","newMaxSorobanTxSetSize"]],arms:{newLedgerVersion:e.lookup("Uint32"),newBaseFee:e.lookup("Uint32"),newMaxTxSetSize:e.lookup("Uint32"),newBaseReserve:e.lookup("Uint32"),newFlags:e.lookup("Uint32"),newConfig:e.lookup("ConfigUpgradeSetKey"),newMaxSorobanTxSetSize:e.lookup("Uint32")}}),e.struct("ConfigUpgradeSet",[["updatedEntry",e.varArray(e.lookup("ConfigSettingEntry"),2147483647)]]),e.enum("BucketEntryType",{metaentry:-1,liveentry:0,deadentry:1,initentry:2}),e.union("BucketMetadataExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("BucketMetadata",[["ledgerVersion",e.lookup("Uint32")],["ext",e.lookup("BucketMetadataExt")]]),e.union("BucketEntry",{switchOn:e.lookup("BucketEntryType"),switchName:"type",switches:[["liveentry","liveEntry"],["initentry","liveEntry"],["deadentry","deadEntry"],["metaentry","metaEntry"]],arms:{liveEntry:e.lookup("LedgerEntry"),deadEntry:e.lookup("LedgerKey"),metaEntry:e.lookup("BucketMetadata")}}),e.enum("TxSetComponentType",{txsetCompTxsMaybeDiscountedFee:0}),e.struct("TxSetComponentTxsMaybeDiscountedFee",[["baseFee",e.option(e.lookup("Int64"))],["txes",e.varArray(e.lookup("TransactionEnvelope"),2147483647)]]),e.union("TxSetComponent",{switchOn:e.lookup("TxSetComponentType"),switchName:"type",switches:[["txsetCompTxsMaybeDiscountedFee","txsMaybeDiscountedFee"]],arms:{txsMaybeDiscountedFee:e.lookup("TxSetComponentTxsMaybeDiscountedFee")}}),e.union("TransactionPhase",{switchOn:e.int(),switchName:"v",switches:[[0,"v0Components"]],arms:{v0Components:e.varArray(e.lookup("TxSetComponent"),2147483647)}}),e.struct("TransactionSet",[["previousLedgerHash",e.lookup("Hash")],["txes",e.varArray(e.lookup("TransactionEnvelope"),2147483647)]]),e.struct("TransactionSetV1",[["previousLedgerHash",e.lookup("Hash")],["phases",e.varArray(e.lookup("TransactionPhase"),2147483647)]]),e.union("GeneralizedTransactionSet",{switchOn:e.int(),switchName:"v",switches:[[1,"v1TxSet"]],arms:{v1TxSet:e.lookup("TransactionSetV1")}}),e.struct("TransactionResultPair",[["transactionHash",e.lookup("Hash")],["result",e.lookup("TransactionResult")]]),e.struct("TransactionResultSet",[["results",e.varArray(e.lookup("TransactionResultPair"),2147483647)]]),e.union("TransactionHistoryEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"generalizedTxSet"]],arms:{generalizedTxSet:e.lookup("GeneralizedTransactionSet")}}),e.struct("TransactionHistoryEntry",[["ledgerSeq",e.lookup("Uint32")],["txSet",e.lookup("TransactionSet")],["ext",e.lookup("TransactionHistoryEntryExt")]]),e.union("TransactionHistoryResultEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TransactionHistoryResultEntry",[["ledgerSeq",e.lookup("Uint32")],["txResultSet",e.lookup("TransactionResultSet")],["ext",e.lookup("TransactionHistoryResultEntryExt")]]),e.union("LedgerHeaderHistoryEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("LedgerHeaderHistoryEntry",[["hash",e.lookup("Hash")],["header",e.lookup("LedgerHeader")],["ext",e.lookup("LedgerHeaderHistoryEntryExt")]]),e.struct("LedgerScpMessages",[["ledgerSeq",e.lookup("Uint32")],["messages",e.varArray(e.lookup("ScpEnvelope"),2147483647)]]),e.struct("ScpHistoryEntryV0",[["quorumSets",e.varArray(e.lookup("ScpQuorumSet"),2147483647)],["ledgerMessages",e.lookup("LedgerScpMessages")]]),e.union("ScpHistoryEntry",{switchOn:e.int(),switchName:"v",switches:[[0,"v0"]],arms:{v0:e.lookup("ScpHistoryEntryV0")}}),e.enum("LedgerEntryChangeType",{ledgerEntryCreated:0,ledgerEntryUpdated:1,ledgerEntryRemoved:2,ledgerEntryState:3}),e.union("LedgerEntryChange",{switchOn:e.lookup("LedgerEntryChangeType"),switchName:"type",switches:[["ledgerEntryCreated","created"],["ledgerEntryUpdated","updated"],["ledgerEntryRemoved","removed"],["ledgerEntryState","state"]],arms:{created:e.lookup("LedgerEntry"),updated:e.lookup("LedgerEntry"),removed:e.lookup("LedgerKey"),state:e.lookup("LedgerEntry")}}),e.typedef("LedgerEntryChanges",e.varArray(e.lookup("LedgerEntryChange"),2147483647)),e.struct("OperationMeta",[["changes",e.lookup("LedgerEntryChanges")]]),e.struct("TransactionMetaV1",[["txChanges",e.lookup("LedgerEntryChanges")],["operations",e.varArray(e.lookup("OperationMeta"),2147483647)]]),e.struct("TransactionMetaV2",[["txChangesBefore",e.lookup("LedgerEntryChanges")],["operations",e.varArray(e.lookup("OperationMeta"),2147483647)],["txChangesAfter",e.lookup("LedgerEntryChanges")]]),e.enum("ContractEventType",{system:0,contract:1,diagnostic:2}),e.struct("ContractEventV0",[["topics",e.varArray(e.lookup("ScVal"),2147483647)],["data",e.lookup("ScVal")]]),e.union("ContractEventBody",{switchOn:e.int(),switchName:"v",switches:[[0,"v0"]],arms:{v0:e.lookup("ContractEventV0")}}),e.struct("ContractEvent",[["ext",e.lookup("ExtensionPoint")],["contractId",e.option(e.lookup("Hash"))],["type",e.lookup("ContractEventType")],["body",e.lookup("ContractEventBody")]]),e.struct("DiagnosticEvent",[["inSuccessfulContractCall",e.bool()],["event",e.lookup("ContractEvent")]]),e.struct("SorobanTransactionMetaExtV1",[["ext",e.lookup("ExtensionPoint")],["totalNonRefundableResourceFeeCharged",e.lookup("Int64")],["totalRefundableResourceFeeCharged",e.lookup("Int64")],["rentFeeCharged",e.lookup("Int64")]]),e.union("SorobanTransactionMetaExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("SorobanTransactionMetaExtV1")}}),e.struct("SorobanTransactionMeta",[["ext",e.lookup("SorobanTransactionMetaExt")],["events",e.varArray(e.lookup("ContractEvent"),2147483647)],["returnValue",e.lookup("ScVal")],["diagnosticEvents",e.varArray(e.lookup("DiagnosticEvent"),2147483647)]]),e.struct("TransactionMetaV3",[["ext",e.lookup("ExtensionPoint")],["txChangesBefore",e.lookup("LedgerEntryChanges")],["operations",e.varArray(e.lookup("OperationMeta"),2147483647)],["txChangesAfter",e.lookup("LedgerEntryChanges")],["sorobanMeta",e.option(e.lookup("SorobanTransactionMeta"))]]),e.struct("InvokeHostFunctionSuccessPreImage",[["returnValue",e.lookup("ScVal")],["events",e.varArray(e.lookup("ContractEvent"),2147483647)]]),e.union("TransactionMeta",{switchOn:e.int(),switchName:"v",switches:[[0,"operations"],[1,"v1"],[2,"v2"],[3,"v3"]],arms:{operations:e.varArray(e.lookup("OperationMeta"),2147483647),v1:e.lookup("TransactionMetaV1"),v2:e.lookup("TransactionMetaV2"),v3:e.lookup("TransactionMetaV3")}}),e.struct("TransactionResultMeta",[["result",e.lookup("TransactionResultPair")],["feeProcessing",e.lookup("LedgerEntryChanges")],["txApplyProcessing",e.lookup("TransactionMeta")]]),e.struct("UpgradeEntryMeta",[["upgrade",e.lookup("LedgerUpgrade")],["changes",e.lookup("LedgerEntryChanges")]]),e.struct("LedgerCloseMetaV0",[["ledgerHeader",e.lookup("LedgerHeaderHistoryEntry")],["txSet",e.lookup("TransactionSet")],["txProcessing",e.varArray(e.lookup("TransactionResultMeta"),2147483647)],["upgradesProcessing",e.varArray(e.lookup("UpgradeEntryMeta"),2147483647)],["scpInfo",e.varArray(e.lookup("ScpHistoryEntry"),2147483647)]]),e.struct("LedgerCloseMetaExtV1",[["ext",e.lookup("ExtensionPoint")],["sorobanFeeWrite1Kb",e.lookup("Int64")]]),e.union("LedgerCloseMetaExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("LedgerCloseMetaExtV1")}}),e.struct("LedgerCloseMetaV1",[["ext",e.lookup("LedgerCloseMetaExt")],["ledgerHeader",e.lookup("LedgerHeaderHistoryEntry")],["txSet",e.lookup("GeneralizedTransactionSet")],["txProcessing",e.varArray(e.lookup("TransactionResultMeta"),2147483647)],["upgradesProcessing",e.varArray(e.lookup("UpgradeEntryMeta"),2147483647)],["scpInfo",e.varArray(e.lookup("ScpHistoryEntry"),2147483647)],["totalByteSizeOfBucketList",e.lookup("Uint64")],["evictedTemporaryLedgerKeys",e.varArray(e.lookup("LedgerKey"),2147483647)],["evictedPersistentLedgerEntries",e.varArray(e.lookup("LedgerEntry"),2147483647)]]),e.union("LedgerCloseMeta",{switchOn:e.int(),switchName:"v",switches:[[0,"v0"],[1,"v1"]],arms:{v0:e.lookup("LedgerCloseMetaV0"),v1:e.lookup("LedgerCloseMetaV1")}}),e.enum("ErrorCode",{errMisc:0,errData:1,errConf:2,errAuth:3,errLoad:4}),e.struct("Error",[["code",e.lookup("ErrorCode")],["msg",e.string(100)]]),e.struct("SendMore",[["numMessages",e.lookup("Uint32")]]),e.struct("SendMoreExtended",[["numMessages",e.lookup("Uint32")],["numBytes",e.lookup("Uint32")]]),e.struct("AuthCert",[["pubkey",e.lookup("Curve25519Public")],["expiration",e.lookup("Uint64")],["sig",e.lookup("Signature")]]),e.struct("Hello",[["ledgerVersion",e.lookup("Uint32")],["overlayVersion",e.lookup("Uint32")],["overlayMinVersion",e.lookup("Uint32")],["networkId",e.lookup("Hash")],["versionStr",e.string(100)],["listeningPort",e.int()],["peerId",e.lookup("NodeId")],["cert",e.lookup("AuthCert")],["nonce",e.lookup("Uint256")]]),e.const("AUTH_MSG_FLAG_FLOW_CONTROL_BYTES_REQUESTED",200),e.struct("Auth",[["flags",e.int()]]),e.enum("IpAddrType",{iPv4:0,iPv6:1}),e.union("PeerAddressIp",{switchOn:e.lookup("IpAddrType"),switchName:"type",switches:[["iPv4","ipv4"],["iPv6","ipv6"]],arms:{ipv4:e.opaque(4),ipv6:e.opaque(16)}}),e.struct("PeerAddress",[["ip",e.lookup("PeerAddressIp")],["port",e.lookup("Uint32")],["numFailures",e.lookup("Uint32")]]),e.enum("MessageType",{errorMsg:0,auth:2,dontHave:3,getPeers:4,peers:5,getTxSet:6,txSet:7,generalizedTxSet:17,transaction:8,getScpQuorumset:9,scpQuorumset:10,scpMessage:11,getScpState:12,hello:13,surveyRequest:14,surveyResponse:15,sendMore:16,sendMoreExtended:20,floodAdvert:18,floodDemand:19}),e.struct("DontHave",[["type",e.lookup("MessageType")],["reqHash",e.lookup("Uint256")]]),e.enum("SurveyMessageCommandType",{surveyTopology:0}),e.enum("SurveyMessageResponseType",{surveyTopologyResponseV0:0,surveyTopologyResponseV1:1}),e.struct("SurveyRequestMessage",[["surveyorPeerId",e.lookup("NodeId")],["surveyedPeerId",e.lookup("NodeId")],["ledgerNum",e.lookup("Uint32")],["encryptionKey",e.lookup("Curve25519Public")],["commandType",e.lookup("SurveyMessageCommandType")]]),e.struct("SignedSurveyRequestMessage",[["requestSignature",e.lookup("Signature")],["request",e.lookup("SurveyRequestMessage")]]),e.typedef("EncryptedBody",e.varOpaque(64e3)),e.struct("SurveyResponseMessage",[["surveyorPeerId",e.lookup("NodeId")],["surveyedPeerId",e.lookup("NodeId")],["ledgerNum",e.lookup("Uint32")],["commandType",e.lookup("SurveyMessageCommandType")],["encryptedBody",e.lookup("EncryptedBody")]]),e.struct("SignedSurveyResponseMessage",[["responseSignature",e.lookup("Signature")],["response",e.lookup("SurveyResponseMessage")]]),e.struct("PeerStats",[["id",e.lookup("NodeId")],["versionStr",e.string(100)],["messagesRead",e.lookup("Uint64")],["messagesWritten",e.lookup("Uint64")],["bytesRead",e.lookup("Uint64")],["bytesWritten",e.lookup("Uint64")],["secondsConnected",e.lookup("Uint64")],["uniqueFloodBytesRecv",e.lookup("Uint64")],["duplicateFloodBytesRecv",e.lookup("Uint64")],["uniqueFetchBytesRecv",e.lookup("Uint64")],["duplicateFetchBytesRecv",e.lookup("Uint64")],["uniqueFloodMessageRecv",e.lookup("Uint64")],["duplicateFloodMessageRecv",e.lookup("Uint64")],["uniqueFetchMessageRecv",e.lookup("Uint64")],["duplicateFetchMessageRecv",e.lookup("Uint64")]]),e.typedef("PeerStatList",e.varArray(e.lookup("PeerStats"),25)),e.struct("TopologyResponseBodyV0",[["inboundPeers",e.lookup("PeerStatList")],["outboundPeers",e.lookup("PeerStatList")],["totalInboundPeerCount",e.lookup("Uint32")],["totalOutboundPeerCount",e.lookup("Uint32")]]),e.struct("TopologyResponseBodyV1",[["inboundPeers",e.lookup("PeerStatList")],["outboundPeers",e.lookup("PeerStatList")],["totalInboundPeerCount",e.lookup("Uint32")],["totalOutboundPeerCount",e.lookup("Uint32")],["maxInboundPeerCount",e.lookup("Uint32")],["maxOutboundPeerCount",e.lookup("Uint32")]]),e.union("SurveyResponseBody",{switchOn:e.lookup("SurveyMessageResponseType"),switchName:"type",switches:[["surveyTopologyResponseV0","topologyResponseBodyV0"],["surveyTopologyResponseV1","topologyResponseBodyV1"]],arms:{topologyResponseBodyV0:e.lookup("TopologyResponseBodyV0"),topologyResponseBodyV1:e.lookup("TopologyResponseBodyV1")}}),e.const("TX_ADVERT_VECTOR_MAX_SIZE",1e3),e.typedef("TxAdvertVector",e.varArray(e.lookup("Hash"),e.lookup("TX_ADVERT_VECTOR_MAX_SIZE"))),e.struct("FloodAdvert",[["txHashes",e.lookup("TxAdvertVector")]]),e.const("TX_DEMAND_VECTOR_MAX_SIZE",1e3),e.typedef("TxDemandVector",e.varArray(e.lookup("Hash"),e.lookup("TX_DEMAND_VECTOR_MAX_SIZE"))),e.struct("FloodDemand",[["txHashes",e.lookup("TxDemandVector")]]),e.union("StellarMessage",{switchOn:e.lookup("MessageType"),switchName:"type",switches:[["errorMsg","error"],["hello","hello"],["auth","auth"],["dontHave","dontHave"],["getPeers",e.void()],["peers","peers"],["getTxSet","txSetHash"],["txSet","txSet"],["generalizedTxSet","generalizedTxSet"],["transaction","transaction"],["surveyRequest","signedSurveyRequestMessage"],["surveyResponse","signedSurveyResponseMessage"],["getScpQuorumset","qSetHash"],["scpQuorumset","qSet"],["scpMessage","envelope"],["getScpState","getScpLedgerSeq"],["sendMore","sendMoreMessage"],["sendMoreExtended","sendMoreExtendedMessage"],["floodAdvert","floodAdvert"],["floodDemand","floodDemand"]],arms:{error:e.lookup("Error"),hello:e.lookup("Hello"),auth:e.lookup("Auth"),dontHave:e.lookup("DontHave"),peers:e.varArray(e.lookup("PeerAddress"),100),txSetHash:e.lookup("Uint256"),txSet:e.lookup("TransactionSet"),generalizedTxSet:e.lookup("GeneralizedTransactionSet"),transaction:e.lookup("TransactionEnvelope"),signedSurveyRequestMessage:e.lookup("SignedSurveyRequestMessage"),signedSurveyResponseMessage:e.lookup("SignedSurveyResponseMessage"),qSetHash:e.lookup("Uint256"),qSet:e.lookup("ScpQuorumSet"),envelope:e.lookup("ScpEnvelope"),getScpLedgerSeq:e.lookup("Uint32"),sendMoreMessage:e.lookup("SendMore"),sendMoreExtendedMessage:e.lookup("SendMoreExtended"),floodAdvert:e.lookup("FloodAdvert"),floodDemand:e.lookup("FloodDemand")}}),e.struct("AuthenticatedMessageV0",[["sequence",e.lookup("Uint64")],["message",e.lookup("StellarMessage")],["mac",e.lookup("HmacSha256Mac")]]),e.union("AuthenticatedMessage",{switchOn:e.lookup("Uint32"),switchName:"v",switches:[[0,"v0"]],arms:{v0:e.lookup("AuthenticatedMessageV0")}}),e.const("MAX_OPS_PER_TX",100),e.union("LiquidityPoolParameters",{switchOn:e.lookup("LiquidityPoolType"),switchName:"type",switches:[["liquidityPoolConstantProduct","constantProduct"]],arms:{constantProduct:e.lookup("LiquidityPoolConstantProductParameters")}}),e.struct("MuxedAccountMed25519",[["id",e.lookup("Uint64")],["ed25519",e.lookup("Uint256")]]),e.union("MuxedAccount",{switchOn:e.lookup("CryptoKeyType"),switchName:"type",switches:[["keyTypeEd25519","ed25519"],["keyTypeMuxedEd25519","med25519"]],arms:{ed25519:e.lookup("Uint256"),med25519:e.lookup("MuxedAccountMed25519")}}),e.struct("DecoratedSignature",[["hint",e.lookup("SignatureHint")],["signature",e.lookup("Signature")]]),e.enum("OperationType",{createAccount:0,payment:1,pathPaymentStrictReceive:2,manageSellOffer:3,createPassiveSellOffer:4,setOptions:5,changeTrust:6,allowTrust:7,accountMerge:8,inflation:9,manageData:10,bumpSequence:11,manageBuyOffer:12,pathPaymentStrictSend:13,createClaimableBalance:14,claimClaimableBalance:15,beginSponsoringFutureReserves:16,endSponsoringFutureReserves:17,revokeSponsorship:18,clawback:19,clawbackClaimableBalance:20,setTrustLineFlags:21,liquidityPoolDeposit:22,liquidityPoolWithdraw:23,invokeHostFunction:24,extendFootprintTtl:25,restoreFootprint:26}),e.struct("CreateAccountOp",[["destination",e.lookup("AccountId")],["startingBalance",e.lookup("Int64")]]),e.struct("PaymentOp",[["destination",e.lookup("MuxedAccount")],["asset",e.lookup("Asset")],["amount",e.lookup("Int64")]]),e.struct("PathPaymentStrictReceiveOp",[["sendAsset",e.lookup("Asset")],["sendMax",e.lookup("Int64")],["destination",e.lookup("MuxedAccount")],["destAsset",e.lookup("Asset")],["destAmount",e.lookup("Int64")],["path",e.varArray(e.lookup("Asset"),5)]]),e.struct("PathPaymentStrictSendOp",[["sendAsset",e.lookup("Asset")],["sendAmount",e.lookup("Int64")],["destination",e.lookup("MuxedAccount")],["destAsset",e.lookup("Asset")],["destMin",e.lookup("Int64")],["path",e.varArray(e.lookup("Asset"),5)]]),e.struct("ManageSellOfferOp",[["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["amount",e.lookup("Int64")],["price",e.lookup("Price")],["offerId",e.lookup("Int64")]]),e.struct("ManageBuyOfferOp",[["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["buyAmount",e.lookup("Int64")],["price",e.lookup("Price")],["offerId",e.lookup("Int64")]]),e.struct("CreatePassiveSellOfferOp",[["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["amount",e.lookup("Int64")],["price",e.lookup("Price")]]),e.struct("SetOptionsOp",[["inflationDest",e.option(e.lookup("AccountId"))],["clearFlags",e.option(e.lookup("Uint32"))],["setFlags",e.option(e.lookup("Uint32"))],["masterWeight",e.option(e.lookup("Uint32"))],["lowThreshold",e.option(e.lookup("Uint32"))],["medThreshold",e.option(e.lookup("Uint32"))],["highThreshold",e.option(e.lookup("Uint32"))],["homeDomain",e.option(e.lookup("String32"))],["signer",e.option(e.lookup("Signer"))]]),e.union("ChangeTrustAsset",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",e.void()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"],["assetTypePoolShare","liquidityPool"]],arms:{alphaNum4:e.lookup("AlphaNum4"),alphaNum12:e.lookup("AlphaNum12"),liquidityPool:e.lookup("LiquidityPoolParameters")}}),e.struct("ChangeTrustOp",[["line",e.lookup("ChangeTrustAsset")],["limit",e.lookup("Int64")]]),e.struct("AllowTrustOp",[["trustor",e.lookup("AccountId")],["asset",e.lookup("AssetCode")],["authorize",e.lookup("Uint32")]]),e.struct("ManageDataOp",[["dataName",e.lookup("String64")],["dataValue",e.option(e.lookup("DataValue"))]]),e.struct("BumpSequenceOp",[["bumpTo",e.lookup("SequenceNumber")]]),e.struct("CreateClaimableBalanceOp",[["asset",e.lookup("Asset")],["amount",e.lookup("Int64")],["claimants",e.varArray(e.lookup("Claimant"),10)]]),e.struct("ClaimClaimableBalanceOp",[["balanceId",e.lookup("ClaimableBalanceId")]]),e.struct("BeginSponsoringFutureReservesOp",[["sponsoredId",e.lookup("AccountId")]]),e.enum("RevokeSponsorshipType",{revokeSponsorshipLedgerEntry:0,revokeSponsorshipSigner:1}),e.struct("RevokeSponsorshipOpSigner",[["accountId",e.lookup("AccountId")],["signerKey",e.lookup("SignerKey")]]),e.union("RevokeSponsorshipOp",{switchOn:e.lookup("RevokeSponsorshipType"),switchName:"type",switches:[["revokeSponsorshipLedgerEntry","ledgerKey"],["revokeSponsorshipSigner","signer"]],arms:{ledgerKey:e.lookup("LedgerKey"),signer:e.lookup("RevokeSponsorshipOpSigner")}}),e.struct("ClawbackOp",[["asset",e.lookup("Asset")],["from",e.lookup("MuxedAccount")],["amount",e.lookup("Int64")]]),e.struct("ClawbackClaimableBalanceOp",[["balanceId",e.lookup("ClaimableBalanceId")]]),e.struct("SetTrustLineFlagsOp",[["trustor",e.lookup("AccountId")],["asset",e.lookup("Asset")],["clearFlags",e.lookup("Uint32")],["setFlags",e.lookup("Uint32")]]),e.const("LIQUIDITY_POOL_FEE_V18",30),e.struct("LiquidityPoolDepositOp",[["liquidityPoolId",e.lookup("PoolId")],["maxAmountA",e.lookup("Int64")],["maxAmountB",e.lookup("Int64")],["minPrice",e.lookup("Price")],["maxPrice",e.lookup("Price")]]),e.struct("LiquidityPoolWithdrawOp",[["liquidityPoolId",e.lookup("PoolId")],["amount",e.lookup("Int64")],["minAmountA",e.lookup("Int64")],["minAmountB",e.lookup("Int64")]]),e.enum("HostFunctionType",{hostFunctionTypeInvokeContract:0,hostFunctionTypeCreateContract:1,hostFunctionTypeUploadContractWasm:2}),e.enum("ContractIdPreimageType",{contractIdPreimageFromAddress:0,contractIdPreimageFromAsset:1}),e.struct("ContractIdPreimageFromAddress",[["address",e.lookup("ScAddress")],["salt",e.lookup("Uint256")]]),e.union("ContractIdPreimage",{switchOn:e.lookup("ContractIdPreimageType"),switchName:"type",switches:[["contractIdPreimageFromAddress","fromAddress"],["contractIdPreimageFromAsset","fromAsset"]],arms:{fromAddress:e.lookup("ContractIdPreimageFromAddress"),fromAsset:e.lookup("Asset")}}),e.struct("CreateContractArgs",[["contractIdPreimage",e.lookup("ContractIdPreimage")],["executable",e.lookup("ContractExecutable")]]),e.struct("InvokeContractArgs",[["contractAddress",e.lookup("ScAddress")],["functionName",e.lookup("ScSymbol")],["args",e.varArray(e.lookup("ScVal"),2147483647)]]),e.union("HostFunction",{switchOn:e.lookup("HostFunctionType"),switchName:"type",switches:[["hostFunctionTypeInvokeContract","invokeContract"],["hostFunctionTypeCreateContract","createContract"],["hostFunctionTypeUploadContractWasm","wasm"]],arms:{invokeContract:e.lookup("InvokeContractArgs"),createContract:e.lookup("CreateContractArgs"),wasm:e.varOpaque()}}),e.enum("SorobanAuthorizedFunctionType",{sorobanAuthorizedFunctionTypeContractFn:0,sorobanAuthorizedFunctionTypeCreateContractHostFn:1}),e.union("SorobanAuthorizedFunction",{switchOn:e.lookup("SorobanAuthorizedFunctionType"),switchName:"type",switches:[["sorobanAuthorizedFunctionTypeContractFn","contractFn"],["sorobanAuthorizedFunctionTypeCreateContractHostFn","createContractHostFn"]],arms:{contractFn:e.lookup("InvokeContractArgs"),createContractHostFn:e.lookup("CreateContractArgs")}}),e.struct("SorobanAuthorizedInvocation",[["function",e.lookup("SorobanAuthorizedFunction")],["subInvocations",e.varArray(e.lookup("SorobanAuthorizedInvocation"),2147483647)]]),e.struct("SorobanAddressCredentials",[["address",e.lookup("ScAddress")],["nonce",e.lookup("Int64")],["signatureExpirationLedger",e.lookup("Uint32")],["signature",e.lookup("ScVal")]]),e.enum("SorobanCredentialsType",{sorobanCredentialsSourceAccount:0,sorobanCredentialsAddress:1}),e.union("SorobanCredentials",{switchOn:e.lookup("SorobanCredentialsType"),switchName:"type",switches:[["sorobanCredentialsSourceAccount",e.void()],["sorobanCredentialsAddress","address"]],arms:{address:e.lookup("SorobanAddressCredentials")}}),e.struct("SorobanAuthorizationEntry",[["credentials",e.lookup("SorobanCredentials")],["rootInvocation",e.lookup("SorobanAuthorizedInvocation")]]),e.struct("InvokeHostFunctionOp",[["hostFunction",e.lookup("HostFunction")],["auth",e.varArray(e.lookup("SorobanAuthorizationEntry"),2147483647)]]),e.struct("ExtendFootprintTtlOp",[["ext",e.lookup("ExtensionPoint")],["extendTo",e.lookup("Uint32")]]),e.struct("RestoreFootprintOp",[["ext",e.lookup("ExtensionPoint")]]),e.union("OperationBody",{switchOn:e.lookup("OperationType"),switchName:"type",switches:[["createAccount","createAccountOp"],["payment","paymentOp"],["pathPaymentStrictReceive","pathPaymentStrictReceiveOp"],["manageSellOffer","manageSellOfferOp"],["createPassiveSellOffer","createPassiveSellOfferOp"],["setOptions","setOptionsOp"],["changeTrust","changeTrustOp"],["allowTrust","allowTrustOp"],["accountMerge","destination"],["inflation",e.void()],["manageData","manageDataOp"],["bumpSequence","bumpSequenceOp"],["manageBuyOffer","manageBuyOfferOp"],["pathPaymentStrictSend","pathPaymentStrictSendOp"],["createClaimableBalance","createClaimableBalanceOp"],["claimClaimableBalance","claimClaimableBalanceOp"],["beginSponsoringFutureReserves","beginSponsoringFutureReservesOp"],["endSponsoringFutureReserves",e.void()],["revokeSponsorship","revokeSponsorshipOp"],["clawback","clawbackOp"],["clawbackClaimableBalance","clawbackClaimableBalanceOp"],["setTrustLineFlags","setTrustLineFlagsOp"],["liquidityPoolDeposit","liquidityPoolDepositOp"],["liquidityPoolWithdraw","liquidityPoolWithdrawOp"],["invokeHostFunction","invokeHostFunctionOp"],["extendFootprintTtl","extendFootprintTtlOp"],["restoreFootprint","restoreFootprintOp"]],arms:{createAccountOp:e.lookup("CreateAccountOp"),paymentOp:e.lookup("PaymentOp"),pathPaymentStrictReceiveOp:e.lookup("PathPaymentStrictReceiveOp"),manageSellOfferOp:e.lookup("ManageSellOfferOp"),createPassiveSellOfferOp:e.lookup("CreatePassiveSellOfferOp"),setOptionsOp:e.lookup("SetOptionsOp"),changeTrustOp:e.lookup("ChangeTrustOp"),allowTrustOp:e.lookup("AllowTrustOp"),destination:e.lookup("MuxedAccount"),manageDataOp:e.lookup("ManageDataOp"),bumpSequenceOp:e.lookup("BumpSequenceOp"),manageBuyOfferOp:e.lookup("ManageBuyOfferOp"),pathPaymentStrictSendOp:e.lookup("PathPaymentStrictSendOp"),createClaimableBalanceOp:e.lookup("CreateClaimableBalanceOp"),claimClaimableBalanceOp:e.lookup("ClaimClaimableBalanceOp"),beginSponsoringFutureReservesOp:e.lookup("BeginSponsoringFutureReservesOp"),revokeSponsorshipOp:e.lookup("RevokeSponsorshipOp"),clawbackOp:e.lookup("ClawbackOp"),clawbackClaimableBalanceOp:e.lookup("ClawbackClaimableBalanceOp"),setTrustLineFlagsOp:e.lookup("SetTrustLineFlagsOp"),liquidityPoolDepositOp:e.lookup("LiquidityPoolDepositOp"),liquidityPoolWithdrawOp:e.lookup("LiquidityPoolWithdrawOp"),invokeHostFunctionOp:e.lookup("InvokeHostFunctionOp"),extendFootprintTtlOp:e.lookup("ExtendFootprintTtlOp"),restoreFootprintOp:e.lookup("RestoreFootprintOp")}}),e.struct("Operation",[["sourceAccount",e.option(e.lookup("MuxedAccount"))],["body",e.lookup("OperationBody")]]),e.struct("HashIdPreimageOperationId",[["sourceAccount",e.lookup("AccountId")],["seqNum",e.lookup("SequenceNumber")],["opNum",e.lookup("Uint32")]]),e.struct("HashIdPreimageRevokeId",[["sourceAccount",e.lookup("AccountId")],["seqNum",e.lookup("SequenceNumber")],["opNum",e.lookup("Uint32")],["liquidityPoolId",e.lookup("PoolId")],["asset",e.lookup("Asset")]]),e.struct("HashIdPreimageContractId",[["networkId",e.lookup("Hash")],["contractIdPreimage",e.lookup("ContractIdPreimage")]]),e.struct("HashIdPreimageSorobanAuthorization",[["networkId",e.lookup("Hash")],["nonce",e.lookup("Int64")],["signatureExpirationLedger",e.lookup("Uint32")],["invocation",e.lookup("SorobanAuthorizedInvocation")]]),e.union("HashIdPreimage",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeOpId","operationId"],["envelopeTypePoolRevokeOpId","revokeId"],["envelopeTypeContractId","contractId"],["envelopeTypeSorobanAuthorization","sorobanAuthorization"]],arms:{operationId:e.lookup("HashIdPreimageOperationId"),revokeId:e.lookup("HashIdPreimageRevokeId"),contractId:e.lookup("HashIdPreimageContractId"),sorobanAuthorization:e.lookup("HashIdPreimageSorobanAuthorization")}}),e.enum("MemoType",{memoNone:0,memoText:1,memoId:2,memoHash:3,memoReturn:4}),e.union("Memo",{switchOn:e.lookup("MemoType"),switchName:"type",switches:[["memoNone",e.void()],["memoText","text"],["memoId","id"],["memoHash","hash"],["memoReturn","retHash"]],arms:{text:e.string(28),id:e.lookup("Uint64"),hash:e.lookup("Hash"),retHash:e.lookup("Hash")}}),e.struct("TimeBounds",[["minTime",e.lookup("TimePoint")],["maxTime",e.lookup("TimePoint")]]),e.struct("LedgerBounds",[["minLedger",e.lookup("Uint32")],["maxLedger",e.lookup("Uint32")]]),e.struct("PreconditionsV2",[["timeBounds",e.option(e.lookup("TimeBounds"))],["ledgerBounds",e.option(e.lookup("LedgerBounds"))],["minSeqNum",e.option(e.lookup("SequenceNumber"))],["minSeqAge",e.lookup("Duration")],["minSeqLedgerGap",e.lookup("Uint32")],["extraSigners",e.varArray(e.lookup("SignerKey"),2)]]),e.enum("PreconditionType",{precondNone:0,precondTime:1,precondV2:2}),e.union("Preconditions",{switchOn:e.lookup("PreconditionType"),switchName:"type",switches:[["precondNone",e.void()],["precondTime","timeBounds"],["precondV2","v2"]],arms:{timeBounds:e.lookup("TimeBounds"),v2:e.lookup("PreconditionsV2")}}),e.struct("LedgerFootprint",[["readOnly",e.varArray(e.lookup("LedgerKey"),2147483647)],["readWrite",e.varArray(e.lookup("LedgerKey"),2147483647)]]),e.struct("SorobanResources",[["footprint",e.lookup("LedgerFootprint")],["instructions",e.lookup("Uint32")],["readBytes",e.lookup("Uint32")],["writeBytes",e.lookup("Uint32")]]),e.struct("SorobanTransactionData",[["ext",e.lookup("ExtensionPoint")],["resources",e.lookup("SorobanResources")],["resourceFee",e.lookup("Int64")]]),e.union("TransactionV0Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TransactionV0",[["sourceAccountEd25519",e.lookup("Uint256")],["fee",e.lookup("Uint32")],["seqNum",e.lookup("SequenceNumber")],["timeBounds",e.option(e.lookup("TimeBounds"))],["memo",e.lookup("Memo")],["operations",e.varArray(e.lookup("Operation"),e.lookup("MAX_OPS_PER_TX"))],["ext",e.lookup("TransactionV0Ext")]]),e.struct("TransactionV0Envelope",[["tx",e.lookup("TransactionV0")],["signatures",e.varArray(e.lookup("DecoratedSignature"),20)]]),e.union("TransactionExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"sorobanData"]],arms:{sorobanData:e.lookup("SorobanTransactionData")}}),e.struct("Transaction",[["sourceAccount",e.lookup("MuxedAccount")],["fee",e.lookup("Uint32")],["seqNum",e.lookup("SequenceNumber")],["cond",e.lookup("Preconditions")],["memo",e.lookup("Memo")],["operations",e.varArray(e.lookup("Operation"),e.lookup("MAX_OPS_PER_TX"))],["ext",e.lookup("TransactionExt")]]),e.struct("TransactionV1Envelope",[["tx",e.lookup("Transaction")],["signatures",e.varArray(e.lookup("DecoratedSignature"),20)]]),e.union("FeeBumpTransactionInnerTx",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTx","v1"]],arms:{v1:e.lookup("TransactionV1Envelope")}}),e.union("FeeBumpTransactionExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("FeeBumpTransaction",[["feeSource",e.lookup("MuxedAccount")],["fee",e.lookup("Int64")],["innerTx",e.lookup("FeeBumpTransactionInnerTx")],["ext",e.lookup("FeeBumpTransactionExt")]]),e.struct("FeeBumpTransactionEnvelope",[["tx",e.lookup("FeeBumpTransaction")],["signatures",e.varArray(e.lookup("DecoratedSignature"),20)]]),e.union("TransactionEnvelope",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTxV0","v0"],["envelopeTypeTx","v1"],["envelopeTypeTxFeeBump","feeBump"]],arms:{v0:e.lookup("TransactionV0Envelope"),v1:e.lookup("TransactionV1Envelope"),feeBump:e.lookup("FeeBumpTransactionEnvelope")}}),e.union("TransactionSignaturePayloadTaggedTransaction",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTx","tx"],["envelopeTypeTxFeeBump","feeBump"]],arms:{tx:e.lookup("Transaction"),feeBump:e.lookup("FeeBumpTransaction")}}),e.struct("TransactionSignaturePayload",[["networkId",e.lookup("Hash")],["taggedTransaction",e.lookup("TransactionSignaturePayloadTaggedTransaction")]]),e.enum("ClaimAtomType",{claimAtomTypeV0:0,claimAtomTypeOrderBook:1,claimAtomTypeLiquidityPool:2}),e.struct("ClaimOfferAtomV0",[["sellerEd25519",e.lookup("Uint256")],["offerId",e.lookup("Int64")],["assetSold",e.lookup("Asset")],["amountSold",e.lookup("Int64")],["assetBought",e.lookup("Asset")],["amountBought",e.lookup("Int64")]]),e.struct("ClaimOfferAtom",[["sellerId",e.lookup("AccountId")],["offerId",e.lookup("Int64")],["assetSold",e.lookup("Asset")],["amountSold",e.lookup("Int64")],["assetBought",e.lookup("Asset")],["amountBought",e.lookup("Int64")]]),e.struct("ClaimLiquidityAtom",[["liquidityPoolId",e.lookup("PoolId")],["assetSold",e.lookup("Asset")],["amountSold",e.lookup("Int64")],["assetBought",e.lookup("Asset")],["amountBought",e.lookup("Int64")]]),e.union("ClaimAtom",{switchOn:e.lookup("ClaimAtomType"),switchName:"type",switches:[["claimAtomTypeV0","v0"],["claimAtomTypeOrderBook","orderBook"],["claimAtomTypeLiquidityPool","liquidityPool"]],arms:{v0:e.lookup("ClaimOfferAtomV0"),orderBook:e.lookup("ClaimOfferAtom"),liquidityPool:e.lookup("ClaimLiquidityAtom")}}),e.enum("CreateAccountResultCode",{createAccountSuccess:0,createAccountMalformed:-1,createAccountUnderfunded:-2,createAccountLowReserve:-3,createAccountAlreadyExist:-4}),e.union("CreateAccountResult",{switchOn:e.lookup("CreateAccountResultCode"),switchName:"code",switches:[["createAccountSuccess",e.void()],["createAccountMalformed",e.void()],["createAccountUnderfunded",e.void()],["createAccountLowReserve",e.void()],["createAccountAlreadyExist",e.void()]],arms:{}}),e.enum("PaymentResultCode",{paymentSuccess:0,paymentMalformed:-1,paymentUnderfunded:-2,paymentSrcNoTrust:-3,paymentSrcNotAuthorized:-4,paymentNoDestination:-5,paymentNoTrust:-6,paymentNotAuthorized:-7,paymentLineFull:-8,paymentNoIssuer:-9}),e.union("PaymentResult",{switchOn:e.lookup("PaymentResultCode"),switchName:"code",switches:[["paymentSuccess",e.void()],["paymentMalformed",e.void()],["paymentUnderfunded",e.void()],["paymentSrcNoTrust",e.void()],["paymentSrcNotAuthorized",e.void()],["paymentNoDestination",e.void()],["paymentNoTrust",e.void()],["paymentNotAuthorized",e.void()],["paymentLineFull",e.void()],["paymentNoIssuer",e.void()]],arms:{}}),e.enum("PathPaymentStrictReceiveResultCode",{pathPaymentStrictReceiveSuccess:0,pathPaymentStrictReceiveMalformed:-1,pathPaymentStrictReceiveUnderfunded:-2,pathPaymentStrictReceiveSrcNoTrust:-3,pathPaymentStrictReceiveSrcNotAuthorized:-4,pathPaymentStrictReceiveNoDestination:-5,pathPaymentStrictReceiveNoTrust:-6,pathPaymentStrictReceiveNotAuthorized:-7,pathPaymentStrictReceiveLineFull:-8,pathPaymentStrictReceiveNoIssuer:-9,pathPaymentStrictReceiveTooFewOffers:-10,pathPaymentStrictReceiveOfferCrossSelf:-11,pathPaymentStrictReceiveOverSendmax:-12}),e.struct("SimplePaymentResult",[["destination",e.lookup("AccountId")],["asset",e.lookup("Asset")],["amount",e.lookup("Int64")]]),e.struct("PathPaymentStrictReceiveResultSuccess",[["offers",e.varArray(e.lookup("ClaimAtom"),2147483647)],["last",e.lookup("SimplePaymentResult")]]),e.union("PathPaymentStrictReceiveResult",{switchOn:e.lookup("PathPaymentStrictReceiveResultCode"),switchName:"code",switches:[["pathPaymentStrictReceiveSuccess","success"],["pathPaymentStrictReceiveMalformed",e.void()],["pathPaymentStrictReceiveUnderfunded",e.void()],["pathPaymentStrictReceiveSrcNoTrust",e.void()],["pathPaymentStrictReceiveSrcNotAuthorized",e.void()],["pathPaymentStrictReceiveNoDestination",e.void()],["pathPaymentStrictReceiveNoTrust",e.void()],["pathPaymentStrictReceiveNotAuthorized",e.void()],["pathPaymentStrictReceiveLineFull",e.void()],["pathPaymentStrictReceiveNoIssuer","noIssuer"],["pathPaymentStrictReceiveTooFewOffers",e.void()],["pathPaymentStrictReceiveOfferCrossSelf",e.void()],["pathPaymentStrictReceiveOverSendmax",e.void()]],arms:{success:e.lookup("PathPaymentStrictReceiveResultSuccess"),noIssuer:e.lookup("Asset")}}),e.enum("PathPaymentStrictSendResultCode",{pathPaymentStrictSendSuccess:0,pathPaymentStrictSendMalformed:-1,pathPaymentStrictSendUnderfunded:-2,pathPaymentStrictSendSrcNoTrust:-3,pathPaymentStrictSendSrcNotAuthorized:-4,pathPaymentStrictSendNoDestination:-5,pathPaymentStrictSendNoTrust:-6,pathPaymentStrictSendNotAuthorized:-7,pathPaymentStrictSendLineFull:-8,pathPaymentStrictSendNoIssuer:-9,pathPaymentStrictSendTooFewOffers:-10,pathPaymentStrictSendOfferCrossSelf:-11,pathPaymentStrictSendUnderDestmin:-12}),e.struct("PathPaymentStrictSendResultSuccess",[["offers",e.varArray(e.lookup("ClaimAtom"),2147483647)],["last",e.lookup("SimplePaymentResult")]]),e.union("PathPaymentStrictSendResult",{switchOn:e.lookup("PathPaymentStrictSendResultCode"),switchName:"code",switches:[["pathPaymentStrictSendSuccess","success"],["pathPaymentStrictSendMalformed",e.void()],["pathPaymentStrictSendUnderfunded",e.void()],["pathPaymentStrictSendSrcNoTrust",e.void()],["pathPaymentStrictSendSrcNotAuthorized",e.void()],["pathPaymentStrictSendNoDestination",e.void()],["pathPaymentStrictSendNoTrust",e.void()],["pathPaymentStrictSendNotAuthorized",e.void()],["pathPaymentStrictSendLineFull",e.void()],["pathPaymentStrictSendNoIssuer","noIssuer"],["pathPaymentStrictSendTooFewOffers",e.void()],["pathPaymentStrictSendOfferCrossSelf",e.void()],["pathPaymentStrictSendUnderDestmin",e.void()]],arms:{success:e.lookup("PathPaymentStrictSendResultSuccess"),noIssuer:e.lookup("Asset")}}),e.enum("ManageSellOfferResultCode",{manageSellOfferSuccess:0,manageSellOfferMalformed:-1,manageSellOfferSellNoTrust:-2,manageSellOfferBuyNoTrust:-3,manageSellOfferSellNotAuthorized:-4,manageSellOfferBuyNotAuthorized:-5,manageSellOfferLineFull:-6,manageSellOfferUnderfunded:-7,manageSellOfferCrossSelf:-8,manageSellOfferSellNoIssuer:-9,manageSellOfferBuyNoIssuer:-10,manageSellOfferNotFound:-11,manageSellOfferLowReserve:-12}),e.enum("ManageOfferEffect",{manageOfferCreated:0,manageOfferUpdated:1,manageOfferDeleted:2}),e.union("ManageOfferSuccessResultOffer",{switchOn:e.lookup("ManageOfferEffect"),switchName:"effect",switches:[["manageOfferCreated","offer"],["manageOfferUpdated","offer"],["manageOfferDeleted",e.void()]],arms:{offer:e.lookup("OfferEntry")}}),e.struct("ManageOfferSuccessResult",[["offersClaimed",e.varArray(e.lookup("ClaimAtom"),2147483647)],["offer",e.lookup("ManageOfferSuccessResultOffer")]]),e.union("ManageSellOfferResult",{switchOn:e.lookup("ManageSellOfferResultCode"),switchName:"code",switches:[["manageSellOfferSuccess","success"],["manageSellOfferMalformed",e.void()],["manageSellOfferSellNoTrust",e.void()],["manageSellOfferBuyNoTrust",e.void()],["manageSellOfferSellNotAuthorized",e.void()],["manageSellOfferBuyNotAuthorized",e.void()],["manageSellOfferLineFull",e.void()],["manageSellOfferUnderfunded",e.void()],["manageSellOfferCrossSelf",e.void()],["manageSellOfferSellNoIssuer",e.void()],["manageSellOfferBuyNoIssuer",e.void()],["manageSellOfferNotFound",e.void()],["manageSellOfferLowReserve",e.void()]],arms:{success:e.lookup("ManageOfferSuccessResult")}}),e.enum("ManageBuyOfferResultCode",{manageBuyOfferSuccess:0,manageBuyOfferMalformed:-1,manageBuyOfferSellNoTrust:-2,manageBuyOfferBuyNoTrust:-3,manageBuyOfferSellNotAuthorized:-4,manageBuyOfferBuyNotAuthorized:-5,manageBuyOfferLineFull:-6,manageBuyOfferUnderfunded:-7,manageBuyOfferCrossSelf:-8,manageBuyOfferSellNoIssuer:-9,manageBuyOfferBuyNoIssuer:-10,manageBuyOfferNotFound:-11,manageBuyOfferLowReserve:-12}),e.union("ManageBuyOfferResult",{switchOn:e.lookup("ManageBuyOfferResultCode"),switchName:"code",switches:[["manageBuyOfferSuccess","success"],["manageBuyOfferMalformed",e.void()],["manageBuyOfferSellNoTrust",e.void()],["manageBuyOfferBuyNoTrust",e.void()],["manageBuyOfferSellNotAuthorized",e.void()],["manageBuyOfferBuyNotAuthorized",e.void()],["manageBuyOfferLineFull",e.void()],["manageBuyOfferUnderfunded",e.void()],["manageBuyOfferCrossSelf",e.void()],["manageBuyOfferSellNoIssuer",e.void()],["manageBuyOfferBuyNoIssuer",e.void()],["manageBuyOfferNotFound",e.void()],["manageBuyOfferLowReserve",e.void()]],arms:{success:e.lookup("ManageOfferSuccessResult")}}),e.enum("SetOptionsResultCode",{setOptionsSuccess:0,setOptionsLowReserve:-1,setOptionsTooManySigners:-2,setOptionsBadFlags:-3,setOptionsInvalidInflation:-4,setOptionsCantChange:-5,setOptionsUnknownFlag:-6,setOptionsThresholdOutOfRange:-7,setOptionsBadSigner:-8,setOptionsInvalidHomeDomain:-9,setOptionsAuthRevocableRequired:-10}),e.union("SetOptionsResult",{switchOn:e.lookup("SetOptionsResultCode"),switchName:"code",switches:[["setOptionsSuccess",e.void()],["setOptionsLowReserve",e.void()],["setOptionsTooManySigners",e.void()],["setOptionsBadFlags",e.void()],["setOptionsInvalidInflation",e.void()],["setOptionsCantChange",e.void()],["setOptionsUnknownFlag",e.void()],["setOptionsThresholdOutOfRange",e.void()],["setOptionsBadSigner",e.void()],["setOptionsInvalidHomeDomain",e.void()],["setOptionsAuthRevocableRequired",e.void()]],arms:{}}),e.enum("ChangeTrustResultCode",{changeTrustSuccess:0,changeTrustMalformed:-1,changeTrustNoIssuer:-2,changeTrustInvalidLimit:-3,changeTrustLowReserve:-4,changeTrustSelfNotAllowed:-5,changeTrustTrustLineMissing:-6,changeTrustCannotDelete:-7,changeTrustNotAuthMaintainLiabilities:-8}),e.union("ChangeTrustResult",{switchOn:e.lookup("ChangeTrustResultCode"),switchName:"code",switches:[["changeTrustSuccess",e.void()],["changeTrustMalformed",e.void()],["changeTrustNoIssuer",e.void()],["changeTrustInvalidLimit",e.void()],["changeTrustLowReserve",e.void()],["changeTrustSelfNotAllowed",e.void()],["changeTrustTrustLineMissing",e.void()],["changeTrustCannotDelete",e.void()],["changeTrustNotAuthMaintainLiabilities",e.void()]],arms:{}}),e.enum("AllowTrustResultCode",{allowTrustSuccess:0,allowTrustMalformed:-1,allowTrustNoTrustLine:-2,allowTrustTrustNotRequired:-3,allowTrustCantRevoke:-4,allowTrustSelfNotAllowed:-5,allowTrustLowReserve:-6}),e.union("AllowTrustResult",{switchOn:e.lookup("AllowTrustResultCode"),switchName:"code",switches:[["allowTrustSuccess",e.void()],["allowTrustMalformed",e.void()],["allowTrustNoTrustLine",e.void()],["allowTrustTrustNotRequired",e.void()],["allowTrustCantRevoke",e.void()],["allowTrustSelfNotAllowed",e.void()],["allowTrustLowReserve",e.void()]],arms:{}}),e.enum("AccountMergeResultCode",{accountMergeSuccess:0,accountMergeMalformed:-1,accountMergeNoAccount:-2,accountMergeImmutableSet:-3,accountMergeHasSubEntries:-4,accountMergeSeqnumTooFar:-5,accountMergeDestFull:-6,accountMergeIsSponsor:-7}),e.union("AccountMergeResult",{switchOn:e.lookup("AccountMergeResultCode"),switchName:"code",switches:[["accountMergeSuccess","sourceAccountBalance"],["accountMergeMalformed",e.void()],["accountMergeNoAccount",e.void()],["accountMergeImmutableSet",e.void()],["accountMergeHasSubEntries",e.void()],["accountMergeSeqnumTooFar",e.void()],["accountMergeDestFull",e.void()],["accountMergeIsSponsor",e.void()]],arms:{sourceAccountBalance:e.lookup("Int64")}}),e.enum("InflationResultCode",{inflationSuccess:0,inflationNotTime:-1}),e.struct("InflationPayout",[["destination",e.lookup("AccountId")],["amount",e.lookup("Int64")]]),e.union("InflationResult",{switchOn:e.lookup("InflationResultCode"),switchName:"code",switches:[["inflationSuccess","payouts"],["inflationNotTime",e.void()]],arms:{payouts:e.varArray(e.lookup("InflationPayout"),2147483647)}}),e.enum("ManageDataResultCode",{manageDataSuccess:0,manageDataNotSupportedYet:-1,manageDataNameNotFound:-2,manageDataLowReserve:-3,manageDataInvalidName:-4}),e.union("ManageDataResult",{switchOn:e.lookup("ManageDataResultCode"),switchName:"code",switches:[["manageDataSuccess",e.void()],["manageDataNotSupportedYet",e.void()],["manageDataNameNotFound",e.void()],["manageDataLowReserve",e.void()],["manageDataInvalidName",e.void()]],arms:{}}),e.enum("BumpSequenceResultCode",{bumpSequenceSuccess:0,bumpSequenceBadSeq:-1}),e.union("BumpSequenceResult",{switchOn:e.lookup("BumpSequenceResultCode"),switchName:"code",switches:[["bumpSequenceSuccess",e.void()],["bumpSequenceBadSeq",e.void()]],arms:{}}),e.enum("CreateClaimableBalanceResultCode",{createClaimableBalanceSuccess:0,createClaimableBalanceMalformed:-1,createClaimableBalanceLowReserve:-2,createClaimableBalanceNoTrust:-3,createClaimableBalanceNotAuthorized:-4,createClaimableBalanceUnderfunded:-5}),e.union("CreateClaimableBalanceResult",{switchOn:e.lookup("CreateClaimableBalanceResultCode"),switchName:"code",switches:[["createClaimableBalanceSuccess","balanceId"],["createClaimableBalanceMalformed",e.void()],["createClaimableBalanceLowReserve",e.void()],["createClaimableBalanceNoTrust",e.void()],["createClaimableBalanceNotAuthorized",e.void()],["createClaimableBalanceUnderfunded",e.void()]],arms:{balanceId:e.lookup("ClaimableBalanceId")}}),e.enum("ClaimClaimableBalanceResultCode",{claimClaimableBalanceSuccess:0,claimClaimableBalanceDoesNotExist:-1,claimClaimableBalanceCannotClaim:-2,claimClaimableBalanceLineFull:-3,claimClaimableBalanceNoTrust:-4,claimClaimableBalanceNotAuthorized:-5}),e.union("ClaimClaimableBalanceResult",{switchOn:e.lookup("ClaimClaimableBalanceResultCode"),switchName:"code",switches:[["claimClaimableBalanceSuccess",e.void()],["claimClaimableBalanceDoesNotExist",e.void()],["claimClaimableBalanceCannotClaim",e.void()],["claimClaimableBalanceLineFull",e.void()],["claimClaimableBalanceNoTrust",e.void()],["claimClaimableBalanceNotAuthorized",e.void()]],arms:{}}),e.enum("BeginSponsoringFutureReservesResultCode",{beginSponsoringFutureReservesSuccess:0,beginSponsoringFutureReservesMalformed:-1,beginSponsoringFutureReservesAlreadySponsored:-2,beginSponsoringFutureReservesRecursive:-3}),e.union("BeginSponsoringFutureReservesResult",{switchOn:e.lookup("BeginSponsoringFutureReservesResultCode"),switchName:"code",switches:[["beginSponsoringFutureReservesSuccess",e.void()],["beginSponsoringFutureReservesMalformed",e.void()],["beginSponsoringFutureReservesAlreadySponsored",e.void()],["beginSponsoringFutureReservesRecursive",e.void()]],arms:{}}),e.enum("EndSponsoringFutureReservesResultCode",{endSponsoringFutureReservesSuccess:0,endSponsoringFutureReservesNotSponsored:-1}),e.union("EndSponsoringFutureReservesResult",{switchOn:e.lookup("EndSponsoringFutureReservesResultCode"),switchName:"code",switches:[["endSponsoringFutureReservesSuccess",e.void()],["endSponsoringFutureReservesNotSponsored",e.void()]],arms:{}}),e.enum("RevokeSponsorshipResultCode",{revokeSponsorshipSuccess:0,revokeSponsorshipDoesNotExist:-1,revokeSponsorshipNotSponsor:-2,revokeSponsorshipLowReserve:-3,revokeSponsorshipOnlyTransferable:-4,revokeSponsorshipMalformed:-5}),e.union("RevokeSponsorshipResult",{switchOn:e.lookup("RevokeSponsorshipResultCode"),switchName:"code",switches:[["revokeSponsorshipSuccess",e.void()],["revokeSponsorshipDoesNotExist",e.void()],["revokeSponsorshipNotSponsor",e.void()],["revokeSponsorshipLowReserve",e.void()],["revokeSponsorshipOnlyTransferable",e.void()],["revokeSponsorshipMalformed",e.void()]],arms:{}}),e.enum("ClawbackResultCode",{clawbackSuccess:0,clawbackMalformed:-1,clawbackNotClawbackEnabled:-2,clawbackNoTrust:-3,clawbackUnderfunded:-4}),e.union("ClawbackResult",{switchOn:e.lookup("ClawbackResultCode"),switchName:"code",switches:[["clawbackSuccess",e.void()],["clawbackMalformed",e.void()],["clawbackNotClawbackEnabled",e.void()],["clawbackNoTrust",e.void()],["clawbackUnderfunded",e.void()]],arms:{}}),e.enum("ClawbackClaimableBalanceResultCode",{clawbackClaimableBalanceSuccess:0,clawbackClaimableBalanceDoesNotExist:-1,clawbackClaimableBalanceNotIssuer:-2,clawbackClaimableBalanceNotClawbackEnabled:-3}),e.union("ClawbackClaimableBalanceResult",{switchOn:e.lookup("ClawbackClaimableBalanceResultCode"),switchName:"code",switches:[["clawbackClaimableBalanceSuccess",e.void()],["clawbackClaimableBalanceDoesNotExist",e.void()],["clawbackClaimableBalanceNotIssuer",e.void()],["clawbackClaimableBalanceNotClawbackEnabled",e.void()]],arms:{}}),e.enum("SetTrustLineFlagsResultCode",{setTrustLineFlagsSuccess:0,setTrustLineFlagsMalformed:-1,setTrustLineFlagsNoTrustLine:-2,setTrustLineFlagsCantRevoke:-3,setTrustLineFlagsInvalidState:-4,setTrustLineFlagsLowReserve:-5}),e.union("SetTrustLineFlagsResult",{switchOn:e.lookup("SetTrustLineFlagsResultCode"),switchName:"code",switches:[["setTrustLineFlagsSuccess",e.void()],["setTrustLineFlagsMalformed",e.void()],["setTrustLineFlagsNoTrustLine",e.void()],["setTrustLineFlagsCantRevoke",e.void()],["setTrustLineFlagsInvalidState",e.void()],["setTrustLineFlagsLowReserve",e.void()]],arms:{}}),e.enum("LiquidityPoolDepositResultCode",{liquidityPoolDepositSuccess:0,liquidityPoolDepositMalformed:-1,liquidityPoolDepositNoTrust:-2,liquidityPoolDepositNotAuthorized:-3,liquidityPoolDepositUnderfunded:-4,liquidityPoolDepositLineFull:-5,liquidityPoolDepositBadPrice:-6,liquidityPoolDepositPoolFull:-7}),e.union("LiquidityPoolDepositResult",{switchOn:e.lookup("LiquidityPoolDepositResultCode"),switchName:"code",switches:[["liquidityPoolDepositSuccess",e.void()],["liquidityPoolDepositMalformed",e.void()],["liquidityPoolDepositNoTrust",e.void()],["liquidityPoolDepositNotAuthorized",e.void()],["liquidityPoolDepositUnderfunded",e.void()],["liquidityPoolDepositLineFull",e.void()],["liquidityPoolDepositBadPrice",e.void()],["liquidityPoolDepositPoolFull",e.void()]],arms:{}}),e.enum("LiquidityPoolWithdrawResultCode",{liquidityPoolWithdrawSuccess:0,liquidityPoolWithdrawMalformed:-1,liquidityPoolWithdrawNoTrust:-2,liquidityPoolWithdrawUnderfunded:-3,liquidityPoolWithdrawLineFull:-4,liquidityPoolWithdrawUnderMinimum:-5}),e.union("LiquidityPoolWithdrawResult",{switchOn:e.lookup("LiquidityPoolWithdrawResultCode"),switchName:"code",switches:[["liquidityPoolWithdrawSuccess",e.void()],["liquidityPoolWithdrawMalformed",e.void()],["liquidityPoolWithdrawNoTrust",e.void()],["liquidityPoolWithdrawUnderfunded",e.void()],["liquidityPoolWithdrawLineFull",e.void()],["liquidityPoolWithdrawUnderMinimum",e.void()]],arms:{}}),e.enum("InvokeHostFunctionResultCode",{invokeHostFunctionSuccess:0,invokeHostFunctionMalformed:-1,invokeHostFunctionTrapped:-2,invokeHostFunctionResourceLimitExceeded:-3,invokeHostFunctionEntryArchived:-4,invokeHostFunctionInsufficientRefundableFee:-5}),e.union("InvokeHostFunctionResult",{switchOn:e.lookup("InvokeHostFunctionResultCode"),switchName:"code",switches:[["invokeHostFunctionSuccess","success"],["invokeHostFunctionMalformed",e.void()],["invokeHostFunctionTrapped",e.void()],["invokeHostFunctionResourceLimitExceeded",e.void()],["invokeHostFunctionEntryArchived",e.void()],["invokeHostFunctionInsufficientRefundableFee",e.void()]],arms:{success:e.lookup("Hash")}}),e.enum("ExtendFootprintTtlResultCode",{extendFootprintTtlSuccess:0,extendFootprintTtlMalformed:-1,extendFootprintTtlResourceLimitExceeded:-2,extendFootprintTtlInsufficientRefundableFee:-3}),e.union("ExtendFootprintTtlResult",{switchOn:e.lookup("ExtendFootprintTtlResultCode"),switchName:"code",switches:[["extendFootprintTtlSuccess",e.void()],["extendFootprintTtlMalformed",e.void()],["extendFootprintTtlResourceLimitExceeded",e.void()],["extendFootprintTtlInsufficientRefundableFee",e.void()]],arms:{}}),e.enum("RestoreFootprintResultCode",{restoreFootprintSuccess:0,restoreFootprintMalformed:-1,restoreFootprintResourceLimitExceeded:-2,restoreFootprintInsufficientRefundableFee:-3}),e.union("RestoreFootprintResult",{switchOn:e.lookup("RestoreFootprintResultCode"),switchName:"code",switches:[["restoreFootprintSuccess",e.void()],["restoreFootprintMalformed",e.void()],["restoreFootprintResourceLimitExceeded",e.void()],["restoreFootprintInsufficientRefundableFee",e.void()]],arms:{}}),e.enum("OperationResultCode",{opInner:0,opBadAuth:-1,opNoAccount:-2,opNotSupported:-3,opTooManySubentries:-4,opExceededWorkLimit:-5,opTooManySponsoring:-6}),e.union("OperationResultTr",{switchOn:e.lookup("OperationType"),switchName:"type",switches:[["createAccount","createAccountResult"],["payment","paymentResult"],["pathPaymentStrictReceive","pathPaymentStrictReceiveResult"],["manageSellOffer","manageSellOfferResult"],["createPassiveSellOffer","createPassiveSellOfferResult"],["setOptions","setOptionsResult"],["changeTrust","changeTrustResult"],["allowTrust","allowTrustResult"],["accountMerge","accountMergeResult"],["inflation","inflationResult"],["manageData","manageDataResult"],["bumpSequence","bumpSeqResult"],["manageBuyOffer","manageBuyOfferResult"],["pathPaymentStrictSend","pathPaymentStrictSendResult"],["createClaimableBalance","createClaimableBalanceResult"],["claimClaimableBalance","claimClaimableBalanceResult"],["beginSponsoringFutureReserves","beginSponsoringFutureReservesResult"],["endSponsoringFutureReserves","endSponsoringFutureReservesResult"],["revokeSponsorship","revokeSponsorshipResult"],["clawback","clawbackResult"],["clawbackClaimableBalance","clawbackClaimableBalanceResult"],["setTrustLineFlags","setTrustLineFlagsResult"],["liquidityPoolDeposit","liquidityPoolDepositResult"],["liquidityPoolWithdraw","liquidityPoolWithdrawResult"],["invokeHostFunction","invokeHostFunctionResult"],["extendFootprintTtl","extendFootprintTtlResult"],["restoreFootprint","restoreFootprintResult"]],arms:{createAccountResult:e.lookup("CreateAccountResult"),paymentResult:e.lookup("PaymentResult"),pathPaymentStrictReceiveResult:e.lookup("PathPaymentStrictReceiveResult"),manageSellOfferResult:e.lookup("ManageSellOfferResult"),createPassiveSellOfferResult:e.lookup("ManageSellOfferResult"),setOptionsResult:e.lookup("SetOptionsResult"),changeTrustResult:e.lookup("ChangeTrustResult"),allowTrustResult:e.lookup("AllowTrustResult"),accountMergeResult:e.lookup("AccountMergeResult"),inflationResult:e.lookup("InflationResult"),manageDataResult:e.lookup("ManageDataResult"),bumpSeqResult:e.lookup("BumpSequenceResult"),manageBuyOfferResult:e.lookup("ManageBuyOfferResult"),pathPaymentStrictSendResult:e.lookup("PathPaymentStrictSendResult"),createClaimableBalanceResult:e.lookup("CreateClaimableBalanceResult"),claimClaimableBalanceResult:e.lookup("ClaimClaimableBalanceResult"),beginSponsoringFutureReservesResult:e.lookup("BeginSponsoringFutureReservesResult"),endSponsoringFutureReservesResult:e.lookup("EndSponsoringFutureReservesResult"),revokeSponsorshipResult:e.lookup("RevokeSponsorshipResult"),clawbackResult:e.lookup("ClawbackResult"),clawbackClaimableBalanceResult:e.lookup("ClawbackClaimableBalanceResult"),setTrustLineFlagsResult:e.lookup("SetTrustLineFlagsResult"),liquidityPoolDepositResult:e.lookup("LiquidityPoolDepositResult"),liquidityPoolWithdrawResult:e.lookup("LiquidityPoolWithdrawResult"),invokeHostFunctionResult:e.lookup("InvokeHostFunctionResult"),extendFootprintTtlResult:e.lookup("ExtendFootprintTtlResult"),restoreFootprintResult:e.lookup("RestoreFootprintResult")}}),e.union("OperationResult",{switchOn:e.lookup("OperationResultCode"),switchName:"code",switches:[["opInner","tr"],["opBadAuth",e.void()],["opNoAccount",e.void()],["opNotSupported",e.void()],["opTooManySubentries",e.void()],["opExceededWorkLimit",e.void()],["opTooManySponsoring",e.void()]],arms:{tr:e.lookup("OperationResultTr")}}),e.enum("TransactionResultCode",{txFeeBumpInnerSuccess:1,txSuccess:0,txFailed:-1,txTooEarly:-2,txTooLate:-3,txMissingOperation:-4,txBadSeq:-5,txBadAuth:-6,txInsufficientBalance:-7,txNoAccount:-8,txInsufficientFee:-9,txBadAuthExtra:-10,txInternalError:-11,txNotSupported:-12,txFeeBumpInnerFailed:-13,txBadSponsorship:-14,txBadMinSeqAgeOrGap:-15,txMalformed:-16,txSorobanInvalid:-17}),e.union("InnerTransactionResultResult",{switchOn:e.lookup("TransactionResultCode"),switchName:"code",switches:[["txSuccess","results"],["txFailed","results"],["txTooEarly",e.void()],["txTooLate",e.void()],["txMissingOperation",e.void()],["txBadSeq",e.void()],["txBadAuth",e.void()],["txInsufficientBalance",e.void()],["txNoAccount",e.void()],["txInsufficientFee",e.void()],["txBadAuthExtra",e.void()],["txInternalError",e.void()],["txNotSupported",e.void()],["txBadSponsorship",e.void()],["txBadMinSeqAgeOrGap",e.void()],["txMalformed",e.void()],["txSorobanInvalid",e.void()]],arms:{results:e.varArray(e.lookup("OperationResult"),2147483647)}}),e.union("InnerTransactionResultExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("InnerTransactionResult",[["feeCharged",e.lookup("Int64")],["result",e.lookup("InnerTransactionResultResult")],["ext",e.lookup("InnerTransactionResultExt")]]),e.struct("InnerTransactionResultPair",[["transactionHash",e.lookup("Hash")],["result",e.lookup("InnerTransactionResult")]]),e.union("TransactionResultResult",{switchOn:e.lookup("TransactionResultCode"),switchName:"code",switches:[["txFeeBumpInnerSuccess","innerResultPair"],["txFeeBumpInnerFailed","innerResultPair"],["txSuccess","results"],["txFailed","results"],["txTooEarly",e.void()],["txTooLate",e.void()],["txMissingOperation",e.void()],["txBadSeq",e.void()],["txBadAuth",e.void()],["txInsufficientBalance",e.void()],["txNoAccount",e.void()],["txInsufficientFee",e.void()],["txBadAuthExtra",e.void()],["txInternalError",e.void()],["txNotSupported",e.void()],["txBadSponsorship",e.void()],["txBadMinSeqAgeOrGap",e.void()],["txMalformed",e.void()],["txSorobanInvalid",e.void()]],arms:{innerResultPair:e.lookup("InnerTransactionResultPair"),results:e.varArray(e.lookup("OperationResult"),2147483647)}}),e.union("TransactionResultExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TransactionResult",[["feeCharged",e.lookup("Int64")],["result",e.lookup("TransactionResultResult")],["ext",e.lookup("TransactionResultExt")]]),e.typedef("Hash",e.opaque(32)),e.typedef("Uint256",e.opaque(32)),e.typedef("Uint32",e.uint()),e.typedef("Int32",e.int()),e.typedef("Uint64",e.uhyper()),e.typedef("Int64",e.hyper()),e.typedef("TimePoint",e.lookup("Uint64")),e.typedef("Duration",e.lookup("Uint64")),e.union("ExtensionPoint",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.enum("CryptoKeyType",{keyTypeEd25519:0,keyTypePreAuthTx:1,keyTypeHashX:2,keyTypeEd25519SignedPayload:3,keyTypeMuxedEd25519:256}),e.enum("PublicKeyType",{publicKeyTypeEd25519:0}),e.enum("SignerKeyType",{signerKeyTypeEd25519:0,signerKeyTypePreAuthTx:1,signerKeyTypeHashX:2,signerKeyTypeEd25519SignedPayload:3}),e.union("PublicKey",{switchOn:e.lookup("PublicKeyType"),switchName:"type",switches:[["publicKeyTypeEd25519","ed25519"]],arms:{ed25519:e.lookup("Uint256")}}),e.struct("SignerKeyEd25519SignedPayload",[["ed25519",e.lookup("Uint256")],["payload",e.varOpaque(64)]]),e.union("SignerKey",{switchOn:e.lookup("SignerKeyType"),switchName:"type",switches:[["signerKeyTypeEd25519","ed25519"],["signerKeyTypePreAuthTx","preAuthTx"],["signerKeyTypeHashX","hashX"],["signerKeyTypeEd25519SignedPayload","ed25519SignedPayload"]],arms:{ed25519:e.lookup("Uint256"),preAuthTx:e.lookup("Uint256"),hashX:e.lookup("Uint256"),ed25519SignedPayload:e.lookup("SignerKeyEd25519SignedPayload")}}),e.typedef("Signature",e.varOpaque(64)),e.typedef("SignatureHint",e.opaque(4)),e.typedef("NodeId",e.lookup("PublicKey")),e.typedef("AccountId",e.lookup("PublicKey")),e.struct("Curve25519Secret",[["key",e.opaque(32)]]),e.struct("Curve25519Public",[["key",e.opaque(32)]]),e.struct("HmacSha256Key",[["key",e.opaque(32)]]),e.struct("HmacSha256Mac",[["mac",e.opaque(32)]]),e.enum("ScValType",{scvBool:0,scvVoid:1,scvError:2,scvU32:3,scvI32:4,scvU64:5,scvI64:6,scvTimepoint:7,scvDuration:8,scvU128:9,scvI128:10,scvU256:11,scvI256:12,scvBytes:13,scvString:14,scvSymbol:15,scvVec:16,scvMap:17,scvAddress:18,scvContractInstance:19,scvLedgerKeyContractInstance:20,scvLedgerKeyNonce:21}),e.enum("ScErrorType",{sceContract:0,sceWasmVm:1,sceContext:2,sceStorage:3,sceObject:4,sceCrypto:5,sceEvents:6,sceBudget:7,sceValue:8,sceAuth:9}),e.enum("ScErrorCode",{scecArithDomain:0,scecIndexBounds:1,scecInvalidInput:2,scecMissingValue:3,scecExistingValue:4,scecExceededLimit:5,scecInvalidAction:6,scecInternalError:7,scecUnexpectedType:8,scecUnexpectedSize:9}),e.union("ScError",{switchOn:e.lookup("ScErrorType"),switchName:"type",switches:[["sceContract","contractCode"],["sceWasmVm","code"],["sceContext","code"],["sceStorage","code"],["sceObject","code"],["sceCrypto","code"],["sceEvents","code"],["sceBudget","code"],["sceValue","code"],["sceAuth","code"]],arms:{contractCode:e.lookup("Uint32"),code:e.lookup("ScErrorCode")}}),e.struct("UInt128Parts",[["hi",e.lookup("Uint64")],["lo",e.lookup("Uint64")]]),e.struct("Int128Parts",[["hi",e.lookup("Int64")],["lo",e.lookup("Uint64")]]),e.struct("UInt256Parts",[["hiHi",e.lookup("Uint64")],["hiLo",e.lookup("Uint64")],["loHi",e.lookup("Uint64")],["loLo",e.lookup("Uint64")]]),e.struct("Int256Parts",[["hiHi",e.lookup("Int64")],["hiLo",e.lookup("Uint64")],["loHi",e.lookup("Uint64")],["loLo",e.lookup("Uint64")]]),e.enum("ContractExecutableType",{contractExecutableWasm:0,contractExecutableStellarAsset:1}),e.union("ContractExecutable",{switchOn:e.lookup("ContractExecutableType"),switchName:"type",switches:[["contractExecutableWasm","wasmHash"],["contractExecutableStellarAsset",e.void()]],arms:{wasmHash:e.lookup("Hash")}}),e.enum("ScAddressType",{scAddressTypeAccount:0,scAddressTypeContract:1}),e.union("ScAddress",{switchOn:e.lookup("ScAddressType"),switchName:"type",switches:[["scAddressTypeAccount","accountId"],["scAddressTypeContract","contractId"]],arms:{accountId:e.lookup("AccountId"),contractId:e.lookup("Hash")}}),e.const("SCSYMBOL_LIMIT",32),e.typedef("ScVec",e.varArray(e.lookup("ScVal"),2147483647)),e.typedef("ScMap",e.varArray(e.lookup("ScMapEntry"),2147483647)),e.typedef("ScBytes",e.varOpaque()),e.typedef("ScString",e.string()),e.typedef("ScSymbol",e.string(32)),e.struct("ScNonceKey",[["nonce",e.lookup("Int64")]]),e.struct("ScContractInstance",[["executable",e.lookup("ContractExecutable")],["storage",e.option(e.lookup("ScMap"))]]),e.union("ScVal",{switchOn:e.lookup("ScValType"),switchName:"type",switches:[["scvBool","b"],["scvVoid",e.void()],["scvError","error"],["scvU32","u32"],["scvI32","i32"],["scvU64","u64"],["scvI64","i64"],["scvTimepoint","timepoint"],["scvDuration","duration"],["scvU128","u128"],["scvI128","i128"],["scvU256","u256"],["scvI256","i256"],["scvBytes","bytes"],["scvString","str"],["scvSymbol","sym"],["scvVec","vec"],["scvMap","map"],["scvAddress","address"],["scvLedgerKeyContractInstance",e.void()],["scvLedgerKeyNonce","nonceKey"],["scvContractInstance","instance"]],arms:{b:e.bool(),error:e.lookup("ScError"),u32:e.lookup("Uint32"),i32:e.lookup("Int32"),u64:e.lookup("Uint64"),i64:e.lookup("Int64"),timepoint:e.lookup("TimePoint"),duration:e.lookup("Duration"),u128:e.lookup("UInt128Parts"),i128:e.lookup("Int128Parts"),u256:e.lookup("UInt256Parts"),i256:e.lookup("Int256Parts"),bytes:e.lookup("ScBytes"),str:e.lookup("ScString"),sym:e.lookup("ScSymbol"),vec:e.option(e.lookup("ScVec")),map:e.option(e.lookup("ScMap")),address:e.lookup("ScAddress"),nonceKey:e.lookup("ScNonceKey"),instance:e.lookup("ScContractInstance")}}),e.struct("ScMapEntry",[["key",e.lookup("ScVal")],["val",e.lookup("ScVal")]]),e.enum("ScEnvMetaKind",{scEnvMetaKindInterfaceVersion:0}),e.union("ScEnvMetaEntry",{switchOn:e.lookup("ScEnvMetaKind"),switchName:"kind",switches:[["scEnvMetaKindInterfaceVersion","interfaceVersion"]],arms:{interfaceVersion:e.lookup("Uint64")}}),e.struct("ScMetaV0",[["key",e.string()],["val",e.string()]]),e.enum("ScMetaKind",{scMetaV0:0}),e.union("ScMetaEntry",{switchOn:e.lookup("ScMetaKind"),switchName:"kind",switches:[["scMetaV0","v0"]],arms:{v0:e.lookup("ScMetaV0")}}),e.const("SC_SPEC_DOC_LIMIT",1024),e.enum("ScSpecType",{scSpecTypeVal:0,scSpecTypeBool:1,scSpecTypeVoid:2,scSpecTypeError:3,scSpecTypeU32:4,scSpecTypeI32:5,scSpecTypeU64:6,scSpecTypeI64:7,scSpecTypeTimepoint:8,scSpecTypeDuration:9,scSpecTypeU128:10,scSpecTypeI128:11,scSpecTypeU256:12,scSpecTypeI256:13,scSpecTypeBytes:14,scSpecTypeString:16,scSpecTypeSymbol:17,scSpecTypeAddress:19,scSpecTypeOption:1e3,scSpecTypeResult:1001,scSpecTypeVec:1002,scSpecTypeMap:1004,scSpecTypeTuple:1005,scSpecTypeBytesN:1006,scSpecTypeUdt:2e3}),e.struct("ScSpecTypeOption",[["valueType",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecTypeResult",[["okType",e.lookup("ScSpecTypeDef")],["errorType",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecTypeVec",[["elementType",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecTypeMap",[["keyType",e.lookup("ScSpecTypeDef")],["valueType",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecTypeTuple",[["valueTypes",e.varArray(e.lookup("ScSpecTypeDef"),12)]]),e.struct("ScSpecTypeBytesN",[["n",e.lookup("Uint32")]]),e.struct("ScSpecTypeUdt",[["name",e.string(60)]]),e.union("ScSpecTypeDef",{switchOn:e.lookup("ScSpecType"),switchName:"type",switches:[["scSpecTypeVal",e.void()],["scSpecTypeBool",e.void()],["scSpecTypeVoid",e.void()],["scSpecTypeError",e.void()],["scSpecTypeU32",e.void()],["scSpecTypeI32",e.void()],["scSpecTypeU64",e.void()],["scSpecTypeI64",e.void()],["scSpecTypeTimepoint",e.void()],["scSpecTypeDuration",e.void()],["scSpecTypeU128",e.void()],["scSpecTypeI128",e.void()],["scSpecTypeU256",e.void()],["scSpecTypeI256",e.void()],["scSpecTypeBytes",e.void()],["scSpecTypeString",e.void()],["scSpecTypeSymbol",e.void()],["scSpecTypeAddress",e.void()],["scSpecTypeOption","option"],["scSpecTypeResult","result"],["scSpecTypeVec","vec"],["scSpecTypeMap","map"],["scSpecTypeTuple","tuple"],["scSpecTypeBytesN","bytesN"],["scSpecTypeUdt","udt"]],arms:{option:e.lookup("ScSpecTypeOption"),result:e.lookup("ScSpecTypeResult"),vec:e.lookup("ScSpecTypeVec"),map:e.lookup("ScSpecTypeMap"),tuple:e.lookup("ScSpecTypeTuple"),bytesN:e.lookup("ScSpecTypeBytesN"),udt:e.lookup("ScSpecTypeUdt")}}),e.struct("ScSpecUdtStructFieldV0",[["doc",e.string(t)],["name",e.string(30)],["type",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecUdtStructV0",[["doc",e.string(t)],["lib",e.string(80)],["name",e.string(60)],["fields",e.varArray(e.lookup("ScSpecUdtStructFieldV0"),40)]]),e.struct("ScSpecUdtUnionCaseVoidV0",[["doc",e.string(t)],["name",e.string(60)]]),e.struct("ScSpecUdtUnionCaseTupleV0",[["doc",e.string(t)],["name",e.string(60)],["type",e.varArray(e.lookup("ScSpecTypeDef"),12)]]),e.enum("ScSpecUdtUnionCaseV0Kind",{scSpecUdtUnionCaseVoidV0:0,scSpecUdtUnionCaseTupleV0:1}),e.union("ScSpecUdtUnionCaseV0",{switchOn:e.lookup("ScSpecUdtUnionCaseV0Kind"),switchName:"kind",switches:[["scSpecUdtUnionCaseVoidV0","voidCase"],["scSpecUdtUnionCaseTupleV0","tupleCase"]],arms:{voidCase:e.lookup("ScSpecUdtUnionCaseVoidV0"),tupleCase:e.lookup("ScSpecUdtUnionCaseTupleV0")}}),e.struct("ScSpecUdtUnionV0",[["doc",e.string(t)],["lib",e.string(80)],["name",e.string(60)],["cases",e.varArray(e.lookup("ScSpecUdtUnionCaseV0"),50)]]),e.struct("ScSpecUdtEnumCaseV0",[["doc",e.string(t)],["name",e.string(60)],["value",e.lookup("Uint32")]]),e.struct("ScSpecUdtEnumV0",[["doc",e.string(t)],["lib",e.string(80)],["name",e.string(60)],["cases",e.varArray(e.lookup("ScSpecUdtEnumCaseV0"),50)]]),e.struct("ScSpecUdtErrorEnumCaseV0",[["doc",e.string(t)],["name",e.string(60)],["value",e.lookup("Uint32")]]),e.struct("ScSpecUdtErrorEnumV0",[["doc",e.string(t)],["lib",e.string(80)],["name",e.string(60)],["cases",e.varArray(e.lookup("ScSpecUdtErrorEnumCaseV0"),50)]]),e.struct("ScSpecFunctionInputV0",[["doc",e.string(t)],["name",e.string(30)],["type",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecFunctionV0",[["doc",e.string(t)],["name",e.lookup("ScSymbol")],["inputs",e.varArray(e.lookup("ScSpecFunctionInputV0"),10)],["outputs",e.varArray(e.lookup("ScSpecTypeDef"),1)]]),e.enum("ScSpecEntryKind",{scSpecEntryFunctionV0:0,scSpecEntryUdtStructV0:1,scSpecEntryUdtUnionV0:2,scSpecEntryUdtEnumV0:3,scSpecEntryUdtErrorEnumV0:4}),e.union("ScSpecEntry",{switchOn:e.lookup("ScSpecEntryKind"),switchName:"kind",switches:[["scSpecEntryFunctionV0","functionV0"],["scSpecEntryUdtStructV0","udtStructV0"],["scSpecEntryUdtUnionV0","udtUnionV0"],["scSpecEntryUdtEnumV0","udtEnumV0"],["scSpecEntryUdtErrorEnumV0","udtErrorEnumV0"]],arms:{functionV0:e.lookup("ScSpecFunctionV0"),udtStructV0:e.lookup("ScSpecUdtStructV0"),udtUnionV0:e.lookup("ScSpecUdtUnionV0"),udtEnumV0:e.lookup("ScSpecUdtEnumV0"),udtErrorEnumV0:e.lookup("ScSpecUdtErrorEnumV0")}}),e.struct("ConfigSettingContractExecutionLanesV0",[["ledgerMaxTxCount",e.lookup("Uint32")]]),e.struct("ConfigSettingContractComputeV0",[["ledgerMaxInstructions",e.lookup("Int64")],["txMaxInstructions",e.lookup("Int64")],["feeRatePerInstructionsIncrement",e.lookup("Int64")],["txMemoryLimit",e.lookup("Uint32")]]),e.struct("ConfigSettingContractLedgerCostV0",[["ledgerMaxReadLedgerEntries",e.lookup("Uint32")],["ledgerMaxReadBytes",e.lookup("Uint32")],["ledgerMaxWriteLedgerEntries",e.lookup("Uint32")],["ledgerMaxWriteBytes",e.lookup("Uint32")],["txMaxReadLedgerEntries",e.lookup("Uint32")],["txMaxReadBytes",e.lookup("Uint32")],["txMaxWriteLedgerEntries",e.lookup("Uint32")],["txMaxWriteBytes",e.lookup("Uint32")],["feeReadLedgerEntry",e.lookup("Int64")],["feeWriteLedgerEntry",e.lookup("Int64")],["feeRead1Kb",e.lookup("Int64")],["bucketListTargetSizeBytes",e.lookup("Int64")],["writeFee1KbBucketListLow",e.lookup("Int64")],["writeFee1KbBucketListHigh",e.lookup("Int64")],["bucketListWriteFeeGrowthFactor",e.lookup("Uint32")]]),e.struct("ConfigSettingContractHistoricalDataV0",[["feeHistorical1Kb",e.lookup("Int64")]]),e.struct("ConfigSettingContractEventsV0",[["txMaxContractEventsSizeBytes",e.lookup("Uint32")],["feeContractEvents1Kb",e.lookup("Int64")]]),e.struct("ConfigSettingContractBandwidthV0",[["ledgerMaxTxsSizeBytes",e.lookup("Uint32")],["txMaxSizeBytes",e.lookup("Uint32")],["feeTxSize1Kb",e.lookup("Int64")]]),e.enum("ContractCostType",{wasmInsnExec:0,memAlloc:1,memCpy:2,memCmp:3,dispatchHostFunction:4,visitObject:5,valSer:6,valDeser:7,computeSha256Hash:8,computeEd25519PubKey:9,verifyEd25519Sig:10,vmInstantiation:11,vmCachedInstantiation:12,invokeVmFunction:13,computeKeccak256Hash:14,decodeEcdsaCurve256Sig:15,recoverEcdsaSecp256k1Key:16,int256AddSub:17,int256Mul:18,int256Div:19,int256Pow:20,int256Shift:21,chaCha20DrawBytes:22,parseWasmInstructions:23,parseWasmFunctions:24,parseWasmGlobals:25,parseWasmTableEntries:26,parseWasmTypes:27,parseWasmDataSegments:28,parseWasmElemSegments:29,parseWasmImports:30,parseWasmExports:31,parseWasmDataSegmentBytes:32,instantiateWasmInstructions:33,instantiateWasmFunctions:34,instantiateWasmGlobals:35,instantiateWasmTableEntries:36,instantiateWasmTypes:37,instantiateWasmDataSegments:38,instantiateWasmElemSegments:39,instantiateWasmImports:40,instantiateWasmExports:41,instantiateWasmDataSegmentBytes:42,sec1DecodePointUncompressed:43,verifyEcdsaSecp256r1Sig:44}),e.struct("ContractCostParamEntry",[["ext",e.lookup("ExtensionPoint")],["constTerm",e.lookup("Int64")],["linearTerm",e.lookup("Int64")]]),e.struct("StateArchivalSettings",[["maxEntryTtl",e.lookup("Uint32")],["minTemporaryTtl",e.lookup("Uint32")],["minPersistentTtl",e.lookup("Uint32")],["persistentRentRateDenominator",e.lookup("Int64")],["tempRentRateDenominator",e.lookup("Int64")],["maxEntriesToArchive",e.lookup("Uint32")],["bucketListSizeWindowSampleSize",e.lookup("Uint32")],["bucketListWindowSamplePeriod",e.lookup("Uint32")],["evictionScanSize",e.lookup("Uint32")],["startingEvictionScanLevel",e.lookup("Uint32")]]),e.struct("EvictionIterator",[["bucketListLevel",e.lookup("Uint32")],["isCurrBucket",e.bool()],["bucketFileOffset",e.lookup("Uint64")]]),e.const("CONTRACT_COST_COUNT_LIMIT",1024),e.typedef("ContractCostParams",e.varArray(e.lookup("ContractCostParamEntry"),e.lookup("CONTRACT_COST_COUNT_LIMIT"))),e.enum("ConfigSettingId",{configSettingContractMaxSizeBytes:0,configSettingContractComputeV0:1,configSettingContractLedgerCostV0:2,configSettingContractHistoricalDataV0:3,configSettingContractEventsV0:4,configSettingContractBandwidthV0:5,configSettingContractCostParamsCpuInstructions:6,configSettingContractCostParamsMemoryBytes:7,configSettingContractDataKeySizeBytes:8,configSettingContractDataEntrySizeBytes:9,configSettingStateArchival:10,configSettingContractExecutionLanes:11,configSettingBucketlistSizeWindow:12,configSettingEvictionIterator:13}),e.union("ConfigSettingEntry",{switchOn:e.lookup("ConfigSettingId"),switchName:"configSettingId",switches:[["configSettingContractMaxSizeBytes","contractMaxSizeBytes"],["configSettingContractComputeV0","contractCompute"],["configSettingContractLedgerCostV0","contractLedgerCost"],["configSettingContractHistoricalDataV0","contractHistoricalData"],["configSettingContractEventsV0","contractEvents"],["configSettingContractBandwidthV0","contractBandwidth"],["configSettingContractCostParamsCpuInstructions","contractCostParamsCpuInsns"],["configSettingContractCostParamsMemoryBytes","contractCostParamsMemBytes"],["configSettingContractDataKeySizeBytes","contractDataKeySizeBytes"],["configSettingContractDataEntrySizeBytes","contractDataEntrySizeBytes"],["configSettingStateArchival","stateArchivalSettings"],["configSettingContractExecutionLanes","contractExecutionLanes"],["configSettingBucketlistSizeWindow","bucketListSizeWindow"],["configSettingEvictionIterator","evictionIterator"]],arms:{contractMaxSizeBytes:e.lookup("Uint32"),contractCompute:e.lookup("ConfigSettingContractComputeV0"),contractLedgerCost:e.lookup("ConfigSettingContractLedgerCostV0"),contractHistoricalData:e.lookup("ConfigSettingContractHistoricalDataV0"),contractEvents:e.lookup("ConfigSettingContractEventsV0"),contractBandwidth:e.lookup("ConfigSettingContractBandwidthV0"),contractCostParamsCpuInsns:e.lookup("ContractCostParams"),contractCostParamsMemBytes:e.lookup("ContractCostParams"),contractDataKeySizeBytes:e.lookup("Uint32"),contractDataEntrySizeBytes:e.lookup("Uint32"),stateArchivalSettings:e.lookup("StateArchivalSettings"),contractExecutionLanes:e.lookup("ConfigSettingContractExecutionLanesV0"),bucketListSizeWindow:e.varArray(e.lookup("Uint64"),2147483647),evictionIterator:e.lookup("EvictionIterator")}})}));const i=o;var a=r(2802);function s(e){var t=new a.sha256;return t.update(e,"utf8"),t.digest()}var u=r(3626).A,c={},l="undefined"==typeof window?function(){var e;try{e=r(Object(function(){var e=new Error("Cannot find module 'sodium-native'");throw e.code="MODULE_NOT_FOUND",e}()))}catch(e){return h()}return Object.keys(e).length?(c.generate=function(t){var r=u.alloc(e.crypto_sign_PUBLICKEYBYTES),n=u.alloc(e.crypto_sign_SECRETKEYBYTES);return e.crypto_sign_seed_keypair(r,n,t),r},c.sign=function(t,r){t=u.from(t);var n=u.alloc(e.crypto_sign_BYTES);return e.crypto_sign_detached(n,t,r),n},c.verify=function(t,r,n){t=u.from(t);try{return e.crypto_sign_verify_detached(r,t,n)}catch(e){return!1}},!0):h()}():h();function f(e,t){return c.sign(e,t)}function p(e,t,r){return c.verify(e,t,r)}function h(){var e=r(8947);return c.generate=function(t){var r=new Uint8Array(t),n=e.sign.keyPair.fromSeed(r);return u.from(n.publicKey)},c.sign=function(t,r){t=u.from(t),t=new Uint8Array(t.toJSON().data),r=new Uint8Array(r.toJSON().data);var n=e.sign.detached(t,r);return u.from(n)},c.verify=function(t,r,n){return t=u.from(t),t=new Uint8Array(t.toJSON().data),r=new Uint8Array(r.toJSON().data),n=new Uint8Array(n.toJSON().data),e.sign.detached.verify(t,r,n)},!1}var y=function(e,t){for(var r="number"==typeof e,n=String(e);n.endsWith(t);)n=n.slice(0,-1);return r?Number(n):n},d=r(8947),m=r.n(d),g=r(5360);var v=r(3626).A;function b(e){return b="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},b(e)}function w(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,S(n.key),n)}}function S(e){var t=function(e,t){if("object"!=b(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==b(t)?t:t+""}var k={ed25519PublicKey:48,ed25519SecretSeed:144,med25519PublicKey:96,preAuthTx:152,sha256Hash:184,signedPayload:120,contract:16},E={G:"ed25519PublicKey",S:"ed25519SecretSeed",M:"med25519PublicKey",T:"preAuthTx",X:"sha256Hash",P:"signedPayload",C:"contract"},A=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},r=[{key:"encodeEd25519PublicKey",value:function(e){return P("ed25519PublicKey",e)}},{key:"decodeEd25519PublicKey",value:function(e){return O("ed25519PublicKey",e)}},{key:"isValidEd25519PublicKey",value:function(e){return T("ed25519PublicKey",e)}},{key:"encodeEd25519SecretSeed",value:function(e){return P("ed25519SecretSeed",e)}},{key:"decodeEd25519SecretSeed",value:function(e){return O("ed25519SecretSeed",e)}},{key:"isValidEd25519SecretSeed",value:function(e){return T("ed25519SecretSeed",e)}},{key:"encodeMed25519PublicKey",value:function(e){return P("med25519PublicKey",e)}},{key:"decodeMed25519PublicKey",value:function(e){return O("med25519PublicKey",e)}},{key:"isValidMed25519PublicKey",value:function(e){return T("med25519PublicKey",e)}},{key:"encodePreAuthTx",value:function(e){return P("preAuthTx",e)}},{key:"decodePreAuthTx",value:function(e){return O("preAuthTx",e)}},{key:"encodeSha256Hash",value:function(e){return P("sha256Hash",e)}},{key:"decodeSha256Hash",value:function(e){return O("sha256Hash",e)}},{key:"encodeSignedPayload",value:function(e){return P("signedPayload",e)}},{key:"decodeSignedPayload",value:function(e){return O("signedPayload",e)}},{key:"isValidSignedPayload",value:function(e){return T("signedPayload",e)}},{key:"encodeContract",value:function(e){return P("contract",e)}},{key:"decodeContract",value:function(e){return O("contract",e)}},{key:"isValidContract",value:function(e){return T("contract",e)}},{key:"getVersionByteForPrefix",value:function(e){return E[e[0]]}}],(t=null)&&w(e.prototype,t),r&&w(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function T(e,t){if("string"!=typeof t)return!1;switch(e){case"ed25519PublicKey":case"ed25519SecretSeed":case"preAuthTx":case"sha256Hash":case"contract":if(56!==t.length)return!1;break;case"med25519PublicKey":if(69!==t.length)return!1;break;case"signedPayload":if(t.length<56||t.length>165)return!1;break;default:return!1}var r="";try{r=O(e,t)}catch(e){return!1}switch(e){case"ed25519PublicKey":case"ed25519SecretSeed":case"preAuthTx":case"sha256Hash":case"contract":return 32===r.length;case"med25519PublicKey":return 40===r.length;case"signedPayload":return r.length>=40&&r.length<=100;default:return!1}}function O(e,t){if("string"!=typeof t)throw new TypeError("encoded argument must be of type String");var r=g.decode(t),n=r[0],o=r.slice(0,-2),i=o.slice(1),a=r.slice(-2);if(t!==g.encode(r))throw new Error("invalid encoded string");var s=k[e];if(void 0===s)throw new Error("".concat(e," is not a valid version byte name. ")+"Expected one of ".concat(Object.keys(k).join(", ")));if(n!==s)throw new Error("invalid version byte. expected ".concat(s,", got ").concat(n));if(!function(e,t){if(e.length!==t.length)return!1;if(0===e.length)return!0;for(var r=0;r<e.length;r+=1)if(e[r]!==t[r])return!1;return!0}(x(o),a))throw new Error("invalid checksum");return v.from(i)}function P(e,t){if(null==t)throw new Error("cannot encode null data");var r=k[e];if(void 0===r)throw new Error("".concat(e," is not a valid version byte name. ")+"Expected one of ".concat(Object.keys(k).join(", ")));t=v.from(t);var n=v.from([r]),o=v.concat([n,t]),i=x(o),a=v.concat([o,i]);return g.encode(a)}function x(e){for(var t=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920],r=0,n=0;n<e.length;n+=1){r=r<<8^t[r>>8^e[n]],r&=65535}var o=new Uint8Array(2);return o[0]=255&r,o[1]=r>>8&255,o}var I=r(3626).A;function _(e){return _="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)}function B(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,R(n.key),n)}}function R(e){var t=function(e,t){if("object"!=_(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==_(t)?t:t+""}var C=function(){return e=function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"ed25519"!==t.type)throw new Error("Invalid keys type");if(this.type=t.type,t.secretKey){if(t.secretKey=I.from(t.secretKey),32!==t.secretKey.length)throw new Error("secretKey length is invalid");if(this._secretSeed=t.secretKey,this._publicKey=(r=t.secretKey,c.generate(r)),this._secretKey=I.concat([t.secretKey,this._publicKey]),t.publicKey&&!this._publicKey.equals(I.from(t.publicKey)))throw new Error("secretKey does not match publicKey")}else if(this._publicKey=I.from(t.publicKey),32!==this._publicKey.length)throw new Error("publicKey length is invalid");var r},r=[{key:"fromSecret",value:function(e){var t=A.decodeEd25519SecretSeed(e);return this.fromRawEd25519Seed(t)}},{key:"fromRawEd25519Seed",value:function(e){return new this({type:"ed25519",secretKey:e})}},{key:"master",value:function(e){if(!e)throw new Error("No network selected. Please pass a network argument, e.g. `Keypair.master(Networks.PUBLIC)`.");return this.fromRawEd25519Seed(s(e))}},{key:"fromPublicKey",value:function(e){if(32!==(e=A.decodeEd25519PublicKey(e)).length)throw new Error("Invalid Stellar public key");return new this({type:"ed25519",publicKey:e})}},{key:"random",value:function(){var e=m().randomBytes(32);return this.fromRawEd25519Seed(e)}}],(t=[{key:"xdrAccountId",value:function(){return new i.AccountId.publicKeyTypeEd25519(this._publicKey)}},{key:"xdrPublicKey",value:function(){return new i.PublicKey.publicKeyTypeEd25519(this._publicKey)}},{key:"xdrMuxedAccount",value:function(e){if(void 0!==e){if("string"!=typeof e)throw new TypeError("expected string for ID, got ".concat(_(e)));return i.MuxedAccount.keyTypeMuxedEd25519(new i.MuxedAccountMed25519({id:i.Uint64.fromString(e),ed25519:this._publicKey}))}return new i.MuxedAccount.keyTypeEd25519(this._publicKey)}},{key:"rawPublicKey",value:function(){return this._publicKey}},{key:"signatureHint",value:function(){var e=this.xdrAccountId().toXDR();return e.slice(e.length-4)}},{key:"publicKey",value:function(){return A.encodeEd25519PublicKey(this._publicKey)}},{key:"secret",value:function(){if(!this._secretSeed)throw new Error("no secret key available");if("ed25519"===this.type)return A.encodeEd25519SecretSeed(this._secretSeed);throw new Error("Invalid Keypair type")}},{key:"rawSecretKey",value:function(){return this._secretSeed}},{key:"canSign",value:function(){return!!this._secretKey}},{key:"sign",value:function(e){if(!this.canSign())throw new Error("cannot sign: no secret key available");return f(e,this._secretKey)}},{key:"verify",value:function(e,t){return p(e,t,this._publicKey)}},{key:"signDecorated",value:function(e){var t=this.sign(e),r=this.signatureHint();return new i.DecoratedSignature({hint:r,signature:t})}},{key:"signPayloadDecorated",value:function(e){var t=this.sign(e),r=this.signatureHint(),n=I.from(e.slice(-4));return n.length<4&&(n=I.concat([n,I.alloc(4-e.length,0)])),new i.DecoratedSignature({hint:n.map((function(e,t){return e^r[t]})),signature:t})}}])&&B(e.prototype,t),r&&B(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}(),U=r(3626).A;function N(e){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N(e)}function L(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,j(n.key),n)}}function j(e){var t=function(e,t){if("object"!=N(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=N(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==N(t)?t:t+""}var M=function(){function e(t,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!/^[a-zA-Z0-9]{1,12}$/.test(t))throw new Error("Asset code is invalid (maximum alphanumeric, 12 characters at max)");if("xlm"!==String(t).toLowerCase()&&!r)throw new Error("Issuer cannot be null");if(r&&!A.isValidEd25519PublicKey(r))throw new Error("Issuer is invalid");"xlm"===String(t).toLowerCase()?this.code="XLM":this.code=t,this.issuer=r}return t=e,r=[{key:"toXDRObject",value:function(){return this._toXDRObject(i.Asset)}},{key:"toChangeTrustXDRObject",value:function(){return this._toXDRObject(i.ChangeTrustAsset)}},{key:"toTrustLineXDRObject",value:function(){return this._toXDRObject(i.TrustLineAsset)}},{key:"contractId",value:function(e){var t=s(U.from(e)),r=i.HashIdPreimage.envelopeTypeContractId(new i.HashIdPreimageContractId({networkId:t,contractIdPreimage:i.ContractIdPreimage.contractIdPreimageFromAsset(this.toXDRObject())}));return A.encodeContract(s(r.toXDR()))}},{key:"_toXDRObject",value:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.Asset;if(this.isNative())return r.assetTypeNative();this.code.length<=4?(e=i.AlphaNum4,t="assetTypeCreditAlphanum4"):(e=i.AlphaNum12,t="assetTypeCreditAlphanum12");var n=this.code.length<=4?4:12;return new r(t,new e({assetCode:this.code.padEnd(n,"\0"),issuer:C.fromPublicKey(this.issuer).xdrAccountId()}))}},{key:"getCode",value:function(){if(void 0!==this.code)return String(this.code)}},{key:"getIssuer",value:function(){if(void 0!==this.issuer)return String(this.issuer)}},{key:"getAssetType",value:function(){switch(this.getRawAssetType()){case i.AssetType.assetTypeNative():return"native";case i.AssetType.assetTypeCreditAlphanum4():return"credit_alphanum4";case i.AssetType.assetTypeCreditAlphanum12():return"credit_alphanum12";default:return"unknown"}}},{key:"getRawAssetType",value:function(){return this.isNative()?i.AssetType.assetTypeNative():this.code.length<=4?i.AssetType.assetTypeCreditAlphanum4():i.AssetType.assetTypeCreditAlphanum12()}},{key:"isNative",value:function(){return!this.issuer}},{key:"equals",value:function(e){return this.code===e.getCode()&&this.issuer===e.getIssuer()}},{key:"toString",value:function(){return this.isNative()?"native":"".concat(this.getCode(),":").concat(this.getIssuer())}}],n=[{key:"native",value:function(){return new e("XLM")}},{key:"fromOperation",value:function(e){var t,r;switch(e.switch()){case i.AssetType.assetTypeNative():return this.native();case i.AssetType.assetTypeCreditAlphanum4():t=e.alphaNum4();case i.AssetType.assetTypeCreditAlphanum12():return t=t||e.alphaNum12(),r=A.encodeEd25519PublicKey(t.issuer().ed25519()),new this(y(t.assetCode(),"\0"),r);default:throw new Error("Invalid asset type: ".concat(e.switch().name))}}},{key:"compare",value:function(t,r){if(!(t&&t instanceof e))throw new Error("assetA is invalid");if(!(r&&r instanceof e))throw new Error("assetB is invalid");if(t.equals(r))return 0;var n=t.getRawAssetType().value,o=r.getRawAssetType().value;if(n!==o)return n<o?-1:1;var i=F(t.getCode(),r.getCode());return 0!==i?i:F(t.getIssuer(),r.getIssuer())}}],r&&L(t.prototype,r),n&&L(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}();function F(e,t){return U.compare(U.from(e,"ascii"),U.from(t,"ascii"))}var D=r(3626).A,V=30;function q(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("constant_product"!==e)throw new Error("liquidityPoolType is invalid");var r=t.assetA,n=t.assetB,o=t.fee;if(!(r&&r instanceof M))throw new Error("assetA is invalid");if(!(n&&n instanceof M))throw new Error("assetB is invalid");if(!o||o!==V)throw new Error("fee is invalid");if(-1!==M.compare(r,n))throw new Error("Assets are not in lexicographic order");var a=i.LiquidityPoolType.liquidityPoolConstantProduct().toXDR(),u=new i.LiquidityPoolConstantProductParameters({assetA:r.toXDRObject(),assetB:n.toXDRObject(),fee:o}).toXDR();return s(D.concat([a,u]))}var K=r(3626).A;function H(e){return H="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},H(e)}function z(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,X(n.key),n)}}function X(e){var t=function(e,t){if("object"!=H(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=H(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==H(t)?t:t+""}var $=function(){return e=function e(t,r,n,o){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"string"!=typeof o)throw new Error("Invalid passphrase provided to Transaction: expected a string but got a ".concat(H(o)));this._networkPassphrase=o,this._tx=t,this._signatures=r,this._fee=n},t=[{key:"signatures",get:function(){return this._signatures},set:function(e){throw new Error("Transaction is immutable")}},{key:"tx",get:function(){return this._tx},set:function(e){throw new Error("Transaction is immutable")}},{key:"fee",get:function(){return this._fee},set:function(e){throw new Error("Transaction is immutable")}},{key:"networkPassphrase",get:function(){return this._networkPassphrase},set:function(e){this._networkPassphrase=e}},{key:"sign",value:function(){for(var e=this,t=this.hash(),r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];n.forEach((function(r){var n=r.signDecorated(t);e.signatures.push(n)}))}},{key:"getKeypairSignature",value:function(e){return e.sign(this.hash()).toString("base64")}},{key:"addSignature",value:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!n||"string"!=typeof n)throw new Error("Invalid signature");if(!r||"string"!=typeof r)throw new Error("Invalid publicKey");var o=K.from(n,"base64");try{t=(e=C.fromPublicKey(r)).signatureHint()}catch(e){throw new Error("Invalid publicKey")}if(!e.verify(this.hash(),o))throw new Error("Invalid signature");this.signatures.push(new i.DecoratedSignature({hint:t,signature:o}))}},{key:"addDecoratedSignature",value:function(e){this.signatures.push(e)}},{key:"signHashX",value:function(e){if("string"==typeof e&&(e=K.from(e,"hex")),e.length>64)throw new Error("preimage cannnot be longer than 64 bytes");var t=e,r=s(e),n=r.slice(r.length-4);this.signatures.push(new i.DecoratedSignature({hint:n,signature:t}))}},{key:"hash",value:function(){return s(this.signatureBase())}},{key:"signatureBase",value:function(){throw new Error("Implement in subclass")}},{key:"toEnvelope",value:function(){throw new Error("Implement in subclass")}},{key:"toXDR",value:function(){return this.toEnvelope().toXDR().toString("base64")}}],t&&z(e.prototype,t),r&&z(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}(),W=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,G=Math.ceil,Y=Math.floor,J="[BigNumber Error] ",Z=J+"Number primitive has more than 15 significant digits: ",Q=1e14,ee=14,te=9007199254740991,re=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],ne=1e7,oe=1e9;function ie(e){var t=0|e;return e>0||e===t?t:t-1}function ae(e){for(var t,r,n=1,o=e.length,i=e[0]+"";n<o;){for(t=e[n++]+"",r=ee-t.length;r--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function se(e,t){var r,n,o=e.c,i=t.c,a=e.s,s=t.s,u=e.e,c=t.e;if(!a||!s)return null;if(r=o&&!o[0],n=i&&!i[0],r||n)return r?n?0:-s:a;if(a!=s)return a;if(r=a<0,n=u==c,!o||!i)return n?0:!o^r?1:-1;if(!n)return u>c^r?1:-1;for(s=(u=o.length)<(c=i.length)?u:c,a=0;a<s;a++)if(o[a]!=i[a])return o[a]>i[a]^r?1:-1;return u==c?0:u>c^r?1:-1}function ue(e,t,r,n){if(e<t||e>r||e!==Y(e))throw Error(J+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function ce(e){var t=e.c.length-1;return ie(e.e/ee)==t&&e.c[t]%2!=0}function le(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function fe(e,t,r){var n,o;if(t<0){for(o=r+".";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var pe=function e(t){var r,n,o,i,a,s,u,c,l,f,p=O.prototype={constructor:O,toString:null,valueOf:null},h=new O(1),y=20,d=4,m=-7,g=21,v=-1e7,b=1e7,w=!1,S=1,k=0,E={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xa0",suffix:""},A="0123456789abcdefghijklmnopqrstuvwxyz",T=!0;function O(e,t){var r,i,a,s,u,c,l,f,p=this;if(!(p instanceof O))return new O(e,t);if(null==t){if(e&&!0===e._isBigNumber)return p.s=e.s,void(!e.c||e.e>b?p.c=p.e=null:e.e<v?p.c=[p.e=0]:(p.e=e.e,p.c=e.c.slice()));if((c="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,u=e;u>=10;u/=10,s++);return void(s>b?p.c=p.e=null:(p.e=s,p.c=[e]))}f=String(e)}else{if(!W.test(f=String(e)))return o(p,f,c);p.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(s=f.indexOf("."))>-1&&(f=f.replace(".","")),(u=f.search(/e/i))>0?(s<0&&(s=u),s+=+f.slice(u+1),f=f.substring(0,u)):s<0&&(s=f.length)}else{if(ue(t,2,A.length,"Base"),10==t&&T)return _(p=new O(e),y+p.e+1,d);if(f=String(e),c="number"==typeof e){if(0*e!=0)return o(p,f,c,t);if(p.s=1/e<0?(f=f.slice(1),-1):1,O.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(Z+e)}else p.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(r=A.slice(0,t),s=u=0,l=f.length;u<l;u++)if(r.indexOf(i=f.charAt(u))<0){if("."==i){if(u>s){s=l;continue}}else if(!a&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){a=!0,u=-1,s=0;continue}return o(p,String(e),c,t)}c=!1,(s=(f=n(f,t,10,p.s)).indexOf("."))>-1?f=f.replace(".",""):s=f.length}for(u=0;48===f.charCodeAt(u);u++);for(l=f.length;48===f.charCodeAt(--l););if(f=f.slice(u,++l)){if(l-=u,c&&O.DEBUG&&l>15&&(e>te||e!==Y(e)))throw Error(Z+p.s*e);if((s=s-u-1)>b)p.c=p.e=null;else if(s<v)p.c=[p.e=0];else{if(p.e=s,p.c=[],u=(s+1)%ee,s<0&&(u+=ee),u<l){for(u&&p.c.push(+f.slice(0,u)),l-=ee;u<l;)p.c.push(+f.slice(u,u+=ee));u=ee-(f=f.slice(u)).length}else u-=l;for(;u--;f+="0");p.c.push(+f)}}else p.c=[p.e=0]}function P(e,t,r,n){var o,i,a,s,u;if(null==r?r=d:ue(r,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)u=ae(e.c),u=1==n||2==n&&(a<=m||a>=g)?le(u,a):fe(u,a,"0");else if(i=(e=_(new O(e),t,r)).e,s=(u=ae(e.c)).length,1==n||2==n&&(t<=i||i<=m)){for(;s<t;u+="0",s++);u=le(u,i)}else if(t-=a,u=fe(u,i,"0"),i+1>s){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=i-s)>0)for(i+1==s&&(u+=".");t--;u+="0");return e.s<0&&o?"-"+u:u}function x(e,t){for(var r,n,o=1,i=new O(e[0]);o<e.length;o++)(!(n=new O(e[o])).s||(r=se(i,n))===t||0===r&&i.s===t)&&(i=n);return i}function I(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,n++);return(r=n+r*ee-1)>b?e.c=e.e=null:r<v?e.c=[e.e=0]:(e.e=r,e.c=t),e}function _(e,t,r,n){var o,i,a,s,u,c,l,f=e.c,p=re;if(f){e:{for(o=1,s=f[0];s>=10;s/=10,o++);if((i=t-o)<0)i+=ee,a=t,u=f[c=0],l=Y(u/p[o-a-1]%10);else if((c=G((i+1)/ee))>=f.length){if(!n)break e;for(;f.length<=c;f.push(0));u=l=0,o=1,a=(i%=ee)-ee+1}else{for(u=s=f[c],o=1;s>=10;s/=10,o++);l=(a=(i%=ee)-ee+o)<0?0:Y(u/p[o-a-1]%10)}if(n=n||t<0||null!=f[c+1]||(a<0?u:u%p[o-a-1]),n=r<4?(l||n)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||n||6==r&&(i>0?a>0?u/p[o-a]:0:f[c-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,n?(t-=e.e+1,f[0]=p[(ee-t%ee)%ee],e.e=-t||0):f[0]=e.e=0,e;if(0==i?(f.length=c,s=1,c--):(f.length=c+1,s=p[ee-i],f[c]=a>0?Y(u/p[o-a]%p[a])*s:0),n)for(;;){if(0==c){for(i=1,a=f[0];a>=10;a/=10,i++);for(a=f[0]+=s,s=1;a>=10;a/=10,s++);i!=s&&(e.e++,f[0]==Q&&(f[0]=1));break}if(f[c]+=s,f[c]!=Q)break;f[c--]=0,s=1}for(i=f.length;0===f[--i];f.pop());}e.e>b?e.c=e.e=null:e.e<v&&(e.c=[e.e=0])}return e}function B(e){var t,r=e.e;return null===r?e.toString():(t=ae(e.c),t=r<=m||r>=g?le(t,r):fe(t,r,"0"),e.s<0?"-"+t:t)}return O.clone=e,O.ROUND_UP=0,O.ROUND_DOWN=1,O.ROUND_CEIL=2,O.ROUND_FLOOR=3,O.ROUND_HALF_UP=4,O.ROUND_HALF_DOWN=5,O.ROUND_HALF_EVEN=6,O.ROUND_HALF_CEIL=7,O.ROUND_HALF_FLOOR=8,O.EUCLID=9,O.config=O.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(J+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(ue(r=e[t],0,oe,t),y=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(ue(r=e[t],0,8,t),d=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(ue(r[0],-oe,0,t),ue(r[1],0,oe,t),m=r[0],g=r[1]):(ue(r,-oe,oe,t),m=-(g=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)ue(r[0],-oe,-1,t),ue(r[1],1,oe,t),v=r[0],b=r[1];else{if(ue(r,-oe,oe,t),!r)throw Error(J+t+" cannot be zero: "+r);v=-(b=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(J+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw w=!r,Error(J+"crypto unavailable");w=r}else w=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(ue(r=e[t],0,9,t),S=r),e.hasOwnProperty(t="POW_PRECISION")&&(ue(r=e[t],0,oe,t),k=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(J+t+" not an object: "+r);E=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(J+t+" invalid: "+r);T="0123456789"==r.slice(0,10),A=r}}return{DECIMAL_PLACES:y,ROUNDING_MODE:d,EXPONENTIAL_AT:[m,g],RANGE:[v,b],CRYPTO:w,MODULO_MODE:S,POW_PRECISION:k,FORMAT:E,ALPHABET:A}},O.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!O.DEBUG)return!0;var t,r,n=e.c,o=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===i||-1===i)&&o>=-oe&&o<=oe&&o===Y(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%ee)<1&&(t+=ee),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=Q||r!==Y(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===i||1===i||-1===i))return!0;throw Error(J+"Invalid BigNumber: "+e)},O.maximum=O.max=function(){return x(arguments,-1)},O.minimum=O.min=function(){return x(arguments,1)},O.random=(i=9007199254740992,a=Math.random()*i&2097151?function(){return Y(Math.random()*i)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,o,i,s=0,u=[],c=new O(h);if(null==e?e=y:ue(e,0,oe),o=G(e/ee),w)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));s<o;)(i=131072*t[s]+(t[s+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(u.push(i%1e14),s+=2);s=o/2}else{if(!crypto.randomBytes)throw w=!1,Error(J+"crypto unavailable");for(t=crypto.randomBytes(o*=7);s<o;)(i=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])>=9e15?crypto.randomBytes(7).copy(t,s):(u.push(i%1e14),s+=7);s=o/7}if(!w)for(;s<o;)(i=a())<9e15&&(u[s++]=i%1e14);for(o=u[--s],e%=ee,o&&e&&(i=re[ee-e],u[s]=Y(o/i)*i);0===u[s];u.pop(),s--);if(s<0)u=[n=0];else{for(n=-1;0===u[0];u.splice(0,1),n-=ee);for(s=1,i=u[0];i>=10;i/=10,s++);s<ee&&(n-=ee-s)}return c.e=n,c.c=u,c}),O.sum=function(){for(var e=1,t=arguments,r=new O(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){var e="0123456789";function t(e,t,r,n){for(var o,i,a=[0],s=0,u=e.length;s<u;){for(i=a.length;i--;a[i]*=t);for(a[0]+=n.indexOf(e.charAt(s++)),o=0;o<a.length;o++)a[o]>r-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/r|0,a[o]%=r)}return a.reverse()}return function(n,o,i,a,s){var u,c,l,f,p,h,m,g,v=n.indexOf("."),b=y,w=d;for(v>=0&&(f=k,k=0,n=n.replace(".",""),h=(g=new O(o)).pow(n.length-v),k=f,g.c=t(fe(ae(h.c),h.e,"0"),10,i,e),g.e=g.c.length),l=f=(m=t(n,o,i,s?(u=A,e):(u=e,A))).length;0==m[--f];m.pop());if(!m[0])return u.charAt(0);if(v<0?--l:(h.c=m,h.e=l,h.s=a,m=(h=r(h,g,b,w,i)).c,p=h.r,l=h.e),v=m[c=l+b+1],f=i/2,p=p||c<0||null!=m[c+1],p=w<4?(null!=v||p)&&(0==w||w==(h.s<0?3:2)):v>f||v==f&&(4==w||p||6==w&&1&m[c-1]||w==(h.s<0?8:7)),c<1||!m[0])n=p?fe(u.charAt(1),-b,u.charAt(0)):u.charAt(0);else{if(m.length=c,p)for(--i;++m[--c]>i;)m[c]=0,c||(++l,m=[1].concat(m));for(f=m.length;!m[--f];);for(v=0,n="";v<=f;n+=u.charAt(m[v++]));n=fe(n,l,u.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,o,i,a,s=0,u=e.length,c=t%ne,l=t/ne|0;for(e=e.slice();u--;)s=((o=c*(i=e[u]%ne)+(n=l*i+(a=e[u]/ne|0)*c)%ne*ne+s)/r|0)+(n/ne|0)+l*a,e[u]=o%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;o<r;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]<t[r]?1:0,e[r]=o*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,o,i,a,s){var u,c,l,f,p,h,y,d,m,g,v,b,w,S,k,E,A,T=n.s==o.s?1:-1,P=n.c,x=o.c;if(!(P&&P[0]&&x&&x[0]))return new O(n.s&&o.s&&(P?!x||P[0]!=x[0]:x)?P&&0==P[0]||!x?0*T:T/0:NaN);for(m=(d=new O(T)).c=[],T=i+(c=n.e-o.e)+1,s||(s=Q,c=ie(n.e/ee)-ie(o.e/ee),T=T/ee|0),l=0;x[l]==(P[l]||0);l++);if(x[l]>(P[l]||0)&&c--,T<0)m.push(1),f=!0;else{for(S=P.length,E=x.length,l=0,T+=2,(p=Y(s/(x[0]+1)))>1&&(x=e(x,p,s),P=e(P,p,s),E=x.length,S=P.length),w=E,v=(g=P.slice(0,E)).length;v<E;g[v++]=0);A=x.slice(),A=[0].concat(A),k=x[0],x[1]>=s/2&&k++;do{if(p=0,(u=t(x,g,E,v))<0){if(b=g[0],E!=v&&(b=b*s+(g[1]||0)),(p=Y(b/k))>1)for(p>=s&&(p=s-1),y=(h=e(x,p,s)).length,v=g.length;1==t(h,g,y,v);)p--,r(h,E<y?A:x,y,s),y=h.length,u=1;else 0==p&&(u=p=1),y=(h=x.slice()).length;if(y<v&&(h=[0].concat(h)),r(g,h,v,s),v=g.length,-1==u)for(;t(x,g,E,v)<1;)p++,r(g,E<v?A:x,v,s),v=g.length}else 0===u&&(p++,g=[0]);m[l++]=p,g[0]?g[v++]=P[w]||0:(g=[P[w]],v=1)}while((w++<S||null!=g[0])&&T--);f=null!=g[0],m[0]||m.splice(0,1)}if(s==Q){for(l=1,T=m[0];T>=10;T/=10,l++);_(d,i+(d.e=l+c*ee-1)+1,a,f)}else d.e=c,d.r=+f;return d}}(),s=/^(-?)0([xbo])(?=\w[\w.]*$)/i,u=/^([^.]+)\.$/,c=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,f=/^\s*\+(?=[\w.])|^\s+|\s+$/g,o=function(e,t,r,n){var o,i=r?t:t.replace(f,"");if(l.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(s,(function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t})),n&&(o=n,i=i.replace(u,"$1").replace(c,"0.$1")),t!=i))return new O(i,o);if(O.DEBUG)throw Error(J+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},p.absoluteValue=p.abs=function(){var e=new O(this);return e.s<0&&(e.s=1),e},p.comparedTo=function(e,t){return se(this,new O(e,t))},p.decimalPlaces=p.dp=function(e,t){var r,n,o,i=this;if(null!=e)return ue(e,0,oe),null==t?t=d:ue(t,0,8),_(new O(i),e+i.e+1,t);if(!(r=i.c))return null;if(n=((o=r.length-1)-ie(this.e/ee))*ee,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},p.dividedBy=p.div=function(e,t){return r(this,new O(e,t),y,d)},p.dividedToIntegerBy=p.idiv=function(e,t){return r(this,new O(e,t),0,1)},p.exponentiatedBy=p.pow=function(e,t){var r,n,o,i,a,s,u,c,l=this;if((e=new O(e)).c&&!e.isInteger())throw Error(J+"Exponent not an integer: "+B(e));if(null!=t&&(t=new O(t)),a=e.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!e.c||!e.c[0])return c=new O(Math.pow(+B(l),a?e.s*(2-ce(e)):+B(e))),t?c.mod(t):c;if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new O(NaN);(n=!s&&l.isInteger()&&t.isInteger())&&(l=l.mod(t))}else{if(e.e>9&&(l.e>0||l.e<-1||(0==l.e?l.c[0]>1||a&&l.c[1]>=24e7:l.c[0]<8e13||a&&l.c[0]<=9999975e7)))return i=l.s<0&&ce(e)?-0:0,l.e>-1&&(i=1/i),new O(s?1/i:i);k&&(i=G(k/ee+2))}for(a?(r=new O(.5),s&&(e.s=1),u=ce(e)):u=(o=Math.abs(+B(e)))%2,c=new O(h);;){if(u){if(!(c=c.times(l)).c)break;i?c.c.length>i&&(c.c.length=i):n&&(c=c.mod(t))}if(o){if(0===(o=Y(o/2)))break;u=o%2}else if(_(e=e.times(r),e.e+1,1),e.e>14)u=ce(e);else{if(0===(o=+B(e)))break;u=o%2}l=l.times(l),i?l.c&&l.c.length>i&&(l.c.length=i):n&&(l=l.mod(t))}return n?c:(s&&(c=h.div(c)),t?c.mod(t):i?_(c,k,d,undefined):c)},p.integerValue=function(e){var t=new O(this);return null==e?e=d:ue(e,0,8),_(t,t.e+1,e)},p.isEqualTo=p.eq=function(e,t){return 0===se(this,new O(e,t))},p.isFinite=function(){return!!this.c},p.isGreaterThan=p.gt=function(e,t){return se(this,new O(e,t))>0},p.isGreaterThanOrEqualTo=p.gte=function(e,t){return 1===(t=se(this,new O(e,t)))||0===t},p.isInteger=function(){return!!this.c&&ie(this.e/ee)>this.c.length-2},p.isLessThan=p.lt=function(e,t){return se(this,new O(e,t))<0},p.isLessThanOrEqualTo=p.lte=function(e,t){return-1===(t=se(this,new O(e,t)))||0===t},p.isNaN=function(){return!this.s},p.isNegative=function(){return this.s<0},p.isPositive=function(){return this.s>0},p.isZero=function(){return!!this.c&&0==this.c[0]},p.minus=function(e,t){var r,n,o,i,a=this,s=a.s;if(t=(e=new O(e,t)).s,!s||!t)return new O(NaN);if(s!=t)return e.s=-t,a.plus(e);var u=a.e/ee,c=e.e/ee,l=a.c,f=e.c;if(!u||!c){if(!l||!f)return l?(e.s=-t,e):new O(f?a:NaN);if(!l[0]||!f[0])return f[0]?(e.s=-t,e):new O(l[0]?a:3==d?-0:0)}if(u=ie(u),c=ie(c),l=l.slice(),s=u-c){for((i=s<0)?(s=-s,o=l):(c=u,o=f),o.reverse(),t=s;t--;o.push(0));o.reverse()}else for(n=(i=(s=l.length)<(t=f.length))?s:t,s=t=0;t<n;t++)if(l[t]!=f[t]){i=l[t]<f[t];break}if(i&&(o=l,l=f,f=o,e.s=-e.s),(t=(n=f.length)-(r=l.length))>0)for(;t--;l[r++]=0);for(t=Q-1;n>s;){if(l[--n]<f[n]){for(r=n;r&&!l[--r];l[r]=t);--l[r],l[n]+=Q}l[n]-=f[n]}for(;0==l[0];l.splice(0,1),--c);return l[0]?I(e,l,c):(e.s=3==d?-1:1,e.c=[e.e=0],e)},p.modulo=p.mod=function(e,t){var n,o,i=this;return e=new O(e,t),!i.c||!e.s||e.c&&!e.c[0]?new O(NaN):!e.c||i.c&&!i.c[0]?new O(i):(9==S?(o=e.s,e.s=1,n=r(i,e,0,3),e.s=o,n.s*=o):n=r(i,e,0,S),(e=i.minus(n.times(e))).c[0]||1!=S||(e.s=i.s),e)},p.multipliedBy=p.times=function(e,t){var r,n,o,i,a,s,u,c,l,f,p,h,y,d,m,g=this,v=g.c,b=(e=new O(e,t)).c;if(!(v&&b&&v[0]&&b[0]))return!g.s||!e.s||v&&!v[0]&&!b||b&&!b[0]&&!v?e.c=e.e=e.s=null:(e.s*=g.s,v&&b?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=ie(g.e/ee)+ie(e.e/ee),e.s*=g.s,(u=v.length)<(f=b.length)&&(y=v,v=b,b=y,o=u,u=f,f=o),o=u+f,y=[];o--;y.push(0));for(d=Q,m=ne,o=f;--o>=0;){for(r=0,p=b[o]%m,h=b[o]/m|0,i=o+(a=u);i>o;)r=((c=p*(c=v[--a]%m)+(s=h*c+(l=v[a]/m|0)*p)%m*m+y[i]+r)/d|0)+(s/m|0)+h*l,y[i--]=c%d;y[i]=r}return r?++n:y.splice(0,1),I(e,y,n)},p.negated=function(){var e=new O(this);return e.s=-e.s||null,e},p.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new O(e,t)).s,!o||!t)return new O(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/ee,a=e.e/ee,s=n.c,u=e.c;if(!i||!a){if(!s||!u)return new O(o/0);if(!s[0]||!u[0])return u[0]?e:new O(s[0]?n:0*o)}if(i=ie(i),a=ie(a),s=s.slice(),o=i-a){for(o>0?(a=i,r=u):(o=-o,r=s),r.reverse();o--;r.push(0));r.reverse()}for((o=s.length)-(t=u.length)<0&&(r=u,u=s,s=r,t=o),o=0;t;)o=(s[--t]=s[t]+u[t]+o)/Q|0,s[t]=Q===s[t]?0:s[t]%Q;return o&&(s=[o].concat(s),++a),I(e,s,a)},p.precision=p.sd=function(e,t){var r,n,o,i=this;if(null!=e&&e!==!!e)return ue(e,1,oe),null==t?t=d:ue(t,0,8),_(new O(i),e,t);if(!(r=i.c))return null;if(n=(o=r.length-1)*ee+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&i.e+1>n&&(n=i.e+1),n},p.shiftedBy=function(e){return ue(e,-9007199254740991,te),this.times("1e"+e)},p.squareRoot=p.sqrt=function(){var e,t,n,o,i,a=this,s=a.c,u=a.s,c=a.e,l=y+4,f=new O("0.5");if(1!==u||!s||!s[0])return new O(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(u=Math.sqrt(+B(a)))||u==1/0?(((t=ae(s)).length+c)%2==0&&(t+="0"),u=Math.sqrt(+t),c=ie((c+1)/2)-(c<0||c%2),n=new O(t=u==1/0?"5e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new O(u+""),n.c[0])for((u=(c=n.e)+l)<3&&(u=0);;)if(i=n,n=f.times(i.plus(r(a,i,l,1))),ae(i.c).slice(0,u)===(t=ae(n.c)).slice(0,u)){if(n.e<c&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(o||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(_(n,n.e+y+2,1),e=!n.times(n).eq(a));break}if(!o&&(_(i,i.e+y+2,0),i.times(i).eq(a))){n=i;break}l+=4,u+=4,o=1}return _(n,n.e+y+1,d,e)},p.toExponential=function(e,t){return null!=e&&(ue(e,0,oe),e++),P(this,e,t,1)},p.toFixed=function(e,t){return null!=e&&(ue(e,0,oe),e=e+this.e+1),P(this,e,t)},p.toFormat=function(e,t,r){var n,o=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=E;else if("object"!=typeof r)throw Error(J+"Argument not an object: "+r);if(n=o.toFixed(e,t),o.c){var i,a=n.split("."),s=+r.groupSize,u=+r.secondaryGroupSize,c=r.groupSeparator||"",l=a[0],f=a[1],p=o.s<0,h=p?l.slice(1):l,y=h.length;if(u&&(i=s,s=u,u=i,y-=i),s>0&&y>0){for(i=y%s||s,l=h.substr(0,i);i<y;i+=s)l+=c+h.substr(i,s);u>0&&(l+=c+h.slice(i)),p&&(l="-"+l)}n=f?l+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?f.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):f):l}return(r.prefix||"")+n+(r.suffix||"")},p.toFraction=function(e){var t,n,o,i,a,s,u,c,l,f,p,y,m=this,g=m.c;if(null!=e&&(!(u=new O(e)).isInteger()&&(u.c||1!==u.s)||u.lt(h)))throw Error(J+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+B(u));if(!g)return new O(m);for(t=new O(h),l=n=new O(h),o=c=new O(h),y=ae(g),a=t.e=y.length-m.e-1,t.c[0]=re[(s=a%ee)<0?ee+s:s],e=!e||u.comparedTo(t)>0?a>0?t:l:u,s=b,b=1/0,u=new O(y),c.c[0]=0;f=r(u,t,0,1),1!=(i=n.plus(f.times(o))).comparedTo(e);)n=o,o=i,l=c.plus(f.times(i=l)),c=i,t=u.minus(f.times(i=t)),u=i;return i=r(e.minus(n),o,0,1),c=c.plus(i.times(l)),n=n.plus(i.times(o)),c.s=l.s=m.s,p=r(l,o,a*=2,d).minus(m).abs().comparedTo(r(c,n,a,d).minus(m).abs())<1?[l,o]:[c,n],b=s,p},p.toNumber=function(){return+B(this)},p.toPrecision=function(e,t){return null!=e&&ue(e,1,oe),P(this,e,t,2)},p.toString=function(e){var t,r=this,o=r.s,i=r.e;return null===i?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(null==e?t=i<=m||i>=g?le(ae(r.c),i):fe(ae(r.c),i,"0"):10===e&&T?t=fe(ae((r=_(new O(r),y+i+1,d)).c),r.e,"0"):(ue(e,2,A.length,"Base"),t=n(fe(ae(r.c),i,"0"),10,e,o,!0)),o<0&&r.c[0]&&(t="-"+t)),t},p.valueOf=p.toJSON=function(){return B(this)},p._isBigNumber=!0,p[Symbol.toStringTag]="BigNumber",p[Symbol.for("nodejs.util.inspect.custom")]=p.valueOf,null!=t&&O.set(t),O}();var he=pe.clone();he.DEBUG=!0;const ye=he;function de(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return me(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return me(e,t)}(e,t)||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.")}()}function me(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ge=2147483647;function ve(e){return ve="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},ve(e)}function be(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function we(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?be(Object(r),!0).forEach((function(t){Se(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Se(e,t,r){return(t=Ee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ke(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ee(n.key),n)}}function Ee(e){var t=function(e,t){if("object"!=ve(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=ve(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ve(t)?t:t+""}var Ae=function(){return e=function e(t,r,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!(t&&t instanceof M))throw new Error("assetA is invalid");if(!(r&&r instanceof M))throw new Error("assetB is invalid");if(-1!==M.compare(t,r))throw new Error("Assets are not in lexicographic order");if(!n||n!==V)throw new Error("fee is invalid");this.assetA=t,this.assetB=r,this.fee=n},r=[{key:"fromOperation",value:function(e){var t=e.switch();if(t===i.AssetType.assetTypePoolShare()){var r=e.liquidityPool().constantProduct();return new this(M.fromOperation(r.assetA()),M.fromOperation(r.assetB()),r.fee())}throw new Error("Invalid asset type: ".concat(t.name))}}],(t=[{key:"toXDRObject",value:function(){var e=new i.LiquidityPoolConstantProductParameters({assetA:this.assetA.toXDRObject(),assetB:this.assetB.toXDRObject(),fee:this.fee}),t=new i.LiquidityPoolParameters("liquidityPoolConstantProduct",e);return new i.ChangeTrustAsset("assetTypePoolShare",t)}},{key:"getLiquidityPoolParameters",value:function(){return we(we({},this),{},{assetA:this.assetA,assetB:this.assetB,fee:this.fee})}},{key:"getAssetType",value:function(){return"liquidity_pool_shares"}},{key:"equals",value:function(e){return this.assetA.equals(e.assetA)&&this.assetB.equals(e.assetB)&&this.fee===e.fee}},{key:"toString",value:function(){var e=q("constant_product",this.getLiquidityPoolParameters()).toString("hex");return"liquidity_pool:".concat(e)}}])&&ke(e.prototype,t),r&&ke(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function Te(e){return Te="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},Te(e)}function Oe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Pe(n.key),n)}}function Pe(e){var t=function(e,t){if("object"!=Te(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Te(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Te(t)?t:t+""}var xe=function(){return e=function e(t,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&!A.isValidEd25519PublicKey(t))throw new Error("Destination is invalid");if(this._destination=t,r){if(!(r instanceof i.ClaimPredicate))throw new Error("Predicate should be an xdr.ClaimPredicate");this._predicate=r}else this._predicate=i.ClaimPredicate.claimPredicateUnconditional()},r=[{key:"predicateUnconditional",value:function(){return i.ClaimPredicate.claimPredicateUnconditional()}},{key:"predicateAnd",value:function(e,t){if(!(e instanceof i.ClaimPredicate))throw new Error("left Predicate should be an xdr.ClaimPredicate");if(!(t instanceof i.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return i.ClaimPredicate.claimPredicateAnd([e,t])}},{key:"predicateOr",value:function(e,t){if(!(e instanceof i.ClaimPredicate))throw new Error("left Predicate should be an xdr.ClaimPredicate");if(!(t instanceof i.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return i.ClaimPredicate.claimPredicateOr([e,t])}},{key:"predicateNot",value:function(e){if(!(e instanceof i.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return i.ClaimPredicate.claimPredicateNot(e)}},{key:"predicateBeforeAbsoluteTime",value:function(e){return i.ClaimPredicate.claimPredicateBeforeAbsoluteTime(i.Int64.fromString(e))}},{key:"predicateBeforeRelativeTime",value:function(e){return i.ClaimPredicate.claimPredicateBeforeRelativeTime(i.Int64.fromString(e))}},{key:"fromXDR",value:function(e){var t;if(e.switch()===i.ClaimantType.claimantTypeV0())return t=e.v0(),new this(A.encodeEd25519PublicKey(t.destination().ed25519()),t.predicate());throw new Error("Invalid claimant type: ".concat(e.switch().name))}}],(t=[{key:"toXDRObject",value:function(){var e=new i.ClaimantV0({destination:C.fromPublicKey(this._destination).xdrAccountId(),predicate:this._predicate});return i.Claimant.claimantTypeV0(e)}},{key:"destination",get:function(){return this._destination},set:function(e){throw new Error("Claimant is immutable")}},{key:"predicate",get:function(){return this._predicate},set:function(e){throw new Error("Claimant is immutable")}}])&&Oe(e.prototype,t),r&&Oe(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function Ie(e){return Ie="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},Ie(e)}function _e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Be(n.key),n)}}function Be(e){var t=function(e,t){if("object"!=Ie(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Ie(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ie(t)?t:t+""}var Re=function(){return e=function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new Error("liquidityPoolId cannot be empty");if(!/^[a-f0-9]{64}$/.test(t))throw new Error("Liquidity pool ID is not a valid hash");this.liquidityPoolId=t},r=[{key:"fromOperation",value:function(e){var t=e.switch();if(t===i.AssetType.assetTypePoolShare())return new this(e.liquidityPoolId().toString("hex"));throw new Error("Invalid asset type: ".concat(t.name))}}],(t=[{key:"toXDRObject",value:function(){var e=i.PoolId.fromXDR(this.liquidityPoolId,"hex");return new i.TrustLineAsset("assetTypePoolShare",e)}},{key:"getLiquidityPoolId",value:function(){return String(this.liquidityPoolId)}},{key:"getAssetType",value:function(){return"liquidity_pool_shares"}},{key:"equals",value:function(e){return this.liquidityPoolId===e.getLiquidityPoolId()}},{key:"toString",value:function(){return"liquidity_pool:".concat(this.liquidityPoolId)}}])&&_e(e.prototype,t),r&&_e(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();var Ce=r(3626).A;function Ue(e){return A.isValidMed25519PublicKey(e)?function(e){var t=A.decodeMed25519PublicKey(e);return i.MuxedAccount.keyTypeMuxedEd25519(new i.MuxedAccountMed25519({id:i.Uint64.fromXDR(t.subarray(-8)),ed25519:t.subarray(0,-8)}))}(e):i.MuxedAccount.keyTypeEd25519(A.decodeEd25519PublicKey(e))}function Ne(e){return e.switch().value===i.CryptoKeyType.keyTypeMuxedEd25519().value?function(e){if(e.switch()===i.CryptoKeyType.keyTypeEd25519())return Ne(e);var t=e.med25519();return A.encodeMed25519PublicKey(Ce.concat([t.ed25519(),t.id().toXDR("raw")]))}(e):A.encodeEd25519PublicKey(e.ed25519())}function Le(e,t){if(!A.isValidEd25519PublicKey(e))throw new Error("address should be a Stellar account ID (G...)");if("string"!=typeof t)throw new Error("id should be a string representing a number (uint64)");return i.MuxedAccount.keyTypeMuxedEd25519(new i.MuxedAccountMed25519({id:i.Uint64.fromString(t),ed25519:A.decodeEd25519PublicKey(e)}))}function je(e){if(A.isValidEd25519PublicKey(e))return e;if(!A.isValidMed25519PublicKey(e))throw new TypeError("expected muxed account (M...), got ".concat(e));var t=Ue(e);return A.encodeEd25519PublicKey(t.med25519().ed25519())}function Me(e){if("string"!=typeof e||72!==e.length)throw new Error("must provide a valid claimable balance id")}var Fe=r(3626).A;var De=r(3626).A;function Ve(e,t){if(e>=0&&e<=255)return!0;throw new Error("".concat(t," value must be between 0 and 255"))}var qe=r(3626).A;function Ke(e){return Ke="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},Ke(e)}function He(e){return He="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},He(e)}function ze(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Xe(n.key),n)}}function Xe(e){var t=function(e,t){if("object"!=He(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=He(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==He(t)?t:t+""}var $e=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),A.isValidEd25519PublicKey(t))this._type="account",this._key=A.decodeEd25519PublicKey(t);else{if(!A.isValidContract(t))throw new Error("Unsupported address type");this._type="contract",this._key=A.decodeContract(t)}}return t=e,n=[{key:"fromString",value:function(t){return new e(t)}},{key:"account",value:function(t){return new e(A.encodeEd25519PublicKey(t))}},{key:"contract",value:function(t){return new e(A.encodeContract(t))}},{key:"fromScVal",value:function(t){return e.fromScAddress(t.address())}},{key:"fromScAddress",value:function(t){switch(t.switch()){case i.ScAddressType.scAddressTypeAccount():return e.account(t.accountId().ed25519());case i.ScAddressType.scAddressTypeContract():return e.contract(t.contractId());default:throw new Error("Unsupported address type")}}}],(r=[{key:"toString",value:function(){switch(this._type){case"account":return A.encodeEd25519PublicKey(this._key);case"contract":return A.encodeContract(this._key);default:throw new Error("Unsupported address type")}}},{key:"toScVal",value:function(){return i.ScVal.scvAddress(this.toScAddress())}},{key:"toScAddress",value:function(){switch(this._type){case"account":return i.ScAddress.scAddressTypeAccount(i.PublicKey.publicKeyTypeEd25519(this._key));case"contract":return i.ScAddress.scAddressTypeContract(this._key);default:throw new Error("Unsupported address type")}}},{key:"toBuffer",value:function(){return this._key}}])&&ze(t.prototype,r),n&&ze(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}(),We=r(3626).A;function Ge(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ye(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ye(e,t)}(e,t)||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.")}()}function Ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Je(e){return Je="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},Je(e)}function Ze(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Qe(n.key),n)}}function Qe(e){var t=function(e,t){if("object"!=Je(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Je(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Je(t)?t:t+""}var et=1e7,tt=1,rt=2,nt=4,ot=8,it=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},r=[{key:"setSourceAccount",value:function(e,t){if(t.source)try{e.sourceAccount=Ue(t.source)}catch(e){throw new Error("Source address is invalid")}}},{key:"fromXDRObject",value:function(e){var t={};e.sourceAccount()&&(t.source=Ne(e.sourceAccount()));var r=e.body().value(),n=e.body().switch().name;switch(n){case"createAccount":t.type="createAccount",t.destination=at(r.destination()),t.startingBalance=this._fromXDRAmount(r.startingBalance());break;case"payment":t.type="payment",t.destination=Ne(r.destination()),t.asset=M.fromOperation(r.asset()),t.amount=this._fromXDRAmount(r.amount());break;case"pathPaymentStrictReceive":t.type="pathPaymentStrictReceive",t.sendAsset=M.fromOperation(r.sendAsset()),t.sendMax=this._fromXDRAmount(r.sendMax()),t.destination=Ne(r.destination()),t.destAsset=M.fromOperation(r.destAsset()),t.destAmount=this._fromXDRAmount(r.destAmount()),t.path=[];var o=r.path();Object.keys(o).forEach((function(e){t.path.push(M.fromOperation(o[e]))}));break;case"pathPaymentStrictSend":t.type="pathPaymentStrictSend",t.sendAsset=M.fromOperation(r.sendAsset()),t.sendAmount=this._fromXDRAmount(r.sendAmount()),t.destination=Ne(r.destination()),t.destAsset=M.fromOperation(r.destAsset()),t.destMin=this._fromXDRAmount(r.destMin()),t.path=[];var a=r.path();Object.keys(a).forEach((function(e){t.path.push(M.fromOperation(a[e]))}));break;case"changeTrust":t.type="changeTrust",r.line().switch()===i.AssetType.assetTypePoolShare()?t.line=Ae.fromOperation(r.line()):t.line=M.fromOperation(r.line()),t.limit=this._fromXDRAmount(r.limit());break;case"allowTrust":t.type="allowTrust",t.trustor=at(r.trustor()),t.assetCode=r.asset().value().toString(),t.assetCode=y(t.assetCode,"\0"),t.authorize=r.authorize();break;case"setOptions":if(t.type="setOptions",r.inflationDest()&&(t.inflationDest=at(r.inflationDest())),t.clearFlags=r.clearFlags(),t.setFlags=r.setFlags(),t.masterWeight=r.masterWeight(),t.lowThreshold=r.lowThreshold(),t.medThreshold=r.medThreshold(),t.highThreshold=r.highThreshold(),t.homeDomain=void 0!==r.homeDomain()?r.homeDomain().toString("ascii"):void 0,r.signer()){var s={},u=r.signer().key().arm();if("ed25519"===u)s.ed25519PublicKey=at(r.signer().key());else if("preAuthTx"===u)s.preAuthTx=r.signer().key().preAuthTx();else if("hashX"===u)s.sha256Hash=r.signer().key().hashX();else if("ed25519SignedPayload"===u){var c=r.signer().key().ed25519SignedPayload();s.ed25519SignedPayload=A.encodeSignedPayload(c.toXDR())}s.weight=r.signer().weight(),t.signer=s}break;case"manageOffer":case"manageSellOffer":t.type="manageSellOffer",t.selling=M.fromOperation(r.selling()),t.buying=M.fromOperation(r.buying()),t.amount=this._fromXDRAmount(r.amount()),t.price=this._fromXDRPrice(r.price()),t.offerId=r.offerId().toString();break;case"manageBuyOffer":t.type="manageBuyOffer",t.selling=M.fromOperation(r.selling()),t.buying=M.fromOperation(r.buying()),t.buyAmount=this._fromXDRAmount(r.buyAmount()),t.price=this._fromXDRPrice(r.price()),t.offerId=r.offerId().toString();break;case"createPassiveOffer":case"createPassiveSellOffer":t.type="createPassiveSellOffer",t.selling=M.fromOperation(r.selling()),t.buying=M.fromOperation(r.buying()),t.amount=this._fromXDRAmount(r.amount()),t.price=this._fromXDRPrice(r.price());break;case"accountMerge":t.type="accountMerge",t.destination=Ne(r);break;case"manageData":t.type="manageData",t.name=r.dataName().toString("ascii"),t.value=r.dataValue();break;case"inflation":t.type="inflation";break;case"bumpSequence":t.type="bumpSequence",t.bumpTo=r.bumpTo().toString();break;case"createClaimableBalance":t.type="createClaimableBalance",t.asset=M.fromOperation(r.asset()),t.amount=this._fromXDRAmount(r.amount()),t.claimants=[],r.claimants().forEach((function(e){t.claimants.push(xe.fromXDR(e))}));break;case"claimClaimableBalance":t.type="claimClaimableBalance",t.balanceId=r.toXDR("hex");break;case"beginSponsoringFutureReserves":t.type="beginSponsoringFutureReserves",t.sponsoredId=at(r.sponsoredId());break;case"endSponsoringFutureReserves":t.type="endSponsoringFutureReserves";break;case"revokeSponsorship":!function(e,t){switch(e.switch().name){case"revokeSponsorshipLedgerEntry":var r=e.ledgerKey();switch(r.switch().name){case i.LedgerEntryType.account().name:t.type="revokeAccountSponsorship",t.account=at(r.account().accountId());break;case i.LedgerEntryType.trustline().name:t.type="revokeTrustlineSponsorship",t.account=at(r.trustLine().accountId());var n=r.trustLine().asset();n.switch()===i.AssetType.assetTypePoolShare()?t.asset=Re.fromOperation(n):t.asset=M.fromOperation(n);break;case i.LedgerEntryType.offer().name:t.type="revokeOfferSponsorship",t.seller=at(r.offer().sellerId()),t.offerId=r.offer().offerId().toString();break;case i.LedgerEntryType.data().name:t.type="revokeDataSponsorship",t.account=at(r.data().accountId()),t.name=r.data().dataName().toString("ascii");break;case i.LedgerEntryType.claimableBalance().name:t.type="revokeClaimableBalanceSponsorship",t.balanceId=r.claimableBalance().balanceId().toXDR("hex");break;case i.LedgerEntryType.liquidityPool().name:t.type="revokeLiquidityPoolSponsorship",t.liquidityPoolId=r.liquidityPool().liquidityPoolId().toString("hex");break;default:throw new Error("Unknown ledgerKey: ".concat(e.switch().name))}break;case"revokeSponsorshipSigner":t.type="revokeSignerSponsorship",t.account=at(e.signer().accountId()),t.signer=function(e){var t={};switch(e.switch().name){case i.SignerKeyType.signerKeyTypeEd25519().name:t.ed25519PublicKey=A.encodeEd25519PublicKey(e.ed25519());break;case i.SignerKeyType.signerKeyTypePreAuthTx().name:t.preAuthTx=e.preAuthTx().toString("hex");break;case i.SignerKeyType.signerKeyTypeHashX().name:t.sha256Hash=e.hashX().toString("hex");break;default:throw new Error("Unknown signerKey: ".concat(e.switch().name))}return t}(e.signer().signerKey());break;default:throw new Error("Unknown revokeSponsorship: ".concat(e.switch().name))}}(r,t);break;case"clawback":t.type="clawback",t.amount=this._fromXDRAmount(r.amount()),t.from=Ne(r.from()),t.asset=M.fromOperation(r.asset());break;case"clawbackClaimableBalance":t.type="clawbackClaimableBalance",t.balanceId=r.toXDR("hex");break;case"setTrustLineFlags":t.type="setTrustLineFlags",t.asset=M.fromOperation(r.asset()),t.trustor=at(r.trustor());var l=r.clearFlags(),f=r.setFlags(),p={authorized:i.TrustLineFlags.authorizedFlag(),authorizedToMaintainLiabilities:i.TrustLineFlags.authorizedToMaintainLiabilitiesFlag(),clawbackEnabled:i.TrustLineFlags.trustlineClawbackEnabledFlag()};t.flags={},Object.keys(p).forEach((function(e){var r;t.flags[e]=(r=p[e].value,!!(f&r)||!(l&r)&&void 0)}));break;case"liquidityPoolDeposit":t.type="liquidityPoolDeposit",t.liquidityPoolId=r.liquidityPoolId().toString("hex"),t.maxAmountA=this._fromXDRAmount(r.maxAmountA()),t.maxAmountB=this._fromXDRAmount(r.maxAmountB()),t.minPrice=this._fromXDRPrice(r.minPrice()),t.maxPrice=this._fromXDRPrice(r.maxPrice());break;case"liquidityPoolWithdraw":t.type="liquidityPoolWithdraw",t.liquidityPoolId=r.liquidityPoolId().toString("hex"),t.amount=this._fromXDRAmount(r.amount()),t.minAmountA=this._fromXDRAmount(r.minAmountA()),t.minAmountB=this._fromXDRAmount(r.minAmountB());break;case"invokeHostFunction":var h;t.type="invokeHostFunction",t.func=r.hostFunction(),t.auth=null!==(h=r.auth())&&void 0!==h?h:[];break;case"extendFootprintTtl":t.type="extendFootprintTtl",t.extendTo=r.extendTo();break;case"restoreFootprint":t.type="restoreFootprint";break;default:throw new Error("Unknown operation: ".concat(n))}return t}},{key:"isValidAmount",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"!=typeof e)return!1;try{t=new ye(e)}catch(e){return!1}return!(!r&&t.isZero()||t.isNegative()||t.times(et).gt(new ye("9223372036854775807").toString())||t.decimalPlaces()>7||t.isNaN()||!t.isFinite())}},{key:"constructAmountRequirementsError",value:function(e){return"".concat(e," argument must be of type String, represent a positive number and have at most 7 digits after the decimal")}},{key:"_checkUnsignedIntValue",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(void 0!==t)switch("string"==typeof t&&(t=parseFloat(t)),!0){case"number"!=typeof t||!Number.isFinite(t)||t%1!=0:throw new Error("".concat(e," value is invalid"));case t<0:throw new Error("".concat(e," value must be unsigned"));case!r||r&&r(t,e):return t;default:throw new Error("".concat(e," value is invalid"))}}},{key:"_toXDRAmount",value:function(e){var t=new ye(e).times(et);return n.Hyper.fromString(t.toString())}},{key:"_fromXDRAmount",value:function(e){return new ye(e).div(et).toFixed(7)}},{key:"_fromXDRPrice",value:function(e){return new ye(e.n()).div(new ye(e.d())).toString()}},{key:"_toXDRPrice",value:function(e){var t;if(e.n&&e.d)t=new i.Price(e);else{var r=function(e){for(var t,r,n=new ye(e),o=[[new ye(0),new ye(1)],[new ye(1),new ye(0)]],i=2;!n.gt(ge);){t=n.integerValue(ye.ROUND_FLOOR),r=n.minus(t);var a=t.times(o[i-1][0]).plus(o[i-2][0]),s=t.times(o[i-1][1]).plus(o[i-2][1]);if(a.gt(ge)||s.gt(ge))break;if(o.push([a,s]),r.eq(0))break;n=new ye(1).div(r),i+=1}var u=de(o[o.length-1],2),c=u[0],l=u[1];if(c.isZero()||l.isZero())throw new Error("Couldn't find approximation");return[c.toNumber(),l.toNumber()]}(e);t=new i.Price({n:parseInt(r[0],10),d:parseInt(r[1],10)})}if(t.n()<0||t.d()<0)throw new Error("price must be positive");return t}}],(t=null)&&Ze(e.prototype,t),r&&Ze(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function at(e){return A.encodeEd25519PublicKey(e.ed25519())}it.accountMerge=function(e){var t={};try{t.body=i.OperationBody.accountMerge(Ue(e.destination))}catch(e){throw new Error("destination is invalid")}return this.setSourceAccount(t,e),new i.Operation(t)},it.allowTrust=function(e){if(!A.isValidEd25519PublicKey(e.trustor))throw new Error("trustor is invalid");var t={};if(t.trustor=C.fromPublicKey(e.trustor).xdrAccountId(),e.assetCode.length<=4){var r=e.assetCode.padEnd(4,"\0");t.asset=i.AssetCode.assetTypeCreditAlphanum4(r)}else{if(!(e.assetCode.length<=12))throw new Error("Asset code must be 12 characters at max.");var n=e.assetCode.padEnd(12,"\0");t.asset=i.AssetCode.assetTypeCreditAlphanum12(n)}"boolean"==typeof e.authorize?e.authorize?t.authorize=i.TrustLineFlags.authorizedFlag().value:t.authorize=0:t.authorize=e.authorize;var o=new i.AllowTrustOp(t),a={};return a.body=i.OperationBody.allowTrust(o),this.setSourceAccount(a,e),new i.Operation(a)},it.bumpSequence=function(e){var t={};if("string"!=typeof e.bumpTo)throw new Error("bumpTo must be a string");try{new ye(e.bumpTo)}catch(e){throw new Error("bumpTo must be a stringified number")}t.bumpTo=n.Hyper.fromString(e.bumpTo);var r=new i.BumpSequenceOp(t),o={};return o.body=i.OperationBody.bumpSequence(r),this.setSourceAccount(o,e),new i.Operation(o)},it.changeTrust=function(e){var t={};if(e.asset instanceof M)t.line=e.asset.toChangeTrustXDRObject();else{if(!(e.asset instanceof Ae))throw new TypeError("asset must be Asset or LiquidityPoolAsset");t.line=e.asset.toXDRObject()}if(void 0!==e.limit&&!this.isValidAmount(e.limit,!0))throw new TypeError(this.constructAmountRequirementsError("limit"));e.limit?t.limit=this._toXDRAmount(e.limit):t.limit=n.Hyper.fromString(new ye("9223372036854775807").toString()),e.source&&(t.source=e.source.masterKeypair);var r=new i.ChangeTrustOp(t),o={};return o.body=i.OperationBody.changeTrust(r),this.setSourceAccount(o,e),new i.Operation(o)},it.createAccount=function(e){if(!A.isValidEd25519PublicKey(e.destination))throw new Error("destination is invalid");if(!this.isValidAmount(e.startingBalance,!0))throw new TypeError(this.constructAmountRequirementsError("startingBalance"));var t={};t.destination=C.fromPublicKey(e.destination).xdrAccountId(),t.startingBalance=this._toXDRAmount(e.startingBalance);var r=new i.CreateAccountOp(t),n={};return n.body=i.OperationBody.createAccount(r),this.setSourceAccount(n,e),new i.Operation(n)},it.createClaimableBalance=function(e){if(!(e.asset instanceof M))throw new Error("must provide an asset for create claimable balance operation");if(!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(!Array.isArray(e.claimants)||0===e.claimants.length)throw new Error("must provide at least one claimant");var t={};t.asset=e.asset.toXDRObject(),t.amount=this._toXDRAmount(e.amount),t.claimants=Object.values(e.claimants).map((function(e){return e.toXDRObject()}));var r=new i.CreateClaimableBalanceOp(t),n={};return n.body=i.OperationBody.createClaimableBalance(r),this.setSourceAccount(n,e),new i.Operation(n)},it.claimClaimableBalance=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Me(e.balanceId);var t={};t.balanceId=i.ClaimableBalanceId.fromXDR(e.balanceId,"hex");var r=new i.ClaimClaimableBalanceOp(t),n={};return n.body=i.OperationBody.claimClaimableBalance(r),this.setSourceAccount(n,e),new i.Operation(n)},it.clawbackClaimableBalance=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Me(e.balanceId);var t={balanceId:i.ClaimableBalanceId.fromXDR(e.balanceId,"hex")},r={body:i.OperationBody.clawbackClaimableBalance(new i.ClawbackClaimableBalanceOp(t))};return this.setSourceAccount(r,e),new i.Operation(r)},it.createPassiveSellOffer=function(e){var t={};if(t.selling=e.selling.toXDRObject(),t.buying=e.buying.toXDRObject(),!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(t.amount=this._toXDRAmount(e.amount),void 0===e.price)throw new TypeError("price argument is required");t.price=this._toXDRPrice(e.price);var r=new i.CreatePassiveSellOfferOp(t),n={};return n.body=i.OperationBody.createPassiveSellOffer(r),this.setSourceAccount(n,e),new i.Operation(n)},it.inflation=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return t.body=i.OperationBody.inflation(),this.setSourceAccount(t,e),new i.Operation(t)},it.manageData=function(e){var t={};if(!("string"==typeof e.name&&e.name.length<=64))throw new Error("name must be a string, up to 64 characters");if(t.dataName=e.name,"string"!=typeof e.value&&!Fe.isBuffer(e.value)&&null!==e.value)throw new Error("value must be a string, Buffer or null");if("string"==typeof e.value?t.dataValue=Fe.from(e.value):t.dataValue=e.value,null!==t.dataValue&&t.dataValue.length>64)throw new Error("value cannot be longer that 64 bytes");var r=new i.ManageDataOp(t),n={};return n.body=i.OperationBody.manageData(r),this.setSourceAccount(n,e),new i.Operation(n)},it.manageSellOffer=function(e){var t={};if(t.selling=e.selling.toXDRObject(),t.buying=e.buying.toXDRObject(),!this.isValidAmount(e.amount,!0))throw new TypeError(this.constructAmountRequirementsError("amount"));if(t.amount=this._toXDRAmount(e.amount),void 0===e.price)throw new TypeError("price argument is required");t.price=this._toXDRPrice(e.price),void 0!==e.offerId?e.offerId=e.offerId.toString():e.offerId="0",t.offerId=n.Hyper.fromString(e.offerId);var r=new i.ManageSellOfferOp(t),o={};return o.body=i.OperationBody.manageSellOffer(r),this.setSourceAccount(o,e),new i.Operation(o)},it.manageBuyOffer=function(e){var t={};if(t.selling=e.selling.toXDRObject(),t.buying=e.buying.toXDRObject(),!this.isValidAmount(e.buyAmount,!0))throw new TypeError(this.constructAmountRequirementsError("buyAmount"));if(t.buyAmount=this._toXDRAmount(e.buyAmount),void 0===e.price)throw new TypeError("price argument is required");t.price=this._toXDRPrice(e.price),void 0!==e.offerId?e.offerId=e.offerId.toString():e.offerId="0",t.offerId=n.Hyper.fromString(e.offerId);var r=new i.ManageBuyOfferOp(t),o={};return o.body=i.OperationBody.manageBuyOffer(r),this.setSourceAccount(o,e),new i.Operation(o)},it.pathPaymentStrictReceive=function(e){switch(!0){case!e.sendAsset:throw new Error("Must specify a send asset");case!this.isValidAmount(e.sendMax):throw new TypeError(this.constructAmountRequirementsError("sendMax"));case!e.destAsset:throw new Error("Must provide a destAsset for a payment operation");case!this.isValidAmount(e.destAmount):throw new TypeError(this.constructAmountRequirementsError("destAmount"))}var t={};t.sendAsset=e.sendAsset.toXDRObject(),t.sendMax=this._toXDRAmount(e.sendMax);try{t.destination=Ue(e.destination)}catch(e){throw new Error("destination is invalid")}t.destAsset=e.destAsset.toXDRObject(),t.destAmount=this._toXDRAmount(e.destAmount);var r=e.path?e.path:[];t.path=r.map((function(e){return e.toXDRObject()}));var n=new i.PathPaymentStrictReceiveOp(t),o={};return o.body=i.OperationBody.pathPaymentStrictReceive(n),this.setSourceAccount(o,e),new i.Operation(o)},it.pathPaymentStrictSend=function(e){switch(!0){case!e.sendAsset:throw new Error("Must specify a send asset");case!this.isValidAmount(e.sendAmount):throw new TypeError(this.constructAmountRequirementsError("sendAmount"));case!e.destAsset:throw new Error("Must provide a destAsset for a payment operation");case!this.isValidAmount(e.destMin):throw new TypeError(this.constructAmountRequirementsError("destMin"))}var t={};t.sendAsset=e.sendAsset.toXDRObject(),t.sendAmount=this._toXDRAmount(e.sendAmount);try{t.destination=Ue(e.destination)}catch(e){throw new Error("destination is invalid")}t.destAsset=e.destAsset.toXDRObject(),t.destMin=this._toXDRAmount(e.destMin);var r=e.path?e.path:[];t.path=r.map((function(e){return e.toXDRObject()}));var n=new i.PathPaymentStrictSendOp(t),o={};return o.body=i.OperationBody.pathPaymentStrictSend(n),this.setSourceAccount(o,e),new i.Operation(o)},it.payment=function(e){if(!e.asset)throw new Error("Must provide an asset for a payment operation");if(!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));var t={};try{t.destination=Ue(e.destination)}catch(e){throw new Error("destination is invalid")}t.asset=e.asset.toXDRObject(),t.amount=this._toXDRAmount(e.amount);var r=new i.PaymentOp(t),n={};return n.body=i.OperationBody.payment(r),this.setSourceAccount(n,e),new i.Operation(n)},it.setOptions=function(e){var t={};if(e.inflationDest){if(!A.isValidEd25519PublicKey(e.inflationDest))throw new Error("inflationDest is invalid");t.inflationDest=C.fromPublicKey(e.inflationDest).xdrAccountId()}if(t.clearFlags=this._checkUnsignedIntValue("clearFlags",e.clearFlags),t.setFlags=this._checkUnsignedIntValue("setFlags",e.setFlags),t.masterWeight=this._checkUnsignedIntValue("masterWeight",e.masterWeight,Ve),t.lowThreshold=this._checkUnsignedIntValue("lowThreshold",e.lowThreshold,Ve),t.medThreshold=this._checkUnsignedIntValue("medThreshold",e.medThreshold,Ve),t.highThreshold=this._checkUnsignedIntValue("highThreshold",e.highThreshold,Ve),void 0!==e.homeDomain&&"string"!=typeof e.homeDomain)throw new TypeError("homeDomain argument must be of type String");if(t.homeDomain=e.homeDomain,e.signer){var r,n=this._checkUnsignedIntValue("signer.weight",e.signer.weight,Ve),o=0;if(e.signer.ed25519PublicKey){if(!A.isValidEd25519PublicKey(e.signer.ed25519PublicKey))throw new Error("signer.ed25519PublicKey is invalid.");var a=A.decodeEd25519PublicKey(e.signer.ed25519PublicKey);r=new i.SignerKey.signerKeyTypeEd25519(a),o+=1}if(e.signer.preAuthTx){if("string"==typeof e.signer.preAuthTx&&(e.signer.preAuthTx=De.from(e.signer.preAuthTx,"hex")),!De.isBuffer(e.signer.preAuthTx)||32!==e.signer.preAuthTx.length)throw new Error("signer.preAuthTx must be 32 bytes Buffer.");r=new i.SignerKey.signerKeyTypePreAuthTx(e.signer.preAuthTx),o+=1}if(e.signer.sha256Hash){if("string"==typeof e.signer.sha256Hash&&(e.signer.sha256Hash=De.from(e.signer.sha256Hash,"hex")),!De.isBuffer(e.signer.sha256Hash)||32!==e.signer.sha256Hash.length)throw new Error("signer.sha256Hash must be 32 bytes Buffer.");r=new i.SignerKey.signerKeyTypeHashX(e.signer.sha256Hash),o+=1}if(e.signer.ed25519SignedPayload){if(!A.isValidSignedPayload(e.signer.ed25519SignedPayload))throw new Error("signer.ed25519SignedPayload is invalid.");var s=A.decodeSignedPayload(e.signer.ed25519SignedPayload),u=i.SignerKeyEd25519SignedPayload.fromXDR(s);r=i.SignerKey.signerKeyTypeEd25519SignedPayload(u),o+=1}if(1!==o)throw new Error("Signer object must contain exactly one of signer.ed25519PublicKey, signer.sha256Hash, signer.preAuthTx.");t.signer=new i.Signer({key:r,weight:n})}var c=new i.SetOptionsOp(t),l={};return l.body=i.OperationBody.setOptions(c),this.setSourceAccount(l,e),new i.Operation(l)},it.beginSponsoringFutureReserves=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!A.isValidEd25519PublicKey(e.sponsoredId))throw new Error("sponsoredId is invalid");var t=new i.BeginSponsoringFutureReservesOp({sponsoredId:C.fromPublicKey(e.sponsoredId).xdrAccountId()}),r={};return r.body=i.OperationBody.beginSponsoringFutureReserves(t),this.setSourceAccount(r,e),new i.Operation(r)},it.endSponsoringFutureReserves=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return t.body=i.OperationBody.endSponsoringFutureReserves(),this.setSourceAccount(t,e),new i.Operation(t)},it.revokeAccountSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!A.isValidEd25519PublicKey(e.account))throw new Error("account is invalid");var t=i.LedgerKey.account(new i.LedgerKeyAccount({accountId:C.fromPublicKey(e.account).xdrAccountId()})),r=i.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=i.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new i.Operation(n)},it.revokeTrustlineSponsorship=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!A.isValidEd25519PublicKey(t.account))throw new Error("account is invalid");if(t.asset instanceof M)e=t.asset.toTrustLineXDRObject();else{if(!(t.asset instanceof Re))throw new TypeError("asset must be an Asset or LiquidityPoolId");e=t.asset.toXDRObject()}var r=i.LedgerKey.trustline(new i.LedgerKeyTrustLine({accountId:C.fromPublicKey(t.account).xdrAccountId(),asset:e})),n=i.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(r),o={};return o.body=i.OperationBody.revokeSponsorship(n),this.setSourceAccount(o,t),new i.Operation(o)},it.revokeOfferSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!A.isValidEd25519PublicKey(e.seller))throw new Error("seller is invalid");if("string"!=typeof e.offerId)throw new Error("offerId is invalid");var t=i.LedgerKey.offer(new i.LedgerKeyOffer({sellerId:C.fromPublicKey(e.seller).xdrAccountId(),offerId:i.Int64.fromString(e.offerId)})),r=i.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=i.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new i.Operation(n)},it.revokeDataSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!A.isValidEd25519PublicKey(e.account))throw new Error("account is invalid");if("string"!=typeof e.name||e.name.length>64)throw new Error("name must be a string, up to 64 characters");var t=i.LedgerKey.data(new i.LedgerKeyData({accountId:C.fromPublicKey(e.account).xdrAccountId(),dataName:e.name})),r=i.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=i.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new i.Operation(n)},it.revokeClaimableBalanceSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"!=typeof e.balanceId)throw new Error("balanceId is invalid");var t=i.LedgerKey.claimableBalance(new i.LedgerKeyClaimableBalance({balanceId:i.ClaimableBalanceId.fromXDR(e.balanceId,"hex")})),r=i.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=i.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new i.Operation(n)},it.revokeLiquidityPoolSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"!=typeof e.liquidityPoolId)throw new Error("liquidityPoolId is invalid");var t=i.LedgerKey.liquidityPool(new i.LedgerKeyLiquidityPool({liquidityPoolId:i.PoolId.fromXDR(e.liquidityPoolId,"hex")})),r=i.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={body:i.OperationBody.revokeSponsorship(r)};return this.setSourceAccount(n,e),new i.Operation(n)},it.revokeSignerSponsorship=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!A.isValidEd25519PublicKey(t.account))throw new Error("account is invalid");if(t.signer.ed25519PublicKey){if(!A.isValidEd25519PublicKey(t.signer.ed25519PublicKey))throw new Error("signer.ed25519PublicKey is invalid.");var r=A.decodeEd25519PublicKey(t.signer.ed25519PublicKey);e=new i.SignerKey.signerKeyTypeEd25519(r)}else if(t.signer.preAuthTx){var n;if(n="string"==typeof t.signer.preAuthTx?qe.from(t.signer.preAuthTx,"hex"):t.signer.preAuthTx,!qe.isBuffer(n)||32!==n.length)throw new Error("signer.preAuthTx must be 32 bytes Buffer.");e=new i.SignerKey.signerKeyTypePreAuthTx(n)}else{if(!t.signer.sha256Hash)throw new Error("signer is invalid");var o;if(o="string"==typeof t.signer.sha256Hash?qe.from(t.signer.sha256Hash,"hex"):t.signer.sha256Hash,!qe.isBuffer(o)||32!==o.length)throw new Error("signer.sha256Hash must be 32 bytes Buffer.");e=new i.SignerKey.signerKeyTypeHashX(o)}var a=new i.RevokeSponsorshipOpSigner({accountId:C.fromPublicKey(t.account).xdrAccountId(),signerKey:e}),s=i.RevokeSponsorshipOp.revokeSponsorshipSigner(a),u={};return u.body=i.OperationBody.revokeSponsorship(s),this.setSourceAccount(u,t),new i.Operation(u)},it.clawback=function(e){var t={};if(!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));t.amount=this._toXDRAmount(e.amount),t.asset=e.asset.toXDRObject();try{t.from=Ue(e.from)}catch(e){throw new Error("from address is invalid")}var r={body:i.OperationBody.clawback(new i.ClawbackOp(t))};return this.setSourceAccount(r,e),new i.Operation(r)},it.setTrustLineFlags=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};if("object"!==Ke(e.flags)||0===Object.keys(e.flags).length)throw new Error("opts.flags must be a map of boolean flags to modify");var r={authorized:i.TrustLineFlags.authorizedFlag(),authorizedToMaintainLiabilities:i.TrustLineFlags.authorizedToMaintainLiabilitiesFlag(),clawbackEnabled:i.TrustLineFlags.trustlineClawbackEnabledFlag()},n=0,o=0;Object.keys(e.flags).forEach((function(t){if(!Object.prototype.hasOwnProperty.call(r,t))throw new Error("unsupported flag name specified: ".concat(t));var i=e.flags[t],a=r[t].value;!0===i?o|=a:!1===i&&(n|=a)})),t.trustor=C.fromPublicKey(e.trustor).xdrAccountId(),t.asset=e.asset.toXDRObject(),t.clearFlags=n,t.setFlags=o;var a={body:i.OperationBody.setTrustLineFlags(new i.SetTrustLineFlagsOp(t))};return this.setSourceAccount(a,e),new i.Operation(a)},it.liquidityPoolDeposit=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.liquidityPoolId,r=e.maxAmountA,n=e.maxAmountB,o=e.minPrice,a=e.maxPrice,s={};if(!t)throw new TypeError("liquidityPoolId argument is required");if(s.liquidityPoolId=i.PoolId.fromXDR(t,"hex"),!this.isValidAmount(r,!0))throw new TypeError(this.constructAmountRequirementsError("maxAmountA"));if(s.maxAmountA=this._toXDRAmount(r),!this.isValidAmount(n,!0))throw new TypeError(this.constructAmountRequirementsError("maxAmountB"));if(s.maxAmountB=this._toXDRAmount(n),void 0===o)throw new TypeError("minPrice argument is required");if(s.minPrice=this._toXDRPrice(o),void 0===a)throw new TypeError("maxPrice argument is required");s.maxPrice=this._toXDRPrice(a);var u=new i.LiquidityPoolDepositOp(s),c={body:i.OperationBody.liquidityPoolDeposit(u)};return this.setSourceAccount(c,e),new i.Operation(c)},it.liquidityPoolWithdraw=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};if(!e.liquidityPoolId)throw new TypeError("liquidityPoolId argument is required");if(t.liquidityPoolId=i.PoolId.fromXDR(e.liquidityPoolId,"hex"),!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(t.amount=this._toXDRAmount(e.amount),!this.isValidAmount(e.minAmountA,!0))throw new TypeError(this.constructAmountRequirementsError("minAmountA"));if(t.minAmountA=this._toXDRAmount(e.minAmountA),!this.isValidAmount(e.minAmountB,!0))throw new TypeError(this.constructAmountRequirementsError("minAmountB"));t.minAmountB=this._toXDRAmount(e.minAmountB);var r=new i.LiquidityPoolWithdrawOp(t),n={body:i.OperationBody.liquidityPoolWithdraw(r)};return this.setSourceAccount(n,e),new i.Operation(n)},it.invokeHostFunction=function(e){if(!e.func)throw new TypeError("host function invocation ('func') required (got ".concat(JSON.stringify(e),")"));var t=new i.InvokeHostFunctionOp({hostFunction:e.func,auth:e.auth||[]}),r={body:i.OperationBody.invokeHostFunction(t)};return this.setSourceAccount(r,e),new i.Operation(r)},it.extendFootprintTtl=function(e){var t;if((null!==(t=e.extendTo)&&void 0!==t?t:-1)<=0)throw new RangeError("extendTo isn't a ledger quantity (uint32)");var r=new i.ExtendFootprintTtlOp({ext:new i.ExtensionPoint(0),extendTo:e.extendTo}),n={body:i.OperationBody.extendFootprintTtl(r)};return this.setSourceAccount(n,e),new i.Operation(n)},it.restoreFootprint=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new i.RestoreFootprintOp({ext:new i.ExtensionPoint(0)}),r={body:i.OperationBody.restoreFootprint(t)};return this.setSourceAccount(r,null!=e?e:{}),new i.Operation(r)},it.createStellarAssetContract=function(e){var t=e.asset;if("string"==typeof t){var r=Ge(t.split(":"),2),n=r[0],o=r[1];t=new M(n,o)}if(!(t instanceof M))throw new TypeError("expected Asset in 'opts.asset', got ".concat(t));return this.invokeHostFunction({source:e.source,auth:e.auth,func:i.HostFunction.hostFunctionTypeCreateContract(new i.CreateContractArgs({executable:i.ContractExecutable.contractExecutableStellarAsset(),contractIdPreimage:i.ContractIdPreimage.contractIdPreimageFromAsset(t.toXDRObject())}))})},it.invokeContractFunction=function(e){var t=new $e(e.contract);if("contract"!==t._type)throw new TypeError("expected contract strkey instance, got ".concat(t));return this.invokeHostFunction({source:e.source,auth:e.auth,func:i.HostFunction.hostFunctionTypeInvokeContract(new i.InvokeContractArgs({contractAddress:t.toScAddress(),functionName:e.function,args:e.args}))})},it.createCustomContract=function(e){var t=We.from(e.salt||C.random().xdrPublicKey().value());if(!e.wasmHash||32!==e.wasmHash.length)throw new TypeError("expected hash(contract WASM) in 'opts.wasmHash', got ".concat(e.wasmHash));if(32!==t.length)throw new TypeError("expected 32-byte salt in 'opts.salt', got ".concat(e.wasmHash));return this.invokeHostFunction({source:e.source,auth:e.auth,func:i.HostFunction.hostFunctionTypeCreateContract(new i.CreateContractArgs({executable:i.ContractExecutable.contractExecutableWasm(We.from(e.wasmHash)),contractIdPreimage:i.ContractIdPreimage.contractIdPreimageFromAddress(new i.ContractIdPreimageFromAddress({address:e.address.toScAddress(),salt:t}))}))})},it.uploadContractWasm=function(e){return this.invokeHostFunction({source:e.source,auth:e.auth,func:i.HostFunction.hostFunctionTypeUploadContractWasm(We.from(e.wasm))})};var st=r(3626).A;function ut(e){return ut="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},ut(e)}function ct(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,lt(n.key),n)}}function lt(e){var t=function(e,t){if("object"!=ut(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=ut(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ut(t)?t:t+""}var ft="none",pt="id",ht="text",yt="hash",dt="return",mt=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;switch(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._type=t,this._value=r,this._type){case ft:break;case pt:e._validateIdValue(r);break;case ht:e._validateTextValue(r);break;case yt:case dt:e._validateHashValue(r),"string"==typeof r&&(this._value=st.from(r,"hex"));break;default:throw new Error("Invalid memo type")}}return t=e,o=[{key:"_validateIdValue",value:function(e){var t,r=new Error("Expects a int64 as a string. Got ".concat(e));if("string"!=typeof e)throw r;try{t=new ye(e)}catch(e){throw r}if(!t.isFinite())throw r;if(t.isNaN())throw r}},{key:"_validateTextValue",value:function(e){if(!i.Memo.armTypeForArm("text").isValid(e))throw new Error("Expects string, array or buffer, max 28 bytes")}},{key:"_validateHashValue",value:function(e){var t,r=new Error("Expects a 32 byte hash value or hex encoded string. Got ".concat(e));if(null==e)throw r;if("string"==typeof e){if(!/^[0-9A-Fa-f]{64}$/g.test(e))throw r;t=st.from(e,"hex")}else{if(!st.isBuffer(e))throw r;t=st.from(e)}if(!t.length||32!==t.length)throw r}},{key:"none",value:function(){return new e(ft)}},{key:"text",value:function(t){return new e(ht,t)}},{key:"id",value:function(t){return new e(pt,t)}},{key:"hash",value:function(t){return new e(yt,t)}},{key:"return",value:function(t){return new e(dt,t)}},{key:"fromXDRObject",value:function(t){switch(t.arm()){case"id":return e.id(t.value().toString());case"text":return e.text(t.value());case"hash":return e.hash(t.value());case"retHash":return e.return(t.value())}if(void 0===t.value())return e.none();throw new Error("Unknown type")}}],(r=[{key:"type",get:function(){return this._type},set:function(e){throw new Error("Memo is immutable")}},{key:"value",get:function(){switch(this._type){case ft:return null;case pt:case ht:return this._value;case yt:case dt:return st.from(this._value);default:throw new Error("Invalid memo type")}},set:function(e){throw new Error("Memo is immutable")}},{key:"toXDRObject",value:function(){switch(this._type){case ft:return i.Memo.memoNone();case pt:return i.Memo.memoId(n.UnsignedHyper.fromString(this._value));case ht:return i.Memo.memoText(this._value);case yt:return i.Memo.memoHash(this._value);case dt:return i.Memo.memoReturn(this._value);default:return null}}}])&&ct(t.prototype,r),o&&ct(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,o}(),gt=r(3626).A;function vt(e){return vt="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},vt(e)}function bt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,wt(n.key),n)}}function wt(e){var t=function(e,t){if("object"!=vt(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=vt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==vt(t)?t:t+""}function St(e,t,r){return t=Et(t),function(e,t){if(t&&("object"===vt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,kt()?Reflect.construct(t,r||[],Et(e).constructor):t.apply(e,r))}function kt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(kt=function(){return!!e})()}function Et(e){return Et=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Et(e)}function At(e,t){return At=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},At(e,t)}var Tt=function(e){function t(e,r){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"string"==typeof e){var o=gt.from(e,"base64");e=i.TransactionEnvelope.fromXDR(o)}var a=e.switch();if(a!==i.EnvelopeType.envelopeTypeTxV0()&&a!==i.EnvelopeType.envelopeTypeTx())throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxV0 or envelopeTypeTx but received an ".concat(a.name,"."));var s=e.value(),u=s.tx(),c=u.fee().toString();if((n=St(this,t,[u,(s.signatures()||[]).slice(),c,r]))._envelopeType=a,n._memo=u.memo(),n._sequence=u.seqNum().toString(),n._envelopeType===i.EnvelopeType.envelopeTypeTxV0())n._source=A.encodeEd25519PublicKey(n.tx.sourceAccountEd25519());else n._source=Ne(n.tx.sourceAccount());var l=null,f=null;switch(n._envelopeType){case i.EnvelopeType.envelopeTypeTxV0():f=u.timeBounds();break;case i.EnvelopeType.envelopeTypeTx():switch(u.cond().switch()){case i.PreconditionType.precondTime():f=u.cond().timeBounds();break;case i.PreconditionType.precondV2():f=(l=u.cond().v2()).timeBounds()}}if(f&&(n._timeBounds={minTime:f.minTime().toString(),maxTime:f.maxTime().toString()}),l){var p=l.ledgerBounds();p&&(n._ledgerBounds={minLedger:p.minLedger(),maxLedger:p.maxLedger()});var h=l.minSeqNum();h&&(n._minAccountSequence=h.toString()),n._minAccountSequenceAge=l.minSeqAge(),n._minAccountSequenceLedgerGap=l.minSeqLedgerGap(),n._extraSigners=l.extraSigners()}var y=u.operations()||[];return n._operations=y.map((function(e){return it.fromXDRObject(e)})),n}return 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&&At(e,t)}(t,e),r=t,(n=[{key:"timeBounds",get:function(){return this._timeBounds},set:function(e){throw new Error("Transaction is immutable")}},{key:"ledgerBounds",get:function(){return this._ledgerBounds},set:function(e){throw new Error("Transaction is immutable")}},{key:"minAccountSequence",get:function(){return this._minAccountSequence},set:function(e){throw new Error("Transaction is immutable")}},{key:"minAccountSequenceAge",get:function(){return this._minAccountSequenceAge},set:function(e){throw new Error("Transaction is immutable")}},{key:"minAccountSequenceLedgerGap",get:function(){return this._minAccountSequenceLedgerGap},set:function(e){throw new Error("Transaction is immutable")}},{key:"extraSigners",get:function(){return this._extraSigners},set:function(e){throw new Error("Transaction is immutable")}},{key:"sequence",get:function(){return this._sequence},set:function(e){throw new Error("Transaction is immutable")}},{key:"source",get:function(){return this._source},set:function(e){throw new Error("Transaction is immutable")}},{key:"operations",get:function(){return this._operations},set:function(e){throw new Error("Transaction is immutable")}},{key:"memo",get:function(){return mt.fromXDRObject(this._memo)},set:function(e){throw new Error("Transaction is immutable")}},{key:"signatureBase",value:function(){var e=this.tx;this._envelopeType===i.EnvelopeType.envelopeTypeTxV0()&&(e=i.Transaction.fromXDR(gt.concat([i.PublicKeyType.publicKeyTypeEd25519().toXDR(),e.toXDR()])));var t=new i.TransactionSignaturePayloadTaggedTransaction.envelopeTypeTx(e);return new i.TransactionSignaturePayload({networkId:i.Hash.fromXDR(s(this.networkPassphrase)),taggedTransaction:t}).toXDR()}},{key:"toEnvelope",value:function(){var e,t=this.tx.toXDR(),r=this.signatures.slice();switch(this._envelopeType){case i.EnvelopeType.envelopeTypeTxV0():e=new i.TransactionEnvelope.envelopeTypeTxV0(new i.TransactionV0Envelope({tx:i.TransactionV0.fromXDR(t),signatures:r}));break;case i.EnvelopeType.envelopeTypeTx():e=new i.TransactionEnvelope.envelopeTypeTx(new i.TransactionV1Envelope({tx:i.Transaction.fromXDR(t),signatures:r}));break;default:throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxV0 or envelopeTypeTx but received an ".concat(this._envelopeType.name,"."))}return e}},{key:"getClaimableBalanceId",value:function(e){if(!Number.isInteger(e)||e<0||e>=this.operations.length)throw new RangeError("invalid operation index");var t=this.operations[e];try{t=it.createClaimableBalance(t)}catch(e){throw new TypeError("expected createClaimableBalance, got ".concat(t.type,": ").concat(e))}var r=A.decodeEd25519PublicKey(je(this.source)),n=s(i.HashIdPreimage.envelopeTypeOpId(new i.HashIdPreimageOperationId({sourceAccount:i.AccountId.publicKeyTypeEd25519(r),seqNum:i.SequenceNumber.fromString(this.sequence),opNum:e})).toXDR("raw"));return i.ClaimableBalanceId.claimableBalanceIdTypeV0(n).toXDR("hex")}}])&&bt(r.prototype,n),o&&bt(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o}($),Ot=r(3626).A;function Pt(e){return Pt="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},Pt(e)}function xt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,It(n.key),n)}}function It(e){var t=function(e,t){if("object"!=Pt(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Pt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Pt(t)?t:t+""}function _t(e,t,r){return t=Rt(t),function(e,t){if(t&&("object"===Pt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Bt()?Reflect.construct(t,r||[],Rt(e).constructor):t.apply(e,r))}function Bt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Bt=function(){return!!e})()}function Rt(e){return Rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Rt(e)}function Ct(e,t){return Ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ct(e,t)}var Ut=function(e){function t(e,r){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"string"==typeof e){var o=Ot.from(e,"base64");e=i.TransactionEnvelope.fromXDR(o)}var a=e.switch();if(a!==i.EnvelopeType.envelopeTypeTxFeeBump())throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxFeeBump but received an ".concat(a.name,"."));var s=e.value(),u=s.tx(),c=u.fee().toString();n=_t(this,t,[u,(s.signatures()||[]).slice(),c,r]);var l=i.TransactionEnvelope.envelopeTypeTx(u.innerTx().v1());return n._feeSource=Ne(n.tx.feeSource()),n._innerTransaction=new Tt(l,r),n}return 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&&Ct(e,t)}(t,e),r=t,(n=[{key:"innerTransaction",get:function(){return this._innerTransaction}},{key:"operations",get:function(){return this._innerTransaction.operations}},{key:"feeSource",get:function(){return this._feeSource}},{key:"signatureBase",value:function(){var e=new i.TransactionSignaturePayloadTaggedTransaction.envelopeTypeTxFeeBump(this.tx);return new i.TransactionSignaturePayload({networkId:i.Hash.fromXDR(s(this.networkPassphrase)),taggedTransaction:e}).toXDR()}},{key:"toEnvelope",value:function(){var e=new i.FeeBumpTransactionEnvelope({tx:i.FeeBumpTransaction.fromXDR(this.tx.toXDR()),signatures:this.signatures.slice()});return new i.TransactionEnvelope.envelopeTypeTxFeeBump(e)}}])&&xt(r.prototype,n),o&&xt(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o}($);function Nt(e){return Nt="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},Nt(e)}function Lt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,jt(n.key),n)}}function jt(e){var t=function(e,t){if("object"!=Nt(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Nt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Nt(t)?t:t+""}var Mt=function(){return e=function e(t,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),A.isValidMed25519PublicKey(t))throw new Error("accountId is an M-address; use MuxedAccount instead");if(!A.isValidEd25519PublicKey(t))throw new Error("accountId is invalid");if("string"!=typeof r)throw new Error("sequence must be of type string");this._accountId=t,this.sequence=new ye(r)},(t=[{key:"accountId",value:function(){return this._accountId}},{key:"sequenceNumber",value:function(){return this.sequence.toString()}},{key:"incrementSequenceNumber",value:function(){this.sequence=this.sequence.plus(1)}}])&&Lt(e.prototype,t),r&&Lt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function Ft(e){return Ft="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},Ft(e)}function Dt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Vt(n.key),n)}}function Vt(e){var t=function(e,t){if("object"!=Ft(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Ft(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ft(t)?t:t+""}var qt=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=t.accountId();if(!A.isValidEd25519PublicKey(n))throw new Error("accountId is invalid");this.account=t,this._muxedXdr=Le(n,r),this._mAddress=Ne(this._muxedXdr),this._id=r}return t=e,n=[{key:"fromAddress",value:function(t,r){var n=Ue(t),o=je(t),i=n.med25519().id().toString();return new e(new Mt(o,r),i)}}],(r=[{key:"baseAccount",value:function(){return this.account}},{key:"accountId",value:function(){return this._mAddress}},{key:"id",value:function(){return this._id}},{key:"setId",value:function(e){if("string"!=typeof e)throw new Error("id should be a string representing a number (uint64)");return this._muxedXdr.med25519().id(i.Uint64.fromString(e)),this._mAddress=Ne(this._muxedXdr),this._id=e,this}},{key:"sequenceNumber",value:function(){return this.account.sequenceNumber()}},{key:"incrementSequenceNumber",value:function(){return this.account.incrementSequenceNumber()}},{key:"toXDRObject",value:function(){return this._muxedXdr}},{key:"equals",value:function(e){return this.accountId()===e.accountId()}}])&&Dt(t.prototype,r),n&&Dt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}();function Kt(e){return Kt="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},Kt(e)}function Ht(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,zt(n.key),n)}}function zt(e){var t=function(e,t){if("object"!=Kt(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Kt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Kt(t)?t:t+""}var Xt=function(){return e=function e(t){var r,n,o,a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r=this,o=void 0,(n=zt(n="_data"))in r?Object.defineProperty(r,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[n]=o,a=t?"string"==typeof t||ArrayBuffer.isView(t)?e.fromXDR(t):e.fromXDR(t.toXDR()):new i.SorobanTransactionData({resources:new i.SorobanResources({footprint:new i.LedgerFootprint({readOnly:[],readWrite:[]}),instructions:0,readBytes:0,writeBytes:0}),ext:new i.ExtensionPoint(0),resourceFee:new i.Int64(0)}),this._data=a},r=[{key:"fromXDR",value:function(e){return i.SorobanTransactionData.fromXDR(e,"string"==typeof e?"base64":"raw")}}],(t=[{key:"setResourceFee",value:function(e){return this._data.resourceFee(new i.Int64(e)),this}},{key:"setResources",value:function(e,t,r){return this._data.resources().instructions(e),this._data.resources().readBytes(t),this._data.resources().writeBytes(r),this}},{key:"appendFootprint",value:function(e,t){return this.setFootprint(this.getReadOnly().concat(e),this.getReadWrite().concat(t))}},{key:"setFootprint",value:function(e,t){return null!==e&&this.setReadOnly(e),null!==t&&this.setReadWrite(t),this}},{key:"setReadOnly",value:function(e){return this._data.resources().footprint().readOnly(null!=e?e:[]),this}},{key:"setReadWrite",value:function(e){return this._data.resources().footprint().readWrite(null!=e?e:[]),this}},{key:"build",value:function(){return i.SorobanTransactionData.fromXDR(this._data.toXDR())}},{key:"getReadOnly",value:function(){return this.getFootprint().readOnly()}},{key:"getReadWrite",value:function(){return this.getFootprint().readWrite()}},{key:"getFootprint",value:function(){return this._data.resources().footprint()}}])&&Ht(e.prototype,t),r&&Ht(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function $t(e){return $t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$t(e)}function Wt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Gt(n.key),n)}}function Gt(e){var t=function(e,t){if("object"!=$t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=$t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==$t(t)?t:t+""}var Yt=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},r=[{key:"decodeAddress",value:function(e){var t={ed25519PublicKey:i.SignerKey.signerKeyTypeEd25519,preAuthTx:i.SignerKey.signerKeyTypePreAuthTx,sha256Hash:i.SignerKey.signerKeyTypeHashX,signedPayload:i.SignerKey.signerKeyTypeEd25519SignedPayload},r=A.getVersionByteForPrefix(e),n=t[r];if(!n)throw new Error("invalid signer key type (".concat(r,")"));var o=O(r,e);return n("signedPayload"===r?new i.SignerKeyEd25519SignedPayload({ed25519:o.slice(0,32),payload:o.slice(36)}):o)}},{key:"encodeSignerKey",value:function(e){var t,r;switch(e.switch()){case i.SignerKeyType.signerKeyTypeEd25519():t="ed25519PublicKey",r=e.value();break;case i.SignerKeyType.signerKeyTypePreAuthTx():t="preAuthTx",r=e.value();break;case i.SignerKeyType.signerKeyTypeHashX():t="sha256Hash",r=e.value();break;case i.SignerKeyType.signerKeyTypeEd25519SignedPayload():t="signedPayload",r=e.ed25519SignedPayload().toXDR("raw");break;default:throw new Error("invalid SignerKey (type: ".concat(e.switch(),")"))}return P(t,r)}}],(t=null)&&Wt(e.prototype,t),r&&Wt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function Jt(e){return Jt="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},Jt(e)}function Zt(e){return function(e){if(Array.isArray(e))return Qt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Qt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qt(e,t)}(e)||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.")}()}function Qt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function er(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function tr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?er(Object(r),!0).forEach((function(t){rr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):er(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function rr(e,t,r){return(t=or(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,or(n.key),n)}}function or(e){var t=function(e,t){if("object"!=Jt(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Jt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Jt(t)?t:t+""}var ir="100",ar=0,sr=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new Error("must specify source account for the transaction");if(void 0===r.fee)throw new Error("must specify fee for the transaction (in stroops)");this.source=t,this.operations=[],this.baseFee=r.fee,this.timebounds=r.timebounds?tr({},r.timebounds):null,this.ledgerbounds=r.ledgerbounds?tr({},r.ledgerbounds):null,this.minAccountSequence=r.minAccountSequence||null,this.minAccountSequenceAge=r.minAccountSequenceAge||null,this.minAccountSequenceLedgerGap=r.minAccountSequenceLedgerGap||null,this.extraSigners=r.extraSigners?Zt(r.extraSigners):null,this.memo=r.memo||mt.none(),this.networkPassphrase=r.networkPassphrase||null,this.sorobanData=r.sorobanData?new Xt(r.sorobanData).build():null}return t=e,o=[{key:"cloneFrom",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(t instanceof Tt))throw new TypeError("expected a 'Transaction', got: ".concat(t));var n,o=(BigInt(t.sequence)-1n).toString();if(A.isValidMed25519PublicKey(t.source))n=qt.fromAddress(t.source,o);else{if(!A.isValidEd25519PublicKey(t.source))throw new TypeError("unsupported tx source account: ".concat(t.source));n=new Mt(t.source,o)}var i=new e(n,tr({fee:(parseInt(t.fee,10)/t.operations.length||ir).toString(),memo:t.memo,networkPassphrase:t.networkPassphrase,timebounds:t.timeBounds,ledgerbounds:t.ledgerBounds,minAccountSequence:t.minAccountSequence,minAccountSequenceAge:t.minAccountSequenceAge,minAccountSequenceLedgerGap:t.minAccountSequenceLedgerGap,extraSigners:t.extraSigners},r));return t._tx.operations().forEach((function(e){return i.addOperation(e)})),i}},{key:"buildFeeBumpTransaction",value:function(e,t,r,n){var o=r.operations.length,a=new ye(r.fee).div(o),s=new ye(t);if(s.lt(a))throw new Error("Invalid baseFee, it should be at least ".concat(a," stroops."));var u=new ye(ir);if(s.lt(u))throw new Error("Invalid baseFee, it should be at least ".concat(u," stroops."));var c,l=r.toEnvelope();if(l.switch()===i.EnvelopeType.envelopeTypeTxV0()){var f=l.v0().tx(),p=new i.Transaction({sourceAccount:new i.MuxedAccount.keyTypeEd25519(f.sourceAccountEd25519()),fee:f.fee(),seqNum:f.seqNum(),cond:i.Preconditions.precondTime(f.timeBounds()),memo:f.memo(),operations:f.operations(),ext:new i.TransactionExt(0)});l=new i.TransactionEnvelope.envelopeTypeTx(new i.TransactionV1Envelope({tx:p,signatures:l.v0().signatures()}))}c="string"==typeof e?Ue(e):e.xdrMuxedAccount();var h=new i.FeeBumpTransaction({feeSource:c,fee:i.Int64.fromString(s.times(o+1).toString()),innerTx:i.FeeBumpTransactionInnerTx.envelopeTypeTx(l.v1()),ext:new i.FeeBumpTransactionExt(0)}),y=new i.FeeBumpTransactionEnvelope({tx:h,signatures:[]}),d=new i.TransactionEnvelope.envelopeTypeTxFeeBump(y);return new Ut(d,n)}},{key:"fromXDR",value:function(e,t){return"string"==typeof e&&(e=i.TransactionEnvelope.fromXDR(e,"base64")),e.switch()===i.EnvelopeType.envelopeTypeTxFeeBump()?new Ut(e,t):new Tt(e,t)}}],(r=[{key:"addOperation",value:function(e){return this.operations.push(e),this}},{key:"clearOperations",value:function(){return this.operations=[],this}},{key:"addMemo",value:function(e){return this.memo=e,this}},{key:"setTimeout",value:function(e){if(null!==this.timebounds&&this.timebounds.maxTime>0)throw new Error("TimeBounds.max_time has been already set - setting timeout would overwrite it.");if(e<0)throw new Error("timeout cannot be negative");if(e>0){var t=Math.floor(Date.now()/1e3)+e;null===this.timebounds?this.timebounds={minTime:0,maxTime:t}:this.timebounds={minTime:this.timebounds.minTime,maxTime:t}}else this.timebounds={minTime:0,maxTime:0};return this}},{key:"setTimebounds",value:function(e,t){if("number"==typeof e&&(e=new Date(1e3*e)),"number"==typeof t&&(t=new Date(1e3*t)),null!==this.timebounds)throw new Error("TimeBounds has been already set - setting timebounds would overwrite it.");var r=Math.floor(e.valueOf()/1e3),n=Math.floor(t.valueOf()/1e3);if(r<0)throw new Error("min_time cannot be negative");if(n<0)throw new Error("max_time cannot be negative");if(n>0&&r>n)throw new Error("min_time cannot be greater than max_time");return this.timebounds={minTime:r,maxTime:n},this}},{key:"setLedgerbounds",value:function(e,t){if(null!==this.ledgerbounds)throw new Error("LedgerBounds has been already set - setting ledgerbounds would overwrite it.");if(e<0)throw new Error("min_ledger cannot be negative");if(t<0)throw new Error("max_ledger cannot be negative");if(t>0&&e>t)throw new Error("min_ledger cannot be greater than max_ledger");return this.ledgerbounds={minLedger:e,maxLedger:t},this}},{key:"setMinAccountSequence",value:function(e){if(null!==this.minAccountSequence)throw new Error("min_account_sequence has been already set - setting min_account_sequence would overwrite it.");return this.minAccountSequence=e,this}},{key:"setMinAccountSequenceAge",value:function(e){if("number"!=typeof e)throw new Error("min_account_sequence_age must be a number");if(null!==this.minAccountSequenceAge)throw new Error("min_account_sequence_age has been already set - setting min_account_sequence_age would overwrite it.");if(e<0)throw new Error("min_account_sequence_age cannot be negative");return this.minAccountSequenceAge=e,this}},{key:"setMinAccountSequenceLedgerGap",value:function(e){if(null!==this.minAccountSequenceLedgerGap)throw new Error("min_account_sequence_ledger_gap has been already set - setting min_account_sequence_ledger_gap would overwrite it.");if(e<0)throw new Error("min_account_sequence_ledger_gap cannot be negative");return this.minAccountSequenceLedgerGap=e,this}},{key:"setExtraSigners",value:function(e){if(!Array.isArray(e))throw new Error("extra_signers must be an array of strings.");if(null!==this.extraSigners)throw new Error("extra_signers has been already set - setting extra_signers would overwrite it.");if(e.length>2)throw new Error("extra_signers cannot be longer than 2 elements.");return this.extraSigners=Zt(e),this}},{key:"setNetworkPassphrase",value:function(e){return this.networkPassphrase=e,this}},{key:"setSorobanData",value:function(e){return this.sorobanData=new Xt(e).build(),this}},{key:"build",value:function(){var e=new ye(this.source.sequenceNumber()).plus(1),t={fee:new ye(this.baseFee).times(this.operations.length).toNumber(),seqNum:i.SequenceNumber.fromString(e.toString()),memo:this.memo?this.memo.toXDRObject():null};if(null===this.timebounds||void 0===this.timebounds.minTime||void 0===this.timebounds.maxTime)throw new Error("TimeBounds has to be set or you must call setTimeout(TimeoutInfinite).");ur(this.timebounds.minTime)&&(this.timebounds.minTime=this.timebounds.minTime.getTime()/1e3),ur(this.timebounds.maxTime)&&(this.timebounds.maxTime=this.timebounds.maxTime.getTime()/1e3),this.timebounds.minTime=n.UnsignedHyper.fromString(this.timebounds.minTime.toString()),this.timebounds.maxTime=n.UnsignedHyper.fromString(this.timebounds.maxTime.toString());var r=new i.TimeBounds(this.timebounds);if(this.hasV2Preconditions()){var o=null;null!==this.ledgerbounds&&(o=new i.LedgerBounds(this.ledgerbounds));var a=this.minAccountSequence||"0";a=i.SequenceNumber.fromString(a);var s=n.UnsignedHyper.fromString(null!==this.minAccountSequenceAge?this.minAccountSequenceAge.toString():"0"),u=this.minAccountSequenceLedgerGap||0,c=null!==this.extraSigners?this.extraSigners.map(Yt.decodeAddress):[];t.cond=i.Preconditions.precondV2(new i.PreconditionsV2({timeBounds:r,ledgerBounds:o,minSeqNum:a,minSeqAge:s,minSeqLedgerGap:u,extraSigners:c}))}else t.cond=i.Preconditions.precondTime(r);t.sourceAccount=Ue(this.source.accountId()),this.sorobanData?t.ext=new i.TransactionExt(1,this.sorobanData):t.ext=new i.TransactionExt(0,i.Void);var l=new i.Transaction(t);l.operations(this.operations);var f=new i.TransactionEnvelope.envelopeTypeTx(new i.TransactionV1Envelope({tx:l})),p=new Tt(f,this.networkPassphrase);return this.source.incrementSequenceNumber(),p}},{key:"hasV2Preconditions",value:function(){return null!==this.ledgerbounds||null!==this.minAccountSequence||null!==this.minAccountSequenceAge||null!==this.minAccountSequenceLedgerGap||null!==this.extraSigners&&this.extraSigners.length>0}}])&&nr(t.prototype,r),o&&nr(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,o}();function ur(e){return e instanceof Date&&!isNaN(e)}var cr={PUBLIC:"Public Global Stellar Network ; September 2015",TESTNET:"Test SDF Network ; September 2015",FUTURENET:"Test SDF Future Network ; October 2022",SANDBOX:"Local Sandbox Stellar Network ; September 2022",STANDALONE:"Standalone Network ; February 2017"};function lr(e){return lr="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},lr(e)}function fr(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return pr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pr(e,t)}(e)||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.")}()}function pr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function hr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,yr(n.key),n)}}function yr(e){var t=function(e,t){if("object"!=lr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=lr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==lr(t)?t:t+""}var dr=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},r=[{key:"formatTokenAmount",value:function(e,t){if(e.includes("."))throw new TypeError("No decimals are allowed");var r=e;return t>0&&(r=t>r.length?["0",r.toString().padStart(t,"0")].join("."):[r.slice(0,-t),r.slice(-t)].join(".")),r.replace(/(\.\d*?)0+$/,"$1")}},{key:"parseTokenAmount",value:function(e,t){var r,n=fr(e.split(".").slice()),o=n[0],i=n[1];if(n.slice(2).length)throw new Error("Invalid decimal value: ".concat(e));return BigInt(o+(null!==(r=null==i?void 0:i.padEnd(t,"0"))&&void 0!==r?r:"0".repeat(t))).toString()}}],(t=null)&&hr(e.prototype,t),r&&hr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function mr(e){return mr="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},mr(e)}function gr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,vr(n.key),n)}}function vr(e){var t=function(e,t){if("object"!=mr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=mr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==mr(t)?t:t+""}var br=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);try{this._id=A.decodeContract(t)}catch(e){throw new Error("Invalid contract ID: ".concat(t))}},t=[{key:"contractId",value:function(){return A.encodeContract(this._id)}},{key:"toString",value:function(){return this.contractId()}},{key:"address",value:function(){return $e.contract(this._id)}},{key:"call",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return it.invokeContractFunction({contract:this.address().toString(),function:e,args:r})}},{key:"getFootprint",value:function(){return i.LedgerKey.contractData(new i.LedgerKeyContractData({contract:this.address().toScAddress(),key:i.ScVal.scvLedgerKeyContractInstance(),durability:i.ContractDataDurability.persistent()}))}}],t&&gr(e.prototype,t),r&&gr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function wr(e){return wr="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},wr(e)}function Sr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,kr(n.key),n)}}function kr(e){var t=function(e,t){if("object"!=wr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=wr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==wr(t)?t:t+""}function Er(e,t,r){return t=Tr(t),function(e,t){if(t&&("object"===wr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ar()?Reflect.construct(t,r||[],Tr(e).constructor):t.apply(e,r))}function Ar(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ar=function(){return!!e})()}function Tr(e){return Tr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Tr(e)}function Or(e,t){return Or=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Or(e,t)}var Pr=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Er(this,t,[r])}return 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&&Or(e,t)}(t,e),r=t,(n=[{key:"unsigned",get:function(){return!0}},{key:"size",get:function(){return 128}}])&&Sr(r.prototype,n),o&&Sr(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o}(n.LargeInt);function xr(e){return xr="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},xr(e)}function Ir(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_r(n.key),n)}}function _r(e){var t=function(e,t){if("object"!=xr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=xr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==xr(t)?t:t+""}function Br(e,t,r){return t=Cr(t),function(e,t){if(t&&("object"===xr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Rr()?Reflect.construct(t,r||[],Cr(e).constructor):t.apply(e,r))}function Rr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Rr=function(){return!!e})()}function Cr(e){return Cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Cr(e)}function Ur(e,t){return Ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ur(e,t)}Pr.defineIntBoundaries();var Nr=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Br(this,t,[r])}return 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&&Ur(e,t)}(t,e),r=t,(n=[{key:"unsigned",get:function(){return!0}},{key:"size",get:function(){return 256}}])&&Ir(r.prototype,n),o&&Ir(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o}(n.LargeInt);function Lr(e){return Lr="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},Lr(e)}function jr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Mr(n.key),n)}}function Mr(e){var t=function(e,t){if("object"!=Lr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Lr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Lr(t)?t:t+""}function Fr(e,t,r){return t=Vr(t),function(e,t){if(t&&("object"===Lr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Dr()?Reflect.construct(t,r||[],Vr(e).constructor):t.apply(e,r))}function Dr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Dr=function(){return!!e})()}function Vr(e){return Vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vr(e)}function qr(e,t){return qr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},qr(e,t)}Nr.defineIntBoundaries();var Kr=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Fr(this,t,[r])}return 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&&qr(e,t)}(t,e),r=t,(n=[{key:"unsigned",get:function(){return!1}},{key:"size",get:function(){return 128}}])&&jr(r.prototype,n),o&&jr(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o}(n.LargeInt);function Hr(e){return Hr="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},Hr(e)}function zr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Xr(n.key),n)}}function Xr(e){var t=function(e,t){if("object"!=Hr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Hr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Hr(t)?t:t+""}function $r(e,t,r){return t=Gr(t),function(e,t){if(t&&("object"===Hr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Wr()?Reflect.construct(t,r||[],Gr(e).constructor):t.apply(e,r))}function Wr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Wr=function(){return!!e})()}function Gr(e){return Gr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Gr(e)}function Yr(e,t){return Yr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yr(e,t)}Kr.defineIntBoundaries();var Jr=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return $r(this,t,[r])}return 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&&Yr(e,t)}(t,e),r=t,(n=[{key:"unsigned",get:function(){return!1}},{key:"size",get:function(){return 256}}])&&zr(r.prototype,n),o&&zr(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o}(n.LargeInt);function Zr(e){return Zr="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},Zr(e)}function Qr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,tn(n.key),n)}}function en(e,t,r){return(t=tn(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tn(e){var t=function(e,t){if("object"!=Zr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Zr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Zr(t)?t:t+""}Jr.defineIntBoundaries();var rn=function(){return e=function e(t,r){switch(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),en(this,"int",void 0),en(this,"type",void 0),r instanceof Array||(r=[r]),r=r.map((function(t){return"bigint"==typeof t?t:t instanceof e?t.toBigInt():BigInt(t)})),t){case"i64":this.int=new n.Hyper(r);break;case"i128":this.int=new Kr(r);break;case"i256":this.int=new Jr(r);break;case"u64":this.int=new n.UnsignedHyper(r);break;case"u128":this.int=new Pr(r);break;case"u256":this.int=new Nr(r);break;default:throw TypeError("invalid type: ".concat(t))}this.type=t},r=[{key:"isType",value:function(e){switch(e){case"i64":case"i128":case"i256":case"u64":case"u128":case"u256":return!0;default:return!1}}},{key:"getType",value:function(e){return e.slice(3).toLowerCase()}}],(t=[{key:"toNumber",value:function(){var e=this.int.toBigInt();if(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)throw RangeError("value ".concat(e," not in range for Number ")+"[".concat(Number.MAX_SAFE_INTEGER,", ").concat(Number.MIN_SAFE_INTEGER,"]"));return Number(e)}},{key:"toBigInt",value:function(){return this.int.toBigInt()}},{key:"toI64",value:function(){this._sizeCheck(64);var e=this.toBigInt();if(BigInt.asIntN(64,e)!==e)throw RangeError("value too large for i64: ".concat(e));return i.ScVal.scvI64(new i.Int64(e))}},{key:"toU64",value:function(){return this._sizeCheck(64),i.ScVal.scvU64(new i.Uint64(BigInt.asUintN(64,this.toBigInt())))}},{key:"toI128",value:function(){this._sizeCheck(128);var e=this.int.toBigInt(),t=BigInt.asIntN(64,e>>64n),r=BigInt.asUintN(64,e);return i.ScVal.scvI128(new i.Int128Parts({hi:new i.Int64(t),lo:new i.Uint64(r)}))}},{key:"toU128",value:function(){this._sizeCheck(128);var e=this.int.toBigInt();return i.ScVal.scvU128(new i.UInt128Parts({hi:new i.Uint64(BigInt.asUintN(64,e>>64n)),lo:new i.Uint64(BigInt.asUintN(64,e))}))}},{key:"toI256",value:function(){var e=this.int.toBigInt(),t=BigInt.asIntN(64,e>>192n),r=BigInt.asUintN(64,e>>128n),n=BigInt.asUintN(64,e>>64n),o=BigInt.asUintN(64,e);return i.ScVal.scvI256(new i.Int256Parts({hiHi:new i.Int64(t),hiLo:new i.Uint64(r),loHi:new i.Uint64(n),loLo:new i.Uint64(o)}))}},{key:"toU256",value:function(){var e=this.int.toBigInt(),t=BigInt.asUintN(64,e>>192n),r=BigInt.asUintN(64,e>>128n),n=BigInt.asUintN(64,e>>64n),o=BigInt.asUintN(64,e);return i.ScVal.scvU256(new i.UInt256Parts({hiHi:new i.Uint64(t),hiLo:new i.Uint64(r),loHi:new i.Uint64(n),loLo:new i.Uint64(o)}))}},{key:"toScVal",value:function(){switch(this.type){case"i64":return this.toI64();case"i128":return this.toI128();case"i256":return this.toI256();case"u64":return this.toU64();case"u128":return this.toU128();case"u256":return this.toU256();default:throw TypeError("invalid type: ".concat(this.type))}}},{key:"valueOf",value:function(){return this.int.valueOf()}},{key:"toString",value:function(){return this.int.toString()}},{key:"toJSON",value:function(){return{value:this.toBigInt().toString(),type:this.type}}},{key:"_sizeCheck",value:function(e){if(this.int.size>e)throw RangeError("value too large for ".concat(e," bits (").concat(this.type,")"))}}])&&Qr(e.prototype,t),r&&Qr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function nn(e){return nn="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},nn(e)}function on(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,an(n.key),n)}}function an(e){var t=function(e,t){if("object"!=nn(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=nn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==nn(t)?t:t+""}function sn(e,t,r){return t=cn(t),function(e,t){if(t&&("object"===nn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,un()?Reflect.construct(t,r||[],cn(e).constructor):t.apply(e,r))}function un(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(un=function(){return!!e})()}function cn(e){return cn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cn(e)}function ln(e,t){return ln=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ln(e,t)}var fn=function(e){function t(e,r){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=e<0,i=null!==(n=null==r?void 0:r.type)&&void 0!==n?n:"";if(i.startsWith("u")&&o)throw TypeError("specified type ".concat(r.type," yet negative (").concat(e,")"));if(""===i){i=o?"i":"u";var a=function(e){var t,r=e.toString(2).length;return null!==(t=[64,128,256].find((function(e){return r<=e})))&&void 0!==t?t:r}(e);switch(a){case 64:case 128:case 256:i+=a.toString();break;default:throw RangeError("expected 64/128/256 bits for input (".concat(e,"), got ").concat(a))}}return sn(this,t,[i,e])}return 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&&ln(e,t)}(t,e),r=t,n&&on(r.prototype,n),o&&on(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o}(rn);function pn(e){var t=rn.getType(e.switch().name);switch(e.switch().name){case"scvU32":case"scvI32":return BigInt(e.value());case"scvU64":case"scvI64":return new rn(t,e.value()).toBigInt();case"scvU128":case"scvI128":return new rn(t,[e.value().lo(),e.value().hi()]).toBigInt();case"scvU256":case"scvI256":return new rn(t,[e.value().loLo(),e.value().loHi(),e.value().hiLo(),e.value().hiHi()]).toBigInt();default:throw TypeError("expected integer type, got ".concat(e.switch()))}}var hn=r(3626).A;function yn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return dn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dn(e,t)}(e,t)||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.")}()}function dn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function mn(e){return mn="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},mn(e)}function gn(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(mn(e)){case"object":if(null===e)return i.ScVal.scvVoid();if(e instanceof i.ScVal)return e;if(e instanceof $e)return e.toScVal();if(e instanceof br)return e.address().toScVal();if(e instanceof Uint8Array||hn.isBuffer(e)){var o,a=Uint8Array.from(e);switch(null!==(o=null==n?void 0:n.type)&&void 0!==o?o:"bytes"){case"bytes":return i.ScVal.scvBytes(a);case"symbol":return i.ScVal.scvSymbol(a);case"string":return i.ScVal.scvString(a);default:throw new TypeError("invalid type (".concat(n.type,") specified for bytes-like value"))}}if(Array.isArray(e)){if(e.length>0&&e.some((function(t){return mn(t)!==mn(e[0])})))throw new TypeError("array values (".concat(e,") must have the same type (types: ").concat(e.map((function(e){return mn(e)})).join(","),")"));return i.ScVal.scvVec(e.map((function(e){return gn(e,n)})))}var s;if("Object"!==(null!==(t=null===(r=e.constructor)||void 0===r?void 0:r.name)&&void 0!==t?t:""))throw new TypeError("cannot interpret ".concat(null===(s=e.constructor)||void 0===s?void 0:s.name," value as ScVal (").concat(JSON.stringify(e),")"));return i.ScVal.scvMap(Object.entries(e).map((function(e){var t,r,o=yn(e,2),a=o[0],s=o[1],u=yn(null!==(t=(null!==(r=null==n?void 0:n.type)&&void 0!==r?r:{})[a])&&void 0!==t?t:[null,null],2),c=u[0],l=u[1],f=c?{type:c}:{},p=l?{type:l}:{};return new i.ScMapEntry({key:gn(a,f),val:gn(s,p)})})));case"number":case"bigint":switch(null==n?void 0:n.type){case"u32":return i.ScVal.scvU32(e);case"i32":return i.ScVal.scvI32(e)}return new fn(e,{type:null==n?void 0:n.type}).toScVal();case"string":var u,c=null!==(u=null==n?void 0:n.type)&&void 0!==u?u:"string";switch(c){case"string":return i.ScVal.scvString(e);case"symbol":return i.ScVal.scvSymbol(e);case"address":return new $e(e).toScVal();default:if(rn.isType(c))return new rn(c,e).toScVal();throw new TypeError("invalid type (".concat(n.type,") specified for string value"))}case"boolean":return i.ScVal.scvBool(e);case"undefined":return i.ScVal.scvVoid();case"function":return gn(e());default:throw new TypeError("failed to convert typeof ".concat(mn(e)," (").concat(e,")"))}}function vn(e){var t,r;switch(e.switch().value){case i.ScValType.scvVoid().value:return null;case i.ScValType.scvU64().value:case i.ScValType.scvI64().value:return e.value().toBigInt();case i.ScValType.scvU128().value:case i.ScValType.scvI128().value:case i.ScValType.scvU256().value:case i.ScValType.scvI256().value:return pn(e);case i.ScValType.scvVec().value:return(null!==(t=e.vec())&&void 0!==t?t:[]).map(vn);case i.ScValType.scvAddress().value:return $e.fromScVal(e).toString();case i.ScValType.scvMap().value:return Object.fromEntries((null!==(r=e.map())&&void 0!==r?r:[]).map((function(e){return[vn(e.key()),vn(e.val())]})));case i.ScValType.scvBool().value:case i.ScValType.scvU32().value:case i.ScValType.scvI32().value:case i.ScValType.scvBytes().value:return e.value();case i.ScValType.scvSymbol().value:case i.ScValType.scvString().value:var n=e.value();if(hn.isBuffer(n)||ArrayBuffer.isView(n))try{return(new TextDecoder).decode(n)}catch(e){return new Uint8Array(n.buffer)}return n;case i.ScValType.scvTimepoint().value:case i.ScValType.scvDuration().value:return new i.Uint64(e.value()).toBigInt();case i.ScValType.scvStatus().value:switch(e.value().switch()){case i.ScStatusType.sstOk().value:case i.ScStatusType.sstUnknownError().value:case i.ScStatusType.sstHostValueError().value:case i.ScStatusType.sstHostObjectError().value:case i.ScStatusType.sstHostFunctionError().value:case i.ScStatusType.sstHostStorageError().value:case i.ScStatusType.sstHostContextError().value:case i.ScStatusType.sstVmError().value:case i.ScStatusType.sstContractError().value:case i.ScStatusType.sstHostAuthError().value:}default:return e.value()}}function bn(e){return bn="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},bn(e)}function wn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Sn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wn(Object(r),!0).forEach((function(t){kn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function kn(e,t,r){var n;return n=function(e,t){if("object"!=bn(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=bn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==bn(n)?n:n+"")in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function En(e){return e.map((function(e){return e instanceof i.DiagnosticEvent?An(e.event()):An(e)}))}function An(e){return Sn(Sn({},null!=e.contractId()&&{contractId:A.encodeContract(e.contractId())}),{},{type:e.type().name,topics:e.body().value().topics().map((function(e){return vn(e)})),data:vn(e.body().value().data())})}var Tn=r(3626).A;function On(e){return On="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},On(e)}function Pn(){Pn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new _(n||[]);return o(a,"_invoke",{value:O(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var p="suspendedStart",h="suspendedYield",y="executing",d="completed",m={};function g(){}function v(){}function b(){}var w={};c(w,a,(function(){return this}));var S=Object.getPrototypeOf,k=S&&S(S(B([])));k&&k!==r&&n.call(k,a)&&(w=k);var E=b.prototype=g.prototype=Object.create(w);function A(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function T(e,t){function r(o,i,a,s){var u=f(e[o],e,i);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==On(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function O(t,r,n){var o=p;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var c=f(t,r,n);if("normal"===c.type){if(o=n.done?d:h,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=d,n.method="throw",n.arg=c.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function x(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 I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function B(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(On(t)+" is not iterable")}return v.prototype=b,o(E,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:v,configurable:!0}),v.displayName=c(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,u,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},A(T.prototype),c(T.prototype,s,(function(){return this})),t.AsyncIterator=T,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new T(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},A(E),c(E,u,"Generator"),c(E,a,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=B,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return s.type="throw",s.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:B(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function xn(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function In(e,t,r){return _n.apply(this,arguments)}function _n(){var e;return e=Pn().mark((function e(t,r,n){var o,a,u,c,l,f,p,h,y,d=arguments;return Pn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=d.length>3&&void 0!==d[3]?d[3]:cr.FUTURENET,t.credentials().switch().value===i.SorobanCredentialsType.sorobanCredentialsAddress().value){e.next=3;break}return e.abrupt("return",t);case 3:if(a=i.SorobanAuthorizationEntry.fromXDR(t.toXDR()),(u=a.credentials().address()).signatureExpirationLedger(n),c=s(Tn.from(o)),l=i.HashIdPreimage.envelopeTypeSorobanAuthorization(new i.HashIdPreimageSorobanAuthorization({networkId:c,nonce:u.nonce(),invocation:a.rootInvocation(),signatureExpirationLedger:u.signatureExpirationLedger()})),f=s(l.toXDR()),"function"!=typeof r){e.next=17;break}return e.t0=Tn,e.next=13,r(l);case 13:e.t1=e.sent,p=e.t0.from.call(e.t0,e.t1),e.next=18;break;case 17:p=Tn.from(r.sign(f));case 18:if(h=$e.fromScAddress(u.address()).toString(),C.fromPublicKey(h).verify(f,p)){e.next=21;break}throw new Error("signature doesn't match payload");case 21:return y=gn({public_key:A.decodeEd25519PublicKey(h),signature:p},{type:{public_key:["symbol",null],signature:["symbol",null]}}),u.signature(i.ScVal.scvVec([y])),e.abrupt("return",a);case 24:case"end":return e.stop()}}),e)})),_n=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){xn(i,n,o,a,s,"next",e)}function s(e){xn(i,n,o,a,s,"throw",e)}a(void 0)}))},_n.apply(this,arguments)}function Bn(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:cr.FUTURENET,a=C.random().rawPublicKey(),s=new i.Int64(a.subarray(0,8).reduce((function(e,t){return e<<8|t}),0)),u=n||e.publicKey();if(!u)throw new Error("authorizeInvocation requires publicKey parameter");return In(new i.SorobanAuthorizationEntry({rootInvocation:r,credentials:i.SorobanCredentials.sorobanCredentialsAddress(new i.SorobanAddressCredentials({address:new $e(u).toScAddress(),nonce:s,signatureExpirationLedger:0,signature:i.ScVal.scvVec([])}))}),e,t,o)}function Rn(e){var t=e.function(),r={},n=t.value();switch(t.switch().value){case 0:r.type="execute",r.args={source:$e.fromScAddress(n.contractAddress()).toString(),function:n.functionName(),args:n.args().map((function(e){return vn(e)}))};break;case 1:r.type="create",r.args={};var o=[n.executable(),n.contractIdPreimage()],i=o[0],a=o[1];if(!!i.switch().value!=!!a.switch().value)throw new Error("creation function appears invalid: ".concat(JSON.stringify(n)," (should be wasm+address or token+asset)"));switch(i.switch().value){case 0:var s=a.fromAddress();r.args.type="wasm",r.args.wasm={salt:s.salt().toString("hex"),hash:i.wasmHash().toString("hex"),address:$e.fromScAddress(s.address()).toString()};break;case 1:r.args.type="sac",r.args.asset=M.fromOperation(a.fromAsset()).toString();break;default:throw new Error("unknown creation type: ".concat(JSON.stringify(i)))}break;default:throw new Error("unknown invocation type (".concat(t.switch(),"): ").concat(JSON.stringify(t)))}return r.invocations=e.subInvocations().map((function(e){return Rn(e)})),r}function Cn(e,t){Un(e,1,t)}function Un(e,t,r,n){!1!==r(e,t,n)&&e.subInvocations().forEach((function(n){return Un(n,t+1,r,e)}))}const Nn=(e=r.hmd(e)).exports},5360:(e,t)=>{"use strict";var r=function(e,t){return t||(t={}),e.split("").forEach((function(e,r){e in t||(t[e]=r)})),t},n={alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",charmap:{0:14,1:8}};n.charmap=r(n.alphabet,n.charmap);var o={alphabet:"0123456789ABCDEFGHJKMNPQRSTVWXYZ",charmap:{O:0,I:1,L:1}};o.charmap=r(o.alphabet,o.charmap);var i={alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",charmap:{}};function a(e){if(this.buf=[],this.shift=8,this.carry=0,e){switch(e.type){case"rfc4648":this.charmap=t.rfc4648.charmap;break;case"crockford":this.charmap=t.crockford.charmap;break;case"base32hex":this.charmap=t.base32hex.charmap;break;default:throw new Error("invalid type")}e.charmap&&(this.charmap=e.charmap)}}function s(e){if(this.buf="",this.shift=3,this.carry=0,e){switch(e.type){case"rfc4648":this.alphabet=t.rfc4648.alphabet;break;case"crockford":this.alphabet=t.crockford.alphabet;break;case"base32hex":this.alphabet=t.base32hex.alphabet;break;default:throw new Error("invalid type")}e.alphabet?this.alphabet=e.alphabet:e.lc&&(this.alphabet=this.alphabet.toLowerCase())}}i.charmap=r(i.alphabet,i.charmap),a.prototype.charmap=n.charmap,a.prototype.write=function(e){var t=this.charmap,r=this.buf,n=this.shift,o=this.carry;return e.toUpperCase().split("").forEach((function(e){if("="!=e){var i=255&t[e];(n-=5)>0?o|=i<<n:n<0?(r.push(o|i>>-n),o=i<<(n+=8)&255):(r.push(o|i),n=8,o=0)}})),this.shift=n,this.carry=o,this},a.prototype.finalize=function(e){return e&&this.write(e),8!==this.shift&&0!==this.carry&&(this.buf.push(this.carry),this.shift=8,this.carry=0),this.buf},s.prototype.alphabet=n.alphabet,s.prototype.write=function(e){var t,r,n,o=this.shift,i=this.carry;for(n=0;n<e.length;n++)t=i|(r=e[n])>>o,this.buf+=this.alphabet[31&t],o>5&&(t=r>>(o-=5),this.buf+=this.alphabet[31&t]),i=r<<(o=5-o),o=8-o;return this.shift=o,this.carry=i,this},s.prototype.finalize=function(e){return e&&this.write(e),3!==this.shift&&(this.buf+=this.alphabet[31&this.carry],this.shift=3,this.carry=0),this.buf},t.encode=function(e,t){return new s(t).finalize(e)},t.decode=function(e,t){return new a(t).finalize(e)},t.Decoder=a,t.Encoder=s,t.charmap=r,t.crockford=o,t.rfc4648=n,t.base32hex=i},7526:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=s(e),a=i[0],u=i[1],c=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,u)),l=0,f=u>0?a-4:a;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t);1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=16383,s=0,c=n-o;s<c;s+=a)i.push(u(e,s,s+a>c?c:s+a));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=i[a],n[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var o,i,a=[],s=t;s<n;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8287:(e,t,r)=>{"use strict";var n=r(6763);const o=r(7526),i=r(251),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function u(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return p(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=u(r);const o=n.write(e,t);o!==r&&(n=n.slice(0,o));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){const t=new Uint8Array(e);return y(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return y(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return y(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const o=function(e){if(c.isBuffer(e)){const t=0|d(e.length),r=u(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||J(e.length)?u(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function p(e){return f(e),u(e<0?0:0|d(e))}function h(e){const t=e.length<0?0:0|d(e.length),r=u(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function y(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,c.prototype),n}function d(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function m(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(e).length;default:if(o)return n?-1:$(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return B(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return _(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:w(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function w(e,t,r,n,o){let i,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let n=-1;for(i=r;i<s;i++)if(c(e,i)===c(t,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===u)return n*a}else-1!==n&&(i-=i-n),n=-1}else for(r+u>s&&(r=s-u),i=r;i>=0;i--){let r=!0;for(let n=0;n<u;n++)if(c(e,i+n)!==c(t,n)){r=!1;break}if(r)return i}return-1}function S(e,t,r,n){r=Number(r)||0;const o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=t.length;let a;for(n>i/2&&(n=i/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(J(n))return a;e[r+a]=n}return a}function k(e,t,r,n){return G($(t,e.length-r),e,r,n)}function E(e,t,r,n){return G(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function A(e,t,r,n){return G(W(t),e,r,n)}function T(e,t,r,n){return G(function(e,t){let r,n,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?o.fromByteArray(e):o.fromByteArray(e.slice(t,r))}function P(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o<r;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=r){let r,n,s,u;switch(a){case 1:t<128&&(i=t);break;case 2:r=e[o+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(i=u));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(i=u));break;case 4:r=e[o+1],n=e[o+2],s=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(i=u))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=a}return function(e){const t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=x));return r}(n)}t.kMaxLength=s,c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||void 0===n||"function"!=typeof n.error||n.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return f(e),e<=0?u(e):void 0!==t?"string"==typeof r?u(e).fill(t,r):u(e).fill(t):u(e)}(e,t,r)},c.allocUnsafe=function(e){return p(e)},c.allocUnsafeSlow=function(e){return p(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=c.allocUnsafe(t);let o=0;for(r=0;r<e.length;++r){let t=e[r];if(Y(t,Uint8Array))o+t.length>n.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)v(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?P(this,0,e):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},a&&(c.prototype[a]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,o){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(i,a),u=this.slice(n,o),l=e.slice(t,r);for(let e=0;e<s;++e)if(u[e]!==l[e]){i=u[e],a=l[e];break}return i<a?-1:a<i?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return S(this,e,t,r);case"utf8":case"utf-8":return k(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const x=4096;function I(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function _(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function B(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=t;n<r;++n)o+=Z[e[n]];return o}function R(e,t,r){const n=e.slice(t,r);let o="";for(let e=0;e<n.length-1;e+=2)o+=String.fromCharCode(n[e]+256*n[e+1]);return o}function C(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function U(e,t,r,n,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function N(e,t,r,n,o){K(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function L(e,t,r,n,o){K(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function j(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function M(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),c.prototype.readBigUInt64BE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){U(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){U(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=Q((function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=Q((function(e,t=0){return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);U(this,e,t,r,n-1,-n)}let o=0,i=1,a=0;for(this[t]=255&e;++o<r&&(i*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/i|0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);U(this,e,t,r,n-1,-n)}let o=r-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i|0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=Q((function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=Q((function(e,t=0){return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return M(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return M(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const o=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},c.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{const i=c.isBuffer(e)?e:c.from(e,n),a=i.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=i[o%a]}return this};const D={};function V(e,t,r){D[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function q(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function K(e,t,r,n,o,i){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let o;throw o=i>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new D.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||z(t,e.length-(r+1))}(n,o,i)}function H(e,t){if("number"!=typeof e)throw new D.ERR_INVALID_ARG_TYPE(t,"number",e)}function z(e,t,r){if(Math.floor(e)!==e)throw H(e,r),new D.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}V("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),V("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),V("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=q(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=q(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n}),RangeError);const X=/[^+/0-9A-Za-z-_]/g;function $(e,t){let r;t=t||1/0;const n=e.length;let o=null;const i=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function W(e){return o.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(X,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function G(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const Z=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function Q(e){return"undefined"==typeof BigInt?ee:e}function ee(){throw new Error("BigInt not supported")}},8075:(e,t,r)=>{"use strict";var n=r(453),o=r(487),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},487:(e,t,r)=>{"use strict";var n=r(6743),o=r(453),i=r(6897),a=r(9675),s=o("%Function.prototype.apply%"),u=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||n.call(u,s),l=r(655),f=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=c(n,u,arguments);return i(t,1+f(0,e.length-(arguments.length-1)),!0)};var p=function(){return c(n,s,arguments)};l?l(e.exports,"apply",{value:p}):e.exports.apply=p},6763:(e,t,r)=>{var n=r(537),o=r(4148);function i(){return(new Date).getTime()}var a,s=Array.prototype.slice,u={};a=void 0!==r.g&&r.g.console?r.g.console:"undefined"!=typeof window&&window.console?window.console:{};for(var c=[[function(){},"log"],[function(){a.log.apply(a,arguments)},"info"],[function(){a.log.apply(a,arguments)},"warn"],[function(){a.warn.apply(a,arguments)},"error"],[function(e){u[e]=i()},"time"],[function(e){var t=u[e];if(!t)throw new Error("No such label: "+e);delete u[e];var r=i()-t;a.log(e+": "+r+"ms")},"timeEnd"],[function(){var e=new Error;e.name="Trace",e.message=n.format.apply(null,arguments),a.error(e.stack)},"trace"],[function(e){a.log(n.inspect(e)+"\n")},"dir"],[function(e){if(!e){var t=s.call(arguments,1);o.ok(!1,n.format.apply(null,t))}},"assert"]],l=0;l<c.length;l++){var f=c[l],p=f[0],h=f[1];a[h]||(a[h]=p)}e.exports=a},41:(e,t,r)=>{"use strict";var n=r(655),o=r(8068),i=r(9675),a=r(5795);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!a&&a(e,t);if(n)n(e,t,{configurable:null===c&&f?f.configurable:!c,enumerable:null===s&&f?f.enumerable:!s,value:r,writable:null===u&&f?f.writable:!u});else{if(!l&&(s||u||c))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},8452:(e,t,r)=>{"use strict";var n=r(1189),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(41),u=r(592)(),c=function(e,t,r,n){if(t in e)if(!0===n){if(e[t]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;u?s(e,t,r,!0):s(e,t,r)},l=function(e,t){var r=arguments.length>2?arguments[2]:{},i=n(t);o&&(i=a.call(i,Object.getOwnPropertySymbols(t)));for(var s=0;s<i.length;s+=1)c(e,i[s],t[i[s]],r[i[s]])};l.supportsDescriptors=!!u,e.exports=l},655:(e,t,r)=>{"use strict";var n=r(453)("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch(e){n=!1}e.exports=n},1237:e=>{"use strict";e.exports=EvalError},9383:e=>{"use strict";e.exports=Error},9290:e=>{"use strict";e.exports=RangeError},9538:e=>{"use strict";e.exports=ReferenceError},8068:e=>{"use strict";e.exports=SyntaxError},9675:e=>{"use strict";e.exports=TypeError},5345:e=>{"use strict";e.exports=URIError},2682:(e,t,r)=>{"use strict";var n=r(9600),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=r),"[object Array]"===o.call(e)?function(e,t,r){for(var n=0,o=e.length;n<o;n++)i.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,a):"string"==typeof e?function(e,t,r){for(var n=0,o=e.length;n<o;n++)null==r?t(e.charAt(n),n,e):t.call(r,e.charAt(n),n,e)}(e,t,a):function(e,t,r){for(var n in e)i.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,a)}},9353:e=>{"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r};e.exports=function(e){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r}(arguments,1),s=r(0,o.length-a.length),u=[],c=0;c<s;c++)u[c]="$"+c;if(i=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r}(u,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var t=o.apply(this,n(a,arguments));return Object(t)===t?t:this}return o.apply(e,n(a,arguments))})),o.prototype){var l=function(){};l.prototype=o.prototype,i.prototype=new l,l.prototype=null}return i}},6743:(e,t,r)=>{"use strict";var n=r(9353);e.exports=Function.prototype.bind||n},453:(e,t,r)=>{"use strict";var n,o=r(9383),i=r(1237),a=r(9290),s=r(9538),u=r(8068),c=r(9675),l=r(5345),f=Function,p=function(e){try{return f('"use strict"; return ('+e+").constructor;")()}catch(e){}},h=Object.getOwnPropertyDescriptor;if(h)try{h({},"")}catch(e){h=null}var y=function(){throw new c},d=h?function(){try{return y}catch(e){try{return h(arguments,"callee").get}catch(e){return y}}}():y,m=r(4039)(),g=r(24)(),v=Object.getPrototypeOf||(g?function(e){return e.__proto__}:null),b={},w="undefined"!=typeof Uint8Array&&v?v(Uint8Array):n,S={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":m&&v?v([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":f,"%GeneratorFunction%":b,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":m&&v?v(v([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&m&&v?v((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&m&&v?v((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":m&&v?v(""[Symbol.iterator]()):n,"%Symbol%":m?Symbol:n,"%SyntaxError%":u,"%ThrowTypeError%":d,"%TypedArray%":w,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(v)try{null.error}catch(e){var k=v(v(e));S["%Error.prototype%"]=k}var E=function e(t){var r;if("%AsyncFunction%"===t)r=p("async function () {}");else if("%GeneratorFunction%"===t)r=p("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=p("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(r=v(o.prototype))}return S[t]=r,r},A={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},T=r(6743),O=r(9957),P=T.call(Function.call,Array.prototype.concat),x=T.call(Function.apply,Array.prototype.splice),I=T.call(Function.call,String.prototype.replace),_=T.call(Function.call,String.prototype.slice),B=T.call(Function.call,RegExp.prototype.exec),R=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,C=/\\(\\)?/g,U=function(e,t){var r,n=e;if(O(A,n)&&(n="%"+(r=A[n])[0]+"%"),O(S,n)){var o=S[n];if(o===b&&(o=E(n)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new u("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===B(/^%?[^%]*%?$/,e))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=_(e,0,1),r=_(e,-1);if("%"===t&&"%"!==r)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new u("invalid intrinsic syntax, expected opening `%`");var n=[];return I(e,R,(function(e,t,r,o){n[n.length]=r?I(o,C,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",o=U("%"+n+"%",t),i=o.name,a=o.value,s=!1,l=o.alias;l&&(n=l[0],x(r,P([0,1],l)));for(var f=1,p=!0;f<r.length;f+=1){var y=r[f],d=_(y,0,1),m=_(y,-1);if(('"'===d||"'"===d||"`"===d||'"'===m||"'"===m||"`"===m)&&d!==m)throw new u("property names with quotes must have matching quotes");if("constructor"!==y&&p||(s=!0),O(S,i="%"+(n+="."+y)+"%"))a=S[i];else if(null!=a){if(!(y in a)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(h&&f+1>=r.length){var g=h(a,y);a=(p=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:a[y]}else p=O(a,y),a=a[y];p&&!s&&(S[i]=a)}}return a}},5795:(e,t,r)=>{"use strict";var n=r(453)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},592:(e,t,r)=>{"use strict";var n=r(655),o=function(){return!!n};o.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},24:e=>{"use strict";var t={__proto__:null,foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof r)}},4039:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(1333);e.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},1333:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9092:(e,t,r)=>{"use strict";var n=r(1333);e.exports=function(){return n()&&!!Symbol.toStringTag}},9957:(e,t,r)=>{"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=r(6743);e.exports=i.call(n,o)},251:(e,t)=>{t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?o-1:0,p=r?-1:1,h=e[t+f];for(f+=p,i=h&(1<<-l)-1,h>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=p,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+e[t+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),i-=c}return(h?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,f=l>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,y=n?1:-1,d=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[r+h]=255&s,h+=y,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[r+h]=255&a,h+=y,a/=256,c-=8);e[r+h-y]|=128*d}},6698:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},7244:(e,t,r)=>{"use strict";var n=r(9092)(),o=r(8075)("Object.prototype.toString"),i=function(e){return!(n&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===o(e)},a=function(e){return!!i(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==o(e)&&"[object Function]"===o(e.callee)},s=function(){return i(arguments)}();i.isLegacyArguments=a,e.exports=s?i:a},9600:e=>{"use strict";var t,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,t)}catch(e){e!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(e){try{var t=n.call(e);return i.test(t)}catch(e){return!1}},s=function(e){try{return!a(e)&&(n.call(e),!0)}catch(e){return!1}},u=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;u.call(p)===u.call(document.all)&&(f=function(e){if((l||!e)&&(void 0===e||"object"==typeof e))try{var t=u.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=o?function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,t)}catch(e){if(e!==r)return!1}return!a(e)&&s(e)}:function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(c)return s(e);if(a(e))return!1;var t=u.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&s(e)}},8184:(e,t,r)=>{"use strict";var n,o=Object.prototype.toString,i=Function.prototype.toString,a=/^\s*(?:function)?\*/,s=r(9092)(),u=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(a.test(i.call(e)))return!0;if(!s)return"[object GeneratorFunction]"===o.call(e);if(!u)return!1;if(void 0===n){var t=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&u(t)}return u(e)===n}},3003:e=>{"use strict";e.exports=function(e){return e!=e}},4133:(e,t,r)=>{"use strict";var n=r(487),o=r(8452),i=r(3003),a=r(6642),s=r(2464),u=n(a(),Number);o(u,{getPolyfill:a,implementation:i,shim:s}),e.exports=u},6642:(e,t,r)=>{"use strict";var n=r(3003);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},2464:(e,t,r)=>{"use strict";var n=r(8452),o=r(6642);e.exports=function(){var e=o();return n(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},5680:(e,t,r)=>{"use strict";var n=r(5767);e.exports=function(e){return!!n(e)}},9211:e=>{"use strict";var t=function(e){return e!=e};e.exports=function(e,r){return 0===e&&0===r?1/e==1/r:e===r||!(!t(e)||!t(r))}},7653:(e,t,r)=>{"use strict";var n=r(8452),o=r(487),i=r(9211),a=r(9394),s=r(6576),u=o(a(),Object);n(u,{getPolyfill:a,implementation:i,shim:s}),e.exports=u},9394:(e,t,r)=>{"use strict";var n=r(9211);e.exports=function(){return"function"==typeof Object.is?Object.is:n}},6576:(e,t,r)=>{"use strict";var n=r(9394),o=r(8452);e.exports=function(){var e=n();return o(Object,{is:e},{is:function(){return Object.is!==e}}),e}},8875:(e,t,r)=>{"use strict";var n;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=r(1093),s=Object.prototype.propertyIsEnumerable,u=!s.call({toString:null},"toString"),c=s.call((function(){}),"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(e){var t=e.constructor;return t&&t.prototype===e},p={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!p["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{f(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===i.call(e),n=a(e),s=t&&"[object String]"===i.call(e),p=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var y=c&&r;if(s&&e.length>0&&!o.call(e,0))for(var d=0;d<e.length;++d)p.push(String(d));if(n&&e.length>0)for(var m=0;m<e.length;++m)p.push(String(m));else for(var g in e)y&&"prototype"===g||!o.call(e,g)||p.push(String(g));if(u)for(var v=function(e){if("undefined"==typeof window||!h)return f(e);try{return f(e)}catch(e){return!1}}(e),b=0;b<l.length;++b)v&&"constructor"===l[b]||!o.call(e,l[b])||p.push(l[b]);return p}}e.exports=n},1189:(e,t,r)=>{"use strict";var n=Array.prototype.slice,o=r(1093),i=Object.keys,a=i?function(e){return i(e)}:r(8875),s=Object.keys;a.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return o(e)?s(n.call(e)):s(e)})}else Object.keys=a;return Object.keys||a},e.exports=a},1093:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},8403:(e,t,r)=>{"use strict";var n=r(1189),o=r(1333)(),i=r(8075),a=Object,s=i("Array.prototype.push"),u=i("Object.prototype.propertyIsEnumerable"),c=o?Object.getOwnPropertySymbols:null;e.exports=function(e,t){if(null==e)throw new TypeError("target must be an object");var r=a(e);if(1===arguments.length)return r;for(var i=1;i<arguments.length;++i){var l=a(arguments[i]),f=n(l),p=o&&(Object.getOwnPropertySymbols||c);if(p)for(var h=p(l),y=0;y<h.length;++y){var d=h[y];u(l,d)&&s(f,d)}for(var m=0;m<f.length;++m){var g=f[m];if(u(l,g)){var v=l[g];r[g]=v}}}return r}},1514:(e,t,r)=>{"use strict";var n=r(8403);e.exports=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},n=0;n<t.length;++n)r[t[n]]=t[n];var o=Object.assign({},r),i="";for(var a in o)i+=a;return e!==i}()||function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch(t){return"y"===e[1]}return!1}()?n:Object.assign:n}},6578:e=>{"use strict";e.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},5606:e=>{var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,u=[],c=!1,l=-1;function f(){c&&s&&(c=!1,s.length?u=s.concat(u):l=-1,u.length&&p())}function p(){if(!c){var e=a(f);c=!0;for(var t=u.length;t;){for(s=u,u=[];++l<t;)s&&s[l].run();l=-1,t=u.length}s=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function y(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new h(e,t)),1!==u.length||c||a(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=y,n.addListener=y,n.once=y,n.off=y,n.removeListener=y,n.removeAllListeners=y,n.emit=y,n.prependListener=y,n.prependOnceListener=y,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},2861:(e,t,r)=>{var n=r(8287),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=a),a.prototype=Object.create(o.prototype),i(o,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},6897:(e,t,r)=>{"use strict";var n=r(453),o=r(41),i=r(592)(),a=r(5795),s=r(9675),u=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||u(t)!==t)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,c=!0;if("length"in e&&a){var l=a(e,"length");l&&!l.configurable&&(n=!1),l&&!l.writable&&(c=!1)}return(n||c||!r)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},392:(e,t,r)=>{var n=r(2861).Buffer;function o(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}o.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,o=this._blockSize,i=e.length,a=this._len,s=0;s<i;){for(var u=a%o,c=Math.min(i-s,o-u),l=0;l<c;l++)r[u+l]=e[s+l];s+=c,(a+=c)%o==0&&this._update(r)}return this._len+=i,this},o.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,o=(r-n)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},o.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=o},2802:(e,t,r)=>{var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(7816),n.sha1=r(3737),n.sha224=r(6710),n.sha256=r(4107),n.sha384=r(2827),n.sha512=r(2890)},7816:(e,t,r)=>{var n=r(6698),o=r(392),i=r(2861).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,o.call(this,64,56)}function c(e){return e<<30|e>>>2}function l(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,o),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,o=0|this._b,i=0|this._c,s=0|this._d,u=0|this._e,f=0;f<16;++f)r[f]=e.readInt32BE(4*f);for(;f<80;++f)r[f]=r[f-3]^r[f-8]^r[f-14]^r[f-16];for(var p=0;p<80;++p){var h=~~(p/20),y=0|((t=n)<<5|t>>>27)+l(h,o,i,s)+u+r[p]+a[h];u=s,s=i,i=c(o),o=n,n=y}this._a=n+this._a|0,this._b=o+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=i.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},3737:(e,t,r)=>{var n=r(6698),o=r(392),i=r(2861).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,o.call(this,64,56)}function c(e){return e<<5|e>>>27}function l(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,o),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,o=0|this._b,i=0|this._c,s=0|this._d,u=0|this._e,p=0;p<16;++p)r[p]=e.readInt32BE(4*p);for(;p<80;++p)r[p]=(t=r[p-3]^r[p-8]^r[p-14]^r[p-16])<<1|t>>>31;for(var h=0;h<80;++h){var y=~~(h/20),d=c(n)+f(y,o,i,s)+u+r[h]+a[y]|0;u=s,s=i,i=l(o),o=n,n=d}this._a=n+this._a|0,this._b=o+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=i.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},6710:(e,t,r)=>{var n=r(6698),o=r(4107),i=r(392),a=r(2861).Buffer,s=new Array(64);function u(){this.init(),this._w=s,i.call(this,64,56)}n(u,o),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},4107:(e,t,r)=>{var n=r(6698),o=r(392),i=r(2861).Buffer,a=[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],s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function f(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function p(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(u,o),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,o=0|this._b,i=0|this._c,s=0|this._d,u=0|this._e,y=0|this._f,d=0|this._g,m=0|this._h,g=0;g<16;++g)r[g]=e.readInt32BE(4*g);for(;g<64;++g)r[g]=0|(((t=r[g-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[g-7]+h(r[g-15])+r[g-16];for(var v=0;v<64;++v){var b=m+p(u)+c(u,y,d)+a[v]+r[v]|0,w=f(n)+l(n,o,i)|0;m=d,d=y,y=u,u=s+b|0,s=i,i=o,o=n,n=b+w|0}this._a=n+this._a|0,this._b=o+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=y+this._f|0,this._g=d+this._g|0,this._h=m+this._h|0},u.prototype._hash=function(){var e=i.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},2827:(e,t,r)=>{var n=r(6698),o=r(2890),i=r(392),a=r(2861).Buffer,s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}n(u,o),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=u},2890:(e,t,r)=>{var n=r(6698),o=r(392),i=r(2861).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function f(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function p(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function y(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function d(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function g(e,t){return e>>>0<t>>>0?1:0}n(u,o),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,o=0|this._ch,i=0|this._dh,s=0|this._eh,u=0|this._fh,v=0|this._gh,b=0|this._hh,w=0|this._al,S=0|this._bl,k=0|this._cl,E=0|this._dl,A=0|this._el,T=0|this._fl,O=0|this._gl,P=0|this._hl,x=0;x<32;x+=2)t[x]=e.readInt32BE(4*x),t[x+1]=e.readInt32BE(4*x+4);for(;x<160;x+=2){var I=t[x-30],_=t[x-30+1],B=h(I,_),R=y(_,I),C=d(I=t[x-4],_=t[x-4+1]),U=m(_,I),N=t[x-14],L=t[x-14+1],j=t[x-32],M=t[x-32+1],F=R+L|0,D=B+N+g(F,R)|0;D=(D=D+C+g(F=F+U|0,U)|0)+j+g(F=F+M|0,M)|0,t[x]=D,t[x+1]=F}for(var V=0;V<160;V+=2){D=t[V],F=t[V+1];var q=l(r,n,o),K=l(w,S,k),H=f(r,w),z=f(w,r),X=p(s,A),$=p(A,s),W=a[V],G=a[V+1],Y=c(s,u,v),J=c(A,T,O),Z=P+$|0,Q=b+X+g(Z,P)|0;Q=(Q=(Q=Q+Y+g(Z=Z+J|0,J)|0)+W+g(Z=Z+G|0,G)|0)+D+g(Z=Z+F|0,F)|0;var ee=z+K|0,te=H+q+g(ee,z)|0;b=v,P=O,v=u,O=T,u=s,T=A,s=i+Q+g(A=E+Z|0,E)|0,i=o,E=k,o=n,k=S,n=r,S=w,r=Q+te+g(w=Z+ee|0,Z)|0}this._al=this._al+w|0,this._bl=this._bl+S|0,this._cl=this._cl+k|0,this._dl=this._dl+E|0,this._el=this._el+A|0,this._fl=this._fl+T|0,this._gl=this._gl+O|0,this._hl=this._hl+P|0,this._ah=this._ah+r+g(this._al,w)|0,this._bh=this._bh+n+g(this._bl,S)|0,this._ch=this._ch+o+g(this._cl,k)|0,this._dh=this._dh+i+g(this._dl,E)|0,this._eh=this._eh+s+g(this._el,A)|0,this._fh=this._fh+u+g(this._fl,T)|0,this._gh=this._gh+v+g(this._gl,O)|0,this._hh=this._hh+b+g(this._hl,P)|0},u.prototype._hash=function(){var e=i.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},8947:(e,t,r)=>{!function(e){"use strict";var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},n=function(){throw new Error("no PRNG")},o=new Uint8Array(16),i=new Uint8Array(32);i[0]=9;var a=t(),s=t([1]),u=t([56129,1]),c=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),l=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),f=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),p=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),h=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function y(e,t,r,n){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function d(e,t,r,n,o){var i,a=0;for(i=0;i<o;i++)a|=e[t+i]^r[n+i];return(1&a-1>>>8)-1}function m(e,t,r,n){return d(e,t,r,n,16)}function g(e,t,r,n){return d(e,t,r,n,32)}function v(e,t,r,n){!function(e,t,r,n){for(var o,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,p=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,y=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,d=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,g=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,v=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,S=i,k=a,E=s,A=u,T=c,O=l,P=f,x=p,I=h,_=y,B=d,R=m,C=g,U=v,N=b,L=w,j=0;j<20;j+=2)S^=(o=(C^=(o=(I^=(o=(T^=(o=S+C|0)<<7|o>>>25)+S|0)<<9|o>>>23)+T|0)<<13|o>>>19)+I|0)<<18|o>>>14,O^=(o=(k^=(o=(U^=(o=(_^=(o=O+k|0)<<7|o>>>25)+O|0)<<9|o>>>23)+_|0)<<13|o>>>19)+U|0)<<18|o>>>14,B^=(o=(P^=(o=(E^=(o=(N^=(o=B+P|0)<<7|o>>>25)+B|0)<<9|o>>>23)+N|0)<<13|o>>>19)+E|0)<<18|o>>>14,L^=(o=(R^=(o=(x^=(o=(A^=(o=L+R|0)<<7|o>>>25)+L|0)<<9|o>>>23)+A|0)<<13|o>>>19)+x|0)<<18|o>>>14,S^=(o=(A^=(o=(E^=(o=(k^=(o=S+A|0)<<7|o>>>25)+S|0)<<9|o>>>23)+k|0)<<13|o>>>19)+E|0)<<18|o>>>14,O^=(o=(T^=(o=(x^=(o=(P^=(o=O+T|0)<<7|o>>>25)+O|0)<<9|o>>>23)+P|0)<<13|o>>>19)+x|0)<<18|o>>>14,B^=(o=(_^=(o=(I^=(o=(R^=(o=B+_|0)<<7|o>>>25)+B|0)<<9|o>>>23)+R|0)<<13|o>>>19)+I|0)<<18|o>>>14,L^=(o=(N^=(o=(U^=(o=(C^=(o=L+N|0)<<7|o>>>25)+L|0)<<9|o>>>23)+C|0)<<13|o>>>19)+U|0)<<18|o>>>14;S=S+i|0,k=k+a|0,E=E+s|0,A=A+u|0,T=T+c|0,O=O+l|0,P=P+f|0,x=x+p|0,I=I+h|0,_=_+y|0,B=B+d|0,R=R+m|0,C=C+g|0,U=U+v|0,N=N+b|0,L=L+w|0,e[0]=S>>>0&255,e[1]=S>>>8&255,e[2]=S>>>16&255,e[3]=S>>>24&255,e[4]=k>>>0&255,e[5]=k>>>8&255,e[6]=k>>>16&255,e[7]=k>>>24&255,e[8]=E>>>0&255,e[9]=E>>>8&255,e[10]=E>>>16&255,e[11]=E>>>24&255,e[12]=A>>>0&255,e[13]=A>>>8&255,e[14]=A>>>16&255,e[15]=A>>>24&255,e[16]=T>>>0&255,e[17]=T>>>8&255,e[18]=T>>>16&255,e[19]=T>>>24&255,e[20]=O>>>0&255,e[21]=O>>>8&255,e[22]=O>>>16&255,e[23]=O>>>24&255,e[24]=P>>>0&255,e[25]=P>>>8&255,e[26]=P>>>16&255,e[27]=P>>>24&255,e[28]=x>>>0&255,e[29]=x>>>8&255,e[30]=x>>>16&255,e[31]=x>>>24&255,e[32]=I>>>0&255,e[33]=I>>>8&255,e[34]=I>>>16&255,e[35]=I>>>24&255,e[36]=_>>>0&255,e[37]=_>>>8&255,e[38]=_>>>16&255,e[39]=_>>>24&255,e[40]=B>>>0&255,e[41]=B>>>8&255,e[42]=B>>>16&255,e[43]=B>>>24&255,e[44]=R>>>0&255,e[45]=R>>>8&255,e[46]=R>>>16&255,e[47]=R>>>24&255,e[48]=C>>>0&255,e[49]=C>>>8&255,e[50]=C>>>16&255,e[51]=C>>>24&255,e[52]=U>>>0&255,e[53]=U>>>8&255,e[54]=U>>>16&255,e[55]=U>>>24&255,e[56]=N>>>0&255,e[57]=N>>>8&255,e[58]=N>>>16&255,e[59]=N>>>24&255,e[60]=L>>>0&255,e[61]=L>>>8&255,e[62]=L>>>16&255,e[63]=L>>>24&255}(e,t,r,n)}function b(e,t,r,n){!function(e,t,r,n){for(var o,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,p=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,y=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,d=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,g=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,v=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,S=0;S<20;S+=2)i^=(o=(g^=(o=(h^=(o=(c^=(o=i+g|0)<<7|o>>>25)+i|0)<<9|o>>>23)+c|0)<<13|o>>>19)+h|0)<<18|o>>>14,l^=(o=(a^=(o=(v^=(o=(y^=(o=l+a|0)<<7|o>>>25)+l|0)<<9|o>>>23)+y|0)<<13|o>>>19)+v|0)<<18|o>>>14,d^=(o=(f^=(o=(s^=(o=(b^=(o=d+f|0)<<7|o>>>25)+d|0)<<9|o>>>23)+b|0)<<13|o>>>19)+s|0)<<18|o>>>14,w^=(o=(m^=(o=(p^=(o=(u^=(o=w+m|0)<<7|o>>>25)+w|0)<<9|o>>>23)+u|0)<<13|o>>>19)+p|0)<<18|o>>>14,i^=(o=(u^=(o=(s^=(o=(a^=(o=i+u|0)<<7|o>>>25)+i|0)<<9|o>>>23)+a|0)<<13|o>>>19)+s|0)<<18|o>>>14,l^=(o=(c^=(o=(p^=(o=(f^=(o=l+c|0)<<7|o>>>25)+l|0)<<9|o>>>23)+f|0)<<13|o>>>19)+p|0)<<18|o>>>14,d^=(o=(y^=(o=(h^=(o=(m^=(o=d+y|0)<<7|o>>>25)+d|0)<<9|o>>>23)+m|0)<<13|o>>>19)+h|0)<<18|o>>>14,w^=(o=(b^=(o=(v^=(o=(g^=(o=w+b|0)<<7|o>>>25)+w|0)<<9|o>>>23)+g|0)<<13|o>>>19)+v|0)<<18|o>>>14;e[0]=i>>>0&255,e[1]=i>>>8&255,e[2]=i>>>16&255,e[3]=i>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=d>>>0&255,e[9]=d>>>8&255,e[10]=d>>>16&255,e[11]=d>>>24&255,e[12]=w>>>0&255,e[13]=w>>>8&255,e[14]=w>>>16&255,e[15]=w>>>24&255,e[16]=f>>>0&255,e[17]=f>>>8&255,e[18]=f>>>16&255,e[19]=f>>>24&255,e[20]=p>>>0&255,e[21]=p>>>8&255,e[22]=p>>>16&255,e[23]=p>>>24&255,e[24]=h>>>0&255,e[25]=h>>>8&255,e[26]=h>>>16&255,e[27]=h>>>24&255,e[28]=y>>>0&255,e[29]=y>>>8&255,e[30]=y>>>16&255,e[31]=y>>>24&255}(e,t,r,n)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function S(e,t,r,n,o,i,a){var s,u,c=new Uint8Array(16),l=new Uint8Array(64);for(u=0;u<16;u++)c[u]=0;for(u=0;u<8;u++)c[u]=i[u];for(;o>=64;){for(v(l,c,a,w),u=0;u<64;u++)e[t+u]=r[n+u]^l[u];for(s=1,u=8;u<16;u++)s=s+(255&c[u])|0,c[u]=255&s,s>>>=8;o-=64,t+=64,n+=64}if(o>0)for(v(l,c,a,w),u=0;u<o;u++)e[t+u]=r[n+u]^l[u];return 0}function k(e,t,r,n,o){var i,a,s=new Uint8Array(16),u=new Uint8Array(64);for(a=0;a<16;a++)s[a]=0;for(a=0;a<8;a++)s[a]=n[a];for(;r>=64;){for(v(u,s,o,w),a=0;a<64;a++)e[t+a]=u[a];for(i=1,a=8;a<16;a++)i=i+(255&s[a])|0,s[a]=255&i,i>>>=8;r-=64,t+=64}if(r>0)for(v(u,s,o,w),a=0;a<r;a++)e[t+a]=u[a];return 0}function E(e,t,r,n,o){var i=new Uint8Array(32);b(i,n,o,w);for(var a=new Uint8Array(8),s=0;s<8;s++)a[s]=n[s+16];return k(e,t,r,a,i)}function A(e,t,r,n,o,i,a){var s=new Uint8Array(32);b(s,i,a,w);for(var u=new Uint8Array(8),c=0;c<8;c++)u[c]=i[c+16];return S(e,t,r,n,o,u,s)}var T=function(e){var t,r,n,o,i,a,s,u;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,r=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),o=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|o<<9),i=255&e[8]|(255&e[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,a=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(i>>>14|a<<2),s=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(a>>>11|s<<5),u=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(s>>>8|u<<8),this.r[9]=u>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function O(e,t,r,n,o,i){var a=new T(i);return a.update(r,n,o),a.finish(e,t),0}function P(e,t,r,n,o,i){var a=new Uint8Array(16);return O(a,0,r,n,o,i),m(e,t,a,0)}function x(e,t,r,n,o){var i;if(r<32)return-1;for(A(e,0,t,0,r,n,o),O(e,16,e,32,r-32,e),i=0;i<16;i++)e[i]=0;return 0}function I(e,t,r,n,o){var i,a=new Uint8Array(32);if(r<32)return-1;if(E(a,0,32,n,o),0!==P(t,16,t,32,r-32,a))return-1;for(A(e,0,t,0,r,n,o),i=0;i<32;i++)e[i]=0;return 0}function _(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function B(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function R(e,t,r){for(var n,o=~(r-1),i=0;i<16;i++)n=o&(e[i]^t[i]),e[i]^=n,t[i]^=n}function C(e,r){var n,o,i,a=t(),s=t();for(n=0;n<16;n++)s[n]=r[n];for(B(s),B(s),B(s),o=0;o<2;o++){for(a[0]=s[0]-65517,n=1;n<15;n++)a[n]=s[n]-65535-(a[n-1]>>16&1),a[n-1]&=65535;a[15]=s[15]-32767-(a[14]>>16&1),i=a[15]>>16&1,a[14]&=65535,R(s,a,1-i)}for(n=0;n<16;n++)e[2*n]=255&s[n],e[2*n+1]=s[n]>>8}function U(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return C(r,e),C(n,t),g(r,0,n,0)}function N(e){var t=new Uint8Array(32);return C(t,e),1&t[0]}function L(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function j(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function M(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function F(e,t,r){var n,o,i=0,a=0,s=0,u=0,c=0,l=0,f=0,p=0,h=0,y=0,d=0,m=0,g=0,v=0,b=0,w=0,S=0,k=0,E=0,A=0,T=0,O=0,P=0,x=0,I=0,_=0,B=0,R=0,C=0,U=0,N=0,L=r[0],j=r[1],M=r[2],F=r[3],D=r[4],V=r[5],q=r[6],K=r[7],H=r[8],z=r[9],X=r[10],$=r[11],W=r[12],G=r[13],Y=r[14],J=r[15];i+=(n=t[0])*L,a+=n*j,s+=n*M,u+=n*F,c+=n*D,l+=n*V,f+=n*q,p+=n*K,h+=n*H,y+=n*z,d+=n*X,m+=n*$,g+=n*W,v+=n*G,b+=n*Y,w+=n*J,a+=(n=t[1])*L,s+=n*j,u+=n*M,c+=n*F,l+=n*D,f+=n*V,p+=n*q,h+=n*K,y+=n*H,d+=n*z,m+=n*X,g+=n*$,v+=n*W,b+=n*G,w+=n*Y,S+=n*J,s+=(n=t[2])*L,u+=n*j,c+=n*M,l+=n*F,f+=n*D,p+=n*V,h+=n*q,y+=n*K,d+=n*H,m+=n*z,g+=n*X,v+=n*$,b+=n*W,w+=n*G,S+=n*Y,k+=n*J,u+=(n=t[3])*L,c+=n*j,l+=n*M,f+=n*F,p+=n*D,h+=n*V,y+=n*q,d+=n*K,m+=n*H,g+=n*z,v+=n*X,b+=n*$,w+=n*W,S+=n*G,k+=n*Y,E+=n*J,c+=(n=t[4])*L,l+=n*j,f+=n*M,p+=n*F,h+=n*D,y+=n*V,d+=n*q,m+=n*K,g+=n*H,v+=n*z,b+=n*X,w+=n*$,S+=n*W,k+=n*G,E+=n*Y,A+=n*J,l+=(n=t[5])*L,f+=n*j,p+=n*M,h+=n*F,y+=n*D,d+=n*V,m+=n*q,g+=n*K,v+=n*H,b+=n*z,w+=n*X,S+=n*$,k+=n*W,E+=n*G,A+=n*Y,T+=n*J,f+=(n=t[6])*L,p+=n*j,h+=n*M,y+=n*F,d+=n*D,m+=n*V,g+=n*q,v+=n*K,b+=n*H,w+=n*z,S+=n*X,k+=n*$,E+=n*W,A+=n*G,T+=n*Y,O+=n*J,p+=(n=t[7])*L,h+=n*j,y+=n*M,d+=n*F,m+=n*D,g+=n*V,v+=n*q,b+=n*K,w+=n*H,S+=n*z,k+=n*X,E+=n*$,A+=n*W,T+=n*G,O+=n*Y,P+=n*J,h+=(n=t[8])*L,y+=n*j,d+=n*M,m+=n*F,g+=n*D,v+=n*V,b+=n*q,w+=n*K,S+=n*H,k+=n*z,E+=n*X,A+=n*$,T+=n*W,O+=n*G,P+=n*Y,x+=n*J,y+=(n=t[9])*L,d+=n*j,m+=n*M,g+=n*F,v+=n*D,b+=n*V,w+=n*q,S+=n*K,k+=n*H,E+=n*z,A+=n*X,T+=n*$,O+=n*W,P+=n*G,x+=n*Y,I+=n*J,d+=(n=t[10])*L,m+=n*j,g+=n*M,v+=n*F,b+=n*D,w+=n*V,S+=n*q,k+=n*K,E+=n*H,A+=n*z,T+=n*X,O+=n*$,P+=n*W,x+=n*G,I+=n*Y,_+=n*J,m+=(n=t[11])*L,g+=n*j,v+=n*M,b+=n*F,w+=n*D,S+=n*V,k+=n*q,E+=n*K,A+=n*H,T+=n*z,O+=n*X,P+=n*$,x+=n*W,I+=n*G,_+=n*Y,B+=n*J,g+=(n=t[12])*L,v+=n*j,b+=n*M,w+=n*F,S+=n*D,k+=n*V,E+=n*q,A+=n*K,T+=n*H,O+=n*z,P+=n*X,x+=n*$,I+=n*W,_+=n*G,B+=n*Y,R+=n*J,v+=(n=t[13])*L,b+=n*j,w+=n*M,S+=n*F,k+=n*D,E+=n*V,A+=n*q,T+=n*K,O+=n*H,P+=n*z,x+=n*X,I+=n*$,_+=n*W,B+=n*G,R+=n*Y,C+=n*J,b+=(n=t[14])*L,w+=n*j,S+=n*M,k+=n*F,E+=n*D,A+=n*V,T+=n*q,O+=n*K,P+=n*H,x+=n*z,I+=n*X,_+=n*$,B+=n*W,R+=n*G,C+=n*Y,U+=n*J,w+=(n=t[15])*L,a+=38*(k+=n*M),s+=38*(E+=n*F),u+=38*(A+=n*D),c+=38*(T+=n*V),l+=38*(O+=n*q),f+=38*(P+=n*K),p+=38*(x+=n*H),h+=38*(I+=n*z),y+=38*(_+=n*X),d+=38*(B+=n*$),m+=38*(R+=n*W),g+=38*(C+=n*G),v+=38*(U+=n*Y),b+=38*(N+=n*J),i=(n=(i+=38*(S+=n*j))+(o=1)+65535)-65536*(o=Math.floor(n/65536)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+o+65535)-65536*(o=Math.floor(n/65536)),u=(n=u+o+65535)-65536*(o=Math.floor(n/65536)),c=(n=c+o+65535)-65536*(o=Math.floor(n/65536)),l=(n=l+o+65535)-65536*(o=Math.floor(n/65536)),f=(n=f+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),m=(n=m+o+65535)-65536*(o=Math.floor(n/65536)),g=(n=g+o+65535)-65536*(o=Math.floor(n/65536)),v=(n=v+o+65535)-65536*(o=Math.floor(n/65536)),b=(n=b+o+65535)-65536*(o=Math.floor(n/65536)),w=(n=w+o+65535)-65536*(o=Math.floor(n/65536)),i=(n=(i+=o-1+37*(o-1))+(o=1)+65535)-65536*(o=Math.floor(n/65536)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+o+65535)-65536*(o=Math.floor(n/65536)),u=(n=u+o+65535)-65536*(o=Math.floor(n/65536)),c=(n=c+o+65535)-65536*(o=Math.floor(n/65536)),l=(n=l+o+65535)-65536*(o=Math.floor(n/65536)),f=(n=f+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),m=(n=m+o+65535)-65536*(o=Math.floor(n/65536)),g=(n=g+o+65535)-65536*(o=Math.floor(n/65536)),v=(n=v+o+65535)-65536*(o=Math.floor(n/65536)),b=(n=b+o+65535)-65536*(o=Math.floor(n/65536)),w=(n=w+o+65535)-65536*(o=Math.floor(n/65536)),i+=o-1+37*(o-1),e[0]=i,e[1]=a,e[2]=s,e[3]=u,e[4]=c,e[5]=l,e[6]=f,e[7]=p,e[8]=h,e[9]=y,e[10]=d,e[11]=m,e[12]=g,e[13]=v,e[14]=b,e[15]=w}function D(e,t){F(e,t,t)}function V(e,r){var n,o=t();for(n=0;n<16;n++)o[n]=r[n];for(n=253;n>=0;n--)D(o,o),2!==n&&4!==n&&F(o,o,r);for(n=0;n<16;n++)e[n]=o[n]}function q(e,r){var n,o=t();for(n=0;n<16;n++)o[n]=r[n];for(n=250;n>=0;n--)D(o,o),1!==n&&F(o,o,r);for(n=0;n<16;n++)e[n]=o[n]}function K(e,r,n){var o,i,a=new Uint8Array(32),s=new Float64Array(80),c=t(),l=t(),f=t(),p=t(),h=t(),y=t();for(i=0;i<31;i++)a[i]=r[i];for(a[31]=127&r[31]|64,a[0]&=248,L(s,n),i=0;i<16;i++)l[i]=s[i],p[i]=c[i]=f[i]=0;for(c[0]=p[0]=1,i=254;i>=0;--i)R(c,l,o=a[i>>>3]>>>(7&i)&1),R(f,p,o),j(h,c,f),M(c,c,f),j(f,l,p),M(l,l,p),D(p,h),D(y,c),F(c,f,c),F(f,l,h),j(h,c,f),M(c,c,f),D(l,c),M(f,p,y),F(c,f,u),j(c,c,p),F(f,f,c),F(c,p,y),F(p,l,s),D(l,h),R(c,l,o),R(f,p,o);for(i=0;i<16;i++)s[i+16]=c[i],s[i+32]=f[i],s[i+48]=l[i],s[i+64]=p[i];var d=s.subarray(32),m=s.subarray(16);return V(d,d),F(m,m,d),C(e,m),0}function H(e,t){return K(e,t,i)}function z(e,t){return n(t,32),H(e,t)}function X(e,t,r){var n=new Uint8Array(32);return K(n,r,t),b(e,o,n,w)}T.prototype.blocks=function(e,t,r){for(var n,o,i,a,s,u,c,l,f,p,h,y,d,m,g,v,b,w,S,k=this.fin?0:2048,E=this.h[0],A=this.h[1],T=this.h[2],O=this.h[3],P=this.h[4],x=this.h[5],I=this.h[6],_=this.h[7],B=this.h[8],R=this.h[9],C=this.r[0],U=this.r[1],N=this.r[2],L=this.r[3],j=this.r[4],M=this.r[5],F=this.r[6],D=this.r[7],V=this.r[8],q=this.r[9];r>=16;)p=f=0,p+=(E+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*C,p+=(A+=8191&(n>>>13|(o=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*q),p+=(T+=8191&(o>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*V),p+=(O+=8191&(i>>>7|(a=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*D),f=(p+=(P+=8191&(a>>>4|(s=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*F))>>>13,p&=8191,p+=(x+=s>>>1&8191)*(5*M),p+=(I+=8191&(s>>>14|(u=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*j),p+=(_+=8191&(u>>>11|(c=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*L),p+=(B+=8191&(c>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*N),h=f+=(p+=(R+=l>>>5|k)*(5*U))>>>13,h+=E*U,h+=A*C,h+=T*(5*q),h+=O*(5*V),f=(h+=P*(5*D))>>>13,h&=8191,h+=x*(5*F),h+=I*(5*M),h+=_*(5*j),h+=B*(5*L),f+=(h+=R*(5*N))>>>13,h&=8191,y=f,y+=E*N,y+=A*U,y+=T*C,y+=O*(5*q),f=(y+=P*(5*V))>>>13,y&=8191,y+=x*(5*D),y+=I*(5*F),y+=_*(5*M),y+=B*(5*j),d=f+=(y+=R*(5*L))>>>13,d+=E*L,d+=A*N,d+=T*U,d+=O*C,f=(d+=P*(5*q))>>>13,d&=8191,d+=x*(5*V),d+=I*(5*D),d+=_*(5*F),d+=B*(5*M),m=f+=(d+=R*(5*j))>>>13,m+=E*j,m+=A*L,m+=T*N,m+=O*U,f=(m+=P*C)>>>13,m&=8191,m+=x*(5*q),m+=I*(5*V),m+=_*(5*D),m+=B*(5*F),g=f+=(m+=R*(5*M))>>>13,g+=E*M,g+=A*j,g+=T*L,g+=O*N,f=(g+=P*U)>>>13,g&=8191,g+=x*C,g+=I*(5*q),g+=_*(5*V),g+=B*(5*D),v=f+=(g+=R*(5*F))>>>13,v+=E*F,v+=A*M,v+=T*j,v+=O*L,f=(v+=P*N)>>>13,v&=8191,v+=x*U,v+=I*C,v+=_*(5*q),v+=B*(5*V),b=f+=(v+=R*(5*D))>>>13,b+=E*D,b+=A*F,b+=T*M,b+=O*j,f=(b+=P*L)>>>13,b&=8191,b+=x*N,b+=I*U,b+=_*C,b+=B*(5*q),w=f+=(b+=R*(5*V))>>>13,w+=E*V,w+=A*D,w+=T*F,w+=O*M,f=(w+=P*j)>>>13,w&=8191,w+=x*L,w+=I*N,w+=_*U,w+=B*C,S=f+=(w+=R*(5*q))>>>13,S+=E*q,S+=A*V,S+=T*D,S+=O*F,f=(S+=P*M)>>>13,S&=8191,S+=x*j,S+=I*L,S+=_*N,S+=B*U,E=p=8191&(f=(f=((f+=(S+=R*C)>>>13)<<2)+f|0)+(p&=8191)|0),A=h+=f>>>=13,T=y&=8191,O=d&=8191,P=m&=8191,x=g&=8191,I=v&=8191,_=b&=8191,B=w&=8191,R=S&=8191,t+=16,r-=16;this.h[0]=E,this.h[1]=A,this.h[2]=T,this.h[3]=O,this.h[4]=P,this.h[5]=x,this.h[6]=I,this.h[7]=_,this.h[8]=B,this.h[9]=R},T.prototype.finish=function(e,t){var r,n,o,i,a=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=r,r=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,a[0]=this.h[0]+5,r=a[0]>>>13,a[0]&=8191,i=1;i<10;i++)a[i]=this.h[i]+r,r=a[i]>>>13,a[i]&=8191;for(a[9]-=8192,n=(1^r)-1,i=0;i<10;i++)a[i]&=n;for(n=~n,i=0;i<10;i++)this.h[i]=this.h[i]&n|a[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},T.prototype.update=function(e,t,r){var n,o;if(this.leftover){for((o=16-this.leftover)>r&&(o=r),n=0;n<o;n++)this.buffer[this.leftover+n]=e[t+n];if(r-=o,t+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(o=r-r%16,this.blocks(e,t,o),t+=o,r-=o),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=e[t+n];this.leftover+=r}};var $=x,W=I;var G=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Y(e,t,r,n){for(var o,i,a,s,u,c,l,f,p,h,y,d,m,g,v,b,w,S,k,E,A,T,O,P,x,I,_=new Int32Array(16),B=new Int32Array(16),R=e[0],C=e[1],U=e[2],N=e[3],L=e[4],j=e[5],M=e[6],F=e[7],D=t[0],V=t[1],q=t[2],K=t[3],H=t[4],z=t[5],X=t[6],$=t[7],W=0;n>=128;){for(k=0;k<16;k++)E=8*k+W,_[k]=r[E+0]<<24|r[E+1]<<16|r[E+2]<<8|r[E+3],B[k]=r[E+4]<<24|r[E+5]<<16|r[E+6]<<8|r[E+7];for(k=0;k<80;k++)if(o=R,i=C,a=U,s=N,u=L,c=j,l=M,F,p=D,h=V,y=q,d=K,m=H,g=z,v=X,$,O=65535&(T=$),P=T>>>16,x=65535&(A=F),I=A>>>16,O+=65535&(T=(H>>>14|L<<18)^(H>>>18|L<<14)^(L>>>9|H<<23)),P+=T>>>16,x+=65535&(A=(L>>>14|H<<18)^(L>>>18|H<<14)^(H>>>9|L<<23)),I+=A>>>16,O+=65535&(T=H&z^~H&X),P+=T>>>16,x+=65535&(A=L&j^~L&M),I+=A>>>16,A=G[2*k],O+=65535&(T=G[2*k+1]),P+=T>>>16,x+=65535&A,I+=A>>>16,A=_[k%16],P+=(T=B[k%16])>>>16,x+=65535&A,I+=A>>>16,x+=(P+=(O+=65535&T)>>>16)>>>16,O=65535&(T=S=65535&O|P<<16),P=T>>>16,x=65535&(A=w=65535&x|(I+=x>>>16)<<16),I=A>>>16,O+=65535&(T=(D>>>28|R<<4)^(R>>>2|D<<30)^(R>>>7|D<<25)),P+=T>>>16,x+=65535&(A=(R>>>28|D<<4)^(D>>>2|R<<30)^(D>>>7|R<<25)),I+=A>>>16,P+=(T=D&V^D&q^V&q)>>>16,x+=65535&(A=R&C^R&U^C&U),I+=A>>>16,f=65535&(x+=(P+=(O+=65535&T)>>>16)>>>16)|(I+=x>>>16)<<16,b=65535&O|P<<16,O=65535&(T=d),P=T>>>16,x=65535&(A=s),I=A>>>16,P+=(T=S)>>>16,x+=65535&(A=w),I+=A>>>16,C=o,U=i,N=a,L=s=65535&(x+=(P+=(O+=65535&T)>>>16)>>>16)|(I+=x>>>16)<<16,j=u,M=c,F=l,R=f,V=p,q=h,K=y,H=d=65535&O|P<<16,z=m,X=g,$=v,D=b,k%16==15)for(E=0;E<16;E++)A=_[E],O=65535&(T=B[E]),P=T>>>16,x=65535&A,I=A>>>16,A=_[(E+9)%16],O+=65535&(T=B[(E+9)%16]),P+=T>>>16,x+=65535&A,I+=A>>>16,w=_[(E+1)%16],O+=65535&(T=((S=B[(E+1)%16])>>>1|w<<31)^(S>>>8|w<<24)^(S>>>7|w<<25)),P+=T>>>16,x+=65535&(A=(w>>>1|S<<31)^(w>>>8|S<<24)^w>>>7),I+=A>>>16,w=_[(E+14)%16],P+=(T=((S=B[(E+14)%16])>>>19|w<<13)^(w>>>29|S<<3)^(S>>>6|w<<26))>>>16,x+=65535&(A=(w>>>19|S<<13)^(S>>>29|w<<3)^w>>>6),I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,_[E]=65535&x|I<<16,B[E]=65535&O|P<<16;O=65535&(T=D),P=T>>>16,x=65535&(A=R),I=A>>>16,A=e[0],P+=(T=t[0])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[0]=R=65535&x|I<<16,t[0]=D=65535&O|P<<16,O=65535&(T=V),P=T>>>16,x=65535&(A=C),I=A>>>16,A=e[1],P+=(T=t[1])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[1]=C=65535&x|I<<16,t[1]=V=65535&O|P<<16,O=65535&(T=q),P=T>>>16,x=65535&(A=U),I=A>>>16,A=e[2],P+=(T=t[2])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[2]=U=65535&x|I<<16,t[2]=q=65535&O|P<<16,O=65535&(T=K),P=T>>>16,x=65535&(A=N),I=A>>>16,A=e[3],P+=(T=t[3])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[3]=N=65535&x|I<<16,t[3]=K=65535&O|P<<16,O=65535&(T=H),P=T>>>16,x=65535&(A=L),I=A>>>16,A=e[4],P+=(T=t[4])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[4]=L=65535&x|I<<16,t[4]=H=65535&O|P<<16,O=65535&(T=z),P=T>>>16,x=65535&(A=j),I=A>>>16,A=e[5],P+=(T=t[5])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[5]=j=65535&x|I<<16,t[5]=z=65535&O|P<<16,O=65535&(T=X),P=T>>>16,x=65535&(A=M),I=A>>>16,A=e[6],P+=(T=t[6])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[6]=M=65535&x|I<<16,t[6]=X=65535&O|P<<16,O=65535&(T=$),P=T>>>16,x=65535&(A=F),I=A>>>16,A=e[7],P+=(T=t[7])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[7]=F=65535&x|I<<16,t[7]=$=65535&O|P<<16,W+=128,n-=128}return n}function J(e,t,r){var n,o=new Int32Array(8),i=new Int32Array(8),a=new Uint8Array(256),s=r;for(o[0]=1779033703,o[1]=3144134277,o[2]=1013904242,o[3]=2773480762,o[4]=1359893119,o[5]=2600822924,o[6]=528734635,o[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,Y(o,i,t,r),r%=128,n=0;n<r;n++)a[n]=t[s-r+n];for(a[r]=128,a[(r=256-128*(r<112?1:0))-9]=0,y(a,r-8,s/536870912|0,s<<3),Y(o,i,a,r),n=0;n<8;n++)y(e,8*n,o[n],i[n]);return 0}function Z(e,r){var n=t(),o=t(),i=t(),a=t(),s=t(),u=t(),c=t(),f=t(),p=t();M(n,e[1],e[0]),M(p,r[1],r[0]),F(n,n,p),j(o,e[0],e[1]),j(p,r[0],r[1]),F(o,o,p),F(i,e[3],r[3]),F(i,i,l),F(a,e[2],r[2]),j(a,a,a),M(s,o,n),M(u,a,i),j(c,a,i),j(f,o,n),F(e[0],s,u),F(e[1],f,c),F(e[2],c,u),F(e[3],s,f)}function Q(e,t,r){var n;for(n=0;n<4;n++)R(e[n],t[n],r)}function ee(e,r){var n=t(),o=t(),i=t();V(i,r[2]),F(n,r[0],i),F(o,r[1],i),C(e,o),e[31]^=N(n)<<7}function te(e,t,r){var n,o;for(_(e[0],a),_(e[1],s),_(e[2],s),_(e[3],a),o=255;o>=0;--o)Q(e,t,n=r[o/8|0]>>(7&o)&1),Z(t,e),Z(e,e),Q(e,t,n)}function re(e,r){var n=[t(),t(),t(),t()];_(n[0],f),_(n[1],p),_(n[2],s),F(n[3],f,p),te(e,n,r)}function ne(e,r,o){var i,a=new Uint8Array(64),s=[t(),t(),t(),t()];for(o||n(r,32),J(a,r,32),a[0]&=248,a[31]&=127,a[31]|=64,re(s,a),ee(e,s),i=0;i<32;i++)r[i+32]=e[i];return 0}var oe=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ie(e,t){var r,n,o,i;for(n=63;n>=32;--n){for(r=0,o=n-32,i=n-12;o<i;++o)t[o]+=r-16*t[n]*oe[o-(n-32)],r=Math.floor((t[o]+128)/256),t[o]-=256*r;t[o]+=r,t[n]=0}for(r=0,o=0;o<32;o++)t[o]+=r-(t[31]>>4)*oe[o],r=t[o]>>8,t[o]&=255;for(o=0;o<32;o++)t[o]-=r*oe[o];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function ae(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;ie(e,r)}function se(e,r,n,o){var i,a,s=new Uint8Array(64),u=new Uint8Array(64),c=new Uint8Array(64),l=new Float64Array(64),f=[t(),t(),t(),t()];J(s,o,32),s[0]&=248,s[31]&=127,s[31]|=64;var p=n+64;for(i=0;i<n;i++)e[64+i]=r[i];for(i=0;i<32;i++)e[32+i]=s[32+i];for(J(c,e.subarray(32),n+32),ae(c),re(f,c),ee(e,f),i=32;i<64;i++)e[i]=o[i];for(J(u,e,n+64),ae(u),i=0;i<64;i++)l[i]=0;for(i=0;i<32;i++)l[i]=c[i];for(i=0;i<32;i++)for(a=0;a<32;a++)l[i+a]+=u[i]*s[a];return ie(e.subarray(32),l),p}function ue(e,r,n,o){var i,u=new Uint8Array(32),l=new Uint8Array(64),f=[t(),t(),t(),t()],p=[t(),t(),t(),t()];if(n<64)return-1;if(function(e,r){var n=t(),o=t(),i=t(),u=t(),l=t(),f=t(),p=t();return _(e[2],s),L(e[1],r),D(i,e[1]),F(u,i,c),M(i,i,e[2]),j(u,e[2],u),D(l,u),D(f,l),F(p,f,l),F(n,p,i),F(n,n,u),q(n,n),F(n,n,i),F(n,n,u),F(n,n,u),F(e[0],n,u),D(o,e[0]),F(o,o,u),U(o,i)&&F(e[0],e[0],h),D(o,e[0]),F(o,o,u),U(o,i)?-1:(N(e[0])===r[31]>>7&&M(e[0],a,e[0]),F(e[3],e[0],e[1]),0)}(p,o))return-1;for(i=0;i<n;i++)e[i]=r[i];for(i=0;i<32;i++)e[i+32]=o[i];if(J(l,e,n),ae(l),te(f,p,l),re(p,r.subarray(32)),Z(f,p),ee(u,f),n-=64,g(r,0,u,0)){for(i=0;i<n;i++)e[i]=0;return-1}for(i=0;i<n;i++)e[i]=r[i+64];return n}var ce=16,le=64,fe=32,pe=64;function he(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function ye(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function de(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:b,crypto_stream_xor:A,crypto_stream:E,crypto_stream_salsa20_xor:S,crypto_stream_salsa20:k,crypto_onetimeauth:O,crypto_onetimeauth_verify:P,crypto_verify_16:m,crypto_verify_32:g,crypto_secretbox:x,crypto_secretbox_open:I,crypto_scalarmult:K,crypto_scalarmult_base:H,crypto_box_beforenm:X,crypto_box_afternm:$,crypto_box:function(e,t,r,n,o,i){var a=new Uint8Array(32);return X(a,o,i),$(e,t,r,n,a)},crypto_box_open:function(e,t,r,n,o,i){var a=new Uint8Array(32);return X(a,o,i),W(e,t,r,n,a)},crypto_box_keypair:z,crypto_hash:J,crypto_sign:se,crypto_sign_keypair:ne,crypto_sign_open:ue,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:ce,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:le,crypto_sign_PUBLICKEYBYTES:fe,crypto_sign_SECRETKEYBYTES:pe,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:c,L:oe,pack25519:C,unpack25519:L,M:F,A:j,S:D,Z:M,pow2523:q,add:Z,set25519:_,modL:ie,scalarmult:te,scalarbase:re},e.randomBytes=function(e){var t=new Uint8Array(e);return n(t,e),t},e.secretbox=function(e,t,r){ye(e,t,r),he(r,t);for(var n=new Uint8Array(32+e.length),o=new Uint8Array(n.length),i=0;i<e.length;i++)n[i+32]=e[i];return x(o,n,n.length,t,r),o.subarray(ce)},e.secretbox.open=function(e,t,r){ye(e,t,r),he(r,t);for(var n=new Uint8Array(ce+e.length),o=new Uint8Array(n.length),i=0;i<e.length;i++)n[i+ce]=e[i];return n.length<32||0!==I(o,n,n.length,t,r)?null:o.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=ce,e.scalarMult=function(e,t){if(ye(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var r=new Uint8Array(32);return K(r,e,t),r},e.scalarMult.base=function(e){if(ye(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return H(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,r,n,o){var i=e.box.before(n,o);return e.secretbox(t,r,i)},e.box.before=function(e,t){ye(e,t),function(e,t){if(32!==e.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(e,t);var r=new Uint8Array(32);return X(r,e,t),r},e.box.after=e.secretbox,e.box.open=function(t,r,n,o){var i=e.box.before(n,o);return e.secretbox.open(t,r,i)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return z(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(ye(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return H(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(ye(e,t),t.length!==pe)throw new Error("bad secret key size");var r=new Uint8Array(le+e.length);return se(r,e,e.length,t),r},e.sign.open=function(e,t){if(ye(e,t),t.length!==fe)throw new Error("bad public key size");var r=new Uint8Array(e.length),n=ue(r,e,e.length,t);if(n<0)return null;for(var o=new Uint8Array(n),i=0;i<o.length;i++)o[i]=r[i];return o},e.sign.detached=function(t,r){for(var n=e.sign(t,r),o=new Uint8Array(le),i=0;i<o.length;i++)o[i]=n[i];return o},e.sign.detached.verify=function(e,t,r){if(ye(e,t,r),t.length!==le)throw new Error("bad signature size");if(r.length!==fe)throw new Error("bad public key size");var n,o=new Uint8Array(le+e.length),i=new Uint8Array(le+e.length);for(n=0;n<le;n++)o[n]=t[n];for(n=0;n<e.length;n++)o[n+le]=e[n];return ue(i,o,o.length,r)>=0},e.sign.keyPair=function(){var e=new Uint8Array(fe),t=new Uint8Array(pe);return ne(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(ye(e),e.length!==pe)throw new Error("bad secret key size");for(var t=new Uint8Array(fe),r=0;r<t.length;r++)t[r]=e[32+r];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(ye(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(fe),r=new Uint8Array(pe),n=0;n<32;n++)r[n]=e[n];return ne(t,r,!0),{publicKey:t,secretKey:r}},e.sign.publicKeyLength=fe,e.sign.secretKeyLength=pe,e.sign.seedLength=32,e.sign.signatureLength=le,e.hash=function(e){ye(e);var t=new Uint8Array(64);return J(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return ye(e,t),0!==e.length&&0!==t.length&&(e.length===t.length&&0===d(e,0,t,0,e.length))},e.setPRNG=function(e){n=e},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(t&&t.getRandomValues){e.setPRNG((function(e,r){var n,o=new Uint8Array(r);for(n=0;n<r;n+=65536)t.getRandomValues(o.subarray(n,n+Math.min(r-n,65536)));for(n=0;n<r;n++)e[n]=o[n];de(o)}))}else(t=r(1281))&&t.randomBytes&&e.setPRNG((function(e,r){var n,o=t.randomBytes(r);for(n=0;n<r;n++)e[n]=o[n];de(o)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})},1135:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},9032:(e,t,r)=>{"use strict";var n=r(7244),o=r(8184),i=r(5767),a=r(5680);function s(e){return e.call.bind(e)}var u="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,l=s(Object.prototype.toString),f=s(Number.prototype.valueOf),p=s(String.prototype.valueOf),h=s(Boolean.prototype.valueOf);if(u)var y=s(BigInt.prototype.valueOf);if(c)var d=s(Symbol.prototype.valueOf);function m(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function g(e){return"[object Map]"===l(e)}function v(e){return"[object Set]"===l(e)}function b(e){return"[object WeakMap]"===l(e)}function w(e){return"[object WeakSet]"===l(e)}function S(e){return"[object ArrayBuffer]"===l(e)}function k(e){return"undefined"!=typeof ArrayBuffer&&(S.working?S(e):e instanceof ArrayBuffer)}function E(e){return"[object DataView]"===l(e)}function A(e){return"undefined"!=typeof DataView&&(E.working?E(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=o,t.isTypedArray=a,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||A(e)},t.isUint8Array=function(e){return"Uint8Array"===i(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===i(e)},t.isUint16Array=function(e){return"Uint16Array"===i(e)},t.isUint32Array=function(e){return"Uint32Array"===i(e)},t.isInt8Array=function(e){return"Int8Array"===i(e)},t.isInt16Array=function(e){return"Int16Array"===i(e)},t.isInt32Array=function(e){return"Int32Array"===i(e)},t.isFloat32Array=function(e){return"Float32Array"===i(e)},t.isFloat64Array=function(e){return"Float64Array"===i(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===i(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===i(e)},g.working="undefined"!=typeof Map&&g(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(g.working?g(e):e instanceof Map)},v.working="undefined"!=typeof Set&&v(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(v.working?v(e):e instanceof Set)},b.working="undefined"!=typeof WeakMap&&b(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(b.working?b(e):e instanceof WeakMap)},w.working="undefined"!=typeof WeakSet&&w(new WeakSet),t.isWeakSet=function(e){return w(e)},S.working="undefined"!=typeof ArrayBuffer&&S(new ArrayBuffer),t.isArrayBuffer=k,E.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&E(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=A;var T="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function O(e){return"[object SharedArrayBuffer]"===l(e)}function P(e){return void 0!==T&&(void 0===O.working&&(O.working=O(new T)),O.working?O(e):e instanceof T)}function x(e){return m(e,f)}function I(e){return m(e,p)}function _(e){return m(e,h)}function B(e){return u&&m(e,y)}function R(e){return c&&m(e,d)}t.isSharedArrayBuffer=P,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===l(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===l(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===l(e)},t.isGeneratorObject=function(e){return"[object Generator]"===l(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===l(e)},t.isNumberObject=x,t.isStringObject=I,t.isBooleanObject=_,t.isBigIntObject=B,t.isSymbolObject=R,t.isBoxedPrimitive=function(e){return x(e)||I(e)||_(e)||B(e)||R(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(k(e)||P(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},537:(e,t,r)=>{var n=r(5606),o=r(6763),i=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},a=/%[sdj%]/g;t.format=function(e){if(!w(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(l(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,o=n.length,i=String(e).replace(a,(function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r<o;s=n[++r])v(s)||!E(s)?i+=" "+s:i+=" "+l(s);return i},t.deprecate=function(e,r){if(void 0!==n&&!0===n.noDeprecation)return e;if(void 0===n)return function(){return t.deprecate(e,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?o.trace(r):o.error(r),i=!0}return e.apply(this,arguments)}};var s={},u=/^$/;if(n.env.NODE_DEBUG){var c=n.env.NODE_DEBUG;c=c.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),u=new RegExp("^"+c+"$","i")}function l(e,r){var n={seen:[],stylize:p};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&t._extend(n,r),S(n.showHidden)&&(n.showHidden=!1),S(n.depth)&&(n.depth=2),S(n.colors)&&(n.colors=!1),S(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=f),h(n,e,n.depth)}function f(e,t){var r=l.styles[t];return r?"\x1b["+l.colors[r][0]+"m"+e+"\x1b["+l.colors[r][1]+"m":e}function p(e,t){return e}function h(e,r,n){if(e.customInspect&&r&&O(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return w(o)||(o=h(e,o,n)),o}var i=function(e,t){if(S(t))return e.stylize("undefined","undefined");if(w(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(b(t))return e.stylize(""+t,"number");if(g(t))return e.stylize(""+t,"boolean");if(v(t))return e.stylize("null","null")}(e,r);if(i)return i;var a=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),T(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return y(r);if(0===a.length){if(O(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(k(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(A(r))return e.stylize(Date.prototype.toString.call(r),"date");if(T(r))return y(r)}var c,l="",f=!1,p=["{","}"];(m(r)&&(f=!0,p=["[","]"]),O(r))&&(l=" [Function"+(r.name?": "+r.name:"")+"]");return k(r)&&(l=" "+RegExp.prototype.toString.call(r)),A(r)&&(l=" "+Date.prototype.toUTCString.call(r)),T(r)&&(l=" "+y(r)),0!==a.length||f&&0!=r.length?n<0?k(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=f?function(e,t,r,n,o){for(var i=[],a=0,s=t.length;a<s;++a)_(t,String(a))?i.push(d(e,t,r,n,String(a),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(d(e,t,r,n,o,!0))})),i}(e,r,n,s,a):a.map((function(t){return d(e,r,n,s,t,f)})),e.seen.pop(),function(e,t,r){var n=e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(n>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(c,l,p)):p[0]+l+p[1]}function y(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,n,o,i){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),_(n,o)||(a="["+o+"]"),s||(e.seen.indexOf(u.value)<0?(s=v(r)?h(e,u.value,null):h(e,u.value,r-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),S(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function m(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function v(e){return null===e}function b(e){return"number"==typeof e}function w(e){return"string"==typeof e}function S(e){return void 0===e}function k(e){return E(e)&&"[object RegExp]"===P(e)}function E(e){return"object"==typeof e&&null!==e}function A(e){return E(e)&&"[object Date]"===P(e)}function T(e){return E(e)&&("[object Error]"===P(e)||e instanceof Error)}function O(e){return"function"==typeof e}function P(e){return Object.prototype.toString.call(e)}function x(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!s[e])if(u.test(e)){var r=n.pid;s[e]=function(){var n=t.format.apply(t,arguments);o.error("%s %d: %s",e,r,n)}}else s[e]=function(){};return s[e]},t.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(9032),t.isArray=m,t.isBoolean=g,t.isNull=v,t.isNullOrUndefined=function(e){return null==e},t.isNumber=b,t.isString=w,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=S,t.isRegExp=k,t.types.isRegExp=k,t.isObject=E,t.isDate=A,t.types.isDate=A,t.isError=T,t.types.isNativeError=T,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(1135);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function _(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;o.log("%s - %s",(e=new Date,r=[x(e.getHours()),x(e.getMinutes()),x(e.getSeconds())].join(":"),[e.getDate(),I[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(6698),t._extend=function(e,t){if(!t||!E(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var B="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(B&&e[B]){var t;if("function"!=typeof(t=e[B]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,B,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,o)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),B&&Object.defineProperty(t,B,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,i(e))},t.promisify.custom=B,t.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var o=t.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,a=function(){return o.apply(i,arguments)};e.apply(this,t).then((function(e){n.nextTick(a.bind(null,null,e))}),(function(e){n.nextTick(R.bind(null,e,a))}))}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,i(e)),t}},5767:(e,t,r)=>{"use strict";var n=r(2682),o=r(9209),i=r(487),a=r(8075),s=r(5795),u=a("Object.prototype.toString"),c=r(9092)(),l="undefined"==typeof globalThis?r.g:globalThis,f=o(),p=a("String.prototype.slice"),h=Object.getPrototypeOf,y=a("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},d={__proto__:null};n(f,c&&s&&h?function(e){var t=new l[e];if(Symbol.toStringTag in t){var r=h(t),n=s(r,Symbol.toStringTag);if(!n){var o=h(r);n=s(o,Symbol.toStringTag)}d["$"+e]=i(n.get)}}:function(e){var t=new l[e],r=t.slice||t.set;r&&(d["$"+e]=i(r))});e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!c){var t=p(u(e),8,-1);return y(f,t)>-1?t:"Object"===t&&function(e){var t=!1;return n(d,(function(r,n){if(!t)try{r(e),t=p(n,1)}catch(e){}})),t}(e)}return s?function(e){var t=!1;return n(d,(function(r,n){if(!t)try{"$"+r(e)===n&&(t=p(n,1))}catch(e){}})),t}(e):null}},1281:()=>{},9209:(e,t,r)=>{"use strict";var n=r(6578),o="undefined"==typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t<n.length;t++)"function"==typeof o[n[t]]&&(e[e.length]=n[t]);return e}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n=r(7687);StellarBase=n})();
2
+ var StellarBase;(()=>{var e={3740:function(e,t,r){var n,o=r(6763);n=()=>(()=>{var e={616:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(287);n.hp.alloc(1).subarray(0,1)instanceof n.hp||(n.hp.prototype.subarray=function(e,t){const r=Uint8Array.prototype.subarray.call(this,e,t);return Object.setPrototypeOf(r,n.hp.prototype),r});const o=n.hp},281:(e,t,r)=>{const n=r(164);e.exports=n},164:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Array:()=>M,Bool:()=>B,Double:()=>I,Enum:()=>q,Float:()=>x,Hyper:()=>A,Int:()=>w,LargeInt:()=>E,Opaque:()=>N,Option:()=>D,Quadruple:()=>_,Reference:()=>K,String:()=>C,Struct:()=>H,Union:()=>X,UnsignedHyper:()=>P,UnsignedInt:()=>O,VarArray:()=>F,VarOpaque:()=>j,Void:()=>V,XdrReader:()=>u,XdrWriter:()=>f,config:()=>te});class n extends TypeError{constructor(e){super(`XDR Write Error: ${e}`)}}class o extends TypeError{constructor(e){super(`XDR Read Error: ${e}`)}}class i extends TypeError{constructor(e){super(`XDR Type Definition Error: ${e}`)}}class a extends i{constructor(){super("method not implemented, it should be overloaded in the descendant class.")}}var s=r(616).A;class u{constructor(e){if(!s.isBuffer(e)){if(!(e instanceof Array||Array.isArray(e)||ArrayBuffer.isView(e)))throw new o(`source invalid: ${e}`);e=s.from(e)}this._buffer=e,this._length=e.length,this._index=0}_buffer;_length;_index;get eof(){return this._index===this._length}advance(e){const t=this._index;if(this._index+=e,this._length<this._index)throw new o("attempt to read outside the boundary of the buffer");const r=4-(e%4||4);if(r>0){for(let e=0;e<r;e++)if(0!==this._buffer[this._index+e])throw new o("invalid padding");this._index+=r}return t}rewind(){this._index=0}read(e){const t=this.advance(e);return this._buffer.subarray(t,t+e)}readInt32BE(){return this._buffer.readInt32BE(this.advance(4))}readUInt32BE(){return this._buffer.readUInt32BE(this.advance(4))}readBigInt64BE(){return this._buffer.readBigInt64BE(this.advance(8))}readBigUInt64BE(){return this._buffer.readBigUInt64BE(this.advance(8))}readFloatBE(){return this._buffer.readFloatBE(this.advance(4))}readDoubleBE(){return this._buffer.readDoubleBE(this.advance(8))}ensureInputConsumed(){if(this._index!==this._length)throw new o("invalid XDR contract typecast - source buffer not entirely consumed")}}var c=r(616).A;const l=8192;class f{constructor(e){"number"==typeof e?e=c.allocUnsafe(e):e instanceof c||(e=c.allocUnsafe(l)),this._buffer=e,this._length=e.length}_buffer;_length;_index=0;alloc(e){const t=this._index;return this._index+=e,this._length<this._index&&this.resize(this._index),t}resize(e){const t=Math.ceil(e/l)*l,r=c.allocUnsafe(t);this._buffer.copy(r,0,0,this._length),this._buffer=r,this._length=t}finalize(){return this._buffer.subarray(0,this._index)}toArray(){return[...this.finalize()]}write(e,t){if("string"==typeof e){const r=this.alloc(t);this._buffer.write(e,r,"utf8")}else{e instanceof c||(e=c.from(e));const r=this.alloc(t);e.copy(this._buffer,r,0,t)}const r=4-(t%4||4);if(r>0){const e=this.alloc(r);this._buffer.fill(0,e,this._index)}}writeInt32BE(e){const t=this.alloc(4);this._buffer.writeInt32BE(e,t)}writeUInt32BE(e){const t=this.alloc(4);this._buffer.writeUInt32BE(e,t)}writeBigInt64BE(e){const t=this.alloc(8);this._buffer.writeBigInt64BE(e,t)}writeBigUInt64BE(e){const t=this.alloc(8);this._buffer.writeBigUInt64BE(e,t)}writeFloatBE(e){const t=this.alloc(4);this._buffer.writeFloatBE(e,t)}writeDoubleBE(e){const t=this.alloc(8);this._buffer.writeDoubleBE(e,t)}static bufferChunkSize=l}var p=r(616).A;class h{toXDR(e="raw"){if(!this.write)return this.constructor.toXDR(this,e);const t=new f;return this.write(this,t),g(t.finalize(),e)}fromXDR(e,t="raw"){if(!this.read)return this.constructor.fromXDR(e,t);const r=new u(v(e,t)),n=this.read(r);return r.ensureInputConsumed(),n}validateXDR(e,t="raw"){try{return this.fromXDR(e,t),!0}catch(e){return!1}}static toXDR(e,t="raw"){const r=new f;return this.write(e,r),g(r.finalize(),t)}static fromXDR(e,t="raw"){const r=new u(v(e,t)),n=this.read(r);return r.ensureInputConsumed(),n}static validateXDR(e,t="raw"){try{return this.fromXDR(e,t),!0}catch(e){return!1}}}class d extends h{static read(e){throw new a}static write(e,t){throw new a}static isValid(e){return!1}}class y extends h{isValid(e){return!1}}class m extends TypeError{constructor(e){super(`Invalid format ${e}, must be one of "raw", "hex", "base64"`)}}function g(e,t){switch(t){case"raw":return e;case"hex":return e.toString("hex");case"base64":return e.toString("base64");default:throw new m(t)}}function v(e,t){switch(t){case"raw":return e;case"hex":return p.from(e,"hex");case"base64":return p.from(e,"base64");default:throw new m(t)}}const b=2147483647;class w extends d{static read(e){return e.readInt32BE()}static write(e,t){if("number"!=typeof e)throw new n("not a number");if((0|e)!==e)throw new n("invalid i32 value");t.writeInt32BE(e)}static isValid(e){return"number"==typeof e&&(0|e)===e&&e>=-2147483648&&e<=b}}function S(e,t,r){if("bigint"!=typeof e)throw new TypeError("Expected bigint 'value', got "+typeof e);const n=t/r;if(1===n)return[e];if(r<32||r>128||2!==n&&4!==n&&8!==n)throw new TypeError(`invalid bigint (${e}) and slice size (${t} -> ${r}) combination`);const o=BigInt(r),i=new Array(n);for(let t=0;t<n;t++)i[t]=BigInt.asIntN(r,e),e>>=o;return i}function k(e,t){if(t)return[0n,(1n<<BigInt(e))-1n];const r=1n<<BigInt(e-1);return[0n-r,r-1n]}w.MAX_VALUE=b,w.MIN_VALUE=2147483648;class E extends d{constructor(e){super(),this._value=function(e,t,r){e instanceof Array?e.length&&e[0]instanceof Array&&(e=e[0]):e=[e];const n=t/e.length;switch(n){case 32:case 64:case 128:case 256:break;default:throw new RangeError(`expected slices to fit in 32/64/128/256 bits, got ${e}`)}try{for(let t=0;t<e.length;t++)"bigint"!=typeof e[t]&&(e[t]=BigInt(e[t].valueOf()))}catch(t){throw new TypeError(`expected bigint-like values, got: ${e} (${t})`)}if(r&&1===e.length&&e[0]<0n)throw new RangeError(`expected a positive value, got: ${e}`);let o=BigInt.asUintN(n,e[0]);for(let t=1;t<e.length;t++)o|=BigInt.asUintN(n,e[t])<<BigInt(t*n);r||(o=BigInt.asIntN(t,o));const[i,a]=k(t,r);if(o>=i&&o<=a)return o;throw new TypeError(`bigint values [${e}] for ${function(e,t){return`${t?"u":"i"}${e}`}(t,r)} out of range [${i}, ${a}]: ${o}`)}(e,this.size,this.unsigned)}get unsigned(){throw new a}get size(){throw new a}slice(e){return S(this._value,this.size,e)}toString(){return this._value.toString()}toJSON(){return{_value:this._value.toString()}}toBigInt(){return BigInt(this._value)}static read(e){const{size:t}=this.prototype;return 64===t?new this(e.readBigUInt64BE()):new this(...Array.from({length:t/64},(()=>e.readBigUInt64BE())).reverse())}static write(e,t){if(e instanceof this)e=e._value;else if("bigint"!=typeof e||e>this.MAX_VALUE||e<this.MIN_VALUE)throw new n(`${e} is not a ${this.name}`);const{unsigned:r,size:o}=this.prototype;if(64===o)r?t.writeBigUInt64BE(e):t.writeBigInt64BE(e);else for(const n of S(e,o,64).reverse())r?t.writeBigUInt64BE(n):t.writeBigInt64BE(n)}static isValid(e){return"bigint"==typeof e||e instanceof this}static fromString(e){return new this(e)}static MAX_VALUE=0n;static MIN_VALUE=0n;static defineIntBoundaries(){const[e,t]=k(this.prototype.size,this.prototype.unsigned);this.MIN_VALUE=e,this.MAX_VALUE=t}}class A extends E{constructor(...e){super(e)}get low(){return 0|Number(0xffffffffn&this._value)}get high(){return 0|Number(this._value>>32n)}get size(){return 64}get unsigned(){return!1}static fromBits(e,t){return new this(e,t)}}A.defineIntBoundaries();const T=4294967295;class O extends d{static read(e){return e.readUInt32BE()}static write(e,t){if("number"!=typeof e||!(e>=0&&e<=T)||e%1!=0)throw new n("invalid u32 value");t.writeUInt32BE(e)}static isValid(e){return"number"==typeof e&&e%1==0&&e>=0&&e<=T}}O.MAX_VALUE=T,O.MIN_VALUE=0;class P extends E{constructor(...e){super(e)}get low(){return 0|Number(0xffffffffn&this._value)}get high(){return 0|Number(this._value>>32n)}get size(){return 64}get unsigned(){return!0}static fromBits(e,t){return new this(e,t)}}P.defineIntBoundaries();class x extends d{static read(e){return e.readFloatBE()}static write(e,t){if("number"!=typeof e)throw new n("not a number");t.writeFloatBE(e)}static isValid(e){return"number"==typeof e}}class I extends d{static read(e){return e.readDoubleBE()}static write(e,t){if("number"!=typeof e)throw new n("not a number");t.writeDoubleBE(e)}static isValid(e){return"number"==typeof e}}class _ extends d{static read(){throw new i("quadruple not supported")}static write(){throw new i("quadruple not supported")}static isValid(){return!1}}class B extends d{static read(e){const t=w.read(e);switch(t){case 0:return!1;case 1:return!0;default:throw new o(`got ${t} when trying to read a bool`)}}static write(e,t){const r=e?1:0;w.write(r,t)}static isValid(e){return"boolean"==typeof e}}var R=r(616).A;class C extends y{constructor(e=O.MAX_VALUE){super(),this._maxLength=e}read(e){const t=O.read(e);if(t>this._maxLength)throw new o(`saw ${t} length String, max allowed is ${this._maxLength}`);return e.read(t)}readString(e){return this.read(e).toString("utf8")}write(e,t){const r="string"==typeof e?R.byteLength(e,"utf8"):e.length;if(r>this._maxLength)throw new n(`got ${e.length} bytes, max allowed is ${this._maxLength}`);O.write(r,t),t.write(e,r)}isValid(e){return"string"==typeof e?R.byteLength(e,"utf8")<=this._maxLength:!!(e instanceof Array||R.isBuffer(e))&&e.length<=this._maxLength}}var U=r(616).A;class N extends y{constructor(e){super(),this._length=e}read(e){return e.read(this._length)}write(e,t){const{length:r}=e;if(r!==this._length)throw new n(`got ${e.length} bytes, expected ${this._length}`);t.write(e,r)}isValid(e){return U.isBuffer(e)&&e.length===this._length}}var L=r(616).A;class j extends y{constructor(e=O.MAX_VALUE){super(),this._maxLength=e}read(e){const t=O.read(e);if(t>this._maxLength)throw new o(`saw ${t} length VarOpaque, max allowed is ${this._maxLength}`);return e.read(t)}write(e,t){const{length:r}=e;if(e.length>this._maxLength)throw new n(`got ${e.length} bytes, max allowed is ${this._maxLength}`);O.write(r,t),t.write(e,r)}isValid(e){return L.isBuffer(e)&&e.length<=this._maxLength}}class M extends y{constructor(e,t){super(),this._childType=e,this._length=t}read(e){const t=new r.g.Array(this._length);for(let r=0;r<this._length;r++)t[r]=this._childType.read(e);return t}write(e,t){if(!(e instanceof r.g.Array))throw new n("value is not array");if(e.length!==this._length)throw new n(`got array of size ${e.length}, expected ${this._length}`);for(const r of e)this._childType.write(r,t)}isValid(e){if(!(e instanceof r.g.Array)||e.length!==this._length)return!1;for(const t of e)if(!this._childType.isValid(t))return!1;return!0}}class F extends y{constructor(e,t=O.MAX_VALUE){super(),this._childType=e,this._maxLength=t}read(e){const t=O.read(e);if(t>this._maxLength)throw new o(`saw ${t} length VarArray, max allowed is ${this._maxLength}`);const r=new Array(t);for(let n=0;n<t;n++)r[n]=this._childType.read(e);return r}write(e,t){if(!(e instanceof Array))throw new n("value is not array");if(e.length>this._maxLength)throw new n(`got array of size ${e.length}, max allowed is ${this._maxLength}`);O.write(e.length,t);for(const r of e)this._childType.write(r,t)}isValid(e){if(!(e instanceof Array)||e.length>this._maxLength)return!1;for(const t of e)if(!this._childType.isValid(t))return!1;return!0}}class D extends d{constructor(e){super(),this._childType=e}read(e){if(B.read(e))return this._childType.read(e)}write(e,t){const r=null!=e;B.write(r,t),r&&this._childType.write(e,t)}isValid(e){return null==e||this._childType.isValid(e)}}class V extends d{static read(){}static write(e){if(void 0!==e)throw new n("trying to write value to a void slot")}static isValid(e){return void 0===e}}class q extends d{constructor(e,t){super(),this.name=e,this.value=t}static read(e){const t=w.read(e),r=this._byValue[t];if(void 0===r)throw new o(`unknown ${this.enumName} member for value ${t}`);return r}static write(e,t){if(!(e instanceof this))throw new n(`unknown ${e} is not a ${this.enumName}`);w.write(e.value,t)}static isValid(e){return e instanceof this}static members(){return this._members}static values(){return Object.values(this._members)}static fromName(e){const t=this._members[e];if(!t)throw new TypeError(`${e} is not a member of ${this.enumName}`);return t}static fromValue(e){const t=this._byValue[e];if(void 0===t)throw new TypeError(`${e} is not a value of any member of ${this.enumName}`);return t}static create(e,t,r){const n=class extends q{};n.enumName=t,e.results[t]=n,n._members={},n._byValue={};for(const[e,t]of Object.entries(r)){const r=new n(e,t);n._members[e]=r,n._byValue[t]=r,n[e]=()=>r}return n}}class K extends d{resolve(){throw new i('"resolve" method should be implemented in the descendant class')}}class H extends d{constructor(e){super(),this._attributes=e||{}}static read(e){const t={};for(const[r,n]of this._fields)t[r]=n.read(e);return new this(t)}static write(e,t){if(!(e instanceof this))throw new n(`${e} is not a ${this.structName}`);for(const[r,n]of this._fields){const o=e._attributes[r];n.write(o,t)}}static isValid(e){return e instanceof this}static create(e,t,r){const n=class extends H{};n.structName=t,e.results[t]=n;const o=new Array(r.length);for(let t=0;t<r.length;t++){const i=r[t],a=i[0];let s=i[1];s instanceof K&&(s=s.resolve(e)),o[t]=[a,s],n.prototype[a]=z(a)}return n._fields=o,n}}function z(e){return function(t){return void 0!==t&&(this._attributes[e]=t),this._attributes[e]}}class X extends y{constructor(e,t){super(),this.set(e,t)}set(e,t){"string"==typeof e&&(e=this.constructor._switchOn.fromName(e)),this._switch=e;const r=this.constructor.armForSwitch(this._switch);this._arm=r,this._armType=r===V?V:this.constructor._arms[r],this._value=t}get(e=this._arm){if(this._arm!==V&&this._arm!==e)throw new TypeError(`${e} not set`);return this._value}switch(){return this._switch}arm(){return this._arm}armType(){return this._armType}value(){return this._value}static armForSwitch(e){const t=this._switches.get(e);if(void 0!==t)return t;if(this._defaultArm)return this._defaultArm;throw new TypeError(`Bad union switch: ${e}`)}static armTypeForArm(e){return e===V?V:this._arms[e]}static read(e){const t=this._switchOn.read(e),r=this.armForSwitch(t),n=r===V?V:this._arms[r];let o;return o=void 0!==n?n.read(e):r.read(e),new this(t,o)}static write(e,t){if(!(e instanceof this))throw new n(`${e} is not a ${this.unionName}`);this._switchOn.write(e.switch(),t),e.armType().write(e.value(),t)}static isValid(e){return e instanceof this}static create(e,t,r){const n=class extends X{};n.unionName=t,e.results[t]=n,r.switchOn instanceof K?n._switchOn=r.switchOn.resolve(e):n._switchOn=r.switchOn,n._switches=new Map,n._arms={};let o=r.defaultArm;o instanceof K&&(o=o.resolve(e)),n._defaultArm=o;for(const[e,t]of r.switches){const r="string"==typeof e?n._switchOn.fromName(e):e;n._switches.set(r,t)}if(void 0!==n._switchOn.values)for(const e of n._switchOn.values())n[e.name]=function(t){return new n(e,t)},n.prototype[e.name]=function(t){return this.set(e,t)};if(r.arms)for(const[t,o]of Object.entries(r.arms))n._arms[t]=o instanceof K?o.resolve(e):o,o!==V&&(n.prototype[t]=function(){return this.get(t)});return n}}class $ extends K{constructor(e){super(),this.name=e}resolve(e){return e.definitions[this.name].resolve(e)}}class W extends K{constructor(e,t,r=!1){super(),this.childReference=e,this.length=t,this.variable=r}resolve(e){let t=this.childReference,r=this.length;return t instanceof K&&(t=t.resolve(e)),r instanceof K&&(r=r.resolve(e)),this.variable?new F(t,r):new M(t,r)}}class G extends K{constructor(e){super(),this.childReference=e,this.name=e.name}resolve(e){let t=this.childReference;return t instanceof K&&(t=t.resolve(e)),new D(t)}}class Y extends K{constructor(e,t){super(),this.sizedType=e,this.length=t}resolve(e){let t=this.length;return t instanceof K&&(t=t.resolve(e)),new this.sizedType(t)}}class J{constructor(e,t,r){this.constructor=e,this.name=t,this.config=r}resolve(e){return this.name in e.results?e.results[this.name]:this.constructor(e,this.name,this.config)}}function Z(e,t,r){return r instanceof K&&(r=r.resolve(e)),e.results[t]=r,r}function Q(e,t,r){return e.results[t]=r,r}class ee{constructor(e){this._destination=e,this._definitions={}}enum(e,t){const r=new J(q.create,e,t);this.define(e,r)}struct(e,t){const r=new J(H.create,e,t);this.define(e,r)}union(e,t){const r=new J(X.create,e,t);this.define(e,r)}typedef(e,t){const r=new J(Z,e,t);this.define(e,r)}const(e,t){const r=new J(Q,e,t);this.define(e,r)}void(){return V}bool(){return B}int(){return w}hyper(){return A}uint(){return O}uhyper(){return P}float(){return x}double(){return I}quadruple(){return _}string(e){return new Y(C,e)}opaque(e){return new Y(N,e)}varOpaque(e){return new Y(j,e)}array(e,t){return new W(e,t)}varArray(e,t){return new W(e,t,!0)}option(e){return new G(e)}define(e,t){if(void 0!==this._destination[e])throw new i(`${e} is already defined`);this._definitions[e]=t}lookup(e){return new $(e)}resolve(){for(const e of Object.values(this._definitions))e.resolve({definitions:this._definitions,results:this._destination})}}function te(e,t={}){if(e){const r=new ee(t);e(r),r.resolve()}return t}},526:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=s(e),a=i[0],u=i[1],c=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,u)),l=0,f=u>0?a-4:a;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=16383,s=0,c=n-o;s<c;s+=a)i.push(u(e,s,s+a>c?c:s+a));return 1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=i[a],n[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var o,i,a=[],s=t;s<n;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},287:(e,t,r)=>{"use strict";const n=r(526),i=r(251),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=c,t.IS=50;const s=2147483647;function u(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return p(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=u(r);const o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const o=function(e){if(c.isBuffer(e)){const t=0|y(e.length),r=u(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?u(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function p(e){return f(e),u(e<0?0:0|y(e))}function h(e){const t=e.length<0?0:0|y(e.length),r=u(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,c.prototype),n}function y(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function m(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(e).length;default:if(o)return n?-1:$(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return B(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return _(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:w(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function w(e,t,r,n,o){let i,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let n=-1;for(i=r;i<s;i++)if(c(e,i)===c(t,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===u)return n*a}else-1!==n&&(i-=i-n),n=-1}else for(r+u>s&&(r=s-u),i=r;i>=0;i--){let r=!0;for(let n=0;n<u;n++)if(c(e,i+n)!==c(t,n)){r=!1;break}if(r)return i}return-1}function S(e,t,r,n){r=Number(r)||0;const o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=t.length;let a;for(n>i/2&&(n=i/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(J(n))return a;e[r+a]=n}return a}function k(e,t,r,n){return G($(t,e.length-r),e,r,n)}function E(e,t,r,n){return G(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function A(e,t,r,n){return G(W(t),e,r,n)}function T(e,t,r,n){return G(function(e,t){let r,n,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function P(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o<r;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=r){let r,n,s,u;switch(a){case 1:t<128&&(i=t);break;case 2:r=e[o+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(i=u));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(i=u));break;case 4:r=e[o+1],n=e[o+2],s=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(i=u))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=a}return function(e){const t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=x));return r}(n)}c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||void 0===o||"function"!=typeof o.error||o.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return f(e),e<=0?u(e):void 0!==t?"string"==typeof r?u(e).fill(t,r):u(e).fill(t):u(e)}(e,t,r)},c.allocUnsafe=function(e){return p(e)},c.allocUnsafeSlow=function(e){return p(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=c.allocUnsafe(t);let o=0;for(r=0;r<e.length;++r){let t=e[r];if(Y(t,Uint8Array))o+t.length>n.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)v(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?P(this,0,e):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const r=t.IS;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},a&&(c.prototype[a]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,o){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(i,a),u=this.slice(n,o),l=e.slice(t,r);for(let e=0;e<s;++e)if(u[e]!==l[e]){i=u[e],a=l[e];break}return i<a?-1:a<i?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return S(this,e,t,r);case"utf8":case"utf-8":return k(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const x=4096;function I(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function _(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function B(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=t;n<r;++n)o+=Z[e[n]];return o}function R(e,t,r){const n=e.slice(t,r);let o="";for(let e=0;e<n.length-1;e+=2)o+=String.fromCharCode(n[e]+256*n[e+1]);return o}function C(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function U(e,t,r,n,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function N(e,t,r,n,o){K(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function L(e,t,r,n,o){K(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function j(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function M(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),c.prototype.readBigUInt64BE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||U(this,e,t,r,Math.pow(2,8*r)-1,0);let o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||U(this,e,t,r,Math.pow(2,8*r)-1,0);let o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=Q((function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=Q((function(e,t=0){return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);U(this,e,t,r,n-1,-n)}let o=0,i=1,a=0;for(this[t]=255&e;++o<r&&(i*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/i|0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);U(this,e,t,r,n-1,-n)}let o=r-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i|0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=Q((function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=Q((function(e,t=0){return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return M(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return M(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const o=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},c.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{const i=c.isBuffer(e)?e:c.from(e,n),a=i.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=i[o%a]}return this};const D={};function V(e,t,r){D[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function q(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function K(e,t,r,n,o,i){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let o;throw o=i>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new D.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||z(t,e.length-(r+1))}(n,o,i)}function H(e,t){if("number"!=typeof e)throw new D.ERR_INVALID_ARG_TYPE(t,"number",e)}function z(e,t,r){if(Math.floor(e)!==e)throw H(e,r),new D.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}V("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),V("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),V("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=q(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=q(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n}),RangeError);const X=/[^+/0-9A-Za-z-_]/g;function $(e,t){let r;t=t||1/0;const n=e.length;let o=null;const i=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function W(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(X,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function G(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const Z=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function Q(e){return"undefined"==typeof BigInt?ee:e}function ee(){throw new Error("BigInt not supported")}},251:(e,t)=>{t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?o-1:0,p=r?-1:1,h=e[t+f];for(f+=p,i=h&(1<<-l)-1,h>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=p,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+e[t+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),i-=c}return(h?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,f=l>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,d=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[r+h]=255&s,h+=d,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[r+h]=255&a,h+=d,a/=256,c-=8);e[r+h-d]|=128*y}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}return r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r(281)})(),e.exports=n()},4148:(e,t,r)=>{"use strict";var n=r(5606),o=r(6763);function i(e){return i="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},i(e)}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,a=void 0,a=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===i(a)?a:String(a)),n)}var o,a}function s(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var u,c,l=r(9597).codes,f=l.ERR_AMBIGUOUS_ARGUMENT,p=l.ERR_INVALID_ARG_TYPE,h=l.ERR_INVALID_ARG_VALUE,d=l.ERR_INVALID_RETURN_VALUE,y=l.ERR_MISSING_ARGS,m=r(3918),g=r(537).inspect,v=r(537).types,b=v.isPromise,w=v.isRegExp,S=r(1514)(),k=r(9394)(),E=r(8075)("RegExp.prototype.test");new Map;function A(){var e=r(2299);u=e.isDeepEqual,c=e.isDeepStrictEqual}var T=!1,O=e.exports=_,P={};function x(e){if(e.message instanceof Error)throw e.message;throw new m(e)}function I(e,t,r,n){if(!r){var o=!1;if(0===t)o=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var i=new m({actual:r,expected:!0,message:n,operator:"==",stackStartFn:e});throw i.generatedMessage=o,i}}function _(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];I.apply(void 0,[_,t.length].concat(t))}O.fail=function e(t,r,i,a,s){var u,c=arguments.length;if(0===c)u="Failed";else if(1===c)i=t,t=void 0;else{if(!1===T)T=!0,(n.emitWarning?n.emitWarning:o.warn.bind(o))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094");2===c&&(a="!=")}if(i instanceof Error)throw i;var l={actual:t,expected:r,operator:void 0===a?"fail":a,stackStartFn:s||e};void 0!==i&&(l.message=i);var f=new m(l);throw u&&(f.message=u,f.generatedMessage=!0),f},O.AssertionError=m,O.ok=_,O.equal=function e(t,r,n){if(arguments.length<2)throw new y("actual","expected");t!=r&&x({actual:t,expected:r,message:n,operator:"==",stackStartFn:e})},O.notEqual=function e(t,r,n){if(arguments.length<2)throw new y("actual","expected");t==r&&x({actual:t,expected:r,message:n,operator:"!=",stackStartFn:e})},O.deepEqual=function e(t,r,n){if(arguments.length<2)throw new y("actual","expected");void 0===u&&A(),u(t,r)||x({actual:t,expected:r,message:n,operator:"deepEqual",stackStartFn:e})},O.notDeepEqual=function e(t,r,n){if(arguments.length<2)throw new y("actual","expected");void 0===u&&A(),u(t,r)&&x({actual:t,expected:r,message:n,operator:"notDeepEqual",stackStartFn:e})},O.deepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new y("actual","expected");void 0===u&&A(),c(t,r)||x({actual:t,expected:r,message:n,operator:"deepStrictEqual",stackStartFn:e})},O.notDeepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new y("actual","expected");void 0===u&&A();c(t,r)&&x({actual:t,expected:r,message:n,operator:"notDeepStrictEqual",stackStartFn:e})},O.strictEqual=function e(t,r,n){if(arguments.length<2)throw new y("actual","expected");k(t,r)||x({actual:t,expected:r,message:n,operator:"strictEqual",stackStartFn:e})},O.notStrictEqual=function e(t,r,n){if(arguments.length<2)throw new y("actual","expected");k(t,r)&&x({actual:t,expected:r,message:n,operator:"notStrictEqual",stackStartFn:e})};var B=s((function e(t,r,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r.forEach((function(e){e in t&&(void 0!==n&&"string"==typeof n[e]&&w(t[e])&&E(t[e],n[e])?o[e]=n[e]:o[e]=t[e])}))}));function R(e,t,r,n){if("function"!=typeof t){if(w(t))return E(t,e);if(2===arguments.length)throw new p("expected",["Function","RegExp"],t);if("object"!==i(e)||null===e){var o=new m({actual:e,expected:t,message:r,operator:"deepStrictEqual",stackStartFn:n});throw o.operator=n.name,o}var a=Object.keys(t);if(t instanceof Error)a.push("name","message");else if(0===a.length)throw new h("error",t,"may not be an empty object");return void 0===u&&A(),a.forEach((function(o){"string"==typeof e[o]&&w(t[o])&&E(t[o],e[o])||function(e,t,r,n,o,i){if(!(r in e)||!c(e[r],t[r])){if(!n){var a=new B(e,o),s=new B(t,o,e),u=new m({actual:a,expected:s,operator:"deepStrictEqual",stackStartFn:i});throw u.actual=e,u.expected=t,u.operator=i.name,u}x({actual:e,expected:t,message:n,operator:i.name,stackStartFn:i})}}(e,t,o,r,a,n)})),!0}return void 0!==t.prototype&&e instanceof t||!Error.isPrototypeOf(t)&&!0===t.call({},e)}function C(e){if("function"!=typeof e)throw new p("fn","Function",e);try{e()}catch(e){return e}return P}function U(e){return b(e)||null!==e&&"object"===i(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function N(e){return Promise.resolve().then((function(){var t;if("function"==typeof e){if(!U(t=e()))throw new d("instance of Promise","promiseFn",t)}else{if(!U(e))throw new p("promiseFn",["Function","Promise"],e);t=e}return Promise.resolve().then((function(){return t})).then((function(){return P})).catch((function(e){return e}))}))}function L(e,t,r,n){if("string"==typeof r){if(4===arguments.length)throw new p("error",["Object","Error","Function","RegExp"],r);if("object"===i(t)&&null!==t){if(t.message===r)throw new f("error/message",'The error message "'.concat(t.message,'" is identical to the message.'))}else if(t===r)throw new f("error/message",'The error "'.concat(t,'" is identical to the message.'));n=r,r=void 0}else if(null!=r&&"object"!==i(r)&&"function"!=typeof r)throw new p("error",["Object","Error","Function","RegExp"],r);if(t===P){var o="";r&&r.name&&(o+=" (".concat(r.name,")")),o+=n?": ".concat(n):".";var a="rejects"===e.name?"rejection":"exception";x({actual:void 0,expected:r,operator:e.name,message:"Missing expected ".concat(a).concat(o),stackStartFn:e})}if(r&&!R(t,r,n,e))throw t}function j(e,t,r,n){if(t!==P){if("string"==typeof r&&(n=r,r=void 0),!r||R(t,r)){var o=n?": ".concat(n):".",i="doesNotReject"===e.name?"rejection":"exception";x({actual:t,expected:r,operator:e.name,message:"Got unwanted ".concat(i).concat(o,"\n")+'Actual message: "'.concat(t&&t.message,'"'),stackStartFn:e})}throw t}}function M(e,t,r,n,o){if(!w(t))throw new p("regexp","RegExp",t);var a="match"===o;if("string"!=typeof e||E(t,e)!==a){if(r instanceof Error)throw r;var s=!r;r=r||("string"!=typeof e?'The "string" argument must be of type string. Received type '+"".concat(i(e)," (").concat(g(e),")"):(a?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(g(t),". Input:\n\n").concat(g(e),"\n"));var u=new m({actual:e,expected:t,message:r,operator:o,stackStartFn:n});throw u.generatedMessage=s,u}}function F(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];I.apply(void 0,[F,t.length].concat(t))}O.throws=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];L.apply(void 0,[e,C(t)].concat(n))},O.rejects=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return N(t).then((function(t){return L.apply(void 0,[e,t].concat(n))}))},O.doesNotThrow=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];j.apply(void 0,[e,C(t)].concat(n))},O.doesNotReject=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return N(t).then((function(t){return j.apply(void 0,[e,t].concat(n))}))},O.ifError=function e(t){if(null!=t){var r="ifError got unwanted exception: ";"object"===i(t)&&"string"==typeof t.message?0===t.message.length&&t.constructor?r+=t.constructor.name:r+=t.message:r+=g(t);var n=new m({actual:t,expected:null,operator:"ifError",message:r,stackStartFn:e}),o=t.stack;if("string"==typeof o){var a=o.split("\n");a.shift();for(var s=n.stack.split("\n"),u=0;u<a.length;u++){var c=s.indexOf(a[u]);if(-1!==c){s=s.slice(0,c);break}}n.stack="".concat(s.join("\n"),"\n").concat(a.join("\n"))}throw n}},O.match=function e(t,r,n){M(t,r,n,e,"match")},O.doesNotMatch=function e(t,r,n){M(t,r,n,e,"doesNotMatch")},O.strict=S(F,O,{equal:O.strictEqual,deepEqual:O.deepStrictEqual,notEqual:O.notStrictEqual,notDeepEqual:O.notDeepStrictEqual}),O.strict.strict=O.strict},3918:(e,t,r)=>{"use strict";var n=r(5606);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return(t=u(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,u(n.key),n)}}function u(e){var t=function(e,t){if("object"!==m(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===m(t)?t:String(t)}function c(e,t){if(t&&("object"===m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){var t="function"==typeof Map?new Map:void 0;return f=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return p(e,arguments,y(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),d(n,e)},f(e)}function p(e,t,r){return p=h()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&d(o,r.prototype),o},p.apply(null,arguments)}function h(){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}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function m(e){return m="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},m(e)}var g=r(537).inspect,v=r(9597).codes.ERR_INVALID_ARG_TYPE;function b(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}var w="",S="",k="",E="",A={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function T(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){r[t]=e[t]})),Object.defineProperty(r,"message",{value:e.message}),r}function O(e){return g(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function P(e,t,r){var o="",i="",a=0,s="",u=!1,c=O(e),l=c.split("\n"),f=O(t).split("\n"),p=0,h="";if("strictEqual"===r&&"object"===m(e)&&"object"===m(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===l.length&&1===f.length&&l[0]!==f[0]){var d=l[0].length+f[0].length;if(d<=10){if(!("object"===m(e)&&null!==e||"object"===m(t)&&null!==t||0===e&&0===t))return"".concat(A[r],"\n\n")+"".concat(l[0]," !== ").concat(f[0],"\n")}else if("strictEqualObject"!==r){if(d<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;l[0][p]===f[0][p];)p++;p>2&&(h="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(" ",p),"^"),p=0)}}}for(var y=l[l.length-1],g=f[f.length-1];y===g&&(p++<2?s="\n ".concat(y).concat(s):o=y,l.pop(),f.pop(),0!==l.length&&0!==f.length);)y=l[l.length-1],g=f[f.length-1];var v=Math.max(l.length,f.length);if(0===v){var T=c.split("\n");if(T.length>30)for(T[26]="".concat(w,"...").concat(E);T.length>27;)T.pop();return"".concat(A.notIdentical,"\n\n").concat(T.join("\n"),"\n")}p>3&&(s="\n".concat(w,"...").concat(E).concat(s),u=!0),""!==o&&(s="\n ".concat(o).concat(s),o="");var P=0,x=A[r]+"\n".concat(S,"+ actual").concat(E," ").concat(k,"- expected").concat(E),I=" ".concat(w,"...").concat(E," Lines skipped");for(p=0;p<v;p++){var _=p-a;if(l.length<p+1)_>1&&p>2&&(_>4?(i+="\n".concat(w,"...").concat(E),u=!0):_>3&&(i+="\n ".concat(f[p-2]),P++),i+="\n ".concat(f[p-1]),P++),a=p,o+="\n".concat(k,"-").concat(E," ").concat(f[p]),P++;else if(f.length<p+1)_>1&&p>2&&(_>4?(i+="\n".concat(w,"...").concat(E),u=!0):_>3&&(i+="\n ".concat(l[p-2]),P++),i+="\n ".concat(l[p-1]),P++),a=p,i+="\n".concat(S,"+").concat(E," ").concat(l[p]),P++;else{var B=f[p],R=l[p],C=R!==B&&(!b(R,",")||R.slice(0,-1)!==B);C&&b(B,",")&&B.slice(0,-1)===R&&(C=!1,R+=","),C?(_>1&&p>2&&(_>4?(i+="\n".concat(w,"...").concat(E),u=!0):_>3&&(i+="\n ".concat(l[p-2]),P++),i+="\n ".concat(l[p-1]),P++),a=p,i+="\n".concat(S,"+").concat(E," ").concat(R),o+="\n".concat(k,"-").concat(E," ").concat(B),P+=2):(i+=o,o="",1!==_&&0!==p||(i+="\n ".concat(R),P++))}if(P>20&&p<v-2)return"".concat(x).concat(I,"\n").concat(i,"\n").concat(w,"...").concat(E).concat(o,"\n")+"".concat(w,"...").concat(E)}return"".concat(x).concat(u?I:"","\n").concat(i).concat(o).concat(s).concat(h)}var x=function(e,t){!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&&d(e,t)}(b,e);var r,o,a,u,f,p=(r=b,o=h(),function(){var e,t=y(r);if(o){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return c(this,e)});function b(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),"object"!==m(e)||null===e)throw new v("options","Object",e);var r=e.message,o=e.operator,i=e.stackStartFn,a=e.actual,s=e.expected,u=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=r)t=p.call(this,String(r));else if(n.stderr&&n.stderr.isTTY&&(n.stderr&&n.stderr.getColorDepth&&1!==n.stderr.getColorDepth()?(w="\x1b[34m",S="\x1b[32m",E="\x1b[39m",k="\x1b[31m"):(w="",S="",E="",k="")),"object"===m(a)&&null!==a&&"object"===m(s)&&null!==s&&"stack"in a&&a instanceof Error&&"stack"in s&&s instanceof Error&&(a=T(a),s=T(s)),"deepStrictEqual"===o||"strictEqual"===o)t=p.call(this,P(a,s,o));else if("notDeepStrictEqual"===o||"notStrictEqual"===o){var f=A[o],h=O(a).split("\n");if("notStrictEqual"===o&&"object"===m(a)&&null!==a&&(f=A.notStrictEqualObject),h.length>30)for(h[26]="".concat(w,"...").concat(E);h.length>27;)h.pop();t=1===h.length?p.call(this,"".concat(f," ").concat(h[0])):p.call(this,"".concat(f,"\n\n").concat(h.join("\n"),"\n"))}else{var d=O(a),y="",g=A[o];"notDeepEqual"===o||"notEqual"===o?(d="".concat(A[o],"\n\n").concat(d)).length>1024&&(d="".concat(d.slice(0,1021),"...")):(y="".concat(O(s)),d.length>512&&(d="".concat(d.slice(0,509),"...")),y.length>512&&(y="".concat(y.slice(0,509),"...")),"deepEqual"===o||"equal"===o?d="".concat(g,"\n\n").concat(d,"\n\nshould equal\n\n"):y=" ".concat(o," ").concat(y)),t=p.call(this,"".concat(d).concat(y))}return Error.stackTraceLimit=u,t.generatedMessage=!r,Object.defineProperty(l(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=a,t.expected=s,t.operator=o,Error.captureStackTrace&&Error.captureStackTrace(l(t),i),t.stack,t.name="AssertionError",c(t)}return a=b,(u=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return g(this,i(i({},t),{},{customInspect:!1,depth:0}))}}])&&s(a.prototype,u),f&&s(a,f),Object.defineProperty(a,"prototype",{writable:!1}),b}(f(Error),g.custom);e.exports=x},9597:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(i=o.key,a=void 0,a=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===n(a)?a:String(a)),o)}var i,a}function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}function a(e){var t=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}}();return function(){var r,o=s(e);if(t){var i=s(this).constructor;r=Reflect.construct(o,arguments,i)}else r=o.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}var u,c,l={};function f(e,t,r){r||(r=Error);var n=function(r){!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&&i(e,t)}(l,r);var n,s,u,c=a(l);function l(r,n,o){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),i=c.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,o)),i.code=e,i}return n=l,s&&o(n.prototype,s),u&&o(n,u),Object.defineProperty(n,"prototype",{writable:!1}),n}(r);l[e]=n}function p(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}f("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),f("ERR_INVALID_ARG_TYPE",(function(e,t,o){var i,a,s,c;if(void 0===u&&(u=r(4148)),u("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(a="not ",t.substr(!s||s<0?0:+s,a.length)===a)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))c="The ".concat(e," ").concat(i," ").concat(p(t,"type"));else{var l=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";c='The "'.concat(e,'" ').concat(l," ").concat(i," ").concat(p(t,"type"))}return c+=". Received type ".concat(n(o))}),TypeError),f("ERR_INVALID_ARG_VALUE",(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===c&&(c=r(537));var o=c.inspect(t);return o.length>128&&(o="".concat(o.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(n,". Received ").concat(o)}),TypeError,RangeError),f("ERR_INVALID_RETURN_VALUE",(function(e,t,r){var o;return o=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(o,".")}),TypeError),f("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];void 0===u&&(u=r(4148)),u(t.length>0,"At least one arg needs to be specified");var o="The ",i=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),i){case 1:o+="".concat(t[0]," argument");break;case 2:o+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:o+=t.slice(0,i-1).join(", "),o+=", and ".concat(t[i-1]," arguments")}return"".concat(o," must be specified")}),TypeError),e.exports.codes=l},2299:(e,t,r)=>{"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(e,t)}(e,t)||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.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i(e){return i="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},i(e)}var a=void 0!==/a/g.flags,s=function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t},u=function(e){var t=[];return e.forEach((function(e,r){return t.push([r,e])})),t},c=Object.is?Object.is:r(7653),l=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},f=Number.isNaN?Number.isNaN:r(4133);function p(e){return e.call.bind(e)}var h=p(Object.prototype.hasOwnProperty),d=p(Object.prototype.propertyIsEnumerable),y=p(Object.prototype.toString),m=r(537).types,g=m.isAnyArrayBuffer,v=m.isArrayBufferView,b=m.isDate,w=m.isMap,S=m.isRegExp,k=m.isSet,E=m.isNativeError,A=m.isBoxedPrimitive,T=m.isNumberObject,O=m.isStringObject,P=m.isBooleanObject,x=m.isBigIntObject,I=m.isSymbolObject,_=m.isFloat32Array,B=m.isFloat64Array;function R(e){if(0===e.length||e.length>10)return!0;for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);if(r<48||r>57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function C(e){return Object.keys(e).filter(R).concat(l(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function U(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0}var N=0,L=1,j=2,M=3;function F(e,t,r,n){if(e===t)return 0!==e||(!r||c(e,t));if(r){if("object"!==i(e))return"number"==typeof e&&f(e)&&f(t);if("object"!==i(t)||null===e||null===t)return!1;if(Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(null===e||"object"!==i(e))return(null===t||"object"!==i(t))&&e==t;if(null===t||"object"!==i(t))return!1}var o,s,u,l,p=y(e);if(p!==y(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var h=C(e),d=C(t);return h.length===d.length&&V(e,t,r,n,L,h)}if("[object Object]"===p&&(!w(e)&&w(t)||!k(e)&&k(t)))return!1;if(b(e)){if(!b(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(S(e)){if(!S(t)||(u=e,l=t,!(a?u.source===l.source&&u.flags===l.flags:RegExp.prototype.toString.call(u)===RegExp.prototype.toString.call(l))))return!1}else if(E(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else{if(v(e)){if(r||!_(e)&&!B(e)){if(!function(e,t){return e.byteLength===t.byteLength&&0===U(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}(e,t))return!1}else if(!function(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}(e,t))return!1;var m=C(e),R=C(t);return m.length===R.length&&V(e,t,r,n,N,m)}if(k(e))return!(!k(t)||e.size!==t.size)&&V(e,t,r,n,j);if(w(e))return!(!w(t)||e.size!==t.size)&&V(e,t,r,n,M);if(g(e)){if(s=t,(o=e).byteLength!==s.byteLength||0!==U(new Uint8Array(o),new Uint8Array(s)))return!1}else if(A(e)&&!function(e,t){return T(e)?T(t)&&c(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t)):O(e)?O(t)&&String.prototype.valueOf.call(e)===String.prototype.valueOf.call(t):P(e)?P(t)&&Boolean.prototype.valueOf.call(e)===Boolean.prototype.valueOf.call(t):x(e)?x(t)&&BigInt.prototype.valueOf.call(e)===BigInt.prototype.valueOf.call(t):I(t)&&Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t)}(e,t))return!1}return V(e,t,r,n,N)}function D(e,t){return t.filter((function(t){return d(e,t)}))}function V(e,t,r,o,a,c){if(5===arguments.length){c=Object.keys(e);var f=Object.keys(t);if(c.length!==f.length)return!1}for(var p=0;p<c.length;p++)if(!h(t,c[p]))return!1;if(r&&5===arguments.length){var y=l(e);if(0!==y.length){var m=0;for(p=0;p<y.length;p++){var g=y[p];if(d(e,g)){if(!d(t,g))return!1;c.push(g),m++}else if(d(t,g))return!1}var v=l(t);if(y.length!==v.length&&D(t,v).length!==m)return!1}else{var b=l(t);if(0!==b.length&&0!==D(t,b).length)return!1}}if(0===c.length&&(a===N||a===L&&0===e.length||0===e.size))return!0;if(void 0===o)o={val1:new Map,val2:new Map,position:0};else{var w=o.val1.get(e);if(void 0!==w){var S=o.val2.get(t);if(void 0!==S)return w===S}o.position++}o.val1.set(e,o.position),o.val2.set(t,o.position);var k=function(e,t,r,o,a,c){var l=0;if(c===j){if(!function(e,t,r,n){for(var o=null,a=s(e),u=0;u<a.length;u++){var c=a[u];if("object"===i(c)&&null!==c)null===o&&(o=new Set),o.add(c);else if(!t.has(c)){if(r)return!1;if(!H(e,t,c))return!1;null===o&&(o=new Set),o.add(c)}}if(null!==o){for(var l=s(t),f=0;f<l.length;f++){var p=l[f];if("object"===i(p)&&null!==p){if(!q(o,p,r,n))return!1}else if(!r&&!e.has(p)&&!q(o,p,r,n))return!1}return 0===o.size}return!0}(e,t,r,a))return!1}else if(c===M){if(!function(e,t,r,o){for(var a=null,s=u(e),c=0;c<s.length;c++){var l=n(s[c],2),f=l[0],p=l[1];if("object"===i(f)&&null!==f)null===a&&(a=new Set),a.add(f);else{var h=t.get(f);if(void 0===h&&!t.has(f)||!F(p,h,r,o)){if(r)return!1;if(!z(e,t,f,p,o))return!1;null===a&&(a=new Set),a.add(f)}}}if(null!==a){for(var d=u(t),y=0;y<d.length;y++){var m=n(d[y],2),g=m[0],v=m[1];if("object"===i(g)&&null!==g){if(!X(a,e,g,v,r,o))return!1}else if(!(r||e.has(g)&&F(e.get(g),v,!1,o)||X(a,e,g,v,!1,o)))return!1}return 0===a.size}return!0}(e,t,r,a))return!1}else if(c===L)for(;l<e.length;l++){if(!h(e,l)){if(h(t,l))return!1;for(var f=Object.keys(e);l<f.length;l++){var p=f[l];if(!h(t,p)||!F(e[p],t[p],r,a))return!1}return f.length===Object.keys(t).length}if(!h(t,l)||!F(e[l],t[l],r,a))return!1}for(l=0;l<o.length;l++){var d=o[l];if(!F(e[d],t[d],r,a))return!1}return!0}(e,t,r,c,o,a);return o.val1.delete(e),o.val2.delete(t),k}function q(e,t,r,n){for(var o=s(e),i=0;i<o.length;i++){var a=o[i];if(F(t,a,r,n))return e.delete(a),!0}return!1}function K(e){switch(i(e)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":e=+e;case"number":if(f(e))return!1}return!0}function H(e,t,r){var n=K(r);return null!=n?n:t.has(n)&&!e.has(n)}function z(e,t,r,n,o){var i=K(r);if(null!=i)return i;var a=t.get(i);return!(void 0===a&&!t.has(i)||!F(n,a,!1,o))&&(!e.has(i)&&F(n,a,!1,o))}function X(e,t,r,n,o,i){for(var a=s(e),u=0;u<a.length;u++){var c=a[u];if(F(r,c,o,i)&&F(n,t.get(c),o,i))return e.delete(c),!0}return!1}e.exports={isDeepEqual:function(e,t){return F(e,t,false)},isDeepStrictEqual:function(e,t){return F(e,t,true)}}},3626:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(8287);n.Buffer.alloc(1).subarray(0,1)instanceof n.Buffer||(n.Buffer.prototype.subarray=function(e,t){var r=Uint8Array.prototype.subarray.call(this,e,t);return Object.setPrototypeOf(r,n.Buffer.prototype),r});const o=n.Buffer},7957:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Account:()=>Ft,Address:()=>We,Asset:()=>F,AuthClawbackEnabledFlag:()=>it,AuthImmutableFlag:()=>ot,AuthRequiredFlag:()=>rt,AuthRevocableFlag:()=>nt,BASE_FEE:()=>ar,Claimant:()=>Ie,Contract:()=>wr,FastSigning:()=>f,FeeBumpTransaction:()=>Nt,Hyper:()=>n.Hyper,Int128:()=>Hr,Int256:()=>Zr,Keypair:()=>U,LiquidityPoolAsset:()=>Te,LiquidityPoolFeeV18:()=>q,LiquidityPoolId:()=>Ce,Memo:()=>gt,MemoHash:()=>yt,MemoID:()=>ht,MemoNone:()=>pt,MemoReturn:()=>mt,MemoText:()=>dt,MuxedAccount:()=>Kt,Networks:()=>lr,Operation:()=>at,ScInt:()=>pn,SignerKey:()=>Jt,Soroban:()=>mr,SorobanDataBuilder:()=>$t,StrKey:()=>T,TimeoutInfinite:()=>sr,Transaction:()=>Ot,TransactionBase:()=>W,TransactionBuilder:()=>ur,Uint128:()=>xr,Uint256:()=>Lr,UnsignedHyper:()=>n.UnsignedHyper,XdrLargeInt:()=>nn,authorizeEntry:()=>_n,authorizeInvocation:()=>Rn,buildInvocationTree:()=>Cn,cereal:()=>a,decodeAddressToMuxedAccount:()=>Ne,default:()=>Ln,encodeMuxedAccount:()=>je,encodeMuxedAccountToAddress:()=>Le,extractBaseAddress:()=>Me,getLiquidityPoolId:()=>K,hash:()=>u,humanizeEvents:()=>An,nativeToScVal:()=>vn,scValToBigInt:()=>hn,scValToNative:()=>bn,sign:()=>p,verify:()=>h,walkInvocationTree:()=>Un,xdr:()=>i});var n=r(3740),o=n.config((function(e){var t=1024;e.typedef("Value",e.varOpaque()),e.struct("ScpBallot",[["counter",e.lookup("Uint32")],["value",e.lookup("Value")]]),e.enum("ScpStatementType",{scpStPrepare:0,scpStConfirm:1,scpStExternalize:2,scpStNominate:3}),e.struct("ScpNomination",[["quorumSetHash",e.lookup("Hash")],["votes",e.varArray(e.lookup("Value"),2147483647)],["accepted",e.varArray(e.lookup("Value"),2147483647)]]),e.struct("ScpStatementPrepare",[["quorumSetHash",e.lookup("Hash")],["ballot",e.lookup("ScpBallot")],["prepared",e.option(e.lookup("ScpBallot"))],["preparedPrime",e.option(e.lookup("ScpBallot"))],["nC",e.lookup("Uint32")],["nH",e.lookup("Uint32")]]),e.struct("ScpStatementConfirm",[["ballot",e.lookup("ScpBallot")],["nPrepared",e.lookup("Uint32")],["nCommit",e.lookup("Uint32")],["nH",e.lookup("Uint32")],["quorumSetHash",e.lookup("Hash")]]),e.struct("ScpStatementExternalize",[["commit",e.lookup("ScpBallot")],["nH",e.lookup("Uint32")],["commitQuorumSetHash",e.lookup("Hash")]]),e.union("ScpStatementPledges",{switchOn:e.lookup("ScpStatementType"),switchName:"type",switches:[["scpStPrepare","prepare"],["scpStConfirm","confirm"],["scpStExternalize","externalize"],["scpStNominate","nominate"]],arms:{prepare:e.lookup("ScpStatementPrepare"),confirm:e.lookup("ScpStatementConfirm"),externalize:e.lookup("ScpStatementExternalize"),nominate:e.lookup("ScpNomination")}}),e.struct("ScpStatement",[["nodeId",e.lookup("NodeId")],["slotIndex",e.lookup("Uint64")],["pledges",e.lookup("ScpStatementPledges")]]),e.struct("ScpEnvelope",[["statement",e.lookup("ScpStatement")],["signature",e.lookup("Signature")]]),e.struct("ScpQuorumSet",[["threshold",e.lookup("Uint32")],["validators",e.varArray(e.lookup("NodeId"),2147483647)],["innerSets",e.varArray(e.lookup("ScpQuorumSet"),2147483647)]]),e.typedef("Thresholds",e.opaque(4)),e.typedef("String32",e.string(32)),e.typedef("String64",e.string(64)),e.typedef("SequenceNumber",e.lookup("Int64")),e.typedef("DataValue",e.varOpaque(64)),e.typedef("PoolId",e.lookup("Hash")),e.typedef("AssetCode4",e.opaque(4)),e.typedef("AssetCode12",e.opaque(12)),e.enum("AssetType",{assetTypeNative:0,assetTypeCreditAlphanum4:1,assetTypeCreditAlphanum12:2,assetTypePoolShare:3}),e.union("AssetCode",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeCreditAlphanum4","assetCode4"],["assetTypeCreditAlphanum12","assetCode12"]],arms:{assetCode4:e.lookup("AssetCode4"),assetCode12:e.lookup("AssetCode12")}}),e.struct("AlphaNum4",[["assetCode",e.lookup("AssetCode4")],["issuer",e.lookup("AccountId")]]),e.struct("AlphaNum12",[["assetCode",e.lookup("AssetCode12")],["issuer",e.lookup("AccountId")]]),e.union("Asset",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",e.void()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"]],arms:{alphaNum4:e.lookup("AlphaNum4"),alphaNum12:e.lookup("AlphaNum12")}}),e.struct("Price",[["n",e.lookup("Int32")],["d",e.lookup("Int32")]]),e.struct("Liabilities",[["buying",e.lookup("Int64")],["selling",e.lookup("Int64")]]),e.enum("ThresholdIndices",{thresholdMasterWeight:0,thresholdLow:1,thresholdMed:2,thresholdHigh:3}),e.enum("LedgerEntryType",{account:0,trustline:1,offer:2,data:3,claimableBalance:4,liquidityPool:5,contractData:6,contractCode:7,configSetting:8,ttl:9}),e.struct("Signer",[["key",e.lookup("SignerKey")],["weight",e.lookup("Uint32")]]),e.enum("AccountFlags",{authRequiredFlag:1,authRevocableFlag:2,authImmutableFlag:4,authClawbackEnabledFlag:8}),e.const("MASK_ACCOUNT_FLAGS",7),e.const("MASK_ACCOUNT_FLAGS_V17",15),e.const("MAX_SIGNERS",20),e.typedef("SponsorshipDescriptor",e.option(e.lookup("AccountId"))),e.struct("AccountEntryExtensionV3",[["ext",e.lookup("ExtensionPoint")],["seqLedger",e.lookup("Uint32")],["seqTime",e.lookup("TimePoint")]]),e.union("AccountEntryExtensionV2Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[3,"v3"]],arms:{v3:e.lookup("AccountEntryExtensionV3")}}),e.struct("AccountEntryExtensionV2",[["numSponsored",e.lookup("Uint32")],["numSponsoring",e.lookup("Uint32")],["signerSponsoringIDs",e.varArray(e.lookup("SponsorshipDescriptor"),e.lookup("MAX_SIGNERS"))],["ext",e.lookup("AccountEntryExtensionV2Ext")]]),e.union("AccountEntryExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[2,"v2"]],arms:{v2:e.lookup("AccountEntryExtensionV2")}}),e.struct("AccountEntryExtensionV1",[["liabilities",e.lookup("Liabilities")],["ext",e.lookup("AccountEntryExtensionV1Ext")]]),e.union("AccountEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("AccountEntryExtensionV1")}}),e.struct("AccountEntry",[["accountId",e.lookup("AccountId")],["balance",e.lookup("Int64")],["seqNum",e.lookup("SequenceNumber")],["numSubEntries",e.lookup("Uint32")],["inflationDest",e.option(e.lookup("AccountId"))],["flags",e.lookup("Uint32")],["homeDomain",e.lookup("String32")],["thresholds",e.lookup("Thresholds")],["signers",e.varArray(e.lookup("Signer"),e.lookup("MAX_SIGNERS"))],["ext",e.lookup("AccountEntryExt")]]),e.enum("TrustLineFlags",{authorizedFlag:1,authorizedToMaintainLiabilitiesFlag:2,trustlineClawbackEnabledFlag:4}),e.const("MASK_TRUSTLINE_FLAGS",1),e.const("MASK_TRUSTLINE_FLAGS_V13",3),e.const("MASK_TRUSTLINE_FLAGS_V17",7),e.enum("LiquidityPoolType",{liquidityPoolConstantProduct:0}),e.union("TrustLineAsset",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",e.void()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"],["assetTypePoolShare","liquidityPoolId"]],arms:{alphaNum4:e.lookup("AlphaNum4"),alphaNum12:e.lookup("AlphaNum12"),liquidityPoolId:e.lookup("PoolId")}}),e.union("TrustLineEntryExtensionV2Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TrustLineEntryExtensionV2",[["liquidityPoolUseCount",e.lookup("Int32")],["ext",e.lookup("TrustLineEntryExtensionV2Ext")]]),e.union("TrustLineEntryV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[2,"v2"]],arms:{v2:e.lookup("TrustLineEntryExtensionV2")}}),e.struct("TrustLineEntryV1",[["liabilities",e.lookup("Liabilities")],["ext",e.lookup("TrustLineEntryV1Ext")]]),e.union("TrustLineEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("TrustLineEntryV1")}}),e.struct("TrustLineEntry",[["accountId",e.lookup("AccountId")],["asset",e.lookup("TrustLineAsset")],["balance",e.lookup("Int64")],["limit",e.lookup("Int64")],["flags",e.lookup("Uint32")],["ext",e.lookup("TrustLineEntryExt")]]),e.enum("OfferEntryFlags",{passiveFlag:1}),e.const("MASK_OFFERENTRY_FLAGS",1),e.union("OfferEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("OfferEntry",[["sellerId",e.lookup("AccountId")],["offerId",e.lookup("Int64")],["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["amount",e.lookup("Int64")],["price",e.lookup("Price")],["flags",e.lookup("Uint32")],["ext",e.lookup("OfferEntryExt")]]),e.union("DataEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("DataEntry",[["accountId",e.lookup("AccountId")],["dataName",e.lookup("String64")],["dataValue",e.lookup("DataValue")],["ext",e.lookup("DataEntryExt")]]),e.enum("ClaimPredicateType",{claimPredicateUnconditional:0,claimPredicateAnd:1,claimPredicateOr:2,claimPredicateNot:3,claimPredicateBeforeAbsoluteTime:4,claimPredicateBeforeRelativeTime:5}),e.union("ClaimPredicate",{switchOn:e.lookup("ClaimPredicateType"),switchName:"type",switches:[["claimPredicateUnconditional",e.void()],["claimPredicateAnd","andPredicates"],["claimPredicateOr","orPredicates"],["claimPredicateNot","notPredicate"],["claimPredicateBeforeAbsoluteTime","absBefore"],["claimPredicateBeforeRelativeTime","relBefore"]],arms:{andPredicates:e.varArray(e.lookup("ClaimPredicate"),2),orPredicates:e.varArray(e.lookup("ClaimPredicate"),2),notPredicate:e.option(e.lookup("ClaimPredicate")),absBefore:e.lookup("Int64"),relBefore:e.lookup("Int64")}}),e.enum("ClaimantType",{claimantTypeV0:0}),e.struct("ClaimantV0",[["destination",e.lookup("AccountId")],["predicate",e.lookup("ClaimPredicate")]]),e.union("Claimant",{switchOn:e.lookup("ClaimantType"),switchName:"type",switches:[["claimantTypeV0","v0"]],arms:{v0:e.lookup("ClaimantV0")}}),e.enum("ClaimableBalanceIdType",{claimableBalanceIdTypeV0:0}),e.union("ClaimableBalanceId",{switchOn:e.lookup("ClaimableBalanceIdType"),switchName:"type",switches:[["claimableBalanceIdTypeV0","v0"]],arms:{v0:e.lookup("Hash")}}),e.enum("ClaimableBalanceFlags",{claimableBalanceClawbackEnabledFlag:1}),e.const("MASK_CLAIMABLE_BALANCE_FLAGS",1),e.union("ClaimableBalanceEntryExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("ClaimableBalanceEntryExtensionV1",[["ext",e.lookup("ClaimableBalanceEntryExtensionV1Ext")],["flags",e.lookup("Uint32")]]),e.union("ClaimableBalanceEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("ClaimableBalanceEntryExtensionV1")}}),e.struct("ClaimableBalanceEntry",[["balanceId",e.lookup("ClaimableBalanceId")],["claimants",e.varArray(e.lookup("Claimant"),10)],["asset",e.lookup("Asset")],["amount",e.lookup("Int64")],["ext",e.lookup("ClaimableBalanceEntryExt")]]),e.struct("LiquidityPoolConstantProductParameters",[["assetA",e.lookup("Asset")],["assetB",e.lookup("Asset")],["fee",e.lookup("Int32")]]),e.struct("LiquidityPoolEntryConstantProduct",[["params",e.lookup("LiquidityPoolConstantProductParameters")],["reserveA",e.lookup("Int64")],["reserveB",e.lookup("Int64")],["totalPoolShares",e.lookup("Int64")],["poolSharesTrustLineCount",e.lookup("Int64")]]),e.union("LiquidityPoolEntryBody",{switchOn:e.lookup("LiquidityPoolType"),switchName:"type",switches:[["liquidityPoolConstantProduct","constantProduct"]],arms:{constantProduct:e.lookup("LiquidityPoolEntryConstantProduct")}}),e.struct("LiquidityPoolEntry",[["liquidityPoolId",e.lookup("PoolId")],["body",e.lookup("LiquidityPoolEntryBody")]]),e.enum("ContractDataDurability",{temporary:0,persistent:1}),e.struct("ContractDataEntry",[["ext",e.lookup("ExtensionPoint")],["contract",e.lookup("ScAddress")],["key",e.lookup("ScVal")],["durability",e.lookup("ContractDataDurability")],["val",e.lookup("ScVal")]]),e.struct("ContractCodeCostInputs",[["ext",e.lookup("ExtensionPoint")],["nInstructions",e.lookup("Uint32")],["nFunctions",e.lookup("Uint32")],["nGlobals",e.lookup("Uint32")],["nTableEntries",e.lookup("Uint32")],["nTypes",e.lookup("Uint32")],["nDataSegments",e.lookup("Uint32")],["nElemSegments",e.lookup("Uint32")],["nImports",e.lookup("Uint32")],["nExports",e.lookup("Uint32")],["nDataSegmentBytes",e.lookup("Uint32")]]),e.struct("ContractCodeEntryV1",[["ext",e.lookup("ExtensionPoint")],["costInputs",e.lookup("ContractCodeCostInputs")]]),e.union("ContractCodeEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("ContractCodeEntryV1")}}),e.struct("ContractCodeEntry",[["ext",e.lookup("ContractCodeEntryExt")],["hash",e.lookup("Hash")],["code",e.varOpaque()]]),e.struct("TtlEntry",[["keyHash",e.lookup("Hash")],["liveUntilLedgerSeq",e.lookup("Uint32")]]),e.union("LedgerEntryExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("LedgerEntryExtensionV1",[["sponsoringId",e.lookup("SponsorshipDescriptor")],["ext",e.lookup("LedgerEntryExtensionV1Ext")]]),e.union("LedgerEntryData",{switchOn:e.lookup("LedgerEntryType"),switchName:"type",switches:[["account","account"],["trustline","trustLine"],["offer","offer"],["data","data"],["claimableBalance","claimableBalance"],["liquidityPool","liquidityPool"],["contractData","contractData"],["contractCode","contractCode"],["configSetting","configSetting"],["ttl","ttl"]],arms:{account:e.lookup("AccountEntry"),trustLine:e.lookup("TrustLineEntry"),offer:e.lookup("OfferEntry"),data:e.lookup("DataEntry"),claimableBalance:e.lookup("ClaimableBalanceEntry"),liquidityPool:e.lookup("LiquidityPoolEntry"),contractData:e.lookup("ContractDataEntry"),contractCode:e.lookup("ContractCodeEntry"),configSetting:e.lookup("ConfigSettingEntry"),ttl:e.lookup("TtlEntry")}}),e.union("LedgerEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("LedgerEntryExtensionV1")}}),e.struct("LedgerEntry",[["lastModifiedLedgerSeq",e.lookup("Uint32")],["data",e.lookup("LedgerEntryData")],["ext",e.lookup("LedgerEntryExt")]]),e.struct("LedgerKeyAccount",[["accountId",e.lookup("AccountId")]]),e.struct("LedgerKeyTrustLine",[["accountId",e.lookup("AccountId")],["asset",e.lookup("TrustLineAsset")]]),e.struct("LedgerKeyOffer",[["sellerId",e.lookup("AccountId")],["offerId",e.lookup("Int64")]]),e.struct("LedgerKeyData",[["accountId",e.lookup("AccountId")],["dataName",e.lookup("String64")]]),e.struct("LedgerKeyClaimableBalance",[["balanceId",e.lookup("ClaimableBalanceId")]]),e.struct("LedgerKeyLiquidityPool",[["liquidityPoolId",e.lookup("PoolId")]]),e.struct("LedgerKeyContractData",[["contract",e.lookup("ScAddress")],["key",e.lookup("ScVal")],["durability",e.lookup("ContractDataDurability")]]),e.struct("LedgerKeyContractCode",[["hash",e.lookup("Hash")]]),e.struct("LedgerKeyConfigSetting",[["configSettingId",e.lookup("ConfigSettingId")]]),e.struct("LedgerKeyTtl",[["keyHash",e.lookup("Hash")]]),e.union("LedgerKey",{switchOn:e.lookup("LedgerEntryType"),switchName:"type",switches:[["account","account"],["trustline","trustLine"],["offer","offer"],["data","data"],["claimableBalance","claimableBalance"],["liquidityPool","liquidityPool"],["contractData","contractData"],["contractCode","contractCode"],["configSetting","configSetting"],["ttl","ttl"]],arms:{account:e.lookup("LedgerKeyAccount"),trustLine:e.lookup("LedgerKeyTrustLine"),offer:e.lookup("LedgerKeyOffer"),data:e.lookup("LedgerKeyData"),claimableBalance:e.lookup("LedgerKeyClaimableBalance"),liquidityPool:e.lookup("LedgerKeyLiquidityPool"),contractData:e.lookup("LedgerKeyContractData"),contractCode:e.lookup("LedgerKeyContractCode"),configSetting:e.lookup("LedgerKeyConfigSetting"),ttl:e.lookup("LedgerKeyTtl")}}),e.enum("EnvelopeType",{envelopeTypeTxV0:0,envelopeTypeScp:1,envelopeTypeTx:2,envelopeTypeAuth:3,envelopeTypeScpvalue:4,envelopeTypeTxFeeBump:5,envelopeTypeOpId:6,envelopeTypePoolRevokeOpId:7,envelopeTypeContractId:8,envelopeTypeSorobanAuthorization:9}),e.typedef("UpgradeType",e.varOpaque(128)),e.enum("StellarValueType",{stellarValueBasic:0,stellarValueSigned:1}),e.struct("LedgerCloseValueSignature",[["nodeId",e.lookup("NodeId")],["signature",e.lookup("Signature")]]),e.union("StellarValueExt",{switchOn:e.lookup("StellarValueType"),switchName:"v",switches:[["stellarValueBasic",e.void()],["stellarValueSigned","lcValueSignature"]],arms:{lcValueSignature:e.lookup("LedgerCloseValueSignature")}}),e.struct("StellarValue",[["txSetHash",e.lookup("Hash")],["closeTime",e.lookup("TimePoint")],["upgrades",e.varArray(e.lookup("UpgradeType"),6)],["ext",e.lookup("StellarValueExt")]]),e.const("MASK_LEDGER_HEADER_FLAGS",7),e.enum("LedgerHeaderFlags",{disableLiquidityPoolTradingFlag:1,disableLiquidityPoolDepositFlag:2,disableLiquidityPoolWithdrawalFlag:4}),e.union("LedgerHeaderExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("LedgerHeaderExtensionV1",[["flags",e.lookup("Uint32")],["ext",e.lookup("LedgerHeaderExtensionV1Ext")]]),e.union("LedgerHeaderExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("LedgerHeaderExtensionV1")}}),e.struct("LedgerHeader",[["ledgerVersion",e.lookup("Uint32")],["previousLedgerHash",e.lookup("Hash")],["scpValue",e.lookup("StellarValue")],["txSetResultHash",e.lookup("Hash")],["bucketListHash",e.lookup("Hash")],["ledgerSeq",e.lookup("Uint32")],["totalCoins",e.lookup("Int64")],["feePool",e.lookup("Int64")],["inflationSeq",e.lookup("Uint32")],["idPool",e.lookup("Uint64")],["baseFee",e.lookup("Uint32")],["baseReserve",e.lookup("Uint32")],["maxTxSetSize",e.lookup("Uint32")],["skipList",e.array(e.lookup("Hash"),4)],["ext",e.lookup("LedgerHeaderExt")]]),e.enum("LedgerUpgradeType",{ledgerUpgradeVersion:1,ledgerUpgradeBaseFee:2,ledgerUpgradeMaxTxSetSize:3,ledgerUpgradeBaseReserve:4,ledgerUpgradeFlags:5,ledgerUpgradeConfig:6,ledgerUpgradeMaxSorobanTxSetSize:7}),e.struct("ConfigUpgradeSetKey",[["contractId",e.lookup("Hash")],["contentHash",e.lookup("Hash")]]),e.union("LedgerUpgrade",{switchOn:e.lookup("LedgerUpgradeType"),switchName:"type",switches:[["ledgerUpgradeVersion","newLedgerVersion"],["ledgerUpgradeBaseFee","newBaseFee"],["ledgerUpgradeMaxTxSetSize","newMaxTxSetSize"],["ledgerUpgradeBaseReserve","newBaseReserve"],["ledgerUpgradeFlags","newFlags"],["ledgerUpgradeConfig","newConfig"],["ledgerUpgradeMaxSorobanTxSetSize","newMaxSorobanTxSetSize"]],arms:{newLedgerVersion:e.lookup("Uint32"),newBaseFee:e.lookup("Uint32"),newMaxTxSetSize:e.lookup("Uint32"),newBaseReserve:e.lookup("Uint32"),newFlags:e.lookup("Uint32"),newConfig:e.lookup("ConfigUpgradeSetKey"),newMaxSorobanTxSetSize:e.lookup("Uint32")}}),e.struct("ConfigUpgradeSet",[["updatedEntry",e.varArray(e.lookup("ConfigSettingEntry"),2147483647)]]),e.enum("BucketEntryType",{metaentry:-1,liveentry:0,deadentry:1,initentry:2}),e.union("BucketMetadataExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("BucketMetadata",[["ledgerVersion",e.lookup("Uint32")],["ext",e.lookup("BucketMetadataExt")]]),e.union("BucketEntry",{switchOn:e.lookup("BucketEntryType"),switchName:"type",switches:[["liveentry","liveEntry"],["initentry","liveEntry"],["deadentry","deadEntry"],["metaentry","metaEntry"]],arms:{liveEntry:e.lookup("LedgerEntry"),deadEntry:e.lookup("LedgerKey"),metaEntry:e.lookup("BucketMetadata")}}),e.enum("TxSetComponentType",{txsetCompTxsMaybeDiscountedFee:0}),e.struct("TxSetComponentTxsMaybeDiscountedFee",[["baseFee",e.option(e.lookup("Int64"))],["txes",e.varArray(e.lookup("TransactionEnvelope"),2147483647)]]),e.union("TxSetComponent",{switchOn:e.lookup("TxSetComponentType"),switchName:"type",switches:[["txsetCompTxsMaybeDiscountedFee","txsMaybeDiscountedFee"]],arms:{txsMaybeDiscountedFee:e.lookup("TxSetComponentTxsMaybeDiscountedFee")}}),e.union("TransactionPhase",{switchOn:e.int(),switchName:"v",switches:[[0,"v0Components"]],arms:{v0Components:e.varArray(e.lookup("TxSetComponent"),2147483647)}}),e.struct("TransactionSet",[["previousLedgerHash",e.lookup("Hash")],["txes",e.varArray(e.lookup("TransactionEnvelope"),2147483647)]]),e.struct("TransactionSetV1",[["previousLedgerHash",e.lookup("Hash")],["phases",e.varArray(e.lookup("TransactionPhase"),2147483647)]]),e.union("GeneralizedTransactionSet",{switchOn:e.int(),switchName:"v",switches:[[1,"v1TxSet"]],arms:{v1TxSet:e.lookup("TransactionSetV1")}}),e.struct("TransactionResultPair",[["transactionHash",e.lookup("Hash")],["result",e.lookup("TransactionResult")]]),e.struct("TransactionResultSet",[["results",e.varArray(e.lookup("TransactionResultPair"),2147483647)]]),e.union("TransactionHistoryEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"generalizedTxSet"]],arms:{generalizedTxSet:e.lookup("GeneralizedTransactionSet")}}),e.struct("TransactionHistoryEntry",[["ledgerSeq",e.lookup("Uint32")],["txSet",e.lookup("TransactionSet")],["ext",e.lookup("TransactionHistoryEntryExt")]]),e.union("TransactionHistoryResultEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TransactionHistoryResultEntry",[["ledgerSeq",e.lookup("Uint32")],["txResultSet",e.lookup("TransactionResultSet")],["ext",e.lookup("TransactionHistoryResultEntryExt")]]),e.union("LedgerHeaderHistoryEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("LedgerHeaderHistoryEntry",[["hash",e.lookup("Hash")],["header",e.lookup("LedgerHeader")],["ext",e.lookup("LedgerHeaderHistoryEntryExt")]]),e.struct("LedgerScpMessages",[["ledgerSeq",e.lookup("Uint32")],["messages",e.varArray(e.lookup("ScpEnvelope"),2147483647)]]),e.struct("ScpHistoryEntryV0",[["quorumSets",e.varArray(e.lookup("ScpQuorumSet"),2147483647)],["ledgerMessages",e.lookup("LedgerScpMessages")]]),e.union("ScpHistoryEntry",{switchOn:e.int(),switchName:"v",switches:[[0,"v0"]],arms:{v0:e.lookup("ScpHistoryEntryV0")}}),e.enum("LedgerEntryChangeType",{ledgerEntryCreated:0,ledgerEntryUpdated:1,ledgerEntryRemoved:2,ledgerEntryState:3}),e.union("LedgerEntryChange",{switchOn:e.lookup("LedgerEntryChangeType"),switchName:"type",switches:[["ledgerEntryCreated","created"],["ledgerEntryUpdated","updated"],["ledgerEntryRemoved","removed"],["ledgerEntryState","state"]],arms:{created:e.lookup("LedgerEntry"),updated:e.lookup("LedgerEntry"),removed:e.lookup("LedgerKey"),state:e.lookup("LedgerEntry")}}),e.typedef("LedgerEntryChanges",e.varArray(e.lookup("LedgerEntryChange"),2147483647)),e.struct("OperationMeta",[["changes",e.lookup("LedgerEntryChanges")]]),e.struct("TransactionMetaV1",[["txChanges",e.lookup("LedgerEntryChanges")],["operations",e.varArray(e.lookup("OperationMeta"),2147483647)]]),e.struct("TransactionMetaV2",[["txChangesBefore",e.lookup("LedgerEntryChanges")],["operations",e.varArray(e.lookup("OperationMeta"),2147483647)],["txChangesAfter",e.lookup("LedgerEntryChanges")]]),e.enum("ContractEventType",{system:0,contract:1,diagnostic:2}),e.struct("ContractEventV0",[["topics",e.varArray(e.lookup("ScVal"),2147483647)],["data",e.lookup("ScVal")]]),e.union("ContractEventBody",{switchOn:e.int(),switchName:"v",switches:[[0,"v0"]],arms:{v0:e.lookup("ContractEventV0")}}),e.struct("ContractEvent",[["ext",e.lookup("ExtensionPoint")],["contractId",e.option(e.lookup("Hash"))],["type",e.lookup("ContractEventType")],["body",e.lookup("ContractEventBody")]]),e.struct("DiagnosticEvent",[["inSuccessfulContractCall",e.bool()],["event",e.lookup("ContractEvent")]]),e.struct("SorobanTransactionMetaExtV1",[["ext",e.lookup("ExtensionPoint")],["totalNonRefundableResourceFeeCharged",e.lookup("Int64")],["totalRefundableResourceFeeCharged",e.lookup("Int64")],["rentFeeCharged",e.lookup("Int64")]]),e.union("SorobanTransactionMetaExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("SorobanTransactionMetaExtV1")}}),e.struct("SorobanTransactionMeta",[["ext",e.lookup("SorobanTransactionMetaExt")],["events",e.varArray(e.lookup("ContractEvent"),2147483647)],["returnValue",e.lookup("ScVal")],["diagnosticEvents",e.varArray(e.lookup("DiagnosticEvent"),2147483647)]]),e.struct("TransactionMetaV3",[["ext",e.lookup("ExtensionPoint")],["txChangesBefore",e.lookup("LedgerEntryChanges")],["operations",e.varArray(e.lookup("OperationMeta"),2147483647)],["txChangesAfter",e.lookup("LedgerEntryChanges")],["sorobanMeta",e.option(e.lookup("SorobanTransactionMeta"))]]),e.struct("InvokeHostFunctionSuccessPreImage",[["returnValue",e.lookup("ScVal")],["events",e.varArray(e.lookup("ContractEvent"),2147483647)]]),e.union("TransactionMeta",{switchOn:e.int(),switchName:"v",switches:[[0,"operations"],[1,"v1"],[2,"v2"],[3,"v3"]],arms:{operations:e.varArray(e.lookup("OperationMeta"),2147483647),v1:e.lookup("TransactionMetaV1"),v2:e.lookup("TransactionMetaV2"),v3:e.lookup("TransactionMetaV3")}}),e.struct("TransactionResultMeta",[["result",e.lookup("TransactionResultPair")],["feeProcessing",e.lookup("LedgerEntryChanges")],["txApplyProcessing",e.lookup("TransactionMeta")]]),e.struct("UpgradeEntryMeta",[["upgrade",e.lookup("LedgerUpgrade")],["changes",e.lookup("LedgerEntryChanges")]]),e.struct("LedgerCloseMetaV0",[["ledgerHeader",e.lookup("LedgerHeaderHistoryEntry")],["txSet",e.lookup("TransactionSet")],["txProcessing",e.varArray(e.lookup("TransactionResultMeta"),2147483647)],["upgradesProcessing",e.varArray(e.lookup("UpgradeEntryMeta"),2147483647)],["scpInfo",e.varArray(e.lookup("ScpHistoryEntry"),2147483647)]]),e.struct("LedgerCloseMetaExtV1",[["ext",e.lookup("ExtensionPoint")],["sorobanFeeWrite1Kb",e.lookup("Int64")]]),e.union("LedgerCloseMetaExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("LedgerCloseMetaExtV1")}}),e.struct("LedgerCloseMetaV1",[["ext",e.lookup("LedgerCloseMetaExt")],["ledgerHeader",e.lookup("LedgerHeaderHistoryEntry")],["txSet",e.lookup("GeneralizedTransactionSet")],["txProcessing",e.varArray(e.lookup("TransactionResultMeta"),2147483647)],["upgradesProcessing",e.varArray(e.lookup("UpgradeEntryMeta"),2147483647)],["scpInfo",e.varArray(e.lookup("ScpHistoryEntry"),2147483647)],["totalByteSizeOfBucketList",e.lookup("Uint64")],["evictedTemporaryLedgerKeys",e.varArray(e.lookup("LedgerKey"),2147483647)],["evictedPersistentLedgerEntries",e.varArray(e.lookup("LedgerEntry"),2147483647)]]),e.union("LedgerCloseMeta",{switchOn:e.int(),switchName:"v",switches:[[0,"v0"],[1,"v1"]],arms:{v0:e.lookup("LedgerCloseMetaV0"),v1:e.lookup("LedgerCloseMetaV1")}}),e.enum("ErrorCode",{errMisc:0,errData:1,errConf:2,errAuth:3,errLoad:4}),e.struct("Error",[["code",e.lookup("ErrorCode")],["msg",e.string(100)]]),e.struct("SendMore",[["numMessages",e.lookup("Uint32")]]),e.struct("SendMoreExtended",[["numMessages",e.lookup("Uint32")],["numBytes",e.lookup("Uint32")]]),e.struct("AuthCert",[["pubkey",e.lookup("Curve25519Public")],["expiration",e.lookup("Uint64")],["sig",e.lookup("Signature")]]),e.struct("Hello",[["ledgerVersion",e.lookup("Uint32")],["overlayVersion",e.lookup("Uint32")],["overlayMinVersion",e.lookup("Uint32")],["networkId",e.lookup("Hash")],["versionStr",e.string(100)],["listeningPort",e.int()],["peerId",e.lookup("NodeId")],["cert",e.lookup("AuthCert")],["nonce",e.lookup("Uint256")]]),e.const("AUTH_MSG_FLAG_FLOW_CONTROL_BYTES_REQUESTED",200),e.struct("Auth",[["flags",e.int()]]),e.enum("IpAddrType",{iPv4:0,iPv6:1}),e.union("PeerAddressIp",{switchOn:e.lookup("IpAddrType"),switchName:"type",switches:[["iPv4","ipv4"],["iPv6","ipv6"]],arms:{ipv4:e.opaque(4),ipv6:e.opaque(16)}}),e.struct("PeerAddress",[["ip",e.lookup("PeerAddressIp")],["port",e.lookup("Uint32")],["numFailures",e.lookup("Uint32")]]),e.enum("MessageType",{errorMsg:0,auth:2,dontHave:3,getPeers:4,peers:5,getTxSet:6,txSet:7,generalizedTxSet:17,transaction:8,getScpQuorumset:9,scpQuorumset:10,scpMessage:11,getScpState:12,hello:13,surveyRequest:14,surveyResponse:15,sendMore:16,sendMoreExtended:20,floodAdvert:18,floodDemand:19}),e.struct("DontHave",[["type",e.lookup("MessageType")],["reqHash",e.lookup("Uint256")]]),e.enum("SurveyMessageCommandType",{surveyTopology:0}),e.enum("SurveyMessageResponseType",{surveyTopologyResponseV0:0,surveyTopologyResponseV1:1}),e.struct("SurveyRequestMessage",[["surveyorPeerId",e.lookup("NodeId")],["surveyedPeerId",e.lookup("NodeId")],["ledgerNum",e.lookup("Uint32")],["encryptionKey",e.lookup("Curve25519Public")],["commandType",e.lookup("SurveyMessageCommandType")]]),e.struct("SignedSurveyRequestMessage",[["requestSignature",e.lookup("Signature")],["request",e.lookup("SurveyRequestMessage")]]),e.typedef("EncryptedBody",e.varOpaque(64e3)),e.struct("SurveyResponseMessage",[["surveyorPeerId",e.lookup("NodeId")],["surveyedPeerId",e.lookup("NodeId")],["ledgerNum",e.lookup("Uint32")],["commandType",e.lookup("SurveyMessageCommandType")],["encryptedBody",e.lookup("EncryptedBody")]]),e.struct("SignedSurveyResponseMessage",[["responseSignature",e.lookup("Signature")],["response",e.lookup("SurveyResponseMessage")]]),e.struct("PeerStats",[["id",e.lookup("NodeId")],["versionStr",e.string(100)],["messagesRead",e.lookup("Uint64")],["messagesWritten",e.lookup("Uint64")],["bytesRead",e.lookup("Uint64")],["bytesWritten",e.lookup("Uint64")],["secondsConnected",e.lookup("Uint64")],["uniqueFloodBytesRecv",e.lookup("Uint64")],["duplicateFloodBytesRecv",e.lookup("Uint64")],["uniqueFetchBytesRecv",e.lookup("Uint64")],["duplicateFetchBytesRecv",e.lookup("Uint64")],["uniqueFloodMessageRecv",e.lookup("Uint64")],["duplicateFloodMessageRecv",e.lookup("Uint64")],["uniqueFetchMessageRecv",e.lookup("Uint64")],["duplicateFetchMessageRecv",e.lookup("Uint64")]]),e.typedef("PeerStatList",e.varArray(e.lookup("PeerStats"),25)),e.struct("TopologyResponseBodyV0",[["inboundPeers",e.lookup("PeerStatList")],["outboundPeers",e.lookup("PeerStatList")],["totalInboundPeerCount",e.lookup("Uint32")],["totalOutboundPeerCount",e.lookup("Uint32")]]),e.struct("TopologyResponseBodyV1",[["inboundPeers",e.lookup("PeerStatList")],["outboundPeers",e.lookup("PeerStatList")],["totalInboundPeerCount",e.lookup("Uint32")],["totalOutboundPeerCount",e.lookup("Uint32")],["maxInboundPeerCount",e.lookup("Uint32")],["maxOutboundPeerCount",e.lookup("Uint32")]]),e.union("SurveyResponseBody",{switchOn:e.lookup("SurveyMessageResponseType"),switchName:"type",switches:[["surveyTopologyResponseV0","topologyResponseBodyV0"],["surveyTopologyResponseV1","topologyResponseBodyV1"]],arms:{topologyResponseBodyV0:e.lookup("TopologyResponseBodyV0"),topologyResponseBodyV1:e.lookup("TopologyResponseBodyV1")}}),e.const("TX_ADVERT_VECTOR_MAX_SIZE",1e3),e.typedef("TxAdvertVector",e.varArray(e.lookup("Hash"),e.lookup("TX_ADVERT_VECTOR_MAX_SIZE"))),e.struct("FloodAdvert",[["txHashes",e.lookup("TxAdvertVector")]]),e.const("TX_DEMAND_VECTOR_MAX_SIZE",1e3),e.typedef("TxDemandVector",e.varArray(e.lookup("Hash"),e.lookup("TX_DEMAND_VECTOR_MAX_SIZE"))),e.struct("FloodDemand",[["txHashes",e.lookup("TxDemandVector")]]),e.union("StellarMessage",{switchOn:e.lookup("MessageType"),switchName:"type",switches:[["errorMsg","error"],["hello","hello"],["auth","auth"],["dontHave","dontHave"],["getPeers",e.void()],["peers","peers"],["getTxSet","txSetHash"],["txSet","txSet"],["generalizedTxSet","generalizedTxSet"],["transaction","transaction"],["surveyRequest","signedSurveyRequestMessage"],["surveyResponse","signedSurveyResponseMessage"],["getScpQuorumset","qSetHash"],["scpQuorumset","qSet"],["scpMessage","envelope"],["getScpState","getScpLedgerSeq"],["sendMore","sendMoreMessage"],["sendMoreExtended","sendMoreExtendedMessage"],["floodAdvert","floodAdvert"],["floodDemand","floodDemand"]],arms:{error:e.lookup("Error"),hello:e.lookup("Hello"),auth:e.lookup("Auth"),dontHave:e.lookup("DontHave"),peers:e.varArray(e.lookup("PeerAddress"),100),txSetHash:e.lookup("Uint256"),txSet:e.lookup("TransactionSet"),generalizedTxSet:e.lookup("GeneralizedTransactionSet"),transaction:e.lookup("TransactionEnvelope"),signedSurveyRequestMessage:e.lookup("SignedSurveyRequestMessage"),signedSurveyResponseMessage:e.lookup("SignedSurveyResponseMessage"),qSetHash:e.lookup("Uint256"),qSet:e.lookup("ScpQuorumSet"),envelope:e.lookup("ScpEnvelope"),getScpLedgerSeq:e.lookup("Uint32"),sendMoreMessage:e.lookup("SendMore"),sendMoreExtendedMessage:e.lookup("SendMoreExtended"),floodAdvert:e.lookup("FloodAdvert"),floodDemand:e.lookup("FloodDemand")}}),e.struct("AuthenticatedMessageV0",[["sequence",e.lookup("Uint64")],["message",e.lookup("StellarMessage")],["mac",e.lookup("HmacSha256Mac")]]),e.union("AuthenticatedMessage",{switchOn:e.lookup("Uint32"),switchName:"v",switches:[[0,"v0"]],arms:{v0:e.lookup("AuthenticatedMessageV0")}}),e.const("MAX_OPS_PER_TX",100),e.union("LiquidityPoolParameters",{switchOn:e.lookup("LiquidityPoolType"),switchName:"type",switches:[["liquidityPoolConstantProduct","constantProduct"]],arms:{constantProduct:e.lookup("LiquidityPoolConstantProductParameters")}}),e.struct("MuxedAccountMed25519",[["id",e.lookup("Uint64")],["ed25519",e.lookup("Uint256")]]),e.union("MuxedAccount",{switchOn:e.lookup("CryptoKeyType"),switchName:"type",switches:[["keyTypeEd25519","ed25519"],["keyTypeMuxedEd25519","med25519"]],arms:{ed25519:e.lookup("Uint256"),med25519:e.lookup("MuxedAccountMed25519")}}),e.struct("DecoratedSignature",[["hint",e.lookup("SignatureHint")],["signature",e.lookup("Signature")]]),e.enum("OperationType",{createAccount:0,payment:1,pathPaymentStrictReceive:2,manageSellOffer:3,createPassiveSellOffer:4,setOptions:5,changeTrust:6,allowTrust:7,accountMerge:8,inflation:9,manageData:10,bumpSequence:11,manageBuyOffer:12,pathPaymentStrictSend:13,createClaimableBalance:14,claimClaimableBalance:15,beginSponsoringFutureReserves:16,endSponsoringFutureReserves:17,revokeSponsorship:18,clawback:19,clawbackClaimableBalance:20,setTrustLineFlags:21,liquidityPoolDeposit:22,liquidityPoolWithdraw:23,invokeHostFunction:24,extendFootprintTtl:25,restoreFootprint:26}),e.struct("CreateAccountOp",[["destination",e.lookup("AccountId")],["startingBalance",e.lookup("Int64")]]),e.struct("PaymentOp",[["destination",e.lookup("MuxedAccount")],["asset",e.lookup("Asset")],["amount",e.lookup("Int64")]]),e.struct("PathPaymentStrictReceiveOp",[["sendAsset",e.lookup("Asset")],["sendMax",e.lookup("Int64")],["destination",e.lookup("MuxedAccount")],["destAsset",e.lookup("Asset")],["destAmount",e.lookup("Int64")],["path",e.varArray(e.lookup("Asset"),5)]]),e.struct("PathPaymentStrictSendOp",[["sendAsset",e.lookup("Asset")],["sendAmount",e.lookup("Int64")],["destination",e.lookup("MuxedAccount")],["destAsset",e.lookup("Asset")],["destMin",e.lookup("Int64")],["path",e.varArray(e.lookup("Asset"),5)]]),e.struct("ManageSellOfferOp",[["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["amount",e.lookup("Int64")],["price",e.lookup("Price")],["offerId",e.lookup("Int64")]]),e.struct("ManageBuyOfferOp",[["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["buyAmount",e.lookup("Int64")],["price",e.lookup("Price")],["offerId",e.lookup("Int64")]]),e.struct("CreatePassiveSellOfferOp",[["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["amount",e.lookup("Int64")],["price",e.lookup("Price")]]),e.struct("SetOptionsOp",[["inflationDest",e.option(e.lookup("AccountId"))],["clearFlags",e.option(e.lookup("Uint32"))],["setFlags",e.option(e.lookup("Uint32"))],["masterWeight",e.option(e.lookup("Uint32"))],["lowThreshold",e.option(e.lookup("Uint32"))],["medThreshold",e.option(e.lookup("Uint32"))],["highThreshold",e.option(e.lookup("Uint32"))],["homeDomain",e.option(e.lookup("String32"))],["signer",e.option(e.lookup("Signer"))]]),e.union("ChangeTrustAsset",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",e.void()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"],["assetTypePoolShare","liquidityPool"]],arms:{alphaNum4:e.lookup("AlphaNum4"),alphaNum12:e.lookup("AlphaNum12"),liquidityPool:e.lookup("LiquidityPoolParameters")}}),e.struct("ChangeTrustOp",[["line",e.lookup("ChangeTrustAsset")],["limit",e.lookup("Int64")]]),e.struct("AllowTrustOp",[["trustor",e.lookup("AccountId")],["asset",e.lookup("AssetCode")],["authorize",e.lookup("Uint32")]]),e.struct("ManageDataOp",[["dataName",e.lookup("String64")],["dataValue",e.option(e.lookup("DataValue"))]]),e.struct("BumpSequenceOp",[["bumpTo",e.lookup("SequenceNumber")]]),e.struct("CreateClaimableBalanceOp",[["asset",e.lookup("Asset")],["amount",e.lookup("Int64")],["claimants",e.varArray(e.lookup("Claimant"),10)]]),e.struct("ClaimClaimableBalanceOp",[["balanceId",e.lookup("ClaimableBalanceId")]]),e.struct("BeginSponsoringFutureReservesOp",[["sponsoredId",e.lookup("AccountId")]]),e.enum("RevokeSponsorshipType",{revokeSponsorshipLedgerEntry:0,revokeSponsorshipSigner:1}),e.struct("RevokeSponsorshipOpSigner",[["accountId",e.lookup("AccountId")],["signerKey",e.lookup("SignerKey")]]),e.union("RevokeSponsorshipOp",{switchOn:e.lookup("RevokeSponsorshipType"),switchName:"type",switches:[["revokeSponsorshipLedgerEntry","ledgerKey"],["revokeSponsorshipSigner","signer"]],arms:{ledgerKey:e.lookup("LedgerKey"),signer:e.lookup("RevokeSponsorshipOpSigner")}}),e.struct("ClawbackOp",[["asset",e.lookup("Asset")],["from",e.lookup("MuxedAccount")],["amount",e.lookup("Int64")]]),e.struct("ClawbackClaimableBalanceOp",[["balanceId",e.lookup("ClaimableBalanceId")]]),e.struct("SetTrustLineFlagsOp",[["trustor",e.lookup("AccountId")],["asset",e.lookup("Asset")],["clearFlags",e.lookup("Uint32")],["setFlags",e.lookup("Uint32")]]),e.const("LIQUIDITY_POOL_FEE_V18",30),e.struct("LiquidityPoolDepositOp",[["liquidityPoolId",e.lookup("PoolId")],["maxAmountA",e.lookup("Int64")],["maxAmountB",e.lookup("Int64")],["minPrice",e.lookup("Price")],["maxPrice",e.lookup("Price")]]),e.struct("LiquidityPoolWithdrawOp",[["liquidityPoolId",e.lookup("PoolId")],["amount",e.lookup("Int64")],["minAmountA",e.lookup("Int64")],["minAmountB",e.lookup("Int64")]]),e.enum("HostFunctionType",{hostFunctionTypeInvokeContract:0,hostFunctionTypeCreateContract:1,hostFunctionTypeUploadContractWasm:2}),e.enum("ContractIdPreimageType",{contractIdPreimageFromAddress:0,contractIdPreimageFromAsset:1}),e.struct("ContractIdPreimageFromAddress",[["address",e.lookup("ScAddress")],["salt",e.lookup("Uint256")]]),e.union("ContractIdPreimage",{switchOn:e.lookup("ContractIdPreimageType"),switchName:"type",switches:[["contractIdPreimageFromAddress","fromAddress"],["contractIdPreimageFromAsset","fromAsset"]],arms:{fromAddress:e.lookup("ContractIdPreimageFromAddress"),fromAsset:e.lookup("Asset")}}),e.struct("CreateContractArgs",[["contractIdPreimage",e.lookup("ContractIdPreimage")],["executable",e.lookup("ContractExecutable")]]),e.struct("InvokeContractArgs",[["contractAddress",e.lookup("ScAddress")],["functionName",e.lookup("ScSymbol")],["args",e.varArray(e.lookup("ScVal"),2147483647)]]),e.union("HostFunction",{switchOn:e.lookup("HostFunctionType"),switchName:"type",switches:[["hostFunctionTypeInvokeContract","invokeContract"],["hostFunctionTypeCreateContract","createContract"],["hostFunctionTypeUploadContractWasm","wasm"]],arms:{invokeContract:e.lookup("InvokeContractArgs"),createContract:e.lookup("CreateContractArgs"),wasm:e.varOpaque()}}),e.enum("SorobanAuthorizedFunctionType",{sorobanAuthorizedFunctionTypeContractFn:0,sorobanAuthorizedFunctionTypeCreateContractHostFn:1}),e.union("SorobanAuthorizedFunction",{switchOn:e.lookup("SorobanAuthorizedFunctionType"),switchName:"type",switches:[["sorobanAuthorizedFunctionTypeContractFn","contractFn"],["sorobanAuthorizedFunctionTypeCreateContractHostFn","createContractHostFn"]],arms:{contractFn:e.lookup("InvokeContractArgs"),createContractHostFn:e.lookup("CreateContractArgs")}}),e.struct("SorobanAuthorizedInvocation",[["function",e.lookup("SorobanAuthorizedFunction")],["subInvocations",e.varArray(e.lookup("SorobanAuthorizedInvocation"),2147483647)]]),e.struct("SorobanAddressCredentials",[["address",e.lookup("ScAddress")],["nonce",e.lookup("Int64")],["signatureExpirationLedger",e.lookup("Uint32")],["signature",e.lookup("ScVal")]]),e.enum("SorobanCredentialsType",{sorobanCredentialsSourceAccount:0,sorobanCredentialsAddress:1}),e.union("SorobanCredentials",{switchOn:e.lookup("SorobanCredentialsType"),switchName:"type",switches:[["sorobanCredentialsSourceAccount",e.void()],["sorobanCredentialsAddress","address"]],arms:{address:e.lookup("SorobanAddressCredentials")}}),e.struct("SorobanAuthorizationEntry",[["credentials",e.lookup("SorobanCredentials")],["rootInvocation",e.lookup("SorobanAuthorizedInvocation")]]),e.struct("InvokeHostFunctionOp",[["hostFunction",e.lookup("HostFunction")],["auth",e.varArray(e.lookup("SorobanAuthorizationEntry"),2147483647)]]),e.struct("ExtendFootprintTtlOp",[["ext",e.lookup("ExtensionPoint")],["extendTo",e.lookup("Uint32")]]),e.struct("RestoreFootprintOp",[["ext",e.lookup("ExtensionPoint")]]),e.union("OperationBody",{switchOn:e.lookup("OperationType"),switchName:"type",switches:[["createAccount","createAccountOp"],["payment","paymentOp"],["pathPaymentStrictReceive","pathPaymentStrictReceiveOp"],["manageSellOffer","manageSellOfferOp"],["createPassiveSellOffer","createPassiveSellOfferOp"],["setOptions","setOptionsOp"],["changeTrust","changeTrustOp"],["allowTrust","allowTrustOp"],["accountMerge","destination"],["inflation",e.void()],["manageData","manageDataOp"],["bumpSequence","bumpSequenceOp"],["manageBuyOffer","manageBuyOfferOp"],["pathPaymentStrictSend","pathPaymentStrictSendOp"],["createClaimableBalance","createClaimableBalanceOp"],["claimClaimableBalance","claimClaimableBalanceOp"],["beginSponsoringFutureReserves","beginSponsoringFutureReservesOp"],["endSponsoringFutureReserves",e.void()],["revokeSponsorship","revokeSponsorshipOp"],["clawback","clawbackOp"],["clawbackClaimableBalance","clawbackClaimableBalanceOp"],["setTrustLineFlags","setTrustLineFlagsOp"],["liquidityPoolDeposit","liquidityPoolDepositOp"],["liquidityPoolWithdraw","liquidityPoolWithdrawOp"],["invokeHostFunction","invokeHostFunctionOp"],["extendFootprintTtl","extendFootprintTtlOp"],["restoreFootprint","restoreFootprintOp"]],arms:{createAccountOp:e.lookup("CreateAccountOp"),paymentOp:e.lookup("PaymentOp"),pathPaymentStrictReceiveOp:e.lookup("PathPaymentStrictReceiveOp"),manageSellOfferOp:e.lookup("ManageSellOfferOp"),createPassiveSellOfferOp:e.lookup("CreatePassiveSellOfferOp"),setOptionsOp:e.lookup("SetOptionsOp"),changeTrustOp:e.lookup("ChangeTrustOp"),allowTrustOp:e.lookup("AllowTrustOp"),destination:e.lookup("MuxedAccount"),manageDataOp:e.lookup("ManageDataOp"),bumpSequenceOp:e.lookup("BumpSequenceOp"),manageBuyOfferOp:e.lookup("ManageBuyOfferOp"),pathPaymentStrictSendOp:e.lookup("PathPaymentStrictSendOp"),createClaimableBalanceOp:e.lookup("CreateClaimableBalanceOp"),claimClaimableBalanceOp:e.lookup("ClaimClaimableBalanceOp"),beginSponsoringFutureReservesOp:e.lookup("BeginSponsoringFutureReservesOp"),revokeSponsorshipOp:e.lookup("RevokeSponsorshipOp"),clawbackOp:e.lookup("ClawbackOp"),clawbackClaimableBalanceOp:e.lookup("ClawbackClaimableBalanceOp"),setTrustLineFlagsOp:e.lookup("SetTrustLineFlagsOp"),liquidityPoolDepositOp:e.lookup("LiquidityPoolDepositOp"),liquidityPoolWithdrawOp:e.lookup("LiquidityPoolWithdrawOp"),invokeHostFunctionOp:e.lookup("InvokeHostFunctionOp"),extendFootprintTtlOp:e.lookup("ExtendFootprintTtlOp"),restoreFootprintOp:e.lookup("RestoreFootprintOp")}}),e.struct("Operation",[["sourceAccount",e.option(e.lookup("MuxedAccount"))],["body",e.lookup("OperationBody")]]),e.struct("HashIdPreimageOperationId",[["sourceAccount",e.lookup("AccountId")],["seqNum",e.lookup("SequenceNumber")],["opNum",e.lookup("Uint32")]]),e.struct("HashIdPreimageRevokeId",[["sourceAccount",e.lookup("AccountId")],["seqNum",e.lookup("SequenceNumber")],["opNum",e.lookup("Uint32")],["liquidityPoolId",e.lookup("PoolId")],["asset",e.lookup("Asset")]]),e.struct("HashIdPreimageContractId",[["networkId",e.lookup("Hash")],["contractIdPreimage",e.lookup("ContractIdPreimage")]]),e.struct("HashIdPreimageSorobanAuthorization",[["networkId",e.lookup("Hash")],["nonce",e.lookup("Int64")],["signatureExpirationLedger",e.lookup("Uint32")],["invocation",e.lookup("SorobanAuthorizedInvocation")]]),e.union("HashIdPreimage",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeOpId","operationId"],["envelopeTypePoolRevokeOpId","revokeId"],["envelopeTypeContractId","contractId"],["envelopeTypeSorobanAuthorization","sorobanAuthorization"]],arms:{operationId:e.lookup("HashIdPreimageOperationId"),revokeId:e.lookup("HashIdPreimageRevokeId"),contractId:e.lookup("HashIdPreimageContractId"),sorobanAuthorization:e.lookup("HashIdPreimageSorobanAuthorization")}}),e.enum("MemoType",{memoNone:0,memoText:1,memoId:2,memoHash:3,memoReturn:4}),e.union("Memo",{switchOn:e.lookup("MemoType"),switchName:"type",switches:[["memoNone",e.void()],["memoText","text"],["memoId","id"],["memoHash","hash"],["memoReturn","retHash"]],arms:{text:e.string(28),id:e.lookup("Uint64"),hash:e.lookup("Hash"),retHash:e.lookup("Hash")}}),e.struct("TimeBounds",[["minTime",e.lookup("TimePoint")],["maxTime",e.lookup("TimePoint")]]),e.struct("LedgerBounds",[["minLedger",e.lookup("Uint32")],["maxLedger",e.lookup("Uint32")]]),e.struct("PreconditionsV2",[["timeBounds",e.option(e.lookup("TimeBounds"))],["ledgerBounds",e.option(e.lookup("LedgerBounds"))],["minSeqNum",e.option(e.lookup("SequenceNumber"))],["minSeqAge",e.lookup("Duration")],["minSeqLedgerGap",e.lookup("Uint32")],["extraSigners",e.varArray(e.lookup("SignerKey"),2)]]),e.enum("PreconditionType",{precondNone:0,precondTime:1,precondV2:2}),e.union("Preconditions",{switchOn:e.lookup("PreconditionType"),switchName:"type",switches:[["precondNone",e.void()],["precondTime","timeBounds"],["precondV2","v2"]],arms:{timeBounds:e.lookup("TimeBounds"),v2:e.lookup("PreconditionsV2")}}),e.struct("LedgerFootprint",[["readOnly",e.varArray(e.lookup("LedgerKey"),2147483647)],["readWrite",e.varArray(e.lookup("LedgerKey"),2147483647)]]),e.struct("SorobanResources",[["footprint",e.lookup("LedgerFootprint")],["instructions",e.lookup("Uint32")],["readBytes",e.lookup("Uint32")],["writeBytes",e.lookup("Uint32")]]),e.struct("SorobanTransactionData",[["ext",e.lookup("ExtensionPoint")],["resources",e.lookup("SorobanResources")],["resourceFee",e.lookup("Int64")]]),e.union("TransactionV0Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TransactionV0",[["sourceAccountEd25519",e.lookup("Uint256")],["fee",e.lookup("Uint32")],["seqNum",e.lookup("SequenceNumber")],["timeBounds",e.option(e.lookup("TimeBounds"))],["memo",e.lookup("Memo")],["operations",e.varArray(e.lookup("Operation"),e.lookup("MAX_OPS_PER_TX"))],["ext",e.lookup("TransactionV0Ext")]]),e.struct("TransactionV0Envelope",[["tx",e.lookup("TransactionV0")],["signatures",e.varArray(e.lookup("DecoratedSignature"),20)]]),e.union("TransactionExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"sorobanData"]],arms:{sorobanData:e.lookup("SorobanTransactionData")}}),e.struct("Transaction",[["sourceAccount",e.lookup("MuxedAccount")],["fee",e.lookup("Uint32")],["seqNum",e.lookup("SequenceNumber")],["cond",e.lookup("Preconditions")],["memo",e.lookup("Memo")],["operations",e.varArray(e.lookup("Operation"),e.lookup("MAX_OPS_PER_TX"))],["ext",e.lookup("TransactionExt")]]),e.struct("TransactionV1Envelope",[["tx",e.lookup("Transaction")],["signatures",e.varArray(e.lookup("DecoratedSignature"),20)]]),e.union("FeeBumpTransactionInnerTx",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTx","v1"]],arms:{v1:e.lookup("TransactionV1Envelope")}}),e.union("FeeBumpTransactionExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("FeeBumpTransaction",[["feeSource",e.lookup("MuxedAccount")],["fee",e.lookup("Int64")],["innerTx",e.lookup("FeeBumpTransactionInnerTx")],["ext",e.lookup("FeeBumpTransactionExt")]]),e.struct("FeeBumpTransactionEnvelope",[["tx",e.lookup("FeeBumpTransaction")],["signatures",e.varArray(e.lookup("DecoratedSignature"),20)]]),e.union("TransactionEnvelope",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTxV0","v0"],["envelopeTypeTx","v1"],["envelopeTypeTxFeeBump","feeBump"]],arms:{v0:e.lookup("TransactionV0Envelope"),v1:e.lookup("TransactionV1Envelope"),feeBump:e.lookup("FeeBumpTransactionEnvelope")}}),e.union("TransactionSignaturePayloadTaggedTransaction",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTx","tx"],["envelopeTypeTxFeeBump","feeBump"]],arms:{tx:e.lookup("Transaction"),feeBump:e.lookup("FeeBumpTransaction")}}),e.struct("TransactionSignaturePayload",[["networkId",e.lookup("Hash")],["taggedTransaction",e.lookup("TransactionSignaturePayloadTaggedTransaction")]]),e.enum("ClaimAtomType",{claimAtomTypeV0:0,claimAtomTypeOrderBook:1,claimAtomTypeLiquidityPool:2}),e.struct("ClaimOfferAtomV0",[["sellerEd25519",e.lookup("Uint256")],["offerId",e.lookup("Int64")],["assetSold",e.lookup("Asset")],["amountSold",e.lookup("Int64")],["assetBought",e.lookup("Asset")],["amountBought",e.lookup("Int64")]]),e.struct("ClaimOfferAtom",[["sellerId",e.lookup("AccountId")],["offerId",e.lookup("Int64")],["assetSold",e.lookup("Asset")],["amountSold",e.lookup("Int64")],["assetBought",e.lookup("Asset")],["amountBought",e.lookup("Int64")]]),e.struct("ClaimLiquidityAtom",[["liquidityPoolId",e.lookup("PoolId")],["assetSold",e.lookup("Asset")],["amountSold",e.lookup("Int64")],["assetBought",e.lookup("Asset")],["amountBought",e.lookup("Int64")]]),e.union("ClaimAtom",{switchOn:e.lookup("ClaimAtomType"),switchName:"type",switches:[["claimAtomTypeV0","v0"],["claimAtomTypeOrderBook","orderBook"],["claimAtomTypeLiquidityPool","liquidityPool"]],arms:{v0:e.lookup("ClaimOfferAtomV0"),orderBook:e.lookup("ClaimOfferAtom"),liquidityPool:e.lookup("ClaimLiquidityAtom")}}),e.enum("CreateAccountResultCode",{createAccountSuccess:0,createAccountMalformed:-1,createAccountUnderfunded:-2,createAccountLowReserve:-3,createAccountAlreadyExist:-4}),e.union("CreateAccountResult",{switchOn:e.lookup("CreateAccountResultCode"),switchName:"code",switches:[["createAccountSuccess",e.void()],["createAccountMalformed",e.void()],["createAccountUnderfunded",e.void()],["createAccountLowReserve",e.void()],["createAccountAlreadyExist",e.void()]],arms:{}}),e.enum("PaymentResultCode",{paymentSuccess:0,paymentMalformed:-1,paymentUnderfunded:-2,paymentSrcNoTrust:-3,paymentSrcNotAuthorized:-4,paymentNoDestination:-5,paymentNoTrust:-6,paymentNotAuthorized:-7,paymentLineFull:-8,paymentNoIssuer:-9}),e.union("PaymentResult",{switchOn:e.lookup("PaymentResultCode"),switchName:"code",switches:[["paymentSuccess",e.void()],["paymentMalformed",e.void()],["paymentUnderfunded",e.void()],["paymentSrcNoTrust",e.void()],["paymentSrcNotAuthorized",e.void()],["paymentNoDestination",e.void()],["paymentNoTrust",e.void()],["paymentNotAuthorized",e.void()],["paymentLineFull",e.void()],["paymentNoIssuer",e.void()]],arms:{}}),e.enum("PathPaymentStrictReceiveResultCode",{pathPaymentStrictReceiveSuccess:0,pathPaymentStrictReceiveMalformed:-1,pathPaymentStrictReceiveUnderfunded:-2,pathPaymentStrictReceiveSrcNoTrust:-3,pathPaymentStrictReceiveSrcNotAuthorized:-4,pathPaymentStrictReceiveNoDestination:-5,pathPaymentStrictReceiveNoTrust:-6,pathPaymentStrictReceiveNotAuthorized:-7,pathPaymentStrictReceiveLineFull:-8,pathPaymentStrictReceiveNoIssuer:-9,pathPaymentStrictReceiveTooFewOffers:-10,pathPaymentStrictReceiveOfferCrossSelf:-11,pathPaymentStrictReceiveOverSendmax:-12}),e.struct("SimplePaymentResult",[["destination",e.lookup("AccountId")],["asset",e.lookup("Asset")],["amount",e.lookup("Int64")]]),e.struct("PathPaymentStrictReceiveResultSuccess",[["offers",e.varArray(e.lookup("ClaimAtom"),2147483647)],["last",e.lookup("SimplePaymentResult")]]),e.union("PathPaymentStrictReceiveResult",{switchOn:e.lookup("PathPaymentStrictReceiveResultCode"),switchName:"code",switches:[["pathPaymentStrictReceiveSuccess","success"],["pathPaymentStrictReceiveMalformed",e.void()],["pathPaymentStrictReceiveUnderfunded",e.void()],["pathPaymentStrictReceiveSrcNoTrust",e.void()],["pathPaymentStrictReceiveSrcNotAuthorized",e.void()],["pathPaymentStrictReceiveNoDestination",e.void()],["pathPaymentStrictReceiveNoTrust",e.void()],["pathPaymentStrictReceiveNotAuthorized",e.void()],["pathPaymentStrictReceiveLineFull",e.void()],["pathPaymentStrictReceiveNoIssuer","noIssuer"],["pathPaymentStrictReceiveTooFewOffers",e.void()],["pathPaymentStrictReceiveOfferCrossSelf",e.void()],["pathPaymentStrictReceiveOverSendmax",e.void()]],arms:{success:e.lookup("PathPaymentStrictReceiveResultSuccess"),noIssuer:e.lookup("Asset")}}),e.enum("PathPaymentStrictSendResultCode",{pathPaymentStrictSendSuccess:0,pathPaymentStrictSendMalformed:-1,pathPaymentStrictSendUnderfunded:-2,pathPaymentStrictSendSrcNoTrust:-3,pathPaymentStrictSendSrcNotAuthorized:-4,pathPaymentStrictSendNoDestination:-5,pathPaymentStrictSendNoTrust:-6,pathPaymentStrictSendNotAuthorized:-7,pathPaymentStrictSendLineFull:-8,pathPaymentStrictSendNoIssuer:-9,pathPaymentStrictSendTooFewOffers:-10,pathPaymentStrictSendOfferCrossSelf:-11,pathPaymentStrictSendUnderDestmin:-12}),e.struct("PathPaymentStrictSendResultSuccess",[["offers",e.varArray(e.lookup("ClaimAtom"),2147483647)],["last",e.lookup("SimplePaymentResult")]]),e.union("PathPaymentStrictSendResult",{switchOn:e.lookup("PathPaymentStrictSendResultCode"),switchName:"code",switches:[["pathPaymentStrictSendSuccess","success"],["pathPaymentStrictSendMalformed",e.void()],["pathPaymentStrictSendUnderfunded",e.void()],["pathPaymentStrictSendSrcNoTrust",e.void()],["pathPaymentStrictSendSrcNotAuthorized",e.void()],["pathPaymentStrictSendNoDestination",e.void()],["pathPaymentStrictSendNoTrust",e.void()],["pathPaymentStrictSendNotAuthorized",e.void()],["pathPaymentStrictSendLineFull",e.void()],["pathPaymentStrictSendNoIssuer","noIssuer"],["pathPaymentStrictSendTooFewOffers",e.void()],["pathPaymentStrictSendOfferCrossSelf",e.void()],["pathPaymentStrictSendUnderDestmin",e.void()]],arms:{success:e.lookup("PathPaymentStrictSendResultSuccess"),noIssuer:e.lookup("Asset")}}),e.enum("ManageSellOfferResultCode",{manageSellOfferSuccess:0,manageSellOfferMalformed:-1,manageSellOfferSellNoTrust:-2,manageSellOfferBuyNoTrust:-3,manageSellOfferSellNotAuthorized:-4,manageSellOfferBuyNotAuthorized:-5,manageSellOfferLineFull:-6,manageSellOfferUnderfunded:-7,manageSellOfferCrossSelf:-8,manageSellOfferSellNoIssuer:-9,manageSellOfferBuyNoIssuer:-10,manageSellOfferNotFound:-11,manageSellOfferLowReserve:-12}),e.enum("ManageOfferEffect",{manageOfferCreated:0,manageOfferUpdated:1,manageOfferDeleted:2}),e.union("ManageOfferSuccessResultOffer",{switchOn:e.lookup("ManageOfferEffect"),switchName:"effect",switches:[["manageOfferCreated","offer"],["manageOfferUpdated","offer"],["manageOfferDeleted",e.void()]],arms:{offer:e.lookup("OfferEntry")}}),e.struct("ManageOfferSuccessResult",[["offersClaimed",e.varArray(e.lookup("ClaimAtom"),2147483647)],["offer",e.lookup("ManageOfferSuccessResultOffer")]]),e.union("ManageSellOfferResult",{switchOn:e.lookup("ManageSellOfferResultCode"),switchName:"code",switches:[["manageSellOfferSuccess","success"],["manageSellOfferMalformed",e.void()],["manageSellOfferSellNoTrust",e.void()],["manageSellOfferBuyNoTrust",e.void()],["manageSellOfferSellNotAuthorized",e.void()],["manageSellOfferBuyNotAuthorized",e.void()],["manageSellOfferLineFull",e.void()],["manageSellOfferUnderfunded",e.void()],["manageSellOfferCrossSelf",e.void()],["manageSellOfferSellNoIssuer",e.void()],["manageSellOfferBuyNoIssuer",e.void()],["manageSellOfferNotFound",e.void()],["manageSellOfferLowReserve",e.void()]],arms:{success:e.lookup("ManageOfferSuccessResult")}}),e.enum("ManageBuyOfferResultCode",{manageBuyOfferSuccess:0,manageBuyOfferMalformed:-1,manageBuyOfferSellNoTrust:-2,manageBuyOfferBuyNoTrust:-3,manageBuyOfferSellNotAuthorized:-4,manageBuyOfferBuyNotAuthorized:-5,manageBuyOfferLineFull:-6,manageBuyOfferUnderfunded:-7,manageBuyOfferCrossSelf:-8,manageBuyOfferSellNoIssuer:-9,manageBuyOfferBuyNoIssuer:-10,manageBuyOfferNotFound:-11,manageBuyOfferLowReserve:-12}),e.union("ManageBuyOfferResult",{switchOn:e.lookup("ManageBuyOfferResultCode"),switchName:"code",switches:[["manageBuyOfferSuccess","success"],["manageBuyOfferMalformed",e.void()],["manageBuyOfferSellNoTrust",e.void()],["manageBuyOfferBuyNoTrust",e.void()],["manageBuyOfferSellNotAuthorized",e.void()],["manageBuyOfferBuyNotAuthorized",e.void()],["manageBuyOfferLineFull",e.void()],["manageBuyOfferUnderfunded",e.void()],["manageBuyOfferCrossSelf",e.void()],["manageBuyOfferSellNoIssuer",e.void()],["manageBuyOfferBuyNoIssuer",e.void()],["manageBuyOfferNotFound",e.void()],["manageBuyOfferLowReserve",e.void()]],arms:{success:e.lookup("ManageOfferSuccessResult")}}),e.enum("SetOptionsResultCode",{setOptionsSuccess:0,setOptionsLowReserve:-1,setOptionsTooManySigners:-2,setOptionsBadFlags:-3,setOptionsInvalidInflation:-4,setOptionsCantChange:-5,setOptionsUnknownFlag:-6,setOptionsThresholdOutOfRange:-7,setOptionsBadSigner:-8,setOptionsInvalidHomeDomain:-9,setOptionsAuthRevocableRequired:-10}),e.union("SetOptionsResult",{switchOn:e.lookup("SetOptionsResultCode"),switchName:"code",switches:[["setOptionsSuccess",e.void()],["setOptionsLowReserve",e.void()],["setOptionsTooManySigners",e.void()],["setOptionsBadFlags",e.void()],["setOptionsInvalidInflation",e.void()],["setOptionsCantChange",e.void()],["setOptionsUnknownFlag",e.void()],["setOptionsThresholdOutOfRange",e.void()],["setOptionsBadSigner",e.void()],["setOptionsInvalidHomeDomain",e.void()],["setOptionsAuthRevocableRequired",e.void()]],arms:{}}),e.enum("ChangeTrustResultCode",{changeTrustSuccess:0,changeTrustMalformed:-1,changeTrustNoIssuer:-2,changeTrustInvalidLimit:-3,changeTrustLowReserve:-4,changeTrustSelfNotAllowed:-5,changeTrustTrustLineMissing:-6,changeTrustCannotDelete:-7,changeTrustNotAuthMaintainLiabilities:-8}),e.union("ChangeTrustResult",{switchOn:e.lookup("ChangeTrustResultCode"),switchName:"code",switches:[["changeTrustSuccess",e.void()],["changeTrustMalformed",e.void()],["changeTrustNoIssuer",e.void()],["changeTrustInvalidLimit",e.void()],["changeTrustLowReserve",e.void()],["changeTrustSelfNotAllowed",e.void()],["changeTrustTrustLineMissing",e.void()],["changeTrustCannotDelete",e.void()],["changeTrustNotAuthMaintainLiabilities",e.void()]],arms:{}}),e.enum("AllowTrustResultCode",{allowTrustSuccess:0,allowTrustMalformed:-1,allowTrustNoTrustLine:-2,allowTrustTrustNotRequired:-3,allowTrustCantRevoke:-4,allowTrustSelfNotAllowed:-5,allowTrustLowReserve:-6}),e.union("AllowTrustResult",{switchOn:e.lookup("AllowTrustResultCode"),switchName:"code",switches:[["allowTrustSuccess",e.void()],["allowTrustMalformed",e.void()],["allowTrustNoTrustLine",e.void()],["allowTrustTrustNotRequired",e.void()],["allowTrustCantRevoke",e.void()],["allowTrustSelfNotAllowed",e.void()],["allowTrustLowReserve",e.void()]],arms:{}}),e.enum("AccountMergeResultCode",{accountMergeSuccess:0,accountMergeMalformed:-1,accountMergeNoAccount:-2,accountMergeImmutableSet:-3,accountMergeHasSubEntries:-4,accountMergeSeqnumTooFar:-5,accountMergeDestFull:-6,accountMergeIsSponsor:-7}),e.union("AccountMergeResult",{switchOn:e.lookup("AccountMergeResultCode"),switchName:"code",switches:[["accountMergeSuccess","sourceAccountBalance"],["accountMergeMalformed",e.void()],["accountMergeNoAccount",e.void()],["accountMergeImmutableSet",e.void()],["accountMergeHasSubEntries",e.void()],["accountMergeSeqnumTooFar",e.void()],["accountMergeDestFull",e.void()],["accountMergeIsSponsor",e.void()]],arms:{sourceAccountBalance:e.lookup("Int64")}}),e.enum("InflationResultCode",{inflationSuccess:0,inflationNotTime:-1}),e.struct("InflationPayout",[["destination",e.lookup("AccountId")],["amount",e.lookup("Int64")]]),e.union("InflationResult",{switchOn:e.lookup("InflationResultCode"),switchName:"code",switches:[["inflationSuccess","payouts"],["inflationNotTime",e.void()]],arms:{payouts:e.varArray(e.lookup("InflationPayout"),2147483647)}}),e.enum("ManageDataResultCode",{manageDataSuccess:0,manageDataNotSupportedYet:-1,manageDataNameNotFound:-2,manageDataLowReserve:-3,manageDataInvalidName:-4}),e.union("ManageDataResult",{switchOn:e.lookup("ManageDataResultCode"),switchName:"code",switches:[["manageDataSuccess",e.void()],["manageDataNotSupportedYet",e.void()],["manageDataNameNotFound",e.void()],["manageDataLowReserve",e.void()],["manageDataInvalidName",e.void()]],arms:{}}),e.enum("BumpSequenceResultCode",{bumpSequenceSuccess:0,bumpSequenceBadSeq:-1}),e.union("BumpSequenceResult",{switchOn:e.lookup("BumpSequenceResultCode"),switchName:"code",switches:[["bumpSequenceSuccess",e.void()],["bumpSequenceBadSeq",e.void()]],arms:{}}),e.enum("CreateClaimableBalanceResultCode",{createClaimableBalanceSuccess:0,createClaimableBalanceMalformed:-1,createClaimableBalanceLowReserve:-2,createClaimableBalanceNoTrust:-3,createClaimableBalanceNotAuthorized:-4,createClaimableBalanceUnderfunded:-5}),e.union("CreateClaimableBalanceResult",{switchOn:e.lookup("CreateClaimableBalanceResultCode"),switchName:"code",switches:[["createClaimableBalanceSuccess","balanceId"],["createClaimableBalanceMalformed",e.void()],["createClaimableBalanceLowReserve",e.void()],["createClaimableBalanceNoTrust",e.void()],["createClaimableBalanceNotAuthorized",e.void()],["createClaimableBalanceUnderfunded",e.void()]],arms:{balanceId:e.lookup("ClaimableBalanceId")}}),e.enum("ClaimClaimableBalanceResultCode",{claimClaimableBalanceSuccess:0,claimClaimableBalanceDoesNotExist:-1,claimClaimableBalanceCannotClaim:-2,claimClaimableBalanceLineFull:-3,claimClaimableBalanceNoTrust:-4,claimClaimableBalanceNotAuthorized:-5}),e.union("ClaimClaimableBalanceResult",{switchOn:e.lookup("ClaimClaimableBalanceResultCode"),switchName:"code",switches:[["claimClaimableBalanceSuccess",e.void()],["claimClaimableBalanceDoesNotExist",e.void()],["claimClaimableBalanceCannotClaim",e.void()],["claimClaimableBalanceLineFull",e.void()],["claimClaimableBalanceNoTrust",e.void()],["claimClaimableBalanceNotAuthorized",e.void()]],arms:{}}),e.enum("BeginSponsoringFutureReservesResultCode",{beginSponsoringFutureReservesSuccess:0,beginSponsoringFutureReservesMalformed:-1,beginSponsoringFutureReservesAlreadySponsored:-2,beginSponsoringFutureReservesRecursive:-3}),e.union("BeginSponsoringFutureReservesResult",{switchOn:e.lookup("BeginSponsoringFutureReservesResultCode"),switchName:"code",switches:[["beginSponsoringFutureReservesSuccess",e.void()],["beginSponsoringFutureReservesMalformed",e.void()],["beginSponsoringFutureReservesAlreadySponsored",e.void()],["beginSponsoringFutureReservesRecursive",e.void()]],arms:{}}),e.enum("EndSponsoringFutureReservesResultCode",{endSponsoringFutureReservesSuccess:0,endSponsoringFutureReservesNotSponsored:-1}),e.union("EndSponsoringFutureReservesResult",{switchOn:e.lookup("EndSponsoringFutureReservesResultCode"),switchName:"code",switches:[["endSponsoringFutureReservesSuccess",e.void()],["endSponsoringFutureReservesNotSponsored",e.void()]],arms:{}}),e.enum("RevokeSponsorshipResultCode",{revokeSponsorshipSuccess:0,revokeSponsorshipDoesNotExist:-1,revokeSponsorshipNotSponsor:-2,revokeSponsorshipLowReserve:-3,revokeSponsorshipOnlyTransferable:-4,revokeSponsorshipMalformed:-5}),e.union("RevokeSponsorshipResult",{switchOn:e.lookup("RevokeSponsorshipResultCode"),switchName:"code",switches:[["revokeSponsorshipSuccess",e.void()],["revokeSponsorshipDoesNotExist",e.void()],["revokeSponsorshipNotSponsor",e.void()],["revokeSponsorshipLowReserve",e.void()],["revokeSponsorshipOnlyTransferable",e.void()],["revokeSponsorshipMalformed",e.void()]],arms:{}}),e.enum("ClawbackResultCode",{clawbackSuccess:0,clawbackMalformed:-1,clawbackNotClawbackEnabled:-2,clawbackNoTrust:-3,clawbackUnderfunded:-4}),e.union("ClawbackResult",{switchOn:e.lookup("ClawbackResultCode"),switchName:"code",switches:[["clawbackSuccess",e.void()],["clawbackMalformed",e.void()],["clawbackNotClawbackEnabled",e.void()],["clawbackNoTrust",e.void()],["clawbackUnderfunded",e.void()]],arms:{}}),e.enum("ClawbackClaimableBalanceResultCode",{clawbackClaimableBalanceSuccess:0,clawbackClaimableBalanceDoesNotExist:-1,clawbackClaimableBalanceNotIssuer:-2,clawbackClaimableBalanceNotClawbackEnabled:-3}),e.union("ClawbackClaimableBalanceResult",{switchOn:e.lookup("ClawbackClaimableBalanceResultCode"),switchName:"code",switches:[["clawbackClaimableBalanceSuccess",e.void()],["clawbackClaimableBalanceDoesNotExist",e.void()],["clawbackClaimableBalanceNotIssuer",e.void()],["clawbackClaimableBalanceNotClawbackEnabled",e.void()]],arms:{}}),e.enum("SetTrustLineFlagsResultCode",{setTrustLineFlagsSuccess:0,setTrustLineFlagsMalformed:-1,setTrustLineFlagsNoTrustLine:-2,setTrustLineFlagsCantRevoke:-3,setTrustLineFlagsInvalidState:-4,setTrustLineFlagsLowReserve:-5}),e.union("SetTrustLineFlagsResult",{switchOn:e.lookup("SetTrustLineFlagsResultCode"),switchName:"code",switches:[["setTrustLineFlagsSuccess",e.void()],["setTrustLineFlagsMalformed",e.void()],["setTrustLineFlagsNoTrustLine",e.void()],["setTrustLineFlagsCantRevoke",e.void()],["setTrustLineFlagsInvalidState",e.void()],["setTrustLineFlagsLowReserve",e.void()]],arms:{}}),e.enum("LiquidityPoolDepositResultCode",{liquidityPoolDepositSuccess:0,liquidityPoolDepositMalformed:-1,liquidityPoolDepositNoTrust:-2,liquidityPoolDepositNotAuthorized:-3,liquidityPoolDepositUnderfunded:-4,liquidityPoolDepositLineFull:-5,liquidityPoolDepositBadPrice:-6,liquidityPoolDepositPoolFull:-7}),e.union("LiquidityPoolDepositResult",{switchOn:e.lookup("LiquidityPoolDepositResultCode"),switchName:"code",switches:[["liquidityPoolDepositSuccess",e.void()],["liquidityPoolDepositMalformed",e.void()],["liquidityPoolDepositNoTrust",e.void()],["liquidityPoolDepositNotAuthorized",e.void()],["liquidityPoolDepositUnderfunded",e.void()],["liquidityPoolDepositLineFull",e.void()],["liquidityPoolDepositBadPrice",e.void()],["liquidityPoolDepositPoolFull",e.void()]],arms:{}}),e.enum("LiquidityPoolWithdrawResultCode",{liquidityPoolWithdrawSuccess:0,liquidityPoolWithdrawMalformed:-1,liquidityPoolWithdrawNoTrust:-2,liquidityPoolWithdrawUnderfunded:-3,liquidityPoolWithdrawLineFull:-4,liquidityPoolWithdrawUnderMinimum:-5}),e.union("LiquidityPoolWithdrawResult",{switchOn:e.lookup("LiquidityPoolWithdrawResultCode"),switchName:"code",switches:[["liquidityPoolWithdrawSuccess",e.void()],["liquidityPoolWithdrawMalformed",e.void()],["liquidityPoolWithdrawNoTrust",e.void()],["liquidityPoolWithdrawUnderfunded",e.void()],["liquidityPoolWithdrawLineFull",e.void()],["liquidityPoolWithdrawUnderMinimum",e.void()]],arms:{}}),e.enum("InvokeHostFunctionResultCode",{invokeHostFunctionSuccess:0,invokeHostFunctionMalformed:-1,invokeHostFunctionTrapped:-2,invokeHostFunctionResourceLimitExceeded:-3,invokeHostFunctionEntryArchived:-4,invokeHostFunctionInsufficientRefundableFee:-5}),e.union("InvokeHostFunctionResult",{switchOn:e.lookup("InvokeHostFunctionResultCode"),switchName:"code",switches:[["invokeHostFunctionSuccess","success"],["invokeHostFunctionMalformed",e.void()],["invokeHostFunctionTrapped",e.void()],["invokeHostFunctionResourceLimitExceeded",e.void()],["invokeHostFunctionEntryArchived",e.void()],["invokeHostFunctionInsufficientRefundableFee",e.void()]],arms:{success:e.lookup("Hash")}}),e.enum("ExtendFootprintTtlResultCode",{extendFootprintTtlSuccess:0,extendFootprintTtlMalformed:-1,extendFootprintTtlResourceLimitExceeded:-2,extendFootprintTtlInsufficientRefundableFee:-3}),e.union("ExtendFootprintTtlResult",{switchOn:e.lookup("ExtendFootprintTtlResultCode"),switchName:"code",switches:[["extendFootprintTtlSuccess",e.void()],["extendFootprintTtlMalformed",e.void()],["extendFootprintTtlResourceLimitExceeded",e.void()],["extendFootprintTtlInsufficientRefundableFee",e.void()]],arms:{}}),e.enum("RestoreFootprintResultCode",{restoreFootprintSuccess:0,restoreFootprintMalformed:-1,restoreFootprintResourceLimitExceeded:-2,restoreFootprintInsufficientRefundableFee:-3}),e.union("RestoreFootprintResult",{switchOn:e.lookup("RestoreFootprintResultCode"),switchName:"code",switches:[["restoreFootprintSuccess",e.void()],["restoreFootprintMalformed",e.void()],["restoreFootprintResourceLimitExceeded",e.void()],["restoreFootprintInsufficientRefundableFee",e.void()]],arms:{}}),e.enum("OperationResultCode",{opInner:0,opBadAuth:-1,opNoAccount:-2,opNotSupported:-3,opTooManySubentries:-4,opExceededWorkLimit:-5,opTooManySponsoring:-6}),e.union("OperationResultTr",{switchOn:e.lookup("OperationType"),switchName:"type",switches:[["createAccount","createAccountResult"],["payment","paymentResult"],["pathPaymentStrictReceive","pathPaymentStrictReceiveResult"],["manageSellOffer","manageSellOfferResult"],["createPassiveSellOffer","createPassiveSellOfferResult"],["setOptions","setOptionsResult"],["changeTrust","changeTrustResult"],["allowTrust","allowTrustResult"],["accountMerge","accountMergeResult"],["inflation","inflationResult"],["manageData","manageDataResult"],["bumpSequence","bumpSeqResult"],["manageBuyOffer","manageBuyOfferResult"],["pathPaymentStrictSend","pathPaymentStrictSendResult"],["createClaimableBalance","createClaimableBalanceResult"],["claimClaimableBalance","claimClaimableBalanceResult"],["beginSponsoringFutureReserves","beginSponsoringFutureReservesResult"],["endSponsoringFutureReserves","endSponsoringFutureReservesResult"],["revokeSponsorship","revokeSponsorshipResult"],["clawback","clawbackResult"],["clawbackClaimableBalance","clawbackClaimableBalanceResult"],["setTrustLineFlags","setTrustLineFlagsResult"],["liquidityPoolDeposit","liquidityPoolDepositResult"],["liquidityPoolWithdraw","liquidityPoolWithdrawResult"],["invokeHostFunction","invokeHostFunctionResult"],["extendFootprintTtl","extendFootprintTtlResult"],["restoreFootprint","restoreFootprintResult"]],arms:{createAccountResult:e.lookup("CreateAccountResult"),paymentResult:e.lookup("PaymentResult"),pathPaymentStrictReceiveResult:e.lookup("PathPaymentStrictReceiveResult"),manageSellOfferResult:e.lookup("ManageSellOfferResult"),createPassiveSellOfferResult:e.lookup("ManageSellOfferResult"),setOptionsResult:e.lookup("SetOptionsResult"),changeTrustResult:e.lookup("ChangeTrustResult"),allowTrustResult:e.lookup("AllowTrustResult"),accountMergeResult:e.lookup("AccountMergeResult"),inflationResult:e.lookup("InflationResult"),manageDataResult:e.lookup("ManageDataResult"),bumpSeqResult:e.lookup("BumpSequenceResult"),manageBuyOfferResult:e.lookup("ManageBuyOfferResult"),pathPaymentStrictSendResult:e.lookup("PathPaymentStrictSendResult"),createClaimableBalanceResult:e.lookup("CreateClaimableBalanceResult"),claimClaimableBalanceResult:e.lookup("ClaimClaimableBalanceResult"),beginSponsoringFutureReservesResult:e.lookup("BeginSponsoringFutureReservesResult"),endSponsoringFutureReservesResult:e.lookup("EndSponsoringFutureReservesResult"),revokeSponsorshipResult:e.lookup("RevokeSponsorshipResult"),clawbackResult:e.lookup("ClawbackResult"),clawbackClaimableBalanceResult:e.lookup("ClawbackClaimableBalanceResult"),setTrustLineFlagsResult:e.lookup("SetTrustLineFlagsResult"),liquidityPoolDepositResult:e.lookup("LiquidityPoolDepositResult"),liquidityPoolWithdrawResult:e.lookup("LiquidityPoolWithdrawResult"),invokeHostFunctionResult:e.lookup("InvokeHostFunctionResult"),extendFootprintTtlResult:e.lookup("ExtendFootprintTtlResult"),restoreFootprintResult:e.lookup("RestoreFootprintResult")}}),e.union("OperationResult",{switchOn:e.lookup("OperationResultCode"),switchName:"code",switches:[["opInner","tr"],["opBadAuth",e.void()],["opNoAccount",e.void()],["opNotSupported",e.void()],["opTooManySubentries",e.void()],["opExceededWorkLimit",e.void()],["opTooManySponsoring",e.void()]],arms:{tr:e.lookup("OperationResultTr")}}),e.enum("TransactionResultCode",{txFeeBumpInnerSuccess:1,txSuccess:0,txFailed:-1,txTooEarly:-2,txTooLate:-3,txMissingOperation:-4,txBadSeq:-5,txBadAuth:-6,txInsufficientBalance:-7,txNoAccount:-8,txInsufficientFee:-9,txBadAuthExtra:-10,txInternalError:-11,txNotSupported:-12,txFeeBumpInnerFailed:-13,txBadSponsorship:-14,txBadMinSeqAgeOrGap:-15,txMalformed:-16,txSorobanInvalid:-17}),e.union("InnerTransactionResultResult",{switchOn:e.lookup("TransactionResultCode"),switchName:"code",switches:[["txSuccess","results"],["txFailed","results"],["txTooEarly",e.void()],["txTooLate",e.void()],["txMissingOperation",e.void()],["txBadSeq",e.void()],["txBadAuth",e.void()],["txInsufficientBalance",e.void()],["txNoAccount",e.void()],["txInsufficientFee",e.void()],["txBadAuthExtra",e.void()],["txInternalError",e.void()],["txNotSupported",e.void()],["txBadSponsorship",e.void()],["txBadMinSeqAgeOrGap",e.void()],["txMalformed",e.void()],["txSorobanInvalid",e.void()]],arms:{results:e.varArray(e.lookup("OperationResult"),2147483647)}}),e.union("InnerTransactionResultExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("InnerTransactionResult",[["feeCharged",e.lookup("Int64")],["result",e.lookup("InnerTransactionResultResult")],["ext",e.lookup("InnerTransactionResultExt")]]),e.struct("InnerTransactionResultPair",[["transactionHash",e.lookup("Hash")],["result",e.lookup("InnerTransactionResult")]]),e.union("TransactionResultResult",{switchOn:e.lookup("TransactionResultCode"),switchName:"code",switches:[["txFeeBumpInnerSuccess","innerResultPair"],["txFeeBumpInnerFailed","innerResultPair"],["txSuccess","results"],["txFailed","results"],["txTooEarly",e.void()],["txTooLate",e.void()],["txMissingOperation",e.void()],["txBadSeq",e.void()],["txBadAuth",e.void()],["txInsufficientBalance",e.void()],["txNoAccount",e.void()],["txInsufficientFee",e.void()],["txBadAuthExtra",e.void()],["txInternalError",e.void()],["txNotSupported",e.void()],["txBadSponsorship",e.void()],["txBadMinSeqAgeOrGap",e.void()],["txMalformed",e.void()],["txSorobanInvalid",e.void()]],arms:{innerResultPair:e.lookup("InnerTransactionResultPair"),results:e.varArray(e.lookup("OperationResult"),2147483647)}}),e.union("TransactionResultExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TransactionResult",[["feeCharged",e.lookup("Int64")],["result",e.lookup("TransactionResultResult")],["ext",e.lookup("TransactionResultExt")]]),e.typedef("Hash",e.opaque(32)),e.typedef("Uint256",e.opaque(32)),e.typedef("Uint32",e.uint()),e.typedef("Int32",e.int()),e.typedef("Uint64",e.uhyper()),e.typedef("Int64",e.hyper()),e.typedef("TimePoint",e.lookup("Uint64")),e.typedef("Duration",e.lookup("Uint64")),e.union("ExtensionPoint",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.enum("CryptoKeyType",{keyTypeEd25519:0,keyTypePreAuthTx:1,keyTypeHashX:2,keyTypeEd25519SignedPayload:3,keyTypeMuxedEd25519:256}),e.enum("PublicKeyType",{publicKeyTypeEd25519:0}),e.enum("SignerKeyType",{signerKeyTypeEd25519:0,signerKeyTypePreAuthTx:1,signerKeyTypeHashX:2,signerKeyTypeEd25519SignedPayload:3}),e.union("PublicKey",{switchOn:e.lookup("PublicKeyType"),switchName:"type",switches:[["publicKeyTypeEd25519","ed25519"]],arms:{ed25519:e.lookup("Uint256")}}),e.struct("SignerKeyEd25519SignedPayload",[["ed25519",e.lookup("Uint256")],["payload",e.varOpaque(64)]]),e.union("SignerKey",{switchOn:e.lookup("SignerKeyType"),switchName:"type",switches:[["signerKeyTypeEd25519","ed25519"],["signerKeyTypePreAuthTx","preAuthTx"],["signerKeyTypeHashX","hashX"],["signerKeyTypeEd25519SignedPayload","ed25519SignedPayload"]],arms:{ed25519:e.lookup("Uint256"),preAuthTx:e.lookup("Uint256"),hashX:e.lookup("Uint256"),ed25519SignedPayload:e.lookup("SignerKeyEd25519SignedPayload")}}),e.typedef("Signature",e.varOpaque(64)),e.typedef("SignatureHint",e.opaque(4)),e.typedef("NodeId",e.lookup("PublicKey")),e.typedef("AccountId",e.lookup("PublicKey")),e.struct("Curve25519Secret",[["key",e.opaque(32)]]),e.struct("Curve25519Public",[["key",e.opaque(32)]]),e.struct("HmacSha256Key",[["key",e.opaque(32)]]),e.struct("HmacSha256Mac",[["mac",e.opaque(32)]]),e.enum("ScValType",{scvBool:0,scvVoid:1,scvError:2,scvU32:3,scvI32:4,scvU64:5,scvI64:6,scvTimepoint:7,scvDuration:8,scvU128:9,scvI128:10,scvU256:11,scvI256:12,scvBytes:13,scvString:14,scvSymbol:15,scvVec:16,scvMap:17,scvAddress:18,scvContractInstance:19,scvLedgerKeyContractInstance:20,scvLedgerKeyNonce:21}),e.enum("ScErrorType",{sceContract:0,sceWasmVm:1,sceContext:2,sceStorage:3,sceObject:4,sceCrypto:5,sceEvents:6,sceBudget:7,sceValue:8,sceAuth:9}),e.enum("ScErrorCode",{scecArithDomain:0,scecIndexBounds:1,scecInvalidInput:2,scecMissingValue:3,scecExistingValue:4,scecExceededLimit:5,scecInvalidAction:6,scecInternalError:7,scecUnexpectedType:8,scecUnexpectedSize:9}),e.union("ScError",{switchOn:e.lookup("ScErrorType"),switchName:"type",switches:[["sceContract","contractCode"],["sceWasmVm","code"],["sceContext","code"],["sceStorage","code"],["sceObject","code"],["sceCrypto","code"],["sceEvents","code"],["sceBudget","code"],["sceValue","code"],["sceAuth","code"]],arms:{contractCode:e.lookup("Uint32"),code:e.lookup("ScErrorCode")}}),e.struct("UInt128Parts",[["hi",e.lookup("Uint64")],["lo",e.lookup("Uint64")]]),e.struct("Int128Parts",[["hi",e.lookup("Int64")],["lo",e.lookup("Uint64")]]),e.struct("UInt256Parts",[["hiHi",e.lookup("Uint64")],["hiLo",e.lookup("Uint64")],["loHi",e.lookup("Uint64")],["loLo",e.lookup("Uint64")]]),e.struct("Int256Parts",[["hiHi",e.lookup("Int64")],["hiLo",e.lookup("Uint64")],["loHi",e.lookup("Uint64")],["loLo",e.lookup("Uint64")]]),e.enum("ContractExecutableType",{contractExecutableWasm:0,contractExecutableStellarAsset:1}),e.union("ContractExecutable",{switchOn:e.lookup("ContractExecutableType"),switchName:"type",switches:[["contractExecutableWasm","wasmHash"],["contractExecutableStellarAsset",e.void()]],arms:{wasmHash:e.lookup("Hash")}}),e.enum("ScAddressType",{scAddressTypeAccount:0,scAddressTypeContract:1}),e.union("ScAddress",{switchOn:e.lookup("ScAddressType"),switchName:"type",switches:[["scAddressTypeAccount","accountId"],["scAddressTypeContract","contractId"]],arms:{accountId:e.lookup("AccountId"),contractId:e.lookup("Hash")}}),e.const("SCSYMBOL_LIMIT",32),e.typedef("ScVec",e.varArray(e.lookup("ScVal"),2147483647)),e.typedef("ScMap",e.varArray(e.lookup("ScMapEntry"),2147483647)),e.typedef("ScBytes",e.varOpaque()),e.typedef("ScString",e.string()),e.typedef("ScSymbol",e.string(32)),e.struct("ScNonceKey",[["nonce",e.lookup("Int64")]]),e.struct("ScContractInstance",[["executable",e.lookup("ContractExecutable")],["storage",e.option(e.lookup("ScMap"))]]),e.union("ScVal",{switchOn:e.lookup("ScValType"),switchName:"type",switches:[["scvBool","b"],["scvVoid",e.void()],["scvError","error"],["scvU32","u32"],["scvI32","i32"],["scvU64","u64"],["scvI64","i64"],["scvTimepoint","timepoint"],["scvDuration","duration"],["scvU128","u128"],["scvI128","i128"],["scvU256","u256"],["scvI256","i256"],["scvBytes","bytes"],["scvString","str"],["scvSymbol","sym"],["scvVec","vec"],["scvMap","map"],["scvAddress","address"],["scvLedgerKeyContractInstance",e.void()],["scvLedgerKeyNonce","nonceKey"],["scvContractInstance","instance"]],arms:{b:e.bool(),error:e.lookup("ScError"),u32:e.lookup("Uint32"),i32:e.lookup("Int32"),u64:e.lookup("Uint64"),i64:e.lookup("Int64"),timepoint:e.lookup("TimePoint"),duration:e.lookup("Duration"),u128:e.lookup("UInt128Parts"),i128:e.lookup("Int128Parts"),u256:e.lookup("UInt256Parts"),i256:e.lookup("Int256Parts"),bytes:e.lookup("ScBytes"),str:e.lookup("ScString"),sym:e.lookup("ScSymbol"),vec:e.option(e.lookup("ScVec")),map:e.option(e.lookup("ScMap")),address:e.lookup("ScAddress"),nonceKey:e.lookup("ScNonceKey"),instance:e.lookup("ScContractInstance")}}),e.struct("ScMapEntry",[["key",e.lookup("ScVal")],["val",e.lookup("ScVal")]]),e.enum("ScEnvMetaKind",{scEnvMetaKindInterfaceVersion:0}),e.union("ScEnvMetaEntry",{switchOn:e.lookup("ScEnvMetaKind"),switchName:"kind",switches:[["scEnvMetaKindInterfaceVersion","interfaceVersion"]],arms:{interfaceVersion:e.lookup("Uint64")}}),e.struct("ScMetaV0",[["key",e.string()],["val",e.string()]]),e.enum("ScMetaKind",{scMetaV0:0}),e.union("ScMetaEntry",{switchOn:e.lookup("ScMetaKind"),switchName:"kind",switches:[["scMetaV0","v0"]],arms:{v0:e.lookup("ScMetaV0")}}),e.const("SC_SPEC_DOC_LIMIT",1024),e.enum("ScSpecType",{scSpecTypeVal:0,scSpecTypeBool:1,scSpecTypeVoid:2,scSpecTypeError:3,scSpecTypeU32:4,scSpecTypeI32:5,scSpecTypeU64:6,scSpecTypeI64:7,scSpecTypeTimepoint:8,scSpecTypeDuration:9,scSpecTypeU128:10,scSpecTypeI128:11,scSpecTypeU256:12,scSpecTypeI256:13,scSpecTypeBytes:14,scSpecTypeString:16,scSpecTypeSymbol:17,scSpecTypeAddress:19,scSpecTypeOption:1e3,scSpecTypeResult:1001,scSpecTypeVec:1002,scSpecTypeMap:1004,scSpecTypeTuple:1005,scSpecTypeBytesN:1006,scSpecTypeUdt:2e3}),e.struct("ScSpecTypeOption",[["valueType",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecTypeResult",[["okType",e.lookup("ScSpecTypeDef")],["errorType",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecTypeVec",[["elementType",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecTypeMap",[["keyType",e.lookup("ScSpecTypeDef")],["valueType",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecTypeTuple",[["valueTypes",e.varArray(e.lookup("ScSpecTypeDef"),12)]]),e.struct("ScSpecTypeBytesN",[["n",e.lookup("Uint32")]]),e.struct("ScSpecTypeUdt",[["name",e.string(60)]]),e.union("ScSpecTypeDef",{switchOn:e.lookup("ScSpecType"),switchName:"type",switches:[["scSpecTypeVal",e.void()],["scSpecTypeBool",e.void()],["scSpecTypeVoid",e.void()],["scSpecTypeError",e.void()],["scSpecTypeU32",e.void()],["scSpecTypeI32",e.void()],["scSpecTypeU64",e.void()],["scSpecTypeI64",e.void()],["scSpecTypeTimepoint",e.void()],["scSpecTypeDuration",e.void()],["scSpecTypeU128",e.void()],["scSpecTypeI128",e.void()],["scSpecTypeU256",e.void()],["scSpecTypeI256",e.void()],["scSpecTypeBytes",e.void()],["scSpecTypeString",e.void()],["scSpecTypeSymbol",e.void()],["scSpecTypeAddress",e.void()],["scSpecTypeOption","option"],["scSpecTypeResult","result"],["scSpecTypeVec","vec"],["scSpecTypeMap","map"],["scSpecTypeTuple","tuple"],["scSpecTypeBytesN","bytesN"],["scSpecTypeUdt","udt"]],arms:{option:e.lookup("ScSpecTypeOption"),result:e.lookup("ScSpecTypeResult"),vec:e.lookup("ScSpecTypeVec"),map:e.lookup("ScSpecTypeMap"),tuple:e.lookup("ScSpecTypeTuple"),bytesN:e.lookup("ScSpecTypeBytesN"),udt:e.lookup("ScSpecTypeUdt")}}),e.struct("ScSpecUdtStructFieldV0",[["doc",e.string(t)],["name",e.string(30)],["type",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecUdtStructV0",[["doc",e.string(t)],["lib",e.string(80)],["name",e.string(60)],["fields",e.varArray(e.lookup("ScSpecUdtStructFieldV0"),40)]]),e.struct("ScSpecUdtUnionCaseVoidV0",[["doc",e.string(t)],["name",e.string(60)]]),e.struct("ScSpecUdtUnionCaseTupleV0",[["doc",e.string(t)],["name",e.string(60)],["type",e.varArray(e.lookup("ScSpecTypeDef"),12)]]),e.enum("ScSpecUdtUnionCaseV0Kind",{scSpecUdtUnionCaseVoidV0:0,scSpecUdtUnionCaseTupleV0:1}),e.union("ScSpecUdtUnionCaseV0",{switchOn:e.lookup("ScSpecUdtUnionCaseV0Kind"),switchName:"kind",switches:[["scSpecUdtUnionCaseVoidV0","voidCase"],["scSpecUdtUnionCaseTupleV0","tupleCase"]],arms:{voidCase:e.lookup("ScSpecUdtUnionCaseVoidV0"),tupleCase:e.lookup("ScSpecUdtUnionCaseTupleV0")}}),e.struct("ScSpecUdtUnionV0",[["doc",e.string(t)],["lib",e.string(80)],["name",e.string(60)],["cases",e.varArray(e.lookup("ScSpecUdtUnionCaseV0"),50)]]),e.struct("ScSpecUdtEnumCaseV0",[["doc",e.string(t)],["name",e.string(60)],["value",e.lookup("Uint32")]]),e.struct("ScSpecUdtEnumV0",[["doc",e.string(t)],["lib",e.string(80)],["name",e.string(60)],["cases",e.varArray(e.lookup("ScSpecUdtEnumCaseV0"),50)]]),e.struct("ScSpecUdtErrorEnumCaseV0",[["doc",e.string(t)],["name",e.string(60)],["value",e.lookup("Uint32")]]),e.struct("ScSpecUdtErrorEnumV0",[["doc",e.string(t)],["lib",e.string(80)],["name",e.string(60)],["cases",e.varArray(e.lookup("ScSpecUdtErrorEnumCaseV0"),50)]]),e.struct("ScSpecFunctionInputV0",[["doc",e.string(t)],["name",e.string(30)],["type",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecFunctionV0",[["doc",e.string(t)],["name",e.lookup("ScSymbol")],["inputs",e.varArray(e.lookup("ScSpecFunctionInputV0"),10)],["outputs",e.varArray(e.lookup("ScSpecTypeDef"),1)]]),e.enum("ScSpecEntryKind",{scSpecEntryFunctionV0:0,scSpecEntryUdtStructV0:1,scSpecEntryUdtUnionV0:2,scSpecEntryUdtEnumV0:3,scSpecEntryUdtErrorEnumV0:4}),e.union("ScSpecEntry",{switchOn:e.lookup("ScSpecEntryKind"),switchName:"kind",switches:[["scSpecEntryFunctionV0","functionV0"],["scSpecEntryUdtStructV0","udtStructV0"],["scSpecEntryUdtUnionV0","udtUnionV0"],["scSpecEntryUdtEnumV0","udtEnumV0"],["scSpecEntryUdtErrorEnumV0","udtErrorEnumV0"]],arms:{functionV0:e.lookup("ScSpecFunctionV0"),udtStructV0:e.lookup("ScSpecUdtStructV0"),udtUnionV0:e.lookup("ScSpecUdtUnionV0"),udtEnumV0:e.lookup("ScSpecUdtEnumV0"),udtErrorEnumV0:e.lookup("ScSpecUdtErrorEnumV0")}}),e.struct("ConfigSettingContractExecutionLanesV0",[["ledgerMaxTxCount",e.lookup("Uint32")]]),e.struct("ConfigSettingContractComputeV0",[["ledgerMaxInstructions",e.lookup("Int64")],["txMaxInstructions",e.lookup("Int64")],["feeRatePerInstructionsIncrement",e.lookup("Int64")],["txMemoryLimit",e.lookup("Uint32")]]),e.struct("ConfigSettingContractLedgerCostV0",[["ledgerMaxReadLedgerEntries",e.lookup("Uint32")],["ledgerMaxReadBytes",e.lookup("Uint32")],["ledgerMaxWriteLedgerEntries",e.lookup("Uint32")],["ledgerMaxWriteBytes",e.lookup("Uint32")],["txMaxReadLedgerEntries",e.lookup("Uint32")],["txMaxReadBytes",e.lookup("Uint32")],["txMaxWriteLedgerEntries",e.lookup("Uint32")],["txMaxWriteBytes",e.lookup("Uint32")],["feeReadLedgerEntry",e.lookup("Int64")],["feeWriteLedgerEntry",e.lookup("Int64")],["feeRead1Kb",e.lookup("Int64")],["bucketListTargetSizeBytes",e.lookup("Int64")],["writeFee1KbBucketListLow",e.lookup("Int64")],["writeFee1KbBucketListHigh",e.lookup("Int64")],["bucketListWriteFeeGrowthFactor",e.lookup("Uint32")]]),e.struct("ConfigSettingContractHistoricalDataV0",[["feeHistorical1Kb",e.lookup("Int64")]]),e.struct("ConfigSettingContractEventsV0",[["txMaxContractEventsSizeBytes",e.lookup("Uint32")],["feeContractEvents1Kb",e.lookup("Int64")]]),e.struct("ConfigSettingContractBandwidthV0",[["ledgerMaxTxsSizeBytes",e.lookup("Uint32")],["txMaxSizeBytes",e.lookup("Uint32")],["feeTxSize1Kb",e.lookup("Int64")]]),e.enum("ContractCostType",{wasmInsnExec:0,memAlloc:1,memCpy:2,memCmp:3,dispatchHostFunction:4,visitObject:5,valSer:6,valDeser:7,computeSha256Hash:8,computeEd25519PubKey:9,verifyEd25519Sig:10,vmInstantiation:11,vmCachedInstantiation:12,invokeVmFunction:13,computeKeccak256Hash:14,decodeEcdsaCurve256Sig:15,recoverEcdsaSecp256k1Key:16,int256AddSub:17,int256Mul:18,int256Div:19,int256Pow:20,int256Shift:21,chaCha20DrawBytes:22,parseWasmInstructions:23,parseWasmFunctions:24,parseWasmGlobals:25,parseWasmTableEntries:26,parseWasmTypes:27,parseWasmDataSegments:28,parseWasmElemSegments:29,parseWasmImports:30,parseWasmExports:31,parseWasmDataSegmentBytes:32,instantiateWasmInstructions:33,instantiateWasmFunctions:34,instantiateWasmGlobals:35,instantiateWasmTableEntries:36,instantiateWasmTypes:37,instantiateWasmDataSegments:38,instantiateWasmElemSegments:39,instantiateWasmImports:40,instantiateWasmExports:41,instantiateWasmDataSegmentBytes:42,sec1DecodePointUncompressed:43,verifyEcdsaSecp256r1Sig:44}),e.struct("ContractCostParamEntry",[["ext",e.lookup("ExtensionPoint")],["constTerm",e.lookup("Int64")],["linearTerm",e.lookup("Int64")]]),e.struct("StateArchivalSettings",[["maxEntryTtl",e.lookup("Uint32")],["minTemporaryTtl",e.lookup("Uint32")],["minPersistentTtl",e.lookup("Uint32")],["persistentRentRateDenominator",e.lookup("Int64")],["tempRentRateDenominator",e.lookup("Int64")],["maxEntriesToArchive",e.lookup("Uint32")],["bucketListSizeWindowSampleSize",e.lookup("Uint32")],["bucketListWindowSamplePeriod",e.lookup("Uint32")],["evictionScanSize",e.lookup("Uint32")],["startingEvictionScanLevel",e.lookup("Uint32")]]),e.struct("EvictionIterator",[["bucketListLevel",e.lookup("Uint32")],["isCurrBucket",e.bool()],["bucketFileOffset",e.lookup("Uint64")]]),e.const("CONTRACT_COST_COUNT_LIMIT",1024),e.typedef("ContractCostParams",e.varArray(e.lookup("ContractCostParamEntry"),e.lookup("CONTRACT_COST_COUNT_LIMIT"))),e.enum("ConfigSettingId",{configSettingContractMaxSizeBytes:0,configSettingContractComputeV0:1,configSettingContractLedgerCostV0:2,configSettingContractHistoricalDataV0:3,configSettingContractEventsV0:4,configSettingContractBandwidthV0:5,configSettingContractCostParamsCpuInstructions:6,configSettingContractCostParamsMemoryBytes:7,configSettingContractDataKeySizeBytes:8,configSettingContractDataEntrySizeBytes:9,configSettingStateArchival:10,configSettingContractExecutionLanes:11,configSettingBucketlistSizeWindow:12,configSettingEvictionIterator:13}),e.union("ConfigSettingEntry",{switchOn:e.lookup("ConfigSettingId"),switchName:"configSettingId",switches:[["configSettingContractMaxSizeBytes","contractMaxSizeBytes"],["configSettingContractComputeV0","contractCompute"],["configSettingContractLedgerCostV0","contractLedgerCost"],["configSettingContractHistoricalDataV0","contractHistoricalData"],["configSettingContractEventsV0","contractEvents"],["configSettingContractBandwidthV0","contractBandwidth"],["configSettingContractCostParamsCpuInstructions","contractCostParamsCpuInsns"],["configSettingContractCostParamsMemoryBytes","contractCostParamsMemBytes"],["configSettingContractDataKeySizeBytes","contractDataKeySizeBytes"],["configSettingContractDataEntrySizeBytes","contractDataEntrySizeBytes"],["configSettingStateArchival","stateArchivalSettings"],["configSettingContractExecutionLanes","contractExecutionLanes"],["configSettingBucketlistSizeWindow","bucketListSizeWindow"],["configSettingEvictionIterator","evictionIterator"]],arms:{contractMaxSizeBytes:e.lookup("Uint32"),contractCompute:e.lookup("ConfigSettingContractComputeV0"),contractLedgerCost:e.lookup("ConfigSettingContractLedgerCostV0"),contractHistoricalData:e.lookup("ConfigSettingContractHistoricalDataV0"),contractEvents:e.lookup("ConfigSettingContractEventsV0"),contractBandwidth:e.lookup("ConfigSettingContractBandwidthV0"),contractCostParamsCpuInsns:e.lookup("ContractCostParams"),contractCostParamsMemBytes:e.lookup("ContractCostParams"),contractDataKeySizeBytes:e.lookup("Uint32"),contractDataEntrySizeBytes:e.lookup("Uint32"),stateArchivalSettings:e.lookup("StateArchivalSettings"),contractExecutionLanes:e.lookup("ConfigSettingContractExecutionLanesV0"),bucketListSizeWindow:e.varArray(e.lookup("Uint64"),2147483647),evictionIterator:e.lookup("EvictionIterator")}})}));const i=o;const a={XdrWriter:n.XdrWriter,XdrReader:n.XdrReader};var s=r(2802);function u(e){var t=new s.sha256;return t.update(e,"utf8"),t.digest()}var c=r(3626).A,l={},f="undefined"==typeof window?function(){var e;try{e=r(Object(function(){var e=new Error("Cannot find module 'sodium-native'");throw e.code="MODULE_NOT_FOUND",e}()))}catch(e){return d()}return Object.keys(e).length?(l.generate=function(t){var r=c.alloc(e.crypto_sign_PUBLICKEYBYTES),n=c.alloc(e.crypto_sign_SECRETKEYBYTES);return e.crypto_sign_seed_keypair(r,n,t),r},l.sign=function(t,r){t=c.from(t);var n=c.alloc(e.crypto_sign_BYTES);return e.crypto_sign_detached(n,t,r),n},l.verify=function(t,r,n){t=c.from(t);try{return e.crypto_sign_verify_detached(r,t,n)}catch(e){return!1}},!0):d()}():d();function p(e,t){return l.sign(e,t)}function h(e,t,r){return l.verify(e,t,r)}function d(){var e=r(8947);return l.generate=function(t){var r=new Uint8Array(t),n=e.sign.keyPair.fromSeed(r);return c.from(n.publicKey)},l.sign=function(t,r){t=c.from(t),t=new Uint8Array(t.toJSON().data),r=new Uint8Array(r.toJSON().data);var n=e.sign.detached(t,r);return c.from(n)},l.verify=function(t,r,n){return t=c.from(t),t=new Uint8Array(t.toJSON().data),r=new Uint8Array(r.toJSON().data),n=new Uint8Array(n.toJSON().data),e.sign.detached.verify(t,r,n)},!1}var y=function(e,t){for(var r="number"==typeof e,n=String(e);n.endsWith(t);)n=n.slice(0,-1);return r?Number(n):n},m=r(8947),g=r.n(m),v=r(5360);var b=r(3626).A;function w(e){return w="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},w(e)}function S(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,k(n.key),n)}}function k(e){var t=function(e,t){if("object"!=w(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==w(t)?t:t+""}var E={ed25519PublicKey:48,ed25519SecretSeed:144,med25519PublicKey:96,preAuthTx:152,sha256Hash:184,signedPayload:120,contract:16},A={G:"ed25519PublicKey",S:"ed25519SecretSeed",M:"med25519PublicKey",T:"preAuthTx",X:"sha256Hash",P:"signedPayload",C:"contract"},T=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},r=[{key:"encodeEd25519PublicKey",value:function(e){return x("ed25519PublicKey",e)}},{key:"decodeEd25519PublicKey",value:function(e){return P("ed25519PublicKey",e)}},{key:"isValidEd25519PublicKey",value:function(e){return O("ed25519PublicKey",e)}},{key:"encodeEd25519SecretSeed",value:function(e){return x("ed25519SecretSeed",e)}},{key:"decodeEd25519SecretSeed",value:function(e){return P("ed25519SecretSeed",e)}},{key:"isValidEd25519SecretSeed",value:function(e){return O("ed25519SecretSeed",e)}},{key:"encodeMed25519PublicKey",value:function(e){return x("med25519PublicKey",e)}},{key:"decodeMed25519PublicKey",value:function(e){return P("med25519PublicKey",e)}},{key:"isValidMed25519PublicKey",value:function(e){return O("med25519PublicKey",e)}},{key:"encodePreAuthTx",value:function(e){return x("preAuthTx",e)}},{key:"decodePreAuthTx",value:function(e){return P("preAuthTx",e)}},{key:"encodeSha256Hash",value:function(e){return x("sha256Hash",e)}},{key:"decodeSha256Hash",value:function(e){return P("sha256Hash",e)}},{key:"encodeSignedPayload",value:function(e){return x("signedPayload",e)}},{key:"decodeSignedPayload",value:function(e){return P("signedPayload",e)}},{key:"isValidSignedPayload",value:function(e){return O("signedPayload",e)}},{key:"encodeContract",value:function(e){return x("contract",e)}},{key:"decodeContract",value:function(e){return P("contract",e)}},{key:"isValidContract",value:function(e){return O("contract",e)}},{key:"getVersionByteForPrefix",value:function(e){return A[e[0]]}}],(t=null)&&S(e.prototype,t),r&&S(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function O(e,t){if("string"!=typeof t)return!1;switch(e){case"ed25519PublicKey":case"ed25519SecretSeed":case"preAuthTx":case"sha256Hash":case"contract":if(56!==t.length)return!1;break;case"med25519PublicKey":if(69!==t.length)return!1;break;case"signedPayload":if(t.length<56||t.length>165)return!1;break;default:return!1}var r="";try{r=P(e,t)}catch(e){return!1}switch(e){case"ed25519PublicKey":case"ed25519SecretSeed":case"preAuthTx":case"sha256Hash":case"contract":return 32===r.length;case"med25519PublicKey":return 40===r.length;case"signedPayload":return r.length>=40&&r.length<=100;default:return!1}}function P(e,t){if("string"!=typeof t)throw new TypeError("encoded argument must be of type String");var r=v.decode(t),n=r[0],o=r.slice(0,-2),i=o.slice(1),a=r.slice(-2);if(t!==v.encode(r))throw new Error("invalid encoded string");var s=E[e];if(void 0===s)throw new Error("".concat(e," is not a valid version byte name. ")+"Expected one of ".concat(Object.keys(E).join(", ")));if(n!==s)throw new Error("invalid version byte. expected ".concat(s,", got ").concat(n));if(!function(e,t){if(e.length!==t.length)return!1;if(0===e.length)return!0;for(var r=0;r<e.length;r+=1)if(e[r]!==t[r])return!1;return!0}(I(o),a))throw new Error("invalid checksum");return b.from(i)}function x(e,t){if(null==t)throw new Error("cannot encode null data");var r=E[e];if(void 0===r)throw new Error("".concat(e," is not a valid version byte name. ")+"Expected one of ".concat(Object.keys(E).join(", ")));t=b.from(t);var n=b.from([r]),o=b.concat([n,t]),i=b.from(I(o)),a=b.concat([o,i]);return v.encode(a)}function I(e){for(var t=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920],r=0,n=0;n<e.length;n+=1){r=r<<8^t[r>>8^e[n]],r&=65535}var o=new Uint8Array(2);return o[0]=255&r,o[1]=r>>8&255,o}var _=r(3626).A;function B(e){return B="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},B(e)}function R(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,C(n.key),n)}}function C(e){var t=function(e,t){if("object"!=B(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=B(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==B(t)?t:t+""}var U=function(){return e=function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"ed25519"!==t.type)throw new Error("Invalid keys type");if(this.type=t.type,t.secretKey){if(t.secretKey=_.from(t.secretKey),32!==t.secretKey.length)throw new Error("secretKey length is invalid");if(this._secretSeed=t.secretKey,this._publicKey=(r=t.secretKey,l.generate(r)),this._secretKey=_.concat([t.secretKey,this._publicKey]),t.publicKey&&!this._publicKey.equals(_.from(t.publicKey)))throw new Error("secretKey does not match publicKey")}else if(this._publicKey=_.from(t.publicKey),32!==this._publicKey.length)throw new Error("publicKey length is invalid");var r},r=[{key:"fromSecret",value:function(e){var t=T.decodeEd25519SecretSeed(e);return this.fromRawEd25519Seed(t)}},{key:"fromRawEd25519Seed",value:function(e){return new this({type:"ed25519",secretKey:e})}},{key:"master",value:function(e){if(!e)throw new Error("No network selected. Please pass a network argument, e.g. `Keypair.master(Networks.PUBLIC)`.");return this.fromRawEd25519Seed(u(e))}},{key:"fromPublicKey",value:function(e){if(32!==(e=T.decodeEd25519PublicKey(e)).length)throw new Error("Invalid Stellar public key");return new this({type:"ed25519",publicKey:e})}},{key:"random",value:function(){var e=g().randomBytes(32);return this.fromRawEd25519Seed(e)}}],(t=[{key:"xdrAccountId",value:function(){return new i.AccountId.publicKeyTypeEd25519(this._publicKey)}},{key:"xdrPublicKey",value:function(){return new i.PublicKey.publicKeyTypeEd25519(this._publicKey)}},{key:"xdrMuxedAccount",value:function(e){if(void 0!==e){if("string"!=typeof e)throw new TypeError("expected string for ID, got ".concat(B(e)));return i.MuxedAccount.keyTypeMuxedEd25519(new i.MuxedAccountMed25519({id:i.Uint64.fromString(e),ed25519:this._publicKey}))}return new i.MuxedAccount.keyTypeEd25519(this._publicKey)}},{key:"rawPublicKey",value:function(){return this._publicKey}},{key:"signatureHint",value:function(){var e=this.xdrAccountId().toXDR();return e.slice(e.length-4)}},{key:"publicKey",value:function(){return T.encodeEd25519PublicKey(this._publicKey)}},{key:"secret",value:function(){if(!this._secretSeed)throw new Error("no secret key available");if("ed25519"===this.type)return T.encodeEd25519SecretSeed(this._secretSeed);throw new Error("Invalid Keypair type")}},{key:"rawSecretKey",value:function(){return this._secretSeed}},{key:"canSign",value:function(){return!!this._secretKey}},{key:"sign",value:function(e){if(!this.canSign())throw new Error("cannot sign: no secret key available");return p(e,this._secretKey)}},{key:"verify",value:function(e,t){return h(e,t,this._publicKey)}},{key:"signDecorated",value:function(e){var t=this.sign(e),r=this.signatureHint();return new i.DecoratedSignature({hint:r,signature:t})}},{key:"signPayloadDecorated",value:function(e){var t=this.sign(e),r=this.signatureHint(),n=_.from(e.slice(-4));return n.length<4&&(n=_.concat([n,_.alloc(4-e.length,0)])),new i.DecoratedSignature({hint:n.map((function(e,t){return e^r[t]})),signature:t})}}])&&R(e.prototype,t),r&&R(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}(),N=r(3626).A;function L(e){return L="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},L(e)}function j(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,M(n.key),n)}}function M(e){var t=function(e,t){if("object"!=L(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=L(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==L(t)?t:t+""}var F=function(){function e(t,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!/^[a-zA-Z0-9]{1,12}$/.test(t))throw new Error("Asset code is invalid (maximum alphanumeric, 12 characters at max)");if("xlm"!==String(t).toLowerCase()&&!r)throw new Error("Issuer cannot be null");if(r&&!T.isValidEd25519PublicKey(r))throw new Error("Issuer is invalid");"xlm"===String(t).toLowerCase()?this.code="XLM":this.code=t,this.issuer=r}return t=e,r=[{key:"toXDRObject",value:function(){return this._toXDRObject(i.Asset)}},{key:"toChangeTrustXDRObject",value:function(){return this._toXDRObject(i.ChangeTrustAsset)}},{key:"toTrustLineXDRObject",value:function(){return this._toXDRObject(i.TrustLineAsset)}},{key:"contractId",value:function(e){var t=u(N.from(e)),r=i.HashIdPreimage.envelopeTypeContractId(new i.HashIdPreimageContractId({networkId:t,contractIdPreimage:i.ContractIdPreimage.contractIdPreimageFromAsset(this.toXDRObject())}));return T.encodeContract(u(r.toXDR()))}},{key:"_toXDRObject",value:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.Asset;if(this.isNative())return r.assetTypeNative();this.code.length<=4?(e=i.AlphaNum4,t="assetTypeCreditAlphanum4"):(e=i.AlphaNum12,t="assetTypeCreditAlphanum12");var n=this.code.length<=4?4:12;return new r(t,new e({assetCode:this.code.padEnd(n,"\0"),issuer:U.fromPublicKey(this.issuer).xdrAccountId()}))}},{key:"getCode",value:function(){if(void 0!==this.code)return String(this.code)}},{key:"getIssuer",value:function(){if(void 0!==this.issuer)return String(this.issuer)}},{key:"getAssetType",value:function(){switch(this.getRawAssetType()){case i.AssetType.assetTypeNative():return"native";case i.AssetType.assetTypeCreditAlphanum4():return"credit_alphanum4";case i.AssetType.assetTypeCreditAlphanum12():return"credit_alphanum12";default:return"unknown"}}},{key:"getRawAssetType",value:function(){return this.isNative()?i.AssetType.assetTypeNative():this.code.length<=4?i.AssetType.assetTypeCreditAlphanum4():i.AssetType.assetTypeCreditAlphanum12()}},{key:"isNative",value:function(){return!this.issuer}},{key:"equals",value:function(e){return this.code===e.getCode()&&this.issuer===e.getIssuer()}},{key:"toString",value:function(){return this.isNative()?"native":"".concat(this.getCode(),":").concat(this.getIssuer())}}],n=[{key:"native",value:function(){return new e("XLM")}},{key:"fromOperation",value:function(e){var t,r;switch(e.switch()){case i.AssetType.assetTypeNative():return this.native();case i.AssetType.assetTypeCreditAlphanum4():t=e.alphaNum4();case i.AssetType.assetTypeCreditAlphanum12():return t=t||e.alphaNum12(),r=T.encodeEd25519PublicKey(t.issuer().ed25519()),new this(y(t.assetCode(),"\0"),r);default:throw new Error("Invalid asset type: ".concat(e.switch().name))}}},{key:"compare",value:function(t,r){if(!(t&&t instanceof e))throw new Error("assetA is invalid");if(!(r&&r instanceof e))throw new Error("assetB is invalid");if(t.equals(r))return 0;var n=t.getRawAssetType().value,o=r.getRawAssetType().value;if(n!==o)return n<o?-1:1;var i=D(t.getCode(),r.getCode());return 0!==i?i:D(t.getIssuer(),r.getIssuer())}}],r&&j(t.prototype,r),n&&j(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}();function D(e,t){return N.compare(N.from(e,"ascii"),N.from(t,"ascii"))}var V=r(3626).A,q=30;function K(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("constant_product"!==e)throw new Error("liquidityPoolType is invalid");var r=t.assetA,n=t.assetB,o=t.fee;if(!(r&&r instanceof F))throw new Error("assetA is invalid");if(!(n&&n instanceof F))throw new Error("assetB is invalid");if(!o||o!==q)throw new Error("fee is invalid");if(-1!==F.compare(r,n))throw new Error("Assets are not in lexicographic order");var a=i.LiquidityPoolType.liquidityPoolConstantProduct().toXDR(),s=new i.LiquidityPoolConstantProductParameters({assetA:r.toXDRObject(),assetB:n.toXDRObject(),fee:o}).toXDR();return u(V.concat([a,s]))}var H=r(3626).A;function z(e){return z="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},z(e)}function X(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$(n.key),n)}}function $(e){var t=function(e,t){if("object"!=z(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=z(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==z(t)?t:t+""}var W=function(){return e=function e(t,r,n,o){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"string"!=typeof o)throw new Error("Invalid passphrase provided to Transaction: expected a string but got a ".concat(z(o)));this._networkPassphrase=o,this._tx=t,this._signatures=r,this._fee=n},t=[{key:"signatures",get:function(){return this._signatures},set:function(e){throw new Error("Transaction is immutable")}},{key:"tx",get:function(){return this._tx},set:function(e){throw new Error("Transaction is immutable")}},{key:"fee",get:function(){return this._fee},set:function(e){throw new Error("Transaction is immutable")}},{key:"networkPassphrase",get:function(){return this._networkPassphrase},set:function(e){this._networkPassphrase=e}},{key:"sign",value:function(){for(var e=this,t=this.hash(),r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];n.forEach((function(r){var n=r.signDecorated(t);e.signatures.push(n)}))}},{key:"getKeypairSignature",value:function(e){return e.sign(this.hash()).toString("base64")}},{key:"addSignature",value:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!n||"string"!=typeof n)throw new Error("Invalid signature");if(!r||"string"!=typeof r)throw new Error("Invalid publicKey");var o=H.from(n,"base64");try{t=(e=U.fromPublicKey(r)).signatureHint()}catch(e){throw new Error("Invalid publicKey")}if(!e.verify(this.hash(),o))throw new Error("Invalid signature");this.signatures.push(new i.DecoratedSignature({hint:t,signature:o}))}},{key:"addDecoratedSignature",value:function(e){this.signatures.push(e)}},{key:"signHashX",value:function(e){if("string"==typeof e&&(e=H.from(e,"hex")),e.length>64)throw new Error("preimage cannnot be longer than 64 bytes");var t=e,r=u(e),n=r.slice(r.length-4);this.signatures.push(new i.DecoratedSignature({hint:n,signature:t}))}},{key:"hash",value:function(){return u(this.signatureBase())}},{key:"signatureBase",value:function(){throw new Error("Implement in subclass")}},{key:"toEnvelope",value:function(){throw new Error("Implement in subclass")}},{key:"toXDR",value:function(){return this.toEnvelope().toXDR().toString("base64")}}],t&&X(e.prototype,t),r&&X(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}(),G=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Y=Math.ceil,J=Math.floor,Z="[BigNumber Error] ",Q=Z+"Number primitive has more than 15 significant digits: ",ee=1e14,te=14,re=9007199254740991,ne=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],oe=1e7,ie=1e9;function ae(e){var t=0|e;return e>0||e===t?t:t-1}function se(e){for(var t,r,n=1,o=e.length,i=e[0]+"";n<o;){for(t=e[n++]+"",r=te-t.length;r--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function ue(e,t){var r,n,o=e.c,i=t.c,a=e.s,s=t.s,u=e.e,c=t.e;if(!a||!s)return null;if(r=o&&!o[0],n=i&&!i[0],r||n)return r?n?0:-s:a;if(a!=s)return a;if(r=a<0,n=u==c,!o||!i)return n?0:!o^r?1:-1;if(!n)return u>c^r?1:-1;for(s=(u=o.length)<(c=i.length)?u:c,a=0;a<s;a++)if(o[a]!=i[a])return o[a]>i[a]^r?1:-1;return u==c?0:u>c^r?1:-1}function ce(e,t,r,n){if(e<t||e>r||e!==J(e))throw Error(Z+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function le(e){var t=e.c.length-1;return ae(e.e/te)==t&&e.c[t]%2!=0}function fe(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function pe(e,t,r){var n,o;if(t<0){for(o=r+".";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var he=function e(t){var r,n,o,i,a,s,u,c,l,f,p=O.prototype={constructor:O,toString:null,valueOf:null},h=new O(1),d=20,y=4,m=-7,g=21,v=-1e7,b=1e7,w=!1,S=1,k=0,E={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xa0",suffix:""},A="0123456789abcdefghijklmnopqrstuvwxyz",T=!0;function O(e,t){var r,i,a,s,u,c,l,f,p=this;if(!(p instanceof O))return new O(e,t);if(null==t){if(e&&!0===e._isBigNumber)return p.s=e.s,void(!e.c||e.e>b?p.c=p.e=null:e.e<v?p.c=[p.e=0]:(p.e=e.e,p.c=e.c.slice()));if((c="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,u=e;u>=10;u/=10,s++);return void(s>b?p.c=p.e=null:(p.e=s,p.c=[e]))}f=String(e)}else{if(!G.test(f=String(e)))return o(p,f,c);p.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(s=f.indexOf("."))>-1&&(f=f.replace(".","")),(u=f.search(/e/i))>0?(s<0&&(s=u),s+=+f.slice(u+1),f=f.substring(0,u)):s<0&&(s=f.length)}else{if(ce(t,2,A.length,"Base"),10==t&&T)return _(p=new O(e),d+p.e+1,y);if(f=String(e),c="number"==typeof e){if(0*e!=0)return o(p,f,c,t);if(p.s=1/e<0?(f=f.slice(1),-1):1,O.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(Q+e)}else p.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(r=A.slice(0,t),s=u=0,l=f.length;u<l;u++)if(r.indexOf(i=f.charAt(u))<0){if("."==i){if(u>s){s=l;continue}}else if(!a&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){a=!0,u=-1,s=0;continue}return o(p,String(e),c,t)}c=!1,(s=(f=n(f,t,10,p.s)).indexOf("."))>-1?f=f.replace(".",""):s=f.length}for(u=0;48===f.charCodeAt(u);u++);for(l=f.length;48===f.charCodeAt(--l););if(f=f.slice(u,++l)){if(l-=u,c&&O.DEBUG&&l>15&&(e>re||e!==J(e)))throw Error(Q+p.s*e);if((s=s-u-1)>b)p.c=p.e=null;else if(s<v)p.c=[p.e=0];else{if(p.e=s,p.c=[],u=(s+1)%te,s<0&&(u+=te),u<l){for(u&&p.c.push(+f.slice(0,u)),l-=te;u<l;)p.c.push(+f.slice(u,u+=te));u=te-(f=f.slice(u)).length}else u-=l;for(;u--;f+="0");p.c.push(+f)}}else p.c=[p.e=0]}function P(e,t,r,n){var o,i,a,s,u;if(null==r?r=y:ce(r,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)u=se(e.c),u=1==n||2==n&&(a<=m||a>=g)?fe(u,a):pe(u,a,"0");else if(i=(e=_(new O(e),t,r)).e,s=(u=se(e.c)).length,1==n||2==n&&(t<=i||i<=m)){for(;s<t;u+="0",s++);u=fe(u,i)}else if(t-=a,u=pe(u,i,"0"),i+1>s){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=i-s)>0)for(i+1==s&&(u+=".");t--;u+="0");return e.s<0&&o?"-"+u:u}function x(e,t){for(var r,n,o=1,i=new O(e[0]);o<e.length;o++)(!(n=new O(e[o])).s||(r=ue(i,n))===t||0===r&&i.s===t)&&(i=n);return i}function I(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,n++);return(r=n+r*te-1)>b?e.c=e.e=null:r<v?e.c=[e.e=0]:(e.e=r,e.c=t),e}function _(e,t,r,n){var o,i,a,s,u,c,l,f=e.c,p=ne;if(f){e:{for(o=1,s=f[0];s>=10;s/=10,o++);if((i=t-o)<0)i+=te,a=t,u=f[c=0],l=J(u/p[o-a-1]%10);else if((c=Y((i+1)/te))>=f.length){if(!n)break e;for(;f.length<=c;f.push(0));u=l=0,o=1,a=(i%=te)-te+1}else{for(u=s=f[c],o=1;s>=10;s/=10,o++);l=(a=(i%=te)-te+o)<0?0:J(u/p[o-a-1]%10)}if(n=n||t<0||null!=f[c+1]||(a<0?u:u%p[o-a-1]),n=r<4?(l||n)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||n||6==r&&(i>0?a>0?u/p[o-a]:0:f[c-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,n?(t-=e.e+1,f[0]=p[(te-t%te)%te],e.e=-t||0):f[0]=e.e=0,e;if(0==i?(f.length=c,s=1,c--):(f.length=c+1,s=p[te-i],f[c]=a>0?J(u/p[o-a]%p[a])*s:0),n)for(;;){if(0==c){for(i=1,a=f[0];a>=10;a/=10,i++);for(a=f[0]+=s,s=1;a>=10;a/=10,s++);i!=s&&(e.e++,f[0]==ee&&(f[0]=1));break}if(f[c]+=s,f[c]!=ee)break;f[c--]=0,s=1}for(i=f.length;0===f[--i];f.pop());}e.e>b?e.c=e.e=null:e.e<v&&(e.c=[e.e=0])}return e}function B(e){var t,r=e.e;return null===r?e.toString():(t=se(e.c),t=r<=m||r>=g?fe(t,r):pe(t,r,"0"),e.s<0?"-"+t:t)}return O.clone=e,O.ROUND_UP=0,O.ROUND_DOWN=1,O.ROUND_CEIL=2,O.ROUND_FLOOR=3,O.ROUND_HALF_UP=4,O.ROUND_HALF_DOWN=5,O.ROUND_HALF_EVEN=6,O.ROUND_HALF_CEIL=7,O.ROUND_HALF_FLOOR=8,O.EUCLID=9,O.config=O.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(Z+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(ce(r=e[t],0,ie,t),d=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(ce(r=e[t],0,8,t),y=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(ce(r[0],-ie,0,t),ce(r[1],0,ie,t),m=r[0],g=r[1]):(ce(r,-ie,ie,t),m=-(g=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)ce(r[0],-ie,-1,t),ce(r[1],1,ie,t),v=r[0],b=r[1];else{if(ce(r,-ie,ie,t),!r)throw Error(Z+t+" cannot be zero: "+r);v=-(b=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(Z+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw w=!r,Error(Z+"crypto unavailable");w=r}else w=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(ce(r=e[t],0,9,t),S=r),e.hasOwnProperty(t="POW_PRECISION")&&(ce(r=e[t],0,ie,t),k=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(Z+t+" not an object: "+r);E=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(Z+t+" invalid: "+r);T="0123456789"==r.slice(0,10),A=r}}return{DECIMAL_PLACES:d,ROUNDING_MODE:y,EXPONENTIAL_AT:[m,g],RANGE:[v,b],CRYPTO:w,MODULO_MODE:S,POW_PRECISION:k,FORMAT:E,ALPHABET:A}},O.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!O.DEBUG)return!0;var t,r,n=e.c,o=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===i||-1===i)&&o>=-ie&&o<=ie&&o===J(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%te)<1&&(t+=te),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=ee||r!==J(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===i||1===i||-1===i))return!0;throw Error(Z+"Invalid BigNumber: "+e)},O.maximum=O.max=function(){return x(arguments,-1)},O.minimum=O.min=function(){return x(arguments,1)},O.random=(i=9007199254740992,a=Math.random()*i&2097151?function(){return J(Math.random()*i)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,o,i,s=0,u=[],c=new O(h);if(null==e?e=d:ce(e,0,ie),o=Y(e/te),w)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));s<o;)(i=131072*t[s]+(t[s+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(u.push(i%1e14),s+=2);s=o/2}else{if(!crypto.randomBytes)throw w=!1,Error(Z+"crypto unavailable");for(t=crypto.randomBytes(o*=7);s<o;)(i=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])>=9e15?crypto.randomBytes(7).copy(t,s):(u.push(i%1e14),s+=7);s=o/7}if(!w)for(;s<o;)(i=a())<9e15&&(u[s++]=i%1e14);for(o=u[--s],e%=te,o&&e&&(i=ne[te-e],u[s]=J(o/i)*i);0===u[s];u.pop(),s--);if(s<0)u=[n=0];else{for(n=-1;0===u[0];u.splice(0,1),n-=te);for(s=1,i=u[0];i>=10;i/=10,s++);s<te&&(n-=te-s)}return c.e=n,c.c=u,c}),O.sum=function(){for(var e=1,t=arguments,r=new O(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){var e="0123456789";function t(e,t,r,n){for(var o,i,a=[0],s=0,u=e.length;s<u;){for(i=a.length;i--;a[i]*=t);for(a[0]+=n.indexOf(e.charAt(s++)),o=0;o<a.length;o++)a[o]>r-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/r|0,a[o]%=r)}return a.reverse()}return function(n,o,i,a,s){var u,c,l,f,p,h,m,g,v=n.indexOf("."),b=d,w=y;for(v>=0&&(f=k,k=0,n=n.replace(".",""),h=(g=new O(o)).pow(n.length-v),k=f,g.c=t(pe(se(h.c),h.e,"0"),10,i,e),g.e=g.c.length),l=f=(m=t(n,o,i,s?(u=A,e):(u=e,A))).length;0==m[--f];m.pop());if(!m[0])return u.charAt(0);if(v<0?--l:(h.c=m,h.e=l,h.s=a,m=(h=r(h,g,b,w,i)).c,p=h.r,l=h.e),v=m[c=l+b+1],f=i/2,p=p||c<0||null!=m[c+1],p=w<4?(null!=v||p)&&(0==w||w==(h.s<0?3:2)):v>f||v==f&&(4==w||p||6==w&&1&m[c-1]||w==(h.s<0?8:7)),c<1||!m[0])n=p?pe(u.charAt(1),-b,u.charAt(0)):u.charAt(0);else{if(m.length=c,p)for(--i;++m[--c]>i;)m[c]=0,c||(++l,m=[1].concat(m));for(f=m.length;!m[--f];);for(v=0,n="";v<=f;n+=u.charAt(m[v++]));n=pe(n,l,u.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,o,i,a,s=0,u=e.length,c=t%oe,l=t/oe|0;for(e=e.slice();u--;)s=((o=c*(i=e[u]%oe)+(n=l*i+(a=e[u]/oe|0)*c)%oe*oe+s)/r|0)+(n/oe|0)+l*a,e[u]=o%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var o,i;if(r!=n)i=r>n?1:-1;else for(o=i=0;o<r;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]<t[r]?1:0,e[r]=o*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,o,i,a,s){var u,c,l,f,p,h,d,y,m,g,v,b,w,S,k,E,A,T=n.s==o.s?1:-1,P=n.c,x=o.c;if(!(P&&P[0]&&x&&x[0]))return new O(n.s&&o.s&&(P?!x||P[0]!=x[0]:x)?P&&0==P[0]||!x?0*T:T/0:NaN);for(m=(y=new O(T)).c=[],T=i+(c=n.e-o.e)+1,s||(s=ee,c=ae(n.e/te)-ae(o.e/te),T=T/te|0),l=0;x[l]==(P[l]||0);l++);if(x[l]>(P[l]||0)&&c--,T<0)m.push(1),f=!0;else{for(S=P.length,E=x.length,l=0,T+=2,(p=J(s/(x[0]+1)))>1&&(x=e(x,p,s),P=e(P,p,s),E=x.length,S=P.length),w=E,v=(g=P.slice(0,E)).length;v<E;g[v++]=0);A=x.slice(),A=[0].concat(A),k=x[0],x[1]>=s/2&&k++;do{if(p=0,(u=t(x,g,E,v))<0){if(b=g[0],E!=v&&(b=b*s+(g[1]||0)),(p=J(b/k))>1)for(p>=s&&(p=s-1),d=(h=e(x,p,s)).length,v=g.length;1==t(h,g,d,v);)p--,r(h,E<d?A:x,d,s),d=h.length,u=1;else 0==p&&(u=p=1),d=(h=x.slice()).length;if(d<v&&(h=[0].concat(h)),r(g,h,v,s),v=g.length,-1==u)for(;t(x,g,E,v)<1;)p++,r(g,E<v?A:x,v,s),v=g.length}else 0===u&&(p++,g=[0]);m[l++]=p,g[0]?g[v++]=P[w]||0:(g=[P[w]],v=1)}while((w++<S||null!=g[0])&&T--);f=null!=g[0],m[0]||m.splice(0,1)}if(s==ee){for(l=1,T=m[0];T>=10;T/=10,l++);_(y,i+(y.e=l+c*te-1)+1,a,f)}else y.e=c,y.r=+f;return y}}(),s=/^(-?)0([xbo])(?=\w[\w.]*$)/i,u=/^([^.]+)\.$/,c=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,f=/^\s*\+(?=[\w.])|^\s+|\s+$/g,o=function(e,t,r,n){var o,i=r?t:t.replace(f,"");if(l.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!r&&(i=i.replace(s,(function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t})),n&&(o=n,i=i.replace(u,"$1").replace(c,"0.$1")),t!=i))return new O(i,o);if(O.DEBUG)throw Error(Z+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},p.absoluteValue=p.abs=function(){var e=new O(this);return e.s<0&&(e.s=1),e},p.comparedTo=function(e,t){return ue(this,new O(e,t))},p.decimalPlaces=p.dp=function(e,t){var r,n,o,i=this;if(null!=e)return ce(e,0,ie),null==t?t=y:ce(t,0,8),_(new O(i),e+i.e+1,t);if(!(r=i.c))return null;if(n=((o=r.length-1)-ae(this.e/te))*te,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},p.dividedBy=p.div=function(e,t){return r(this,new O(e,t),d,y)},p.dividedToIntegerBy=p.idiv=function(e,t){return r(this,new O(e,t),0,1)},p.exponentiatedBy=p.pow=function(e,t){var r,n,o,i,a,s,u,c,l=this;if((e=new O(e)).c&&!e.isInteger())throw Error(Z+"Exponent not an integer: "+B(e));if(null!=t&&(t=new O(t)),a=e.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!e.c||!e.c[0])return c=new O(Math.pow(+B(l),a?e.s*(2-le(e)):+B(e))),t?c.mod(t):c;if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new O(NaN);(n=!s&&l.isInteger()&&t.isInteger())&&(l=l.mod(t))}else{if(e.e>9&&(l.e>0||l.e<-1||(0==l.e?l.c[0]>1||a&&l.c[1]>=24e7:l.c[0]<8e13||a&&l.c[0]<=9999975e7)))return i=l.s<0&&le(e)?-0:0,l.e>-1&&(i=1/i),new O(s?1/i:i);k&&(i=Y(k/te+2))}for(a?(r=new O(.5),s&&(e.s=1),u=le(e)):u=(o=Math.abs(+B(e)))%2,c=new O(h);;){if(u){if(!(c=c.times(l)).c)break;i?c.c.length>i&&(c.c.length=i):n&&(c=c.mod(t))}if(o){if(0===(o=J(o/2)))break;u=o%2}else if(_(e=e.times(r),e.e+1,1),e.e>14)u=le(e);else{if(0===(o=+B(e)))break;u=o%2}l=l.times(l),i?l.c&&l.c.length>i&&(l.c.length=i):n&&(l=l.mod(t))}return n?c:(s&&(c=h.div(c)),t?c.mod(t):i?_(c,k,y,undefined):c)},p.integerValue=function(e){var t=new O(this);return null==e?e=y:ce(e,0,8),_(t,t.e+1,e)},p.isEqualTo=p.eq=function(e,t){return 0===ue(this,new O(e,t))},p.isFinite=function(){return!!this.c},p.isGreaterThan=p.gt=function(e,t){return ue(this,new O(e,t))>0},p.isGreaterThanOrEqualTo=p.gte=function(e,t){return 1===(t=ue(this,new O(e,t)))||0===t},p.isInteger=function(){return!!this.c&&ae(this.e/te)>this.c.length-2},p.isLessThan=p.lt=function(e,t){return ue(this,new O(e,t))<0},p.isLessThanOrEqualTo=p.lte=function(e,t){return-1===(t=ue(this,new O(e,t)))||0===t},p.isNaN=function(){return!this.s},p.isNegative=function(){return this.s<0},p.isPositive=function(){return this.s>0},p.isZero=function(){return!!this.c&&0==this.c[0]},p.minus=function(e,t){var r,n,o,i,a=this,s=a.s;if(t=(e=new O(e,t)).s,!s||!t)return new O(NaN);if(s!=t)return e.s=-t,a.plus(e);var u=a.e/te,c=e.e/te,l=a.c,f=e.c;if(!u||!c){if(!l||!f)return l?(e.s=-t,e):new O(f?a:NaN);if(!l[0]||!f[0])return f[0]?(e.s=-t,e):new O(l[0]?a:3==y?-0:0)}if(u=ae(u),c=ae(c),l=l.slice(),s=u-c){for((i=s<0)?(s=-s,o=l):(c=u,o=f),o.reverse(),t=s;t--;o.push(0));o.reverse()}else for(n=(i=(s=l.length)<(t=f.length))?s:t,s=t=0;t<n;t++)if(l[t]!=f[t]){i=l[t]<f[t];break}if(i&&(o=l,l=f,f=o,e.s=-e.s),(t=(n=f.length)-(r=l.length))>0)for(;t--;l[r++]=0);for(t=ee-1;n>s;){if(l[--n]<f[n]){for(r=n;r&&!l[--r];l[r]=t);--l[r],l[n]+=ee}l[n]-=f[n]}for(;0==l[0];l.splice(0,1),--c);return l[0]?I(e,l,c):(e.s=3==y?-1:1,e.c=[e.e=0],e)},p.modulo=p.mod=function(e,t){var n,o,i=this;return e=new O(e,t),!i.c||!e.s||e.c&&!e.c[0]?new O(NaN):!e.c||i.c&&!i.c[0]?new O(i):(9==S?(o=e.s,e.s=1,n=r(i,e,0,3),e.s=o,n.s*=o):n=r(i,e,0,S),(e=i.minus(n.times(e))).c[0]||1!=S||(e.s=i.s),e)},p.multipliedBy=p.times=function(e,t){var r,n,o,i,a,s,u,c,l,f,p,h,d,y,m,g=this,v=g.c,b=(e=new O(e,t)).c;if(!(v&&b&&v[0]&&b[0]))return!g.s||!e.s||v&&!v[0]&&!b||b&&!b[0]&&!v?e.c=e.e=e.s=null:(e.s*=g.s,v&&b?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=ae(g.e/te)+ae(e.e/te),e.s*=g.s,(u=v.length)<(f=b.length)&&(d=v,v=b,b=d,o=u,u=f,f=o),o=u+f,d=[];o--;d.push(0));for(y=ee,m=oe,o=f;--o>=0;){for(r=0,p=b[o]%m,h=b[o]/m|0,i=o+(a=u);i>o;)r=((c=p*(c=v[--a]%m)+(s=h*c+(l=v[a]/m|0)*p)%m*m+d[i]+r)/y|0)+(s/m|0)+h*l,d[i--]=c%y;d[i]=r}return r?++n:d.splice(0,1),I(e,d,n)},p.negated=function(){var e=new O(this);return e.s=-e.s||null,e},p.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new O(e,t)).s,!o||!t)return new O(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/te,a=e.e/te,s=n.c,u=e.c;if(!i||!a){if(!s||!u)return new O(o/0);if(!s[0]||!u[0])return u[0]?e:new O(s[0]?n:0*o)}if(i=ae(i),a=ae(a),s=s.slice(),o=i-a){for(o>0?(a=i,r=u):(o=-o,r=s),r.reverse();o--;r.push(0));r.reverse()}for((o=s.length)-(t=u.length)<0&&(r=u,u=s,s=r,t=o),o=0;t;)o=(s[--t]=s[t]+u[t]+o)/ee|0,s[t]=ee===s[t]?0:s[t]%ee;return o&&(s=[o].concat(s),++a),I(e,s,a)},p.precision=p.sd=function(e,t){var r,n,o,i=this;if(null!=e&&e!==!!e)return ce(e,1,ie),null==t?t=y:ce(t,0,8),_(new O(i),e,t);if(!(r=i.c))return null;if(n=(o=r.length-1)*te+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&i.e+1>n&&(n=i.e+1),n},p.shiftedBy=function(e){return ce(e,-9007199254740991,re),this.times("1e"+e)},p.squareRoot=p.sqrt=function(){var e,t,n,o,i,a=this,s=a.c,u=a.s,c=a.e,l=d+4,f=new O("0.5");if(1!==u||!s||!s[0])return new O(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(u=Math.sqrt(+B(a)))||u==1/0?(((t=se(s)).length+c)%2==0&&(t+="0"),u=Math.sqrt(+t),c=ae((c+1)/2)-(c<0||c%2),n=new O(t=u==1/0?"5e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new O(u+""),n.c[0])for((u=(c=n.e)+l)<3&&(u=0);;)if(i=n,n=f.times(i.plus(r(a,i,l,1))),se(i.c).slice(0,u)===(t=se(n.c)).slice(0,u)){if(n.e<c&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(o||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(_(n,n.e+d+2,1),e=!n.times(n).eq(a));break}if(!o&&(_(i,i.e+d+2,0),i.times(i).eq(a))){n=i;break}l+=4,u+=4,o=1}return _(n,n.e+d+1,y,e)},p.toExponential=function(e,t){return null!=e&&(ce(e,0,ie),e++),P(this,e,t,1)},p.toFixed=function(e,t){return null!=e&&(ce(e,0,ie),e=e+this.e+1),P(this,e,t)},p.toFormat=function(e,t,r){var n,o=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=E;else if("object"!=typeof r)throw Error(Z+"Argument not an object: "+r);if(n=o.toFixed(e,t),o.c){var i,a=n.split("."),s=+r.groupSize,u=+r.secondaryGroupSize,c=r.groupSeparator||"",l=a[0],f=a[1],p=o.s<0,h=p?l.slice(1):l,d=h.length;if(u&&(i=s,s=u,u=i,d-=i),s>0&&d>0){for(i=d%s||s,l=h.substr(0,i);i<d;i+=s)l+=c+h.substr(i,s);u>0&&(l+=c+h.slice(i)),p&&(l="-"+l)}n=f?l+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?f.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):f):l}return(r.prefix||"")+n+(r.suffix||"")},p.toFraction=function(e){var t,n,o,i,a,s,u,c,l,f,p,d,m=this,g=m.c;if(null!=e&&(!(u=new O(e)).isInteger()&&(u.c||1!==u.s)||u.lt(h)))throw Error(Z+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+B(u));if(!g)return new O(m);for(t=new O(h),l=n=new O(h),o=c=new O(h),d=se(g),a=t.e=d.length-m.e-1,t.c[0]=ne[(s=a%te)<0?te+s:s],e=!e||u.comparedTo(t)>0?a>0?t:l:u,s=b,b=1/0,u=new O(d),c.c[0]=0;f=r(u,t,0,1),1!=(i=n.plus(f.times(o))).comparedTo(e);)n=o,o=i,l=c.plus(f.times(i=l)),c=i,t=u.minus(f.times(i=t)),u=i;return i=r(e.minus(n),o,0,1),c=c.plus(i.times(l)),n=n.plus(i.times(o)),c.s=l.s=m.s,p=r(l,o,a*=2,y).minus(m).abs().comparedTo(r(c,n,a,y).minus(m).abs())<1?[l,o]:[c,n],b=s,p},p.toNumber=function(){return+B(this)},p.toPrecision=function(e,t){return null!=e&&ce(e,1,ie),P(this,e,t,2)},p.toString=function(e){var t,r=this,o=r.s,i=r.e;return null===i?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(null==e?t=i<=m||i>=g?fe(se(r.c),i):pe(se(r.c),i,"0"):10===e&&T?t=pe(se((r=_(new O(r),d+i+1,y)).c),r.e,"0"):(ce(e,2,A.length,"Base"),t=n(pe(se(r.c),i,"0"),10,e,o,!0)),o<0&&r.c[0]&&(t="-"+t)),t},p.valueOf=p.toJSON=function(){return B(this)},p._isBigNumber=!0,p[Symbol.toStringTag]="BigNumber",p[Symbol.for("nodejs.util.inspect.custom")]=p.valueOf,null!=t&&O.set(t),O}();var de=he.clone();de.DEBUG=!0;const ye=de;function me(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ge(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ge(e,t):void 0}}(e,t)||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.")}()}function ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var ve=2147483647;function be(e){return be="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},be(e)}function we(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Se(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?we(Object(r),!0).forEach((function(t){ke(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):we(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ke(e,t,r){return(t=Ae(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ee(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ae(n.key),n)}}function Ae(e){var t=function(e,t){if("object"!=be(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==be(t)?t:t+""}var Te=function(){return e=function e(t,r,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!(t&&t instanceof F))throw new Error("assetA is invalid");if(!(r&&r instanceof F))throw new Error("assetB is invalid");if(-1!==F.compare(t,r))throw new Error("Assets are not in lexicographic order");if(!n||n!==q)throw new Error("fee is invalid");this.assetA=t,this.assetB=r,this.fee=n},r=[{key:"fromOperation",value:function(e){var t=e.switch();if(t===i.AssetType.assetTypePoolShare()){var r=e.liquidityPool().constantProduct();return new this(F.fromOperation(r.assetA()),F.fromOperation(r.assetB()),r.fee())}throw new Error("Invalid asset type: ".concat(t.name))}}],(t=[{key:"toXDRObject",value:function(){var e=new i.LiquidityPoolConstantProductParameters({assetA:this.assetA.toXDRObject(),assetB:this.assetB.toXDRObject(),fee:this.fee}),t=new i.LiquidityPoolParameters("liquidityPoolConstantProduct",e);return new i.ChangeTrustAsset("assetTypePoolShare",t)}},{key:"getLiquidityPoolParameters",value:function(){return Se(Se({},this),{},{assetA:this.assetA,assetB:this.assetB,fee:this.fee})}},{key:"getAssetType",value:function(){return"liquidity_pool_shares"}},{key:"equals",value:function(e){return this.assetA.equals(e.assetA)&&this.assetB.equals(e.assetB)&&this.fee===e.fee}},{key:"toString",value:function(){var e=K("constant_product",this.getLiquidityPoolParameters()).toString("hex");return"liquidity_pool:".concat(e)}}])&&Ee(e.prototype,t),r&&Ee(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function Oe(e){return Oe="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},Oe(e)}function Pe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,xe(n.key),n)}}function xe(e){var t=function(e,t){if("object"!=Oe(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Oe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Oe(t)?t:t+""}var Ie=function(){return e=function e(t,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&!T.isValidEd25519PublicKey(t))throw new Error("Destination is invalid");if(this._destination=t,r){if(!(r instanceof i.ClaimPredicate))throw new Error("Predicate should be an xdr.ClaimPredicate");this._predicate=r}else this._predicate=i.ClaimPredicate.claimPredicateUnconditional()},r=[{key:"predicateUnconditional",value:function(){return i.ClaimPredicate.claimPredicateUnconditional()}},{key:"predicateAnd",value:function(e,t){if(!(e instanceof i.ClaimPredicate))throw new Error("left Predicate should be an xdr.ClaimPredicate");if(!(t instanceof i.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return i.ClaimPredicate.claimPredicateAnd([e,t])}},{key:"predicateOr",value:function(e,t){if(!(e instanceof i.ClaimPredicate))throw new Error("left Predicate should be an xdr.ClaimPredicate");if(!(t instanceof i.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return i.ClaimPredicate.claimPredicateOr([e,t])}},{key:"predicateNot",value:function(e){if(!(e instanceof i.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return i.ClaimPredicate.claimPredicateNot(e)}},{key:"predicateBeforeAbsoluteTime",value:function(e){return i.ClaimPredicate.claimPredicateBeforeAbsoluteTime(i.Int64.fromString(e))}},{key:"predicateBeforeRelativeTime",value:function(e){return i.ClaimPredicate.claimPredicateBeforeRelativeTime(i.Int64.fromString(e))}},{key:"fromXDR",value:function(e){var t;if(e.switch()===i.ClaimantType.claimantTypeV0())return t=e.v0(),new this(T.encodeEd25519PublicKey(t.destination().ed25519()),t.predicate());throw new Error("Invalid claimant type: ".concat(e.switch().name))}}],(t=[{key:"toXDRObject",value:function(){var e=new i.ClaimantV0({destination:U.fromPublicKey(this._destination).xdrAccountId(),predicate:this._predicate});return i.Claimant.claimantTypeV0(e)}},{key:"destination",get:function(){return this._destination},set:function(e){throw new Error("Claimant is immutable")}},{key:"predicate",get:function(){return this._predicate},set:function(e){throw new Error("Claimant is immutable")}}])&&Pe(e.prototype,t),r&&Pe(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function _e(e){return _e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_e(e)}function Be(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Re(n.key),n)}}function Re(e){var t=function(e,t){if("object"!=_e(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=_e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==_e(t)?t:t+""}var Ce=function(){return e=function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new Error("liquidityPoolId cannot be empty");if(!/^[a-f0-9]{64}$/.test(t))throw new Error("Liquidity pool ID is not a valid hash");this.liquidityPoolId=t},r=[{key:"fromOperation",value:function(e){var t=e.switch();if(t===i.AssetType.assetTypePoolShare())return new this(e.liquidityPoolId().toString("hex"));throw new Error("Invalid asset type: ".concat(t.name))}}],(t=[{key:"toXDRObject",value:function(){var e=i.PoolId.fromXDR(this.liquidityPoolId,"hex");return new i.TrustLineAsset("assetTypePoolShare",e)}},{key:"getLiquidityPoolId",value:function(){return String(this.liquidityPoolId)}},{key:"getAssetType",value:function(){return"liquidity_pool_shares"}},{key:"equals",value:function(e){return this.liquidityPoolId===e.getLiquidityPoolId()}},{key:"toString",value:function(){return"liquidity_pool:".concat(this.liquidityPoolId)}}])&&Be(e.prototype,t),r&&Be(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();var Ue=r(3626).A;function Ne(e){return T.isValidMed25519PublicKey(e)?function(e){var t=T.decodeMed25519PublicKey(e);return i.MuxedAccount.keyTypeMuxedEd25519(new i.MuxedAccountMed25519({id:i.Uint64.fromXDR(t.subarray(-8)),ed25519:t.subarray(0,-8)}))}(e):i.MuxedAccount.keyTypeEd25519(T.decodeEd25519PublicKey(e))}function Le(e){return e.switch().value===i.CryptoKeyType.keyTypeMuxedEd25519().value?function(e){if(e.switch()===i.CryptoKeyType.keyTypeEd25519())return Le(e);var t=e.med25519();return T.encodeMed25519PublicKey(Ue.concat([t.ed25519(),t.id().toXDR("raw")]))}(e):T.encodeEd25519PublicKey(e.ed25519())}function je(e,t){if(!T.isValidEd25519PublicKey(e))throw new Error("address should be a Stellar account ID (G...)");if("string"!=typeof t)throw new Error("id should be a string representing a number (uint64)");return i.MuxedAccount.keyTypeMuxedEd25519(new i.MuxedAccountMed25519({id:i.Uint64.fromString(t),ed25519:T.decodeEd25519PublicKey(e)}))}function Me(e){if(T.isValidEd25519PublicKey(e))return e;if(!T.isValidMed25519PublicKey(e))throw new TypeError("expected muxed account (M...), got ".concat(e));var t=Ne(e);return T.encodeEd25519PublicKey(t.med25519().ed25519())}function Fe(e){if("string"!=typeof e||72!==e.length)throw new Error("must provide a valid claimable balance id")}var De=r(3626).A;var Ve=r(3626).A;function qe(e,t){if(e>=0&&e<=255)return!0;throw new Error("".concat(t," value must be between 0 and 255"))}var Ke=r(3626).A;function He(e){return He="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},He(e)}function ze(e){return ze="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},ze(e)}function Xe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$e(n.key),n)}}function $e(e){var t=function(e,t){if("object"!=ze(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=ze(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ze(t)?t:t+""}var We=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),T.isValidEd25519PublicKey(t))this._type="account",this._key=T.decodeEd25519PublicKey(t);else{if(!T.isValidContract(t))throw new Error("Unsupported address type");this._type="contract",this._key=T.decodeContract(t)}}return t=e,n=[{key:"fromString",value:function(t){return new e(t)}},{key:"account",value:function(t){return new e(T.encodeEd25519PublicKey(t))}},{key:"contract",value:function(t){return new e(T.encodeContract(t))}},{key:"fromScVal",value:function(t){return e.fromScAddress(t.address())}},{key:"fromScAddress",value:function(t){switch(t.switch()){case i.ScAddressType.scAddressTypeAccount():return e.account(t.accountId().ed25519());case i.ScAddressType.scAddressTypeContract():return e.contract(t.contractId());default:throw new Error("Unsupported address type")}}}],(r=[{key:"toString",value:function(){switch(this._type){case"account":return T.encodeEd25519PublicKey(this._key);case"contract":return T.encodeContract(this._key);default:throw new Error("Unsupported address type")}}},{key:"toScVal",value:function(){return i.ScVal.scvAddress(this.toScAddress())}},{key:"toScAddress",value:function(){switch(this._type){case"account":return i.ScAddress.scAddressTypeAccount(i.PublicKey.publicKeyTypeEd25519(this._key));case"contract":return i.ScAddress.scAddressTypeContract(this._key);default:throw new Error("Unsupported address type")}}},{key:"toBuffer",value:function(){return this._key}}])&&Xe(t.prototype,r),n&&Xe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}(),Ge=r(3626).A;function Ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Je(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Je(e,t):void 0}}(e,t)||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.")}()}function Je(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Ze(e){return Ze="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},Ze(e)}function Qe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,et(n.key),n)}}function et(e){var t=function(e,t){if("object"!=Ze(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Ze(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ze(t)?t:t+""}var tt=1e7,rt=1,nt=2,ot=4,it=8,at=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},r=[{key:"setSourceAccount",value:function(e,t){if(t.source)try{e.sourceAccount=Ne(t.source)}catch(e){throw new Error("Source address is invalid")}}},{key:"fromXDRObject",value:function(e){var t={};e.sourceAccount()&&(t.source=Le(e.sourceAccount()));var r=e.body().value(),n=e.body().switch().name;switch(n){case"createAccount":t.type="createAccount",t.destination=st(r.destination()),t.startingBalance=this._fromXDRAmount(r.startingBalance());break;case"payment":t.type="payment",t.destination=Le(r.destination()),t.asset=F.fromOperation(r.asset()),t.amount=this._fromXDRAmount(r.amount());break;case"pathPaymentStrictReceive":t.type="pathPaymentStrictReceive",t.sendAsset=F.fromOperation(r.sendAsset()),t.sendMax=this._fromXDRAmount(r.sendMax()),t.destination=Le(r.destination()),t.destAsset=F.fromOperation(r.destAsset()),t.destAmount=this._fromXDRAmount(r.destAmount()),t.path=[];var o=r.path();Object.keys(o).forEach((function(e){t.path.push(F.fromOperation(o[e]))}));break;case"pathPaymentStrictSend":t.type="pathPaymentStrictSend",t.sendAsset=F.fromOperation(r.sendAsset()),t.sendAmount=this._fromXDRAmount(r.sendAmount()),t.destination=Le(r.destination()),t.destAsset=F.fromOperation(r.destAsset()),t.destMin=this._fromXDRAmount(r.destMin()),t.path=[];var a=r.path();Object.keys(a).forEach((function(e){t.path.push(F.fromOperation(a[e]))}));break;case"changeTrust":t.type="changeTrust",r.line().switch()===i.AssetType.assetTypePoolShare()?t.line=Te.fromOperation(r.line()):t.line=F.fromOperation(r.line()),t.limit=this._fromXDRAmount(r.limit());break;case"allowTrust":t.type="allowTrust",t.trustor=st(r.trustor()),t.assetCode=r.asset().value().toString(),t.assetCode=y(t.assetCode,"\0"),t.authorize=r.authorize();break;case"setOptions":if(t.type="setOptions",r.inflationDest()&&(t.inflationDest=st(r.inflationDest())),t.clearFlags=r.clearFlags(),t.setFlags=r.setFlags(),t.masterWeight=r.masterWeight(),t.lowThreshold=r.lowThreshold(),t.medThreshold=r.medThreshold(),t.highThreshold=r.highThreshold(),t.homeDomain=void 0!==r.homeDomain()?r.homeDomain().toString("ascii"):void 0,r.signer()){var s={},u=r.signer().key().arm();if("ed25519"===u)s.ed25519PublicKey=st(r.signer().key());else if("preAuthTx"===u)s.preAuthTx=r.signer().key().preAuthTx();else if("hashX"===u)s.sha256Hash=r.signer().key().hashX();else if("ed25519SignedPayload"===u){var c=r.signer().key().ed25519SignedPayload();s.ed25519SignedPayload=T.encodeSignedPayload(c.toXDR())}s.weight=r.signer().weight(),t.signer=s}break;case"manageOffer":case"manageSellOffer":t.type="manageSellOffer",t.selling=F.fromOperation(r.selling()),t.buying=F.fromOperation(r.buying()),t.amount=this._fromXDRAmount(r.amount()),t.price=this._fromXDRPrice(r.price()),t.offerId=r.offerId().toString();break;case"manageBuyOffer":t.type="manageBuyOffer",t.selling=F.fromOperation(r.selling()),t.buying=F.fromOperation(r.buying()),t.buyAmount=this._fromXDRAmount(r.buyAmount()),t.price=this._fromXDRPrice(r.price()),t.offerId=r.offerId().toString();break;case"createPassiveOffer":case"createPassiveSellOffer":t.type="createPassiveSellOffer",t.selling=F.fromOperation(r.selling()),t.buying=F.fromOperation(r.buying()),t.amount=this._fromXDRAmount(r.amount()),t.price=this._fromXDRPrice(r.price());break;case"accountMerge":t.type="accountMerge",t.destination=Le(r);break;case"manageData":t.type="manageData",t.name=r.dataName().toString("ascii"),t.value=r.dataValue();break;case"inflation":t.type="inflation";break;case"bumpSequence":t.type="bumpSequence",t.bumpTo=r.bumpTo().toString();break;case"createClaimableBalance":t.type="createClaimableBalance",t.asset=F.fromOperation(r.asset()),t.amount=this._fromXDRAmount(r.amount()),t.claimants=[],r.claimants().forEach((function(e){t.claimants.push(Ie.fromXDR(e))}));break;case"claimClaimableBalance":t.type="claimClaimableBalance",t.balanceId=r.toXDR("hex");break;case"beginSponsoringFutureReserves":t.type="beginSponsoringFutureReserves",t.sponsoredId=st(r.sponsoredId());break;case"endSponsoringFutureReserves":t.type="endSponsoringFutureReserves";break;case"revokeSponsorship":!function(e,t){switch(e.switch().name){case"revokeSponsorshipLedgerEntry":var r=e.ledgerKey();switch(r.switch().name){case i.LedgerEntryType.account().name:t.type="revokeAccountSponsorship",t.account=st(r.account().accountId());break;case i.LedgerEntryType.trustline().name:t.type="revokeTrustlineSponsorship",t.account=st(r.trustLine().accountId());var n=r.trustLine().asset();n.switch()===i.AssetType.assetTypePoolShare()?t.asset=Ce.fromOperation(n):t.asset=F.fromOperation(n);break;case i.LedgerEntryType.offer().name:t.type="revokeOfferSponsorship",t.seller=st(r.offer().sellerId()),t.offerId=r.offer().offerId().toString();break;case i.LedgerEntryType.data().name:t.type="revokeDataSponsorship",t.account=st(r.data().accountId()),t.name=r.data().dataName().toString("ascii");break;case i.LedgerEntryType.claimableBalance().name:t.type="revokeClaimableBalanceSponsorship",t.balanceId=r.claimableBalance().balanceId().toXDR("hex");break;case i.LedgerEntryType.liquidityPool().name:t.type="revokeLiquidityPoolSponsorship",t.liquidityPoolId=r.liquidityPool().liquidityPoolId().toString("hex");break;default:throw new Error("Unknown ledgerKey: ".concat(e.switch().name))}break;case"revokeSponsorshipSigner":t.type="revokeSignerSponsorship",t.account=st(e.signer().accountId()),t.signer=function(e){var t={};switch(e.switch().name){case i.SignerKeyType.signerKeyTypeEd25519().name:t.ed25519PublicKey=T.encodeEd25519PublicKey(e.ed25519());break;case i.SignerKeyType.signerKeyTypePreAuthTx().name:t.preAuthTx=e.preAuthTx().toString("hex");break;case i.SignerKeyType.signerKeyTypeHashX().name:t.sha256Hash=e.hashX().toString("hex");break;default:throw new Error("Unknown signerKey: ".concat(e.switch().name))}return t}(e.signer().signerKey());break;default:throw new Error("Unknown revokeSponsorship: ".concat(e.switch().name))}}(r,t);break;case"clawback":t.type="clawback",t.amount=this._fromXDRAmount(r.amount()),t.from=Le(r.from()),t.asset=F.fromOperation(r.asset());break;case"clawbackClaimableBalance":t.type="clawbackClaimableBalance",t.balanceId=r.toXDR("hex");break;case"setTrustLineFlags":t.type="setTrustLineFlags",t.asset=F.fromOperation(r.asset()),t.trustor=st(r.trustor());var l=r.clearFlags(),f=r.setFlags(),p={authorized:i.TrustLineFlags.authorizedFlag(),authorizedToMaintainLiabilities:i.TrustLineFlags.authorizedToMaintainLiabilitiesFlag(),clawbackEnabled:i.TrustLineFlags.trustlineClawbackEnabledFlag()};t.flags={},Object.keys(p).forEach((function(e){var r;t.flags[e]=(r=p[e].value,!!(f&r)||!(l&r)&&void 0)}));break;case"liquidityPoolDeposit":t.type="liquidityPoolDeposit",t.liquidityPoolId=r.liquidityPoolId().toString("hex"),t.maxAmountA=this._fromXDRAmount(r.maxAmountA()),t.maxAmountB=this._fromXDRAmount(r.maxAmountB()),t.minPrice=this._fromXDRPrice(r.minPrice()),t.maxPrice=this._fromXDRPrice(r.maxPrice());break;case"liquidityPoolWithdraw":t.type="liquidityPoolWithdraw",t.liquidityPoolId=r.liquidityPoolId().toString("hex"),t.amount=this._fromXDRAmount(r.amount()),t.minAmountA=this._fromXDRAmount(r.minAmountA()),t.minAmountB=this._fromXDRAmount(r.minAmountB());break;case"invokeHostFunction":var h;t.type="invokeHostFunction",t.func=r.hostFunction(),t.auth=null!==(h=r.auth())&&void 0!==h?h:[];break;case"extendFootprintTtl":t.type="extendFootprintTtl",t.extendTo=r.extendTo();break;case"restoreFootprint":t.type="restoreFootprint";break;default:throw new Error("Unknown operation: ".concat(n))}return t}},{key:"isValidAmount",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"!=typeof e)return!1;try{t=new ye(e)}catch(e){return!1}return!(!r&&t.isZero()||t.isNegative()||t.times(tt).gt(new ye("9223372036854775807").toString())||t.decimalPlaces()>7||t.isNaN()||!t.isFinite())}},{key:"constructAmountRequirementsError",value:function(e){return"".concat(e," argument must be of type String, represent a positive number and have at most 7 digits after the decimal")}},{key:"_checkUnsignedIntValue",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(void 0!==t)switch("string"==typeof t&&(t=parseFloat(t)),!0){case"number"!=typeof t||!Number.isFinite(t)||t%1!=0:throw new Error("".concat(e," value is invalid"));case t<0:throw new Error("".concat(e," value must be unsigned"));case!r||r&&r(t,e):return t;default:throw new Error("".concat(e," value is invalid"))}}},{key:"_toXDRAmount",value:function(e){var t=new ye(e).times(tt);return n.Hyper.fromString(t.toString())}},{key:"_fromXDRAmount",value:function(e){return new ye(e).div(tt).toFixed(7)}},{key:"_fromXDRPrice",value:function(e){return new ye(e.n()).div(new ye(e.d())).toString()}},{key:"_toXDRPrice",value:function(e){var t;if(e.n&&e.d)t=new i.Price(e);else{var r=function(e){for(var t,r,n=new ye(e),o=[[new ye(0),new ye(1)],[new ye(1),new ye(0)]],i=2;!n.gt(ve);){t=n.integerValue(ye.ROUND_FLOOR),r=n.minus(t);var a=t.times(o[i-1][0]).plus(o[i-2][0]),s=t.times(o[i-1][1]).plus(o[i-2][1]);if(a.gt(ve)||s.gt(ve))break;if(o.push([a,s]),r.eq(0))break;n=new ye(1).div(r),i+=1}var u=me(o[o.length-1],2),c=u[0],l=u[1];if(c.isZero()||l.isZero())throw new Error("Couldn't find approximation");return[c.toNumber(),l.toNumber()]}(e);t=new i.Price({n:parseInt(r[0],10),d:parseInt(r[1],10)})}if(t.n()<0||t.d()<0)throw new Error("price must be positive");return t}}],(t=null)&&Qe(e.prototype,t),r&&Qe(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function st(e){return T.encodeEd25519PublicKey(e.ed25519())}at.accountMerge=function(e){var t={};try{t.body=i.OperationBody.accountMerge(Ne(e.destination))}catch(e){throw new Error("destination is invalid")}return this.setSourceAccount(t,e),new i.Operation(t)},at.allowTrust=function(e){if(!T.isValidEd25519PublicKey(e.trustor))throw new Error("trustor is invalid");var t={};if(t.trustor=U.fromPublicKey(e.trustor).xdrAccountId(),e.assetCode.length<=4){var r=e.assetCode.padEnd(4,"\0");t.asset=i.AssetCode.assetTypeCreditAlphanum4(r)}else{if(!(e.assetCode.length<=12))throw new Error("Asset code must be 12 characters at max.");var n=e.assetCode.padEnd(12,"\0");t.asset=i.AssetCode.assetTypeCreditAlphanum12(n)}"boolean"==typeof e.authorize?e.authorize?t.authorize=i.TrustLineFlags.authorizedFlag().value:t.authorize=0:t.authorize=e.authorize;var o=new i.AllowTrustOp(t),a={};return a.body=i.OperationBody.allowTrust(o),this.setSourceAccount(a,e),new i.Operation(a)},at.bumpSequence=function(e){var t={};if("string"!=typeof e.bumpTo)throw new Error("bumpTo must be a string");try{new ye(e.bumpTo)}catch(e){throw new Error("bumpTo must be a stringified number")}t.bumpTo=n.Hyper.fromString(e.bumpTo);var r=new i.BumpSequenceOp(t),o={};return o.body=i.OperationBody.bumpSequence(r),this.setSourceAccount(o,e),new i.Operation(o)},at.changeTrust=function(e){var t={};if(e.asset instanceof F)t.line=e.asset.toChangeTrustXDRObject();else{if(!(e.asset instanceof Te))throw new TypeError("asset must be Asset or LiquidityPoolAsset");t.line=e.asset.toXDRObject()}if(void 0!==e.limit&&!this.isValidAmount(e.limit,!0))throw new TypeError(this.constructAmountRequirementsError("limit"));e.limit?t.limit=this._toXDRAmount(e.limit):t.limit=n.Hyper.fromString(new ye("9223372036854775807").toString()),e.source&&(t.source=e.source.masterKeypair);var r=new i.ChangeTrustOp(t),o={};return o.body=i.OperationBody.changeTrust(r),this.setSourceAccount(o,e),new i.Operation(o)},at.createAccount=function(e){if(!T.isValidEd25519PublicKey(e.destination))throw new Error("destination is invalid");if(!this.isValidAmount(e.startingBalance,!0))throw new TypeError(this.constructAmountRequirementsError("startingBalance"));var t={};t.destination=U.fromPublicKey(e.destination).xdrAccountId(),t.startingBalance=this._toXDRAmount(e.startingBalance);var r=new i.CreateAccountOp(t),n={};return n.body=i.OperationBody.createAccount(r),this.setSourceAccount(n,e),new i.Operation(n)},at.createClaimableBalance=function(e){if(!(e.asset instanceof F))throw new Error("must provide an asset for create claimable balance operation");if(!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(!Array.isArray(e.claimants)||0===e.claimants.length)throw new Error("must provide at least one claimant");var t={};t.asset=e.asset.toXDRObject(),t.amount=this._toXDRAmount(e.amount),t.claimants=Object.values(e.claimants).map((function(e){return e.toXDRObject()}));var r=new i.CreateClaimableBalanceOp(t),n={};return n.body=i.OperationBody.createClaimableBalance(r),this.setSourceAccount(n,e),new i.Operation(n)},at.claimClaimableBalance=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Fe(e.balanceId);var t={};t.balanceId=i.ClaimableBalanceId.fromXDR(e.balanceId,"hex");var r=new i.ClaimClaimableBalanceOp(t),n={};return n.body=i.OperationBody.claimClaimableBalance(r),this.setSourceAccount(n,e),new i.Operation(n)},at.clawbackClaimableBalance=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Fe(e.balanceId);var t={balanceId:i.ClaimableBalanceId.fromXDR(e.balanceId,"hex")},r={body:i.OperationBody.clawbackClaimableBalance(new i.ClawbackClaimableBalanceOp(t))};return this.setSourceAccount(r,e),new i.Operation(r)},at.createPassiveSellOffer=function(e){var t={};if(t.selling=e.selling.toXDRObject(),t.buying=e.buying.toXDRObject(),!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(t.amount=this._toXDRAmount(e.amount),void 0===e.price)throw new TypeError("price argument is required");t.price=this._toXDRPrice(e.price);var r=new i.CreatePassiveSellOfferOp(t),n={};return n.body=i.OperationBody.createPassiveSellOffer(r),this.setSourceAccount(n,e),new i.Operation(n)},at.inflation=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return t.body=i.OperationBody.inflation(),this.setSourceAccount(t,e),new i.Operation(t)},at.manageData=function(e){var t={};if(!("string"==typeof e.name&&e.name.length<=64))throw new Error("name must be a string, up to 64 characters");if(t.dataName=e.name,"string"!=typeof e.value&&!De.isBuffer(e.value)&&null!==e.value)throw new Error("value must be a string, Buffer or null");if("string"==typeof e.value?t.dataValue=De.from(e.value):t.dataValue=e.value,null!==t.dataValue&&t.dataValue.length>64)throw new Error("value cannot be longer that 64 bytes");var r=new i.ManageDataOp(t),n={};return n.body=i.OperationBody.manageData(r),this.setSourceAccount(n,e),new i.Operation(n)},at.manageSellOffer=function(e){var t={};if(t.selling=e.selling.toXDRObject(),t.buying=e.buying.toXDRObject(),!this.isValidAmount(e.amount,!0))throw new TypeError(this.constructAmountRequirementsError("amount"));if(t.amount=this._toXDRAmount(e.amount),void 0===e.price)throw new TypeError("price argument is required");t.price=this._toXDRPrice(e.price),void 0!==e.offerId?e.offerId=e.offerId.toString():e.offerId="0",t.offerId=n.Hyper.fromString(e.offerId);var r=new i.ManageSellOfferOp(t),o={};return o.body=i.OperationBody.manageSellOffer(r),this.setSourceAccount(o,e),new i.Operation(o)},at.manageBuyOffer=function(e){var t={};if(t.selling=e.selling.toXDRObject(),t.buying=e.buying.toXDRObject(),!this.isValidAmount(e.buyAmount,!0))throw new TypeError(this.constructAmountRequirementsError("buyAmount"));if(t.buyAmount=this._toXDRAmount(e.buyAmount),void 0===e.price)throw new TypeError("price argument is required");t.price=this._toXDRPrice(e.price),void 0!==e.offerId?e.offerId=e.offerId.toString():e.offerId="0",t.offerId=n.Hyper.fromString(e.offerId);var r=new i.ManageBuyOfferOp(t),o={};return o.body=i.OperationBody.manageBuyOffer(r),this.setSourceAccount(o,e),new i.Operation(o)},at.pathPaymentStrictReceive=function(e){switch(!0){case!e.sendAsset:throw new Error("Must specify a send asset");case!this.isValidAmount(e.sendMax):throw new TypeError(this.constructAmountRequirementsError("sendMax"));case!e.destAsset:throw new Error("Must provide a destAsset for a payment operation");case!this.isValidAmount(e.destAmount):throw new TypeError(this.constructAmountRequirementsError("destAmount"))}var t={};t.sendAsset=e.sendAsset.toXDRObject(),t.sendMax=this._toXDRAmount(e.sendMax);try{t.destination=Ne(e.destination)}catch(e){throw new Error("destination is invalid")}t.destAsset=e.destAsset.toXDRObject(),t.destAmount=this._toXDRAmount(e.destAmount);var r=e.path?e.path:[];t.path=r.map((function(e){return e.toXDRObject()}));var n=new i.PathPaymentStrictReceiveOp(t),o={};return o.body=i.OperationBody.pathPaymentStrictReceive(n),this.setSourceAccount(o,e),new i.Operation(o)},at.pathPaymentStrictSend=function(e){switch(!0){case!e.sendAsset:throw new Error("Must specify a send asset");case!this.isValidAmount(e.sendAmount):throw new TypeError(this.constructAmountRequirementsError("sendAmount"));case!e.destAsset:throw new Error("Must provide a destAsset for a payment operation");case!this.isValidAmount(e.destMin):throw new TypeError(this.constructAmountRequirementsError("destMin"))}var t={};t.sendAsset=e.sendAsset.toXDRObject(),t.sendAmount=this._toXDRAmount(e.sendAmount);try{t.destination=Ne(e.destination)}catch(e){throw new Error("destination is invalid")}t.destAsset=e.destAsset.toXDRObject(),t.destMin=this._toXDRAmount(e.destMin);var r=e.path?e.path:[];t.path=r.map((function(e){return e.toXDRObject()}));var n=new i.PathPaymentStrictSendOp(t),o={};return o.body=i.OperationBody.pathPaymentStrictSend(n),this.setSourceAccount(o,e),new i.Operation(o)},at.payment=function(e){if(!e.asset)throw new Error("Must provide an asset for a payment operation");if(!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));var t={};try{t.destination=Ne(e.destination)}catch(e){throw new Error("destination is invalid")}t.asset=e.asset.toXDRObject(),t.amount=this._toXDRAmount(e.amount);var r=new i.PaymentOp(t),n={};return n.body=i.OperationBody.payment(r),this.setSourceAccount(n,e),new i.Operation(n)},at.setOptions=function(e){var t={};if(e.inflationDest){if(!T.isValidEd25519PublicKey(e.inflationDest))throw new Error("inflationDest is invalid");t.inflationDest=U.fromPublicKey(e.inflationDest).xdrAccountId()}if(t.clearFlags=this._checkUnsignedIntValue("clearFlags",e.clearFlags),t.setFlags=this._checkUnsignedIntValue("setFlags",e.setFlags),t.masterWeight=this._checkUnsignedIntValue("masterWeight",e.masterWeight,qe),t.lowThreshold=this._checkUnsignedIntValue("lowThreshold",e.lowThreshold,qe),t.medThreshold=this._checkUnsignedIntValue("medThreshold",e.medThreshold,qe),t.highThreshold=this._checkUnsignedIntValue("highThreshold",e.highThreshold,qe),void 0!==e.homeDomain&&"string"!=typeof e.homeDomain)throw new TypeError("homeDomain argument must be of type String");if(t.homeDomain=e.homeDomain,e.signer){var r,n=this._checkUnsignedIntValue("signer.weight",e.signer.weight,qe),o=0;if(e.signer.ed25519PublicKey){if(!T.isValidEd25519PublicKey(e.signer.ed25519PublicKey))throw new Error("signer.ed25519PublicKey is invalid.");var a=T.decodeEd25519PublicKey(e.signer.ed25519PublicKey);r=new i.SignerKey.signerKeyTypeEd25519(a),o+=1}if(e.signer.preAuthTx){if("string"==typeof e.signer.preAuthTx&&(e.signer.preAuthTx=Ve.from(e.signer.preAuthTx,"hex")),!Ve.isBuffer(e.signer.preAuthTx)||32!==e.signer.preAuthTx.length)throw new Error("signer.preAuthTx must be 32 bytes Buffer.");r=new i.SignerKey.signerKeyTypePreAuthTx(e.signer.preAuthTx),o+=1}if(e.signer.sha256Hash){if("string"==typeof e.signer.sha256Hash&&(e.signer.sha256Hash=Ve.from(e.signer.sha256Hash,"hex")),!Ve.isBuffer(e.signer.sha256Hash)||32!==e.signer.sha256Hash.length)throw new Error("signer.sha256Hash must be 32 bytes Buffer.");r=new i.SignerKey.signerKeyTypeHashX(e.signer.sha256Hash),o+=1}if(e.signer.ed25519SignedPayload){if(!T.isValidSignedPayload(e.signer.ed25519SignedPayload))throw new Error("signer.ed25519SignedPayload is invalid.");var s=T.decodeSignedPayload(e.signer.ed25519SignedPayload),u=i.SignerKeyEd25519SignedPayload.fromXDR(s);r=i.SignerKey.signerKeyTypeEd25519SignedPayload(u),o+=1}if(1!==o)throw new Error("Signer object must contain exactly one of signer.ed25519PublicKey, signer.sha256Hash, signer.preAuthTx.");t.signer=new i.Signer({key:r,weight:n})}var c=new i.SetOptionsOp(t),l={};return l.body=i.OperationBody.setOptions(c),this.setSourceAccount(l,e),new i.Operation(l)},at.beginSponsoringFutureReserves=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!T.isValidEd25519PublicKey(e.sponsoredId))throw new Error("sponsoredId is invalid");var t=new i.BeginSponsoringFutureReservesOp({sponsoredId:U.fromPublicKey(e.sponsoredId).xdrAccountId()}),r={};return r.body=i.OperationBody.beginSponsoringFutureReserves(t),this.setSourceAccount(r,e),new i.Operation(r)},at.endSponsoringFutureReserves=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return t.body=i.OperationBody.endSponsoringFutureReserves(),this.setSourceAccount(t,e),new i.Operation(t)},at.revokeAccountSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!T.isValidEd25519PublicKey(e.account))throw new Error("account is invalid");var t=i.LedgerKey.account(new i.LedgerKeyAccount({accountId:U.fromPublicKey(e.account).xdrAccountId()})),r=i.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=i.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new i.Operation(n)},at.revokeTrustlineSponsorship=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!T.isValidEd25519PublicKey(t.account))throw new Error("account is invalid");if(t.asset instanceof F)e=t.asset.toTrustLineXDRObject();else{if(!(t.asset instanceof Ce))throw new TypeError("asset must be an Asset or LiquidityPoolId");e=t.asset.toXDRObject()}var r=i.LedgerKey.trustline(new i.LedgerKeyTrustLine({accountId:U.fromPublicKey(t.account).xdrAccountId(),asset:e})),n=i.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(r),o={};return o.body=i.OperationBody.revokeSponsorship(n),this.setSourceAccount(o,t),new i.Operation(o)},at.revokeOfferSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!T.isValidEd25519PublicKey(e.seller))throw new Error("seller is invalid");if("string"!=typeof e.offerId)throw new Error("offerId is invalid");var t=i.LedgerKey.offer(new i.LedgerKeyOffer({sellerId:U.fromPublicKey(e.seller).xdrAccountId(),offerId:i.Int64.fromString(e.offerId)})),r=i.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=i.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new i.Operation(n)},at.revokeDataSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!T.isValidEd25519PublicKey(e.account))throw new Error("account is invalid");if("string"!=typeof e.name||e.name.length>64)throw new Error("name must be a string, up to 64 characters");var t=i.LedgerKey.data(new i.LedgerKeyData({accountId:U.fromPublicKey(e.account).xdrAccountId(),dataName:e.name})),r=i.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=i.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new i.Operation(n)},at.revokeClaimableBalanceSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"!=typeof e.balanceId)throw new Error("balanceId is invalid");var t=i.LedgerKey.claimableBalance(new i.LedgerKeyClaimableBalance({balanceId:i.ClaimableBalanceId.fromXDR(e.balanceId,"hex")})),r=i.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=i.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new i.Operation(n)},at.revokeLiquidityPoolSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("string"!=typeof e.liquidityPoolId)throw new Error("liquidityPoolId is invalid");var t=i.LedgerKey.liquidityPool(new i.LedgerKeyLiquidityPool({liquidityPoolId:i.PoolId.fromXDR(e.liquidityPoolId,"hex")})),r=i.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={body:i.OperationBody.revokeSponsorship(r)};return this.setSourceAccount(n,e),new i.Operation(n)},at.revokeSignerSponsorship=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!T.isValidEd25519PublicKey(t.account))throw new Error("account is invalid");if(t.signer.ed25519PublicKey){if(!T.isValidEd25519PublicKey(t.signer.ed25519PublicKey))throw new Error("signer.ed25519PublicKey is invalid.");var r=T.decodeEd25519PublicKey(t.signer.ed25519PublicKey);e=new i.SignerKey.signerKeyTypeEd25519(r)}else if(t.signer.preAuthTx){var n;if(n="string"==typeof t.signer.preAuthTx?Ke.from(t.signer.preAuthTx,"hex"):t.signer.preAuthTx,!Ke.isBuffer(n)||32!==n.length)throw new Error("signer.preAuthTx must be 32 bytes Buffer.");e=new i.SignerKey.signerKeyTypePreAuthTx(n)}else{if(!t.signer.sha256Hash)throw new Error("signer is invalid");var o;if(o="string"==typeof t.signer.sha256Hash?Ke.from(t.signer.sha256Hash,"hex"):t.signer.sha256Hash,!Ke.isBuffer(o)||32!==o.length)throw new Error("signer.sha256Hash must be 32 bytes Buffer.");e=new i.SignerKey.signerKeyTypeHashX(o)}var a=new i.RevokeSponsorshipOpSigner({accountId:U.fromPublicKey(t.account).xdrAccountId(),signerKey:e}),s=i.RevokeSponsorshipOp.revokeSponsorshipSigner(a),u={};return u.body=i.OperationBody.revokeSponsorship(s),this.setSourceAccount(u,t),new i.Operation(u)},at.clawback=function(e){var t={};if(!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));t.amount=this._toXDRAmount(e.amount),t.asset=e.asset.toXDRObject();try{t.from=Ne(e.from)}catch(e){throw new Error("from address is invalid")}var r={body:i.OperationBody.clawback(new i.ClawbackOp(t))};return this.setSourceAccount(r,e),new i.Operation(r)},at.setTrustLineFlags=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};if("object"!==He(e.flags)||0===Object.keys(e.flags).length)throw new Error("opts.flags must be a map of boolean flags to modify");var r={authorized:i.TrustLineFlags.authorizedFlag(),authorizedToMaintainLiabilities:i.TrustLineFlags.authorizedToMaintainLiabilitiesFlag(),clawbackEnabled:i.TrustLineFlags.trustlineClawbackEnabledFlag()},n=0,o=0;Object.keys(e.flags).forEach((function(t){if(!Object.prototype.hasOwnProperty.call(r,t))throw new Error("unsupported flag name specified: ".concat(t));var i=e.flags[t],a=r[t].value;!0===i?o|=a:!1===i&&(n|=a)})),t.trustor=U.fromPublicKey(e.trustor).xdrAccountId(),t.asset=e.asset.toXDRObject(),t.clearFlags=n,t.setFlags=o;var a={body:i.OperationBody.setTrustLineFlags(new i.SetTrustLineFlagsOp(t))};return this.setSourceAccount(a,e),new i.Operation(a)},at.liquidityPoolDeposit=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.liquidityPoolId,r=e.maxAmountA,n=e.maxAmountB,o=e.minPrice,a=e.maxPrice,s={};if(!t)throw new TypeError("liquidityPoolId argument is required");if(s.liquidityPoolId=i.PoolId.fromXDR(t,"hex"),!this.isValidAmount(r,!0))throw new TypeError(this.constructAmountRequirementsError("maxAmountA"));if(s.maxAmountA=this._toXDRAmount(r),!this.isValidAmount(n,!0))throw new TypeError(this.constructAmountRequirementsError("maxAmountB"));if(s.maxAmountB=this._toXDRAmount(n),void 0===o)throw new TypeError("minPrice argument is required");if(s.minPrice=this._toXDRPrice(o),void 0===a)throw new TypeError("maxPrice argument is required");s.maxPrice=this._toXDRPrice(a);var u=new i.LiquidityPoolDepositOp(s),c={body:i.OperationBody.liquidityPoolDeposit(u)};return this.setSourceAccount(c,e),new i.Operation(c)},at.liquidityPoolWithdraw=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};if(!e.liquidityPoolId)throw new TypeError("liquidityPoolId argument is required");if(t.liquidityPoolId=i.PoolId.fromXDR(e.liquidityPoolId,"hex"),!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(t.amount=this._toXDRAmount(e.amount),!this.isValidAmount(e.minAmountA,!0))throw new TypeError(this.constructAmountRequirementsError("minAmountA"));if(t.minAmountA=this._toXDRAmount(e.minAmountA),!this.isValidAmount(e.minAmountB,!0))throw new TypeError(this.constructAmountRequirementsError("minAmountB"));t.minAmountB=this._toXDRAmount(e.minAmountB);var r=new i.LiquidityPoolWithdrawOp(t),n={body:i.OperationBody.liquidityPoolWithdraw(r)};return this.setSourceAccount(n,e),new i.Operation(n)},at.invokeHostFunction=function(e){if(!e.func)throw new TypeError("host function invocation ('func') required (got ".concat(JSON.stringify(e),")"));var t=new i.InvokeHostFunctionOp({hostFunction:e.func,auth:e.auth||[]}),r={body:i.OperationBody.invokeHostFunction(t)};return this.setSourceAccount(r,e),new i.Operation(r)},at.extendFootprintTtl=function(e){var t;if((null!==(t=e.extendTo)&&void 0!==t?t:-1)<=0)throw new RangeError("extendTo isn't a ledger quantity (uint32)");var r=new i.ExtendFootprintTtlOp({ext:new i.ExtensionPoint(0),extendTo:e.extendTo}),n={body:i.OperationBody.extendFootprintTtl(r)};return this.setSourceAccount(n,e),new i.Operation(n)},at.restoreFootprint=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new i.RestoreFootprintOp({ext:new i.ExtensionPoint(0)}),r={body:i.OperationBody.restoreFootprint(t)};return this.setSourceAccount(r,null!=e?e:{}),new i.Operation(r)},at.createStellarAssetContract=function(e){var t=e.asset;if("string"==typeof t){var r=Ye(t.split(":"),2),n=r[0],o=r[1];t=new F(n,o)}if(!(t instanceof F))throw new TypeError("expected Asset in 'opts.asset', got ".concat(t));return this.invokeHostFunction({source:e.source,auth:e.auth,func:i.HostFunction.hostFunctionTypeCreateContract(new i.CreateContractArgs({executable:i.ContractExecutable.contractExecutableStellarAsset(),contractIdPreimage:i.ContractIdPreimage.contractIdPreimageFromAsset(t.toXDRObject())}))})},at.invokeContractFunction=function(e){var t=new We(e.contract);if("contract"!==t._type)throw new TypeError("expected contract strkey instance, got ".concat(t));return this.invokeHostFunction({source:e.source,auth:e.auth,func:i.HostFunction.hostFunctionTypeInvokeContract(new i.InvokeContractArgs({contractAddress:t.toScAddress(),functionName:e.function,args:e.args}))})},at.createCustomContract=function(e){var t=Ge.from(e.salt||U.random().xdrPublicKey().value());if(!e.wasmHash||32!==e.wasmHash.length)throw new TypeError("expected hash(contract WASM) in 'opts.wasmHash', got ".concat(e.wasmHash));if(32!==t.length)throw new TypeError("expected 32-byte salt in 'opts.salt', got ".concat(e.wasmHash));return this.invokeHostFunction({source:e.source,auth:e.auth,func:i.HostFunction.hostFunctionTypeCreateContract(new i.CreateContractArgs({executable:i.ContractExecutable.contractExecutableWasm(Ge.from(e.wasmHash)),contractIdPreimage:i.ContractIdPreimage.contractIdPreimageFromAddress(new i.ContractIdPreimageFromAddress({address:e.address.toScAddress(),salt:t}))}))})},at.uploadContractWasm=function(e){return this.invokeHostFunction({source:e.source,auth:e.auth,func:i.HostFunction.hostFunctionTypeUploadContractWasm(Ge.from(e.wasm))})};var ut=r(3626).A;function ct(e){return ct="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},ct(e)}function lt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ft(n.key),n)}}function ft(e){var t=function(e,t){if("object"!=ct(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=ct(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ct(t)?t:t+""}var pt="none",ht="id",dt="text",yt="hash",mt="return",gt=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;switch(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._type=t,this._value=r,this._type){case pt:break;case ht:e._validateIdValue(r);break;case dt:e._validateTextValue(r);break;case yt:case mt:e._validateHashValue(r),"string"==typeof r&&(this._value=ut.from(r,"hex"));break;default:throw new Error("Invalid memo type")}}return t=e,o=[{key:"_validateIdValue",value:function(e){var t,r=new Error("Expects a int64 as a string. Got ".concat(e));if("string"!=typeof e)throw r;try{t=new ye(e)}catch(e){throw r}if(!t.isFinite())throw r;if(t.isNaN())throw r}},{key:"_validateTextValue",value:function(e){if(!i.Memo.armTypeForArm("text").isValid(e))throw new Error("Expects string, array or buffer, max 28 bytes")}},{key:"_validateHashValue",value:function(e){var t,r=new Error("Expects a 32 byte hash value or hex encoded string. Got ".concat(e));if(null==e)throw r;if("string"==typeof e){if(!/^[0-9A-Fa-f]{64}$/g.test(e))throw r;t=ut.from(e,"hex")}else{if(!ut.isBuffer(e))throw r;t=ut.from(e)}if(!t.length||32!==t.length)throw r}},{key:"none",value:function(){return new e(pt)}},{key:"text",value:function(t){return new e(dt,t)}},{key:"id",value:function(t){return new e(ht,t)}},{key:"hash",value:function(t){return new e(yt,t)}},{key:"return",value:function(t){return new e(mt,t)}},{key:"fromXDRObject",value:function(t){switch(t.arm()){case"id":return e.id(t.value().toString());case"text":return e.text(t.value());case"hash":return e.hash(t.value());case"retHash":return e.return(t.value())}if(void 0===t.value())return e.none();throw new Error("Unknown type")}}],(r=[{key:"type",get:function(){return this._type},set:function(e){throw new Error("Memo is immutable")}},{key:"value",get:function(){switch(this._type){case pt:return null;case ht:case dt:return this._value;case yt:case mt:return ut.from(this._value);default:throw new Error("Invalid memo type")}},set:function(e){throw new Error("Memo is immutable")}},{key:"toXDRObject",value:function(){switch(this._type){case pt:return i.Memo.memoNone();case ht:return i.Memo.memoId(n.UnsignedHyper.fromString(this._value));case dt:return i.Memo.memoText(this._value);case yt:return i.Memo.memoHash(this._value);case mt:return i.Memo.memoReturn(this._value);default:return null}}}])&&lt(t.prototype,r),o&&lt(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,o}(),vt=r(3626).A;function bt(e){return bt="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},bt(e)}function wt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,St(n.key),n)}}function St(e){var t=function(e,t){if("object"!=bt(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=bt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==bt(t)?t:t+""}function kt(e,t,r){return t=At(t),function(e,t){if(t&&("object"==bt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Et()?Reflect.construct(t,r||[],At(e).constructor):t.apply(e,r))}function Et(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Et=function(){return!!e})()}function At(e){return At=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},At(e)}function Tt(e,t){return Tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tt(e,t)}var Ot=function(e){function t(e,r){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"string"==typeof e){var o=vt.from(e,"base64");e=i.TransactionEnvelope.fromXDR(o)}var a=e.switch();if(a!==i.EnvelopeType.envelopeTypeTxV0()&&a!==i.EnvelopeType.envelopeTypeTx())throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxV0 or envelopeTypeTx but received an ".concat(a.name,"."));var s=e.value(),u=s.tx(),c=u.fee().toString();if((n=kt(this,t,[u,(s.signatures()||[]).slice(),c,r]))._envelopeType=a,n._memo=u.memo(),n._sequence=u.seqNum().toString(),n._envelopeType===i.EnvelopeType.envelopeTypeTxV0())n._source=T.encodeEd25519PublicKey(n.tx.sourceAccountEd25519());else n._source=Le(n.tx.sourceAccount());var l=null,f=null;switch(n._envelopeType){case i.EnvelopeType.envelopeTypeTxV0():f=u.timeBounds();break;case i.EnvelopeType.envelopeTypeTx():switch(u.cond().switch()){case i.PreconditionType.precondTime():f=u.cond().timeBounds();break;case i.PreconditionType.precondV2():f=(l=u.cond().v2()).timeBounds()}}if(f&&(n._timeBounds={minTime:f.minTime().toString(),maxTime:f.maxTime().toString()}),l){var p=l.ledgerBounds();p&&(n._ledgerBounds={minLedger:p.minLedger(),maxLedger:p.maxLedger()});var h=l.minSeqNum();h&&(n._minAccountSequence=h.toString()),n._minAccountSequenceAge=l.minSeqAge(),n._minAccountSequenceLedgerGap=l.minSeqLedgerGap(),n._extraSigners=l.extraSigners()}var d=u.operations()||[];return n._operations=d.map((function(e){return at.fromXDRObject(e)})),n}return 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&&Tt(e,t)}(t,e),r=t,(n=[{key:"timeBounds",get:function(){return this._timeBounds},set:function(e){throw new Error("Transaction is immutable")}},{key:"ledgerBounds",get:function(){return this._ledgerBounds},set:function(e){throw new Error("Transaction is immutable")}},{key:"minAccountSequence",get:function(){return this._minAccountSequence},set:function(e){throw new Error("Transaction is immutable")}},{key:"minAccountSequenceAge",get:function(){return this._minAccountSequenceAge},set:function(e){throw new Error("Transaction is immutable")}},{key:"minAccountSequenceLedgerGap",get:function(){return this._minAccountSequenceLedgerGap},set:function(e){throw new Error("Transaction is immutable")}},{key:"extraSigners",get:function(){return this._extraSigners},set:function(e){throw new Error("Transaction is immutable")}},{key:"sequence",get:function(){return this._sequence},set:function(e){throw new Error("Transaction is immutable")}},{key:"source",get:function(){return this._source},set:function(e){throw new Error("Transaction is immutable")}},{key:"operations",get:function(){return this._operations},set:function(e){throw new Error("Transaction is immutable")}},{key:"memo",get:function(){return gt.fromXDRObject(this._memo)},set:function(e){throw new Error("Transaction is immutable")}},{key:"signatureBase",value:function(){var e=this.tx;this._envelopeType===i.EnvelopeType.envelopeTypeTxV0()&&(e=i.Transaction.fromXDR(vt.concat([i.PublicKeyType.publicKeyTypeEd25519().toXDR(),e.toXDR()])));var t=new i.TransactionSignaturePayloadTaggedTransaction.envelopeTypeTx(e);return new i.TransactionSignaturePayload({networkId:i.Hash.fromXDR(u(this.networkPassphrase)),taggedTransaction:t}).toXDR()}},{key:"toEnvelope",value:function(){var e,t=this.tx.toXDR(),r=this.signatures.slice();switch(this._envelopeType){case i.EnvelopeType.envelopeTypeTxV0():e=new i.TransactionEnvelope.envelopeTypeTxV0(new i.TransactionV0Envelope({tx:i.TransactionV0.fromXDR(t),signatures:r}));break;case i.EnvelopeType.envelopeTypeTx():e=new i.TransactionEnvelope.envelopeTypeTx(new i.TransactionV1Envelope({tx:i.Transaction.fromXDR(t),signatures:r}));break;default:throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxV0 or envelopeTypeTx but received an ".concat(this._envelopeType.name,"."))}return e}},{key:"getClaimableBalanceId",value:function(e){if(!Number.isInteger(e)||e<0||e>=this.operations.length)throw new RangeError("invalid operation index");var t=this.operations[e];try{t=at.createClaimableBalance(t)}catch(e){throw new TypeError("expected createClaimableBalance, got ".concat(t.type,": ").concat(e))}var r=T.decodeEd25519PublicKey(Me(this.source)),n=u(i.HashIdPreimage.envelopeTypeOpId(new i.HashIdPreimageOperationId({sourceAccount:i.AccountId.publicKeyTypeEd25519(r),seqNum:i.SequenceNumber.fromString(this.sequence),opNum:e})).toXDR("raw"));return i.ClaimableBalanceId.claimableBalanceIdTypeV0(n).toXDR("hex")}}])&&wt(r.prototype,n),o&&wt(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o}(W),Pt=r(3626).A;function xt(e){return xt="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},xt(e)}function It(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_t(n.key),n)}}function _t(e){var t=function(e,t){if("object"!=xt(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=xt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==xt(t)?t:t+""}function Bt(e,t,r){return t=Ct(t),function(e,t){if(t&&("object"==xt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Rt()?Reflect.construct(t,r||[],Ct(e).constructor):t.apply(e,r))}function Rt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Rt=function(){return!!e})()}function Ct(e){return Ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ct(e)}function Ut(e,t){return Ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ut(e,t)}var Nt=function(e){function t(e,r){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"string"==typeof e){var o=Pt.from(e,"base64");e=i.TransactionEnvelope.fromXDR(o)}var a=e.switch();if(a!==i.EnvelopeType.envelopeTypeTxFeeBump())throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxFeeBump but received an ".concat(a.name,"."));var s=e.value(),u=s.tx(),c=u.fee().toString();n=Bt(this,t,[u,(s.signatures()||[]).slice(),c,r]);var l=i.TransactionEnvelope.envelopeTypeTx(u.innerTx().v1());return n._feeSource=Le(n.tx.feeSource()),n._innerTransaction=new Ot(l,r),n}return 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&&Ut(e,t)}(t,e),r=t,(n=[{key:"innerTransaction",get:function(){return this._innerTransaction}},{key:"operations",get:function(){return this._innerTransaction.operations}},{key:"feeSource",get:function(){return this._feeSource}},{key:"signatureBase",value:function(){var e=new i.TransactionSignaturePayloadTaggedTransaction.envelopeTypeTxFeeBump(this.tx);return new i.TransactionSignaturePayload({networkId:i.Hash.fromXDR(u(this.networkPassphrase)),taggedTransaction:e}).toXDR()}},{key:"toEnvelope",value:function(){var e=new i.FeeBumpTransactionEnvelope({tx:i.FeeBumpTransaction.fromXDR(this.tx.toXDR()),signatures:this.signatures.slice()});return new i.TransactionEnvelope.envelopeTypeTxFeeBump(e)}}])&&It(r.prototype,n),o&&It(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o}(W);function Lt(e){return Lt="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},Lt(e)}function jt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Mt(n.key),n)}}function Mt(e){var t=function(e,t){if("object"!=Lt(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Lt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Lt(t)?t:t+""}var Ft=function(){return e=function e(t,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),T.isValidMed25519PublicKey(t))throw new Error("accountId is an M-address; use MuxedAccount instead");if(!T.isValidEd25519PublicKey(t))throw new Error("accountId is invalid");if("string"!=typeof r)throw new Error("sequence must be of type string");this._accountId=t,this.sequence=new ye(r)},(t=[{key:"accountId",value:function(){return this._accountId}},{key:"sequenceNumber",value:function(){return this.sequence.toString()}},{key:"incrementSequenceNumber",value:function(){this.sequence=this.sequence.plus(1)}}])&&jt(e.prototype,t),r&&jt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function Dt(e){return Dt="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},Dt(e)}function Vt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,qt(n.key),n)}}function qt(e){var t=function(e,t){if("object"!=Dt(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Dt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Dt(t)?t:t+""}var Kt=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=t.accountId();if(!T.isValidEd25519PublicKey(n))throw new Error("accountId is invalid");this.account=t,this._muxedXdr=je(n,r),this._mAddress=Le(this._muxedXdr),this._id=r}return t=e,n=[{key:"fromAddress",value:function(t,r){var n=Ne(t),o=Me(t),i=n.med25519().id().toString();return new e(new Ft(o,r),i)}}],(r=[{key:"baseAccount",value:function(){return this.account}},{key:"accountId",value:function(){return this._mAddress}},{key:"id",value:function(){return this._id}},{key:"setId",value:function(e){if("string"!=typeof e)throw new Error("id should be a string representing a number (uint64)");return this._muxedXdr.med25519().id(i.Uint64.fromString(e)),this._mAddress=Le(this._muxedXdr),this._id=e,this}},{key:"sequenceNumber",value:function(){return this.account.sequenceNumber()}},{key:"incrementSequenceNumber",value:function(){return this.account.incrementSequenceNumber()}},{key:"toXDRObject",value:function(){return this._muxedXdr}},{key:"equals",value:function(e){return this.accountId()===e.accountId()}}])&&Vt(t.prototype,r),n&&Vt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}();function Ht(e){return Ht="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},Ht(e)}function zt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Xt(n.key),n)}}function Xt(e){var t=function(e,t){if("object"!=Ht(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Ht(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ht(t)?t:t+""}var $t=function(){return e=function e(t){var r,n,o,a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r=this,o=void 0,(n=Xt(n="_data"))in r?Object.defineProperty(r,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[n]=o,a=t?"string"==typeof t||ArrayBuffer.isView(t)?e.fromXDR(t):e.fromXDR(t.toXDR()):new i.SorobanTransactionData({resources:new i.SorobanResources({footprint:new i.LedgerFootprint({readOnly:[],readWrite:[]}),instructions:0,readBytes:0,writeBytes:0}),ext:new i.ExtensionPoint(0),resourceFee:new i.Int64(0)}),this._data=a},r=[{key:"fromXDR",value:function(e){return i.SorobanTransactionData.fromXDR(e,"string"==typeof e?"base64":"raw")}}],(t=[{key:"setResourceFee",value:function(e){return this._data.resourceFee(new i.Int64(e)),this}},{key:"setResources",value:function(e,t,r){return this._data.resources().instructions(e),this._data.resources().readBytes(t),this._data.resources().writeBytes(r),this}},{key:"appendFootprint",value:function(e,t){return this.setFootprint(this.getReadOnly().concat(e),this.getReadWrite().concat(t))}},{key:"setFootprint",value:function(e,t){return null!==e&&this.setReadOnly(e),null!==t&&this.setReadWrite(t),this}},{key:"setReadOnly",value:function(e){return this._data.resources().footprint().readOnly(null!=e?e:[]),this}},{key:"setReadWrite",value:function(e){return this._data.resources().footprint().readWrite(null!=e?e:[]),this}},{key:"build",value:function(){return i.SorobanTransactionData.fromXDR(this._data.toXDR())}},{key:"getReadOnly",value:function(){return this.getFootprint().readOnly()}},{key:"getReadWrite",value:function(){return this.getFootprint().readWrite()}},{key:"getFootprint",value:function(){return this._data.resources().footprint()}}])&&zt(e.prototype,t),r&&zt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function Wt(e){return Wt="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},Wt(e)}function Gt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Yt(n.key),n)}}function Yt(e){var t=function(e,t){if("object"!=Wt(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Wt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Wt(t)?t:t+""}var Jt=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},r=[{key:"decodeAddress",value:function(e){var t={ed25519PublicKey:i.SignerKey.signerKeyTypeEd25519,preAuthTx:i.SignerKey.signerKeyTypePreAuthTx,sha256Hash:i.SignerKey.signerKeyTypeHashX,signedPayload:i.SignerKey.signerKeyTypeEd25519SignedPayload},r=T.getVersionByteForPrefix(e),n=t[r];if(!n)throw new Error("invalid signer key type (".concat(r,")"));var o=P(r,e);return n("signedPayload"===r?new i.SignerKeyEd25519SignedPayload({ed25519:o.slice(0,32),payload:o.slice(36)}):o)}},{key:"encodeSignerKey",value:function(e){var t,r;switch(e.switch()){case i.SignerKeyType.signerKeyTypeEd25519():t="ed25519PublicKey",r=e.value();break;case i.SignerKeyType.signerKeyTypePreAuthTx():t="preAuthTx",r=e.value();break;case i.SignerKeyType.signerKeyTypeHashX():t="sha256Hash",r=e.value();break;case i.SignerKeyType.signerKeyTypeEd25519SignedPayload():t="signedPayload",r=e.ed25519SignedPayload().toXDR("raw");break;default:throw new Error("invalid SignerKey (type: ".concat(e.switch(),")"))}return x(t,r)}}],(t=null)&&Gt(e.prototype,t),r&&Gt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function Zt(e){return Zt="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},Zt(e)}function Qt(e){return function(e){if(Array.isArray(e))return er(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return er(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?er(e,t):void 0}}(e)||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.")}()}function er(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function tr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function rr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tr(Object(r),!0).forEach((function(t){nr(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function nr(e,t,r){return(t=ir(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function or(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ir(n.key),n)}}function ir(e){var t=function(e,t){if("object"!=Zt(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Zt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Zt(t)?t:t+""}var ar="100",sr=0,ur=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new Error("must specify source account for the transaction");if(void 0===r.fee)throw new Error("must specify fee for the transaction (in stroops)");this.source=t,this.operations=[],this.baseFee=r.fee,this.timebounds=r.timebounds?rr({},r.timebounds):null,this.ledgerbounds=r.ledgerbounds?rr({},r.ledgerbounds):null,this.minAccountSequence=r.minAccountSequence||null,this.minAccountSequenceAge=r.minAccountSequenceAge||null,this.minAccountSequenceLedgerGap=r.minAccountSequenceLedgerGap||null,this.extraSigners=r.extraSigners?Qt(r.extraSigners):null,this.memo=r.memo||gt.none(),this.networkPassphrase=r.networkPassphrase||null,this.sorobanData=r.sorobanData?new $t(r.sorobanData).build():null}return t=e,o=[{key:"cloneFrom",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(t instanceof Ot))throw new TypeError("expected a 'Transaction', got: ".concat(t));var n,o=(BigInt(t.sequence)-1n).toString();if(T.isValidMed25519PublicKey(t.source))n=Kt.fromAddress(t.source,o);else{if(!T.isValidEd25519PublicKey(t.source))throw new TypeError("unsupported tx source account: ".concat(t.source));n=new Ft(t.source,o)}var i=new e(n,rr({fee:(parseInt(t.fee,10)/t.operations.length||ar).toString(),memo:t.memo,networkPassphrase:t.networkPassphrase,timebounds:t.timeBounds,ledgerbounds:t.ledgerBounds,minAccountSequence:t.minAccountSequence,minAccountSequenceAge:t.minAccountSequenceAge,minAccountSequenceLedgerGap:t.minAccountSequenceLedgerGap,extraSigners:t.extraSigners},r));return t._tx.operations().forEach((function(e){return i.addOperation(e)})),i}},{key:"buildFeeBumpTransaction",value:function(e,t,r,n){var o=r.operations.length,a=new ye(r.fee).div(o),s=new ye(t);if(s.lt(a))throw new Error("Invalid baseFee, it should be at least ".concat(a," stroops."));var u=new ye(ar);if(s.lt(u))throw new Error("Invalid baseFee, it should be at least ".concat(u," stroops."));var c,l=r.toEnvelope();if(l.switch()===i.EnvelopeType.envelopeTypeTxV0()){var f=l.v0().tx(),p=new i.Transaction({sourceAccount:new i.MuxedAccount.keyTypeEd25519(f.sourceAccountEd25519()),fee:f.fee(),seqNum:f.seqNum(),cond:i.Preconditions.precondTime(f.timeBounds()),memo:f.memo(),operations:f.operations(),ext:new i.TransactionExt(0)});l=new i.TransactionEnvelope.envelopeTypeTx(new i.TransactionV1Envelope({tx:p,signatures:l.v0().signatures()}))}c="string"==typeof e?Ne(e):e.xdrMuxedAccount();var h=new i.FeeBumpTransaction({feeSource:c,fee:i.Int64.fromString(s.times(o+1).toString()),innerTx:i.FeeBumpTransactionInnerTx.envelopeTypeTx(l.v1()),ext:new i.FeeBumpTransactionExt(0)}),d=new i.FeeBumpTransactionEnvelope({tx:h,signatures:[]}),y=new i.TransactionEnvelope.envelopeTypeTxFeeBump(d);return new Nt(y,n)}},{key:"fromXDR",value:function(e,t){return"string"==typeof e&&(e=i.TransactionEnvelope.fromXDR(e,"base64")),e.switch()===i.EnvelopeType.envelopeTypeTxFeeBump()?new Nt(e,t):new Ot(e,t)}}],(r=[{key:"addOperation",value:function(e){return this.operations.push(e),this}},{key:"clearOperations",value:function(){return this.operations=[],this}},{key:"addMemo",value:function(e){return this.memo=e,this}},{key:"setTimeout",value:function(e){if(null!==this.timebounds&&this.timebounds.maxTime>0)throw new Error("TimeBounds.max_time has been already set - setting timeout would overwrite it.");if(e<0)throw new Error("timeout cannot be negative");if(e>0){var t=Math.floor(Date.now()/1e3)+e;null===this.timebounds?this.timebounds={minTime:0,maxTime:t}:this.timebounds={minTime:this.timebounds.minTime,maxTime:t}}else this.timebounds={minTime:0,maxTime:0};return this}},{key:"setTimebounds",value:function(e,t){if("number"==typeof e&&(e=new Date(1e3*e)),"number"==typeof t&&(t=new Date(1e3*t)),null!==this.timebounds)throw new Error("TimeBounds has been already set - setting timebounds would overwrite it.");var r=Math.floor(e.valueOf()/1e3),n=Math.floor(t.valueOf()/1e3);if(r<0)throw new Error("min_time cannot be negative");if(n<0)throw new Error("max_time cannot be negative");if(n>0&&r>n)throw new Error("min_time cannot be greater than max_time");return this.timebounds={minTime:r,maxTime:n},this}},{key:"setLedgerbounds",value:function(e,t){if(null!==this.ledgerbounds)throw new Error("LedgerBounds has been already set - setting ledgerbounds would overwrite it.");if(e<0)throw new Error("min_ledger cannot be negative");if(t<0)throw new Error("max_ledger cannot be negative");if(t>0&&e>t)throw new Error("min_ledger cannot be greater than max_ledger");return this.ledgerbounds={minLedger:e,maxLedger:t},this}},{key:"setMinAccountSequence",value:function(e){if(null!==this.minAccountSequence)throw new Error("min_account_sequence has been already set - setting min_account_sequence would overwrite it.");return this.minAccountSequence=e,this}},{key:"setMinAccountSequenceAge",value:function(e){if("number"!=typeof e)throw new Error("min_account_sequence_age must be a number");if(null!==this.minAccountSequenceAge)throw new Error("min_account_sequence_age has been already set - setting min_account_sequence_age would overwrite it.");if(e<0)throw new Error("min_account_sequence_age cannot be negative");return this.minAccountSequenceAge=e,this}},{key:"setMinAccountSequenceLedgerGap",value:function(e){if(null!==this.minAccountSequenceLedgerGap)throw new Error("min_account_sequence_ledger_gap has been already set - setting min_account_sequence_ledger_gap would overwrite it.");if(e<0)throw new Error("min_account_sequence_ledger_gap cannot be negative");return this.minAccountSequenceLedgerGap=e,this}},{key:"setExtraSigners",value:function(e){if(!Array.isArray(e))throw new Error("extra_signers must be an array of strings.");if(null!==this.extraSigners)throw new Error("extra_signers has been already set - setting extra_signers would overwrite it.");if(e.length>2)throw new Error("extra_signers cannot be longer than 2 elements.");return this.extraSigners=Qt(e),this}},{key:"setNetworkPassphrase",value:function(e){return this.networkPassphrase=e,this}},{key:"setSorobanData",value:function(e){return this.sorobanData=new $t(e).build(),this}},{key:"build",value:function(){var e=new ye(this.source.sequenceNumber()).plus(1),t={fee:new ye(this.baseFee).times(this.operations.length).toNumber(),seqNum:i.SequenceNumber.fromString(e.toString()),memo:this.memo?this.memo.toXDRObject():null};if(null===this.timebounds||void 0===this.timebounds.minTime||void 0===this.timebounds.maxTime)throw new Error("TimeBounds has to be set or you must call setTimeout(TimeoutInfinite).");cr(this.timebounds.minTime)&&(this.timebounds.minTime=this.timebounds.minTime.getTime()/1e3),cr(this.timebounds.maxTime)&&(this.timebounds.maxTime=this.timebounds.maxTime.getTime()/1e3),this.timebounds.minTime=n.UnsignedHyper.fromString(this.timebounds.minTime.toString()),this.timebounds.maxTime=n.UnsignedHyper.fromString(this.timebounds.maxTime.toString());var r=new i.TimeBounds(this.timebounds);if(this.hasV2Preconditions()){var o=null;null!==this.ledgerbounds&&(o=new i.LedgerBounds(this.ledgerbounds));var a=this.minAccountSequence||"0";a=i.SequenceNumber.fromString(a);var s=n.UnsignedHyper.fromString(null!==this.minAccountSequenceAge?this.minAccountSequenceAge.toString():"0"),u=this.minAccountSequenceLedgerGap||0,c=null!==this.extraSigners?this.extraSigners.map(Jt.decodeAddress):[];t.cond=i.Preconditions.precondV2(new i.PreconditionsV2({timeBounds:r,ledgerBounds:o,minSeqNum:a,minSeqAge:s,minSeqLedgerGap:u,extraSigners:c}))}else t.cond=i.Preconditions.precondTime(r);t.sourceAccount=Ne(this.source.accountId()),this.sorobanData?t.ext=new i.TransactionExt(1,this.sorobanData):t.ext=new i.TransactionExt(0,i.Void);var l=new i.Transaction(t);l.operations(this.operations);var f=new i.TransactionEnvelope.envelopeTypeTx(new i.TransactionV1Envelope({tx:l})),p=new Ot(f,this.networkPassphrase);return this.source.incrementSequenceNumber(),p}},{key:"hasV2Preconditions",value:function(){return null!==this.ledgerbounds||null!==this.minAccountSequence||null!==this.minAccountSequenceAge||null!==this.minAccountSequenceLedgerGap||null!==this.extraSigners&&this.extraSigners.length>0}}])&&or(t.prototype,r),o&&or(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,o}();function cr(e){return e instanceof Date&&!isNaN(e)}var lr={PUBLIC:"Public Global Stellar Network ; September 2015",TESTNET:"Test SDF Network ; September 2015",FUTURENET:"Test SDF Future Network ; October 2022",SANDBOX:"Local Sandbox Stellar Network ; September 2022",STANDALONE:"Standalone Network ; February 2017"};function fr(e){return fr="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},fr(e)}function pr(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return hr(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hr(e,t):void 0}}(e)||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.")}()}function hr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function dr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,yr(n.key),n)}}function yr(e){var t=function(e,t){if("object"!=fr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=fr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==fr(t)?t:t+""}var mr=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},r=[{key:"formatTokenAmount",value:function(e,t){if(e.includes("."))throw new TypeError("No decimals are allowed");var r=e;return t>0&&(r=t>r.length?["0",r.toString().padStart(t,"0")].join("."):[r.slice(0,-t),r.slice(-t)].join(".")),r.replace(/(\.\d*?)0+$/,"$1")}},{key:"parseTokenAmount",value:function(e,t){var r,n=pr(e.split(".").slice()),o=n[0],i=n[1];if(n.slice(2).length)throw new Error("Invalid decimal value: ".concat(e));return BigInt(o+(null!==(r=null==i?void 0:i.padEnd(t,"0"))&&void 0!==r?r:"0".repeat(t))).toString()}}],(t=null)&&dr(e.prototype,t),r&&dr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function gr(e){return gr="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},gr(e)}function vr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,br(n.key),n)}}function br(e){var t=function(e,t){if("object"!=gr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=gr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==gr(t)?t:t+""}var wr=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);try{this._id=T.decodeContract(t)}catch(e){throw new Error("Invalid contract ID: ".concat(t))}},t=[{key:"contractId",value:function(){return T.encodeContract(this._id)}},{key:"toString",value:function(){return this.contractId()}},{key:"address",value:function(){return We.contract(this._id)}},{key:"call",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return at.invokeContractFunction({contract:this.address().toString(),function:e,args:r})}},{key:"getFootprint",value:function(){return i.LedgerKey.contractData(new i.LedgerKeyContractData({contract:this.address().toScAddress(),key:i.ScVal.scvLedgerKeyContractInstance(),durability:i.ContractDataDurability.persistent()}))}}],t&&vr(e.prototype,t),r&&vr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function Sr(e){return Sr="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},Sr(e)}function kr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Er(n.key),n)}}function Er(e){var t=function(e,t){if("object"!=Sr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Sr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Sr(t)?t:t+""}function Ar(e,t,r){return t=Or(t),function(e,t){if(t&&("object"==Sr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Tr()?Reflect.construct(t,r||[],Or(e).constructor):t.apply(e,r))}function Tr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Tr=function(){return!!e})()}function Or(e){return Or=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Or(e)}function Pr(e,t){return Pr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pr(e,t)}var xr=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Ar(this,t,[r])}return 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&&Pr(e,t)}(t,e),r=t,(n=[{key:"unsigned",get:function(){return!0}},{key:"size",get:function(){return 128}}])&&kr(r.prototype,n),o&&kr(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o}(n.LargeInt);function Ir(e){return Ir="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},Ir(e)}function _r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Br(n.key),n)}}function Br(e){var t=function(e,t){if("object"!=Ir(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Ir(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ir(t)?t:t+""}function Rr(e,t,r){return t=Ur(t),function(e,t){if(t&&("object"==Ir(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Cr()?Reflect.construct(t,r||[],Ur(e).constructor):t.apply(e,r))}function Cr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Cr=function(){return!!e})()}function Ur(e){return Ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ur(e)}function Nr(e,t){return Nr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Nr(e,t)}xr.defineIntBoundaries();var Lr=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Rr(this,t,[r])}return 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&&Nr(e,t)}(t,e),r=t,(n=[{key:"unsigned",get:function(){return!0}},{key:"size",get:function(){return 256}}])&&_r(r.prototype,n),o&&_r(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o}(n.LargeInt);function jr(e){return jr="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},jr(e)}function Mr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Fr(n.key),n)}}function Fr(e){var t=function(e,t){if("object"!=jr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=jr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==jr(t)?t:t+""}function Dr(e,t,r){return t=qr(t),function(e,t){if(t&&("object"==jr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Vr()?Reflect.construct(t,r||[],qr(e).constructor):t.apply(e,r))}function Vr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Vr=function(){return!!e})()}function qr(e){return qr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qr(e)}function Kr(e,t){return Kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Kr(e,t)}Lr.defineIntBoundaries();var Hr=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Dr(this,t,[r])}return 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&&Kr(e,t)}(t,e),r=t,(n=[{key:"unsigned",get:function(){return!1}},{key:"size",get:function(){return 128}}])&&Mr(r.prototype,n),o&&Mr(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o}(n.LargeInt);function zr(e){return zr="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},zr(e)}function Xr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$r(n.key),n)}}function $r(e){var t=function(e,t){if("object"!=zr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=zr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==zr(t)?t:t+""}function Wr(e,t,r){return t=Yr(t),function(e,t){if(t&&("object"==zr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Gr()?Reflect.construct(t,r||[],Yr(e).constructor):t.apply(e,r))}function Gr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Gr=function(){return!!e})()}function Yr(e){return Yr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Yr(e)}function Jr(e,t){return Jr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Jr(e,t)}Hr.defineIntBoundaries();var Zr=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Wr(this,t,[r])}return 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&&Jr(e,t)}(t,e),r=t,(n=[{key:"unsigned",get:function(){return!1}},{key:"size",get:function(){return 256}}])&&Xr(r.prototype,n),o&&Xr(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o}(n.LargeInt);function Qr(e){return Qr="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},Qr(e)}function en(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,rn(n.key),n)}}function tn(e,t,r){return(t=rn(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rn(e){var t=function(e,t){if("object"!=Qr(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Qr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Qr(t)?t:t+""}Zr.defineIntBoundaries();var nn=function(){return e=function e(t,r){switch(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),tn(this,"int",void 0),tn(this,"type",void 0),r instanceof Array||(r=[r]),r=r.map((function(t){return"bigint"==typeof t?t:t instanceof e?t.toBigInt():BigInt(t)})),t){case"i64":this.int=new n.Hyper(r);break;case"i128":this.int=new Hr(r);break;case"i256":this.int=new Zr(r);break;case"u64":this.int=new n.UnsignedHyper(r);break;case"u128":this.int=new xr(r);break;case"u256":this.int=new Lr(r);break;default:throw TypeError("invalid type: ".concat(t))}this.type=t},r=[{key:"isType",value:function(e){switch(e){case"i64":case"i128":case"i256":case"u64":case"u128":case"u256":return!0;default:return!1}}},{key:"getType",value:function(e){return e.slice(3).toLowerCase()}}],(t=[{key:"toNumber",value:function(){var e=this.int.toBigInt();if(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)throw RangeError("value ".concat(e," not in range for Number ")+"[".concat(Number.MAX_SAFE_INTEGER,", ").concat(Number.MIN_SAFE_INTEGER,"]"));return Number(e)}},{key:"toBigInt",value:function(){return this.int.toBigInt()}},{key:"toI64",value:function(){this._sizeCheck(64);var e=this.toBigInt();if(BigInt.asIntN(64,e)!==e)throw RangeError("value too large for i64: ".concat(e));return i.ScVal.scvI64(new i.Int64(e))}},{key:"toU64",value:function(){return this._sizeCheck(64),i.ScVal.scvU64(new i.Uint64(BigInt.asUintN(64,this.toBigInt())))}},{key:"toI128",value:function(){this._sizeCheck(128);var e=this.int.toBigInt(),t=BigInt.asIntN(64,e>>64n),r=BigInt.asUintN(64,e);return i.ScVal.scvI128(new i.Int128Parts({hi:new i.Int64(t),lo:new i.Uint64(r)}))}},{key:"toU128",value:function(){this._sizeCheck(128);var e=this.int.toBigInt();return i.ScVal.scvU128(new i.UInt128Parts({hi:new i.Uint64(BigInt.asUintN(64,e>>64n)),lo:new i.Uint64(BigInt.asUintN(64,e))}))}},{key:"toI256",value:function(){var e=this.int.toBigInt(),t=BigInt.asIntN(64,e>>192n),r=BigInt.asUintN(64,e>>128n),n=BigInt.asUintN(64,e>>64n),o=BigInt.asUintN(64,e);return i.ScVal.scvI256(new i.Int256Parts({hiHi:new i.Int64(t),hiLo:new i.Uint64(r),loHi:new i.Uint64(n),loLo:new i.Uint64(o)}))}},{key:"toU256",value:function(){var e=this.int.toBigInt(),t=BigInt.asUintN(64,e>>192n),r=BigInt.asUintN(64,e>>128n),n=BigInt.asUintN(64,e>>64n),o=BigInt.asUintN(64,e);return i.ScVal.scvU256(new i.UInt256Parts({hiHi:new i.Uint64(t),hiLo:new i.Uint64(r),loHi:new i.Uint64(n),loLo:new i.Uint64(o)}))}},{key:"toScVal",value:function(){switch(this.type){case"i64":return this.toI64();case"i128":return this.toI128();case"i256":return this.toI256();case"u64":return this.toU64();case"u128":return this.toU128();case"u256":return this.toU256();default:throw TypeError("invalid type: ".concat(this.type))}}},{key:"valueOf",value:function(){return this.int.valueOf()}},{key:"toString",value:function(){return this.int.toString()}},{key:"toJSON",value:function(){return{value:this.toBigInt().toString(),type:this.type}}},{key:"_sizeCheck",value:function(e){if(this.int.size>e)throw RangeError("value too large for ".concat(e," bits (").concat(this.type,")"))}}])&&en(e.prototype,t),r&&en(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}();function on(e){return on="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},on(e)}function an(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,sn(n.key),n)}}function sn(e){var t=function(e,t){if("object"!=on(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=on(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==on(t)?t:t+""}function un(e,t,r){return t=ln(t),function(e,t){if(t&&("object"==on(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,cn()?Reflect.construct(t,r||[],ln(e).constructor):t.apply(e,r))}function cn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(cn=function(){return!!e})()}function ln(e){return ln=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ln(e)}function fn(e,t){return fn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fn(e,t)}var pn=function(e){function t(e,r){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=e<0,i=null!==(n=null==r?void 0:r.type)&&void 0!==n?n:"";if(i.startsWith("u")&&o)throw TypeError("specified type ".concat(r.type," yet negative (").concat(e,")"));if(""===i){i=o?"i":"u";var a=function(e){var t,r=e.toString(2).length;return null!==(t=[64,128,256].find((function(e){return r<=e})))&&void 0!==t?t:r}(e);switch(a){case 64:case 128:case 256:i+=a.toString();break;default:throw RangeError("expected 64/128/256 bits for input (".concat(e,"), got ").concat(a))}}return un(this,t,[i,e])}return 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&&fn(e,t)}(t,e),r=t,n&&an(r.prototype,n),o&&an(r,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,o}(nn);function hn(e){var t=nn.getType(e.switch().name);switch(e.switch().name){case"scvU32":case"scvI32":return BigInt(e.value());case"scvU64":case"scvI64":return new nn(t,e.value()).toBigInt();case"scvU128":case"scvI128":return new nn(t,[e.value().lo(),e.value().hi()]).toBigInt();case"scvU256":case"scvI256":return new nn(t,[e.value().loLo(),e.value().loHi(),e.value().hiLo(),e.value().hiHi()]).toBigInt();default:throw TypeError("expected integer type, got ".concat(e.switch()))}}var dn=r(3626).A;function yn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return mn(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mn(e,t):void 0}}(e,t)||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.")}()}function mn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function gn(e){return gn="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},gn(e)}function vn(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(gn(e)){case"object":if(null===e)return i.ScVal.scvVoid();if(e instanceof i.ScVal)return e;if(e instanceof We)return e.toScVal();if(e instanceof wr)return e.address().toScVal();if(e instanceof Uint8Array||dn.isBuffer(e)){var o,a=Uint8Array.from(e);switch(null!==(o=null==n?void 0:n.type)&&void 0!==o?o:"bytes"){case"bytes":return i.ScVal.scvBytes(a);case"symbol":return i.ScVal.scvSymbol(a);case"string":return i.ScVal.scvString(a);default:throw new TypeError("invalid type (".concat(n.type,") specified for bytes-like value"))}}if(Array.isArray(e)){if(e.length>0&&e.some((function(t){return gn(t)!==gn(e[0])})))throw new TypeError("array values (".concat(e,") must have the same type (types: ").concat(e.map((function(e){return gn(e)})).join(","),")"));return i.ScVal.scvVec(e.map((function(e){return vn(e,n)})))}var s;if("Object"!==(null!==(t=null===(r=e.constructor)||void 0===r?void 0:r.name)&&void 0!==t?t:""))throw new TypeError("cannot interpret ".concat(null===(s=e.constructor)||void 0===s?void 0:s.name," value as ScVal (").concat(JSON.stringify(e),")"));return i.ScVal.scvMap(Object.entries(e).map((function(e){var t,r,o=yn(e,2),a=o[0],s=o[1],u=yn(null!==(t=(null!==(r=null==n?void 0:n.type)&&void 0!==r?r:{})[a])&&void 0!==t?t:[null,null],2),c=u[0],l=u[1],f=c?{type:c}:{},p=l?{type:l}:{};return new i.ScMapEntry({key:vn(a,f),val:vn(s,p)})})));case"number":case"bigint":switch(null==n?void 0:n.type){case"u32":return i.ScVal.scvU32(e);case"i32":return i.ScVal.scvI32(e)}return new pn(e,{type:null==n?void 0:n.type}).toScVal();case"string":var u,c=null!==(u=null==n?void 0:n.type)&&void 0!==u?u:"string";switch(c){case"string":return i.ScVal.scvString(e);case"symbol":return i.ScVal.scvSymbol(e);case"address":return new We(e).toScVal();default:if(nn.isType(c))return new nn(c,e).toScVal();throw new TypeError("invalid type (".concat(n.type,") specified for string value"))}case"boolean":return i.ScVal.scvBool(e);case"undefined":return i.ScVal.scvVoid();case"function":return vn(e());default:throw new TypeError("failed to convert typeof ".concat(gn(e)," (").concat(e,")"))}}function bn(e){var t,r;switch(e.switch().value){case i.ScValType.scvVoid().value:return null;case i.ScValType.scvU64().value:case i.ScValType.scvI64().value:return e.value().toBigInt();case i.ScValType.scvU128().value:case i.ScValType.scvI128().value:case i.ScValType.scvU256().value:case i.ScValType.scvI256().value:return hn(e);case i.ScValType.scvVec().value:return(null!==(t=e.vec())&&void 0!==t?t:[]).map(bn);case i.ScValType.scvAddress().value:return We.fromScVal(e).toString();case i.ScValType.scvMap().value:return Object.fromEntries((null!==(r=e.map())&&void 0!==r?r:[]).map((function(e){return[bn(e.key()),bn(e.val())]})));case i.ScValType.scvBool().value:case i.ScValType.scvU32().value:case i.ScValType.scvI32().value:case i.ScValType.scvBytes().value:return e.value();case i.ScValType.scvSymbol().value:case i.ScValType.scvString().value:var n=e.value();if(dn.isBuffer(n)||ArrayBuffer.isView(n))try{return(new TextDecoder).decode(n)}catch(e){return new Uint8Array(n.buffer)}return n;case i.ScValType.scvTimepoint().value:case i.ScValType.scvDuration().value:return new i.Uint64(e.value()).toBigInt();case i.ScValType.scvStatus().value:switch(e.value().switch()){case i.ScStatusType.sstOk().value:case i.ScStatusType.sstUnknownError().value:case i.ScStatusType.sstHostValueError().value:case i.ScStatusType.sstHostObjectError().value:case i.ScStatusType.sstHostFunctionError().value:case i.ScStatusType.sstHostStorageError().value:case i.ScStatusType.sstHostContextError().value:case i.ScStatusType.sstVmError().value:case i.ScStatusType.sstContractError().value:case i.ScStatusType.sstHostAuthError().value:}default:return e.value()}}function wn(e){return wn="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},wn(e)}function Sn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function kn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Sn(Object(r),!0).forEach((function(t){En(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function En(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=wn(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=wn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==wn(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function An(e){return e.map((function(e){return e instanceof i.DiagnosticEvent?Tn(e.event()):Tn(e)}))}function Tn(e){return kn(kn({},null!=e.contractId()&&{contractId:T.encodeContract(e.contractId())}),{},{type:e.type().name,topics:e.body().value().topics().map((function(e){return bn(e)})),data:bn(e.body().value().data())})}var On=r(3626).A;function Pn(e){return Pn="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},Pn(e)}function xn(){xn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),s=new _(n||[]);return o(a,"_invoke",{value:O(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var p="suspendedStart",h="suspendedYield",d="executing",y="completed",m={};function g(){}function v(){}function b(){}var w={};c(w,a,(function(){return this}));var S=Object.getPrototypeOf,k=S&&S(S(B([])));k&&k!==r&&n.call(k,a)&&(w=k);var E=b.prototype=g.prototype=Object.create(w);function A(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function T(e,t){function r(o,i,a,s){var u=f(e[o],e,i);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==Pn(l)&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(l).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function O(t,r,n){var o=p;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var u=P(s,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var c=f(t,r,n);if("normal"===c.type){if(o=n.done?y:h,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=y,n.method="throw",n.arg=c.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function x(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 I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function B(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(Pn(t)+" is not iterable")}return v.prototype=b,o(E,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:v,configurable:!0}),v.displayName=c(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,c(e,u,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},A(T.prototype),c(T.prototype,s,(function(){return this})),t.AsyncIterator=T,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new T(l(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},A(E),c(E,u,"Generator"),c(E,a,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=B,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return s.type="throw",s.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:B(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function In(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,o)}function _n(e,t,r){return Bn.apply(this,arguments)}function Bn(){var e;return e=xn().mark((function e(t,r,n){var o,a,s,c,l,f,p,h,d,y=arguments;return xn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=y.length>3&&void 0!==y[3]?y[3]:lr.FUTURENET,t.credentials().switch().value===i.SorobanCredentialsType.sorobanCredentialsAddress().value){e.next=3;break}return e.abrupt("return",t);case 3:if(a=i.SorobanAuthorizationEntry.fromXDR(t.toXDR()),(s=a.credentials().address()).signatureExpirationLedger(n),c=u(On.from(o)),l=i.HashIdPreimage.envelopeTypeSorobanAuthorization(new i.HashIdPreimageSorobanAuthorization({networkId:c,nonce:s.nonce(),invocation:a.rootInvocation(),signatureExpirationLedger:s.signatureExpirationLedger()})),f=u(l.toXDR()),"function"!=typeof r){e.next=17;break}return e.t0=On,e.next=13,r(l);case 13:e.t1=e.sent,p=e.t0.from.call(e.t0,e.t1),e.next=18;break;case 17:p=On.from(r.sign(f));case 18:if(h=We.fromScAddress(s.address()).toString(),U.fromPublicKey(h).verify(f,p)){e.next=21;break}throw new Error("signature doesn't match payload");case 21:return d=vn({public_key:T.decodeEd25519PublicKey(h),signature:p},{type:{public_key:["symbol",null],signature:["symbol",null]}}),s.signature(i.ScVal.scvVec([d])),e.abrupt("return",a);case 24:case"end":return e.stop()}}),e)})),Bn=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){In(i,n,o,a,s,"next",e)}function s(e){In(i,n,o,a,s,"throw",e)}a(void 0)}))},Bn.apply(this,arguments)}function Rn(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:lr.FUTURENET,a=U.random().rawPublicKey(),s=new i.Int64(a.subarray(0,8).reduce((function(e,t){return e<<8|t}),0)),u=n||e.publicKey();if(!u)throw new Error("authorizeInvocation requires publicKey parameter");return _n(new i.SorobanAuthorizationEntry({rootInvocation:r,credentials:i.SorobanCredentials.sorobanCredentialsAddress(new i.SorobanAddressCredentials({address:new We(u).toScAddress(),nonce:s,signatureExpirationLedger:0,signature:i.ScVal.scvVec([])}))}),e,t,o)}function Cn(e){var t=e.function(),r={},n=t.value();switch(t.switch().value){case 0:r.type="execute",r.args={source:We.fromScAddress(n.contractAddress()).toString(),function:n.functionName(),args:n.args().map((function(e){return bn(e)}))};break;case 1:r.type="create",r.args={};var o=[n.executable(),n.contractIdPreimage()],i=o[0],a=o[1];if(!!i.switch().value!=!!a.switch().value)throw new Error("creation function appears invalid: ".concat(JSON.stringify(n)," (should be wasm+address or token+asset)"));switch(i.switch().value){case 0:var s=a.fromAddress();r.args.type="wasm",r.args.wasm={salt:s.salt().toString("hex"),hash:i.wasmHash().toString("hex"),address:We.fromScAddress(s.address()).toString()};break;case 1:r.args.type="sac",r.args.asset=F.fromOperation(a.fromAsset()).toString();break;default:throw new Error("unknown creation type: ".concat(JSON.stringify(i)))}break;default:throw new Error("unknown invocation type (".concat(t.switch(),"): ").concat(JSON.stringify(t)))}return r.invocations=e.subInvocations().map((function(e){return Cn(e)})),r}function Un(e,t){Nn(e,1,t)}function Nn(e,t,r,n){!1!==r(e,t,n)&&e.subInvocations().forEach((function(n){return Nn(n,t+1,r,e)}))}const Ln=(e=r.hmd(e)).exports},5360:(e,t)=>{"use strict";var r=function(e,t){return t||(t={}),e.split("").forEach((function(e,r){e in t||(t[e]=r)})),t},n={alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",charmap:{0:14,1:8}};n.charmap=r(n.alphabet,n.charmap);var o={alphabet:"0123456789ABCDEFGHJKMNPQRSTVWXYZ",charmap:{O:0,I:1,L:1}};o.charmap=r(o.alphabet,o.charmap);var i={alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",charmap:{}};function a(e){if(this.buf=[],this.shift=8,this.carry=0,e){switch(e.type){case"rfc4648":this.charmap=t.rfc4648.charmap;break;case"crockford":this.charmap=t.crockford.charmap;break;case"base32hex":this.charmap=t.base32hex.charmap;break;default:throw new Error("invalid type")}e.charmap&&(this.charmap=e.charmap)}}function s(e){if(this.buf="",this.shift=3,this.carry=0,e){switch(e.type){case"rfc4648":this.alphabet=t.rfc4648.alphabet;break;case"crockford":this.alphabet=t.crockford.alphabet;break;case"base32hex":this.alphabet=t.base32hex.alphabet;break;default:throw new Error("invalid type")}e.alphabet?this.alphabet=e.alphabet:e.lc&&(this.alphabet=this.alphabet.toLowerCase())}}i.charmap=r(i.alphabet,i.charmap),a.prototype.charmap=n.charmap,a.prototype.write=function(e){var t=this.charmap,r=this.buf,n=this.shift,o=this.carry;return e.toUpperCase().split("").forEach((function(e){if("="!=e){var i=255&t[e];(n-=5)>0?o|=i<<n:n<0?(r.push(o|i>>-n),o=i<<(n+=8)&255):(r.push(o|i),n=8,o=0)}})),this.shift=n,this.carry=o,this},a.prototype.finalize=function(e){return e&&this.write(e),8!==this.shift&&0!==this.carry&&(this.buf.push(this.carry),this.shift=8,this.carry=0),this.buf},s.prototype.alphabet=n.alphabet,s.prototype.write=function(e){var t,r,n,o=this.shift,i=this.carry;for(n=0;n<e.length;n++)t=i|(r=e[n])>>o,this.buf+=this.alphabet[31&t],o>5&&(t=r>>(o-=5),this.buf+=this.alphabet[31&t]),i=r<<(o=5-o),o=8-o;return this.shift=o,this.carry=i,this},s.prototype.finalize=function(e){return e&&this.write(e),3!==this.shift&&(this.buf+=this.alphabet[31&this.carry],this.shift=3,this.carry=0),this.buf},t.encode=function(e,t){return new s(t).finalize(e)},t.decode=function(e,t){return new a(t).finalize(e)},t.Decoder=a,t.Encoder=s,t.charmap=r,t.crockford=o,t.rfc4648=n,t.base32hex=i},7526:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=s(e),a=i[0],u=i[1],c=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,u)),l=0,f=u>0?a-4:a;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t);1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],a=16383,s=0,c=n-o;s<c;s+=a)i.push(u(e,s,s+a>c?c:s+a));1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=i[a],n[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var o,i,a=[],s=t;s<n;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8287:(e,t,r)=>{"use strict";var n=r(6763);const o=r(7526),i=r(251),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function u(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return p(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=u(r);const o=n.write(e,t);o!==r&&(n=n.slice(0,o));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);const o=function(e){if(c.isBuffer(e)){const t=0|y(e.length),r=u(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||J(e.length)?u(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function p(e){return f(e),u(e<0?0:0|y(e))}function h(e){const t=e.length<0?0:0|y(e.length),r=u(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,c.prototype),n}function y(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function m(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(e).length;default:if(o)return n?-1:$(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return B(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return _(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:w(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function w(e,t,r,n,o){let i,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let n=-1;for(i=r;i<s;i++)if(c(e,i)===c(t,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===u)return n*a}else-1!==n&&(i-=i-n),n=-1}else for(r+u>s&&(r=s-u),i=r;i>=0;i--){let r=!0;for(let n=0;n<u;n++)if(c(e,i+n)!==c(t,n)){r=!1;break}if(r)return i}return-1}function S(e,t,r,n){r=Number(r)||0;const o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;const i=t.length;let a;for(n>i/2&&(n=i/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(J(n))return a;e[r+a]=n}return a}function k(e,t,r,n){return G($(t,e.length-r),e,r,n)}function E(e,t,r,n){return G(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function A(e,t,r,n){return G(W(t),e,r,n)}function T(e,t,r,n){return G(function(e,t){let r,n,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?o.fromByteArray(e):o.fromByteArray(e.slice(t,r))}function P(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o<r;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=r){let r,n,s,u;switch(a){case 1:t<128&&(i=t);break;case 2:r=e[o+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(i=u));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(i=u));break;case 4:r=e[o+1],n=e[o+2],s=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(i=u))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=a}return function(e){const t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=x));return r}(n)}t.kMaxLength=s,c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||void 0===n||"function"!=typeof n.error||n.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return f(e),e<=0?u(e):void 0!==t?"string"==typeof r?u(e).fill(t,r):u(e).fill(t):u(e)}(e,t,r)},c.allocUnsafe=function(e){return p(e)},c.allocUnsafeSlow=function(e){return p(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),Y(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=c.allocUnsafe(t);let o=0;for(r=0;r<e.length;++r){let t=e[r];if(Y(t,Uint8Array))o+t.length>n.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)v(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?P(this,0,e):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},a&&(c.prototype[a]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,o){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(i,a),u=this.slice(n,o),l=e.slice(t,r);for(let e=0;e<s;++e)if(u[e]!==l[e]){i=u[e],a=l[e];break}return i<a?-1:a<i?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let i=!1;for(;;)switch(n){case"hex":return S(this,e,t,r);case"utf8":case"utf-8":return k(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const x=4096;function I(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function _(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function B(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=t;n<r;++n)o+=Z[e[n]];return o}function R(e,t,r){const n=e.slice(t,r);let o="";for(let e=0;e<n.length-1;e+=2)o+=String.fromCharCode(n[e]+256*n[e+1]);return o}function C(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function U(e,t,r,n,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function N(e,t,r,n,o){K(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function L(e,t,r,n,o){K(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function j(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function M(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),c.prototype.readBigUInt64BE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=Q((function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){U(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){U(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=Q((function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=Q((function(e,t=0){return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);U(this,e,t,r,n-1,-n)}let o=0,i=1,a=0;for(this[t]=255&e;++o<r&&(i*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/i|0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);U(this,e,t,r,n-1,-n)}let o=r-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i|0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=Q((function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=Q((function(e,t=0){return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return M(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return M(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const o=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},c.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{const i=c.isBuffer(e)?e:c.from(e,n),a=i.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=i[o%a]}return this};const D={};function V(e,t,r){D[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function q(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function K(e,t,r,n,o,i){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let o;throw o=i>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(i+1)}${n}`:`>= -(2${n} ** ${8*(i+1)-1}${n}) and < 2 ** ${8*(i+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new D.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||z(t,e.length-(r+1))}(n,o,i)}function H(e,t){if("number"!=typeof e)throw new D.ERR_INVALID_ARG_TYPE(t,"number",e)}function z(e,t,r){if(Math.floor(e)!==e)throw H(e,r),new D.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}V("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),V("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),V("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=q(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=q(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n}),RangeError);const X=/[^+/0-9A-Za-z-_]/g;function $(e,t){let r;t=t||1/0;const n=e.length;let o=null;const i=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function W(e){return o.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(X,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function G(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const Z=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function Q(e){return"undefined"==typeof BigInt?ee:e}function ee(){throw new Error("BigInt not supported")}},8075:(e,t,r)=>{"use strict";var n=r(453),o=r(487),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},487:(e,t,r)=>{"use strict";var n=r(6743),o=r(453),i=r(6897),a=r(9675),s=o("%Function.prototype.apply%"),u=o("%Function.prototype.call%"),c=o("%Reflect.apply%",!0)||n.call(u,s),l=r(655),f=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=c(n,u,arguments);return i(t,1+f(0,e.length-(arguments.length-1)),!0)};var p=function(){return c(n,s,arguments)};l?l(e.exports,"apply",{value:p}):e.exports.apply=p},6763:(e,t,r)=>{var n=r(537),o=r(4148);function i(){return(new Date).getTime()}var a,s=Array.prototype.slice,u={};a=void 0!==r.g&&r.g.console?r.g.console:"undefined"!=typeof window&&window.console?window.console:{};for(var c=[[function(){},"log"],[function(){a.log.apply(a,arguments)},"info"],[function(){a.log.apply(a,arguments)},"warn"],[function(){a.warn.apply(a,arguments)},"error"],[function(e){u[e]=i()},"time"],[function(e){var t=u[e];if(!t)throw new Error("No such label: "+e);delete u[e];var r=i()-t;a.log(e+": "+r+"ms")},"timeEnd"],[function(){var e=new Error;e.name="Trace",e.message=n.format.apply(null,arguments),a.error(e.stack)},"trace"],[function(e){a.log(n.inspect(e)+"\n")},"dir"],[function(e){if(!e){var t=s.call(arguments,1);o.ok(!1,n.format.apply(null,t))}},"assert"]],l=0;l<c.length;l++){var f=c[l],p=f[0],h=f[1];a[h]||(a[h]=p)}e.exports=a},41:(e,t,r)=>{"use strict";var n=r(655),o=r(8068),i=r(9675),a=r(5795);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!a&&a(e,t);if(n)n(e,t,{configurable:null===c&&f?f.configurable:!c,enumerable:null===s&&f?f.enumerable:!s,value:r,writable:null===u&&f?f.writable:!u});else{if(!l&&(s||u||c))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},8452:(e,t,r)=>{"use strict";var n=r(1189),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=r(41),u=r(592)(),c=function(e,t,r,n){if(t in e)if(!0===n){if(e[t]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;u?s(e,t,r,!0):s(e,t,r)},l=function(e,t){var r=arguments.length>2?arguments[2]:{},i=n(t);o&&(i=a.call(i,Object.getOwnPropertySymbols(t)));for(var s=0;s<i.length;s+=1)c(e,i[s],t[i[s]],r[i[s]])};l.supportsDescriptors=!!u,e.exports=l},655:(e,t,r)=>{"use strict";var n=r(453)("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch(e){n=!1}e.exports=n},1237:e=>{"use strict";e.exports=EvalError},9383:e=>{"use strict";e.exports=Error},9290:e=>{"use strict";e.exports=RangeError},9538:e=>{"use strict";e.exports=ReferenceError},8068:e=>{"use strict";e.exports=SyntaxError},9675:e=>{"use strict";e.exports=TypeError},5345:e=>{"use strict";e.exports=URIError},2682:(e,t,r)=>{"use strict";var n=r(9600),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=r),"[object Array]"===o.call(e)?function(e,t,r){for(var n=0,o=e.length;n<o;n++)i.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,a):"string"==typeof e?function(e,t,r){for(var n=0,o=e.length;n<o;n++)null==r?t(e.charAt(n),n,e):t.call(r,e.charAt(n),n,e)}(e,t,a):function(e,t,r){for(var n in e)i.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,a)}},9353:e=>{"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r};e.exports=function(e){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,a=function(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r}(arguments,1),s=r(0,o.length-a.length),u=[],c=0;c<s;c++)u[c]="$"+c;if(i=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r}(u,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var t=o.apply(this,n(a,arguments));return Object(t)===t?t:this}return o.apply(e,n(a,arguments))})),o.prototype){var l=function(){};l.prototype=o.prototype,i.prototype=new l,l.prototype=null}return i}},6743:(e,t,r)=>{"use strict";var n=r(9353);e.exports=Function.prototype.bind||n},453:(e,t,r)=>{"use strict";var n,o=r(9383),i=r(1237),a=r(9290),s=r(9538),u=r(8068),c=r(9675),l=r(5345),f=Function,p=function(e){try{return f('"use strict"; return ('+e+").constructor;")()}catch(e){}},h=Object.getOwnPropertyDescriptor;if(h)try{h({},"")}catch(e){h=null}var d=function(){throw new c},y=h?function(){try{return d}catch(e){try{return h(arguments,"callee").get}catch(e){return d}}}():d,m=r(4039)(),g=r(24)(),v=Object.getPrototypeOf||(g?function(e){return e.__proto__}:null),b={},w="undefined"!=typeof Uint8Array&&v?v(Uint8Array):n,S={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":m&&v?v([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":f,"%GeneratorFunction%":b,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":m&&v?v(v([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&m&&v?v((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&m&&v?v((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":m&&v?v(""[Symbol.iterator]()):n,"%Symbol%":m?Symbol:n,"%SyntaxError%":u,"%ThrowTypeError%":y,"%TypedArray%":w,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(v)try{null.error}catch(e){var k=v(v(e));S["%Error.prototype%"]=k}var E=function e(t){var r;if("%AsyncFunction%"===t)r=p("async function () {}");else if("%GeneratorFunction%"===t)r=p("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=p("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(r=v(o.prototype))}return S[t]=r,r},A={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},T=r(6743),O=r(9957),P=T.call(Function.call,Array.prototype.concat),x=T.call(Function.apply,Array.prototype.splice),I=T.call(Function.call,String.prototype.replace),_=T.call(Function.call,String.prototype.slice),B=T.call(Function.call,RegExp.prototype.exec),R=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,C=/\\(\\)?/g,U=function(e,t){var r,n=e;if(O(A,n)&&(n="%"+(r=A[n])[0]+"%"),O(S,n)){var o=S[n];if(o===b&&(o=E(n)),void 0===o&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new u("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===B(/^%?[^%]*%?$/,e))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=_(e,0,1),r=_(e,-1);if("%"===t&&"%"!==r)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new u("invalid intrinsic syntax, expected opening `%`");var n=[];return I(e,R,(function(e,t,r,o){n[n.length]=r?I(o,C,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",o=U("%"+n+"%",t),i=o.name,a=o.value,s=!1,l=o.alias;l&&(n=l[0],x(r,P([0,1],l)));for(var f=1,p=!0;f<r.length;f+=1){var d=r[f],y=_(d,0,1),m=_(d,-1);if(('"'===y||"'"===y||"`"===y||'"'===m||"'"===m||"`"===m)&&y!==m)throw new u("property names with quotes must have matching quotes");if("constructor"!==d&&p||(s=!0),O(S,i="%"+(n+="."+d)+"%"))a=S[i];else if(null!=a){if(!(d in a)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(h&&f+1>=r.length){var g=h(a,d);a=(p=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:a[d]}else p=O(a,d),a=a[d];p&&!s&&(S[i]=a)}}return a}},5795:(e,t,r)=>{"use strict";var n=r(453)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},592:(e,t,r)=>{"use strict";var n=r(655),o=function(){return!!n};o.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},24:e=>{"use strict";var t={__proto__:null,foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof r)}},4039:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(1333);e.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},1333:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9092:(e,t,r)=>{"use strict";var n=r(1333);e.exports=function(){return n()&&!!Symbol.toStringTag}},9957:(e,t,r)=>{"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=r(6743);e.exports=i.call(n,o)},251:(e,t)=>{t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?o-1:0,p=r?-1:1,h=e[t+f];for(f+=p,i=h&(1<<-l)-1,h>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=p,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+e[t+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),i-=c}return(h?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,u,c=8*i-o-1,l=(1<<c)-1,f=l>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,d=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[r+h]=255&s,h+=d,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[r+h]=255&a,h+=d,a/=256,c-=8);e[r+h-d]|=128*y}},6698:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},7244:(e,t,r)=>{"use strict";var n=r(9092)(),o=r(8075)("Object.prototype.toString"),i=function(e){return!(n&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===o(e)},a=function(e){return!!i(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==o(e)&&"[object Function]"===o(e.callee)},s=function(){return i(arguments)}();i.isLegacyArguments=a,e.exports=s?i:a},9600:e=>{"use strict";var t,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,t)}catch(e){e!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(e){try{var t=n.call(e);return i.test(t)}catch(e){return!1}},s=function(e){try{return!a(e)&&(n.call(e),!0)}catch(e){return!1}},u=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;u.call(p)===u.call(document.all)&&(f=function(e){if((l||!e)&&(void 0===e||"object"==typeof e))try{var t=u.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=o?function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,t)}catch(e){if(e!==r)return!1}return!a(e)&&s(e)}:function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(c)return s(e);if(a(e))return!1;var t=u.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&s(e)}},8184:(e,t,r)=>{"use strict";var n,o=Object.prototype.toString,i=Function.prototype.toString,a=/^\s*(?:function)?\*/,s=r(9092)(),u=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(a.test(i.call(e)))return!0;if(!s)return"[object GeneratorFunction]"===o.call(e);if(!u)return!1;if(void 0===n){var t=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&u(t)}return u(e)===n}},3003:e=>{"use strict";e.exports=function(e){return e!=e}},4133:(e,t,r)=>{"use strict";var n=r(487),o=r(8452),i=r(3003),a=r(6642),s=r(2464),u=n(a(),Number);o(u,{getPolyfill:a,implementation:i,shim:s}),e.exports=u},6642:(e,t,r)=>{"use strict";var n=r(3003);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},2464:(e,t,r)=>{"use strict";var n=r(8452),o=r(6642);e.exports=function(){var e=o();return n(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},5680:(e,t,r)=>{"use strict";var n=r(5767);e.exports=function(e){return!!n(e)}},9211:e=>{"use strict";var t=function(e){return e!=e};e.exports=function(e,r){return 0===e&&0===r?1/e==1/r:e===r||!(!t(e)||!t(r))}},7653:(e,t,r)=>{"use strict";var n=r(8452),o=r(487),i=r(9211),a=r(9394),s=r(6576),u=o(a(),Object);n(u,{getPolyfill:a,implementation:i,shim:s}),e.exports=u},9394:(e,t,r)=>{"use strict";var n=r(9211);e.exports=function(){return"function"==typeof Object.is?Object.is:n}},6576:(e,t,r)=>{"use strict";var n=r(9394),o=r(8452);e.exports=function(){var e=n();return o(Object,{is:e},{is:function(){return Object.is!==e}}),e}},8875:(e,t,r)=>{"use strict";var n;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=r(1093),s=Object.prototype.propertyIsEnumerable,u=!s.call({toString:null},"toString"),c=s.call((function(){}),"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(e){var t=e.constructor;return t&&t.prototype===e},p={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!p["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{f(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===i.call(e),n=a(e),s=t&&"[object String]"===i.call(e),p=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var d=c&&r;if(s&&e.length>0&&!o.call(e,0))for(var y=0;y<e.length;++y)p.push(String(y));if(n&&e.length>0)for(var m=0;m<e.length;++m)p.push(String(m));else for(var g in e)d&&"prototype"===g||!o.call(e,g)||p.push(String(g));if(u)for(var v=function(e){if("undefined"==typeof window||!h)return f(e);try{return f(e)}catch(e){return!1}}(e),b=0;b<l.length;++b)v&&"constructor"===l[b]||!o.call(e,l[b])||p.push(l[b]);return p}}e.exports=n},1189:(e,t,r)=>{"use strict";var n=Array.prototype.slice,o=r(1093),i=Object.keys,a=i?function(e){return i(e)}:r(8875),s=Object.keys;a.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return o(e)?s(n.call(e)):s(e)})}else Object.keys=a;return Object.keys||a},e.exports=a},1093:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},8403:(e,t,r)=>{"use strict";var n=r(1189),o=r(1333)(),i=r(8075),a=Object,s=i("Array.prototype.push"),u=i("Object.prototype.propertyIsEnumerable"),c=o?Object.getOwnPropertySymbols:null;e.exports=function(e,t){if(null==e)throw new TypeError("target must be an object");var r=a(e);if(1===arguments.length)return r;for(var i=1;i<arguments.length;++i){var l=a(arguments[i]),f=n(l),p=o&&(Object.getOwnPropertySymbols||c);if(p)for(var h=p(l),d=0;d<h.length;++d){var y=h[d];u(l,y)&&s(f,y)}for(var m=0;m<f.length;++m){var g=f[m];if(u(l,g)){var v=l[g];r[g]=v}}}return r}},1514:(e,t,r)=>{"use strict";var n=r(8403);e.exports=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},n=0;n<t.length;++n)r[t[n]]=t[n];var o=Object.assign({},r),i="";for(var a in o)i+=a;return e!==i}()||function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch(t){return"y"===e[1]}return!1}()?n:Object.assign:n}},6578:e=>{"use strict";e.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},5606:e=>{var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,u=[],c=!1,l=-1;function f(){c&&s&&(c=!1,s.length?u=s.concat(u):l=-1,u.length&&p())}function p(){if(!c){var e=a(f);c=!0;for(var t=u.length;t;){for(s=u,u=[];++l<t;)s&&s[l].run();l=-1,t=u.length}s=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function d(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new h(e,t)),1!==u.length||c||a(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=d,n.addListener=d,n.once=d,n.off=d,n.removeListener=d,n.removeAllListeners=d,n.emit=d,n.prependListener=d,n.prependOnceListener=d,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},2861:(e,t,r)=>{var n=r(8287),o=n.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return o(e,t,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=n:(i(n,t),t.Buffer=a),a.prototype=Object.create(o.prototype),i(o,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},6897:(e,t,r)=>{"use strict";var n=r(453),o=r(41),i=r(592)(),a=r(5795),s=r(9675),u=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||u(t)!==t)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,c=!0;if("length"in e&&a){var l=a(e,"length");l&&!l.configurable&&(n=!1),l&&!l.writable&&(c=!1)}return(n||c||!r)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},392:(e,t,r)=>{var n=r(2861).Buffer;function o(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}o.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,o=this._blockSize,i=e.length,a=this._len,s=0;s<i;){for(var u=a%o,c=Math.min(i-s,o-u),l=0;l<c;l++)r[u+l]=e[s+l];s+=c,(a+=c)%o==0&&this._update(r)}return this._len+=i,this},o.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,o=(r-n)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},o.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=o},2802:(e,t,r)=>{var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(7816),n.sha1=r(3737),n.sha224=r(6710),n.sha256=r(4107),n.sha384=r(2827),n.sha512=r(2890)},7816:(e,t,r)=>{var n=r(6698),o=r(392),i=r(2861).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,o.call(this,64,56)}function c(e){return e<<30|e>>>2}function l(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,o),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,o=0|this._b,i=0|this._c,s=0|this._d,u=0|this._e,f=0;f<16;++f)r[f]=e.readInt32BE(4*f);for(;f<80;++f)r[f]=r[f-3]^r[f-8]^r[f-14]^r[f-16];for(var p=0;p<80;++p){var h=~~(p/20),d=0|((t=n)<<5|t>>>27)+l(h,o,i,s)+u+r[p]+a[h];u=s,s=i,i=c(o),o=n,n=d}this._a=n+this._a|0,this._b=o+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=i.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},3737:(e,t,r)=>{var n=r(6698),o=r(392),i=r(2861).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,o.call(this,64,56)}function c(e){return e<<5|e>>>27}function l(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,o),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,o=0|this._b,i=0|this._c,s=0|this._d,u=0|this._e,p=0;p<16;++p)r[p]=e.readInt32BE(4*p);for(;p<80;++p)r[p]=(t=r[p-3]^r[p-8]^r[p-14]^r[p-16])<<1|t>>>31;for(var h=0;h<80;++h){var d=~~(h/20),y=c(n)+f(d,o,i,s)+u+r[h]+a[d]|0;u=s,s=i,i=l(o),o=n,n=y}this._a=n+this._a|0,this._b=o+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=i.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},6710:(e,t,r)=>{var n=r(6698),o=r(4107),i=r(392),a=r(2861).Buffer,s=new Array(64);function u(){this.init(),this._w=s,i.call(this,64,56)}n(u,o),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},4107:(e,t,r)=>{var n=r(6698),o=r(392),i=r(2861).Buffer,a=[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],s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function f(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function p(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(u,o),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,o=0|this._b,i=0|this._c,s=0|this._d,u=0|this._e,d=0|this._f,y=0|this._g,m=0|this._h,g=0;g<16;++g)r[g]=e.readInt32BE(4*g);for(;g<64;++g)r[g]=0|(((t=r[g-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[g-7]+h(r[g-15])+r[g-16];for(var v=0;v<64;++v){var b=m+p(u)+c(u,d,y)+a[v]+r[v]|0,w=f(n)+l(n,o,i)|0;m=y,y=d,d=u,u=s+b|0,s=i,i=o,o=n,n=b+w|0}this._a=n+this._a|0,this._b=o+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=d+this._f|0,this._g=y+this._g|0,this._h=m+this._h|0},u.prototype._hash=function(){var e=i.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},2827:(e,t,r)=>{var n=r(6698),o=r(2890),i=r(392),a=r(2861).Buffer,s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}n(u,o),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=u},2890:(e,t,r)=>{var n=r(6698),o=r(392),i=r(2861).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function f(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function p(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function y(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function g(e,t){return e>>>0<t>>>0?1:0}n(u,o),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,o=0|this._ch,i=0|this._dh,s=0|this._eh,u=0|this._fh,v=0|this._gh,b=0|this._hh,w=0|this._al,S=0|this._bl,k=0|this._cl,E=0|this._dl,A=0|this._el,T=0|this._fl,O=0|this._gl,P=0|this._hl,x=0;x<32;x+=2)t[x]=e.readInt32BE(4*x),t[x+1]=e.readInt32BE(4*x+4);for(;x<160;x+=2){var I=t[x-30],_=t[x-30+1],B=h(I,_),R=d(_,I),C=y(I=t[x-4],_=t[x-4+1]),U=m(_,I),N=t[x-14],L=t[x-14+1],j=t[x-32],M=t[x-32+1],F=R+L|0,D=B+N+g(F,R)|0;D=(D=D+C+g(F=F+U|0,U)|0)+j+g(F=F+M|0,M)|0,t[x]=D,t[x+1]=F}for(var V=0;V<160;V+=2){D=t[V],F=t[V+1];var q=l(r,n,o),K=l(w,S,k),H=f(r,w),z=f(w,r),X=p(s,A),$=p(A,s),W=a[V],G=a[V+1],Y=c(s,u,v),J=c(A,T,O),Z=P+$|0,Q=b+X+g(Z,P)|0;Q=(Q=(Q=Q+Y+g(Z=Z+J|0,J)|0)+W+g(Z=Z+G|0,G)|0)+D+g(Z=Z+F|0,F)|0;var ee=z+K|0,te=H+q+g(ee,z)|0;b=v,P=O,v=u,O=T,u=s,T=A,s=i+Q+g(A=E+Z|0,E)|0,i=o,E=k,o=n,k=S,n=r,S=w,r=Q+te+g(w=Z+ee|0,Z)|0}this._al=this._al+w|0,this._bl=this._bl+S|0,this._cl=this._cl+k|0,this._dl=this._dl+E|0,this._el=this._el+A|0,this._fl=this._fl+T|0,this._gl=this._gl+O|0,this._hl=this._hl+P|0,this._ah=this._ah+r+g(this._al,w)|0,this._bh=this._bh+n+g(this._bl,S)|0,this._ch=this._ch+o+g(this._cl,k)|0,this._dh=this._dh+i+g(this._dl,E)|0,this._eh=this._eh+s+g(this._el,A)|0,this._fh=this._fh+u+g(this._fl,T)|0,this._gh=this._gh+v+g(this._gl,O)|0,this._hh=this._hh+b+g(this._hl,P)|0},u.prototype._hash=function(){var e=i.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},8947:(e,t,r)=>{!function(e){"use strict";var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},n=function(){throw new Error("no PRNG")},o=new Uint8Array(16),i=new Uint8Array(32);i[0]=9;var a=t(),s=t([1]),u=t([56129,1]),c=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),l=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),f=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),p=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),h=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function d(e,t,r,n){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function y(e,t,r,n,o){var i,a=0;for(i=0;i<o;i++)a|=e[t+i]^r[n+i];return(1&a-1>>>8)-1}function m(e,t,r,n){return y(e,t,r,n,16)}function g(e,t,r,n){return y(e,t,r,n,32)}function v(e,t,r,n){!function(e,t,r,n){for(var o,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,p=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,g=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,v=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,S=i,k=a,E=s,A=u,T=c,O=l,P=f,x=p,I=h,_=d,B=y,R=m,C=g,U=v,N=b,L=w,j=0;j<20;j+=2)S^=(o=(C^=(o=(I^=(o=(T^=(o=S+C|0)<<7|o>>>25)+S|0)<<9|o>>>23)+T|0)<<13|o>>>19)+I|0)<<18|o>>>14,O^=(o=(k^=(o=(U^=(o=(_^=(o=O+k|0)<<7|o>>>25)+O|0)<<9|o>>>23)+_|0)<<13|o>>>19)+U|0)<<18|o>>>14,B^=(o=(P^=(o=(E^=(o=(N^=(o=B+P|0)<<7|o>>>25)+B|0)<<9|o>>>23)+N|0)<<13|o>>>19)+E|0)<<18|o>>>14,L^=(o=(R^=(o=(x^=(o=(A^=(o=L+R|0)<<7|o>>>25)+L|0)<<9|o>>>23)+A|0)<<13|o>>>19)+x|0)<<18|o>>>14,S^=(o=(A^=(o=(E^=(o=(k^=(o=S+A|0)<<7|o>>>25)+S|0)<<9|o>>>23)+k|0)<<13|o>>>19)+E|0)<<18|o>>>14,O^=(o=(T^=(o=(x^=(o=(P^=(o=O+T|0)<<7|o>>>25)+O|0)<<9|o>>>23)+P|0)<<13|o>>>19)+x|0)<<18|o>>>14,B^=(o=(_^=(o=(I^=(o=(R^=(o=B+_|0)<<7|o>>>25)+B|0)<<9|o>>>23)+R|0)<<13|o>>>19)+I|0)<<18|o>>>14,L^=(o=(N^=(o=(U^=(o=(C^=(o=L+N|0)<<7|o>>>25)+L|0)<<9|o>>>23)+C|0)<<13|o>>>19)+U|0)<<18|o>>>14;S=S+i|0,k=k+a|0,E=E+s|0,A=A+u|0,T=T+c|0,O=O+l|0,P=P+f|0,x=x+p|0,I=I+h|0,_=_+d|0,B=B+y|0,R=R+m|0,C=C+g|0,U=U+v|0,N=N+b|0,L=L+w|0,e[0]=S>>>0&255,e[1]=S>>>8&255,e[2]=S>>>16&255,e[3]=S>>>24&255,e[4]=k>>>0&255,e[5]=k>>>8&255,e[6]=k>>>16&255,e[7]=k>>>24&255,e[8]=E>>>0&255,e[9]=E>>>8&255,e[10]=E>>>16&255,e[11]=E>>>24&255,e[12]=A>>>0&255,e[13]=A>>>8&255,e[14]=A>>>16&255,e[15]=A>>>24&255,e[16]=T>>>0&255,e[17]=T>>>8&255,e[18]=T>>>16&255,e[19]=T>>>24&255,e[20]=O>>>0&255,e[21]=O>>>8&255,e[22]=O>>>16&255,e[23]=O>>>24&255,e[24]=P>>>0&255,e[25]=P>>>8&255,e[26]=P>>>16&255,e[27]=P>>>24&255,e[28]=x>>>0&255,e[29]=x>>>8&255,e[30]=x>>>16&255,e[31]=x>>>24&255,e[32]=I>>>0&255,e[33]=I>>>8&255,e[34]=I>>>16&255,e[35]=I>>>24&255,e[36]=_>>>0&255,e[37]=_>>>8&255,e[38]=_>>>16&255,e[39]=_>>>24&255,e[40]=B>>>0&255,e[41]=B>>>8&255,e[42]=B>>>16&255,e[43]=B>>>24&255,e[44]=R>>>0&255,e[45]=R>>>8&255,e[46]=R>>>16&255,e[47]=R>>>24&255,e[48]=C>>>0&255,e[49]=C>>>8&255,e[50]=C>>>16&255,e[51]=C>>>24&255,e[52]=U>>>0&255,e[53]=U>>>8&255,e[54]=U>>>16&255,e[55]=U>>>24&255,e[56]=N>>>0&255,e[57]=N>>>8&255,e[58]=N>>>16&255,e[59]=N>>>24&255,e[60]=L>>>0&255,e[61]=L>>>8&255,e[62]=L>>>16&255,e[63]=L>>>24&255}(e,t,r,n)}function b(e,t,r,n){!function(e,t,r,n){for(var o,i=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,p=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,y=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,m=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,g=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,v=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,S=0;S<20;S+=2)i^=(o=(g^=(o=(h^=(o=(c^=(o=i+g|0)<<7|o>>>25)+i|0)<<9|o>>>23)+c|0)<<13|o>>>19)+h|0)<<18|o>>>14,l^=(o=(a^=(o=(v^=(o=(d^=(o=l+a|0)<<7|o>>>25)+l|0)<<9|o>>>23)+d|0)<<13|o>>>19)+v|0)<<18|o>>>14,y^=(o=(f^=(o=(s^=(o=(b^=(o=y+f|0)<<7|o>>>25)+y|0)<<9|o>>>23)+b|0)<<13|o>>>19)+s|0)<<18|o>>>14,w^=(o=(m^=(o=(p^=(o=(u^=(o=w+m|0)<<7|o>>>25)+w|0)<<9|o>>>23)+u|0)<<13|o>>>19)+p|0)<<18|o>>>14,i^=(o=(u^=(o=(s^=(o=(a^=(o=i+u|0)<<7|o>>>25)+i|0)<<9|o>>>23)+a|0)<<13|o>>>19)+s|0)<<18|o>>>14,l^=(o=(c^=(o=(p^=(o=(f^=(o=l+c|0)<<7|o>>>25)+l|0)<<9|o>>>23)+f|0)<<13|o>>>19)+p|0)<<18|o>>>14,y^=(o=(d^=(o=(h^=(o=(m^=(o=y+d|0)<<7|o>>>25)+y|0)<<9|o>>>23)+m|0)<<13|o>>>19)+h|0)<<18|o>>>14,w^=(o=(b^=(o=(v^=(o=(g^=(o=w+b|0)<<7|o>>>25)+w|0)<<9|o>>>23)+g|0)<<13|o>>>19)+v|0)<<18|o>>>14;e[0]=i>>>0&255,e[1]=i>>>8&255,e[2]=i>>>16&255,e[3]=i>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=y>>>0&255,e[9]=y>>>8&255,e[10]=y>>>16&255,e[11]=y>>>24&255,e[12]=w>>>0&255,e[13]=w>>>8&255,e[14]=w>>>16&255,e[15]=w>>>24&255,e[16]=f>>>0&255,e[17]=f>>>8&255,e[18]=f>>>16&255,e[19]=f>>>24&255,e[20]=p>>>0&255,e[21]=p>>>8&255,e[22]=p>>>16&255,e[23]=p>>>24&255,e[24]=h>>>0&255,e[25]=h>>>8&255,e[26]=h>>>16&255,e[27]=h>>>24&255,e[28]=d>>>0&255,e[29]=d>>>8&255,e[30]=d>>>16&255,e[31]=d>>>24&255}(e,t,r,n)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function S(e,t,r,n,o,i,a){var s,u,c=new Uint8Array(16),l=new Uint8Array(64);for(u=0;u<16;u++)c[u]=0;for(u=0;u<8;u++)c[u]=i[u];for(;o>=64;){for(v(l,c,a,w),u=0;u<64;u++)e[t+u]=r[n+u]^l[u];for(s=1,u=8;u<16;u++)s=s+(255&c[u])|0,c[u]=255&s,s>>>=8;o-=64,t+=64,n+=64}if(o>0)for(v(l,c,a,w),u=0;u<o;u++)e[t+u]=r[n+u]^l[u];return 0}function k(e,t,r,n,o){var i,a,s=new Uint8Array(16),u=new Uint8Array(64);for(a=0;a<16;a++)s[a]=0;for(a=0;a<8;a++)s[a]=n[a];for(;r>=64;){for(v(u,s,o,w),a=0;a<64;a++)e[t+a]=u[a];for(i=1,a=8;a<16;a++)i=i+(255&s[a])|0,s[a]=255&i,i>>>=8;r-=64,t+=64}if(r>0)for(v(u,s,o,w),a=0;a<r;a++)e[t+a]=u[a];return 0}function E(e,t,r,n,o){var i=new Uint8Array(32);b(i,n,o,w);for(var a=new Uint8Array(8),s=0;s<8;s++)a[s]=n[s+16];return k(e,t,r,a,i)}function A(e,t,r,n,o,i,a){var s=new Uint8Array(32);b(s,i,a,w);for(var u=new Uint8Array(8),c=0;c<8;c++)u[c]=i[c+16];return S(e,t,r,n,o,u,s)}var T=function(e){var t,r,n,o,i,a,s,u;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,r=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),o=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|o<<9),i=255&e[8]|(255&e[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,a=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(i>>>14|a<<2),s=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(a>>>11|s<<5),u=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(s>>>8|u<<8),this.r[9]=u>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function O(e,t,r,n,o,i){var a=new T(i);return a.update(r,n,o),a.finish(e,t),0}function P(e,t,r,n,o,i){var a=new Uint8Array(16);return O(a,0,r,n,o,i),m(e,t,a,0)}function x(e,t,r,n,o){var i;if(r<32)return-1;for(A(e,0,t,0,r,n,o),O(e,16,e,32,r-32,e),i=0;i<16;i++)e[i]=0;return 0}function I(e,t,r,n,o){var i,a=new Uint8Array(32);if(r<32)return-1;if(E(a,0,32,n,o),0!==P(t,16,t,32,r-32,a))return-1;for(A(e,0,t,0,r,n,o),i=0;i<32;i++)e[i]=0;return 0}function _(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function B(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function R(e,t,r){for(var n,o=~(r-1),i=0;i<16;i++)n=o&(e[i]^t[i]),e[i]^=n,t[i]^=n}function C(e,r){var n,o,i,a=t(),s=t();for(n=0;n<16;n++)s[n]=r[n];for(B(s),B(s),B(s),o=0;o<2;o++){for(a[0]=s[0]-65517,n=1;n<15;n++)a[n]=s[n]-65535-(a[n-1]>>16&1),a[n-1]&=65535;a[15]=s[15]-32767-(a[14]>>16&1),i=a[15]>>16&1,a[14]&=65535,R(s,a,1-i)}for(n=0;n<16;n++)e[2*n]=255&s[n],e[2*n+1]=s[n]>>8}function U(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return C(r,e),C(n,t),g(r,0,n,0)}function N(e){var t=new Uint8Array(32);return C(t,e),1&t[0]}function L(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function j(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function M(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function F(e,t,r){var n,o,i=0,a=0,s=0,u=0,c=0,l=0,f=0,p=0,h=0,d=0,y=0,m=0,g=0,v=0,b=0,w=0,S=0,k=0,E=0,A=0,T=0,O=0,P=0,x=0,I=0,_=0,B=0,R=0,C=0,U=0,N=0,L=r[0],j=r[1],M=r[2],F=r[3],D=r[4],V=r[5],q=r[6],K=r[7],H=r[8],z=r[9],X=r[10],$=r[11],W=r[12],G=r[13],Y=r[14],J=r[15];i+=(n=t[0])*L,a+=n*j,s+=n*M,u+=n*F,c+=n*D,l+=n*V,f+=n*q,p+=n*K,h+=n*H,d+=n*z,y+=n*X,m+=n*$,g+=n*W,v+=n*G,b+=n*Y,w+=n*J,a+=(n=t[1])*L,s+=n*j,u+=n*M,c+=n*F,l+=n*D,f+=n*V,p+=n*q,h+=n*K,d+=n*H,y+=n*z,m+=n*X,g+=n*$,v+=n*W,b+=n*G,w+=n*Y,S+=n*J,s+=(n=t[2])*L,u+=n*j,c+=n*M,l+=n*F,f+=n*D,p+=n*V,h+=n*q,d+=n*K,y+=n*H,m+=n*z,g+=n*X,v+=n*$,b+=n*W,w+=n*G,S+=n*Y,k+=n*J,u+=(n=t[3])*L,c+=n*j,l+=n*M,f+=n*F,p+=n*D,h+=n*V,d+=n*q,y+=n*K,m+=n*H,g+=n*z,v+=n*X,b+=n*$,w+=n*W,S+=n*G,k+=n*Y,E+=n*J,c+=(n=t[4])*L,l+=n*j,f+=n*M,p+=n*F,h+=n*D,d+=n*V,y+=n*q,m+=n*K,g+=n*H,v+=n*z,b+=n*X,w+=n*$,S+=n*W,k+=n*G,E+=n*Y,A+=n*J,l+=(n=t[5])*L,f+=n*j,p+=n*M,h+=n*F,d+=n*D,y+=n*V,m+=n*q,g+=n*K,v+=n*H,b+=n*z,w+=n*X,S+=n*$,k+=n*W,E+=n*G,A+=n*Y,T+=n*J,f+=(n=t[6])*L,p+=n*j,h+=n*M,d+=n*F,y+=n*D,m+=n*V,g+=n*q,v+=n*K,b+=n*H,w+=n*z,S+=n*X,k+=n*$,E+=n*W,A+=n*G,T+=n*Y,O+=n*J,p+=(n=t[7])*L,h+=n*j,d+=n*M,y+=n*F,m+=n*D,g+=n*V,v+=n*q,b+=n*K,w+=n*H,S+=n*z,k+=n*X,E+=n*$,A+=n*W,T+=n*G,O+=n*Y,P+=n*J,h+=(n=t[8])*L,d+=n*j,y+=n*M,m+=n*F,g+=n*D,v+=n*V,b+=n*q,w+=n*K,S+=n*H,k+=n*z,E+=n*X,A+=n*$,T+=n*W,O+=n*G,P+=n*Y,x+=n*J,d+=(n=t[9])*L,y+=n*j,m+=n*M,g+=n*F,v+=n*D,b+=n*V,w+=n*q,S+=n*K,k+=n*H,E+=n*z,A+=n*X,T+=n*$,O+=n*W,P+=n*G,x+=n*Y,I+=n*J,y+=(n=t[10])*L,m+=n*j,g+=n*M,v+=n*F,b+=n*D,w+=n*V,S+=n*q,k+=n*K,E+=n*H,A+=n*z,T+=n*X,O+=n*$,P+=n*W,x+=n*G,I+=n*Y,_+=n*J,m+=(n=t[11])*L,g+=n*j,v+=n*M,b+=n*F,w+=n*D,S+=n*V,k+=n*q,E+=n*K,A+=n*H,T+=n*z,O+=n*X,P+=n*$,x+=n*W,I+=n*G,_+=n*Y,B+=n*J,g+=(n=t[12])*L,v+=n*j,b+=n*M,w+=n*F,S+=n*D,k+=n*V,E+=n*q,A+=n*K,T+=n*H,O+=n*z,P+=n*X,x+=n*$,I+=n*W,_+=n*G,B+=n*Y,R+=n*J,v+=(n=t[13])*L,b+=n*j,w+=n*M,S+=n*F,k+=n*D,E+=n*V,A+=n*q,T+=n*K,O+=n*H,P+=n*z,x+=n*X,I+=n*$,_+=n*W,B+=n*G,R+=n*Y,C+=n*J,b+=(n=t[14])*L,w+=n*j,S+=n*M,k+=n*F,E+=n*D,A+=n*V,T+=n*q,O+=n*K,P+=n*H,x+=n*z,I+=n*X,_+=n*$,B+=n*W,R+=n*G,C+=n*Y,U+=n*J,w+=(n=t[15])*L,a+=38*(k+=n*M),s+=38*(E+=n*F),u+=38*(A+=n*D),c+=38*(T+=n*V),l+=38*(O+=n*q),f+=38*(P+=n*K),p+=38*(x+=n*H),h+=38*(I+=n*z),d+=38*(_+=n*X),y+=38*(B+=n*$),m+=38*(R+=n*W),g+=38*(C+=n*G),v+=38*(U+=n*Y),b+=38*(N+=n*J),i=(n=(i+=38*(S+=n*j))+(o=1)+65535)-65536*(o=Math.floor(n/65536)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+o+65535)-65536*(o=Math.floor(n/65536)),u=(n=u+o+65535)-65536*(o=Math.floor(n/65536)),c=(n=c+o+65535)-65536*(o=Math.floor(n/65536)),l=(n=l+o+65535)-65536*(o=Math.floor(n/65536)),f=(n=f+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),m=(n=m+o+65535)-65536*(o=Math.floor(n/65536)),g=(n=g+o+65535)-65536*(o=Math.floor(n/65536)),v=(n=v+o+65535)-65536*(o=Math.floor(n/65536)),b=(n=b+o+65535)-65536*(o=Math.floor(n/65536)),w=(n=w+o+65535)-65536*(o=Math.floor(n/65536)),i=(n=(i+=o-1+37*(o-1))+(o=1)+65535)-65536*(o=Math.floor(n/65536)),a=(n=a+o+65535)-65536*(o=Math.floor(n/65536)),s=(n=s+o+65535)-65536*(o=Math.floor(n/65536)),u=(n=u+o+65535)-65536*(o=Math.floor(n/65536)),c=(n=c+o+65535)-65536*(o=Math.floor(n/65536)),l=(n=l+o+65535)-65536*(o=Math.floor(n/65536)),f=(n=f+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),m=(n=m+o+65535)-65536*(o=Math.floor(n/65536)),g=(n=g+o+65535)-65536*(o=Math.floor(n/65536)),v=(n=v+o+65535)-65536*(o=Math.floor(n/65536)),b=(n=b+o+65535)-65536*(o=Math.floor(n/65536)),w=(n=w+o+65535)-65536*(o=Math.floor(n/65536)),i+=o-1+37*(o-1),e[0]=i,e[1]=a,e[2]=s,e[3]=u,e[4]=c,e[5]=l,e[6]=f,e[7]=p,e[8]=h,e[9]=d,e[10]=y,e[11]=m,e[12]=g,e[13]=v,e[14]=b,e[15]=w}function D(e,t){F(e,t,t)}function V(e,r){var n,o=t();for(n=0;n<16;n++)o[n]=r[n];for(n=253;n>=0;n--)D(o,o),2!==n&&4!==n&&F(o,o,r);for(n=0;n<16;n++)e[n]=o[n]}function q(e,r){var n,o=t();for(n=0;n<16;n++)o[n]=r[n];for(n=250;n>=0;n--)D(o,o),1!==n&&F(o,o,r);for(n=0;n<16;n++)e[n]=o[n]}function K(e,r,n){var o,i,a=new Uint8Array(32),s=new Float64Array(80),c=t(),l=t(),f=t(),p=t(),h=t(),d=t();for(i=0;i<31;i++)a[i]=r[i];for(a[31]=127&r[31]|64,a[0]&=248,L(s,n),i=0;i<16;i++)l[i]=s[i],p[i]=c[i]=f[i]=0;for(c[0]=p[0]=1,i=254;i>=0;--i)R(c,l,o=a[i>>>3]>>>(7&i)&1),R(f,p,o),j(h,c,f),M(c,c,f),j(f,l,p),M(l,l,p),D(p,h),D(d,c),F(c,f,c),F(f,l,h),j(h,c,f),M(c,c,f),D(l,c),M(f,p,d),F(c,f,u),j(c,c,p),F(f,f,c),F(c,p,d),F(p,l,s),D(l,h),R(c,l,o),R(f,p,o);for(i=0;i<16;i++)s[i+16]=c[i],s[i+32]=f[i],s[i+48]=l[i],s[i+64]=p[i];var y=s.subarray(32),m=s.subarray(16);return V(y,y),F(m,m,y),C(e,m),0}function H(e,t){return K(e,t,i)}function z(e,t){return n(t,32),H(e,t)}function X(e,t,r){var n=new Uint8Array(32);return K(n,r,t),b(e,o,n,w)}T.prototype.blocks=function(e,t,r){for(var n,o,i,a,s,u,c,l,f,p,h,d,y,m,g,v,b,w,S,k=this.fin?0:2048,E=this.h[0],A=this.h[1],T=this.h[2],O=this.h[3],P=this.h[4],x=this.h[5],I=this.h[6],_=this.h[7],B=this.h[8],R=this.h[9],C=this.r[0],U=this.r[1],N=this.r[2],L=this.r[3],j=this.r[4],M=this.r[5],F=this.r[6],D=this.r[7],V=this.r[8],q=this.r[9];r>=16;)p=f=0,p+=(E+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*C,p+=(A+=8191&(n>>>13|(o=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*q),p+=(T+=8191&(o>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*V),p+=(O+=8191&(i>>>7|(a=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*D),f=(p+=(P+=8191&(a>>>4|(s=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*F))>>>13,p&=8191,p+=(x+=s>>>1&8191)*(5*M),p+=(I+=8191&(s>>>14|(u=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*j),p+=(_+=8191&(u>>>11|(c=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*L),p+=(B+=8191&(c>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*N),h=f+=(p+=(R+=l>>>5|k)*(5*U))>>>13,h+=E*U,h+=A*C,h+=T*(5*q),h+=O*(5*V),f=(h+=P*(5*D))>>>13,h&=8191,h+=x*(5*F),h+=I*(5*M),h+=_*(5*j),h+=B*(5*L),f+=(h+=R*(5*N))>>>13,h&=8191,d=f,d+=E*N,d+=A*U,d+=T*C,d+=O*(5*q),f=(d+=P*(5*V))>>>13,d&=8191,d+=x*(5*D),d+=I*(5*F),d+=_*(5*M),d+=B*(5*j),y=f+=(d+=R*(5*L))>>>13,y+=E*L,y+=A*N,y+=T*U,y+=O*C,f=(y+=P*(5*q))>>>13,y&=8191,y+=x*(5*V),y+=I*(5*D),y+=_*(5*F),y+=B*(5*M),m=f+=(y+=R*(5*j))>>>13,m+=E*j,m+=A*L,m+=T*N,m+=O*U,f=(m+=P*C)>>>13,m&=8191,m+=x*(5*q),m+=I*(5*V),m+=_*(5*D),m+=B*(5*F),g=f+=(m+=R*(5*M))>>>13,g+=E*M,g+=A*j,g+=T*L,g+=O*N,f=(g+=P*U)>>>13,g&=8191,g+=x*C,g+=I*(5*q),g+=_*(5*V),g+=B*(5*D),v=f+=(g+=R*(5*F))>>>13,v+=E*F,v+=A*M,v+=T*j,v+=O*L,f=(v+=P*N)>>>13,v&=8191,v+=x*U,v+=I*C,v+=_*(5*q),v+=B*(5*V),b=f+=(v+=R*(5*D))>>>13,b+=E*D,b+=A*F,b+=T*M,b+=O*j,f=(b+=P*L)>>>13,b&=8191,b+=x*N,b+=I*U,b+=_*C,b+=B*(5*q),w=f+=(b+=R*(5*V))>>>13,w+=E*V,w+=A*D,w+=T*F,w+=O*M,f=(w+=P*j)>>>13,w&=8191,w+=x*L,w+=I*N,w+=_*U,w+=B*C,S=f+=(w+=R*(5*q))>>>13,S+=E*q,S+=A*V,S+=T*D,S+=O*F,f=(S+=P*M)>>>13,S&=8191,S+=x*j,S+=I*L,S+=_*N,S+=B*U,E=p=8191&(f=(f=((f+=(S+=R*C)>>>13)<<2)+f|0)+(p&=8191)|0),A=h+=f>>>=13,T=d&=8191,O=y&=8191,P=m&=8191,x=g&=8191,I=v&=8191,_=b&=8191,B=w&=8191,R=S&=8191,t+=16,r-=16;this.h[0]=E,this.h[1]=A,this.h[2]=T,this.h[3]=O,this.h[4]=P,this.h[5]=x,this.h[6]=I,this.h[7]=_,this.h[8]=B,this.h[9]=R},T.prototype.finish=function(e,t){var r,n,o,i,a=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=r,r=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,a[0]=this.h[0]+5,r=a[0]>>>13,a[0]&=8191,i=1;i<10;i++)a[i]=this.h[i]+r,r=a[i]>>>13,a[i]&=8191;for(a[9]-=8192,n=(1^r)-1,i=0;i<10;i++)a[i]&=n;for(n=~n,i=0;i<10;i++)this.h[i]=this.h[i]&n|a[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},T.prototype.update=function(e,t,r){var n,o;if(this.leftover){for((o=16-this.leftover)>r&&(o=r),n=0;n<o;n++)this.buffer[this.leftover+n]=e[t+n];if(r-=o,t+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(o=r-r%16,this.blocks(e,t,o),t+=o,r-=o),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=e[t+n];this.leftover+=r}};var $=x,W=I;var G=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Y(e,t,r,n){for(var o,i,a,s,u,c,l,f,p,h,d,y,m,g,v,b,w,S,k,E,A,T,O,P,x,I,_=new Int32Array(16),B=new Int32Array(16),R=e[0],C=e[1],U=e[2],N=e[3],L=e[4],j=e[5],M=e[6],F=e[7],D=t[0],V=t[1],q=t[2],K=t[3],H=t[4],z=t[5],X=t[6],$=t[7],W=0;n>=128;){for(k=0;k<16;k++)E=8*k+W,_[k]=r[E+0]<<24|r[E+1]<<16|r[E+2]<<8|r[E+3],B[k]=r[E+4]<<24|r[E+5]<<16|r[E+6]<<8|r[E+7];for(k=0;k<80;k++)if(o=R,i=C,a=U,s=N,u=L,c=j,l=M,F,p=D,h=V,d=q,y=K,m=H,g=z,v=X,$,O=65535&(T=$),P=T>>>16,x=65535&(A=F),I=A>>>16,O+=65535&(T=(H>>>14|L<<18)^(H>>>18|L<<14)^(L>>>9|H<<23)),P+=T>>>16,x+=65535&(A=(L>>>14|H<<18)^(L>>>18|H<<14)^(H>>>9|L<<23)),I+=A>>>16,O+=65535&(T=H&z^~H&X),P+=T>>>16,x+=65535&(A=L&j^~L&M),I+=A>>>16,A=G[2*k],O+=65535&(T=G[2*k+1]),P+=T>>>16,x+=65535&A,I+=A>>>16,A=_[k%16],P+=(T=B[k%16])>>>16,x+=65535&A,I+=A>>>16,x+=(P+=(O+=65535&T)>>>16)>>>16,O=65535&(T=S=65535&O|P<<16),P=T>>>16,x=65535&(A=w=65535&x|(I+=x>>>16)<<16),I=A>>>16,O+=65535&(T=(D>>>28|R<<4)^(R>>>2|D<<30)^(R>>>7|D<<25)),P+=T>>>16,x+=65535&(A=(R>>>28|D<<4)^(D>>>2|R<<30)^(D>>>7|R<<25)),I+=A>>>16,P+=(T=D&V^D&q^V&q)>>>16,x+=65535&(A=R&C^R&U^C&U),I+=A>>>16,f=65535&(x+=(P+=(O+=65535&T)>>>16)>>>16)|(I+=x>>>16)<<16,b=65535&O|P<<16,O=65535&(T=y),P=T>>>16,x=65535&(A=s),I=A>>>16,P+=(T=S)>>>16,x+=65535&(A=w),I+=A>>>16,C=o,U=i,N=a,L=s=65535&(x+=(P+=(O+=65535&T)>>>16)>>>16)|(I+=x>>>16)<<16,j=u,M=c,F=l,R=f,V=p,q=h,K=d,H=y=65535&O|P<<16,z=m,X=g,$=v,D=b,k%16==15)for(E=0;E<16;E++)A=_[E],O=65535&(T=B[E]),P=T>>>16,x=65535&A,I=A>>>16,A=_[(E+9)%16],O+=65535&(T=B[(E+9)%16]),P+=T>>>16,x+=65535&A,I+=A>>>16,w=_[(E+1)%16],O+=65535&(T=((S=B[(E+1)%16])>>>1|w<<31)^(S>>>8|w<<24)^(S>>>7|w<<25)),P+=T>>>16,x+=65535&(A=(w>>>1|S<<31)^(w>>>8|S<<24)^w>>>7),I+=A>>>16,w=_[(E+14)%16],P+=(T=((S=B[(E+14)%16])>>>19|w<<13)^(w>>>29|S<<3)^(S>>>6|w<<26))>>>16,x+=65535&(A=(w>>>19|S<<13)^(S>>>29|w<<3)^w>>>6),I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,_[E]=65535&x|I<<16,B[E]=65535&O|P<<16;O=65535&(T=D),P=T>>>16,x=65535&(A=R),I=A>>>16,A=e[0],P+=(T=t[0])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[0]=R=65535&x|I<<16,t[0]=D=65535&O|P<<16,O=65535&(T=V),P=T>>>16,x=65535&(A=C),I=A>>>16,A=e[1],P+=(T=t[1])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[1]=C=65535&x|I<<16,t[1]=V=65535&O|P<<16,O=65535&(T=q),P=T>>>16,x=65535&(A=U),I=A>>>16,A=e[2],P+=(T=t[2])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[2]=U=65535&x|I<<16,t[2]=q=65535&O|P<<16,O=65535&(T=K),P=T>>>16,x=65535&(A=N),I=A>>>16,A=e[3],P+=(T=t[3])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[3]=N=65535&x|I<<16,t[3]=K=65535&O|P<<16,O=65535&(T=H),P=T>>>16,x=65535&(A=L),I=A>>>16,A=e[4],P+=(T=t[4])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[4]=L=65535&x|I<<16,t[4]=H=65535&O|P<<16,O=65535&(T=z),P=T>>>16,x=65535&(A=j),I=A>>>16,A=e[5],P+=(T=t[5])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[5]=j=65535&x|I<<16,t[5]=z=65535&O|P<<16,O=65535&(T=X),P=T>>>16,x=65535&(A=M),I=A>>>16,A=e[6],P+=(T=t[6])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[6]=M=65535&x|I<<16,t[6]=X=65535&O|P<<16,O=65535&(T=$),P=T>>>16,x=65535&(A=F),I=A>>>16,A=e[7],P+=(T=t[7])>>>16,x+=65535&A,I+=A>>>16,I+=(x+=(P+=(O+=65535&T)>>>16)>>>16)>>>16,e[7]=F=65535&x|I<<16,t[7]=$=65535&O|P<<16,W+=128,n-=128}return n}function J(e,t,r){var n,o=new Int32Array(8),i=new Int32Array(8),a=new Uint8Array(256),s=r;for(o[0]=1779033703,o[1]=3144134277,o[2]=1013904242,o[3]=2773480762,o[4]=1359893119,o[5]=2600822924,o[6]=528734635,o[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,Y(o,i,t,r),r%=128,n=0;n<r;n++)a[n]=t[s-r+n];for(a[r]=128,a[(r=256-128*(r<112?1:0))-9]=0,d(a,r-8,s/536870912|0,s<<3),Y(o,i,a,r),n=0;n<8;n++)d(e,8*n,o[n],i[n]);return 0}function Z(e,r){var n=t(),o=t(),i=t(),a=t(),s=t(),u=t(),c=t(),f=t(),p=t();M(n,e[1],e[0]),M(p,r[1],r[0]),F(n,n,p),j(o,e[0],e[1]),j(p,r[0],r[1]),F(o,o,p),F(i,e[3],r[3]),F(i,i,l),F(a,e[2],r[2]),j(a,a,a),M(s,o,n),M(u,a,i),j(c,a,i),j(f,o,n),F(e[0],s,u),F(e[1],f,c),F(e[2],c,u),F(e[3],s,f)}function Q(e,t,r){var n;for(n=0;n<4;n++)R(e[n],t[n],r)}function ee(e,r){var n=t(),o=t(),i=t();V(i,r[2]),F(n,r[0],i),F(o,r[1],i),C(e,o),e[31]^=N(n)<<7}function te(e,t,r){var n,o;for(_(e[0],a),_(e[1],s),_(e[2],s),_(e[3],a),o=255;o>=0;--o)Q(e,t,n=r[o/8|0]>>(7&o)&1),Z(t,e),Z(e,e),Q(e,t,n)}function re(e,r){var n=[t(),t(),t(),t()];_(n[0],f),_(n[1],p),_(n[2],s),F(n[3],f,p),te(e,n,r)}function ne(e,r,o){var i,a=new Uint8Array(64),s=[t(),t(),t(),t()];for(o||n(r,32),J(a,r,32),a[0]&=248,a[31]&=127,a[31]|=64,re(s,a),ee(e,s),i=0;i<32;i++)r[i+32]=e[i];return 0}var oe=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ie(e,t){var r,n,o,i;for(n=63;n>=32;--n){for(r=0,o=n-32,i=n-12;o<i;++o)t[o]+=r-16*t[n]*oe[o-(n-32)],r=Math.floor((t[o]+128)/256),t[o]-=256*r;t[o]+=r,t[n]=0}for(r=0,o=0;o<32;o++)t[o]+=r-(t[31]>>4)*oe[o],r=t[o]>>8,t[o]&=255;for(o=0;o<32;o++)t[o]-=r*oe[o];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function ae(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;ie(e,r)}function se(e,r,n,o){var i,a,s=new Uint8Array(64),u=new Uint8Array(64),c=new Uint8Array(64),l=new Float64Array(64),f=[t(),t(),t(),t()];J(s,o,32),s[0]&=248,s[31]&=127,s[31]|=64;var p=n+64;for(i=0;i<n;i++)e[64+i]=r[i];for(i=0;i<32;i++)e[32+i]=s[32+i];for(J(c,e.subarray(32),n+32),ae(c),re(f,c),ee(e,f),i=32;i<64;i++)e[i]=o[i];for(J(u,e,n+64),ae(u),i=0;i<64;i++)l[i]=0;for(i=0;i<32;i++)l[i]=c[i];for(i=0;i<32;i++)for(a=0;a<32;a++)l[i+a]+=u[i]*s[a];return ie(e.subarray(32),l),p}function ue(e,r,n,o){var i,u=new Uint8Array(32),l=new Uint8Array(64),f=[t(),t(),t(),t()],p=[t(),t(),t(),t()];if(n<64)return-1;if(function(e,r){var n=t(),o=t(),i=t(),u=t(),l=t(),f=t(),p=t();return _(e[2],s),L(e[1],r),D(i,e[1]),F(u,i,c),M(i,i,e[2]),j(u,e[2],u),D(l,u),D(f,l),F(p,f,l),F(n,p,i),F(n,n,u),q(n,n),F(n,n,i),F(n,n,u),F(n,n,u),F(e[0],n,u),D(o,e[0]),F(o,o,u),U(o,i)&&F(e[0],e[0],h),D(o,e[0]),F(o,o,u),U(o,i)?-1:(N(e[0])===r[31]>>7&&M(e[0],a,e[0]),F(e[3],e[0],e[1]),0)}(p,o))return-1;for(i=0;i<n;i++)e[i]=r[i];for(i=0;i<32;i++)e[i+32]=o[i];if(J(l,e,n),ae(l),te(f,p,l),re(p,r.subarray(32)),Z(f,p),ee(u,f),n-=64,g(r,0,u,0)){for(i=0;i<n;i++)e[i]=0;return-1}for(i=0;i<n;i++)e[i]=r[i+64];return n}var ce=16,le=64,fe=32,pe=64;function he(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function de(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function ye(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:b,crypto_stream_xor:A,crypto_stream:E,crypto_stream_salsa20_xor:S,crypto_stream_salsa20:k,crypto_onetimeauth:O,crypto_onetimeauth_verify:P,crypto_verify_16:m,crypto_verify_32:g,crypto_secretbox:x,crypto_secretbox_open:I,crypto_scalarmult:K,crypto_scalarmult_base:H,crypto_box_beforenm:X,crypto_box_afternm:$,crypto_box:function(e,t,r,n,o,i){var a=new Uint8Array(32);return X(a,o,i),$(e,t,r,n,a)},crypto_box_open:function(e,t,r,n,o,i){var a=new Uint8Array(32);return X(a,o,i),W(e,t,r,n,a)},crypto_box_keypair:z,crypto_hash:J,crypto_sign:se,crypto_sign_keypair:ne,crypto_sign_open:ue,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:ce,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:le,crypto_sign_PUBLICKEYBYTES:fe,crypto_sign_SECRETKEYBYTES:pe,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:c,L:oe,pack25519:C,unpack25519:L,M:F,A:j,S:D,Z:M,pow2523:q,add:Z,set25519:_,modL:ie,scalarmult:te,scalarbase:re},e.randomBytes=function(e){var t=new Uint8Array(e);return n(t,e),t},e.secretbox=function(e,t,r){de(e,t,r),he(r,t);for(var n=new Uint8Array(32+e.length),o=new Uint8Array(n.length),i=0;i<e.length;i++)n[i+32]=e[i];return x(o,n,n.length,t,r),o.subarray(ce)},e.secretbox.open=function(e,t,r){de(e,t,r),he(r,t);for(var n=new Uint8Array(ce+e.length),o=new Uint8Array(n.length),i=0;i<e.length;i++)n[i+ce]=e[i];return n.length<32||0!==I(o,n,n.length,t,r)?null:o.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=ce,e.scalarMult=function(e,t){if(de(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var r=new Uint8Array(32);return K(r,e,t),r},e.scalarMult.base=function(e){if(de(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return H(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,r,n,o){var i=e.box.before(n,o);return e.secretbox(t,r,i)},e.box.before=function(e,t){de(e,t),function(e,t){if(32!==e.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(e,t);var r=new Uint8Array(32);return X(r,e,t),r},e.box.after=e.secretbox,e.box.open=function(t,r,n,o){var i=e.box.before(n,o);return e.secretbox.open(t,r,i)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return z(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(de(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return H(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(de(e,t),t.length!==pe)throw new Error("bad secret key size");var r=new Uint8Array(le+e.length);return se(r,e,e.length,t),r},e.sign.open=function(e,t){if(de(e,t),t.length!==fe)throw new Error("bad public key size");var r=new Uint8Array(e.length),n=ue(r,e,e.length,t);if(n<0)return null;for(var o=new Uint8Array(n),i=0;i<o.length;i++)o[i]=r[i];return o},e.sign.detached=function(t,r){for(var n=e.sign(t,r),o=new Uint8Array(le),i=0;i<o.length;i++)o[i]=n[i];return o},e.sign.detached.verify=function(e,t,r){if(de(e,t,r),t.length!==le)throw new Error("bad signature size");if(r.length!==fe)throw new Error("bad public key size");var n,o=new Uint8Array(le+e.length),i=new Uint8Array(le+e.length);for(n=0;n<le;n++)o[n]=t[n];for(n=0;n<e.length;n++)o[n+le]=e[n];return ue(i,o,o.length,r)>=0},e.sign.keyPair=function(){var e=new Uint8Array(fe),t=new Uint8Array(pe);return ne(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(de(e),e.length!==pe)throw new Error("bad secret key size");for(var t=new Uint8Array(fe),r=0;r<t.length;r++)t[r]=e[32+r];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(de(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(fe),r=new Uint8Array(pe),n=0;n<32;n++)r[n]=e[n];return ne(t,r,!0),{publicKey:t,secretKey:r}},e.sign.publicKeyLength=fe,e.sign.secretKeyLength=pe,e.sign.seedLength=32,e.sign.signatureLength=le,e.hash=function(e){de(e);var t=new Uint8Array(64);return J(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return de(e,t),0!==e.length&&0!==t.length&&(e.length===t.length&&0===y(e,0,t,0,e.length))},e.setPRNG=function(e){n=e},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(t&&t.getRandomValues){e.setPRNG((function(e,r){var n,o=new Uint8Array(r);for(n=0;n<r;n+=65536)t.getRandomValues(o.subarray(n,n+Math.min(r-n,65536)));for(n=0;n<r;n++)e[n]=o[n];ye(o)}))}else(t=r(1281))&&t.randomBytes&&e.setPRNG((function(e,r){var n,o=t.randomBytes(r);for(n=0;n<r;n++)e[n]=o[n];ye(o)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})},1135:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},9032:(e,t,r)=>{"use strict";var n=r(7244),o=r(8184),i=r(5767),a=r(5680);function s(e){return e.call.bind(e)}var u="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,l=s(Object.prototype.toString),f=s(Number.prototype.valueOf),p=s(String.prototype.valueOf),h=s(Boolean.prototype.valueOf);if(u)var d=s(BigInt.prototype.valueOf);if(c)var y=s(Symbol.prototype.valueOf);function m(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function g(e){return"[object Map]"===l(e)}function v(e){return"[object Set]"===l(e)}function b(e){return"[object WeakMap]"===l(e)}function w(e){return"[object WeakSet]"===l(e)}function S(e){return"[object ArrayBuffer]"===l(e)}function k(e){return"undefined"!=typeof ArrayBuffer&&(S.working?S(e):e instanceof ArrayBuffer)}function E(e){return"[object DataView]"===l(e)}function A(e){return"undefined"!=typeof DataView&&(E.working?E(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=o,t.isTypedArray=a,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||A(e)},t.isUint8Array=function(e){return"Uint8Array"===i(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===i(e)},t.isUint16Array=function(e){return"Uint16Array"===i(e)},t.isUint32Array=function(e){return"Uint32Array"===i(e)},t.isInt8Array=function(e){return"Int8Array"===i(e)},t.isInt16Array=function(e){return"Int16Array"===i(e)},t.isInt32Array=function(e){return"Int32Array"===i(e)},t.isFloat32Array=function(e){return"Float32Array"===i(e)},t.isFloat64Array=function(e){return"Float64Array"===i(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===i(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===i(e)},g.working="undefined"!=typeof Map&&g(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(g.working?g(e):e instanceof Map)},v.working="undefined"!=typeof Set&&v(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(v.working?v(e):e instanceof Set)},b.working="undefined"!=typeof WeakMap&&b(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(b.working?b(e):e instanceof WeakMap)},w.working="undefined"!=typeof WeakSet&&w(new WeakSet),t.isWeakSet=function(e){return w(e)},S.working="undefined"!=typeof ArrayBuffer&&S(new ArrayBuffer),t.isArrayBuffer=k,E.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&E(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=A;var T="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function O(e){return"[object SharedArrayBuffer]"===l(e)}function P(e){return void 0!==T&&(void 0===O.working&&(O.working=O(new T)),O.working?O(e):e instanceof T)}function x(e){return m(e,f)}function I(e){return m(e,p)}function _(e){return m(e,h)}function B(e){return u&&m(e,d)}function R(e){return c&&m(e,y)}t.isSharedArrayBuffer=P,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===l(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===l(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===l(e)},t.isGeneratorObject=function(e){return"[object Generator]"===l(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===l(e)},t.isNumberObject=x,t.isStringObject=I,t.isBooleanObject=_,t.isBigIntObject=B,t.isSymbolObject=R,t.isBoxedPrimitive=function(e){return x(e)||I(e)||_(e)||B(e)||R(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(k(e)||P(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},537:(e,t,r)=>{var n=r(5606),o=r(6763),i=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},a=/%[sdj%]/g;t.format=function(e){if(!w(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(l(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,o=n.length,i=String(e).replace(a,(function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r<o;s=n[++r])v(s)||!E(s)?i+=" "+s:i+=" "+l(s);return i},t.deprecate=function(e,r){if(void 0!==n&&!0===n.noDeprecation)return e;if(void 0===n)return function(){return t.deprecate(e,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?o.trace(r):o.error(r),i=!0}return e.apply(this,arguments)}};var s={},u=/^$/;if(n.env.NODE_DEBUG){var c=n.env.NODE_DEBUG;c=c.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),u=new RegExp("^"+c+"$","i")}function l(e,r){var n={seen:[],stylize:p};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&t._extend(n,r),S(n.showHidden)&&(n.showHidden=!1),S(n.depth)&&(n.depth=2),S(n.colors)&&(n.colors=!1),S(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=f),h(n,e,n.depth)}function f(e,t){var r=l.styles[t];return r?"\x1b["+l.colors[r][0]+"m"+e+"\x1b["+l.colors[r][1]+"m":e}function p(e,t){return e}function h(e,r,n){if(e.customInspect&&r&&O(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return w(o)||(o=h(e,o,n)),o}var i=function(e,t){if(S(t))return e.stylize("undefined","undefined");if(w(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(b(t))return e.stylize(""+t,"number");if(g(t))return e.stylize(""+t,"boolean");if(v(t))return e.stylize("null","null")}(e,r);if(i)return i;var a=Object.keys(r),s=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),T(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return d(r);if(0===a.length){if(O(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(k(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(A(r))return e.stylize(Date.prototype.toString.call(r),"date");if(T(r))return d(r)}var c,l="",f=!1,p=["{","}"];(m(r)&&(f=!0,p=["[","]"]),O(r))&&(l=" [Function"+(r.name?": "+r.name:"")+"]");return k(r)&&(l=" "+RegExp.prototype.toString.call(r)),A(r)&&(l=" "+Date.prototype.toUTCString.call(r)),T(r)&&(l=" "+d(r)),0!==a.length||f&&0!=r.length?n<0?k(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=f?function(e,t,r,n,o){for(var i=[],a=0,s=t.length;a<s;++a)_(t,String(a))?i.push(y(e,t,r,n,String(a),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(y(e,t,r,n,o,!0))})),i}(e,r,n,s,a):a.map((function(t){return y(e,r,n,s,t,f)})),e.seen.pop(),function(e,t,r){var n=e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(n>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(c,l,p)):p[0]+l+p[1]}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function y(e,t,r,n,o,i){var a,s,u;if((u=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),_(n,o)||(a="["+o+"]"),s||(e.seen.indexOf(u.value)<0?(s=v(r)?h(e,u.value,null):h(e,u.value,r-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),S(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function m(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function v(e){return null===e}function b(e){return"number"==typeof e}function w(e){return"string"==typeof e}function S(e){return void 0===e}function k(e){return E(e)&&"[object RegExp]"===P(e)}function E(e){return"object"==typeof e&&null!==e}function A(e){return E(e)&&"[object Date]"===P(e)}function T(e){return E(e)&&("[object Error]"===P(e)||e instanceof Error)}function O(e){return"function"==typeof e}function P(e){return Object.prototype.toString.call(e)}function x(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!s[e])if(u.test(e)){var r=n.pid;s[e]=function(){var n=t.format.apply(t,arguments);o.error("%s %d: %s",e,r,n)}}else s[e]=function(){};return s[e]},t.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(9032),t.isArray=m,t.isBoolean=g,t.isNull=v,t.isNullOrUndefined=function(e){return null==e},t.isNumber=b,t.isString=w,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=S,t.isRegExp=k,t.types.isRegExp=k,t.isObject=E,t.isDate=A,t.types.isDate=A,t.isError=T,t.types.isNativeError=T,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(1135);var I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function _(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;o.log("%s - %s",(e=new Date,r=[x(e.getHours()),x(e.getMinutes()),x(e.getSeconds())].join(":"),[e.getDate(),I[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(6698),t._extend=function(e,t){if(!t||!E(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var B="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function R(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(B&&e[B]){var t;if("function"!=typeof(t=e[B]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,B,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,o)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),B&&Object.defineProperty(t,B,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,i(e))},t.promisify.custom=B,t.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var o=t.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,a=function(){return o.apply(i,arguments)};e.apply(this,t).then((function(e){n.nextTick(a.bind(null,null,e))}),(function(e){n.nextTick(R.bind(null,e,a))}))}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,i(e)),t}},5767:(e,t,r)=>{"use strict";var n=r(2682),o=r(9209),i=r(487),a=r(8075),s=r(5795),u=a("Object.prototype.toString"),c=r(9092)(),l="undefined"==typeof globalThis?r.g:globalThis,f=o(),p=a("String.prototype.slice"),h=Object.getPrototypeOf,d=a("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},y={__proto__:null};n(f,c&&s&&h?function(e){var t=new l[e];if(Symbol.toStringTag in t){var r=h(t),n=s(r,Symbol.toStringTag);if(!n){var o=h(r);n=s(o,Symbol.toStringTag)}y["$"+e]=i(n.get)}}:function(e){var t=new l[e],r=t.slice||t.set;r&&(y["$"+e]=i(r))});e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!c){var t=p(u(e),8,-1);return d(f,t)>-1?t:"Object"===t&&function(e){var t=!1;return n(y,(function(r,n){if(!t)try{r(e),t=p(n,1)}catch(e){}})),t}(e)}return s?function(e){var t=!1;return n(y,(function(r,n){if(!t)try{"$"+r(e)===n&&(t=p(n,1))}catch(e){}})),t}(e):null}},1281:()=>{},9209:(e,t,r)=>{"use strict";var n=r(6578),o="undefined"==typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t<n.length;t++)"function"==typeof o[n[t]]&&(e[e.length]=n[t]);return e}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n=r(7957);StellarBase=n})();