PHP WebShell
Текущая директория: /usr/lib/node_modules/bitgo/node_modules/stellar-sdk/dist
Просмотр файла: stellar-sdk.min.js
var StellarSdk=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=176)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(199),i=(n=o)&&n.__esModule?n:{default:n};t.default=i.default},function(e,t,r){"use strict";(function(e){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
var n=r(192),o=r(193),i=r(99);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return c(this,e,t,r)}function c(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=d(e,t);return e}(e,t,r,n):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(t,r),o=(e=s(e,n)).write(t,r);o!==n&&(e=e.slice(0,o));return e}(e,t,r):function(e,t){if(u.isBuffer(t)){var r=0|h(t.length);return 0===(e=s(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?s(e,0):d(e,t);if("Buffer"===t.type&&i(t.data))return d(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(l(t),e=s(e,t<0?0:0|h(t)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function d(e,t){var r=t.length<0?0:0|h(t.length);e=s(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function h(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return F(e).length;default:if(n)return D(e).length;t=(""+t).toLowerCase(),n=!0}}function y(e,t,r){var 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 P(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return T(this,t,r);case"latin1":case"binary":return O(this,t,r);case"base64":return E(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){var n=e[t];e[t]=e[r],e[r]=n}function m(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),r=+r,isNaN(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=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:g(e,t,r,n,o);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,r,n,o){var 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){var l=-1;for(i=r;i<s;i++)if(c(e,i)===c(t,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*a}else-1!==l&&(i-=i-l),l=-1}else for(r+u>s&&(r=s-u),i=r;i>=0;i--){for(var f=!0,d=0;d<u;d++)if(c(e,i+d)!==c(t,d)){f=!1;break}if(f)return i}return-1}function b(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[r+a]=s}return a}function w(e,t,r,n){return K(D(t,e.length-r),e,r,n)}function _(e,t,r,n){return K(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function S(e,t,r,n){return _(e,t,r,n)}function k(e,t,r,n){return K(F(t),e,r,n)}function A(e,t,r,n){return K(function(e,t){for(var r,n,o,i=[],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 E(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i,a,s,u,c=e[o],l=null,f=c>239?4:c>223?3:c>191?2:1;if(o+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=e[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),o+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,r){return c(null,e,t,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,r){return function(e,t,r,n){return l(t),t<=0?s(e,t):void 0!==r?"string"==typeof n?s(e,t).fill(r,n):s(e,t).fill(r):s(e,t)}(null,e,t,r)},u.allocUnsafe=function(e){return f(null,e)},u.allocUnsafeSlow=function(e){return f(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");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},u.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}},u.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=u.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var a=e[r];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,o),o+=a.length}return n},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var 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},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?x(this,0,e):y.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,r,n,o){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");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;for(var i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(i,a),c=this.slice(n,o),l=e.slice(t,r),f=0;f<s;++f)if(c[f]!==l[f]){i=c[f],a=l[f];break}return i<a?-1:a<i?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},u.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)}var 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");for(var i=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":return _(this,e,t,r);case"latin1":case"binary":return S(this,e,t,r);case"base64":return k(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function T(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function O(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function P(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=t;i<r;++i)o+=U(e[i]);return o}function R(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+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 I(e,t,r,n,o,i){if(!u.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 B(e,t,r,n){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-r,2);o<i;++o)e[r+o]=(t&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function M(e,t,r,n){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-r,4);o<i;++o)e[r+o]=t>>>8*(n?o:3-o)&255}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 N(e,t,r,n,i){return i||j(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,i){return i||j(e,0,r,8),o.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=u.prototype;else{var o=t-e;r=new u(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+e]}return r},u.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},u.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},u.prototype.readUInt8=function(e,t){return t||C(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||C(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||C(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||C(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||C(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||C(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||C(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||C(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||C(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||I(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||I(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):M(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);I(this,e,t,r,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<r&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);I(this,e,t,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):M(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):M(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){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("sourceStart out of bounds");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);var o,i=n-r;if(this===e&&r<t&&t<n)for(o=i-1;o>=0;--o)e[o+t]=this[o+r];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+i),t);return i},u.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),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var a=u.isBuffer(e)?e:D(new u(e,n).toString()),s=a.length;for(i=0;i<r-t;++i)this[i+t]=a[i%s]}return this};var q=/[^+\/0-9A-Za-z-_]/g;function U(e){return e<16?"0"+e.toString(16):e.toString(16)}function D(e,t){var r;t=t||1/0;for(var n=e.length,o=null,i=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>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 F(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}}).call(this,r(5))},function(e,t,r){"use strict";r.r(t),r.d(t,"__extends",(function(){return o})),r.d(t,"__assign",(function(){return i})),r.d(t,"__rest",(function(){return a})),r.d(t,"__decorate",(function(){return s})),r.d(t,"__param",(function(){return u})),r.d(t,"__metadata",(function(){return c})),r.d(t,"__awaiter",(function(){return l})),r.d(t,"__generator",(function(){return f})),r.d(t,"__createBinding",(function(){return d})),r.d(t,"__exportStar",(function(){return h})),r.d(t,"__values",(function(){return p})),r.d(t,"__read",(function(){return y})),r.d(t,"__spread",(function(){return v})),r.d(t,"__spreadArrays",(function(){return m})),r.d(t,"__await",(function(){return g})),r.d(t,"__asyncGenerator",(function(){return b})),r.d(t,"__asyncDelegator",(function(){return w})),r.d(t,"__asyncValues",(function(){return _})),r.d(t,"__makeTemplateObject",(function(){return S})),r.d(t,"__importStar",(function(){return k})),r.d(t,"__importDefault",(function(){return A})),r.d(t,"__classPrivateFieldGet",(function(){return E})),r.d(t,"__classPrivateFieldSet",(function(){return x}));
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function o(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function s(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function u(e,t){return function(r,n){t(r,n,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function l(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function f(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function d(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function h(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||(t[r]=e[r])}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function v(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(y(arguments[t]));return e}function m(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n}function g(e){return this instanceof g?(this.v=e,this):new g(e)}function b(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){i.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{(r=o[e](t)).value instanceof g?Promise.resolve(r.value.v).then(u,c):l(i[0][2],r)}catch(e){l(i[0][3],e)}var r}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:g(e[n](t)),done:"return"===n}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=p(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function S(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function k(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function A(e){return e&&e.__esModule?e:{default:e}}function E(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},function(e,t){var r=Array.isArray;e.exports=r},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,n.default)(e,u),(0,o.default)(e)&&(0,n.default)(e.prototype,c)};var n=a(r(200)),o=a(r(50)),i=r(213);function a(e){return e&&e.__esModule?e:{default:e}}var s=Math.pow(2,16),u={toXDR:function(e){var t=new i.Cursor(s);this.write(e,t);var r=t.tell();return t.rewind(),t.slice(r).buffer()},fromXDR:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"raw",n=void 0;switch(r){case"raw":n=t;break;case"hex":n=e.from(t,"hex");break;case"base64":n=e.from(t,"base64");break;default:throw new Error("Invalid format "+r+', must be "raw", "hex", "base64"')}var o=new i.Cursor(n),a=this.read(o);return a},validateXDR:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"raw";try{return this.fromXDR(e,t),!0}catch(e){return!1}}},c={toXDR:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"raw",t=this.constructor.toXDR(this);switch(e){case"raw":return t;case"hex":return t.toString("hex");case"base64":return t.toString("base64");default:throw new Error("Invalid format "+e+', must be "raw", "hex", "base64"')}}}}).call(this,r(1).Buffer)},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.CallBuilder=void 0;var n,o=r(2),i=o.__importDefault(r(372)),a=o.__importDefault(r(37)),s=o.__importDefault(r(373)),u=r(36),c=o.__importDefault(r(91)),l=r(65).version,f=["transaction"],d=e;n=d.EventSource?d.EventSource:i.default?r(164):d.window.EventSource?d.window.EventSource:r(164);var h=function(){function e(e,t){void 0===t&&(t=""),this.url=e.clone(),this.filter=[],this.originalSegments=this.url.segment()||[],this.neighborRoot=t}return e.prototype.call=function(){var e=this;return this.checkFilter(),this._sendNormalRequest(this.url).then((function(t){return e._parseResponse(t)}))},e.prototype.stream=function(e){var t,r,o=this;void 0===e&&(e={}),this.checkFilter(),this.url.setQuery("X-Client-Name","js-stellar-sdk"),this.url.setQuery("X-Client-Version",l);var i=function(){r=setTimeout((function(){t&&t.close(),t=a()}),e.reconnectTimeout||15e3)},a=function(){try{t=new n(o.url.toString())}catch(t){e.onerror&&e.onerror(t)}if(i(),t){var s=!1,u=function(){s||(clearTimeout(r),t.close(),a(),s=!0)},c=function(t){if("close"!==t.type){var n=t.data?o._parseRecord(JSON.parse(t.data)):t;n.paging_token&&o.url.setQuery("cursor",n.paging_token),clearTimeout(r),i(),void 0!==e.onmessage&&e.onmessage(n)}else u()},l=function(t){e.onerror&&e.onerror(t)};t.addEventListener?(t.addEventListener("message",c.bind(o)),t.addEventListener("error",l.bind(o)),t.addEventListener("close",u.bind(o))):(t.onmessage=c.bind(o),t.onerror=l.bind(o))}return t};return a(),function(){clearTimeout(r),t&&t.close()}},e.prototype.cursor=function(e){return this.url.setQuery("cursor",e),this},e.prototype.limit=function(e){return this.url.setQuery("limit",e.toString()),this},e.prototype.order=function(e){return this.url.setQuery("order",e),this},e.prototype.join=function(e){return this.url.setQuery("join",e),this},e.prototype.forEndpoint=function(e,t){if(""===this.neighborRoot)throw new Error("Invalid usage: neighborRoot not set in constructor");return this.filter.push([e,t,this.neighborRoot]),this},e.prototype.checkFilter=function(){if(this.filter.length>=2)throw new u.BadRequestError("Too many filters specified",this.filter);if(1===this.filter.length){var e=this.originalSegments.concat(this.filter[0]);this.url.segment(e)}},e.prototype._requestFnForLink=function(e){var t=this;return function(r){return void 0===r&&(r={}),o.__awaiter(t,void 0,void 0,(function(){var t,n,i;return o.__generator(this,(function(o){switch(o.label){case 0:return e.templated?(n=s.default(e.href),t=a.default(n.expand(r))):t=a.default(e.href),[4,this._sendNormalRequest(t)];case 1:return i=o.sent(),[2,this._parseResponse(i)]}}))}))}},e.prototype._parseRecord=function(e){var t=this;if(!e._links)return e;for(var r=function(r){var i=e._links[r],a=!1;if(void 0!==e[r]&&(e[r+"_attr"]=e[r],a=!0),a&&f.indexOf(r)>=0){var s=n._parseRecord(e[r]);e[r]=function(){return o.__awaiter(t,void 0,void 0,(function(){return o.__generator(this,(function(e){return[2,s]}))}))}}else e[r]=n._requestFnForLink(i)},n=this,i=0,a=Object.keys(e._links);i<a.length;i++){r(a[i])}return e},e.prototype._sendNormalRequest=function(e){return o.__awaiter(this,void 0,void 0,(function(){var t;return o.__generator(this,(function(r){return""===(t=e).authority()&&(t=t.authority(this.url.authority())),""===t.protocol()&&(t=t.protocol(this.url.protocol())),[2,c.default.get(t.toString()).then((function(e){return e.data})).catch(this._handleNetworkError)]}))}))},e.prototype._parseResponse=function(e){return e._embedded&&e._embedded.records?this._toCollectionPage(e):this._parseRecord(e)},e.prototype._toCollectionPage=function(e){for(var t=this,r=0;r<e._embedded.records.length;r+=1)e._embedded.records[r]=this._parseRecord(e._embedded.records[r]);return{records:e._embedded.records,next:function(){return o.__awaiter(t,void 0,void 0,(function(){var t;return o.__generator(this,(function(r){switch(r.label){case 0:return[4,this._sendNormalRequest(a.default(e._links.next.href))];case 1:return t=r.sent(),[2,this._toCollectionPage(t)]}}))}))},prev:function(){return o.__awaiter(t,void 0,void 0,(function(){var t;return o.__generator(this,(function(r){switch(r.label){case 0:return[4,this._sendNormalRequest(a.default(e._links.prev.href))];case 1:return t=r.sent(),[2,this._toCollectionPage(t)]}}))}))}}},e.prototype._handleNetworkError=function(e){return o.__awaiter(this,void 0,void 0,(function(){return o.__generator(this,(function(t){if(!(e.response&&e.response.status&&e.response.statusText))return[2,Promise.reject(new Error(e.message))];switch(e.response.status){case 404:return[2,Promise.reject(new u.NotFoundError(e.response.statusText,e.response.data))];default:return[2,Promise.reject(new u.NetworkError(e.response.statusText,e.response.data))]}return[2]}))}))},e}();t.CallBuilder=h}).call(this,r(5))},function(e,t){e.exports=function(e){return void 0===e}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.StrKey=void 0;var n=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();t.decodeCheck=p,t.encodeCheck=y;var o=l(r(321)),i=l(r(322)),a=l(r(7)),s=l(r(132)),u=l(r(9)),c=r(334);function l(e){return e&&e.__esModule?e:{default:e}}var f={ed25519PublicKey:48,ed25519SecretSeed:144,med25519PublicKey:96,preAuthTx:152,sha256Hash:184,signedPayload:120},d={G:"ed25519PublicKey",S:"ed25519SecretSeed",M:"med25519PublicKey",T:"preAuthTx",X:"sha256Hash",P:"signedPayload"};t.StrKey=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"encodeEd25519PublicKey",value:function(e){return y("ed25519PublicKey",e)}},{key:"decodeEd25519PublicKey",value:function(e){return p("ed25519PublicKey",e)}},{key:"isValidEd25519PublicKey",value:function(e){return h("ed25519PublicKey",e)}},{key:"encodeEd25519SecretSeed",value:function(e){return y("ed25519SecretSeed",e)}},{key:"decodeEd25519SecretSeed",value:function(e){return p("ed25519SecretSeed",e)}},{key:"isValidEd25519SecretSeed",value:function(e){return h("ed25519SecretSeed",e)}},{key:"encodeMed25519PublicKey",value:function(e){return y("med25519PublicKey",e)}},{key:"decodeMed25519PublicKey",value:function(e){return p("med25519PublicKey",e)}},{key:"isValidMed25519PublicKey",value:function(e){return h("med25519PublicKey",e)}},{key:"encodePreAuthTx",value:function(e){return y("preAuthTx",e)}},{key:"decodePreAuthTx",value:function(e){return p("preAuthTx",e)}},{key:"encodeSha256Hash",value:function(e){return y("sha256Hash",e)}},{key:"decodeSha256Hash",value:function(e){return p("sha256Hash",e)}},{key:"encodeSignedPayload",value:function(e){return y("signedPayload",e)}},{key:"decodeSignedPayload",value:function(e){return p("signedPayload",e)}},{key:"isValidSignedPayload",value:function(e){return h("signedPayload",e)}},{key:"getVersionByteForPrefix",value:function(e){return d[e[0]]}}]),e}();function h(e,t){if(!(0,u.default)(t))return!1;switch(e){case"ed25519PublicKey":case"ed25519SecretSeed":case"preAuthTx":case"sha256Hash":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":return 32===r.length;case"med25519PublicKey":return 40===r.length;case"signedPayload":return r.length>=40&&r.length<=100;default:return!1}}function p(t,r){if(!(0,u.default)(r))throw new TypeError("encoded argument must be of type String");var n=o.default.decode(r),i=n[0],s=n.slice(0,-2),l=s.slice(1),d=n.slice(-2);if(r!==o.default.encode(n))throw new Error("invalid encoded string");var h=f[t];if((0,a.default)(h))throw new Error(t+" is not a valid version byte name. Expected one of "+Object.keys(f).join(", "));if(i!==h)throw new Error("invalid version byte. expected "+h+", got "+i);var p=v(s);if(!(0,c.verifyChecksum)(p,d))throw new Error("invalid checksum");return e.from(l)}function y(t,r){if((0,s.default)(r)||(0,a.default)(r))throw new Error("cannot encode null data");var n=f[t];if((0,a.default)(n))throw new Error(t+" is not a valid version byte name. Expected one of "+Object.keys(f).join(", "));r=e.from(r);var i=e.from([n]),u=e.concat([i,r]),c=v(u),l=e.concat([u,c]);return o.default.encode(l)}function v(t){var r=e.alloc(2);return r.writeUInt16LE(i.default.crc16xmodem(t),0),r}}).call(this,r(1).Buffer)},function(e,t,r){var n=r(20),o=r(3),i=r(12);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==n(e)}},function(e,t,r){"use strict";var n=r(156),o=Object.prototype.toString;function i(e){return Array.isArray(e)}function a(e){return void 0===e}function s(e){return"[object ArrayBuffer]"===o.call(e)}function u(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e){return"[object Function]"===o.call(e)}function f(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:i,isArrayBuffer:s,isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"[object FormData]"===o.call(e)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&s(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:u,isPlainObject:c,isUndefined:a,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:l,isStream:function(e){return u(e)&&l(e.pipe)},isURLSearchParams:function(e){return"[object URLSearchParams]"===o.call(e)},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:f,merge:function e(){var t={};function r(r,n){c(t[n])&&c(r)?t[n]=e(t[n],r):c(r)?t[n]=e({},r):i(r)?t[n]=r.slice():t[n]=r}for(var n=0,o=arguments.length;n<o;n++)f(arguments[n],r);return t},extend:function(e,t,r){return f(t,(function(t,o){e[o]=r&&"function"==typeof t?n(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},function(e,t){"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}}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var u,c=[],l=!1,f=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&h())}function h(){if(!l){var e=s(d);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function y(){}o.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];c.push(new p(e,t)),1!==c.length||l||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,r){var n=r(98),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=n.Buffer.from&&n.Buffer.alloc&&n.Buffer.allocUnsafe&&n.Buffer.allocUnsafeSlow?n.Buffer.from:function(e){return new n.Buffer(e)};t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=function(e,r){return t(e,r)>>>0};return r.signed=t,r.unsigned=r,r.model=e,r}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeAddressToMuxedAccount=s,t.encodeMuxedAccountToAddress=u,t.encodeMuxedAccount=function(e,t){if(!i.StrKey.isValidEd25519PublicKey(e))throw new Error("address should be a Stellar account ID (G...)");if(!(0,n.default)(t))throw new Error("id should be a string representing a number (uint64)");return o.default.MuxedAccount.keyTypeMuxedEd25519(new o.default.MuxedAccountMed25519({id:o.default.Uint64.fromString(t),ed25519:i.StrKey.decodeEd25519PublicKey(e)}))},t.extractBaseAddress=function(e){if(i.StrKey.isValidEd25519PublicKey(e))return e;if(!i.StrKey.isValidMed25519PublicKey(e))throw new TypeError("expected muxed account (M...), got "+e);var t=s(e);return i.StrKey.encodeEd25519PublicKey(t.med25519().ed25519())};var n=a(r(9)),o=a(r(0)),i=r(8);function a(e){return e&&e.__esModule?e:{default:e}}function s(e){return i.StrKey.isValidMed25519PublicKey(e)?function(e){var t=i.StrKey.decodeMed25519PublicKey(e);return o.default.MuxedAccount.keyTypeMuxedEd25519(new o.default.MuxedAccountMed25519({id:o.default.Uint64.fromXDR(t.slice(-8)),ed25519:t.slice(0,-8)}))}(e):o.default.MuxedAccount.keyTypeEd25519(i.StrKey.decodeEd25519PublicKey(e))}function u(t){return t.switch().value===o.default.CryptoKeyType.keyTypeMuxedEd25519().value?function(t){if(t.switch()===o.default.CryptoKeyType.keyTypeEd25519())return u(t);var r=t.med25519();return i.StrKey.encodeMed25519PublicKey(e.concat([r.ed25519(),r.id().toXDR("raw")]))}(t):i.StrKey.encodeEd25519PublicKey(t.ed25519())}}).call(this,r(1).Buffer)},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.Keypair=void 0;var 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},o=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=d(r(103)),a=d(r(7)),s=d(r(9)),u=r(102),c=r(8),l=r(30),f=d(r(0));function d(e){return e&&e.__esModule?e:{default:e}}t.Keypair=function(){function t(r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"ed25519"!==r.type)throw new Error("Invalid keys type");if(this.type=r.type,r.secretKey){if(r.secretKey=e.from(r.secretKey),32!==r.secretKey.length)throw new Error("secretKey length is invalid");if(this._secretSeed=r.secretKey,this._publicKey=(0,u.generate)(r.secretKey),this._secretKey=e.concat([r.secretKey,this._publicKey]),r.publicKey&&!this._publicKey.equals(e.from(r.publicKey)))throw new Error("secretKey does not match publicKey")}else if(this._publicKey=e.from(r.publicKey),32!==this._publicKey.length)throw new Error("publicKey length is invalid")}return o(t,[{key:"xdrAccountId",value:function(){return new f.default.AccountId.publicKeyTypeEd25519(this._publicKey)}},{key:"xdrPublicKey",value:function(){return new f.default.PublicKey.publicKeyTypeEd25519(this._publicKey)}},{key:"xdrMuxedAccount",value:function(e){if(!(0,a.default)(e)){if(!(0,s.default)(e))throw new TypeError("expected string for ID, got "+(void 0===e?"undefined":n(e)));return f.default.MuxedAccount.keyTypeMuxedEd25519(new f.default.MuxedAccountMed25519({id:f.default.Uint64.fromString(e),ed25519:this._publicKey}))}return new f.default.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 c.StrKey.encodeEd25519PublicKey(this._publicKey)}},{key:"secret",value:function(){if(!this._secretSeed)throw new Error("no secret key available");if("ed25519"===this.type)return c.StrKey.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(0,u.sign)(e,this._secretKey)}},{key:"verify",value:function(e,t){return(0,u.verify)(e,t,this._publicKey)}},{key:"signDecorated",value:function(e){var t=this.sign(e),r=this.signatureHint();return new f.default.DecoratedSignature({hint:r,signature:t})}},{key:"signPayloadDecorated",value:function(t){var r=this.sign(t),n=this.signatureHint(),o=e.from(t.slice(-4));return o.length<4&&(o=e.concat([o,e.alloc(4-t.length,0)])),new f.default.DecoratedSignature({hint:o.map((function(e,t){return e^n[t]})),signature:r})}}],[{key:"fromSecret",value:function(e){var t=c.StrKey.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((0,l.hash)(e))}},{key:"fromPublicKey",value:function(e){if(32!==(e=c.StrKey.decodeEd25519PublicKey(e)).length)throw new Error("Invalid Stellar public key");return new this({type:"ed25519",publicKey:e})}},{key:"random",value:function(){var e=i.default.randomBytes(32);return this.fromRawEd25519Seed(e)}}]),t}()}).call(this,r(1).Buffer)},function(e,t,r){var n=r(39),o=r(184),i=r(185),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},function(e,t,r){
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
var n=r(1),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)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(105);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o=r(292);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}))},function(e,t,r){var n;/*! bignumber.js v4.1.0 https://github.com/MikeMcl/bignumber.js/LICENCE */!function(o){"use strict";var i,a=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,s=Math.ceil,u=Math.floor,c=" not a boolean or binary digit",l="number type has more than 15 significant digits",f="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",d=1e14,h=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],p=1e9;function y(e){var t=0|e;return e>0||e===t?t:t-1}function v(e){for(var t,r,n=1,o=e.length,i=e[0]+"";n<o;){for(r=14-(t=e[n++]+"").length;r--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function m(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 g(e,t,r){return(e=k(e))>=t&&e<=r}function b(e){return"[object Array]"==Object.prototype.toString.call(e)}function w(e,t,r){for(var n,o,i=[0],a=0,s=e.length;a<s;){for(o=i.length;o--;i[o]*=t);for(i[n=0]+=f.indexOf(e.charAt(a++));n<i.length;n++)i[n]>r-1&&(null==i[n+1]&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function _(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function S(e,t){var r,n;if(t<0){for(n="0.";++t;n+="0");e=n+e}else if(++t>(r=e.length)){for(n="0",t-=r;--t;n+="0");e+=n}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}function k(e){return(e=parseFloat(e))<0?s(e):u(e)}(i=function e(t){var r,n,o,i,A,E,x,T,O=0,P=V.prototype,R=new V(1),C=20,I=4,B=-7,M=21,j=-1e7,N=1e7,L=!0,q=Q,U=!1,D=1,F=0,K={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:" ",fractionGroupSize:0};function V(e,t){var r,o,i,s,c,d,h=this;if(!(h instanceof V))return L&&G(26,"constructor call without new",e),new V(e,t);if(null!=t&&q(t,2,64,O,"base")){if(d=e+"",10==(t|=0))return Y(h=new V(e instanceof V?e:d),C+h.e+1,I);if((s="number"==typeof e)&&0*e!=0||!new RegExp("^-?"+(r="["+f.slice(0,t)+"]+")+"(?:\\."+r+")?$",t<37?"i":"").test(d))return n(h,d,s,t);s?(h.s=1/e<0?(d=d.slice(1),-1):1,L&&d.replace(/^0\.0*|\./,"").length>15&&G(O,l,e),s=!1):h.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1,d=z(d,10,t,h.s)}else{if(e instanceof V)return h.s=e.s,h.e=e.e,h.c=(e=e.c)?e.slice():e,void(O=0);if((s="number"==typeof e)&&0*e==0){if(h.s=1/e<0?(e=-e,-1):1,e===~~e){for(o=0,i=e;i>=10;i/=10,o++);return h.e=o,h.c=[e],void(O=0)}d=e+""}else{if(!a.test(d=e+""))return n(h,d,s);h.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1}}for((o=d.indexOf("."))>-1&&(d=d.replace(".","")),(i=d.search(/e/i))>0?(o<0&&(o=i),o+=+d.slice(i+1),d=d.substring(0,i)):o<0&&(o=d.length),i=0;48===d.charCodeAt(i);i++);for(c=d.length;48===d.charCodeAt(--c););if(d=d.slice(i,c+1))if(c=d.length,s&&L&&c>15&&(e>9007199254740991||e!==u(e))&&G(O,l,h.s*e),(o=o-i-1)>N)h.c=h.e=null;else if(o<j)h.c=[h.e=0];else{if(h.e=o,h.c=[],i=(o+1)%14,o<0&&(i+=14),i<c){for(i&&h.c.push(+d.slice(0,i)),c-=14;i<c;)h.c.push(+d.slice(i,i+=14));i=14-(d=d.slice(i)).length}else i-=c;for(;i--;d+="0");h.c.push(+d)}else h.c=[h.e=0];O=0}function z(e,t,n,o){var i,a,s,u,c,l,d,h=e.indexOf("."),p=C,y=I;for(n<37&&(e=e.toLowerCase()),h>=0&&(s=F,F=0,e=e.replace(".",""),c=(d=new V(n)).pow(e.length-h),F=s,d.c=w(S(v(c.c),c.e),10,t),d.e=d.c.length),a=s=(l=w(e,n,t)).length;0==l[--s];l.pop());if(!l[0])return"0";if(h<0?--a:(c.c=l,c.e=a,c.s=o,l=(c=r(c,d,p,y,t)).c,u=c.r,a=c.e),h=l[i=a+p+1],s=t/2,u=u||i<0||null!=l[i+1],u=y<4?(null!=h||u)&&(0==y||y==(c.s<0?3:2)):h>s||h==s&&(4==y||u||6==y&&1&l[i-1]||y==(c.s<0?8:7)),i<1||!l[0])e=u?S("1",-p):"0";else{if(l.length=i,u)for(--t;++l[--i]>t;)l[i]=0,i||(++a,l=[1].concat(l));for(s=l.length;!l[--s];);for(h=0,e="";h<=s;e+=f.charAt(l[h++]));e=S(e,a)}return e}function H(e,t,r,n){var o,i,a,s,u;if(r=null!=r&&q(r,0,8,n,"rounding mode")?0|r:I,!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)u=v(e.c),u=19==n||24==n&&a<=B?_(u,a):S(u,a);else if(i=(e=Y(new V(e),t,r)).e,s=(u=v(e.c)).length,19==n||24==n&&(t<=i||i<=B)){for(;s<t;u+="0",s++);u=_(u,i)}else if(t-=a,u=S(u,i),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){var r,n,o=0;for(b(e[0])&&(e=e[0]),r=new V(e[0]);++o<e.length;){if(!(n=new V(e[o])).s){r=n;break}t.call(r,n)&&(r=n)}return r}function Q(e,t,r,n,o){return(e<t||e>r||e!=k(e))&&G(n,(o||"decimal places")+(e<t||e>r?" out of range":" not an integer"),e),!0}function W(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+14*r-1)>N?e.c=e.e=null:r<j?e.c=[e.e=0]:(e.e=r,e.c=t),e}function G(e,t,r){var n=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][e]+"() "+t+": "+r);throw n.name="BigNumber Error",O=0,n}function Y(e,t,r,n){var o,i,a,c,l,f,p,y=e.c,v=h;if(y){e:{for(o=1,c=y[0];c>=10;c/=10,o++);if((i=t-o)<0)i+=14,a=t,p=(l=y[f=0])/v[o-a-1]%10|0;else if((f=s((i+1)/14))>=y.length){if(!n)break e;for(;y.length<=f;y.push(0));l=p=0,o=1,a=(i%=14)-14+1}else{for(l=c=y[f],o=1;c>=10;c/=10,o++);p=(a=(i%=14)-14+o)<0?0:l/v[o-a-1]%10|0}if(n=n||t<0||null!=y[f+1]||(a<0?l:l%v[o-a-1]),n=r<4?(p||n)&&(0==r||r==(e.s<0?3:2)):p>5||5==p&&(4==r||n||6==r&&(i>0?a>0?l/v[o-a]:0:y[f-1])%10&1||r==(e.s<0?8:7)),t<1||!y[0])return y.length=0,n?(t-=e.e+1,y[0]=v[(14-t%14)%14],e.e=-t||0):y[0]=e.e=0,e;if(0==i?(y.length=f,c=1,f--):(y.length=f+1,c=v[14-i],y[f]=a>0?u(l/v[o-a]%v[a])*c:0),n)for(;;){if(0==f){for(i=1,a=y[0];a>=10;a/=10,i++);for(a=y[0]+=c,c=1;a>=10;a/=10,c++);i!=c&&(e.e++,y[0]==d&&(y[0]=1));break}if(y[f]+=c,y[f]!=d)break;y[f--]=0,c=1}for(i=y.length;0===y[--i];y.pop());}e.e>N?e.c=e.e=null:e.e<j&&(e.c=[e.e=0])}return e}return V.another=e,V.ROUND_UP=0,V.ROUND_DOWN=1,V.ROUND_CEIL=2,V.ROUND_FLOOR=3,V.ROUND_HALF_UP=4,V.ROUND_HALF_DOWN=5,V.ROUND_HALF_EVEN=6,V.ROUND_HALF_CEIL=7,V.ROUND_HALF_FLOOR=8,V.EUCLID=9,V.config=V.set=function(){var e,t,r=0,n={},o=arguments,i=o[0],a=i&&"object"==typeof i?function(){if(i.hasOwnProperty(t))return null!=(e=i[t])}:function(){if(o.length>r)return null!=(e=o[r++])};return a(t="DECIMAL_PLACES")&&q(e,0,p,2,t)&&(C=0|e),n[t]=C,a(t="ROUNDING_MODE")&&q(e,0,8,2,t)&&(I=0|e),n[t]=I,a(t="EXPONENTIAL_AT")&&(b(e)?q(e[0],-p,0,2,t)&&q(e[1],0,p,2,t)&&(B=0|e[0],M=0|e[1]):q(e,-p,p,2,t)&&(B=-(M=0|(e<0?-e:e)))),n[t]=[B,M],a(t="RANGE")&&(b(e)?q(e[0],-p,-1,2,t)&&q(e[1],1,p,2,t)&&(j=0|e[0],N=0|e[1]):q(e,-p,p,2,t)&&(0|e?j=-(N=0|(e<0?-e:e)):L&&G(2,t+" cannot be zero",e))),n[t]=[j,N],a(t="ERRORS")&&(e===!!e||1===e||0===e?(O=0,q=(L=!!e)?Q:g):L&&G(2,t+c,e)),n[t]=L,a(t="CRYPTO")&&(!0===e||!1===e||1===e||0===e?e?!(e="undefined"==typeof crypto)&&crypto&&(crypto.getRandomValues||crypto.randomBytes)?U=!0:L?G(2,"crypto unavailable",e?void 0:crypto):U=!1:U=!1:L&&G(2,t+c,e)),n[t]=U,a(t="MODULO_MODE")&&q(e,0,9,2,t)&&(D=0|e),n[t]=D,a(t="POW_PRECISION")&&q(e,0,p,2,t)&&(F=0|e),n[t]=F,a(t="FORMAT")&&("object"==typeof e?K=e:L&&G(2,t+" not an object",e)),n[t]=K,n},V.max=function(){return X(arguments,P.lt)},V.min=function(){return X(arguments,P.gt)},V.random=(o=9007199254740992*Math.random()&2097151?function(){return u(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,a,c=0,l=[],f=new V(R);if(e=null!=e&&q(e,0,p,14)?0|e:C,i=s(e/14),U)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));c<i;)(a=131072*t[c]+(t[c+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[c]=r[0],t[c+1]=r[1]):(l.push(a%1e14),c+=2);c=i/2}else if(crypto.randomBytes){for(t=crypto.randomBytes(i*=7);c<i;)(a=281474976710656*(31&t[c])+1099511627776*t[c+1]+4294967296*t[c+2]+16777216*t[c+3]+(t[c+4]<<16)+(t[c+5]<<8)+t[c+6])>=9e15?crypto.randomBytes(7).copy(t,c):(l.push(a%1e14),c+=7);c=i/7}else U=!1,L&&G(14,"crypto unavailable",crypto);if(!U)for(;c<i;)(a=o())<9e15&&(l[c++]=a%1e14);for(e%=14,(i=l[--c])&&e&&(a=h[14-e],l[c]=u(i/a)*a);0===l[c];l.pop(),c--);if(c<0)l=[n=0];else{for(n=-1;0===l[0];l.splice(0,1),n-=14);for(c=1,a=l[0];a>=10;a/=10,c++);c<14&&(n-=14-c)}return f.e=n,f.c=l,f}),r=function(){function e(e,t,r){var n,o,i,a,s=0,u=e.length,c=t%1e7,l=t/1e7|0;for(e=e.slice();u--;)s=((o=c*(i=e[u]%1e7)+(n=l*i+(a=e[u]/1e7|0)*c)%1e7*1e7+s)/r|0)+(n/1e7|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 c,l,f,h,p,v,m,g,b,w,_,S,k,A,E,x,T,O=n.s==o.s?1:-1,P=n.c,R=o.c;if(!(P&&P[0]&&R&&R[0]))return new V(n.s&&o.s&&(P?!R||P[0]!=R[0]:R)?P&&0==P[0]||!R?0*O:O/0:NaN);for(b=(g=new V(O)).c=[],O=i+(l=n.e-o.e)+1,s||(s=d,l=y(n.e/14)-y(o.e/14),O=O/14|0),f=0;R[f]==(P[f]||0);f++);if(R[f]>(P[f]||0)&&l--,O<0)b.push(1),h=!0;else{for(A=P.length,x=R.length,f=0,O+=2,(p=u(s/(R[0]+1)))>1&&(R=e(R,p,s),P=e(P,p,s),x=R.length,A=P.length),k=x,_=(w=P.slice(0,x)).length;_<x;w[_++]=0);T=R.slice(),T=[0].concat(T),E=R[0],R[1]>=s/2&&E++;do{if(p=0,(c=t(R,w,x,_))<0){if(S=w[0],x!=_&&(S=S*s+(w[1]||0)),(p=u(S/E))>1)for(p>=s&&(p=s-1),m=(v=e(R,p,s)).length,_=w.length;1==t(v,w,m,_);)p--,r(v,x<m?T:R,m,s),m=v.length,c=1;else 0==p&&(c=p=1),m=(v=R.slice()).length;if(m<_&&(v=[0].concat(v)),r(w,v,_,s),_=w.length,-1==c)for(;t(R,w,x,_)<1;)p++,r(w,x<_?T:R,_,s),_=w.length}else 0===c&&(p++,w=[0]);b[f++]=p,w[0]?w[_++]=P[k]||0:(w=[P[k]],_=1)}while((k++<A||null!=w[0])&&O--);h=null!=w[0],b[0]||b.splice(0,1)}if(s==d){for(f=1,O=b[0];O>=10;O/=10,f++);Y(g,i+(g.e=f+14*l-1)+1,a,h)}else g.e=l,g.r=+h;return g}}(),i=/^(-?)0([xbo])(?=\w[\w.]*$)/i,A=/^([^.]+)\.$/,E=/^\.([^.]+)$/,x=/^-?(Infinity|NaN)$/,T=/^\s*\+(?=[\w.])|^\s+|\s+$/g,n=function(e,t,r,n){var o,a=r?t:t.replace(T,"");if(x.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!r&&(a=a.replace(i,(function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t})),n&&(o=n,a=a.replace(A,"$1").replace(E,"0.$1")),t!=a))return new V(a,o);L&&G(O,"not a"+(n?" base "+n:"")+" number",t),e.s=null}e.c=e.e=null,O=0},P.absoluteValue=P.abs=function(){var e=new V(this);return e.s<0&&(e.s=1),e},P.ceil=function(){return Y(new V(this),this.e+1,2)},P.comparedTo=P.cmp=function(e,t){return O=1,m(this,new V(e,t))},P.decimalPlaces=P.dp=function(){var e,t,r=this.c;if(!r)return null;if(e=14*((t=r.length-1)-y(this.e/14)),t=r[t])for(;t%10==0;t/=10,e--);return e<0&&(e=0),e},P.dividedBy=P.div=function(e,t){return O=3,r(this,new V(e,t),C,I)},P.dividedToIntegerBy=P.divToInt=function(e,t){return O=4,r(this,new V(e,t),0,1)},P.equals=P.eq=function(e,t){return O=5,0===m(this,new V(e,t))},P.floor=function(){return Y(new V(this),this.e+1,3)},P.greaterThan=P.gt=function(e,t){return O=6,m(this,new V(e,t))>0},P.greaterThanOrEqualTo=P.gte=function(e,t){return O=7,1===(t=m(this,new V(e,t)))||0===t},P.isFinite=function(){return!!this.c},P.isInteger=P.isInt=function(){return!!this.c&&y(this.e/14)>this.c.length-2},P.isNaN=function(){return!this.s},P.isNegative=P.isNeg=function(){return this.s<0},P.isZero=function(){return!!this.c&&0==this.c[0]},P.lessThan=P.lt=function(e,t){return O=8,m(this,new V(e,t))<0},P.lessThanOrEqualTo=P.lte=function(e,t){return O=9,-1===(t=m(this,new V(e,t)))||0===t},P.minus=P.sub=function(e,t){var r,n,o,i,a=this,s=a.s;if(O=10,t=(e=new V(e,t)).s,!s||!t)return new V(NaN);if(s!=t)return e.s=-t,a.plus(e);var u=a.e/14,c=e.e/14,l=a.c,f=e.c;if(!u||!c){if(!l||!f)return l?(e.s=-t,e):new V(f?a:NaN);if(!l[0]||!f[0])return f[0]?(e.s=-t,e):new V(l[0]?a:3==I?-0:0)}if(u=y(u),c=y(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=d-1;n>s;){if(l[--n]<f[n]){for(r=n;r&&!l[--r];l[r]=t);--l[r],l[n]+=d}l[n]-=f[n]}for(;0==l[0];l.splice(0,1),--c);return l[0]?W(e,l,c):(e.s=3==I?-1:1,e.c=[e.e=0],e)},P.modulo=P.mod=function(e,t){var n,o,i=this;return O=11,e=new V(e,t),!i.c||!e.s||e.c&&!e.c[0]?new V(NaN):!e.c||i.c&&!i.c[0]?new V(i):(9==D?(o=e.s,e.s=1,n=r(i,e,0,3),e.s=o,n.s*=o):n=r(i,e,0,D),i.minus(n.times(e)))},P.negated=P.neg=function(){var e=new V(this);return e.s=-e.s||null,e},P.plus=P.add=function(e,t){var r,n=this,o=n.s;if(O=12,t=(e=new V(e,t)).s,!o||!t)return new V(NaN);if(o!=t)return e.s=-t,n.minus(e);var i=n.e/14,a=e.e/14,s=n.c,u=e.c;if(!i||!a){if(!s||!u)return new V(o/0);if(!s[0]||!u[0])return u[0]?e:new V(s[0]?n:0*o)}if(i=y(i),a=y(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)/d|0,s[t]=d===s[t]?0:s[t]%d;return o&&(s=[o].concat(s),++a),W(e,s,a)},P.precision=P.sd=function(e){var t,r,n=this,o=n.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(L&&G(13,"argument"+c,e),e!=!!e&&(e=null)),!o)return null;if(t=14*(r=o.length-1)+1,r=o[r]){for(;r%10==0;r/=10,t--);for(r=o[0];r>=10;r/=10,t++);}return e&&n.e+1>t&&(t=n.e+1),t},P.round=function(e,t){var r=new V(this);return(null==e||q(e,0,p,15))&&Y(r,~~e+this.e+1,null!=t&&q(t,0,8,15,"rounding mode")?0|t:I),r},P.shift=function(e){var t=this;return q(e,-9007199254740991,9007199254740991,16,"argument")?t.times("1e"+k(e)):new V(t.c&&t.c[0]&&(e<-9007199254740991||e>9007199254740991)?t.s*(e<0?0:1/0):t)},P.squareRoot=P.sqrt=function(){var e,t,n,o,i,a=this,s=a.c,u=a.s,c=a.e,l=C+4,f=new V("0.5");if(1!==u||!s||!s[0])return new V(!u||u<0&&(!s||s[0])?NaN:s?a:1/0);if(0==(u=Math.sqrt(+a))||u==1/0?(((t=v(s)).length+c)%2==0&&(t+="0"),u=Math.sqrt(t),c=y((c+1)/2)-(c<0||c%2),n=new V(t=u==1/0?"1e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new V(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))),v(i.c).slice(0,u)===(t=v(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))||(Y(n,n.e+C+2,1),e=!n.times(n).eq(a));break}if(!o&&(Y(i,i.e+C+2,0),i.times(i).eq(a))){n=i;break}l+=4,u+=4,o=1}return Y(n,n.e+C+1,I,e)},P.times=P.mul=function(e,t){var r,n,o,i,a,s,u,c,l,f,h,p,v,m,g=this,b=g.c,w=(O=17,e=new V(e,t)).c;if(!(b&&w&&b[0]&&w[0]))return!g.s||!e.s||b&&!b[0]&&!w||w&&!w[0]&&!b?e.c=e.e=e.s=null:(e.s*=g.s,b&&w?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=y(g.e/14)+y(e.e/14),e.s*=g.s,(u=b.length)<(f=w.length)&&(v=b,b=w,w=v,o=u,u=f,f=o),o=u+f,v=[];o--;v.push(0));for(m=d,1e7,o=f;--o>=0;){for(r=0,h=w[o]%1e7,p=w[o]/1e7|0,i=o+(a=u);i>o;)r=((c=h*(c=b[--a]%1e7)+(s=p*c+(l=b[a]/1e7|0)*h)%1e7*1e7+v[i]+r)/m|0)+(s/1e7|0)+p*l,v[i--]=c%m;v[i]=r}return r?++n:v.splice(0,1),W(e,v,n)},P.toDigits=function(e,t){var r=new V(this);return e=null!=e&&q(e,1,p,18,"precision")?0|e:null,t=null!=t&&q(t,0,8,18,"rounding mode")?0|t:I,e?Y(r,e,t):r},P.toExponential=function(e,t){return H(this,null!=e&&q(e,0,p,19)?1+~~e:null,t,19)},P.toFixed=function(e,t){return H(this,null!=e&&q(e,0,p,20)?~~e+this.e+1:null,t,20)},P.toFormat=function(e,t){var r=H(this,null!=e&&q(e,0,p,21)?~~e+this.e+1:null,t,21);if(this.c){var n,o=r.split("."),i=+K.groupSize,a=+K.secondaryGroupSize,s=K.groupSeparator,u=o[0],c=o[1],l=this.s<0,f=l?u.slice(1):u,d=f.length;if(a&&(n=i,i=a,a=n,d-=n),i>0&&d>0){for(n=d%i||i,u=f.substr(0,n);n<d;n+=i)u+=s+f.substr(n,i);a>0&&(u+=s+f.slice(n)),l&&(u="-"+u)}r=c?u+K.decimalSeparator+((a=+K.fractionGroupSize)?c.replace(new RegExp("\\d{"+a+"}\\B","g"),"$&"+K.fractionGroupSeparator):c):u}return r},P.toFraction=function(e){var t,n,o,i,a,s,u,c,l,f=L,d=this,p=d.c,y=new V(R),m=n=new V(R),g=u=new V(R);if(null!=e&&(L=!1,s=new V(e),L=f,(f=s.isInt())&&!s.lt(R)||(L&&G(22,"max denominator "+(f?"out of range":"not an integer"),e),e=!f&&s.c&&Y(s,s.e+1,1).gte(R)?s:null)),!p)return d.toString();for(l=v(p),i=y.e=l.length-d.e-1,y.c[0]=h[(a=i%14)<0?14+a:a],e=!e||s.cmp(y)>0?i>0?y:m:s,a=N,N=1/0,s=new V(l),u.c[0]=0;c=r(s,y,0,1),1!=(o=n.plus(c.times(g))).cmp(e);)n=g,g=o,m=u.plus(c.times(o=m)),u=o,y=s.minus(c.times(o=y)),s=o;return o=r(e.minus(n),g,0,1),u=u.plus(o.times(m)),n=n.plus(o.times(g)),u.s=m.s=d.s,t=r(m,g,i*=2,I).minus(d).abs().cmp(r(u,n,i,I).minus(d).abs())<1?[m.toString(),g.toString()]:[u.toString(),n.toString()],N=a,t},P.toNumber=function(){return+this},P.toPower=P.pow=function(e,t){var r,n,o,i=u(e<0?-e:+e),a=this;if(null!=t&&(O=23,t=new V(t)),!q(e,-9007199254740991,9007199254740991,23,"exponent")&&(!isFinite(e)||i>9007199254740991&&(e/=0)||parseFloat(e)!=e&&!(e=NaN))||0==e)return r=Math.pow(+a,e),new V(t?r%t:r);for(t?e>1&&a.gt(R)&&a.isInt()&&t.gt(R)&&t.isInt()?a=a.mod(t):(o=t,t=null):F&&(r=s(F/14+2)),n=new V(R);;){if(i%2){if(!(n=n.times(a)).c)break;r?n.c.length>r&&(n.c.length=r):t&&(n=n.mod(t))}if(!(i=u(i/2)))break;a=a.times(a),r?a.c&&a.c.length>r&&(a.c.length=r):t&&(a=a.mod(t))}return t?n:(e<0&&(n=R.div(n)),o?n.mod(o):r?Y(n,F,I):n)},P.toPrecision=function(e,t){return H(this,null!=e&&q(e,1,p,24,"precision")?0|e:null,t,24)},P.toString=function(e){var t,r=this,n=r.s,o=r.e;return null===o?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(t=v(r.c),t=null!=e&&q(e,2,64,25,"base")?z(S(t,o),0|e,10,n):o<=B||o>=M?_(t,o):S(t,o),n<0&&r.c[0]&&(t="-"+t)),t},P.truncated=P.trunc=function(){return Y(new V(this),this.e+1,1)},P.valueOf=P.toJSON=function(){var e,t=this,r=t.e;return null===r?t.toString():(e=v(t.c),e=r<=B||r>=M?_(e,r):S(e,r),t.s<0?"-"+e:e)},P.isBigNumber=!0,null!=t&&V.config(t),V}()).default=i.BigNumber=i,void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)}()},function(e,t,r){var n=r(96),o=r(188),i=r(25);e.exports=function(e){return i(e)?n(e,!0):o(e)}},function(e,t,r){var n=r(50),o=r(69);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},function(e,t,r){var n=r(202),o=r(205);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Asset=void 0;var n=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=l(r(28)),i=l(r(140)),a=l(r(144)),s=l(r(0)),u=r(19),c=r(8);function l(e){return e&&e.__esModule?e:{default:e}}t.Asset=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&&!c.StrKey.isValidEd25519PublicKey(r))throw new Error("Issuer is invalid");"xlm"===String(t).toLowerCase()?this.code="XLM":this.code=t,this.issuer=r}return n(e,[{key:"toXDRObject",value:function(){return this._toXDRObject(s.default.Asset)}},{key:"toChangeTrustXDRObject",value:function(){return this._toXDRObject(s.default.ChangeTrustAsset)}},{key:"toTrustLineXDRObject",value:function(){return this._toXDRObject(s.default.TrustLineAsset)}},{key:"_toXDRObject",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.default.Asset;if(this.isNative())return e.assetTypeNative();var t=void 0,r=void 0;this.code.length<=4?(t=s.default.AlphaNum4,r="assetTypeCreditAlphanum4"):(t=s.default.AlphaNum12,r="assetTypeCreditAlphanum12");var n=this.code.length<=4?4:12,o=(0,i.default)(this.code,n,"\0"),a=new t({assetCode:o,issuer:u.Keypair.fromPublicKey(this.issuer).xdrAccountId()});return new e(r,a)}},{key:"getCode",value:function(){return(0,o.default)(this.code)}},{key:"getIssuer",value:function(){return(0,o.default)(this.issuer)}},{key:"getAssetType",value:function(){switch(this.getRawAssetType()){case s.default.AssetType.assetTypeNative():return"native";case s.default.AssetType.assetTypeCreditAlphanum4():return"credit_alphanum4";case s.default.AssetType.assetTypeCreditAlphanum12():return"credit_alphanum12";default:return"unknown"}}},{key:"getRawAssetType",value:function(){return this.isNative()?s.default.AssetType.assetTypeNative():this.code.length<=4?s.default.AssetType.assetTypeCreditAlphanum4():s.default.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":this.getCode()+":"+this.getIssuer()}}],[{key:"native",value:function(){return new e("XLM")}},{key:"fromOperation",value:function(e){var t=void 0,r=void 0;switch(e.switch()){case s.default.AssetType.assetTypeNative():return this.native();case s.default.AssetType.assetTypeCreditAlphanum4():t=e.alphaNum4();case s.default.AssetType.assetTypeCreditAlphanum12():return t=t||e.alphaNum12(),r=c.StrKey.encodeEd25519PublicKey(t.issuer().ed25519()),new this((0,a.default)(t.assetCode(),"\0"),r);default:throw new Error("Invalid asset type: "+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())}}]),e}();function f(e,t){return e.localeCompare(t,"en",{caseFirst:"upper"})}},function(e,t,r){var n=r(293);e.exports=function(e){return n(e,4)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeMuxedAccount=t.extractBaseAddress=t.encodeMuxedAccountToAddress=t.decodeAddressToMuxedAccount=t.SignerKey=t.StrKey=t.Networks=t.Claimant=t.MuxedAccount=t.Account=t.AuthClawbackEnabledFlag=t.AuthImmutableFlag=t.AuthRevocableFlag=t.AuthRequiredFlag=t.Operation=t.LiquidityPoolId=t.LiquidityPoolAsset=t.Asset=t.BASE_FEE=t.TimeoutInfinite=t.TransactionBuilder=t.FeeBumpTransaction=t.Transaction=t.TransactionBase=t.Hyper=t.UnsignedHyper=t.Keypair=t.LiquidityPoolFeeV18=t.getLiquidityPoolId=t.FastSigning=t.verify=t.sign=t.hash=t.xdr=void 0;var n=r(30);Object.defineProperty(t,"hash",{enumerable:!0,get:function(){return n.hash}});var o=r(102);Object.defineProperty(t,"sign",{enumerable:!0,get:function(){return o.sign}}),Object.defineProperty(t,"verify",{enumerable:!0,get:function(){return o.verify}}),Object.defineProperty(t,"FastSigning",{enumerable:!0,get:function(){return o.FastSigning}});var i=r(104);Object.defineProperty(t,"getLiquidityPoolId",{enumerable:!0,get:function(){return i.getLiquidityPoolId}}),Object.defineProperty(t,"LiquidityPoolFeeV18",{enumerable:!0,get:function(){return i.LiquidityPoolFeeV18}});var a=r(19);Object.defineProperty(t,"Keypair",{enumerable:!0,get:function(){return a.Keypair}});var s=r(22);Object.defineProperty(t,"UnsignedHyper",{enumerable:!0,get:function(){return s.UnsignedHyper}}),Object.defineProperty(t,"Hyper",{enumerable:!0,get:function(){return s.Hyper}});var u=r(86);Object.defineProperty(t,"TransactionBase",{enumerable:!0,get:function(){return u.TransactionBase}});var c=r(87);Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return c.Transaction}});var l=r(148);Object.defineProperty(t,"FeeBumpTransaction",{enumerable:!0,get:function(){return l.FeeBumpTransaction}});var f=r(361);Object.defineProperty(t,"TransactionBuilder",{enumerable:!0,get:function(){return f.TransactionBuilder}}),Object.defineProperty(t,"TimeoutInfinite",{enumerable:!0,get:function(){return f.TimeoutInfinite}}),Object.defineProperty(t,"BASE_FEE",{enumerable:!0,get:function(){return f.BASE_FEE}});var d=r(27);Object.defineProperty(t,"Asset",{enumerable:!0,get:function(){return d.Asset}});var h=r(88);Object.defineProperty(t,"LiquidityPoolAsset",{enumerable:!0,get:function(){return h.LiquidityPoolAsset}});var p=r(89);Object.defineProperty(t,"LiquidityPoolId",{enumerable:!0,get:function(){return p.LiquidityPoolId}});var y=r(145);Object.defineProperty(t,"Operation",{enumerable:!0,get:function(){return y.Operation}}),Object.defineProperty(t,"AuthRequiredFlag",{enumerable:!0,get:function(){return y.AuthRequiredFlag}}),Object.defineProperty(t,"AuthRevocableFlag",{enumerable:!0,get:function(){return y.AuthRevocableFlag}}),Object.defineProperty(t,"AuthImmutableFlag",{enumerable:!0,get:function(){return y.AuthImmutableFlag}}),Object.defineProperty(t,"AuthClawbackEnabledFlag",{enumerable:!0,get:function(){return y.AuthClawbackEnabledFlag}});var v=r(90);Object.keys(v).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return v[e]}})}));var m=r(150);Object.defineProperty(t,"Account",{enumerable:!0,get:function(){return m.Account}});var g=r(362);Object.defineProperty(t,"MuxedAccount",{enumerable:!0,get:function(){return g.MuxedAccount}});var b=r(146);Object.defineProperty(t,"Claimant",{enumerable:!0,get:function(){return b.Claimant}});var w=r(363);Object.defineProperty(t,"Networks",{enumerable:!0,get:function(){return w.Networks}});var _=r(8);Object.defineProperty(t,"StrKey",{enumerable:!0,get:function(){return _.StrKey}});var S=r(149);Object.defineProperty(t,"SignerKey",{enumerable:!0,get:function(){return S.SignerKey}});var k=r(17);Object.defineProperty(t,"decodeAddressToMuxedAccount",{enumerable:!0,get:function(){return k.decodeAddressToMuxedAccount}}),Object.defineProperty(t,"encodeMuxedAccountToAddress",{enumerable:!0,get:function(){return k.encodeMuxedAccountToAddress}}),Object.defineProperty(t,"extractBaseAddress",{enumerable:!0,get:function(){return k.extractBaseAddress}}),Object.defineProperty(t,"encodeMuxedAccount",{enumerable:!0,get:function(){return k.encodeMuxedAccount}});var A,E=r(0),x=(A=E)&&A.__esModule?A:{default:A};t.xdr=x.default,t.default=e.exports},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hash=function(e){var t=new n.sha256;return t.update(e,"utf8"),t.digest()};var n=r(190)},function(e,t,r){var n=r(21).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},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Int=void 0;var n=i(r(42)),o=i(r(4));function i(e){return e&&e.__esModule?e:{default:e}}var a=t.Int={read:function(e){return e.readInt32BE()},write:function(e,t){if(!(0,n.default)(e))throw new Error("XDR Write Error: not a number");if(Math.floor(e)!==e)throw new Error("XDR Write Error: not an integer");t.writeInt32BE(e)},isValid:function(e){return!!(0,n.default)(e)&&(Math.floor(e)===e&&(e>=a.MIN_VALUE&&e<=a.MAX_VALUE))}};a.MAX_VALUE=Math.pow(2,31)-1,a.MIN_VALUE=-Math.pow(2,31),(0,o.default)(a)},function(e,t,r){var n=r(106),o=r(72);e.exports=function(e,t,r,i){var a=!r;r||(r={});for(var s=-1,u=t.length;++s<u;){var c=t[s],l=i?i(r[c],e[c],c,r,e):void 0;void 0===l&&(l=e[c]),a?o(r,c,l):n(r,c,l)}return r}},function(e,t,r){var n=r(96),o=r(111),i=r(25);e.exports=function(e){return i(e)?n(e):o(e)}},function(e,t,r){e.exports=r(279)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccountRequiresMemoError=t.InvalidSep10ChallengeError=t.BadResponseError=t.BadRequestError=t.NotFoundError=t.NetworkError=void 0;var n=r(2),o=function(e){function t(r,n){var o=this,i=this.constructor.prototype;return(o=e.call(this,r)||this).__proto__=i,o.constructor=t,o.response=n,o}return n.__extends(t,e),t.prototype.getResponse=function(){return this.response},t}(Error);t.NetworkError=o;var i=function(e){function t(r,n){var o=this,i=this.constructor.prototype;return(o=e.call(this,r,n)||this).__proto__=i,o.constructor=t,o.name="NotFoundError",o}return n.__extends(t,e),t}(o);t.NotFoundError=i;var a=function(e){function t(r,n){var o=this,i=this.constructor.prototype;return(o=e.call(this,r,n)||this).__proto__=i,o.constructor=t,o.name="BadRequestError",o}return n.__extends(t,e),t}(o);t.BadRequestError=a;var s=function(e){function t(r,n){var o=this,i=this.constructor.prototype;return(o=e.call(this,r,n)||this).__proto__=i,o.constructor=t,o.name="BadResponseError",o}return n.__extends(t,e),t}(o);t.BadResponseError=s;var u=function(e){function t(r){var n=this,o=this.constructor.prototype;return(n=e.call(this,r)||this).__proto__=o,n.constructor=t,n.name="InvalidSep10ChallengeError",n}return n.__extends(t,e),t}(Error);t.InvalidSep10ChallengeError=u;var c=function(e){function t(r,n,o){var i=this,a=this.constructor.prototype;return(i=e.call(this,r)||this).__proto__=a,i.constructor=t,i.name="AccountRequiresMemoError",i.accountId=n,i.operationIndex=o,i}return n.__extends(t,e),t}(Error);t.AccountRequiresMemoError=c},function(e,t,r){var n,o,i;
/*!
* URI.js - Mutating URLs
*
* Version: 1.19.11
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/!function(a,s){"use strict";e.exports?e.exports=s(r(153),r(154),r(155)):(o=[r(153),r(154),r(155)],void 0===(i="function"==typeof(n=s)?n.apply(t,o):n)||(e.exports=i))}(0,(function(e,t,r,n){"use strict";var o=n&&n.URI;function i(e,t){var r=arguments.length>=1,n=arguments.length>=2;if(!(this instanceof i))return r?n?new i(e,t):new i(e):new i;if(void 0===e){if(r)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&r)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}i.version="1.19.11";var a=i.prototype,s=Object.prototype.hasOwnProperty;function u(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function c(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function l(e){return"Array"===c(e)}function f(e,t){var r,n,o={};if("RegExp"===c(t))o=null;else if(l(t))for(r=0,n=t.length;r<n;r++)o[t[r]]=!0;else o[t]=!0;for(r=0,n=e.length;r<n;r++){(o&&void 0!==o[e[r]]||!o&&t.test(e[r]))&&(e.splice(r,1),n--,r--)}return e}function d(e,t){var r,n;if(l(t)){for(r=0,n=t.length;r<n;r++)if(!d(e,t[r]))return!1;return!0}var o=c(t);for(r=0,n=e.length;r<n;r++)if("RegExp"===o){if("string"==typeof e[r]&&e[r].match(t))return!0}else if(e[r]===t)return!0;return!1}function h(e,t){if(!l(e)||!l(t))return!1;if(e.length!==t.length)return!1;e.sort(),t.sort();for(var r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0}function p(e){return e.replace(/^\/+|\/+$/g,"")}function y(e){return escape(e)}function v(e){return encodeURIComponent(e).replace(/[!'()*]/g,y).replace(/\*/g,"%2A")}i._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:i.preventInvalidHostname,duplicateQueryParameters:i.duplicateQueryParameters,escapeQuerySpace:i.escapeQuerySpace}},i.preventInvalidHostname=!1,i.duplicateQueryParameters=!1,i.escapeQuerySpace=!0,i.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,i.idn_expression=/[^a-z0-9\._-]/i,i.punycode_expression=/(xn--)/i,i.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,i.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,i.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},i.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.hostProtocols=["http","https"],i.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return i.domAttributes[t]}},i.encode=v,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=v,i.decode=decodeURIComponent},i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},i.encodeQuery=function(e,t){var r=i.encode(e+"");return void 0===t&&(t=i.escapeQuerySpace),t?r.replace(/%20/g,"+"):r},i.decodeQuery=function(e,t){e+="",void 0===t&&(t=i.escapeQuerySpace);try{return i.decode(t?e.replace(/\+/g,"%20"):e)}catch(t){return e}};var m,g={encode:"encode",decode:"decode"},b=function(e,t){return function(r){try{return i[t](r+"").replace(i.characters[e][t].expression,(function(r){return i.characters[e][t].map[r]}))}catch(e){return r}}};for(m in g)i[m+"PathSegment"]=b("pathname",g[m]),i[m+"UrnPathSegment"]=b("urnpath",g[m]);var w=function(e,t,r){return function(n){var o;o=r?function(e){return i[t](i[r](e))}:i[t];for(var a=(n+"").split(e),s=0,u=a.length;s<u;s++)a[s]=o(a[s]);return a.join(e)}};function _(e){return function(t,r){return void 0===t?this._parts[e]||"":(this._parts[e]=t||null,this.build(!r),this)}}function S(e,t){return function(r,n){return void 0===r?this._parts[e]||"":(null!==r&&(r+="").charAt(0)===t&&(r=r.substring(1)),this._parts[e]=r,this.build(!n),this)}}i.decodePath=w("/","decodePathSegment"),i.decodeUrnPath=w(":","decodeUrnPathSegment"),i.recodePath=w("/","encodePathSegment","decode"),i.recodeUrnPath=w(":","encodeUrnPathSegment","decode"),i.encodeReserved=b("reserved","encode"),i.parse=function(e,t){var r;return t||(t={preventInvalidHostname:i.preventInvalidHostname}),(r=(e=(e=e.replace(i.leading_whitespace_expression,"")).replace(i.ascii_tab_whitespace,"")).indexOf("#"))>-1&&(t.fragment=e.substring(r+1)||null,e=e.substring(0,r)),(r=e.indexOf("?"))>-1&&(t.query=e.substring(r+1)||null,e=e.substring(0,r)),"//"===(e=(e=e.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)?(t.protocol=null,e=e.substring(2),e=i.parseAuthority(e,t)):(r=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,r)||null,t.protocol&&!t.protocol.match(i.protocol_expression)?t.protocol=void 0:"//"===e.substring(r+1,r+3).replace(/\\/g,"/")?(e=e.substring(r+3),e=i.parseAuthority(e,t)):(e=e.substring(r+1),t.urn=!0)),t.path=e,t},i.parseHost=function(e,t){e||(e="");var r,n,o=(e=e.replace(/\\/g,"/")).indexOf("/");if(-1===o&&(o=e.length),"["===e.charAt(0))r=e.indexOf("]"),t.hostname=e.substring(1,r)||null,t.port=e.substring(r+2,o)||null,"/"===t.port&&(t.port=null);else{var a=e.indexOf(":"),s=e.indexOf("/"),u=e.indexOf(":",a+1);-1!==u&&(-1===s||u<s)?(t.hostname=e.substring(0,o)||null,t.port=null):(n=e.substring(0,o).split(":"),t.hostname=n[0]||null,t.port=n[1]||null)}return t.hostname&&"/"!==e.substring(o).charAt(0)&&(o++,e="/"+e),t.preventInvalidHostname&&i.ensureValidHostname(t.hostname,t.protocol),t.port&&i.ensureValidPort(t.port),e.substring(o)||"/"},i.parseAuthority=function(e,t){return e=i.parseUserinfo(e,t),i.parseHost(e,t)},i.parseUserinfo=function(e,t){var r=e;-1!==e.indexOf("\\")&&(e=e.replace(/\\/g,"/"));var n,o=e.indexOf("/"),a=e.lastIndexOf("@",o>-1?o:e.length-1);return a>-1&&(-1===o||a<o)?(n=e.substring(0,a).split(":"),t.username=n[0]?i.decode(n[0]):null,n.shift(),t.password=n[0]?i.decode(n.join(":")):null,e=r.substring(a+1)):(t.username=null,t.password=null),e},i.parseQuery=function(e,t){if(!e)return{};if(!(e=e.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var r,n,o,a={},u=e.split("&"),c=u.length,l=0;l<c;l++)r=u[l].split("="),n=i.decodeQuery(r.shift(),t),o=r.length?i.decodeQuery(r.join("="),t):null,"__proto__"!==n&&(s.call(a,n)?("string"!=typeof a[n]&&null!==a[n]||(a[n]=[a[n]]),a[n].push(o)):a[n]=o);return a},i.build=function(e){var t="",r=!1;return e.protocol&&(t+=e.protocol+":"),e.urn||!t&&!e.hostname||(t+="//",r=!0),t+=i.buildAuthority(e)||"","string"==typeof e.path&&("/"!==e.path.charAt(0)&&r&&(t+="/"),t+=e.path),"string"==typeof e.query&&e.query&&(t+="?"+e.query),"string"==typeof e.fragment&&e.fragment&&(t+="#"+e.fragment),t},i.buildHost=function(e){var t="";return e.hostname?(i.ip6_expression.test(e.hostname)?t+="["+e.hostname+"]":t+=e.hostname,e.port&&(t+=":"+e.port),t):""},i.buildAuthority=function(e){return i.buildUserinfo(e)+i.buildHost(e)},i.buildUserinfo=function(e){var t="";return e.username&&(t+=i.encode(e.username)),e.password&&(t+=":"+i.encode(e.password)),t&&(t+="@"),t},i.buildQuery=function(e,t,r){var n,o,a,u,c="";for(o in e)if("__proto__"!==o&&s.call(e,o))if(l(e[o]))for(n={},a=0,u=e[o].length;a<u;a++)void 0!==e[o][a]&&void 0===n[e[o][a]+""]&&(c+="&"+i.buildQueryParameter(o,e[o][a],r),!0!==t&&(n[e[o][a]+""]=!0));else void 0!==e[o]&&(c+="&"+i.buildQueryParameter(o,e[o],r));return c.substring(1)},i.buildQueryParameter=function(e,t,r){return i.encodeQuery(e,r)+(null!==t?"="+i.encodeQuery(t,r):"")},i.addQuery=function(e,t,r){if("object"==typeof t)for(var n in t)s.call(t,n)&&i.addQuery(e,n,t[n]);else{if("string"!=typeof t)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===e[t])return void(e[t]=r);"string"==typeof e[t]&&(e[t]=[e[t]]),l(r)||(r=[r]),e[t]=(e[t]||[]).concat(r)}},i.setQuery=function(e,t,r){if("object"==typeof t)for(var n in t)s.call(t,n)&&i.setQuery(e,n,t[n]);else{if("string"!=typeof t)throw new TypeError("URI.setQuery() accepts an object, string as the name parameter");e[t]=void 0===r?null:r}},i.removeQuery=function(e,t,r){var n,o,a;if(l(t))for(n=0,o=t.length;n<o;n++)e[t[n]]=void 0;else if("RegExp"===c(t))for(a in e)t.test(a)&&(e[a]=void 0);else if("object"==typeof t)for(a in t)s.call(t,a)&&i.removeQuery(e,a,t[a]);else{if("string"!=typeof t)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==r?"RegExp"===c(r)?!l(e[t])&&r.test(e[t])?e[t]=void 0:e[t]=f(e[t],r):e[t]!==String(r)||l(r)&&1!==r.length?l(e[t])&&(e[t]=f(e[t],r)):e[t]=void 0:e[t]=void 0}},i.hasQuery=function(e,t,r,n){switch(c(t)){case"String":break;case"RegExp":for(var o in e)if(s.call(e,o)&&t.test(o)&&(void 0===r||i.hasQuery(e,o,r)))return!0;return!1;case"Object":for(var a in t)if(s.call(t,a)&&!i.hasQuery(e,a,t[a]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(c(r)){case"Undefined":return t in e;case"Boolean":return r===Boolean(l(e[t])?e[t].length:e[t]);case"Function":return!!r(e[t],t,e);case"Array":return!!l(e[t])&&(n?d:h)(e[t],r);case"RegExp":return l(e[t])?!!n&&d(e[t],r):Boolean(e[t]&&e[t].match(r));case"Number":r=String(r);case"String":return l(e[t])?!!n&&d(e[t],r):e[t]===r;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},i.joinPaths=function(){for(var e=[],t=[],r=0,n=0;n<arguments.length;n++){var o=new i(arguments[n]);e.push(o);for(var a=o.segment(),s=0;s<a.length;s++)"string"==typeof a[s]&&t.push(a[s]),a[s]&&r++}if(!t.length||!r)return new i("");var u=new i("").segment(t);return""!==e[0].path()&&"/"!==e[0].path().slice(0,1)||u.path("/"+u.path()),u.normalize()},i.commonPath=function(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r++)if(e.charAt(r)!==t.charAt(r)){r--;break}return r<1?e.charAt(0)===t.charAt(0)&&"/"===e.charAt(0)?"/":"":("/"===e.charAt(r)&&"/"===t.charAt(r)||(r=e.substring(0,r).lastIndexOf("/")),e.substring(0,r+1))},i.withinString=function(e,t,r){r||(r={});var n=r.start||i.findUri.start,o=r.end||i.findUri.end,a=r.trim||i.findUri.trim,s=r.parens||i.findUri.parens,u=/[a-z0-9-]=["']?$/i;for(n.lastIndex=0;;){var c=n.exec(e);if(!c)break;var l=c.index;if(r.ignoreHtml){var f=e.slice(Math.max(l-3,0),l);if(f&&u.test(f))continue}for(var d=l+e.slice(l).search(o),h=e.slice(l,d),p=-1;;){var y=s.exec(h);if(!y)break;var v=y.index+y[0].length;p=Math.max(p,v)}if(!((h=p>-1?h.slice(0,p)+h.slice(p).replace(a,""):h.replace(a,"")).length<=c[0].length||r.ignore&&r.ignore.test(h))){var m=t(h,l,d=l+h.length,e);void 0!==m?(m=String(m),e=e.slice(0,l)+m+e.slice(d),n.lastIndex=l+m.length):n.lastIndex=d}}return n.lastIndex=0,e},i.ensureValidHostname=function(t,r){var n=!!t,o=!1;if(!!r&&(o=d(i.hostProtocols,r)),o&&!n)throw new TypeError("Hostname cannot be empty, if protocol is "+r);if(t&&t.match(i.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(i.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},i.ensureValidPort=function(e){if(e){var t=Number(e);if(!(/^[0-9]+$/.test(t)&&t>0&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},i.noConflict=function(e){if(e){var t={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(t.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(t.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=n.SecondLevelDomains.noConflict()),t}return n.URI===this&&(n.URI=o),this},a.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},a.clone=function(){return new i(this)},a.valueOf=a.toString=function(){return this.build(!1)._string},a.protocol=_("protocol"),a.username=_("username"),a.password=_("password"),a.hostname=_("hostname"),a.port=_("port"),a.query=S("query","?"),a.fragment=S("fragment","#"),a.search=function(e,t){var r=this.query(e,t);return"string"==typeof r&&r.length?"?"+r:r},a.hash=function(e,t){var r=this.fragment(e,t);return"string"==typeof r&&r.length?"#"+r:r},a.pathname=function(e,t){if(void 0===e||!0===e){var r=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?i.decodeUrnPath:i.decodePath)(r):r}return this._parts.urn?this._parts.path=e?i.recodeUrnPath(e):"":this._parts.path=e?i.recodePath(e):"/",this.build(!t),this},a.path=a.pathname,a.href=function(e,t){var r;if(void 0===e)return this.toString();this._string="",this._parts=i._parts();var n=e instanceof i,o="object"==typeof e&&(e.hostname||e.path||e.pathname);e.nodeName&&(e=e[i.getDomAttribute(e)]||"",o=!1);if(!n&&o&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=i.parse(String(e),this._parts);else{if(!n&&!o)throw new TypeError("invalid input");var a=n?e._parts:e;for(r in a)"query"!==r&&s.call(this._parts,r)&&(this._parts[r]=a[r]);a.query&&this.query(a.query,!1)}return this.build(!t),this},a.is=function(e){var t=!1,n=!1,o=!1,a=!1,s=!1,u=!1,c=!1,l=!this._parts.urn;switch(this._parts.hostname&&(l=!1,n=i.ip4_expression.test(this._parts.hostname),o=i.ip6_expression.test(this._parts.hostname),s=(a=!(t=n||o))&&r&&r.has(this._parts.hostname),u=a&&i.idn_expression.test(this._parts.hostname),c=a&&i.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return l;case"absolute":return!l;case"domain":case"name":return a;case"sld":return s;case"ip":return t;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return o;case"idn":return u;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return c}return null};var k=a.protocol,A=a.port,E=a.hostname;a.protocol=function(e,t){if(e&&!(e=e.replace(/:(\/\/)?$/,"")).match(i.protocol_expression))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return k.call(this,e,t)},a.scheme=a.protocol,a.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(":"===(e+="").charAt(0)&&(e=e.substring(1)),i.ensureValidPort(e))),A.call(this,e,t))},a.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var r={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==i.parseHost(e,r))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=r.hostname,this._parts.preventInvalidHostname&&i.ensureValidHostname(e,this._parts.protocol)}return E.call(this,e,t)},a.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}var n=i(e);return this.protocol(n.protocol()).authority(n.authority()).build(!t),this},a.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildHost(this._parts):"";if("/"!==i.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},a.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildAuthority(this._parts):"";if("/"!==i.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},a.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=i.buildUserinfo(this._parts);return r?r.substring(0,r.length-1):r}return"@"!==e[e.length-1]&&(e+="@"),i.parseUserinfo(e,this._parts),this.build(!t),this},a.resource=function(e,t){var r;return void 0===e?this.path()+this.search()+this.hash():(r=i.parse(e),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!t),this)},a.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var n=this._parts.hostname.length-this.domain().length,o=this._parts.hostname.substring(0,n),a=new RegExp("^"+u(o));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&i.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(a,e),this.build(!t),this},a.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(t).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(i.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var o=new RegExp(u(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},a.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),o=this._parts.hostname.substring(n+1);return!0!==t&&r&&r.list[o.toLowerCase()]&&r.get(this._parts.hostname)||o}var i;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!r||!r.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');i=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");i=new RegExp(u(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,e)}return this.build(!t),this},a.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return e?i.decodePath(n):n}var o=this._parts.path.length-this.filename().length,a=this._parts.path.substring(0,o),s=new RegExp("^"+u(a));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=i.recodePath(e),this._parts.path=this._parts.path.replace(s,e),this.build(!t),this},a.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(r+1);return e?i.decodePathSegment(n):n}var o=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(o=!0);var a=new RegExp(u(this.filename())+"$");return e=i.recodePath(e),this._parts.path=this._parts.path.replace(a,e),o?this.normalizePath(t):this.build(!t),this},a.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var r,n,o=this.filename(),a=o.lastIndexOf(".");return-1===a?"":(r=o.substring(a+1),n=/^[a-z0-9%]+$/i.test(r)?r:"",e?i.decodePathSegment(n):n)}"."===e.charAt(0)&&(e=e.substring(1));var s,c=this.suffix();if(c)s=e?new RegExp(u(c)+"$"):new RegExp(u("."+c)+"$");else{if(!e)return this;this._parts.path+="."+i.recodePath(e)}return s&&(e=i.recodePath(e),this._parts.path=this._parts.path.replace(s,e)),this.build(!t),this},a.segment=function(e,t,r){var n=this._parts.urn?":":"/",o=this.path(),i="/"===o.substring(0,1),a=o.split(n);if(void 0!==e&&"number"!=typeof e&&(r=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(i&&a.shift(),e<0&&(e=Math.max(a.length+e,0)),void 0===t)return void 0===e?a:a[e];if(null===e||void 0===a[e])if(l(t)){a=[];for(var s=0,u=t.length;s<u;s++)(t[s].length||a.length&&a[a.length-1].length)&&(a.length&&!a[a.length-1].length&&a.pop(),a.push(p(t[s])))}else(t||"string"==typeof t)&&(t=p(t),""===a[a.length-1]?a[a.length-1]=t:a.push(t));else t?a[e]=p(t):a.splice(e,1);return i&&a.unshift(""),this.path(a.join(n),r)},a.segmentCoded=function(e,t,r){var n,o,a;if("number"!=typeof e&&(r=t,t=e,e=void 0),void 0===t){if(l(n=this.segment(e,t,r)))for(o=0,a=n.length;o<a;o++)n[o]=i.decode(n[o]);else n=void 0!==n?i.decode(n):void 0;return n}if(l(t))for(o=0,a=t.length;o<a;o++)t[o]=i.encode(t[o]);else t="string"==typeof t||t instanceof String?i.encode(t):t;return this.segment(e,t,r)};var x=a.query;return a.query=function(e,t){if(!0===e)return i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof e){var r=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace),n=e.call(this,r);return this._parts.query=i.buildQuery(n||r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this}return void 0!==e&&"string"!=typeof e?(this._parts.query=i.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this):x.call(this,e,t)},a.setQuery=function(e,t,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof e||e instanceof String)n[e]=void 0!==t?t:null;else{if("object"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var o in e)s.call(e,o)&&(n[o]=e[o])}return this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},a.addQuery=function(e,t,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.addQuery(n,e,void 0===t?null:t),this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},a.removeQuery=function(e,t,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.removeQuery(n,e,t),this._parts.query=i.buildQuery(n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(r=t),this.build(!r),this},a.hasQuery=function(e,t,r){var n=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.hasQuery(n,e,t,r)},a.setSearch=a.setQuery,a.addSearch=a.addQuery,a.removeSearch=a.removeQuery,a.hasSearch=a.hasQuery,a.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},a.normalizeProtocol=function(e){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!e)),this},a.normalizeHostname=function(r){return this._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!r)),this},a.normalizePort=function(e){return"string"==typeof this._parts.protocol&&this._parts.port===i.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!e)),this},a.normalizePath=function(e){var t,r=this._parts.path;if(!r)return this;if(this._parts.urn)return this._parts.path=i.recodeUrnPath(this._parts.path),this.build(!e),this;if("/"===this._parts.path)return this;var n,o,a="";for("/"!==(r=i.recodePath(r)).charAt(0)&&(t=!0,r="/"+r),"/.."!==r.slice(-3)&&"/."!==r.slice(-2)||(r+="/"),r=r.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),t&&(a=r.substring(1).match(/^(\.\.\/)+/)||"")&&(a=a[0]);-1!==(n=r.search(/\/\.\.(\/|$)/));)0!==n?(-1===(o=r.substring(0,n).lastIndexOf("/"))&&(o=n),r=r.substring(0,o)+r.substring(n+3)):r=r.substring(3);return t&&this.is("relative")&&(r=a+r.substring(1)),this._parts.path=r,this.build(!e),this},a.normalizePathname=a.normalizePath,a.normalizeQuery=function(e){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(i.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!e)),this},a.normalizeFragment=function(e){return this._parts.fragment||(this._parts.fragment=null,this.build(!e)),this},a.normalizeSearch=a.normalizeQuery,a.normalizeHash=a.normalizeFragment,a.iso8859=function(){var e=i.encode,t=i.decode;i.encode=escape,i.decode=decodeURIComponent;try{this.normalize()}finally{i.encode=e,i.decode=t}return this},a.unicode=function(){var e=i.encode,t=i.decode;i.encode=v,i.decode=unescape;try{this.normalize()}finally{i.encode=e,i.decode=t}return this},a.readable=function(){var t=this.clone();t.username("").password("").normalize();var r="";if(t._parts.protocol&&(r+=t._parts.protocol+"://"),t._parts.hostname&&(t.is("punycode")&&e?(r+=e.toUnicode(t._parts.hostname),t._parts.port&&(r+=":"+t._parts.port)):r+=t.host()),t._parts.hostname&&t._parts.path&&"/"!==t._parts.path.charAt(0)&&(r+="/"),r+=t.path(!0),t._parts.query){for(var n="",o=0,a=t._parts.query.split("&"),s=a.length;o<s;o++){var u=(a[o]||"").split("=");n+="&"+i.decodeQuery(u[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==u[1]&&(n+="="+i.decodeQuery(u[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}r+="?"+n.substring(1)}return r+=i.decodeQuery(t.hash(),!0)},a.absoluteTo=function(e){var t,r,n,o=this.clone(),a=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e instanceof i||(e=new i(e)),o._parts.protocol)return o;if(o._parts.protocol=e._parts.protocol,this._parts.hostname)return o;for(r=0;n=a[r];r++)o._parts[n]=e._parts[n];return o._parts.path?(".."===o._parts.path.substring(-2)&&(o._parts.path+="/"),"/"!==o.path().charAt(0)&&(t=(t=e.directory())||(0===e.path().indexOf("/")?"/":""),o._parts.path=(t?t+"/":"")+o._parts.path,o.normalizePath())):(o._parts.path=e._parts.path,o._parts.query||(o._parts.query=e._parts.query)),o.build(),o},a.relativeTo=function(e){var t,r,n,o,a,s=this.clone().normalize();if(s._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e=new i(e).normalize(),t=s._parts,r=e._parts,o=s.path(),a=e.path(),"/"!==o.charAt(0))throw new Error("URI is already relative");if("/"!==a.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(t.protocol===r.protocol&&(t.protocol=null),t.username!==r.username||t.password!==r.password)return s.build();if(null!==t.protocol||null!==t.username||null!==t.password)return s.build();if(t.hostname!==r.hostname||t.port!==r.port)return s.build();if(t.hostname=null,t.port=null,o===a)return t.path="",s.build();if(!(n=i.commonPath(o,a)))return s.build();var u=r.path.substring(n.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return t.path=u+t.path.substring(n.length)||"./",s.build()},a.equals=function(e){var t,r,n,o,a,u=this.clone(),c=new i(e),f={};if(u.normalize(),c.normalize(),u.toString()===c.toString())return!0;if(n=u.query(),o=c.query(),u.query(""),c.query(""),u.toString()!==c.toString())return!1;if(n.length!==o.length)return!1;for(a in t=i.parseQuery(n,this._parts.escapeQuerySpace),r=i.parseQuery(o,this._parts.escapeQuerySpace),t)if(s.call(t,a)){if(l(t[a])){if(!h(t[a],r[a]))return!1}else if(t[a]!==r[a])return!1;f[a]=!0}for(a in r)if(s.call(r,a)&&!f[a])return!1;return!0},a.preventInvalidHostname=function(e){return this._parts.preventInvalidHostname=!!e,this},a.duplicateQueryParameters=function(e){return this._parts.duplicateQueryParameters=!!e,this},a.escapeQuerySpace=function(e){return this._parts.escapeQuerySpace=!!e,this},i}))},function(e,t,r){"use strict";var n=r(64),o=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=f;var i=Object.create(r(45));i.inherits=r(11);var a=r(169),s=r(172);i.inherits(f,a);for(var u=o(s.prototype),c=0;c<u.length;c++){var l=u[c];f.prototype[l]||(f.prototype[l]=s.prototype[l])}function f(e){if(!(this instanceof f))return new f(e);a.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",d)}function d(){this.allowHalfOpen||this._writableState.ended||n.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}},function(e,t,r){var n=r(14).Symbol;e.exports=n},function(e,t,r){(function(e){var n=r(14),o=r(186),i=t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,s=a&&a.exports===i?n.Buffer:void 0,u=(s?s.isBuffer:void 0)||o;e.exports=u}).call(this,r(41)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){var n=r(20),o=r(12);e.exports=function(e){return"number"==typeof e||o(e)&&"[object Number]"==n(e)}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,r){var n=r(254),o=r(75),i=r(255),a=r(256),s=r(257),u=r(20),c=r(108),l=c(n),f=c(o),d=c(i),h=c(a),p=c(s),y=u;(n&&"[object DataView]"!=y(new n(new ArrayBuffer(1)))||o&&"[object Map]"!=y(new o)||i&&"[object Promise]"!=y(i.resolve())||a&&"[object Set]"!=y(new a)||s&&"[object WeakMap]"!=y(new s))&&(y=function(e){var t=u(e),r="[object Object]"==t?e.constructor:void 0,n=r?c(r):"";if(n)switch(n){case l:return"[object DataView]";case f:return"[object Map]";case d:return"[object Promise]";case h:return"[object Set]";case p:return"[object WeakMap]"}return t}),e.exports=y},function(e,t,r){(function(e){function r(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===r(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===r(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===r(e)},t.isError=function(e){return"[object Error]"===r(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,r(1).Buffer)},function(e,t){e.exports=function(e){return e}},function(e,t,r){var n=r(183),o=r(12),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},function(e,t,r){var n=r(187),o=r(70),i=r(71),a=i&&i.isTypedArray,s=a?o(a):n;e.exports=s},function(e,t){var r=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}},function(e,t,r){var n=r(20),o=r(18);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculatePadding=function(e){switch(e%4){case 0:return 0;case 1:return 3;case 2:return 2;case 3:return 1;default:return null}},t.slicePadding=function(e,t){var r=e.slice(t);if(!0!==(0,i.default)(r.buffer(),(function(e){return 0===e})))throw new Error("XDR Read Error: invalid padding")};var n,o=r(73),i=(n=o)&&n.__esModule?n:{default:n}},function(e,t,r){var n=r(53),o=r(226),i=r(227),a=r(228),s=r(229),u=r(230);function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,e.exports=c},function(e,t,r){var n=r(221),o=r(222),i=r(223),a=r(224),s=r(225);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t,r){var n=r(43);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},function(e,t,r){var n=r(26)(Object,"create");e.exports=n},function(e,t,r){var n=r(239);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},function(e,t,r){var n=r(20),o=r(12);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},function(e,t,r){var n=r(57);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsignedInt=void 0;var n=i(r(42)),o=i(r(4));function i(e){return e&&e.__esModule?e:{default:e}}var a=t.UnsignedInt={read:function(e){return e.readUInt32BE()},write:function(e,t){if(!(0,n.default)(e))throw new Error("XDR Write Error: not a number");if(Math.floor(e)!==e)throw new Error("XDR Write Error: not an integer");if(e<0)throw new Error("XDR Write Error: negative number "+e);t.writeUInt32BE(e)},isValid:function(e){return!!(0,n.default)(e)&&(Math.floor(e)===e&&(e>=a.MIN_VALUE&&e<=a.MAX_VALUE))}};a.MAX_VALUE=Math.pow(2,32)-1,a.MIN_VALUE=0,(0,o.default)(a)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Config=void 0;var n=r(2).__importDefault(r(28)),o={allowHttp:!1,timeout:0},i=n.default(o),a=function(){function e(){}return e.setAllowHttp=function(e){i.allowHttp=e},e.setTimeout=function(e){i.timeout=e},e.isAllowHttp=function(){return i.allowHttp},e.getTimeout=function(){return i.timeout},e.setDefault=function(){i=Object.assign({},o)},e}();t.Config=a},function(e,t,r){e.exports=r(374)},function(e,t,r){"use strict";(function(t){var n=r(10),o=r(379),i=r(158),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==t&&"[object process]"===Object.prototype.toString.call(t))&&(u=r(159)),u),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,r){if(n.isString(e))try{return(t||JSON.parse)(e),n.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||c.transitional,r=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,a=!r&&"json"===this.responseType;if(a||o&&n.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw i(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){c.headers[e]=n.merge(a)})),e.exports=c}).call(this,r(13))},function(e,t,r){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,r){"use strict";(function(t){void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,r,n,o){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,a,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,r)}));case 3:return t.nextTick((function(){e.call(null,r,n)}));case 4:return t.nextTick((function(){e.call(null,r,n,o)}));default:for(i=new Array(s-1),a=0;a<i.length;)i[a++]=arguments[a];return t.nextTick((function(){e.apply(null,i)}))}}}:e.exports=t}).call(this,r(13))},function(e){e.exports=JSON.parse('{"name":"stellar-sdk","version":"10.4.1","description":"stellar-sdk is a library for working with the Stellar Horizon server.","main":"./lib/index.js","types":"./lib/index.d.ts","files":["/types","/lib","/dist"],"scripts":{"prepare":"gulp build","test":"babel-node ./node_modules/.bin/gulp test","test:watch":"babel-node ./node_modules/.bin/gulp test:watch","build:docs":"gulp build:docs","docs":"yarn build:docs && jsdoc -c .jsdoc.json","preversion":"gulp test","version":"gulp build","postversion":"git push && git push --tags","prettier-all":"prettier --write **/*.{js,ts}"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"prettier":"@stellar/prettier-config","lint-staged":{"lib/*.{js,json}":["prettier --write","git add"],"lib/*.js":["eslint --fix --max-warnings 0","git add"],"**/*.ts":["prettier --write","tslint --fix","git add"]},"keywords":["stellar"],"repository":{"type":"git","url":"https://github.com/stellar/js-stellar-sdk.git"},"author":"Stellar Development Foundation <hello@stellar.org>","license":"Apache-2.0","bugs":{"url":"https://github.com/stellar/js-stellar-sdk/issues"},"homepage":"https://github.com/stellar/js-stellar-sdk","devDependencies":{"@kollavarsham/gulp-coveralls":"0.2.8","@stellar/prettier-config":"^1.0.1","@stellar/tsconfig":"^1.0.1","@stellar/tslint-config":"^1.0.3","@types/detect-node":"^2.0.0","@types/lodash":"^4.14.130","axios-mock-adapter":"^1.16.0","babel-cli":"^6.26.0","babel-core":"~6.26.3","babel-eslint":"^10.0.1","babel-istanbul":"^0.12.2","babel-loader":"^7.0.0","babel-plugin-transform-builtin-extend":"^1.1.2","babel-preset-es2015":"^6.24.1","babel-register":"^6.26.0","body-parser":"^1.12.2","chai":"^2.2.0","chai-as-promised":"^5.2.0","chai-http":"^4.3.0","clear":"^0.1.0","coveralls":"3.0.2","del":"^5.1.0","eslint":"^5.12.1","eslint-config-airbnb-base":"^13.1.0","eslint-config-prettier":"^3.6.0","eslint-plugin-import":"^2.15.0","eslint-plugin-node":"^8.0.1","eslint-plugin-prefer-import":"^0.0.1","eslint-plugin-prettier":"^3.0.1","ghooks":"^0.3.0","gulp":"^4.0.0","gulp-babel":"^6.1.3","gulp-eslint":"^5.0.0","gulp-insert":"^0.5.0","gulp-istanbul":"^1.1.3","gulp-load-plugins":"1.5.0","gulp-mocha":"^7.0.2","gulp-plumber":"^1.0.0","gulp-rename":"~1.2.0","gulp-tslint":"^8.1.4","husky":"^1.3.1","isparta":"^4.1.1","istanbul":"^0.4.5","jsdoc":"3.5.5","json-loader":"^0.5.1","karma":"^6.3.0","karma-chai":"^0.1.0","karma-chai-as-promised":"^0.1.2","karma-chrome-launcher":"^3.1.0","karma-commonjs":"^1.0.0","karma-firefox-launcher":"^2.1.2","karma-mocha":"^2.0.1","karma-phantomjs-launcher":"^1.0.4","karma-sauce-launcher":"2.0.2","karma-sinon":"^1.0.5","karma-sinon-chai":"2.0.2","karma-webpack":"5.0.0","lint-staged":"7.3.0","minami":"^1.1.1","mocha":"^9.1.4","prettier":"^1.17.1","sinon":"^1.14.1","sinon-chai":"^2.7.0","terser-webpack-plugin":"^1.3.0","ts-loader":"^5.0.0","tslint":"^5.16.0","typescript":"^3.4.5","webpack":"^4.33.0","webpack-cli":"^3.3.3","webpack-stream":"^5.2.1"},"dependencies":{"@types/eventsource":"^1.1.2","@types/node":">= 8","@types/randombytes":"^2.0.0","@types/urijs":"^1.19.6","axios":"0.25.0","bignumber.js":"^4.0.0","detect-node":"^2.0.4","es6-promise":"^4.2.4","eventsource":"^1.1.1","lodash":"^4.17.21","randombytes":"^2.1.0","stellar-base":"^8.2.2","toml":"^2.3.0","tslib":"^1.10.0","urijs":"^1.19.1","utility-types":"^3.7.0"}}')},function(e,t,r){var n=r(182)();e.exports=n},function(e,t,r){var n=r(46);e.exports=function(e){return"function"==typeof e?e:n}},function(e,t){var r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&r.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,r){(function(e){var n=r(98),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o&&n.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s}).call(this,r(41)(e))},function(e,t,r){var n=r(107);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},function(e,t,r){var n=r(214),o=r(215),i=r(113),a=r(3),s=r(110);e.exports=function(e,t,r){var u=a(e)?n:o;return r&&s(e,t,r)&&(t=void 0),u(e,i(t,3))}},function(e,t,r){var n=r(216),o=r(218)(n);e.exports=o},function(e,t,r){var n=r(26)(r(14),"Map");e.exports=n},function(e,t,r){var n=r(231),o=r(238),i=r(240),a=r(241),s=r(242);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t,r){var n=r(253),o=r(120),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),n(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=s},function(e,t,r){var n=r(3),o=r(57),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!o(e))||(a.test(e)||!i.test(e)||null!=t&&e in Object(t))}},function(e,t,r){var n=r(80);e.exports=function(e){return null==e?"":n(e)}},function(e,t,r){var n=r(39),o=r(81),i=r(3),a=r(57),s=n?n.prototype:void 0,u=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return u?u.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},function(e,t){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();t.Reference=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,[{key:"resolve",value:function(){throw new Error("implement resolve in child class")}}]),e}()},function(e,t,r){var n=r(112)(Object.getPrototypeOf,Object);e.exports=n},function(e,t,r){var n=r(116);e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},function(e,t){var r=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return r.test(e)}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionBase=void 0;var n,o="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=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=r(0),s=(n=a)&&n.__esModule?n:{default:n},u=r(30),c=r(19);t.TransactionBase=function(){function t(e,r,n,i){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"string"!=typeof i)throw new Error("Invalid passphrase provided to Transaction: expected a string but got a "+(void 0===i?"undefined":o(i)));this._networkPassphrase=i,this._tx=e,this._signatures=r,this._fee=n}return i(t,[{key:"sign",value:function(){for(var e=this,t=this.hash(),r=arguments.length,n=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 t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!r||"string"!=typeof r)throw new Error("Invalid signature");if(!t||"string"!=typeof t)throw new Error("Invalid publicKey");var n=void 0,o=void 0,i=e.from(r,"base64");try{o=(n=c.Keypair.fromPublicKey(t)).signatureHint()}catch(e){throw new Error("Invalid publicKey")}if(!n.verify(this.hash(),i))throw new Error("Invalid signature");this.signatures.push(new s.default.DecoratedSignature({hint:o,signature:i}))}},{key:"addDecoratedSignature",value:function(e){this.signatures.push(e)}},{key:"signHashX",value:function(t){if("string"==typeof t&&(t=e.from(t,"hex")),t.length>64)throw new Error("preimage cannnot be longer than 64 bytes");var r=t,n=(0,u.hash)(t),o=n.slice(n.length-4);this.signatures.push(new s.default.DecoratedSignature({hint:o,signature:r}))}},{key:"hash",value:function(){return(0,u.hash)(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")}},{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}}]),t}()}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.Transaction=void 0;var n=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=d(r(134)),i=d(r(0)),a=r(30),s=r(8),u=r(145),c=r(90),l=r(86),f=r(17);function d(e){return e&&e.__esModule?e:{default:e}}t.Transaction=function(t){function r(t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),"string"==typeof t){var a=e.from(t,"base64");t=i.default.TransactionEnvelope.fromXDR(a)}var c=t.switch();if(c!==i.default.EnvelopeType.envelopeTypeTxV0()&&c!==i.default.EnvelopeType.envelopeTypeTx())throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxV0 or envelopeTypeTx but received an "+c.name+".");var l=t.value(),d=l.tx(),h=d.fee().toString(),p=(l.signatures()||[]).slice(),y=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,d,p,h,n));switch(y._envelopeType=c,y._memo=d.memo(),y._sequence=d.seqNum().toString(),y._envelopeType){case i.default.EnvelopeType.envelopeTypeTxV0():y._source=s.StrKey.encodeEd25519PublicKey(y.tx.sourceAccountEd25519());break;default:y._source=(0,f.encodeMuxedAccountToAddress)(y.tx.sourceAccount())}var v=null,m=null;switch(y._envelopeType){case i.default.EnvelopeType.envelopeTypeTxV0():m=d.timeBounds();break;case i.default.EnvelopeType.envelopeTypeTx():switch(d.cond().switch()){case i.default.PreconditionType.precondTime():m=d.cond().timeBounds();break;case i.default.PreconditionType.precondV2():m=(v=d.cond().v2()).timeBounds()}}if(m&&(y._timeBounds={minTime:m.minTime().toString(),maxTime:m.maxTime().toString()}),v){var g=v.ledgerBounds();g&&(y._ledgerBounds={minLedger:g.minLedger(),maxLedger:g.maxLedger()});var b=v.minSeqNum();b&&(y._minAccountSequence=b.toString()),y._minAccountSequenceAge=v.minSeqAge(),y._minAccountSequenceLedgerGap=v.minSeqLedgerGap(),y._extraSigners=v.extraSigners()}var w=d.operations()||[];return y._operations=(0,o.default)(w,(function(e){return u.Operation.fromXDRObject(e)})),y}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,t),n(r,[{key:"signatureBase",value:function(){var t=this.tx;this._envelopeType===i.default.EnvelopeType.envelopeTypeTxV0()&&(t=i.default.Transaction.fromXDR(e.concat([i.default.PublicKeyType.publicKeyTypeEd25519().toXDR(),t.toXDR()])));var r=new i.default.TransactionSignaturePayloadTaggedTransaction.envelopeTypeTx(t);return new i.default.TransactionSignaturePayload({networkId:i.default.Hash.fromXDR((0,a.hash)(this.networkPassphrase)),taggedTransaction:r}).toXDR()}},{key:"toEnvelope",value:function(){var e=this.tx.toXDR(),t=this.signatures.slice(),r=void 0;switch(this._envelopeType){case i.default.EnvelopeType.envelopeTypeTxV0():r=new i.default.TransactionEnvelope.envelopeTypeTxV0(new i.default.TransactionV0Envelope({tx:i.default.TransactionV0.fromXDR(e),signatures:t}));break;case i.default.EnvelopeType.envelopeTypeTx():r=new i.default.TransactionEnvelope.envelopeTypeTx(new i.default.TransactionV1Envelope({tx:i.default.Transaction.fromXDR(e),signatures:t}));break;default:throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxV0 or envelopeTypeTx but received an "+this._envelopeType.name+".")}return r}},{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=u.Operation.createClaimableBalance(t)}catch(e){throw new TypeError("expected createClaimableBalance, got "+t.type+": "+e)}var r=s.StrKey.decodeEd25519PublicKey((0,f.extractBaseAddress)(this.source)),n=i.default.HashIdPreimage.envelopeTypeOpId(new i.default.HashIdPreimageOperationId({sourceAccount:i.default.AccountId.publicKeyTypeEd25519(r),seqNum:i.default.SequenceNumber.fromString(this.sequence),opNum:e})),o=(0,a.hash)(n.toXDR("raw"));return i.default.ClaimableBalanceId.claimableBalanceIdTypeV0(o).toXDR("hex")}},{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 c.Memo.fromXDRObject(this._memo)},set:function(e){throw new Error("Transaction is immutable")}}]),r}(l.TransactionBase)}).call(this,r(1).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LiquidityPoolAsset=void 0;var n=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=u(r(28)),i=u(r(0)),a=r(27),s=r(104);function u(e){return e&&e.__esModule?e:{default:e}}t.LiquidityPoolAsset=function(){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 a.Asset))throw new Error("assetA is invalid");if(!(r&&r instanceof a.Asset))throw new Error("assetB is invalid");if(-1!==a.Asset.compare(t,r))throw new Error("Assets are not in lexicographic order");if(!n||n!==s.LiquidityPoolFeeV18)throw new Error("fee is invalid");this.assetA=t,this.assetB=r,this.fee=n}return n(e,[{key:"toXDRObject",value:function(){var e=new i.default.LiquidityPoolConstantProductParameters({assetA:this.assetA.toXDRObject(),assetB:this.assetB.toXDRObject(),fee:this.fee}),t=new i.default.LiquidityPoolParameters("liquidityPoolConstantProduct",e);return new i.default.ChangeTrustAsset("assetTypePoolShare",t)}},{key:"getLiquidityPoolParameters",value:function(){return(0,o.default)({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(){return"liquidity_pool:"+(0,s.getLiquidityPoolId)("constant_product",this.getLiquidityPoolParameters()).toString("hex")}}],[{key:"fromOperation",value:function(e){var t=e.switch();if(t===i.default.AssetType.assetTypePoolShare()){var r=e.liquidityPool().constantProduct();return new this(a.Asset.fromOperation(r.assetA()),a.Asset.fromOperation(r.assetB()),r.fee())}throw new Error("Invalid asset type: "+t.name)}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LiquidityPoolId=void 0;var n=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=a(r(28)),i=a(r(0));function a(e){return e&&e.__esModule?e:{default:e}}t.LiquidityPoolId=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)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}return n(e,[{key:"toXDRObject",value:function(){var e=i.default.PoolId.fromXDR(this.liquidityPoolId,"hex");return new i.default.TrustLineAsset("assetTypePoolShare",e)}},{key:"getLiquidityPoolId",value:function(){return(0,o.default)(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:"+this.liquidityPoolId}}],[{key:"fromOperation",value:function(e){var t=e.switch();if(t===i.default.AssetType.assetTypePoolShare())return new this(e.liquidityPoolId().toString("hex"));throw new Error("Invalid asset type: "+t.name)}}]),e}()},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.Memo=t.MemoReturn=t.MemoHash=t.MemoText=t.MemoID=t.MemoNone=void 0;var n=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=l(r(7)),i=l(r(9)),a=l(r(28)),s=r(22),u=l(r(23)),c=l(r(0));function l(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var d=t.MemoNone="none",h=t.MemoID="id",p=t.MemoText="text",y=t.MemoHash="hash",v=t.MemoReturn="return",m=function(){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;switch(f(this,t),this._type=r,this._value=n,this._type){case d:break;case h:t._validateIdValue(n);break;case p:t._validateTextValue(n);break;case y:case v:t._validateHashValue(n),(0,i.default)(n)&&(this._value=e.from(n,"hex"));break;default:throw new Error("Invalid memo type")}}return n(t,[{key:"toXDRObject",value:function(){switch(this._type){case d:return c.default.Memo.memoNone();case h:return c.default.Memo.memoId(s.UnsignedHyper.fromString(this._value));case p:return c.default.Memo.memoText(this._value);case y:return c.default.Memo.memoHash(this._value);case v:return c.default.Memo.memoReturn(this._value);default:return null}}},{key:"type",get:function(){return(0,a.default)(this._type)},set:function(e){throw new Error("Memo is immutable")}},{key:"value",get:function(){switch(this._type){case d:return null;case h:case p:return(0,a.default)(this._value);case y:case v:return e.from(this._value);default:throw new Error("Invalid memo type")}},set:function(e){throw new Error("Memo is immutable")}}],[{key:"_validateIdValue",value:function(e){var t=new Error("Expects a int64 as a string. Got "+e);if(!(0,i.default)(e))throw t;var r=void 0;try{r=new u.default(e)}catch(e){throw t}if(!r.isFinite())throw t;if(r.isNaN())throw t}},{key:"_validateTextValue",value:function(e){if(!c.default.Memo.armTypeForArm("text").isValid(e))throw new Error("Expects string, array or buffer, max 28 bytes")}},{key:"_validateHashValue",value:function(t){var r=new Error("Expects a 32 byte hash value or hex encoded string. Got "+t);if(null===t||(0,o.default)(t))throw r;var n=void 0;if((0,i.default)(t)){if(!/^[0-9A-Fa-f]{64}$/g.test(t))throw r;n=e.from(t,"hex")}else{if(!e.isBuffer(t))throw r;n=e.from(t)}if(!n.length||32!==n.length)throw r}},{key:"none",value:function(){return new t(d)}},{key:"text",value:function(e){return new t(p,e)}},{key:"id",value:function(e){return new t(h,e)}},{key:"hash",value:function(e){return new t(y,e)}},{key:"return",value:function(e){return new t(v,e)}},{key:"fromXDRObject",value:function(e){switch(e.arm()){case"id":return t.id(e.value().toString());case"text":return t.text(e.value());case"hash":return t.hash(e.value());case"retHash":return t.return(e.value())}if(void 0===e.value())return t.none();throw new Error("Unknown type")}}]),t}();t.Memo=m}).call(this,r(1).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCurrentServerTime=t.SERVER_TIME_MAP=void 0;var n=r(2),o=n.__importDefault(r(61)),i=n.__importDefault(r(37)),a=r(65).version;t.SERVER_TIME_MAP={};var s=o.default.create({headers:{"X-Client-Name":"js-stellar-sdk","X-Client-Version":a}});function u(e){return Math.floor(e/1e3)}s.interceptors.response.use((function(e){var r=i.default(e.config.url).hostname(),n=u(Date.parse(e.headers.date)),o=u((new Date).getTime());return isNaN(n)||(t.SERVER_TIME_MAP[r]={serverTime:n,localTimeRecorded:o}),e})),t.default=s,t.getCurrentServerTime=function(e){var r=t.SERVER_TIME_MAP[e];if(!r||!r.localTimeRecorded||!r.serverTime)return null;var n=r.serverTime,o=r.localTimeRecorded,i=u((new Date).getTime());return i-o>300?null:i-o+n}},function(e,t,r){"use strict";var n=r(395),o=r(396);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){o.isString(e)&&(e=b(e));return e instanceof i?e.format():i.prototype.format.call(e)},t.Url=i;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),f=["%","/","?",";","#"].concat(l),d=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,y={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=r(397);function b(e,t,r){if(e&&o.isObject(e)&&e instanceof i)return e;var n=new i;return n.parse(e,t,r),n}i.prototype.parse=function(e,t,r){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),s=-1!==i&&i<e.indexOf("#")?"?":"#",c=e.split(s);c[0]=c[0].replace(/\\/g,"/");var b=e=c.join(s);if(b=b.trim(),!r&&1===e.split("#").length){var w=u.exec(b);if(w)return this.path=b,this.href=b,this.pathname=w[1],w[2]?(this.search=w[2],this.query=t?g.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var _=a.exec(b);if(_){var S=(_=_[0]).toLowerCase();this.protocol=S,b=b.substr(_.length)}if(r||_||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var k="//"===b.substr(0,2);!k||_&&v[_]||(b=b.substr(2),this.slashes=!0)}if(!v[_]&&(k||_&&!m[_])){for(var A,E,x=-1,T=0;T<d.length;T++){-1!==(O=b.indexOf(d[T]))&&(-1===x||O<x)&&(x=O)}-1!==(E=-1===x?b.lastIndexOf("@"):b.lastIndexOf("@",x))&&(A=b.slice(0,E),b=b.slice(E+1),this.auth=decodeURIComponent(A)),x=-1;for(T=0;T<f.length;T++){var O;-1!==(O=b.indexOf(f[T]))&&(-1===x||O<x)&&(x=O)}-1===x&&(x=b.length),this.host=b.slice(0,x),b=b.slice(x),this.parseHost(),this.hostname=this.hostname||"";var P="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!P)for(var R=this.hostname.split(/\./),C=(T=0,R.length);T<C;T++){var I=R[T];if(I&&!I.match(h)){for(var B="",M=0,j=I.length;M<j;M++)I.charCodeAt(M)>127?B+="x":B+=I[M];if(!B.match(h)){var N=R.slice(0,T),L=R.slice(T+1),q=I.match(p);q&&(N.push(q[1]),L.unshift(q[2])),L.length&&(b="/"+L.join(".")+b),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=n.toASCII(this.hostname));var U=this.port?":"+this.port:"",D=this.hostname||"";this.host=D+U,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!y[S])for(T=0,C=l.length;T<C;T++){var F=l[T];if(-1!==b.indexOf(F)){var K=encodeURIComponent(F);K===F&&(K=escape(F)),b=b.split(F).join(K)}}var V=b.indexOf("#");-1!==V&&(this.hash=b.substr(V),b=b.slice(0,V));var z=b.indexOf("?");if(-1!==z?(this.search=b.substr(z),this.query=b.substr(z+1),t&&(this.query=g.parse(this.query)),b=b.slice(0,z)):t&&(this.search="",this.query={}),b&&(this.pathname=b),m[S]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){U=this.pathname||"";var H=this.search||"";this.path=U+H}return this.href=this.format(),this},i.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,a="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(a=g.stringify(this.query));var s=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||m[t])&&!1!==i?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),t+i+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+n},i.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},i.prototype.resolveObject=function(e){if(o.isString(e)){var t=new i;t.parse(e,!1,!0),e=t}for(var r=new i,n=Object.keys(this),a=0;a<n.length;a++){var s=n[a];r[s]=this[s]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),c=0;c<u.length;c++){var l=u[c];"protocol"!==l&&(r[l]=e[l])}return m[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!m[e.protocol]){for(var f=Object.keys(e),d=0;d<f.length;d++){var h=f[d];r[h]=e[h]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||v[e.protocol])r.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var y=r.pathname||"",g=r.search||"";r.path=y+g}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var b=r.pathname&&"/"===r.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),_=w||b||r.host&&e.pathname,S=_,k=r.pathname&&r.pathname.split("/")||[],A=(p=e.pathname&&e.pathname.split("/")||[],r.protocol&&!m[r.protocol]);if(A&&(r.hostname="",r.port=null,r.host&&(""===k[0]?k[0]=r.host:k.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),_=_&&(""===p[0]||""===k[0])),w)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,k=p;else if(p.length)k||(k=[]),k.pop(),k=k.concat(p),r.search=e.search,r.query=e.query;else if(!o.isNullOrUndefined(e.search)){if(A)r.hostname=r.host=k.shift(),(P=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift());return r.search=e.search,r.query=e.query,o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!k.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var E=k.slice(-1)[0],x=(r.host||e.host||k.length>1)&&("."===E||".."===E)||""===E,T=0,O=k.length;O>=0;O--)"."===(E=k[O])?k.splice(O,1):".."===E?(k.splice(O,1),T++):T&&(k.splice(O,1),T--);if(!_&&!S)for(;T--;T)k.unshift("..");!_||""===k[0]||k[0]&&"/"===k[0].charAt(0)||k.unshift(""),x&&"/"!==k.join("/").substr(-1)&&k.push("");var P,R=""===k[0]||k[0]&&"/"===k[0].charAt(0);A&&(r.hostname=r.host=R?"":k.length?k.shift():"",(P=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift()));return(_=_||r.host&&k.length)&&!R&&k.unshift(""),k.length?r.pathname=k.join("/"):(r.pathname=null,r.path=null),o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,r){"use strict";var n,o="object"==typeof Reflect?Reflect:null,i=o&&"function"==typeof o.apply?o.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(r,n){function o(){void 0!==i&&e.removeListener("error",i),r([].slice.call(arguments))}var i;"error"!==t&&(i=function(r){e.removeListener(t,o),n(r)},e.once("error",i)),e.once(t,o)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function f(e,t,r,n){var o,i,a,s;if(c(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),a=i[t]),void 0===a)a=i[t]=r,++e._eventsCount;else if("function"==typeof a?a=i[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(o=l(e))>0&&a.length>o&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=d.bind(n);return o.listener=r,n.wrapFn=o,o}function p(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):v(o,o.length)}function y(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function v(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return l(this)},s.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,o=this._events;if(void 0!==o)n=n&&void 0===o.error;else if(!n)return!1;if(n){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)i(u,this,t);else{var c=u.length,l=v(u,c);for(r=0;r<c;++r)i(l[r],this,t)}return!0},s.prototype.addListener=function(e,t){return f(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return f(this,e,t,!0)},s.prototype.once=function(e,t){return c(t),this.on(e,h(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,h(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,n,o,i,a;if(c(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){a=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):y.call(e,t)},s.prototype.listenerCount=y,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(e,t,r){var n=r(1),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),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)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccountResponse=void 0;var n=r(2).__importDefault(r(181)),o=r(29),i=function(){function e(e){var t=this;this._baseAccount=new o.Account(e.account_id,e.sequence),n.default(e,(function(e,r){t[r]=e}))}return e.prototype.accountId=function(){return this._baseAccount.accountId()},e.prototype.sequenceNumber=function(){return this._baseAccount.sequenceNumber()},e.prototype.incrementSequenceNumber=function(){this._baseAccount.incrementSequenceNumber(),this.sequence=this._baseAccount.sequenceNumber()},e}();t.AccountResponse=i},function(e,t,r){var n=r(97),o=r(47),i=r(3),a=r(40),s=r(68),u=r(48),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=i(e),l=!r&&o(e),f=!r&&!l&&a(e),d=!r&&!l&&!f&&u(e),h=r||l||f||d,p=h?n(e.length,String):[],y=p.length;for(var v in e)!t&&!c.call(e,v)||h&&("length"==v||f&&("offset"==v||"parent"==v)||d&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,y))||p.push(v);return p}},function(e,t){e.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},function(e,t,r){(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.exports=r}).call(this,r(5))},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){var n=r(11),o=r(31),i=r(21).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 d(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,p=0|this._f,y=0|this._g,v=0|this._h,m=0;m<16;++m)r[m]=e.readInt32BE(4*m);for(;m<64;++m)r[m]=0|(((t=r[m-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[m-7]+h(r[m-15])+r[m-16];for(var g=0;g<64;++g){var b=v+d(u)+c(u,p,y)+a[g]+r[g]|0,w=f(n)+l(n,o,i)|0;v=y,y=p,p=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=p+this._f|0,this._g=y+this._g|0,this._h=v+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},function(e,t,r){var n=r(11),o=r(31),i=r(21).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 d(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 p(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 v(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function m(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,g=0|this._gh,b=0|this._hh,w=0|this._al,_=0|this._bl,S=0|this._cl,k=0|this._dl,A=0|this._el,E=0|this._fl,x=0|this._gl,T=0|this._hl,O=0;O<32;O+=2)t[O]=e.readInt32BE(4*O),t[O+1]=e.readInt32BE(4*O+4);for(;O<160;O+=2){var P=t[O-30],R=t[O-30+1],C=h(P,R),I=p(R,P),B=y(P=t[O-4],R=t[O-4+1]),M=v(R,P),j=t[O-14],N=t[O-14+1],L=t[O-32],q=t[O-32+1],U=I+N|0,D=C+j+m(U,I)|0;D=(D=D+B+m(U=U+M|0,M)|0)+L+m(U=U+q|0,q)|0,t[O]=D,t[O+1]=U}for(var F=0;F<160;F+=2){D=t[F],U=t[F+1];var K=l(r,n,o),V=l(w,_,S),z=f(r,w),H=f(w,r),X=d(s,A),Q=d(A,s),W=a[F],G=a[F+1],Y=c(s,u,g),$=c(A,E,x),Z=T+Q|0,J=b+X+m(Z,T)|0;J=(J=(J=J+Y+m(Z=Z+$|0,$)|0)+W+m(Z=Z+G|0,G)|0)+D+m(Z=Z+U|0,U)|0;var ee=H+V|0,te=z+K+m(ee,H)|0;b=g,T=x,g=u,x=E,u=s,E=A,s=i+J+m(A=k+Z|0,k)|0,i=o,k=S,o=n,S=_,n=r,_=w,r=J+te+m(w=Z+ee|0,Z)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+S|0,this._dl=this._dl+k|0,this._el=this._el+A|0,this._fl=this._fl+E|0,this._gl=this._gl+x|0,this._hl=this._hl+T|0,this._ah=this._ah+r+m(this._al,w)|0,this._bh=this._bh+n+m(this._bl,_)|0,this._ch=this._ch+o+m(this._cl,S)|0,this._dh=this._dh+i+m(this._dl,k)|0,this._eh=this._eh+s+m(this._el,A)|0,this._fh=this._fh+u+m(this._fl,E)|0,this._gh=this._gh+g+m(this._gl,x)|0,this._hh=this._hh+b+m(this._hl,T)|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},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.sign=function(e,t){return n.sign(e,t)},t.verify=function(e,t,r){return n.verify(e,t,r)},t.generate=function(e){return n.generate(e)};var n={};t.FastSigning="undefined"==typeof window?function(){var t=void 0;try{t=r(197)}catch(e){return o()}return Object.keys(t).length?(n.generate=function(r){var n=e.alloc(t.crypto_sign_PUBLICKEYBYTES),o=e.alloc(t.crypto_sign_SECRETKEYBYTES);return t.crypto_sign_seed_keypair(n,o,r),n},n.sign=function(r,n){r=e.from(r);var o=e.alloc(t.crypto_sign_BYTES);return t.crypto_sign_detached(o,r,n),o},n.verify=function(r,n,o){r=e.from(r);try{return t.crypto_sign_verify_detached(n,r,o)}catch(e){return!1}},!0):o()}():o();function o(){var t=r(103);return n.generate=function(r){var n=new Uint8Array(r),o=t.sign.keyPair.fromSeed(n);return e.from(o.publicKey)},n.sign=function(r,n){r=e.from(r),r=new Uint8Array(r.toJSON().data),n=new Uint8Array(n.toJSON().data);var o=t.sign.detached(r,n);return e.from(o)},n.verify=function(r,n,o){return r=e.from(r),r=new Uint8Array(r.toJSON().data),n=new Uint8Array(n.toJSON().data),o=new Uint8Array(o.toJSON().data),t.sign.detached.verify(r,n,o)},!1}}).call(this,r(1).Buffer)},function(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]),d=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 p(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 v(e,t,r,n){return y(e,t,r,n,16)}function m(e,t,r,n){return y(e,t,r,n,32)}function g(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,d=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,p=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,v=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,m=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,g=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,_=i,S=a,k=s,A=u,E=c,x=l,T=f,O=d,P=h,R=p,C=y,I=v,B=m,M=g,j=b,N=w,L=0;L<20;L+=2)_^=(o=(B^=(o=(P^=(o=(E^=(o=_+B|0)<<7|o>>>25)+_|0)<<9|o>>>23)+E|0)<<13|o>>>19)+P|0)<<18|o>>>14,x^=(o=(S^=(o=(M^=(o=(R^=(o=x+S|0)<<7|o>>>25)+x|0)<<9|o>>>23)+R|0)<<13|o>>>19)+M|0)<<18|o>>>14,C^=(o=(T^=(o=(k^=(o=(j^=(o=C+T|0)<<7|o>>>25)+C|0)<<9|o>>>23)+j|0)<<13|o>>>19)+k|0)<<18|o>>>14,N^=(o=(I^=(o=(O^=(o=(A^=(o=N+I|0)<<7|o>>>25)+N|0)<<9|o>>>23)+A|0)<<13|o>>>19)+O|0)<<18|o>>>14,_^=(o=(A^=(o=(k^=(o=(S^=(o=_+A|0)<<7|o>>>25)+_|0)<<9|o>>>23)+S|0)<<13|o>>>19)+k|0)<<18|o>>>14,x^=(o=(E^=(o=(O^=(o=(T^=(o=x+E|0)<<7|o>>>25)+x|0)<<9|o>>>23)+T|0)<<13|o>>>19)+O|0)<<18|o>>>14,C^=(o=(R^=(o=(P^=(o=(I^=(o=C+R|0)<<7|o>>>25)+C|0)<<9|o>>>23)+I|0)<<13|o>>>19)+P|0)<<18|o>>>14,N^=(o=(j^=(o=(M^=(o=(B^=(o=N+j|0)<<7|o>>>25)+N|0)<<9|o>>>23)+B|0)<<13|o>>>19)+M|0)<<18|o>>>14;_=_+i|0,S=S+a|0,k=k+s|0,A=A+u|0,E=E+c|0,x=x+l|0,T=T+f|0,O=O+d|0,P=P+h|0,R=R+p|0,C=C+y|0,I=I+v|0,B=B+m|0,M=M+g|0,j=j+b|0,N=N+w|0,e[0]=_>>>0&255,e[1]=_>>>8&255,e[2]=_>>>16&255,e[3]=_>>>24&255,e[4]=S>>>0&255,e[5]=S>>>8&255,e[6]=S>>>16&255,e[7]=S>>>24&255,e[8]=k>>>0&255,e[9]=k>>>8&255,e[10]=k>>>16&255,e[11]=k>>>24&255,e[12]=A>>>0&255,e[13]=A>>>8&255,e[14]=A>>>16&255,e[15]=A>>>24&255,e[16]=E>>>0&255,e[17]=E>>>8&255,e[18]=E>>>16&255,e[19]=E>>>24&255,e[20]=x>>>0&255,e[21]=x>>>8&255,e[22]=x>>>16&255,e[23]=x>>>24&255,e[24]=T>>>0&255,e[25]=T>>>8&255,e[26]=T>>>16&255,e[27]=T>>>24&255,e[28]=O>>>0&255,e[29]=O>>>8&255,e[30]=O>>>16&255,e[31]=O>>>24&255,e[32]=P>>>0&255,e[33]=P>>>8&255,e[34]=P>>>16&255,e[35]=P>>>24&255,e[36]=R>>>0&255,e[37]=R>>>8&255,e[38]=R>>>16&255,e[39]=R>>>24&255,e[40]=C>>>0&255,e[41]=C>>>8&255,e[42]=C>>>16&255,e[43]=C>>>24&255,e[44]=I>>>0&255,e[45]=I>>>8&255,e[46]=I>>>16&255,e[47]=I>>>24&255,e[48]=B>>>0&255,e[49]=B>>>8&255,e[50]=B>>>16&255,e[51]=B>>>24&255,e[52]=M>>>0&255,e[53]=M>>>8&255,e[54]=M>>>16&255,e[55]=M>>>24&255,e[56]=j>>>0&255,e[57]=j>>>8&255,e[58]=j>>>16&255,e[59]=j>>>24&255,e[60]=N>>>0&255,e[61]=N>>>8&255,e[62]=N>>>16&255,e[63]=N>>>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,d=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,p=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,v=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,m=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,g=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,_=0;_<20;_+=2)i^=(o=(m^=(o=(h^=(o=(c^=(o=i+m|0)<<7|o>>>25)+i|0)<<9|o>>>23)+c|0)<<13|o>>>19)+h|0)<<18|o>>>14,l^=(o=(a^=(o=(g^=(o=(p^=(o=l+a|0)<<7|o>>>25)+l|0)<<9|o>>>23)+p|0)<<13|o>>>19)+g|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=(v^=(o=(d^=(o=(u^=(o=w+v|0)<<7|o>>>25)+w|0)<<9|o>>>23)+u|0)<<13|o>>>19)+d|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=(d^=(o=(f^=(o=l+c|0)<<7|o>>>25)+l|0)<<9|o>>>23)+f|0)<<13|o>>>19)+d|0)<<18|o>>>14,y^=(o=(p^=(o=(h^=(o=(v^=(o=y+p|0)<<7|o>>>25)+y|0)<<9|o>>>23)+v|0)<<13|o>>>19)+h|0)<<18|o>>>14,w^=(o=(b^=(o=(g^=(o=(m^=(o=w+b|0)<<7|o>>>25)+w|0)<<9|o>>>23)+m|0)<<13|o>>>19)+g|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]=d>>>0&255,e[21]=d>>>8&255,e[22]=d>>>16&255,e[23]=d>>>24&255,e[24]=h>>>0&255,e[25]=h>>>8&255,e[26]=h>>>16&255,e[27]=h>>>24&255,e[28]=p>>>0&255,e[29]=p>>>8&255,e[30]=p>>>16&255,e[31]=p>>>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 _(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(g(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(g(l,c,a,w),u=0;u<o;u++)e[t+u]=r[n+u]^l[u];return 0}function S(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(g(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(g(u,s,o,w),a=0;a<r;a++)e[t+a]=u[a];return 0}function k(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 S(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 _(e,t,r,n,o,u,s)}var E=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 x(e,t,r,n,o,i){var a=new E(i);return a.update(r,n,o),a.finish(e,t),0}function T(e,t,r,n,o,i){var a=new Uint8Array(16);return x(a,0,r,n,o,i),v(e,t,a,0)}function O(e,t,r,n,o){var i;if(r<32)return-1;for(A(e,0,t,0,r,n,o),x(e,16,e,32,r-32,e),i=0;i<16;i++)e[i]=0;return 0}function P(e,t,r,n,o){var i,a=new Uint8Array(32);if(r<32)return-1;if(k(a,0,32,n,o),0!==T(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 R(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function C(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 I(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 B(e,r){var n,o,i,a=t(),s=t();for(n=0;n<16;n++)s[n]=r[n];for(C(s),C(s),C(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,I(s,a,1-i)}for(n=0;n<16;n++)e[2*n]=255&s[n],e[2*n+1]=s[n]>>8}function M(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return B(r,e),B(n,t),m(r,0,n,0)}function j(e){var t=new Uint8Array(32);return B(t,e),1&t[0]}function N(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function L(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function q(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function U(e,t,r){var n,o,i=0,a=0,s=0,u=0,c=0,l=0,f=0,d=0,h=0,p=0,y=0,v=0,m=0,g=0,b=0,w=0,_=0,S=0,k=0,A=0,E=0,x=0,T=0,O=0,P=0,R=0,C=0,I=0,B=0,M=0,j=0,N=r[0],L=r[1],q=r[2],U=r[3],D=r[4],F=r[5],K=r[6],V=r[7],z=r[8],H=r[9],X=r[10],Q=r[11],W=r[12],G=r[13],Y=r[14],$=r[15];i+=(n=t[0])*N,a+=n*L,s+=n*q,u+=n*U,c+=n*D,l+=n*F,f+=n*K,d+=n*V,h+=n*z,p+=n*H,y+=n*X,v+=n*Q,m+=n*W,g+=n*G,b+=n*Y,w+=n*$,a+=(n=t[1])*N,s+=n*L,u+=n*q,c+=n*U,l+=n*D,f+=n*F,d+=n*K,h+=n*V,p+=n*z,y+=n*H,v+=n*X,m+=n*Q,g+=n*W,b+=n*G,w+=n*Y,_+=n*$,s+=(n=t[2])*N,u+=n*L,c+=n*q,l+=n*U,f+=n*D,d+=n*F,h+=n*K,p+=n*V,y+=n*z,v+=n*H,m+=n*X,g+=n*Q,b+=n*W,w+=n*G,_+=n*Y,S+=n*$,u+=(n=t[3])*N,c+=n*L,l+=n*q,f+=n*U,d+=n*D,h+=n*F,p+=n*K,y+=n*V,v+=n*z,m+=n*H,g+=n*X,b+=n*Q,w+=n*W,_+=n*G,S+=n*Y,k+=n*$,c+=(n=t[4])*N,l+=n*L,f+=n*q,d+=n*U,h+=n*D,p+=n*F,y+=n*K,v+=n*V,m+=n*z,g+=n*H,b+=n*X,w+=n*Q,_+=n*W,S+=n*G,k+=n*Y,A+=n*$,l+=(n=t[5])*N,f+=n*L,d+=n*q,h+=n*U,p+=n*D,y+=n*F,v+=n*K,m+=n*V,g+=n*z,b+=n*H,w+=n*X,_+=n*Q,S+=n*W,k+=n*G,A+=n*Y,E+=n*$,f+=(n=t[6])*N,d+=n*L,h+=n*q,p+=n*U,y+=n*D,v+=n*F,m+=n*K,g+=n*V,b+=n*z,w+=n*H,_+=n*X,S+=n*Q,k+=n*W,A+=n*G,E+=n*Y,x+=n*$,d+=(n=t[7])*N,h+=n*L,p+=n*q,y+=n*U,v+=n*D,m+=n*F,g+=n*K,b+=n*V,w+=n*z,_+=n*H,S+=n*X,k+=n*Q,A+=n*W,E+=n*G,x+=n*Y,T+=n*$,h+=(n=t[8])*N,p+=n*L,y+=n*q,v+=n*U,m+=n*D,g+=n*F,b+=n*K,w+=n*V,_+=n*z,S+=n*H,k+=n*X,A+=n*Q,E+=n*W,x+=n*G,T+=n*Y,O+=n*$,p+=(n=t[9])*N,y+=n*L,v+=n*q,m+=n*U,g+=n*D,b+=n*F,w+=n*K,_+=n*V,S+=n*z,k+=n*H,A+=n*X,E+=n*Q,x+=n*W,T+=n*G,O+=n*Y,P+=n*$,y+=(n=t[10])*N,v+=n*L,m+=n*q,g+=n*U,b+=n*D,w+=n*F,_+=n*K,S+=n*V,k+=n*z,A+=n*H,E+=n*X,x+=n*Q,T+=n*W,O+=n*G,P+=n*Y,R+=n*$,v+=(n=t[11])*N,m+=n*L,g+=n*q,b+=n*U,w+=n*D,_+=n*F,S+=n*K,k+=n*V,A+=n*z,E+=n*H,x+=n*X,T+=n*Q,O+=n*W,P+=n*G,R+=n*Y,C+=n*$,m+=(n=t[12])*N,g+=n*L,b+=n*q,w+=n*U,_+=n*D,S+=n*F,k+=n*K,A+=n*V,E+=n*z,x+=n*H,T+=n*X,O+=n*Q,P+=n*W,R+=n*G,C+=n*Y,I+=n*$,g+=(n=t[13])*N,b+=n*L,w+=n*q,_+=n*U,S+=n*D,k+=n*F,A+=n*K,E+=n*V,x+=n*z,T+=n*H,O+=n*X,P+=n*Q,R+=n*W,C+=n*G,I+=n*Y,B+=n*$,b+=(n=t[14])*N,w+=n*L,_+=n*q,S+=n*U,k+=n*D,A+=n*F,E+=n*K,x+=n*V,T+=n*z,O+=n*H,P+=n*X,R+=n*Q,C+=n*W,I+=n*G,B+=n*Y,M+=n*$,w+=(n=t[15])*N,a+=38*(S+=n*q),s+=38*(k+=n*U),u+=38*(A+=n*D),c+=38*(E+=n*F),l+=38*(x+=n*K),f+=38*(T+=n*V),d+=38*(O+=n*z),h+=38*(P+=n*H),p+=38*(R+=n*X),y+=38*(C+=n*Q),v+=38*(I+=n*W),m+=38*(B+=n*G),g+=38*(M+=n*Y),b+=38*(j+=n*$),i=(n=(i+=38*(_+=n*L))+(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)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),v=(n=v+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)),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)),d=(n=d+o+65535)-65536*(o=Math.floor(n/65536)),h=(n=h+o+65535)-65536*(o=Math.floor(n/65536)),p=(n=p+o+65535)-65536*(o=Math.floor(n/65536)),y=(n=y+o+65535)-65536*(o=Math.floor(n/65536)),v=(n=v+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)),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]=d,e[8]=h,e[9]=p,e[10]=y,e[11]=v,e[12]=m,e[13]=g,e[14]=b,e[15]=w}function D(e,t){U(e,t,t)}function F(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&&U(o,o,r);for(n=0;n<16;n++)e[n]=o[n]}function K(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&&U(o,o,r);for(n=0;n<16;n++)e[n]=o[n]}function V(e,r,n){var o,i,a=new Uint8Array(32),s=new Float64Array(80),c=t(),l=t(),f=t(),d=t(),h=t(),p=t();for(i=0;i<31;i++)a[i]=r[i];for(a[31]=127&r[31]|64,a[0]&=248,N(s,n),i=0;i<16;i++)l[i]=s[i],d[i]=c[i]=f[i]=0;for(c[0]=d[0]=1,i=254;i>=0;--i)I(c,l,o=a[i>>>3]>>>(7&i)&1),I(f,d,o),L(h,c,f),q(c,c,f),L(f,l,d),q(l,l,d),D(d,h),D(p,c),U(c,f,c),U(f,l,h),L(h,c,f),q(c,c,f),D(l,c),q(f,d,p),U(c,f,u),L(c,c,d),U(f,f,c),U(c,d,p),U(d,l,s),D(l,h),I(c,l,o),I(f,d,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]=d[i];var y=s.subarray(32),v=s.subarray(16);return F(y,y),U(v,v,y),B(e,v),0}function z(e,t){return V(e,t,i)}function H(e,t){return n(t,32),z(e,t)}function X(e,t,r){var n=new Uint8Array(32);return V(n,r,t),b(e,o,n,w)}E.prototype.blocks=function(e,t,r){for(var n,o,i,a,s,u,c,l,f,d,h,p,y,v,m,g,b,w,_,S=this.fin?0:2048,k=this.h[0],A=this.h[1],E=this.h[2],x=this.h[3],T=this.h[4],O=this.h[5],P=this.h[6],R=this.h[7],C=this.h[8],I=this.h[9],B=this.r[0],M=this.r[1],j=this.r[2],N=this.r[3],L=this.r[4],q=this.r[5],U=this.r[6],D=this.r[7],F=this.r[8],K=this.r[9];r>=16;)d=f=0,d+=(k+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*B,d+=(A+=8191&(n>>>13|(o=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*K),d+=(E+=8191&(o>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*F),d+=(x+=8191&(i>>>7|(a=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*D),f=(d+=(T+=8191&(a>>>4|(s=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*U))>>>13,d&=8191,d+=(O+=s>>>1&8191)*(5*q),d+=(P+=8191&(s>>>14|(u=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*L),d+=(R+=8191&(u>>>11|(c=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*N),d+=(C+=8191&(c>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*j),h=f+=(d+=(I+=l>>>5|S)*(5*M))>>>13,h+=k*M,h+=A*B,h+=E*(5*K),h+=x*(5*F),f=(h+=T*(5*D))>>>13,h&=8191,h+=O*(5*U),h+=P*(5*q),h+=R*(5*L),h+=C*(5*N),f+=(h+=I*(5*j))>>>13,h&=8191,p=f,p+=k*j,p+=A*M,p+=E*B,p+=x*(5*K),f=(p+=T*(5*F))>>>13,p&=8191,p+=O*(5*D),p+=P*(5*U),p+=R*(5*q),p+=C*(5*L),y=f+=(p+=I*(5*N))>>>13,y+=k*N,y+=A*j,y+=E*M,y+=x*B,f=(y+=T*(5*K))>>>13,y&=8191,y+=O*(5*F),y+=P*(5*D),y+=R*(5*U),y+=C*(5*q),v=f+=(y+=I*(5*L))>>>13,v+=k*L,v+=A*N,v+=E*j,v+=x*M,f=(v+=T*B)>>>13,v&=8191,v+=O*(5*K),v+=P*(5*F),v+=R*(5*D),v+=C*(5*U),m=f+=(v+=I*(5*q))>>>13,m+=k*q,m+=A*L,m+=E*N,m+=x*j,f=(m+=T*M)>>>13,m&=8191,m+=O*B,m+=P*(5*K),m+=R*(5*F),m+=C*(5*D),g=f+=(m+=I*(5*U))>>>13,g+=k*U,g+=A*q,g+=E*L,g+=x*N,f=(g+=T*j)>>>13,g&=8191,g+=O*M,g+=P*B,g+=R*(5*K),g+=C*(5*F),b=f+=(g+=I*(5*D))>>>13,b+=k*D,b+=A*U,b+=E*q,b+=x*L,f=(b+=T*N)>>>13,b&=8191,b+=O*j,b+=P*M,b+=R*B,b+=C*(5*K),w=f+=(b+=I*(5*F))>>>13,w+=k*F,w+=A*D,w+=E*U,w+=x*q,f=(w+=T*L)>>>13,w&=8191,w+=O*N,w+=P*j,w+=R*M,w+=C*B,_=f+=(w+=I*(5*K))>>>13,_+=k*K,_+=A*F,_+=E*D,_+=x*U,f=(_+=T*q)>>>13,_&=8191,_+=O*L,_+=P*N,_+=R*j,_+=C*M,k=d=8191&(f=(f=((f+=(_+=I*B)>>>13)<<2)+f|0)+(d&=8191)|0),A=h+=f>>>=13,E=p&=8191,x=y&=8191,T=v&=8191,O=m&=8191,P=g&=8191,R=b&=8191,C=w&=8191,I=_&=8191,t+=16,r-=16;this.h[0]=k,this.h[1]=A,this.h[2]=E,this.h[3]=x,this.h[4]=T,this.h[5]=O,this.h[6]=P,this.h[7]=R,this.h[8]=C,this.h[9]=I},E.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},E.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 Q=O,W=P;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,d,h,p,y,v,m,g,b,w,_,S,k,A,E,x,T,O,P,R=new Int32Array(16),C=new Int32Array(16),I=e[0],B=e[1],M=e[2],j=e[3],N=e[4],L=e[5],q=e[6],U=e[7],D=t[0],F=t[1],K=t[2],V=t[3],z=t[4],H=t[5],X=t[6],Q=t[7],W=0;n>=128;){for(S=0;S<16;S++)k=8*S+W,R[S]=r[k+0]<<24|r[k+1]<<16|r[k+2]<<8|r[k+3],C[S]=r[k+4]<<24|r[k+5]<<16|r[k+6]<<8|r[k+7];for(S=0;S<80;S++)if(o=I,i=B,a=M,s=j,u=N,c=L,l=q,U,d=D,h=F,p=K,y=V,v=z,m=H,g=X,Q,x=65535&(E=Q),T=E>>>16,O=65535&(A=U),P=A>>>16,x+=65535&(E=(z>>>14|N<<18)^(z>>>18|N<<14)^(N>>>9|z<<23)),T+=E>>>16,O+=65535&(A=(N>>>14|z<<18)^(N>>>18|z<<14)^(z>>>9|N<<23)),P+=A>>>16,x+=65535&(E=z&H^~z&X),T+=E>>>16,O+=65535&(A=N&L^~N&q),P+=A>>>16,x+=65535&(E=G[2*S+1]),T+=E>>>16,O+=65535&(A=G[2*S]),P+=A>>>16,A=R[S%16],T+=(E=C[S%16])>>>16,O+=65535&A,P+=A>>>16,O+=(T+=(x+=65535&E)>>>16)>>>16,x=65535&(E=_=65535&x|T<<16),T=E>>>16,O=65535&(A=w=65535&O|(P+=O>>>16)<<16),P=A>>>16,x+=65535&(E=(D>>>28|I<<4)^(I>>>2|D<<30)^(I>>>7|D<<25)),T+=E>>>16,O+=65535&(A=(I>>>28|D<<4)^(D>>>2|I<<30)^(D>>>7|I<<25)),P+=A>>>16,T+=(E=D&F^D&K^F&K)>>>16,O+=65535&(A=I&B^I&M^B&M),P+=A>>>16,f=65535&(O+=(T+=(x+=65535&E)>>>16)>>>16)|(P+=O>>>16)<<16,b=65535&x|T<<16,x=65535&(E=y),T=E>>>16,O=65535&(A=s),P=A>>>16,T+=(E=_)>>>16,O+=65535&(A=w),P+=A>>>16,B=o,M=i,j=a,N=s=65535&(O+=(T+=(x+=65535&E)>>>16)>>>16)|(P+=O>>>16)<<16,L=u,q=c,U=l,I=f,F=d,K=h,V=p,z=y=65535&x|T<<16,H=v,X=m,Q=g,D=b,S%16==15)for(k=0;k<16;k++)A=R[k],x=65535&(E=C[k]),T=E>>>16,O=65535&A,P=A>>>16,A=R[(k+9)%16],x+=65535&(E=C[(k+9)%16]),T+=E>>>16,O+=65535&A,P+=A>>>16,w=R[(k+1)%16],x+=65535&(E=((_=C[(k+1)%16])>>>1|w<<31)^(_>>>8|w<<24)^(_>>>7|w<<25)),T+=E>>>16,O+=65535&(A=(w>>>1|_<<31)^(w>>>8|_<<24)^w>>>7),P+=A>>>16,w=R[(k+14)%16],T+=(E=((_=C[(k+14)%16])>>>19|w<<13)^(w>>>29|_<<3)^(_>>>6|w<<26))>>>16,O+=65535&(A=(w>>>19|_<<13)^(_>>>29|w<<3)^w>>>6),P+=A>>>16,P+=(O+=(T+=(x+=65535&E)>>>16)>>>16)>>>16,R[k]=65535&O|P<<16,C[k]=65535&x|T<<16;x=65535&(E=D),T=E>>>16,O=65535&(A=I),P=A>>>16,A=e[0],T+=(E=t[0])>>>16,O+=65535&A,P+=A>>>16,P+=(O+=(T+=(x+=65535&E)>>>16)>>>16)>>>16,e[0]=I=65535&O|P<<16,t[0]=D=65535&x|T<<16,x=65535&(E=F),T=E>>>16,O=65535&(A=B),P=A>>>16,A=e[1],T+=(E=t[1])>>>16,O+=65535&A,P+=A>>>16,P+=(O+=(T+=(x+=65535&E)>>>16)>>>16)>>>16,e[1]=B=65535&O|P<<16,t[1]=F=65535&x|T<<16,x=65535&(E=K),T=E>>>16,O=65535&(A=M),P=A>>>16,A=e[2],T+=(E=t[2])>>>16,O+=65535&A,P+=A>>>16,P+=(O+=(T+=(x+=65535&E)>>>16)>>>16)>>>16,e[2]=M=65535&O|P<<16,t[2]=K=65535&x|T<<16,x=65535&(E=V),T=E>>>16,O=65535&(A=j),P=A>>>16,A=e[3],T+=(E=t[3])>>>16,O+=65535&A,P+=A>>>16,P+=(O+=(T+=(x+=65535&E)>>>16)>>>16)>>>16,e[3]=j=65535&O|P<<16,t[3]=V=65535&x|T<<16,x=65535&(E=z),T=E>>>16,O=65535&(A=N),P=A>>>16,A=e[4],T+=(E=t[4])>>>16,O+=65535&A,P+=A>>>16,P+=(O+=(T+=(x+=65535&E)>>>16)>>>16)>>>16,e[4]=N=65535&O|P<<16,t[4]=z=65535&x|T<<16,x=65535&(E=H),T=E>>>16,O=65535&(A=L),P=A>>>16,A=e[5],T+=(E=t[5])>>>16,O+=65535&A,P+=A>>>16,P+=(O+=(T+=(x+=65535&E)>>>16)>>>16)>>>16,e[5]=L=65535&O|P<<16,t[5]=H=65535&x|T<<16,x=65535&(E=X),T=E>>>16,O=65535&(A=q),P=A>>>16,A=e[6],T+=(E=t[6])>>>16,O+=65535&A,P+=A>>>16,P+=(O+=(T+=(x+=65535&E)>>>16)>>>16)>>>16,e[6]=q=65535&O|P<<16,t[6]=X=65535&x|T<<16,x=65535&(E=Q),T=E>>>16,O=65535&(A=U),P=A>>>16,A=e[7],T+=(E=t[7])>>>16,O+=65535&A,P+=A>>>16,P+=(O+=(T+=(x+=65535&E)>>>16)>>>16)>>>16,e[7]=U=65535&O|P<<16,t[7]=Q=65535&x|T<<16,W+=128,n-=128}return n}function $(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,p(a,r-8,s/536870912|0,s<<3),Y(o,i,a,r),n=0;n<8;n++)p(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(),d=t();q(n,e[1],e[0]),q(d,r[1],r[0]),U(n,n,d),L(o,e[0],e[1]),L(d,r[0],r[1]),U(o,o,d),U(i,e[3],r[3]),U(i,i,l),U(a,e[2],r[2]),L(a,a,a),q(s,o,n),q(u,a,i),L(c,a,i),L(f,o,n),U(e[0],s,u),U(e[1],f,c),U(e[2],c,u),U(e[3],s,f)}function J(e,t,r){var n;for(n=0;n<4;n++)I(e[n],t[n],r)}function ee(e,r){var n=t(),o=t(),i=t();F(i,r[2]),U(n,r[0],i),U(o,r[1],i),B(e,o),e[31]^=j(n)<<7}function te(e,t,r){var n,o;for(R(e[0],a),R(e[1],s),R(e[2],s),R(e[3],a),o=255;o>=0;--o)J(e,t,n=r[o/8|0]>>(7&o)&1),Z(t,e),Z(e,e),J(e,t,n)}function re(e,r){var n=[t(),t(),t(),t()];R(n[0],f),R(n[1],d),R(n[2],s),U(n[3],f,d),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),$(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()];$(s,o,32),s[0]&=248,s[31]&=127,s[31]|=64;var d=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($(c,e.subarray(32),n+32),ae(c),re(f,c),ee(e,f),i=32;i<64;i++)e[i]=o[i];for($(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),d}function ue(e,r,n,o){var i,u=new Uint8Array(32),l=new Uint8Array(64),f=[t(),t(),t(),t()],d=[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(),d=t();return R(e[2],s),N(e[1],r),D(i,e[1]),U(u,i,c),q(i,i,e[2]),L(u,e[2],u),D(l,u),D(f,l),U(d,f,l),U(n,d,i),U(n,n,u),K(n,n),U(n,n,i),U(n,n,u),U(n,n,u),U(e[0],n,u),D(o,e[0]),U(o,o,u),M(o,i)&&U(e[0],e[0],h),D(o,e[0]),U(o,o,u),M(o,i)?-1:(j(e[0])===r[31]>>7&&q(e[0],a,e[0]),U(e[3],e[0],e[1]),0)}(d,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($(l,e,n),ae(l),te(f,d,l),re(d,r.subarray(32)),Z(f,d),ee(u,f),n-=64,m(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}function ce(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function le(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function fe(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:b,crypto_stream_xor:A,crypto_stream:k,crypto_stream_salsa20_xor:_,crypto_stream_salsa20:S,crypto_onetimeauth:x,crypto_onetimeauth_verify:T,crypto_verify_16:v,crypto_verify_32:m,crypto_secretbox:O,crypto_secretbox_open:P,crypto_scalarmult:V,crypto_scalarmult_base:z,crypto_box_beforenm:X,crypto_box_afternm:Q,crypto_box:function(e,t,r,n,o,i){var a=new Uint8Array(32);return X(a,o,i),Q(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:H,crypto_hash:$,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:16,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:64,crypto_sign_PUBLICKEYBYTES:32,crypto_sign_SECRETKEYBYTES:64,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:c,L:oe,pack25519:B,unpack25519:N,M:U,A:L,S:D,Z:q,pow2523:K,add:Z,set25519:R,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){le(e,t,r),ce(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 O(o,n,n.length,t,r),o.subarray(16)},e.secretbox.open=function(e,t,r){le(e,t,r),ce(r,t);for(var n=new Uint8Array(16+e.length),o=new Uint8Array(n.length),i=0;i<e.length;i++)n[i+16]=e[i];return n.length<32||0!==P(o,n,n.length,t,r)?null:o.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=16,e.scalarMult=function(e,t){if(le(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 V(r,e,t),r},e.scalarMult.base=function(e){if(le(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return z(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){le(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 H(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(le(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return z(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(le(e,t),64!==t.length)throw new Error("bad secret key size");var r=new Uint8Array(64+e.length);return se(r,e,e.length,t),r},e.sign.open=function(e,t){if(le(e,t),32!==t.length)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(64),i=0;i<o.length;i++)o[i]=n[i];return o},e.sign.detached.verify=function(e,t,r){if(le(e,t,r),64!==t.length)throw new Error("bad signature size");if(32!==r.length)throw new Error("bad public key size");var n,o=new Uint8Array(64+e.length),i=new Uint8Array(64+e.length);for(n=0;n<64;n++)o[n]=t[n];for(n=0;n<e.length;n++)o[n+64]=e[n];return ue(i,o,o.length,r)>=0},e.sign.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(64);return ne(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(le(e),64!==e.length)throw new Error("bad secret key size");for(var t=new Uint8Array(32),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(le(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(32),r=new Uint8Array(64),n=0;n<32;n++)r[n]=e[n];return ne(t,r,!0),{publicKey:t,secretKey:r}},e.sign.publicKeyLength=32,e.sign.secretKeyLength=64,e.sign.seedLength=32,e.sign.signatureLength=64,e.hash=function(e){le(e);var t=new Uint8Array(64);return $(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return le(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];fe(o)}))}else(t=r(198))&&t.randomBytes&&e.setPRNG((function(e,r){var n,o=t.randomBytes(r);for(n=0;n<r;n++)e[n]=o[n];fe(o)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.LiquidityPoolFeeV18=void 0,t.getLiquidityPoolId=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("constant_product"!==t)throw new Error("liquidityPoolType is invalid");var n=r.assetA,o=r.assetB,c=r.fee;if(!(n&&n instanceof a.Asset))throw new Error("assetA is invalid");if(!(o&&o instanceof a.Asset))throw new Error("assetB is invalid");if(!c||c!==u)throw new Error("fee is invalid");if(-1!==a.Asset.compare(n,o))throw new Error("Assets are not in lexicographic order");var l=i.default.LiquidityPoolType.liquidityPoolConstantProduct().toXDR(),f=new i.default.LiquidityPoolConstantProductParameters({assetA:n.toXDRObject(),assetB:o.toXDRObject(),fee:c}).toXDR(),d=e.concat([l,f]);return(0,s.hash)(d)};var n,o=r(0),i=(n=o)&&n.__esModule?n:{default:n},a=r(27),s=r(30);var u=t.LiquidityPoolFeeV18=30}).call(this,r(1).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(32);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var o=r(269);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var i=r(59);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var a=r(270);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}));var s=r(271);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})}));var u=r(272);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})}));var c=r(273);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})}));var l=r(127);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})}));var f=r(275);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}})}));var d=r(276);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}})}));var h=r(277);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}})}));var p=r(278);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}})}));var y=r(283);Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return y[e]}})}));var v=r(284);Object.keys(v).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return v[e]}})}));var m=r(133);Object.keys(m).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return m[e]}})}));var g=r(285);Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}})}));var b=r(288);Object.keys(b).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return b[e]}})}));var w=r(291);Object.keys(w).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return w[e]}})}))},function(e,t,r){var n=r(72),o=r(43),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var a=e[t];i.call(e,t)&&o(a,r)&&(void 0!==r||t in e)||n(e,t,r)}},function(e,t,r){var n=r(26),o=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t){var r=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return r.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,r){var n=r(206),o=r(110);e.exports=function(e){return n((function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++n<i;){var u=r[n];u&&e(t,u,n,a)}return t}))}},function(e,t,r){var n=r(43),o=r(25),i=r(68),a=r(18);e.exports=function(e,t,r){if(!a(r))return!1;var s=typeof t;return!!("number"==s?o(r)&&i(t,r.length):"string"==s&&t in r)&&n(r[t],e)}},function(e,t,r){var n=r(49),o=r(217),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=[];for(var r in Object(e))i.call(e,r)&&"constructor"!=r&&t.push(r);return t}},function(e,t){e.exports=function(e,t){return function(r){return e(t(r))}}},function(e,t,r){var n=r(219),o=r(259),i=r(46),a=r(3),s=r(267);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):n(e):s(e)}},function(e,t,r){var n=r(243),o=r(12);e.exports=function e(t,r,i,a,s){return t===r||(null==t||null==r||!o(t)&&!o(r)?t!=t&&r!=r:n(t,r,i,a,e,s))}},function(e,t,r){var n=r(244),o=r(247),i=r(248);e.exports=function(e,t,r,a,s,u){var c=1&r,l=e.length,f=t.length;if(l!=f&&!(c&&f>l))return!1;var d=u.get(e),h=u.get(t);if(d&&h)return d==t&&h==e;var p=-1,y=!0,v=2&r?new n:void 0;for(u.set(e,t),u.set(t,e);++p<l;){var m=e[p],g=t[p];if(a)var b=c?a(g,m,p,t,e,u):a(m,g,p,e,t,u);if(void 0!==b){if(b)continue;y=!1;break}if(v){if(!o(t,(function(e,t){if(!i(v,t)&&(m===e||s(m,e,r,a,u)))return v.push(t)}))){y=!1;break}}else if(m!==g&&!s(m,g,r,a,u)){y=!1;break}}return u.delete(e),u.delete(t),y}},function(e,t,r){var n=r(14).Uint8Array;e.exports=n},function(e,t,r){var n=r(118),o=r(77),i=r(34);e.exports=function(e){return n(e,i,o)}},function(e,t,r){var n=r(119),o=r(3);e.exports=function(e,t,r){var i=t(e);return o(e)?i:n(i,r(e))}},function(e,t){e.exports=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}},function(e,t){e.exports=function(){return[]}},function(e,t,r){var n=r(18);e.exports=function(e){return e==e&&!n(e)}},function(e,t){e.exports=function(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}},function(e,t,r){var n=r(124),o=r(58);e.exports=function(e,t){for(var r=0,i=(t=n(t,e)).length;null!=e&&r<i;)e=e[o(t[r++])];return r&&r==i?e:void 0}},function(e,t,r){var n=r(3),o=r(78),i=r(261),a=r(79);e.exports=function(e,t){return n(e)?e:o(e,t)?[e]:i(a(e))}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,r){var n,o,i;
/**
* @license Long.js (c) 2013 Daniel Wirtz <dcode@dcode.io>
* Released under the Apache License, Version 2.0
* see: https://github.com/dcodeIO/Long.js for details
*/o=[],void 0===(i="function"==typeof(n=function(){"use strict";function e(e,t,r){this.low=0|e,this.high=0|t,this.unsigned=!!r}e.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),e.isLong=function(e){return!0===(e&&e.__isLong__)};var t={},r={};e.fromInt=function(n,o){var i,a;return o?0<=(n>>>=0)&&n<256&&(a=r[n])?a:(i=new e(n,(0|n)<0?-1:0,!0),0<=n&&n<256&&(r[n]=i),i):-128<=(n|=0)&&n<128&&(a=t[n])?a:(i=new e(n,n<0?-1:0,!1),-128<=n&&n<128&&(t[n]=i),i)},e.fromNumber=function(t,r){return r=!!r,isNaN(t)||!isFinite(t)?e.ZERO:!r&&t<=-i?e.MIN_VALUE:!r&&t+1>=i?e.MAX_VALUE:r&&t>=o?e.MAX_UNSIGNED_VALUE:t<0?e.fromNumber(-t,r).negate():new e(t%n|0,t/n|0,r)},e.fromBits=function(t,r,n){return new e(t,r,n)},e.fromString=function(t,r,n){if(0===t.length)throw Error("number format error: empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e.ZERO;if("number"==typeof r&&(n=r,r=!1),(n=n||10)<2||36<n)throw Error("radix out of range: "+n);var o;if((o=t.indexOf("-"))>0)throw Error('number format error: interior "-" character: '+t);if(0===o)return e.fromString(t.substring(1),r,n).negate();for(var i=e.fromNumber(Math.pow(n,8)),a=e.ZERO,s=0;s<t.length;s+=8){var u=Math.min(8,t.length-s),c=parseInt(t.substring(s,s+u),n);if(u<8){var l=e.fromNumber(Math.pow(n,u));a=a.multiply(l).add(e.fromNumber(c))}else a=(a=a.multiply(i)).add(e.fromNumber(c))}return a.unsigned=r,a},e.fromValue=function(t){return t instanceof e?t:"number"==typeof t?e.fromNumber(t):"string"==typeof t?e.fromString(t):new e(t.low,t.high,t.unsigned)};var n=4294967296,o=n*n,i=o/2,a=e.fromInt(1<<24);return e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*n+(this.low>>>0):this.high*n+(this.low>>>0)},e.prototype.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix out of range: "+t);if(this.isZero())return"0";var r;if(this.isNegative()){if(this.equals(e.MIN_VALUE)){var n=e.fromNumber(t),o=this.divide(n);return r=o.multiply(n).subtract(this),o.toString(t)+r.toInt().toString(t)}return"-"+this.negate().toString(t)}var i=e.fromNumber(Math.pow(t,6),this.unsigned);r=this;for(var a="";;){var s=r.divide(i),u=(r.subtract(s.multiply(i)).toInt()>>>0).toString(t);if((r=s).isZero())return u+a;for(;u.length<6;)u="0"+u;a=""+u+a}},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(e.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,r=31;r>0&&0==(t&1<<r);r--);return 0!=this.high?r+33:r+1},e.prototype.isZero=function(){return 0===this.high&&0===this.low},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isOdd=function(){return 1==(1&this.low)},e.prototype.isEven=function(){return 0==(1&this.low)},e.prototype.equals=function(t){return e.isLong(t)||(t=e.fromValue(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},e.eq=e.prototype.equals,e.prototype.notEquals=function(e){return!this.equals(e)},e.neq=e.prototype.notEquals,e.prototype.lessThan=function(e){return this.compare(e)<0},e.prototype.lt=e.prototype.lessThan,e.prototype.lessThanOrEqual=function(e){return this.compare(e)<=0},e.prototype.lte=e.prototype.lessThanOrEqual,e.prototype.greaterThan=function(e){return this.compare(e)>0},e.prototype.gt=e.prototype.greaterThan,e.prototype.greaterThanOrEqual=function(e){return this.compare(e)>=0},e.prototype.gte=e.prototype.greaterThanOrEqual,e.prototype.compare=function(t){if(e.isLong(t)||(t=e.fromValue(t)),this.equals(t))return 0;var r=this.isNegative(),n=t.isNegative();return r&&!n?-1:!r&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.subtract(t).isNegative()?-1:1},e.prototype.negate=function(){return!this.unsigned&&this.equals(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=e.prototype.negate,e.prototype.add=function(t){e.isLong(t)||(t=e.fromValue(t));var r=this.high>>>16,n=65535&this.high,o=this.low>>>16,i=65535&this.low,a=t.high>>>16,s=65535&t.high,u=t.low>>>16,c=0,l=0,f=0,d=0;return f+=(d+=i+(65535&t.low))>>>16,d&=65535,l+=(f+=o+u)>>>16,f&=65535,c+=(l+=n+s)>>>16,l&=65535,c+=r+a,c&=65535,e.fromBits(f<<16|d,c<<16|l,this.unsigned)},e.prototype.subtract=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.add(t.negate())},e.prototype.sub=e.prototype.subtract,e.prototype.multiply=function(t){if(this.isZero())return e.ZERO;if(e.isLong(t)||(t=e.fromValue(t)),t.isZero())return e.ZERO;if(this.equals(e.MIN_VALUE))return t.isOdd()?e.MIN_VALUE:e.ZERO;if(t.equals(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return t.isNegative()?this.negate().multiply(t.negate()):this.negate().multiply(t).negate();if(t.isNegative())return this.multiply(t.negate()).negate();if(this.lessThan(a)&&t.lessThan(a))return e.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,n=65535&this.high,o=this.low>>>16,i=65535&this.low,s=t.high>>>16,u=65535&t.high,c=t.low>>>16,l=65535&t.low,f=0,d=0,h=0,p=0;return h+=(p+=i*l)>>>16,p&=65535,d+=(h+=o*l)>>>16,h&=65535,d+=(h+=i*c)>>>16,h&=65535,f+=(d+=n*l)>>>16,d&=65535,f+=(d+=o*c)>>>16,d&=65535,f+=(d+=i*u)>>>16,d&=65535,f+=r*l+n*c+o*u+i*s,f&=65535,e.fromBits(h<<16|p,f<<16|d,this.unsigned)},e.prototype.mul=e.prototype.multiply,e.prototype.divide=function(t){if(e.isLong(t)||(t=e.fromValue(t)),t.isZero())throw new Error("division by zero");if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var r,n,o;if(this.equals(e.MIN_VALUE))return t.equals(e.ONE)||t.equals(e.NEG_ONE)?e.MIN_VALUE:t.equals(e.MIN_VALUE)?e.ONE:(r=this.shiftRight(1).divide(t).shiftLeft(1)).equals(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(n=this.subtract(t.multiply(r)),o=r.add(n.divide(t)));if(t.equals(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return t.isNegative()?this.negate().divide(t.negate()):this.negate().divide(t).negate();if(t.isNegative())return this.divide(t.negate()).negate();for(o=e.ZERO,n=this;n.greaterThanOrEqual(t);){r=Math.max(1,Math.floor(n.toNumber()/t.toNumber()));for(var i=Math.ceil(Math.log(r)/Math.LN2),a=i<=48?1:Math.pow(2,i-48),s=e.fromNumber(r),u=s.multiply(t);u.isNegative()||u.greaterThan(n);)r-=a,u=(s=e.fromNumber(r,this.unsigned)).multiply(t);s.isZero()&&(s=e.ONE),o=o.add(s),n=n.subtract(u)}return o},e.prototype.div=e.prototype.divide,e.prototype.modulo=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.subtract(this.divide(t).multiply(t))},e.prototype.mod=e.prototype.modulo,e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.and=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low&t.low,this.high&t.high,this.unsigned)},e.prototype.or=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low|t.low,this.high|t.high,this.unsigned)},e.prototype.xor=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low^t.low,this.high^t.high,this.unsigned)},e.prototype.shiftLeft=function(t){return e.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?e.fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):e.fromBits(0,this.low<<t-32,this.unsigned)},e.prototype.shl=e.prototype.shiftLeft,e.prototype.shiftRight=function(t){return e.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?e.fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):e.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=e.prototype.shiftRight,e.prototype.shiftRightUnsigned=function(t){if(e.isLong(t)&&(t=t.toInt()),0==(t&=63))return this;var r=this.high;if(t<32){var n=this.low;return e.fromBits(n>>>t|r<<32-t,r>>>t,this.unsigned)}return 32===t?e.fromBits(r,0,this.unsigned):e.fromBits(r>>>t-32,0,this.unsigned)},e.prototype.shru=e.prototype.shiftRightUnsigned,e.prototype.toSigned=function(){return this.unsigned?new e(this.low,this.high,!1):this},e.prototype.toUnsigned=function(){return this.unsigned?this:new e(this.low,this.high,!0)},e})?n.apply(t,o):n)||(e.exports=i)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bool=void 0;var n=a(r(274)),o=r(32),i=a(r(4));function a(e){return e&&e.__esModule?e:{default:e}}var s=t.Bool={read:function(e){var t=o.Int.read(e);switch(t){case 0:return!1;case 1:return!0;default:throw new Error("XDR Read Error: Got "+t+" when trying to read a bool")}},write:function(e,t){var r=e?1:0;return o.Int.write(r,t)},isValid:function(e){return(0,n.default)(e)}};(0,i.default)(s)},function(e,t){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},function(e,t,r){var n=r(97),o=r(67),i=r(130),a=Math.min;e.exports=function(e,t){if((e=i(e))<1||e>9007199254740991)return[];var r=4294967295,s=a(e,4294967295);t=o(t),e-=4294967295;for(var u=n(s,t);++r<e;)t(r);return u}},function(e,t,r){var n=r(280);e.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},function(e,t){var r=/\s/;e.exports=function(e){for(var t=e.length;t--&&r.test(e.charAt(t)););return t}},function(e,t){e.exports=function(e){return null===e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Void=void 0;var n=i(r(7)),o=i(r(4));function i(e){return e&&e.__esModule?e:{default:e}}var a=t.Void={read:function(){},write:function(e){if(!(0,n.default)(e))throw new Error("XDR Write Error: trying to write value to a void slot")},isValid:function(e){return(0,n.default)(e)}};(0,o.default)(a)},function(e,t,r){var n=r(81),o=r(113),i=r(289),a=r(3);e.exports=function(e,t){return(a(e)?n:i)(e,o(t,3))}},function(e,t,r){(function(e){var n=r(14),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o?n.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=s?s(r):new e.constructor(r);return e.copy(n),n}}).call(this,r(41)(e))},function(e,t){e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},function(e,t,r){var n=r(119),o=r(83),i=r(77),a=r(120),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,i(e)),e=o(e);return t}:a;e.exports=s},function(e,t,r){var n=r(84);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},function(e,t,r){var n=r(304),o=r(83),i=r(49);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:n(o(e))}},function(e,t,r){var n=r(309),o=r(142),i=r(130),a=r(79);e.exports=function(e,t,r){e=a(e);var s=(t=i(t))?o(e):0;return t&&s<t?e+n(t-s,r):e}},function(e,t,r){var n=r(311);e.exports=function(e,t,r){var o=e.length;return r=void 0===r?o:r,!t&&r>=o?e:n(e,t,r)}},function(e,t,r){var n=r(312),o=r(85),i=r(313);e.exports=function(e){return o(e)?i(e):n(e)}},function(e,t,r){var n=r(314),o=r(85),i=r(315);e.exports=function(e){return o(e)?i(e):n(e)}},function(e,t,r){var n=r(80),o=r(141),i=r(316),a=r(143),s=r(79),u=r(131);e.exports=function(e,t,r){if((e=s(e))&&(r||void 0===t))return e.slice(0,u(e)+1);if(!e||!(t=n(t)))return e;var c=a(e),l=i(c,a(t))+1;return o(c,0,l).join("")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Operation=t.AuthClawbackEnabledFlag=t.AuthImmutableFlag=t.AuthRevocableFlag=t.AuthRequiredFlag=void 0;var n=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(22),i=w(r(23)),a=w(r(144)),s=w(r(7)),u=w(r(9)),c=w(r(42)),l=w(r(335)),f=r(336),d=r(27),h=r(88),p=r(146),y=r(8),v=r(89),m=w(r(0)),g=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(337)),b=r(17);function w(e){return e&&e.__esModule?e:{default:e}}var _=1e7,S=(t.AuthRequiredFlag=1,t.AuthRevocableFlag=2,t.AuthImmutableFlag=4,t.AuthClawbackEnabledFlag=8,t.Operation=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"setSourceAccount",value:function(e,t){if(t.source)try{e.sourceAccount=(0,b.decodeAddressToMuxedAccount)(t.source)}catch(e){throw new Error("Source address is invalid")}}},{key:"fromXDRObject",value:function(e){var t={};e.sourceAccount()&&(t.source=(0,b.encodeMuxedAccountToAddress)(e.sourceAccount()));var r=e.body().value(),n=e.body().switch().name;switch(n){case"createAccount":t.type="createAccount",t.destination=k(r.destination()),t.startingBalance=this._fromXDRAmount(r.startingBalance());break;case"payment":t.type="payment",t.destination=(0,b.encodeMuxedAccountToAddress)(r.destination()),t.asset=d.Asset.fromOperation(r.asset()),t.amount=this._fromXDRAmount(r.amount());break;case"pathPaymentStrictReceive":t.type="pathPaymentStrictReceive",t.sendAsset=d.Asset.fromOperation(r.sendAsset()),t.sendMax=this._fromXDRAmount(r.sendMax()),t.destination=(0,b.encodeMuxedAccountToAddress)(r.destination()),t.destAsset=d.Asset.fromOperation(r.destAsset()),t.destAmount=this._fromXDRAmount(r.destAmount()),t.path=[];var o=r.path();Object.keys(o).forEach((function(e){t.path.push(d.Asset.fromOperation(o[e]))}));break;case"pathPaymentStrictSend":t.type="pathPaymentStrictSend",t.sendAsset=d.Asset.fromOperation(r.sendAsset()),t.sendAmount=this._fromXDRAmount(r.sendAmount()),t.destination=(0,b.encodeMuxedAccountToAddress)(r.destination()),t.destAsset=d.Asset.fromOperation(r.destAsset()),t.destMin=this._fromXDRAmount(r.destMin()),t.path=[];var i=r.path();Object.keys(i).forEach((function(e){t.path.push(d.Asset.fromOperation(i[e]))}));break;case"changeTrust":switch(t.type="changeTrust",r.line().switch()){case m.default.AssetType.assetTypePoolShare():t.line=h.LiquidityPoolAsset.fromOperation(r.line());break;default:t.line=d.Asset.fromOperation(r.line())}t.limit=this._fromXDRAmount(r.limit());break;case"allowTrust":t.type="allowTrust",t.trustor=k(r.trustor()),t.assetCode=r.asset().value().toString(),t.assetCode=(0,a.default)(t.assetCode,"\0"),t.authorize=r.authorize();break;case"setOptions":if(t.type="setOptions",r.inflationDest()&&(t.inflationDest=k(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=k(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=y.StrKey.encodeSignedPayload(c.toXDR())}s.weight=r.signer().weight(),t.signer=s}break;case"manageOffer":case"manageSellOffer":t.type="manageSellOffer",t.selling=d.Asset.fromOperation(r.selling()),t.buying=d.Asset.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=d.Asset.fromOperation(r.selling()),t.buying=d.Asset.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=d.Asset.fromOperation(r.selling()),t.buying=d.Asset.fromOperation(r.buying()),t.amount=this._fromXDRAmount(r.amount()),t.price=this._fromXDRPrice(r.price());break;case"accountMerge":t.type="accountMerge",t.destination=(0,b.encodeMuxedAccountToAddress)(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=d.Asset.fromOperation(r.asset()),t.amount=this._fromXDRAmount(r.amount()),t.claimants=[],r.claimants().forEach((function(e){t.claimants.push(p.Claimant.fromXDR(e))}));break;case"claimClaimableBalance":t.type="claimClaimableBalance",t.balanceId=r.toXDR("hex");break;case"beginSponsoringFutureReserves":t.type="beginSponsoringFutureReserves",t.sponsoredId=k(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 m.default.LedgerEntryType.account().name:t.type="revokeAccountSponsorship",t.account=k(r.account().accountId());break;case m.default.LedgerEntryType.trustline().name:t.type="revokeTrustlineSponsorship",t.account=k(r.trustLine().accountId());var n=r.trustLine().asset();switch(n.switch()){case m.default.AssetType.assetTypePoolShare():t.asset=v.LiquidityPoolId.fromOperation(n);break;default:t.asset=d.Asset.fromOperation(n)}break;case m.default.LedgerEntryType.offer().name:t.type="revokeOfferSponsorship",t.seller=k(r.offer().sellerId()),t.offerId=r.offer().offerId().toString();break;case m.default.LedgerEntryType.data().name:t.type="revokeDataSponsorship",t.account=k(r.data().accountId()),t.name=r.data().dataName().toString("ascii");break;case m.default.LedgerEntryType.claimableBalance().name:t.type="revokeClaimableBalanceSponsorship",t.balanceId=r.claimableBalance().balanceId().toXDR("hex");break;case m.default.LedgerEntryType.liquidityPool().name:t.type="revokeLiquidityPoolSponsorship",t.liquidityPoolId=r.liquidityPool().liquidityPoolId().toString("hex");break;default:throw new Error("Unknown ledgerKey: "+e.switch().name)}break;case"revokeSponsorshipSigner":t.type="revokeSignerSponsorship",t.account=k(e.signer().accountId()),t.signer=function(e){var t={};switch(e.switch().name){case m.default.SignerKeyType.signerKeyTypeEd25519().name:t.ed25519PublicKey=y.StrKey.encodeEd25519PublicKey(e.ed25519());break;case m.default.SignerKeyType.signerKeyTypePreAuthTx().name:t.preAuthTx=e.preAuthTx().toString("hex");break;case m.default.SignerKeyType.signerKeyTypeHashX().name:t.sha256Hash=e.hashX().toString("hex");break;default:throw new Error("Unknown signerKey: "+e.switch().name)}return t}(e.signer().signerKey());break;default:throw new Error("Unknown revokeSponsorship: "+e.switch().name)}}(r,t);break;case"clawback":t.type="clawback",t.amount=this._fromXDRAmount(r.amount()),t.from=(0,b.encodeMuxedAccountToAddress)(r.from()),t.asset=d.Asset.fromOperation(r.asset());break;case"clawbackClaimableBalance":t.type="clawbackClaimableBalance",t.balanceId=r.toXDR("hex");break;case"setTrustLineFlags":t.type="setTrustLineFlags",t.asset=d.Asset.fromOperation(r.asset()),t.trustor=k(r.trustor());var l=r.clearFlags(),f=r.setFlags(),g={authorized:m.default.TrustLineFlags.authorizedFlag(),authorizedToMaintainLiabilities:m.default.TrustLineFlags.authorizedToMaintainLiabilitiesFlag(),clawbackEnabled:m.default.TrustLineFlags.trustlineClawbackEnabledFlag()};t.flags={},Object.keys(g).forEach((function(e){var r;t.flags[e]=(r=g[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;default:throw new Error("Unknown operation: "+n)}return t}},{key:"isValidAmount",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(0,u.default)(e))return!1;var r=void 0;try{r=new i.default(e)}catch(e){return!1}return!(!t&&r.isZero()||r.isNegative()||r.times(_).greaterThan(new i.default("9223372036854775807").toString())||r.decimalPlaces()>7||r.isNaN()||!r.isFinite())}},{key:"constructAmountRequirementsError",value:function(e){return 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(!(0,s.default)(t))switch((0,u.default)(t)&&(t=parseFloat(t)),!0){case!(0,c.default)(t)||!(0,l.default)(t)||t%1!=0:throw new Error(e+" value is invalid");case t<0:throw new Error(e+" value must be unsigned");case!r||r&&r(t,e):return t;default:throw new Error(e+" value is invalid")}}},{key:"_toXDRAmount",value:function(e){var t=new i.default(e).mul(_);return o.Hyper.fromString(t.toString())}},{key:"_fromXDRAmount",value:function(e){return new i.default(e).div(_).toFixed(7)}},{key:"_fromXDRPrice",value:function(e){return new i.default(e.n()).div(new i.default(e.d())).toString()}},{key:"_toXDRPrice",value:function(e){var t=void 0;if(e.n&&e.d)t=new m.default.Price(e);else{e=new i.default(e);var r=(0,f.best_r)(e);t=new m.default.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}}]),e}());function k(e){return y.StrKey.encodeEd25519PublicKey(e.ed25519())}S.accountMerge=g.accountMerge,S.allowTrust=g.allowTrust,S.bumpSequence=g.bumpSequence,S.changeTrust=g.changeTrust,S.createAccount=g.createAccount,S.createClaimableBalance=g.createClaimableBalance,S.claimClaimableBalance=g.claimClaimableBalance,S.clawbackClaimableBalance=g.clawbackClaimableBalance,S.createPassiveSellOffer=g.createPassiveSellOffer,S.inflation=g.inflation,S.manageData=g.manageData,S.manageSellOffer=g.manageSellOffer,S.manageBuyOffer=g.manageBuyOffer,S.pathPaymentStrictReceive=g.pathPaymentStrictReceive,S.pathPaymentStrictSend=g.pathPaymentStrictSend,S.payment=g.payment,S.setOptions=g.setOptions,S.beginSponsoringFutureReserves=g.beginSponsoringFutureReserves,S.endSponsoringFutureReserves=g.endSponsoringFutureReserves,S.revokeAccountSponsorship=g.revokeAccountSponsorship,S.revokeTrustlineSponsorship=g.revokeTrustlineSponsorship,S.revokeOfferSponsorship=g.revokeOfferSponsorship,S.revokeDataSponsorship=g.revokeDataSponsorship,S.revokeClaimableBalanceSponsorship=g.revokeClaimableBalanceSponsorship,S.revokeLiquidityPoolSponsorship=g.revokeLiquidityPoolSponsorship,S.revokeSignerSponsorship=g.revokeSignerSponsorship,S.clawback=g.clawback,S.setTrustLineFlags=g.setTrustLineFlags,S.liquidityPoolDeposit=g.liquidityPoolDeposit,S.liquidityPoolWithdraw=g.liquidityPoolWithdraw},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Claimant=void 0;var n,o=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),a=(n=i)&&n.__esModule?n:{default:n},s=r(19),u=r(8);t.Claimant=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),t&&!u.StrKey.isValidEd25519PublicKey(t))throw new Error("Destination is invalid");if(this._destination=t,r){if(!(r instanceof a.default.ClaimPredicate))throw new Error("Predicate should be an xdr.ClaimPredicate");this._predicate=r}else this._predicate=a.default.ClaimPredicate.claimPredicateUnconditional()}return o(e,[{key:"toXDRObject",value:function(){var e=new a.default.ClaimantV0({destination:s.Keypair.fromPublicKey(this._destination).xdrAccountId(),predicate:this._predicate});return a.default.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")}}],[{key:"predicateUnconditional",value:function(){return a.default.ClaimPredicate.claimPredicateUnconditional()}},{key:"predicateAnd",value:function(e,t){if(!(e instanceof a.default.ClaimPredicate))throw new Error("left Predicate should be an xdr.ClaimPredicate");if(!(t instanceof a.default.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return a.default.ClaimPredicate.claimPredicateAnd([e,t])}},{key:"predicateOr",value:function(e,t){if(!(e instanceof a.default.ClaimPredicate))throw new Error("left Predicate should be an xdr.ClaimPredicate");if(!(t instanceof a.default.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return a.default.ClaimPredicate.claimPredicateOr([e,t])}},{key:"predicateNot",value:function(e){if(!(e instanceof a.default.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return a.default.ClaimPredicate.claimPredicateNot(e)}},{key:"predicateBeforeAbsoluteTime",value:function(e){return a.default.ClaimPredicate.claimPredicateBeforeAbsoluteTime(a.default.Int64.fromString(e))}},{key:"predicateBeforeRelativeTime",value:function(e){return a.default.ClaimPredicate.claimPredicateBeforeRelativeTime(a.default.Int64.fromString(e))}},{key:"fromXDR",value:function(e){var t=void 0;switch(e.switch()){case a.default.ClaimantType.claimantTypeV0():return t=e.v0(),new this(u.StrKey.encodeEd25519PublicKey(t.destination().ed25519()),t.predicate());default:throw new Error("Invalid claimant type: "+e.switch().name)}}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.claimClaimableBalance=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(e.balanceId);var t={};t.balanceId=i.default.ClaimableBalanceId.fromXDR(e.balanceId,"hex");var r=new i.default.ClaimClaimableBalanceOp(t),n={};return n.body=i.default.OperationBody.claimClaimableBalance(r),this.setSourceAccount(n,e),new i.default.Operation(n)},t.validateClaimableBalanceId=a;var n,o=r(0),i=(n=o)&&n.__esModule?n:{default:n};function a(e){if("string"!=typeof e||72!==e.length)throw new Error("must provide a valid claimable balance id")}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.FeeBumpTransaction=void 0;var n,o=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),a=(n=i)&&n.__esModule?n:{default:n},s=r(30),u=r(87),c=r(86),l=r(17);t.FeeBumpTransaction=function(t){function r(t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),"string"==typeof t){var o=e.from(t,"base64");t=a.default.TransactionEnvelope.fromXDR(o)}var i=t.switch();if(i!==a.default.EnvelopeType.envelopeTypeTxFeeBump())throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxFeeBump but received an "+i.name+".");var s=t.value(),c=s.tx(),f=c.fee().toString(),d=(s.signatures()||[]).slice(),h=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,c,d,f,n)),p=a.default.TransactionEnvelope.envelopeTypeTx(c.innerTx().v1());return h._feeSource=(0,l.encodeMuxedAccountToAddress)(h.tx.feeSource()),h._innerTransaction=new u.Transaction(p,n),h}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,t),o(r,[{key:"signatureBase",value:function(){var e=new a.default.TransactionSignaturePayloadTaggedTransaction.envelopeTypeTxFeeBump(this.tx);return new a.default.TransactionSignaturePayload({networkId:a.default.Hash.fromXDR((0,s.hash)(this.networkPassphrase)),taggedTransaction:e}).toXDR()}},{key:"toEnvelope",value:function(){var e=new a.default.FeeBumpTransactionEnvelope({tx:a.default.FeeBumpTransaction.fromXDR(this.tx.toXDR()),signatures:this.signatures.slice()});return new a.default.TransactionEnvelope.envelopeTypeTxFeeBump(e)}},{key:"innerTransaction",get:function(){return this._innerTransaction}},{key:"feeSource",get:function(){return this._feeSource}}]),r}(c.TransactionBase)}).call(this,r(1).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignerKey=void 0;var n,o=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(0),a=(n=i)&&n.__esModule?n:{default:n},s=r(8);t.SignerKey=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return o(e,null,[{key:"decodeAddress",value:function(e){var t={ed25519PublicKey:a.default.SignerKey.signerKeyTypeEd25519,preAuthTx:a.default.SignerKey.signerKeyTypePreAuthTx,sha256Hash:a.default.SignerKey.signerKeyTypeHashX,signedPayload:a.default.SignerKey.signerKeyTypeEd25519SignedPayload},r=s.StrKey.getVersionByteForPrefix(e),n=t[r];if(!n)throw new Error("invalid signer key type ("+r+")");var o=(0,s.decodeCheck)(r,e);switch(r){case"signedPayload":return n(new a.default.SignerKeyEd25519SignedPayload({ed25519:o.slice(0,32),payload:o.slice(36)}));case"ed25519PublicKey":case"preAuthTx":case"sha256Hash":default:return n(o)}}},{key:"encodeSignerKey",value:function(e){var t=void 0,r=void 0;switch(e.switch()){case a.default.SignerKeyType.signerKeyTypeEd25519():t="ed25519PublicKey",r=e.value();break;case a.default.SignerKeyType.signerKeyTypePreAuthTx():t="preAuthTx",r=e.value();break;case a.default.SignerKeyType.signerKeyTypeHashX():t="sha256Hash",r=e.value();break;case a.default.SignerKeyType.signerKeyTypeEd25519SignedPayload():t="signedPayload",r=e.ed25519SignedPayload().toXDR("raw");break;default:throw new Error("invalid SignerKey (type: "+e.switch()+")")}return(0,s.encodeCheck)(t,r)}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Account=void 0;var n=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=s(r(9)),i=s(r(23)),a=r(8);function s(e){return e&&e.__esModule?e:{default:e}}t.Account=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.StrKey.isValidMed25519PublicKey(t))throw new Error("accountId is an M-address; use MuxedAccount instead");if(!a.StrKey.isValidEd25519PublicKey(t))throw new Error("accountId is invalid");if(!(0,o.default)(r))throw new Error("sequence must be of type string");this._accountId=t,this.sequence=new i.default(r)}return n(e,[{key:"accountId",value:function(){return this._accountId}},{key:"sequenceNumber",value:function(){return this.sequence.toString()}},{key:"incrementSequenceNumber",value:function(){this.sequence=this.sequence.add(1)}}]),e}()},function(e,t,r){var n=r(72),o=r(43);e.exports=function(e,t,r){(void 0!==r&&!o(e[t],r)||void 0===r&&!(t in e))&&n(e,t,r)}},function(e,t){e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},function(e,t,r){(function(e,n){var o;/*! https://mths.be/punycode v1.4.0 by @mathias */!function(i){t&&t.nodeType,e&&e.nodeType;var a="object"==typeof n&&n;a.global!==a&&a.window!==a&&a.self;var s,u=2147483647,c=/^xn--/,l=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,p=String.fromCharCode;function y(e){throw new RangeError(d[e])}function v(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function m(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+v((e=e.replace(f,".")).split("."),t).join(".")}function g(e){for(var t,r,n=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function b(e){return v(e,(function(e){var t="";return e>65535&&(t+=p((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=p(e)})).join("")}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function _(e,t,r){var n=0;for(e=r?h(e/700):e>>1,e+=h(e/t);e>455;n+=36)e=h(e/35);return h(n+36*e/(e+38))}function S(e){var t,r,n,o,i,a,s,c,l,f,d,p=[],v=e.length,m=0,g=128,w=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&y("not-basic"),p.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<v;){for(i=m,a=1,s=36;o>=v&&y("invalid-input"),((c=(d=e.charCodeAt(o++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:36)>=36||c>h((u-m)/a))&&y("overflow"),m+=c*a,!(c<(l=s<=w?1:s>=w+26?26:s-w));s+=36)a>h(u/(f=36-l))&&y("overflow"),a*=f;w=_(m-i,t=p.length+1,0==i),h(m/t)>u-g&&y("overflow"),g+=h(m/t),m%=t,p.splice(m++,0,g)}return b(p)}function k(e){var t,r,n,o,i,a,s,c,l,f,d,v,m,b,S,k=[];for(v=(e=g(e)).length,t=128,r=0,i=72,a=0;a<v;++a)(d=e[a])<128&&k.push(p(d));for(n=o=k.length,o&&k.push("-");n<v;){for(s=u,a=0;a<v;++a)(d=e[a])>=t&&d<s&&(s=d);for(s-t>h((u-r)/(m=n+1))&&y("overflow"),r+=(s-t)*m,t=s,a=0;a<v;++a)if((d=e[a])<t&&++r>u&&y("overflow"),d==t){for(c=r,l=36;!(c<(f=l<=i?1:l>=i+26?26:l-i));l+=36)S=c-f,b=36-f,k.push(p(w(f+S%b,0))),c=h(S/b);k.push(p(w(c,0))),i=_(r,m,n==o),r=0,++n}++r,++t}return k.join("")}s={version:"1.3.2",ucs2:{decode:g,encode:b},decode:S,encode:k,toASCII:function(e){return m(e,(function(e){return l.test(e)?"xn--"+k(e):e}))},toUnicode:function(e){return m(e,(function(e){return c.test(e)?S(e.slice(4).toLowerCase()):e}))}},void 0===(o=function(){return s}.call(t,r,t,e))||(e.exports=o)}()}).call(this,r(41)(e),r(5))},function(e,t,r){var n,o;
/*!
* URI.js - Mutating URLs
* IPv6 Support
*
* Version: 1.19.11
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/!function(i,a){"use strict";e.exports?e.exports=a():void 0===(o="function"==typeof(n=a)?n.call(t,r,t,e):n)||(e.exports=o)}(0,(function(e){"use strict";var t=e&&e.IPv6;return{best:function(e){var t,r,n=e.toLowerCase().split(":"),o=n.length,i=8;for(""===n[0]&&""===n[1]&&""===n[2]?(n.shift(),n.shift()):""===n[0]&&""===n[1]?n.shift():""===n[o-1]&&""===n[o-2]&&n.pop(),-1!==n[(o=n.length)-1].indexOf(".")&&(i=7),t=0;t<o&&""!==n[t];t++);if(t<i)for(n.splice(t,1,"0000");n.length<i;)n.splice(t,0,"0000");for(var a=0;a<i;a++){r=n[a].split("");for(var s=0;s<3&&("0"===r[0]&&r.length>1);s++)r.splice(0,1);n[a]=r.join("")}var u=-1,c=0,l=0,f=-1,d=!1;for(a=0;a<i;a++)d?"0"===n[a]?l+=1:(d=!1,l>c&&(u=f,c=l)):"0"===n[a]&&(d=!0,f=a,l=1);l>c&&(u=f,c=l),c>1&&n.splice(u,c,""),o=n.length;var h="";for(""===n[0]&&(h=":"),a=0;a<o&&(h+=n[a],a!==o-1);a++)h+=":";return""===n[o-1]&&(h+=":"),h},noConflict:function(){return e.IPv6===this&&(e.IPv6=t),this}}}))},function(e,t,r){var n,o;
/*!
* URI.js - Mutating URLs
* Second Level Domain (SLD) Support
*
* Version: 1.19.11
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/!function(i,a){"use strict";e.exports?e.exports=a():void 0===(o="function"==typeof(n=a)?n.call(t,r,t,e):n)||(e.exports=o)}(0,(function(e){"use strict";var t=e&&e.SecondLevelDomains,r={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return!1;var o=r.list[e.slice(t+1)];return!!o&&o.indexOf(" "+e.slice(n+1,t)+" ")>=0},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;if(e.lastIndexOf(".",t-1)>=0)return!1;var n=r.list[e.slice(t+1)];return!!n&&n.indexOf(" "+e.slice(0,t)+" ")>=0},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return null;var o=r.list[e.slice(t+1)];return o?o.indexOf(" "+e.slice(n+1,t)+" ")<0?null:e.slice(n+1):null},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return r}))},function(e,t,r){"use strict";e.exports=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},function(e,t,r){"use strict";var n=r(10);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var a=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))})))})),i=a.join("&")}if(i){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},function(e,t,r){"use strict";e.exports=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},function(e,t,r){"use strict";var n=r(10),o=r(380),i=r(381),a=r(157),s=r(382),u=r(385),c=r(386),l=r(160),f=r(62),d=r(63);e.exports=function(e){return new Promise((function(t,r){var h,p=e.data,y=e.headers,v=e.responseType;function m(){e.cancelToken&&e.cancelToken.unsubscribe(h),e.signal&&e.signal.removeEventListener("abort",h)}n.isFormData(p)&&delete y["Content-Type"];var g=new XMLHttpRequest;if(e.auth){var b=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";y.Authorization="Basic "+btoa(b+":"+w)}var _=s(e.baseURL,e.url);function S(){if(g){var n="getAllResponseHeaders"in g?u(g.getAllResponseHeaders()):null,i={data:v&&"text"!==v&&"json"!==v?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:n,config:e,request:g};o((function(e){t(e),m()}),(function(e){r(e),m()}),i),g=null}}if(g.open(e.method.toUpperCase(),a(_,e.params,e.paramsSerializer),!0),g.timeout=e.timeout,"onloadend"in g?g.onloadend=S:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(S)},g.onabort=function(){g&&(r(l("Request aborted",e,"ECONNABORTED",g)),g=null)},g.onerror=function(){r(l("Network Error",e,null,g)),g=null},g.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||f.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(l(t,e,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",g)),g=null},n.isStandardBrowserEnv()){var k=(e.withCredentials||c(_))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;k&&(y[e.xsrfHeaderName]=k)}"setRequestHeader"in g&&n.forEach(y,(function(e,t){void 0===p&&"content-type"===t.toLowerCase()?delete y[t]:g.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(g.withCredentials=!!e.withCredentials),v&&"json"!==v&&(g.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&g.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&g.upload&&g.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(h=function(e){g&&(r(!e||e&&e.type?new d("canceled"):e),g.abort(),g=null)},e.cancelToken&&e.cancelToken.subscribe(h),e.signal&&(e.signal.aborted?h():e.signal.addEventListener("abort",h))),p||(p=null),g.send(p)}))}},function(e,t,r){"use strict";var n=r(158);e.exports=function(e,t,r,o,i){var a=new Error(e);return n(a,t,r,o,i)}},function(e,t,r){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,r){"use strict";var n=r(10);e.exports=function(e,t){t=t||{};var r={};function o(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function i(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:o(void 0,e[r]):o(e[r],t[r])}function a(e){if(!n.isUndefined(t[e]))return o(void 0,t[e])}function s(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:o(void 0,e[r]):o(void 0,t[r])}function u(r){return r in t?o(e[r],t[r]):r in e?o(void 0,e[r]):void 0}var c={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u};return n.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||i,o=t(e);n.isUndefined(o)&&t!==u||(r[e]=o)})),r}},function(e,t){e.exports={version:"0.25.0"}},function(e,t,r){(function(t,n){var o=r(391),i=r(92).parse,a=r(93),s=r(400),u=r(165),c=r(412),l=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","servername","checkServerIdentity"],f=[239,187,191];function d(e,r){var a=d.CONNECTING,c=r&&r.headers,y=!1;Object.defineProperty(this,"readyState",{get:function(){return a}}),Object.defineProperty(this,"url",{get:function(){return e}});var v,m=this;function g(t){a!==d.CLOSED&&(a=d.CONNECTING,E("error",new h("error",{message:t})),k&&(e=k,k=null,y=!1),setTimeout((function(){a!==d.CONNECTING||m.connectionInProgress||(m.connectionInProgress=!0,A())}),m.reconnectInterval))}m.reconnectInterval=1e3,m.connectionInProgress=!1;var b="";c&&c["Last-Event-ID"]&&(b=c["Last-Event-ID"],delete c["Last-Event-ID"]);var w=!1,_="",S="",k=null;function A(){var p=i(e),_="https:"===p.protocol;if(p.headers={"Cache-Control":"no-cache",Accept:"text/event-stream"},b&&(p.headers["Last-Event-ID"]=b),c){var S=y?function(e){var t={};for(var r in e)/^(cookie|authorization)$/i.test(r)||(t[r]=e[r]);return t}(c):c;for(var T in S){var O=S[T];O&&(p.headers[T]=O)}}if(p.rejectUnauthorized=!(r&&!r.rejectUnauthorized),r&&void 0!==r.createConnection&&(p.createConnection=r.createConnection),r&&r.proxy){var P=i(r.proxy);_="https:"===P.protocol,p.protocol=_?"https:":"http:",p.path=e,p.headers.Host=p.host,p.hostname=P.hostname,p.host=P.host,p.port=P.port}if(r&&r.https)for(var R in r.https)if(-1!==l.indexOf(R)){var C=r.https[R];void 0!==C&&(p[R]=C)}r&&void 0!==r.withCredentials&&(p.withCredentials=r.withCredentials),(v=(_?s:u).request(p,(function(r){if(m.connectionInProgress=!1,500===r.statusCode||502===r.statusCode||503===r.statusCode||504===r.statusCode)return E("error",new h("error",{status:r.statusCode,message:r.statusMessage})),void g();if(301===r.statusCode||302===r.statusCode||307===r.statusCode){var i=r.headers.location;if(!i)return void E("error",new h("error",{status:r.statusCode,message:r.statusMessage}));var s=o(e),u=o(i);return y=s!==u,307===r.statusCode&&(k=e),e=i,void t.nextTick(A)}if(200!==r.statusCode)return E("error",new h("error",{status:r.statusCode,message:r.statusMessage})),m.close();a=d.OPEN,r.on("close",(function(){r.removeAllListeners("close"),r.removeAllListeners("end"),g()})),r.on("end",(function(){r.removeAllListeners("close"),r.removeAllListeners("end"),g()})),E("open",new h("open"));var c,l=!0,p=0,v=-1;r.on("data",(function(e){c=c?n.concat([c,e]):e,l&&function(e){return f.every((function(t,r){return e[r]===t}))}(c)&&(c=c.slice(f.length)),l=!1;for(var t=0,r=c.length;t<r;){w&&(10===c[t]&&++t,w=!1);for(var o,i=-1,a=v,s=p;i<0&&s<r;++s)58===(o=c[s])?a<0&&(a=s-t):13===o?(w=!0,i=s-t):10===o&&(i=s-t);if(i<0){p=r-t,v=a;break}p=0,v=-1,x(c,t,a,i),t+=i+1}t===r?c=void 0:t>0&&(c=c.slice(t))}))}))).on("error",(function(e){m.connectionInProgress=!1,g(e.message)})),v.setNoDelay&&v.setNoDelay(!0),v.end()}function E(){m.listeners(arguments[0]).length>0&&m.emit.apply(m,arguments)}function x(t,r,n,i){if(0===i){if(_.length>0){var a=S||"message";E(a,new p(a,{data:_.slice(0,-1),lastEventId:b,origin:o(e)})),_=""}S=void 0}else if(n>0){var s=n<0,u=0,c=t.slice(r,r+(s?i:n)).toString();r+=u=s?i:32!==t[r+n+1]?n+1:n+2;var l=i-u,f=t.slice(r,r+l).toString();if("data"===c)_+=f+"\n";else if("event"===c)S=f;else if("id"===c)b=f;else if("retry"===c){var d=parseInt(f,10);Number.isNaN(d)||(m.reconnectInterval=d)}}}A(),this._close=function(){a!==d.CLOSED&&(a=d.CLOSED,v.abort&&v.abort(),v.xhr&&v.xhr.abort&&v.xhr.abort())}}function h(e,t){if(Object.defineProperty(this,"type",{writable:!1,value:e,enumerable:!0}),t)for(var r in t)t.hasOwnProperty(r)&&Object.defineProperty(this,r,{writable:!1,value:t[r],enumerable:!0})}function p(e,t){for(var r in Object.defineProperty(this,"type",{writable:!1,value:e,enumerable:!0}),t)t.hasOwnProperty(r)&&Object.defineProperty(this,r,{writable:!1,value:t[r],enumerable:!0})}e.exports=d,c.inherits(d,a.EventEmitter),d.prototype.constructor=d,["open","error","message"].forEach((function(e){Object.defineProperty(d.prototype,"on"+e,{get:function(){var t=this.listeners(e)[0];return t?t._listener?t._listener:t:void 0},set:function(t){this.removeAllListeners(e),this.addEventListener(e,t)}})})),Object.defineProperty(d,"CONNECTING",{enumerable:!0,value:0}),Object.defineProperty(d,"OPEN",{enumerable:!0,value:1}),Object.defineProperty(d,"CLOSED",{enumerable:!0,value:2}),d.prototype.CONNECTING=0,d.prototype.OPEN=1,d.prototype.CLOSED=2,d.prototype.close=function(){this._close()},d.prototype.addEventListener=function(e,t){"function"==typeof t&&(t._listener=t,this.on(e,t))},d.prototype.dispatchEvent=function(e){if(!e.type)throw new Error("UNSPECIFIED_EVENT_TYPE_ERR");this.emit(e.type,e.detail)},d.prototype.removeEventListener=function(e,t){"function"==typeof t&&(t._listener=void 0,this.removeListener(e,t))}}).call(this,r(13),r(1).Buffer)},function(e,t,r){(function(e){var n=r(401),o=r(167),i=r(410),a=r(411),s=r(92),u=t;u.request=function(t,r){t="string"==typeof t?s.parse(t):i(t);var o=-1===e.location.protocol.search(/^https?:$/)?"http:":"",a=t.protocol||o,u=t.hostname||t.host,c=t.port,l=t.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),t.url=(u?a+"//"+u:"")+(c?":"+c:"")+l,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var f=new n(t);return r&&f.on("response",r),f},u.get=function(e,t){var r=u.request(e,t);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=o.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=a,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,r(5))},function(e,t,r){(function(e){t.fetch=s(e.fetch)&&s(e.ReadableStream),t.writableStream=s(e.WritableStream),t.abortController=s(e.AbortController),t.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),t.blobConstructor=!0}catch(e){}var r;function n(){if(void 0!==r)return r;if(e.XMLHttpRequest){r=new e.XMLHttpRequest;try{r.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){r=null}}else r=null;return r}function o(e){var t=n();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}var i=void 0!==e.ArrayBuffer,a=i&&s(e.ArrayBuffer.prototype.slice);function s(e){return"function"==typeof e}t.arraybuffer=t.fetch||i&&o("arraybuffer"),t.msstream=!t.fetch&&a&&o("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&i&&o("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!n()&&s(n().overrideMimeType),t.vbArray=s(e.VBArray),r=null}).call(this,r(5))},function(e,t,r){(function(e,n,o){var i=r(166),a=r(11),s=r(168),u=t.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},c=t.IncomingMessage=function(t,r,a,u){var c=this;if(s.Readable.call(c),c._mode=a,c.headers={},c.rawHeaders=[],c.trailers={},c.rawTrailers=[],c.on("end",(function(){e.nextTick((function(){c.emit("close")}))})),"fetch"===a){if(c._fetchResponse=r,c.url=r.url,c.statusCode=r.status,c.statusMessage=r.statusText,r.headers.forEach((function(e,t){c.headers[t.toLowerCase()]=e,c.rawHeaders.push(t,e)})),i.writableStream){var l=new WritableStream({write:function(e){return new Promise((function(t,r){c._destroyed?r():c.push(new n(e))?t():c._resumeFetch=t}))},close:function(){o.clearTimeout(u),c._destroyed||c.push(null)},abort:function(e){c._destroyed||c.emit("error",e)}});try{return void r.body.pipeTo(l).catch((function(e){o.clearTimeout(u),c._destroyed||c.emit("error",e)}))}catch(e){}}var f=r.body.getReader();!function e(){f.read().then((function(t){if(!c._destroyed){if(t.done)return o.clearTimeout(u),void c.push(null);c.push(new n(t.value)),e()}})).catch((function(e){o.clearTimeout(u),c._destroyed||c.emit("error",e)}))}()}else{if(c._xhr=t,c._pos=0,c.url=t.responseURL,c.statusCode=t.status,c.statusMessage=t.statusText,t.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===c.headers[r]&&(c.headers[r]=[]),c.headers[r].push(t[2])):void 0!==c.headers[r]?c.headers[r]+=", "+t[2]:c.headers[r]=t[2],c.rawHeaders.push(t[1],t[2])}})),c._charset="x-user-defined",!i.overrideMimeType){var d=c.rawHeaders["mime-type"];if(d){var h=d.match(/;\s*charset=([^;])(;|$)/);h&&(c._charset=h[1].toLowerCase())}c._charset||(c._charset="utf-8")}}};a(c,s.Readable),c.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},c.prototype._onXHRProgress=function(){var e=this,t=e._xhr,r=null;switch(e._mode){case"text:vbarray":if(t.readyState!==u.DONE)break;try{r=new o.VBArray(t.responseBody).toArray()}catch(e){}if(null!==r){e.push(new n(r));break}case"text":try{r=t.responseText}catch(t){e._mode="text:vbarray";break}if(r.length>e._pos){var i=r.substr(e._pos);if("x-user-defined"===e._charset){for(var a=new n(i.length),s=0;s<i.length;s++)a[s]=255&i.charCodeAt(s);e.push(a)}else e.push(i,e._charset);e._pos=r.length}break;case"arraybuffer":if(t.readyState!==u.DONE||!t.response)break;r=t.response,e.push(new n(new Uint8Array(r)));break;case"moz-chunked-arraybuffer":if(r=t.response,t.readyState!==u.LOADING||!r)break;e.push(new n(new Uint8Array(r)));break;case"ms-stream":if(r=t.response,t.readyState!==u.LOADING)break;var c=new o.MSStreamReader;c.onprogress=function(){c.result.byteLength>e._pos&&(e.push(new n(new Uint8Array(c.result.slice(e._pos)))),e._pos=c.result.byteLength)},c.onload=function(){e.push(null)},c.readAsArrayBuffer(r)}e._xhr.readyState===u.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,r(13),r(1).Buffer,r(5))},function(e,t,r){(t=e.exports=r(169)).Stream=t,t.Readable=t,t.Writable=r(172),t.Duplex=r(38),t.Transform=r(174),t.PassThrough=r(408)},function(e,t,r){"use strict";(function(t,n){var o=r(64);e.exports=b;var i,a=r(99);b.ReadableState=g;r(93).EventEmitter;var s=function(e,t){return e.listeners(t).length},u=r(170),c=r(94).Buffer,l=t.Uint8Array||function(){};var f=Object.create(r(45));f.inherits=r(11);var d=r(402),h=void 0;h=d&&d.debuglog?d.debuglog("stream"):function(){};var p,y=r(403),v=r(171);f.inherits(b,u);var m=["error","close","destroy","pause","resume"];function g(e,t){e=e||{};var n=t instanceof(i=i||r(38));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var o=e.highWaterMark,a=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:n&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=r(173).StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function b(e){if(i=i||r(38),!(this instanceof b))return new b(e);this._readableState=new g(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function w(e,t,r,n,o){var i,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,k(e)}(e,a)):(o||(i=function(e,t){var r;n=t,c.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(a,t)),i?e.emit("error",i):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):_(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?_(e,a,t,!1):E(e,a)):_(e,a,t,!1))):n||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(a)}function _(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&k(e)),E(e,t)}Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),b.prototype.destroy=v.destroy,b.prototype._undestroy=v.undestroy,b.prototype._destroy=function(e,t){this.push(null),t(e)},b.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=c.from(e,t),t=""),r=!0),w(this,e,t,!1,r)},b.prototype.unshift=function(e){return w(this,e,null,!0,!1)},b.prototype.isPaused=function(){return!1===this._readableState.flowing},b.prototype.setEncoding=function(e){return p||(p=r(173).StringDecoder),this._readableState.decoder=new p(e),this._readableState.encoding=e,this};function S(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function k(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(A,e):A(e))}function A(e){h("emit readable"),e.emit("readable"),P(e)}function E(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(x,e,t))}function x(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(h("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function T(e){h("readable nexttick read 0"),e.read(0)}function O(e,t){t.reading||(h("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),P(e),t.flowing&&!t.reading&&e.read(0)}function P(e){var t=e._readableState;for(h("flow",t.flowing);t.flowing&&null!==e.read(););}function R(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,o=r.data;e-=o.length;for(;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(a===i.length?o+=i:o+=i.slice(0,e),0===(e-=a)){a===i.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=i.slice(a));break}++n}return t.length-=n,o}(e,t):function(e,t){var r=c.allocUnsafe(e),n=t.head,o=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(i.copy(r,r.length-e,0,a),0===(e-=a)){a===i.length?(++o,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(a));break}++o}return t.length-=o,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function C(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,o.nextTick(I,t,e))}function I(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function B(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}b.prototype.read=function(e){h("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?C(this):k(this),null;if(0===(e=S(e,t))&&t.ended)return 0===t.length&&C(this),null;var n,o=t.needReadable;return h("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&h("length less than watermark",o=!0),t.ended||t.reading?h("reading or ended",o=!1):o&&(h("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=S(r,t))),null===(n=e>0?R(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&C(this)),null!==n&&this.emit("data",n),n},b.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,h("pipe count=%d opts=%j",i.pipesCount,t);var u=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr?l:b;function c(t,n){h("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,h("cleanup"),e.removeListener("close",m),e.removeListener("finish",g),e.removeListener("drain",f),e.removeListener("error",v),e.removeListener("unpipe",c),r.removeListener("end",l),r.removeListener("end",b),r.removeListener("data",y),d=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function l(){h("onend"),e.end()}i.endEmitted?o.nextTick(u):r.once("end",u),e.on("unpipe",c);var f=function(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,P(e))}}(r);e.on("drain",f);var d=!1;var p=!1;function y(t){h("ondata"),p=!1,!1!==e.write(t)||p||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==B(i.pipes,e))&&!d&&(h("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function v(t){h("onerror",t),b(),e.removeListener("error",v),0===s(e,"error")&&e.emit("error",t)}function m(){e.removeListener("finish",g),b()}function g(){h("onfinish"),e.removeListener("close",m),b()}function b(){h("unpipe"),r.unpipe(e)}return r.on("data",y),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",v),e.once("close",m),e.once("finish",g),e.emit("pipe",r),i.flowing||(h("pipe resume"),r.resume()),e},b.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<o;i++)n[i].emit("unpipe",this,r);return this}var a=B(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},b.prototype.on=function(e,t){var r=u.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&k(this):o.nextTick(T,this))}return r},b.prototype.addListener=b.prototype.on,b.prototype.resume=function(){var e=this._readableState;return e.flowing||(h("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,o.nextTick(O,e,t))}(this,e)),this},b.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this},b.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var o in e.on("end",(function(){if(h("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){(h("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o)||(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var i=0;i<m.length;i++)e.on(m[i],this.emit.bind(this,m[i]));return this._read=function(t){h("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=R}).call(this,r(5),r(13))},function(e,t,r){e.exports=r(93).EventEmitter},function(e,t,r){"use strict";var n=r(64);function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return i||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(o,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n.nextTick(o,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,r){"use strict";(function(t,n,o){var i=r(64);function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var o=n.callback;t.pendingcb--,o(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=g;var s,u=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?n:i.nextTick;g.WritableState=m;var c=Object.create(r(45));c.inherits=r(11);var l={deprecate:r(407)},f=r(170),d=r(94).Buffer,h=o.Uint8Array||function(){};var p,y=r(171);function v(){}function m(e,t){s=s||r(38),e=e||{};var n=t instanceof s;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var o=e.highWaterMark,c=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:n&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===e.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,o){--t.pendingcb,r?(i.nextTick(o,n),i.nextTick(A,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(o(n),e._writableState.errorEmitted=!0,e.emit("error",n),A(e,t))}(e,r,n,t,o);else{var a=S(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||_(e,r),n?u(w,e,r,a,o):w(e,r,a,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function g(e){if(s=s||r(38),!(p.call(g,this)||this instanceof s))return new g(e);this._writableState=new m(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function b(e,t,r,n,o,i,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),A(e,t)}function _(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=new Array(n),i=t.corkedRequestsFree;i.entry=r;for(var s=0,u=!0;r;)o[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;o.allBuffers=u,b(e,t,!0,t.length,o,"",i.finish),t.pendingcb++,t.lastBufferedRequest=null,i.next?(t.corkedRequestsFree=i.next,i.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,f=r.callback;if(b(e,t,!1,t.objectMode?1:c.length,c,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),A(e,t)}))}function A(e,t){var r=S(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(k,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}c.inherits(g,f),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:l.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===g&&(e&&e._writableState instanceof m)}})):p=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,t,r){var n,o=this._writableState,a=!1,s=!o.objectMode&&(n=e,d.isBuffer(n)||n instanceof h);return s&&!d.isBuffer(e)&&(e=function(e){return d.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=v),o.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),i.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var o=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),i.nextTick(n,a),o=!1),o}(this,o,e,r))&&(o.pendingcb++,a=function(e,t,r,n,o,i){if(!r){var a=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,r));return t}(t,n,o);n!==a&&(r=!0,o="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var u=t.length<t.highWaterMark;u||(t.needDrain=!0);if(t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:o,isBuf:r,callback:i,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else b(e,t,!1,s,n,o,i);return u}(this,o,s,e,t,r)),a},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||_(this,e))},g.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,A(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=y.destroy,g.prototype._undestroy=y.undestroy,g.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(13),r(405).setImmediate,r(5))},function(e,t,r){"use strict";var n=r(21).Buffer,o=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.StringDecoder=i,i.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},i.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},i.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var o=a(t[n]);if(o>=0)return o>0&&(e.lastNeed=o-1),o;if(--n<r||-2===o)return 0;if((o=a(t[n]))>=0)return o>0&&(e.lastNeed=o-2),o;if(--n<r||-2===o)return 0;if((o=a(t[n]))>=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,r){"use strict";e.exports=a;var n=r(38),o=Object.create(r(45));function i(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);n.call(this,e),this._transformState={afterTransform:i.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",s)}function s(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){u(e,t,r)})):u(this,null,null)}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}o.inherits=r(11),o.inherits(a,n),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StellarTomlResolver=t.STELLAR_TOML_MAX_SIZE=void 0;var n=r(2),o=n.__importDefault(r(61)),i=n.__importDefault(r(432)),a=r(60);t.STELLAR_TOML_MAX_SIZE=102400;var s=o.default.CancelToken,u=function(){function e(){}return e.resolve=function(e,r){return void 0===r&&(r={}),n.__awaiter(this,void 0,void 0,(function(){var u,c,l;return n.__generator(this,(function(n){return u=void 0===r.allowHttp?a.Config.isAllowHttp():r.allowHttp,c=void 0===r.timeout?a.Config.getTimeout():r.timeout,l=u?"http":"https",[2,o.default.get(l+"://"+e+"/.well-known/stellar.toml",{maxContentLength:t.STELLAR_TOML_MAX_SIZE,cancelToken:c?new s((function(e){return setTimeout((function(){return e("timeout of "+c+"ms exceeded")}),c)})):void 0,timeout:c}).then((function(e){try{var t=i.default.parse(e.data);return Promise.resolve(t)}catch(e){return Promise.reject(new Error("stellar.toml is invalid - Parsing error on line "+e.line+", column "+e.column+": "+e.message))}})).catch((function(e){throw e.message.match(/^maxContentLength size/)?new Error("stellar.toml file exceeds allowed size of "+t.STELLAR_TOML_MAX_SIZE):e}))]}))}))},e}();t.StellarTomlResolver=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e.exports=r(177),e.exports.axios=r(61),e.exports.StellarBase=r(29)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0;var n=r(2);r(178).polyfill();var o=r(65).version;t.version=o,n.__exportStar(r(179),t),n.__exportStar(r(180),t),n.__exportStar(r(95),t),n.__exportStar(r(36),t);var i=r(60);Object.defineProperty(t,"Config",{enumerable:!0,get:function(){return i.Config}});var a=r(364);Object.defineProperty(t,"Server",{enumerable:!0,get:function(){return a.Server}});var s=r(431);Object.defineProperty(t,"FederationServer",{enumerable:!0,get:function(){return s.FederationServer}}),Object.defineProperty(t,"FEDERATION_RESPONSE_MAX_SIZE",{enumerable:!0,get:function(){return s.FEDERATION_RESPONSE_MAX_SIZE}});var u=r(175);Object.defineProperty(t,"StellarTomlResolver",{enumerable:!0,get:function(){return u.StellarTomlResolver}}),Object.defineProperty(t,"STELLAR_TOML_MAX_SIZE",{enumerable:!0,get:function(){return u.STELLAR_TOML_MAX_SIZE}});var c=r(91);Object.defineProperty(t,"HorizonAxiosClient",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"SERVER_TIME_MAP",{enumerable:!0,get:function(){return c.SERVER_TIME_MAP}}),Object.defineProperty(t,"getCurrentServerTime",{enumerable:!0,get:function(){return c.getCurrentServerTime}}),n.__exportStar(r(435),t),n.__exportStar(r(29),t),t.default=e.exports},function(e,t,r){(function(t,r){
/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
* @version v4.2.8+1e68dce6
*/var n;n=function(){"use strict";function e(e){return"function"==typeof e}var n=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=0,i=void 0,a=void 0,s=function(e,t){p[o]=e,p[o+1]=t,2===(o+=2)&&(a?a(y):w())},u="undefined"!=typeof window?window:void 0,c=u||{},l=c.MutationObserver||c.WebKitMutationObserver,f="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),d="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function h(){var e=setTimeout;return function(){return e(y,1)}}var p=new Array(1e3);function y(){for(var e=0;e<o;e+=2)(0,p[e])(p[e+1]),p[e]=void 0,p[e+1]=void 0;o=0}var v,m,g,b,w=void 0;function _(e,t){var r=this,n=new this.constructor(A);void 0===n[k]&&M(n);var o=r._state;if(o){var i=arguments[o-1];s((function(){return I(o,n,i,r._result)}))}else R(r,n,e,t);return n}function S(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(A);return x(t,e),t}f?w=function(){return t.nextTick(y)}:l?(m=0,g=new l(y),b=document.createTextNode(""),g.observe(b,{characterData:!0}),w=function(){b.data=m=++m%2}):d?((v=new MessageChannel).port1.onmessage=y,w=function(){return v.port2.postMessage(0)}):w=void 0===u?function(){try{var e=Function("return this")().require("vertx");return void 0!==(i=e.runOnLoop||e.runOnContext)?function(){i(y)}:h()}catch(e){return h()}}():h();var k=Math.random().toString(36).substring(2);function A(){}function E(t,r,n){r.constructor===t.constructor&&n===_&&r.constructor.resolve===S?function(e,t){1===t._state?O(e,t._result):2===t._state?P(e,t._result):R(t,void 0,(function(t){return x(e,t)}),(function(t){return P(e,t)}))}(t,r):void 0===n?O(t,r):e(n)?function(e,t,r){s((function(e){var n=!1,o=function(e,t,r,n){try{e.call(t,r,n)}catch(e){return e}}(r,t,(function(r){n||(n=!0,t!==r?x(e,r):O(e,r))}),(function(t){n||(n=!0,P(e,t))}),e._label);!n&&o&&(n=!0,P(e,o))}),e)}(t,r,n):O(t,r)}function x(e,t){if(e===t)P(e,new TypeError("You cannot resolve a promise with itself"));else if(o=typeof(n=t),null===n||"object"!==o&&"function"!==o)O(e,t);else{var r=void 0;try{r=t.then}catch(t){return void P(e,t)}E(e,t,r)}var n,o}function T(e){e._onerror&&e._onerror(e._result),C(e)}function O(e,t){void 0===e._state&&(e._result=t,e._state=1,0!==e._subscribers.length&&s(C,e))}function P(e,t){void 0===e._state&&(e._state=2,e._result=t,s(T,e))}function R(e,t,r,n){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+1]=r,o[i+2]=n,0===i&&e._state&&s(C,e)}function C(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var n=void 0,o=void 0,i=e._result,a=0;a<t.length;a+=3)n=t[a],o=t[a+r],n?I(r,n,o,i):o(i);e._subscribers.length=0}}function I(t,r,n,o){var i=e(n),a=void 0,s=void 0,u=!0;if(i){try{a=n(o)}catch(e){u=!1,s=e}if(r===a)return void P(r,new TypeError("A promises callback cannot return that same promise."))}else a=o;void 0!==r._state||(i&&u?x(r,a):!1===u?P(r,s):1===t?O(r,a):2===t&&P(r,a))}var B=0;function M(e){e[k]=B++,e._state=void 0,e._result=void 0,e._subscribers=[]}var j=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(A),this.promise[k]||M(this.promise),n(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?O(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&O(this.promise,this._result))):P(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;void 0===this._state&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var r=this._instanceConstructor,n=r.resolve;if(n===S){var o=void 0,i=void 0,a=!1;try{o=e.then}catch(e){a=!0,i=e}if(o===_&&void 0!==e._state)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(r===N){var s=new r(A);a?P(s,i):E(s,e,o),this._willSettleAt(s,t)}else this._willSettleAt(new r((function(t){return t(e)})),t)}else this._willSettleAt(n(e),t)},e.prototype._settledAt=function(e,t,r){var n=this.promise;void 0===n._state&&(this._remaining--,2===e?P(n,r):this._result[t]=r),0===this._remaining&&O(n,this._result)},e.prototype._willSettleAt=function(e,t){var r=this;R(e,void 0,(function(e){return r._settledAt(1,t,e)}),(function(e){return r._settledAt(2,t,e)}))},e}(),N=function(){function t(e){this[k]=B++,this._result=this._state=void 0,this._subscribers=[],A!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(e,t){try{t((function(t){x(e,t)}),(function(t){P(e,t)}))}catch(t){P(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(t){var r=this.constructor;return e(t)?this.then((function(e){return r.resolve(t()).then((function(){return e}))}),(function(e){return r.resolve(t()).then((function(){throw e}))})):this.then(t,t)},t}();return N.prototype.then=_,N.all=function(e){return new j(this,e).promise},N.race=function(e){var t=this;return n(e)?new t((function(r,n){for(var o=e.length,i=0;i<o;i++)t.resolve(e[i]).then(r,n)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},N.resolve=S,N.reject=function(e){var t=new this(A);return P(t,e),t},N._setScheduler=function(e){a=e},N._setAsap=function(e){s=e},N._asap=s,N.polyfill=function(){var e=void 0;if(void 0!==r)e=r;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=N},N.Promise=N,N},e.exports=n()}).call(this,r(13),r(5))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Horizon=void 0,function(e){!function(e){e.constantProduct="constant_product"}(e.LiquidityPoolType||(e.LiquidityPoolType={})),function(e){e.createAccount="create_account",e.payment="payment",e.pathPayment="path_payment_strict_receive",e.createPassiveOffer="create_passive_sell_offer",e.manageOffer="manage_sell_offer",e.setOptions="set_options",e.changeTrust="change_trust",e.allowTrust="allow_trust",e.accountMerge="account_merge",e.inflation="inflation",e.manageData="manage_data",e.bumpSequence="bump_sequence",e.manageBuyOffer="manage_buy_offer",e.pathPaymentStrictSend="path_payment_strict_send",e.createClaimableBalance="create_claimable_balance",e.claimClaimableBalance="claim_claimable_balance",e.beginSponsoringFutureReserves="begin_sponsoring_future_reserves",e.endSponsoringFutureReserves="end_sponsoring_future_reserves",e.revokeSponsorship="revoke_sponsorship",e.clawback="clawback",e.clawbackClaimableBalance="clawback_claimable_balance",e.setTrustLineFlags="set_trust_line_flags",e.liquidityPoolDeposit="liquidity_pool_deposit",e.liquidityPoolWithdraw="liquidity_pool_withdraw"}(e.OperationResponseType||(e.OperationResponseType={})),function(e){e[e.createAccount=0]="createAccount",e[e.payment=1]="payment",e[e.pathPayment=2]="pathPayment",e[e.createPassiveOffer=3]="createPassiveOffer",e[e.manageOffer=4]="manageOffer",e[e.setOptions=5]="setOptions",e[e.changeTrust=6]="changeTrust",e[e.allowTrust=7]="allowTrust",e[e.accountMerge=8]="accountMerge",e[e.inflation=9]="inflation",e[e.manageData=10]="manageData",e[e.bumpSequence=11]="bumpSequence",e[e.manageBuyOffer=12]="manageBuyOffer",e[e.pathPaymentStrictSend=13]="pathPaymentStrictSend",e[e.createClaimableBalance=14]="createClaimableBalance",e[e.claimClaimableBalance=15]="claimClaimableBalance",e[e.beginSponsoringFutureReserves=16]="beginSponsoringFutureReserves",e[e.endSponsoringFutureReserves=17]="endSponsoringFutureReserves",e[e.revokeSponsorship=18]="revokeSponsorship",e[e.clawback=19]="clawback",e[e.clawbackClaimableBalance=20]="clawbackClaimableBalance",e[e.setTrustLineFlags=21]="setTrustLineFlags",e[e.liquidityPoolDeposit=22]="liquidityPoolDeposit",e[e.liquidityPoolWithdraw=23]="liquidityPoolWithdraw"}(e.OperationResponseTypeI||(e.OperationResponseTypeI={})),function(e){e.TX_FAILED="tx_failed",e.TX_BAD_SEQ="tx_bad_seq",e.TX_BAD_AUTH="tx_bad_auth",e.TX_BAD_AUTH_EXTRA="tx_bad_auth_extra",e.TX_FEE_BUMP_INNER_SUCCESS="tx_fee_bump_inner_success",e.TX_FEE_BUMP_INNER_FAILED="tx_fee_bump_inner_failed",e.TX_NOT_SUPPORTED="tx_not_supported",e.TX_SUCCESS="tx_success",e.TX_TOO_EARLY="tx_too_early",e.TX_TOO_LATE="tx_too_late",e.TX_MISSING_OPERATION="tx_missing_operation",e.TX_INSUFFICIENT_BALANCE="tx_insufficient_balance",e.TX_NO_SOURCE_ACCOUNT="tx_no_source_account",e.TX_INSUFFICIENT_FEE="tx_insufficient_fee",e.TX_INTERNAL_ERROR="tx_internal_error"}(e.TransactionFailedResultCodes||(e.TransactionFailedResultCodes={}))}(t.Horizon||(t.Horizon={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServerApi=void 0,function(e){!function(e){e.all="all",e.liquidityPools="liquidity_pool",e.orderbook="orderbook"}(e.TradeType||(e.TradeType={}))}(t.ServerApi||(t.ServerApi={}))},function(e,t,r){var n=r(66),o=r(67),i=r(24);e.exports=function(e,t){return null==e?e:n(e,o(t),i)}},function(e,t){e.exports=function(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),s=a.length;s--;){var u=a[e?s:++o];if(!1===r(i[u],u,i))break}return t}}},function(e,t,r){var n=r(20),o=r(12);e.exports=function(e){return o(e)&&"[object Arguments]"==n(e)}},function(e,t,r){var n=r(39),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[s]=r:delete e[s]),o}},function(e,t){var r=Object.prototype.toString;e.exports=function(e){return r.call(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,r){var n=r(20),o=r(69),i=r(12),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[n(e)]}},function(e,t,r){var n=r(18),o=r(49),i=r(189),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=o(e),r=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&r.push(s);return r}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},function(e,t,r){(t=e.exports=function(e){e=e.toLowerCase();var r=t[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r}).sha=r(191),t.sha1=r(194),t.sha224=r(195),t.sha256=r(100),t.sha384=r(196),t.sha512=r(101)},function(e,t,r){var n=r(11),o=r(31),i=r(21).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 d=0;d<80;++d){var h=~~(d/20),p=0|((t=n)<<5|t>>>27)+l(h,o,i,s)+u+r[d]+a[h];u=s,s=i,i=c(o),o=n,n=p}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},function(e,t,r){"use strict";t.byteLength=function(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,n=c(e),a=n[0],s=n[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,s)),l=0,f=s>0?a-4:a;for(r=0;r<f;r+=4)t=o[e.charCodeAt(r)]<<18|o[e.charCodeAt(r+1)]<<12|o[e.charCodeAt(r+2)]<<6|o[e.charCodeAt(r+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===s&&(t=o[e.charCodeAt(r)]<<2|o[e.charCodeAt(r+1)]>>4,u[l++]=255&t);1===s&&(t=o[e.charCodeAt(r)]<<10|o[e.charCodeAt(r+1)]<<4|o[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=0,s=r-o;a<s;a+=16383)i.push(l(e,a,a+16383>s?s:a+16383));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)n[s]=a[s],o[a.charCodeAt(s)]=s;function c(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 l(e,t,r){for(var o,i,a=[],s=t;s<r;s+=3)o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
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,d=r?-1:1,h=e[t+f];for(f+=d,i=h&(1<<-l)-1,h>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=d,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=n;l>0;a=256*a+e[t+f],f+=d,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,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,p=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?d/u:d*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+=p,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[r+h]=255&a,h+=p,a/=256,c-=8);e[r+h-p]|=128*y}},function(e,t,r){var n=r(11),o=r(31),i=r(21).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,d=0;d<16;++d)r[d]=e.readInt32BE(4*d);for(;d<80;++d)r[d]=(t=r[d-3]^r[d-8]^r[d-14]^r[d-16])<<1|t>>>31;for(var h=0;h<80;++h){var p=~~(h/20),y=c(n)+f(p,o,i,s)+u+r[h]+a[p]|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},function(e,t,r){var n=r(11),o=r(100),i=r(31),a=r(21).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},function(e,t,r){var n=r(11),o=r(101),i=r(31),a=r(21).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},function(e,t){},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(22)).config((function(e){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("AccountId",e.lookup("PublicKey")),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("TimePoint",e.lookup("Uint64")),e.typedef("Duration",e.lookup("Uint64")),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}),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.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"]],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")}}),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.union("LedgerKey",{switchOn:e.lookup("LedgerEntryType"),switchName:"type",switches:[["account","account"],["trustline","trustLine"],["offer","offer"],["data","data"],["claimableBalance","claimableBalance"],["liquidityPool","liquidityPool"]],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")}}),e.enum("EnvelopeType",{envelopeTypeTxV0:0,envelopeTypeScp:1,envelopeTypeTx:2,envelopeTypeAuth:3,envelopeTypeScpvalue:4,envelopeTypeTxFeeBump:5,envelopeTypeOpId:6,envelopeTypePoolRevokeOpId:7}),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}),e.union("LedgerUpgrade",{switchOn:e.lookup("LedgerUpgradeType"),switchName:"type",switches:[["ledgerUpgradeVersion","newLedgerVersion"],["ledgerUpgradeBaseFee","newBaseFee"],["ledgerUpgradeMaxTxSetSize","newMaxTxSetSize"],["ledgerUpgradeBaseReserve","newBaseReserve"],["ledgerUpgradeFlags","newFlags"]],arms:{newLedgerVersion:e.lookup("Uint32"),newBaseFee:e.lookup("Uint32"),newMaxTxSetSize:e.lookup("Uint32"),newBaseReserve:e.lookup("Uint32"),newFlags:e.lookup("Uint32")}}),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.union("TransactionMeta",{switchOn:e.int(),switchName:"v",switches:[[0,"operations"],[1,"v1"],[2,"v2"]],arms:{operations:e.varArray(e.lookup("OperationMeta"),2147483647),v1:e.lookup("TransactionMetaV1"),v2:e.lookup("TransactionMetaV2")}}),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("LedgerCloseMetaV1",[["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)]]),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("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.struct("Auth",[["unused",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}),e.struct("DontHave",[["type",e.lookup("MessageType")],["reqHash",e.lookup("Uint256")]]),e.enum("SurveyMessageCommandType",{surveyTopology:0}),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("TopologyResponseBody",[["inboundPeers",e.lookup("PeerStatList")],["outboundPeers",e.lookup("PeerStatList")],["totalInboundPeerCount",e.lookup("Uint32")],["totalOutboundPeerCount",e.lookup("Uint32")]]),e.union("SurveyResponseBody",{switchOn:e.lookup("SurveyMessageCommandType"),switchName:"type",switches:[["surveyTopology","topologyResponseBody"]],arms:{topologyResponseBody:e.lookup("TopologyResponseBody")}}),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"]],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")}}),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.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}),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.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"]],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")}}),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.union("HashIdPreimage",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeOpId","operationId"],["envelopeTypePoolRevokeOpId","revokeId"]],arms:{operationId:e.lookup("HashIdPreimageOperationId"),revokeId:e.lookup("HashIdPreimageRevokeId")}}),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.const("MAX_OPS_PER_TX",100),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()]],arms:{}}),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("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"]],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")}}),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}),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()]],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()]],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.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.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)]])}));t.default=n},function(e,t,r){e.exports=r(201)},function(e,t,r){var n=r(33),o=r(109),i=r(24),a=o((function(e,t){n(t,i(t),e)}));e.exports=a},function(e,t,r){var n=r(50),o=r(203),i=r(18),a=r(108),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,d=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?d:s).test(a(e))}},function(e,t,r){var n,o=r(204),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!i&&i in e}},function(e,t,r){var n=r(14)["__core-js_shared__"];e.exports=n},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,r){var n=r(46),o=r(207),i=r(209);e.exports=function(e,t){return i(o(e,t,n),e+"")}},function(e,t,r){var n=r(208),o=Math.max;e.exports=function(e,t,r){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),u=Array(s);++a<s;)u[a]=i[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=i[a];return c[t]=r(u),n(e,this,c)}}},function(e,t){e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},function(e,t,r){var n=r(210),o=r(212)(n);e.exports=o},function(e,t,r){var n=r(211),o=r(107),i=r(46),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i;e.exports=a},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t){var r=Date.now;e.exports=function(e){var t=0,n=0;return function(){var o=r(),i=16-(o-n);if(n=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.Cursor=void 0;var n=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(51);var i=function(){function t(r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r instanceof e||(r="number"==typeof r?e.alloc(r):e.from(r)),this._setBuffer(r),this.rewind()}return n(t,[{key:"_setBuffer",value:function(e){this._buffer=e,this.length=e.length}},{key:"buffer",value:function(){return this._buffer}},{key:"tap",value:function(e){return e(this),this}},{key:"clone",value:function(e){var t=new this.constructor(this.buffer());return t.seek(0===arguments.length?this.tell():e),t}},{key:"tell",value:function(){return this._index}},{key:"seek",value:function(e,t){return 1===arguments.length&&(t=e,e="="),"+"===e?this._index+=t:"-"===e?this._index-=t:this._index=t,this}},{key:"rewind",value:function(){return this.seek(0)}},{key:"eof",value:function(){return this.tell()===this.buffer().length}},{key:"write",value:function(e,t,r){return this.seek("+",this.buffer().write(e,this.tell(),t,r))}},{key:"fill",value:function(e,t){return 1===arguments.length&&(t=this.buffer().length-this.tell()),this.buffer().fill(e,this.tell(),this.tell()+t),this.seek("+",t),this}},{key:"slice",value:function(e){0===arguments.length&&(e=this.length-this.tell());var t=new this.constructor(this.buffer().slice(this.tell(),this.tell()+e));return this.seek("+",e),t}},{key:"copyFrom",value:function(t){var r=t instanceof e?t:t.buffer();return r.copy(this.buffer(),this.tell(),0,r.length),this.seek("+",r.length),this}},{key:"concat",value:function(r){r.forEach((function(e,n){e instanceof t&&(r[n]=e.buffer())})),r.unshift(this.buffer());var n=e.concat(r);return this._setBuffer(n),this}},{key:"toString",value:function(e,t){0===arguments.length?(e="utf8",t=this.buffer().length-this.tell()):1===arguments.length&&(t=this.buffer().length-this.tell());var r=this.buffer().toString(e,this.tell(),this.tell()+t);return this.seek("+",t),r}},{key:"writeBufferPadded",value:function(r){var n=(0,o.calculatePadding)(r.length),i=e.alloc(n);return this.copyFrom(new t(r)).copyFrom(new t(i))}}]),t}();[[1,["readInt8","readUInt8"]],[2,["readInt16BE","readInt16LE","readUInt16BE","readUInt16LE"]],[4,["readInt32BE","readInt32LE","readUInt32BE","readUInt32LE","readFloatBE","readFloatLE"]],[8,["readDoubleBE","readDoubleLE"]]].forEach((function(e){e[1].forEach((function(t){i.prototype[t]=function(){var r=this.buffer()[t](this.tell());return this.seek("+",e[0]),r}}))})),[[1,["writeInt8","writeUInt8"]],[2,["writeInt16BE","writeInt16LE","writeUInt16BE","writeUInt16LE"]],[4,["writeInt32BE","writeInt32LE","writeUInt32BE","writeUInt32LE","writeFloatBE","writeFloatLE"]],[8,["writeDoubleBE","writeDoubleLE"]]].forEach((function(e){e[1].forEach((function(t){i.prototype[t]=function(r){return this.buffer()[t](r,this.tell()),this.seek("+",e[0]),this}}))})),t.Cursor=i}).call(this,r(1).Buffer)},function(e,t){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}},function(e,t,r){var n=r(74);e.exports=function(e,t){var r=!0;return n(e,(function(e,n,o){return r=!!t(e,n,o)})),r}},function(e,t,r){var n=r(66),o=r(34);e.exports=function(e,t){return e&&n(e,t,o)}},function(e,t,r){var n=r(112)(Object.keys,Object);e.exports=n},function(e,t,r){var n=r(25);e.exports=function(e,t){return function(r,o){if(null==r)return r;if(!n(r))return e(r,o);for(var i=r.length,a=t?i:-1,s=Object(r);(t?a--:++a<i)&&!1!==o(s[a],a,s););return r}}},function(e,t,r){var n=r(220),o=r(258),i=r(122);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}},function(e,t,r){var n=r(52),o=r(114);e.exports=function(e,t,r,i){var a=r.length,s=a,u=!i;if(null==e)return!s;for(e=Object(e);a--;){var c=r[a];if(u&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a<s;){var l=(c=r[a])[0],f=e[l],d=c[1];if(u&&c[2]){if(void 0===f&&!(l in e))return!1}else{var h=new n;if(i)var p=i(f,d,l,e,t,h);if(!(void 0===p?o(d,f,3,i,h):p))return!1}}return!0}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,r){var n=r(54),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():o.call(t,r,1),--this.size,!0)}},function(e,t,r){var n=r(54);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},function(e,t,r){var n=r(54);e.exports=function(e){return n(this.__data__,e)>-1}},function(e,t,r){var n=r(54);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},function(e,t,r){var n=r(53);e.exports=function(){this.__data__=new n,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,r){var n=r(53),o=r(75),i=r(76);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new i(a)}return r.set(e,t),this.size=r.size,this}},function(e,t,r){var n=r(232),o=r(53),i=r(75);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},function(e,t,r){var n=r(233),o=r(234),i=r(235),a=r(236),s=r(237);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=s,e.exports=u},function(e,t,r){var n=r(55);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,r){var n=r(55),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}},function(e,t,r){var n=r(55),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},function(e,t,r){var n=r(55);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,r){var n=r(56);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,r){var n=r(56);e.exports=function(e){return n(this,e).get(e)}},function(e,t,r){var n=r(56);e.exports=function(e){return n(this,e).has(e)}},function(e,t,r){var n=r(56);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},function(e,t,r){var n=r(52),o=r(115),i=r(249),a=r(252),s=r(44),u=r(3),c=r(40),l=r(48),f="[object Object]",d=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,h,p,y){var v=u(e),m=u(t),g=v?"[object Array]":s(e),b=m?"[object Array]":s(t),w=(g="[object Arguments]"==g?f:g)==f,_=(b="[object Arguments]"==b?f:b)==f,S=g==b;if(S&&c(e)){if(!c(t))return!1;v=!0,w=!1}if(S&&!w)return y||(y=new n),v||l(e)?o(e,t,r,h,p,y):i(e,t,g,r,h,p,y);if(!(1&r)){var k=w&&d.call(e,"__wrapped__"),A=_&&d.call(t,"__wrapped__");if(k||A){var E=k?e.value():e,x=A?t.value():t;return y||(y=new n),p(E,x,r,h,y)}}return!!S&&(y||(y=new n),a(e,t,r,h,p,y))}},function(e,t,r){var n=r(76),o=r(245),i=r(246);function a(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,r){var n=r(39),o=r(116),i=r(43),a=r(115),s=r(250),u=r(251),c=n?n.prototype:void 0,l=c?c.valueOf:void 0;e.exports=function(e,t,r,n,c,f,d){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var h=s;case"[object Set]":var p=1&n;if(h||(h=u),e.size!=t.size&&!p)return!1;var y=d.get(e);if(y)return y==t;n|=2,d.set(e,t);var v=a(h(e),h(t),n,c,f,d);return d.delete(e),v;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},function(e,t){e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}},function(e,t){e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}},function(e,t,r){var n=r(117),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,i,a,s){var u=1&r,c=n(e),l=c.length;if(l!=n(t).length&&!u)return!1;for(var f=l;f--;){var d=c[f];if(!(u?d in t:o.call(t,d)))return!1}var h=s.get(e),p=s.get(t);if(h&&p)return h==t&&p==e;var y=!0;s.set(e,t),s.set(t,e);for(var v=u;++f<l;){var m=e[d=c[f]],g=t[d];if(i)var b=u?i(g,m,d,t,e,s):i(m,g,d,e,t,s);if(!(void 0===b?m===g||a(m,g,r,i,s):b)){y=!1;break}v||(v="constructor"==d)}if(y&&!v){var w=e.constructor,_=t.constructor;w==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof _&&_ instanceof _||(y=!1)}return s.delete(e),s.delete(t),y}},function(e,t){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}},function(e,t,r){var n=r(26)(r(14),"DataView");e.exports=n},function(e,t,r){var n=r(26)(r(14),"Promise");e.exports=n},function(e,t,r){var n=r(26)(r(14),"Set");e.exports=n},function(e,t,r){var n=r(26)(r(14),"WeakMap");e.exports=n},function(e,t,r){var n=r(121),o=r(34);e.exports=function(e){for(var t=o(e),r=t.length;r--;){var i=t[r],a=e[i];t[r]=[i,a,n(a)]}return t}},function(e,t,r){var n=r(114),o=r(260),i=r(264),a=r(78),s=r(121),u=r(122),c=r(58);e.exports=function(e,t){return a(e)&&s(t)?u(c(e),t):function(r){var a=o(r,e);return void 0===a&&a===t?i(r,e):n(t,a,3)}}},function(e,t,r){var n=r(123);e.exports=function(e,t,r){var o=null==e?void 0:n(e,t);return void 0===o?r:o}},function(e,t,r){var n=r(262),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,r,n,o){t.push(n?o.replace(i,"$1"):r||e)})),t}));e.exports=a},function(e,t,r){var n=r(263);e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},function(e,t,r){var n=r(76);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(o.Cache||n),r}o.Cache=n,e.exports=o},function(e,t,r){var n=r(265),o=r(266);e.exports=function(e,t){return null!=e&&o(e,t,n)}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,r){var n=r(124),o=r(47),i=r(3),a=r(68),s=r(69),u=r(58);e.exports=function(e,t,r){for(var c=-1,l=(t=n(t,e)).length,f=!1;++c<l;){var d=u(t[c]);if(!(f=null!=e&&r(e,d)))break;e=e[d]}return f||++c!=l?f:!!(l=null==e?0:e.length)&&s(l)&&a(d,l)&&(i(e)||o(e))}},function(e,t,r){var n=r(125),o=r(268),i=r(78),a=r(58);e.exports=function(e){return i(e)?n(a(e)):o(e)}},function(e,t,r){var n=r(123);e.exports=function(e){return function(t){return n(t,e)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hyper=void 0;var n=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(n):void 0},i=s(r(126)),a=s(r(4));function s(e){return e&&e.__esModule?e:{default:e}}var u=t.Hyper=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,!1))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,null,[{key:"read",value:function(e){var t=e.readInt32BE(),r=e.readInt32BE();return this.fromBits(r,t)}},{key:"write",value:function(e,t){if(!(e instanceof this))throw new Error("XDR Write Error: "+e+" is not a Hyper");t.writeInt32BE(e.high),t.writeInt32BE(e.low)}},{key:"fromString",value:function(e){if(!/^-?\d+$/.test(e))throw new Error("Invalid hyper string: "+e);var r=o(t.__proto__||Object.getPrototypeOf(t),"fromString",this).call(this,e,!1);return new this(r.low,r.high)}},{key:"fromBits",value:function(e,r){var n=o(t.__proto__||Object.getPrototypeOf(t),"fromBits",this).call(this,e,r,!1);return new this(n.low,n.high)}},{key:"isValid",value:function(e){return e instanceof this}}]),t}(i.default);(0,a.default)(u),u.MAX_VALUE=new u(i.default.MAX_VALUE.low,i.default.MAX_VALUE.high),u.MIN_VALUE=new u(i.default.MIN_VALUE.low,i.default.MIN_VALUE.high)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsignedHyper=void 0;var n=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(n):void 0},i=s(r(126)),a=s(r(4));function s(e){return e&&e.__esModule?e:{default:e}}var u=t.UnsignedHyper=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,!0))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,null,[{key:"read",value:function(e){var t=e.readInt32BE(),r=e.readInt32BE();return this.fromBits(r,t)}},{key:"write",value:function(e,t){if(!(e instanceof this))throw new Error("XDR Write Error: "+e+" is not an UnsignedHyper");t.writeInt32BE(e.high),t.writeInt32BE(e.low)}},{key:"fromString",value:function(e){if(!/^\d+$/.test(e))throw new Error("Invalid hyper string: "+e);var r=o(t.__proto__||Object.getPrototypeOf(t),"fromString",this).call(this,e,!0);return new this(r.low,r.high)}},{key:"fromBits",value:function(e,r){var n=o(t.__proto__||Object.getPrototypeOf(t),"fromBits",this).call(this,e,r,!0);return new this(n.low,n.high)}},{key:"isValid",value:function(e){return e instanceof this}}]),t}(i.default);(0,a.default)(u),u.MAX_VALUE=new u(i.default.MAX_UNSIGNED_VALUE.low,i.default.MAX_UNSIGNED_VALUE.high),u.MIN_VALUE=new u(i.default.MIN_VALUE.low,i.default.MIN_VALUE.high)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Float=void 0;var n=i(r(42)),o=i(r(4));function i(e){return e&&e.__esModule?e:{default:e}}var a=t.Float={read:function(e){return e.readFloatBE()},write:function(e,t){if(!(0,n.default)(e))throw new Error("XDR Write Error: not a number");t.writeFloatBE(e)},isValid:function(e){return(0,n.default)(e)}};(0,o.default)(a)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Double=void 0;var n=i(r(42)),o=i(r(4));function i(e){return e&&e.__esModule?e:{default:e}}var a=t.Double={read:function(e){return e.readDoubleBE()},write:function(e,t){if(!(0,n.default)(e))throw new Error("XDR Write Error: not a number");t.writeDoubleBE(e)},isValid:function(e){return(0,n.default)(e)}};(0,o.default)(a)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Quadruple=void 0;var n,o=r(4),i=(n=o)&&n.__esModule?n:{default:n};var a=t.Quadruple={read:function(){throw new Error("XDR Read Error: quadruple not supported")},write:function(){throw new Error("XDR Write Error: quadruple not supported")},isValid:function(){return!1}};(0,i.default)(a)},function(e,t,r){var n=r(20),o=r(12);e.exports=function(e){return!0===e||!1===e||o(e)&&"[object Boolean]"==n(e)}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.String=void 0;var n=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=l(r(9)),i=l(r(3)),a=r(32),s=r(59),u=r(51),c=l(r(4));function l(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var d=t.String=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.UnsignedInt.MAX_VALUE;f(this,t),this._maxLength=e}return n(t,[{key:"read",value:function(e){var t=a.Int.read(e);if(t>this._maxLength)throw new Error("XDR Read Error: Saw "+t+" length String,max allowed is "+this._maxLength);var r=(0,u.calculatePadding)(t),n=e.slice(t);return(0,u.slicePadding)(e,r),n.buffer()}},{key:"readString",value:function(e){return this.read(e).toString("utf8")}},{key:"write",value:function(t,r){if(t.length>this._maxLength)throw new Error("XDR Write Error: Got "+t.length+" bytes,max allows is "+this._maxLength);var n=void 0;n=(0,o.default)(t)?e.from(t,"utf8"):e.from(t),a.Int.write(n.length,r),r.writeBufferPadded(n)}},{key:"isValid",value:function(t){var r=void 0;if((0,o.default)(t))r=e.from(t,"utf8");else{if(!(0,i.default)(t)&&!e.isBuffer(t))return!1;r=e.from(t)}return r.length<=this._maxLength}}]),t}();(0,c.default)(d.prototype)}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.Opaque=void 0;var n,o=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(51),a=r(4),s=(n=a)&&n.__esModule?n:{default:n};var u=t.Opaque=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this._length=e,this._padding=(0,i.calculatePadding)(e)}return o(t,[{key:"read",value:function(e){var t=e.slice(this._length);return(0,i.slicePadding)(e,this._padding),t.buffer()}},{key:"write",value:function(e,t){if(e.length!==this._length)throw new Error("XDR Write Error: Got "+e.length+" bytes, expected "+this._length);t.writeBufferPadded(e)}},{key:"isValid",value:function(t){return e.isBuffer(t)&&t.length===this._length}}]),t}();(0,s.default)(u.prototype)}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.VarOpaque=void 0;var n,o=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(32),a=r(59),s=r(51),u=r(4),c=(n=u)&&n.__esModule?n:{default:n};function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var f=t.VarOpaque=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.UnsignedInt.MAX_VALUE;l(this,t),this._maxLength=e}return o(t,[{key:"read",value:function(e){var t=i.Int.read(e);if(t>this._maxLength)throw new Error("XDR Read Error: Saw "+t+" length VarOpaque,max allowed is "+this._maxLength);var r=(0,s.calculatePadding)(t),n=e.slice(t);return(0,s.slicePadding)(e,r),n.buffer()}},{key:"write",value:function(e,t){if(e.length>this._maxLength)throw new Error("XDR Write Error: Got "+e.length+" bytes,max allows is "+this._maxLength);i.Int.write(e.length,t),t.writeBufferPadded(e)}},{key:"isValid",value:function(t){return e.isBuffer(t)&&t.length<=this._maxLength}}]),t}();(0,c.default)(f.prototype)}).call(this,r(1).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Array=void 0;var n=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=c(r(73)),i=c(r(35)),a=c(r(129)),s=c(r(3)),u=c(r(4));function c(e){return e&&e.__esModule?e:{default:e}}var l=t.Array=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._childType=t,this._length=r}return n(e,[{key:"read",value:function(e){var t=this;return(0,a.default)(this._length,(function(){return t._childType.read(e)}))}},{key:"write",value:function(e,t){var r=this;if(!(0,s.default)(e))throw new Error("XDR Write Error: value is not array");if(e.length!==this._length)throw new Error("XDR Write Error: Got array of size "+e.length+",expected "+this._length);(0,i.default)(e,(function(e){return r._childType.write(e,t)}))}},{key:"isValid",value:function(e){var t=this;return!!(0,s.default)(e)&&(e.length===this._length&&(0,o.default)(e,(function(e){return t._childType.isValid(e)})))}}]),e}();(0,u.default)(l.prototype)},function(e,t,r){var n=r(128),o=r(74),i=r(67),a=r(3);e.exports=function(e,t){return(a(e)?n:o)(e,i(t))}},function(e,t,r){var n=r(281);e.exports=function(e){return e?(e=n(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},function(e,t,r){var n=r(282),o=r(18),i=r(57),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=s.test(e);return r||u.test(e)?c(e.slice(2),r?2:8):a.test(e)?NaN:+e}},function(e,t,r){var n=r(131),o=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(o,""):e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VarArray=void 0;var n=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=f(r(73)),i=f(r(35)),a=f(r(129)),s=f(r(3)),u=r(59),c=r(32),l=f(r(4));function f(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var h=t.VarArray=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.UnsignedInt.MAX_VALUE;d(this,e),this._childType=t,this._maxLength=r}return n(e,[{key:"read",value:function(e){var t=this,r=c.Int.read(e);if(r>this._maxLength)throw new Error("XDR Read Error: Saw "+r+" length VarArray,max allowed is "+this._maxLength);return(0,a.default)(r,(function(){return t._childType.read(e)}))}},{key:"write",value:function(e,t){var r=this;if(!(0,s.default)(e))throw new Error("XDR Write Error: value is not array");if(e.length>this._maxLength)throw new Error("XDR Write Error: Got array of size "+e.length+",max allowed is "+this._maxLength);c.Int.write(e.length,t),(0,i.default)(e,(function(e){return r._childType.write(e,t)}))}},{key:"isValid",value:function(e){var t=this;return!!(0,s.default)(e)&&(!(e.length>this._maxLength)&&(0,o.default)(e,(function(e){return t._childType.isValid(e)})))}}]),e}();(0,l.default)(h.prototype)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Option=void 0;var n=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=u(r(132)),i=u(r(7)),a=r(127),s=u(r(4));function u(e){return e&&e.__esModule?e:{default:e}}var c=t.Option=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._childType=t}return n(e,[{key:"read",value:function(e){if(a.Bool.read(e))return this._childType.read(e)}},{key:"write",value:function(e,t){var r=!((0,o.default)(e)||(0,i.default)(e));a.Bool.write(r,t),r&&this._childType.write(e,t)}},{key:"isValid",value:function(e){return!!(0,o.default)(e)||(!!(0,i.default)(e)||this._childType.isValid(e))}}]),e}();(0,s.default)(c.prototype)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Enum=void 0;var n=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=u(r(35)),i=u(r(286)),a=r(32),s=u(r(4));function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var f=t.Enum=function(){function e(t,r){l(this,e),this.name=t,this.value=r}return n(e,null,[{key:"read",value:function(e){var t=a.Int.read(e);if(!this._byValue.has(t))throw new Error("XDR Read Error: Unknown "+this.enumName+" member for value "+t);return this._byValue.get(t)}},{key:"write",value:function(e,t){if(!(e instanceof this))throw new Error("XDR Write Error: Unknown "+e+" is not a "+this.enumName);a.Int.write(e.value,t)}},{key:"isValid",value:function(e){return e instanceof this}},{key:"members",value:function(){return this._members}},{key:"values",value:function(){return(0,i.default)(this._members)}},{key:"fromName",value:function(e){var t=this._members[e];if(!t)throw new Error(e+" is not a member of "+this.enumName);return t}},{key:"fromValue",value:function(e){var t=this._byValue.get(e);if(!t)throw new Error(e+" is not a value of any member of "+this.enumName);return t}},{key:"create",value:function(t,r,n){var i=function(e){function t(){return l(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(e);return i.enumName=r,t.results[r]=i,i._members={},i._byValue=new Map,(0,o.default)(n,(function(e,t){var r=new i(t,e);i._members[t]=r,i._byValue.set(e,r),i[t]=function(){return r}})),i}}]),e}();(0,s.default)(f)},function(e,t,r){var n=r(287),o=r(34);e.exports=function(e){return null==e?[]:n(e,o(e))}},function(e,t,r){var n=r(81);e.exports=function(e,t){return n(t,(function(t){return e[t]}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Struct=void 0;var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=f(r(35)),a=f(r(134)),s=f(r(7)),u=f(r(290)),c=r(82),l=f(r(4));function f(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p=t.Struct=function(){function e(t){h(this,e),this._attributes=t||{}}return o(e,null,[{key:"read",value:function(e){var t=(0,a.default)(this._fields,(function(t){var r=n(t,2);return[r[0],r[1].read(e)]}));return new this((0,u.default)(t))}},{key:"write",value:function(e,t){if(!(e instanceof this))throw new Error("XDR Write Error: "+e+" is not a "+this.structName);(0,i.default)(this._fields,(function(r){var o=n(r,2),i=o[0],a=o[1],s=e._attributes[i];a.write(s,t)}))}},{key:"isValid",value:function(e){return e instanceof this}},{key:"create",value:function(t,r,o){var a=function(e){function t(){return h(this,t),d(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(e);return a.structName=r,t.results[r]=a,a._fields=o.map((function(e){var r=n(e,2),o=r[0],i=r[1];return i instanceof c.Reference&&(i=i.resolve(t)),[o,i]})),(0,i.default)(a._fields,(function(e){var t=n(e,1)[0];a.prototype[t]=function(e){return function(t){return(0,s.default)(t)||(this._attributes[e]=t),this._attributes[e]}}(t)})),a}}]),e}();(0,l.default)(p)},function(e,t,r){var n=r(74),o=r(25);e.exports=function(e,t){var r=-1,i=o(e)?Array(e.length):[];return n(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}},function(e,t){e.exports=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var o=e[t];n[o[0]]=o[1]}return n}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Union=void 0;var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=f(r(35)),a=f(r(7)),s=f(r(9)),u=r(133),c=r(82),l=f(r(4));function f(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p=t.Union=function(){function e(t,r){h(this,e),this.set(t,r)}return o(e,[{key:"set",value:function(e,t){(0,s.default)(e)&&(e=this.constructor._switchOn.fromName(e)),this._switch=e,this._arm=this.constructor.armForSwitch(this._switch),this._armType=this.constructor.armTypeForArm(this._arm),this._value=t}},{key:"get",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._arm;if(this._arm!==u.Void&&this._arm!==e)throw new Error(e+" not set");return this._value}},{key:"switch",value:function(){return this._switch}},{key:"arm",value:function(){return this._arm}},{key:"armType",value:function(){return this._armType}},{key:"value",value:function(){return this._value}}],[{key:"armForSwitch",value:function(e){if(this._switches.has(e))return this._switches.get(e);if(this._defaultArm)return this._defaultArm;throw new Error("Bad union switch: "+e)}},{key:"armTypeForArm",value:function(e){return e===u.Void?u.Void:this._arms[e]}},{key:"read",value:function(e){var t=this._switchOn.read(e),r=this.armForSwitch(t),n=this.armTypeForArm(r);return new this(t,(0,a.default)(n)?r.read(e):n.read(e))}},{key:"write",value:function(e,t){if(!(e instanceof this))throw new Error("XDR Write Error: "+e+" is not a "+this.unionName);this._switchOn.write(e.switch(),t),e.armType().write(e.value(),t)}},{key:"isValid",value:function(e){return e instanceof this}},{key:"create",value:function(t,r,o){var l=function(e){function t(){return h(this,t),d(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(e);l.unionName=r,t.results[r]=l,o.switchOn instanceof c.Reference?l._switchOn=o.switchOn.resolve(t):l._switchOn=o.switchOn,l._switches=new Map,l._arms={},(0,i.default)(o.arms,(function(e,r){e instanceof c.Reference&&(e=e.resolve(t)),l._arms[r]=e}));var f=o.defaultArm;return f instanceof c.Reference&&(f=f.resolve(t)),l._defaultArm=f,(0,i.default)(o.switches,(function(e){var t=n(e,2),r=t[0],o=t[1];(0,s.default)(r)&&(r=l._switchOn.fromName(r)),l._switches.set(r,o)})),(0,a.default)(l._switchOn.values)||(0,i.default)(l._switchOn.values(),(function(e){l[e.name]=function(t){return new l(e,t)},l.prototype[e.name]=function(t){return this.set(e,t)}})),(0,i.default)(l._arms,(function(e,t){e!==u.Void&&(l.prototype[t]=function(){return this.get(t)})})),l}}]),e}();(0,l.default)(p)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(82);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})})),t.config=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){var r=new b(t);e(r),r.resolve()}return t};var i=u(r(7)),a=u(r(35)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(r(105));function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var d=function(e){function t(e){c(this,t);var r=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.name=e,r}return f(t,e),n(t,[{key:"resolve",value:function(e){return e.definitions[this.name].resolve(e)}}]),t}(o.Reference),h=function(e){function t(e,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];c(this,t);var o=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return o.childReference=e,o.length=r,o.variable=n,o}return f(t,e),n(t,[{key:"resolve",value:function(e){var t=this.childReference,r=this.length;return t instanceof o.Reference&&(t=t.resolve(e)),r instanceof o.Reference&&(r=r.resolve(e)),this.variable?new s.VarArray(t,r):new s.Array(t,r)}}]),t}(o.Reference),p=function(e){function t(e){c(this,t);var r=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.childReference=e,r.name=e.name,r}return f(t,e),n(t,[{key:"resolve",value:function(e){var t=this.childReference;return t instanceof o.Reference&&(t=t.resolve(e)),new s.Option(t)}}]),t}(o.Reference),y=function(e){function t(e,r){c(this,t);var n=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.sizedType=e,n.length=r,n}return f(t,e),n(t,[{key:"resolve",value:function(e){var t=this.length;return t instanceof o.Reference&&(t=t.resolve(e)),new this.sizedType(t)}}]),t}(o.Reference),v=function(){function e(t,r,n){c(this,e),this.constructor=t,this.name=r,this.config=n}return n(e,[{key:"resolve",value:function(e){return this.name in e.results?e.results[this.name]:this.constructor(e,this.name,this.config)}}]),e}();function m(e,t,r){return r instanceof o.Reference&&(r=r.resolve(e)),e.results[t]=r,r}function g(e,t,r){return e.results[t]=r,r}var b=function(){function e(t){c(this,e),this._destination=t,this._definitions={}}return n(e,[{key:"enum",value:function(e,t){var r=new v(s.Enum.create,e,t);this.define(e,r)}},{key:"struct",value:function(e,t){var r=new v(s.Struct.create,e,t);this.define(e,r)}},{key:"union",value:function(e,t){var r=new v(s.Union.create,e,t);this.define(e,r)}},{key:"typedef",value:function(e,t){var r=new v(m,e,t);this.define(e,r)}},{key:"const",value:function(e,t){var r=new v(g,e,t);this.define(e,r)}},{key:"void",value:function(){return s.Void}},{key:"bool",value:function(){return s.Bool}},{key:"int",value:function(){return s.Int}},{key:"hyper",value:function(){return s.Hyper}},{key:"uint",value:function(){return s.UnsignedInt}},{key:"uhyper",value:function(){return s.UnsignedHyper}},{key:"float",value:function(){return s.Float}},{key:"double",value:function(){return s.Double}},{key:"quadruple",value:function(){return s.Quadruple}},{key:"string",value:function(e){return new y(s.String,e)}},{key:"opaque",value:function(e){return new y(s.Opaque,e)}},{key:"varOpaque",value:function(e){return new y(s.VarOpaque,e)}},{key:"array",value:function(e,t){return new h(e,t)}},{key:"varArray",value:function(e,t){return new h(e,t,!0)}},{key:"option",value:function(e){return new p(e)}},{key:"define",value:function(e,t){if(!(0,i.default)(this._destination[e]))throw new Error("XDRTypes Error:"+e+" is already defined");this._definitions[e]=t}},{key:"lookup",value:function(e){return new d(e)}},{key:"resolve",value:function(){var e=this;(0,a.default)(this._definitions,(function(t){t.resolve({definitions:e._definitions,results:e._destination})}))}}]),e}()},function(e,t,r){var n=r(52),o=r(128),i=r(106),a=r(294),s=r(295),u=r(135),c=r(136),l=r(296),f=r(297),d=r(117),h=r(298),p=r(44),y=r(299),v=r(300),m=r(139),g=r(3),b=r(40),w=r(305),_=r(18),S=r(307),k=r(34),A=r(24),E={};E["[object Arguments]"]=E["[object Array]"]=E["[object ArrayBuffer]"]=E["[object DataView]"]=E["[object Boolean]"]=E["[object Date]"]=E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Map]"]=E["[object Number]"]=E["[object Object]"]=E["[object RegExp]"]=E["[object Set]"]=E["[object String]"]=E["[object Symbol]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E["[object Error]"]=E["[object Function]"]=E["[object WeakMap]"]=!1,e.exports=function e(t,r,x,T,O,P){var R,C=1&r,I=2&r,B=4&r;if(x&&(R=O?x(t,T,O,P):x(t)),void 0!==R)return R;if(!_(t))return t;var M=g(t);if(M){if(R=y(t),!C)return c(t,R)}else{var j=p(t),N="[object Function]"==j||"[object GeneratorFunction]"==j;if(b(t))return u(t,C);if("[object Object]"==j||"[object Arguments]"==j||N&&!O){if(R=I||N?{}:m(t),!C)return I?f(t,s(R,t)):l(t,a(R,t))}else{if(!E[j])return O?t:{};R=v(t,j,C)}}P||(P=new n);var L=P.get(t);if(L)return L;P.set(t,R),S(t)?t.forEach((function(n){R.add(e(n,r,x,n,t,P))})):w(t)&&t.forEach((function(n,o){R.set(o,e(n,r,x,o,t,P))}));var q=M?void 0:(B?I?h:d:I?A:k)(t);return o(q||t,(function(n,o){q&&(n=t[o=n]),i(R,o,e(n,r,x,o,t,P))})),R}},function(e,t,r){var n=r(33),o=r(34);e.exports=function(e,t){return e&&n(t,o(t),e)}},function(e,t,r){var n=r(33),o=r(24);e.exports=function(e,t){return e&&n(t,o(t),e)}},function(e,t,r){var n=r(33),o=r(77);e.exports=function(e,t){return n(e,o(e),t)}},function(e,t,r){var n=r(33),o=r(137);e.exports=function(e,t){return n(e,o(e),t)}},function(e,t,r){var n=r(118),o=r(137),i=r(24);e.exports=function(e){return n(e,i,o)}},function(e,t){var r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&r.call(e,"index")&&(n.index=e.index,n.input=e.input),n}},function(e,t,r){var n=r(84),o=r(301),i=r(302),a=r(303),s=r(138);e.exports=function(e,t,r){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return n(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return o(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,r);case"[object Map]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return i(e);case"[object Set]":return new u;case"[object Symbol]":return a(e)}}},function(e,t,r){var n=r(84);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}},function(e,t){var r=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,r.exec(e));return t.lastIndex=e.lastIndex,t}},function(e,t,r){var n=r(39),o=n?n.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},function(e,t,r){var n=r(18),o=Object.create,i=function(){function e(){}return function(t){if(!n(t))return{};if(o)return o(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=i},function(e,t,r){var n=r(306),o=r(70),i=r(71),a=i&&i.isMap,s=a?o(a):n;e.exports=s},function(e,t,r){var n=r(44),o=r(12);e.exports=function(e){return o(e)&&"[object Map]"==n(e)}},function(e,t,r){var n=r(308),o=r(70),i=r(71),a=i&&i.isSet,s=a?o(a):n;e.exports=s},function(e,t,r){var n=r(44),o=r(12);e.exports=function(e){return o(e)&&"[object Set]"==n(e)}},function(e,t,r){var n=r(310),o=r(80),i=r(141),a=r(85),s=r(142),u=r(143),c=Math.ceil;e.exports=function(e,t){var r=(t=void 0===t?" ":o(t)).length;if(r<2)return r?n(t,e):t;var l=n(t,c(e/s(t)));return a(t)?i(u(l),0,e).join(""):l.slice(0,e)}},function(e,t){var r=Math.floor;e.exports=function(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=r(t/2))&&(e+=e)}while(t);return n}},function(e,t){e.exports=function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i}},function(e,t,r){var n=r(125)("length");e.exports=n},function(e,t){var r="[\\ud800-\\udfff]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",i="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+n+"|"+o+")"+"?",c="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+[i,a,s].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),l="(?:"+[i+n+"?",n,a,s,r].join("|")+")",f=RegExp(o+"(?="+o+")|"+l+c,"g");e.exports=function(e){for(var t=f.lastIndex=0;f.test(e);)++t;return t}},function(e,t){e.exports=function(e){return e.split("")}},function(e,t){var r="[\\ud800-\\udfff]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",i="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+n+"|"+o+")"+"?",c="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+[i,a,s].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),l="(?:"+[i+n+"?",n,a,s,r].join("|")+")",f=RegExp(o+"(?="+o+")|"+l+c,"g");e.exports=function(e){return e.match(f)||[]}},function(e,t,r){var n=r(317);e.exports=function(e,t){for(var r=e.length;r--&&n(t,e[r],0)>-1;);return r}},function(e,t,r){var n=r(318),o=r(319),i=r(320);e.exports=function(e,t,r){return t==t?i(e,t,r):n(e,o,r)}},function(e,t){e.exports=function(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1}},function(e,t){e.exports=function(e){return e!=e}},function(e,t){e.exports=function(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}},function(e,t,r){"use strict";var n=function(e,t){return t||(t={}),e.split("").forEach((function(e,r){e in t||(t[e]=r)})),t},o={alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",charmap:{0:14,1:8}};o.charmap=n(o.alphabet,o.charmap);var i={alphabet:"0123456789ABCDEFGHJKMNPQRSTVWXYZ",charmap:{O:0,I:1,L:1}};i.charmap=n(i.alphabet,i.charmap);var a={alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",charmap:{}};function s(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 u(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())}}a.charmap=n(a.alphabet,a.charmap),s.prototype.charmap=o.charmap,s.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},s.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},u.prototype.alphabet=o.alphabet,u.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},u.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 u(t).finalize(e)},t.decode=function(e,t){return new s(t).finalize(e)},t.Decoder=s,t.Encoder=u,t.charmap=n,t.crockford=i,t.rfc4648=o,t.base32hex=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crcjam=t.crc32=t.crc24=t.crc16kermit=t.crc16xmodem=t.crc16modbus=t.crc16ccitt=t.crc16=t.crc81wire=t.crc8=t.crc1=void 0;var n=p(r(323)),o=p(r(324)),i=p(r(325)),a=p(r(326)),s=p(r(327)),u=p(r(328)),c=p(r(329)),l=p(r(330)),f=p(r(331)),d=p(r(332)),h=p(r(333));function p(e){return e&&e.__esModule?e:{default:e}}t.crc1=n.default,t.crc8=o.default,t.crc81wire=i.default,t.crc16=a.default,t.crc16ccitt=s.default,t.crc16modbus=u.default,t.crc16xmodem=c.default,t.crc16kermit=l.default,t.crc24=f.default,t.crc32=d.default,t.crcjam=h.default,t.default={crc1:n.default,crc8:o.default,crc81wire:i.default,crc16:a.default,crc16ccitt:s.default,crc16modbus:u.default,crc16xmodem:c.default,crc16kermit:l.default,crc24:f.default,crc32:d.default,crcjam:h.default}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=i(r(15));function i(e){return e&&e.__esModule?e:{default:e}}var a=(0,i(r(16)).default)("crc1",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));for(var r=~~t,i=0,a=0;a<e.length;a++){i+=e[a]}return(r+=i%256)%256}));t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=a(r(15)),i=a(r(16));function a(e){return e&&e.__esModule?e:{default:e}}var s=[0,7,14,9,28,27,18,21,56,63,54,49,36,35,42,45,112,119,126,121,108,107,98,101,72,79,70,65,84,83,90,93,224,231,238,233,252,251,242,245,216,223,214,209,196,195,202,205,144,151,158,153,140,139,130,133,168,175,166,161,180,179,186,189,199,192,201,206,219,220,213,210,255,248,241,246,227,228,237,234,183,176,185,190,171,172,165,162,143,136,129,134,147,148,157,154,39,32,41,46,59,60,53,50,31,24,17,22,3,4,13,10,87,80,89,94,75,76,69,66,111,104,97,102,115,116,125,122,137,142,135,128,149,146,155,156,177,182,191,184,173,170,163,164,249,254,247,240,229,226,235,236,193,198,207,200,221,218,211,212,105,110,103,96,117,114,123,124,81,86,95,88,77,74,67,68,25,30,23,16,5,2,11,12,33,38,47,40,61,58,51,52,78,73,64,71,82,85,92,91,118,113,120,127,106,109,100,99,62,57,48,55,34,37,44,43,6,1,8,15,26,29,20,19,174,169,160,167,178,181,188,187,150,145,152,159,138,141,132,131,222,217,208,215,194,197,204,203,230,225,232,239,250,253,244,243];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));var u=(0,i.default)("crc-8",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));for(var r=~~t,i=0;i<e.length;i++){var a=e[i];r=255&s[255&(r^a)]}return r}));t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=a(r(15)),i=a(r(16));function a(e){return e&&e.__esModule?e:{default:e}}var s=[0,94,188,226,97,63,221,131,194,156,126,32,163,253,31,65,157,195,33,127,252,162,64,30,95,1,227,189,62,96,130,220,35,125,159,193,66,28,254,160,225,191,93,3,128,222,60,98,190,224,2,92,223,129,99,61,124,34,192,158,29,67,161,255,70,24,250,164,39,121,155,197,132,218,56,102,229,187,89,7,219,133,103,57,186,228,6,88,25,71,165,251,120,38,196,154,101,59,217,135,4,90,184,230,167,249,27,69,198,152,122,36,248,166,68,26,153,199,37,123,58,100,134,216,91,5,231,185,140,210,48,110,237,179,81,15,78,16,242,172,47,113,147,205,17,79,173,243,112,46,204,146,211,141,111,49,178,236,14,80,175,241,19,77,206,144,114,44,109,51,209,143,12,82,176,238,50,108,142,208,83,13,239,177,240,174,76,18,145,207,45,115,202,148,118,40,171,245,23,73,8,86,180,234,105,55,213,139,87,9,235,181,54,104,138,212,149,203,41,119,244,170,72,22,233,183,85,11,136,214,52,106,43,117,151,201,74,20,246,168,116,42,200,150,21,75,169,247,182,232,10,84,215,137,107,53];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));var u=(0,i.default)("dallas-1-wire",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));for(var r=~~t,i=0;i<e.length;i++){var a=e[i];r=255&s[255&(r^a)]}return r}));t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=a(r(15)),i=a(r(16));function a(e){return e&&e.__esModule?e:{default:e}}var s=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));var u=(0,i.default)("crc-16",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));for(var r=~~t,i=0;i<e.length;i++){var a=e[i];r=65535&(s[255&(r^a)]^r>>8)}return r}));t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=a(r(15)),i=a(r(16));function a(e){return e&&e.__esModule?e:{default:e}}var s=[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];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));var u=(0,i.default)("ccitt",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));for(var r=void 0!==t?~~t:65535,i=0;i<e.length;i++){var a=e[i];r=65535&(s[255&(r>>8^a)]^r<<8)}return r}));t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=a(r(15)),i=a(r(16));function a(e){return e&&e.__esModule?e:{default:e}}var s=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));var u=(0,i.default)("crc-16-modbus",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));for(var r=void 0!==t?~~t:65535,i=0;i<e.length;i++){var a=e[i];r=65535&(s[255&(r^a)]^r>>8)}return r}));t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=i(r(15));function i(e){return e&&e.__esModule?e:{default:e}}var a=(0,i(r(16)).default)("xmodem",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));for(var r=void 0!==t?~~t:0,i=0;i<e.length;i++){var a=r>>>8&255;a^=255&e[i],r=r<<8&65535,r^=a^=a>>>4,r^=a=a<<5&65535,r^=a=a<<7&65535}return r}));t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=a(r(15)),i=a(r(16));function a(e){return e&&e.__esModule?e:{default:e}}var s=[0,4489,8978,12955,17956,22445,25910,29887,35912,40385,44890,48851,51820,56293,59774,63735,4225,264,13203,8730,22181,18220,30135,25662,40137,36160,49115,44626,56045,52068,63999,59510,8450,12427,528,5017,26406,30383,17460,21949,44362,48323,36440,40913,60270,64231,51324,55797,12675,8202,4753,792,30631,26158,21685,17724,48587,44098,40665,36688,64495,60006,55549,51572,16900,21389,24854,28831,1056,5545,10034,14011,52812,57285,60766,64727,34920,39393,43898,47859,21125,17164,29079,24606,5281,1320,14259,9786,57037,53060,64991,60502,39145,35168,48123,43634,25350,29327,16404,20893,9506,13483,1584,6073,61262,65223,52316,56789,43370,47331,35448,39921,29575,25102,20629,16668,13731,9258,5809,1848,65487,60998,56541,52564,47595,43106,39673,35696,33800,38273,42778,46739,49708,54181,57662,61623,2112,6601,11090,15067,20068,24557,28022,31999,38025,34048,47003,42514,53933,49956,61887,57398,6337,2376,15315,10842,24293,20332,32247,27774,42250,46211,34328,38801,58158,62119,49212,53685,10562,14539,2640,7129,28518,32495,19572,24061,46475,41986,38553,34576,62383,57894,53437,49460,14787,10314,6865,2904,32743,28270,23797,19836,50700,55173,58654,62615,32808,37281,41786,45747,19012,23501,26966,30943,3168,7657,12146,16123,54925,50948,62879,58390,37033,33056,46011,41522,23237,19276,31191,26718,7393,3432,16371,11898,59150,63111,50204,54677,41258,45219,33336,37809,27462,31439,18516,23005,11618,15595,3696,8185,63375,58886,54429,50452,45483,40994,37561,33584,31687,27214,22741,18780,15843,11370,7921,3960];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));var u=(0,i.default)("kermit",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));for(var r=void 0!==t?~~t:0,i=0;i<e.length;i++){var a=e[i];r=65535&(s[255&(r^a)]^r>>8)}return r}));t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=a(r(15)),i=a(r(16));function a(e){return e&&e.__esModule?e:{default:e}}var s=[0,8801531,9098509,825846,9692897,1419802,1651692,10452759,10584377,2608578,2839604,11344079,3303384,11807523,12104405,4128302,12930697,4391538,5217156,13227903,5679208,13690003,14450021,5910942,6606768,14844747,15604413,6837830,16197969,7431594,8256604,16494759,840169,9084178,8783076,18463,10434312,1670131,1434117,9678590,11358416,2825259,2590173,10602790,4109873,12122826,11821884,3289031,13213536,5231515,4409965,12912278,5929345,14431610,13675660,5693559,6823513,15618722,14863188,6588335,16513208,8238147,7417269,16212302,1680338,10481449,9664223,1391140,9061683,788936,36926,8838341,12067563,4091408,3340262,11844381,2868234,11372785,10555655,2579964,14478683,5939616,5650518,13661357,5180346,13190977,12967607,4428364,8219746,16457881,16234863,7468436,15633027,6866552,6578062,14816117,1405499,9649856,10463030,1698765,8819930,55329,803287,9047340,11858690,3325945,4072975,12086004,2561507,10574104,11387118,2853909,13647026,5664841,5958079,14460228,4446803,12949160,13176670,5194661,7454091,16249200,16476294,8201341,14834538,6559633,6852199,15647388,3360676,11864927,12161705,4185682,10527045,2551230,2782280,11286707,9619101,1346150,1577872,10379115,73852,8875143,9172337,899466,16124205,7357910,8182816,16421083,6680524,14918455,15678145,6911546,5736468,13747439,14507289,5968354,12873461,4334094,5159928,13170435,4167245,12180150,11879232,3346363,11301036,2767959,2532769,10545498,10360692,1596303,1360505,9604738,913813,9157998,8856728,92259,16439492,8164415,7343561,16138546,6897189,15692510,14936872,6662099,5986813,14488838,13733104,5750795,13156124,5174247,4352529,12855018,2810998,11315341,10498427,2522496,12124823,4148844,3397530,11901793,9135439,862644,110658,8912057,1606574,10407765,9590435,1317464,15706879,6940164,6651890,14889737,8145950,16384229,16161043,7394792,5123014,13133629,12910283,4370992,14535975,5997020,5707818,13718737,2504095,10516836,11329682,2796649,11916158,3383173,4130419,12143240,8893606,129117,876971,9121104,1331783,9576124,10389322,1625009,14908182,6633453,6925851,15721184,7380471,16175372,16402682,8127489,4389423,12891860,13119266,5137369,13704398,5722165,6015427,14517560];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));var u=(0,i.default)("crc-24",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));for(var r=void 0!==t?~~t:11994318,i=0;i<e.length;i++){var a=e[i];r=16777215&(s[255&(r>>16^a)]^r<<8)}return r}));t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=a(r(15)),i=a(r(16));function a(e){return e&&e.__esModule?e:{default:e}}var s=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));var u=(0,i.default)("crc-32",(function(e,t){n.Buffer.isBuffer(e)||(e=(0,o.default)(e));for(var r=0===t?0:-1^~~t,i=0;i<e.length;i++){var a=e[i];r=s[255&(r^a)]^r>>>8}return-1^r}));t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),o=a(r(15)),i=a(r(16));function a(e){return e&&e.__esModule?e:{default:e}}var s=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));var u=(0,i.default)("jam",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;n.Buffer.isBuffer(e)||(e=(0,o.default)(e));for(var r=0===t?0:~~t,i=0;i<e.length;i++){var a=e[i];r=s[255&(r^a)]^r>>>8}return r}));t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyChecksum=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}},function(e,t,r){var n=r(14).isFinite;e.exports=function(e){return"number"==typeof e&&n(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.best_r=function(e){var t=new a.default(e),r=void 0,o=void 0,i=[[new a.default(0),new a.default(1)],[new a.default(1),new a.default(0)]],s=2;for(;!t.gt(2147483647);){r=t.floor(),o=t.sub(r);var u=r.mul(i[s-1][0]).add(i[s-2][0]),c=r.mul(i[s-1][1]).add(i[s-2][1]);if(u.gt(2147483647)||c.gt(2147483647))break;if(i.push([u,c]),o.eq(0))break;t=new a.default(1).div(o),s+=1}var l=n(i[i.length-1],2),f=l[0],d=l[1];if(f.isZero()||d.isZero())throw new Error("Couldn't find approximation");return[f.toNumber(),d.toNumber()]};var o,i=r(23),a=(o=i)&&o.__esModule?o:{default:o}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(338);Object.defineProperty(t,"manageSellOffer",{enumerable:!0,get:function(){return n.manageSellOffer}});var o=r(339);Object.defineProperty(t,"createPassiveSellOffer",{enumerable:!0,get:function(){return o.createPassiveSellOffer}});var i=r(340);Object.defineProperty(t,"accountMerge",{enumerable:!0,get:function(){return i.accountMerge}});var a=r(341);Object.defineProperty(t,"allowTrust",{enumerable:!0,get:function(){return a.allowTrust}});var s=r(342);Object.defineProperty(t,"bumpSequence",{enumerable:!0,get:function(){return s.bumpSequence}});var u=r(343);Object.defineProperty(t,"changeTrust",{enumerable:!0,get:function(){return u.changeTrust}});var c=r(344);Object.defineProperty(t,"createAccount",{enumerable:!0,get:function(){return c.createAccount}});var l=r(345);Object.defineProperty(t,"createClaimableBalance",{enumerable:!0,get:function(){return l.createClaimableBalance}});var f=r(147);Object.defineProperty(t,"claimClaimableBalance",{enumerable:!0,get:function(){return f.claimClaimableBalance}});var d=r(346);Object.defineProperty(t,"clawbackClaimableBalance",{enumerable:!0,get:function(){return d.clawbackClaimableBalance}});var h=r(347);Object.defineProperty(t,"inflation",{enumerable:!0,get:function(){return h.inflation}});var p=r(348);Object.defineProperty(t,"manageData",{enumerable:!0,get:function(){return p.manageData}});var y=r(349);Object.defineProperty(t,"manageBuyOffer",{enumerable:!0,get:function(){return y.manageBuyOffer}});var v=r(350);Object.defineProperty(t,"pathPaymentStrictReceive",{enumerable:!0,get:function(){return v.pathPaymentStrictReceive}});var m=r(351);Object.defineProperty(t,"pathPaymentStrictSend",{enumerable:!0,get:function(){return m.pathPaymentStrictSend}});var g=r(352);Object.defineProperty(t,"payment",{enumerable:!0,get:function(){return g.payment}});var b=r(353);Object.defineProperty(t,"setOptions",{enumerable:!0,get:function(){return b.setOptions}});var w=r(354);Object.defineProperty(t,"beginSponsoringFutureReserves",{enumerable:!0,get:function(){return w.beginSponsoringFutureReserves}});var _=r(355);Object.defineProperty(t,"endSponsoringFutureReserves",{enumerable:!0,get:function(){return _.endSponsoringFutureReserves}});var S=r(356);Object.defineProperty(t,"revokeAccountSponsorship",{enumerable:!0,get:function(){return S.revokeAccountSponsorship}}),Object.defineProperty(t,"revokeTrustlineSponsorship",{enumerable:!0,get:function(){return S.revokeTrustlineSponsorship}}),Object.defineProperty(t,"revokeOfferSponsorship",{enumerable:!0,get:function(){return S.revokeOfferSponsorship}}),Object.defineProperty(t,"revokeDataSponsorship",{enumerable:!0,get:function(){return S.revokeDataSponsorship}}),Object.defineProperty(t,"revokeClaimableBalanceSponsorship",{enumerable:!0,get:function(){return S.revokeClaimableBalanceSponsorship}}),Object.defineProperty(t,"revokeLiquidityPoolSponsorship",{enumerable:!0,get:function(){return S.revokeLiquidityPoolSponsorship}}),Object.defineProperty(t,"revokeSignerSponsorship",{enumerable:!0,get:function(){return S.revokeSignerSponsorship}});var k=r(357);Object.defineProperty(t,"clawback",{enumerable:!0,get:function(){return k.clawback}});var A=r(358);Object.defineProperty(t,"setTrustLineFlags",{enumerable:!0,get:function(){return A.setTrustLineFlags}});var E=r(359);Object.defineProperty(t,"liquidityPoolDeposit",{enumerable:!0,get:function(){return E.liquidityPoolDeposit}});var x=r(360);Object.defineProperty(t,"liquidityPoolWithdraw",{enumerable:!0,get:function(){return x.liquidityPoolWithdraw}})},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.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),(0,n.default)(e.price))throw new TypeError("price argument is required");t.price=this._toXDRPrice(e.price),(0,n.default)(e.offerId)?e.offerId="0":e.offerId=e.offerId.toString();t.offerId=o.Hyper.fromString(e.offerId);var r=new i.default.ManageSellOfferOp(t),a={};return a.body=i.default.OperationBody.manageSellOffer(r),this.setSourceAccount(a,e),new i.default.Operation(a)};var n=a(r(7)),o=r(22),i=a(r(0));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.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),(0,n.default)(e.price))throw new TypeError("price argument is required");t.price=this._toXDRPrice(e.price);var r=new o.default.CreatePassiveSellOfferOp(t),i={};return i.body=o.default.OperationBody.createPassiveSellOffer(r),this.setSourceAccount(i,e),new o.default.Operation(i)};var n=i(r(7)),o=i(r(0));function i(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.accountMerge=function(e){var t={};try{t.body=i.default.OperationBody.accountMerge((0,a.decodeAddressToMuxedAccount)(e.destination))}catch(e){throw new Error("destination is invalid")}return this.setSourceAccount(t,e),new i.default.Operation(t)};var n,o=r(0),i=(n=o)&&n.__esModule?n:{default:n},a=r(17)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.allowTrust=function(e){if(!a.StrKey.isValidEd25519PublicKey(e.trustor))throw new Error("trustor is invalid");var t={};if(t.trustor=i.Keypair.fromPublicKey(e.trustor).xdrAccountId(),e.assetCode.length<=4){var r=(0,n.default)(e.assetCode,4,"\0");t.asset=o.default.AssetCode.assetTypeCreditAlphanum4(r)}else{if(!(e.assetCode.length<=12))throw new Error("Asset code must be 12 characters at max.");var s=(0,n.default)(e.assetCode,12,"\0");t.asset=o.default.AssetCode.assetTypeCreditAlphanum12(s)}"boolean"==typeof e.authorize?e.authorize?t.authorize=o.default.TrustLineFlags.authorizedFlag().value:t.authorize=0:t.authorize=e.authorize;var u=new o.default.AllowTrustOp(t),c={};return c.body=o.default.OperationBody.allowTrust(u),this.setSourceAccount(c,e),new o.default.Operation(c)};var n=s(r(140)),o=s(r(0)),i=r(19),a=r(8);function s(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bumpSequence=function(e){var t={};if(!(0,i.default)(e.bumpTo))throw new Error("bumpTo must be a string");try{new o.default(e.bumpTo)}catch(e){throw new Error("bumpTo must be a stringified number")}t.bumpTo=n.Hyper.fromString(e.bumpTo);var r=new a.default.BumpSequenceOp(t),s={};return s.body=a.default.OperationBody.bumpSequence(r),this.setSourceAccount(s,e),new a.default.Operation(s)};var n=r(22),o=s(r(23)),i=s(r(9)),a=s(r(0));function s(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.changeTrust=function(e){var t={};if(e.asset instanceof s.Asset)t.line=e.asset.toChangeTrustXDRObject();else{if(!(e.asset instanceof u.LiquidityPoolAsset))throw new TypeError("asset must be Asset or LiquidityPoolAsset");t.line=e.asset.toXDRObject()}if(!(0,n.default)(e.limit)&&!this.isValidAmount(e.limit,!0))throw new TypeError(this.constructAmountRequirementsError("limit"));e.limit?t.limit=this._toXDRAmount(e.limit):t.limit=o.Hyper.fromString(new i.default("9223372036854775807").toString());e.source&&(t.source=e.source.masterKeypair);var r=new a.default.ChangeTrustOp(t),c={};return c.body=a.default.OperationBody.changeTrust(r),this.setSourceAccount(c,e),new a.default.Operation(c)};var n=c(r(7)),o=r(22),i=c(r(23)),a=c(r(0)),s=r(27),u=r(88);function c(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createAccount=function(e){if(!s.StrKey.isValidEd25519PublicKey(e.destination))throw new Error("destination is invalid");if(!this.isValidAmount(e.startingBalance,!0))throw new TypeError("startingBalance must be of type String, represent a non-negative number and have at most 7 digits after the decimal");var t={};t.destination=a.Keypair.fromPublicKey(e.destination).xdrAccountId(),t.startingBalance=this._toXDRAmount(e.startingBalance);var r=new i.default.CreateAccountOp(t),n={};return n.body=i.default.OperationBody.createAccount(r),this.setSourceAccount(n,e),new i.default.Operation(n)};var n,o=r(0),i=(n=o)&&n.__esModule?n:{default:n},a=r(19),s=r(8)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createClaimableBalance=function(e){if(!(e.asset instanceof a.Asset))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=e.claimants.map((function(e){return e.toXDRObject()}));var r=new i.default.CreateClaimableBalanceOp(t),n={};return n.body=i.default.OperationBody.createClaimableBalance(r),this.setSourceAccount(n,e),new i.default.Operation(n)};var n,o=r(0),i=(n=o)&&n.__esModule?n:{default:n},a=r(27)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clawbackClaimableBalance=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.validateClaimableBalanceId)(e.balanceId);var t={balanceId:i.default.ClaimableBalanceId.fromXDR(e.balanceId,"hex")},r={body:i.default.OperationBody.clawbackClaimableBalance(new i.default.ClawbackClaimableBalanceOp(t))};return this.setSourceAccount(r,e),new i.default.Operation(r)};var n,o=r(0),i=(n=o)&&n.__esModule?n:{default:n},a=r(147)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.inflation=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return t.body=i.default.OperationBody.inflation(),this.setSourceAccount(t,e),new i.default.Operation(t)};var n,o=r(0),i=(n=o)&&n.__esModule?n:{default:n}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.manageData=function(t){var r={};if(!((0,n.default)(t.name)&&t.name.length<=64))throw new Error("name must be a string, up to 64 characters");if(r.dataName=t.name,!(0,n.default)(t.value)&&!e.isBuffer(t.value)&&null!==t.value)throw new Error("value must be a string, Buffer or null");(0,n.default)(t.value)?r.dataValue=e.from(t.value):r.dataValue=t.value;if(null!==r.dataValue&&r.dataValue.length>64)throw new Error("value cannot be longer that 64 bytes");var i=new o.default.ManageDataOp(r),a={};return a.body=o.default.OperationBody.manageData(i),this.setSourceAccount(a,t),new o.default.Operation(a)};var n=i(r(9)),o=i(r(0));function i(e){return e&&e.__esModule?e:{default:e}}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.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),(0,n.default)(e.price))throw new TypeError("price argument is required");t.price=this._toXDRPrice(e.price),(0,n.default)(e.offerId)?e.offerId="0":e.offerId=e.offerId.toString();t.offerId=o.Hyper.fromString(e.offerId);var r=new i.default.ManageBuyOfferOp(t),a={};return a.body=i.default.OperationBody.manageBuyOffer(r),this.setSourceAccount(a,e),new i.default.Operation(a)};var n=a(r(7)),o=r(22),i=a(r(0));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.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=(0,a.decodeAddressToMuxedAccount)(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.default.PathPaymentStrictReceiveOp(t),o={};return o.body=i.default.OperationBody.pathPaymentStrictReceive(n),this.setSourceAccount(o,e),new i.default.Operation(o)};var n,o=r(0),i=(n=o)&&n.__esModule?n:{default:n},a=r(17)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.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=(0,a.decodeAddressToMuxedAccount)(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.default.PathPaymentStrictSendOp(t),o={};return o.body=i.default.OperationBody.pathPaymentStrictSend(n),this.setSourceAccount(o,e),new i.default.Operation(o)};var n,o=r(0),i=(n=o)&&n.__esModule?n:{default:n},a=r(17)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.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=(0,a.decodeAddressToMuxedAccount)(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.default.PaymentOp(t),n={};return n.body=i.default.OperationBody.payment(r),this.setSourceAccount(n,e),new i.default.Operation(n)};var n,o=r(0),i=(n=o)&&n.__esModule?n:{default:n},a=r(17)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.setOptions=function(t){var r={};if(t.inflationDest){if(!s.StrKey.isValidEd25519PublicKey(t.inflationDest))throw new Error("inflationDest is invalid");r.inflationDest=a.Keypair.fromPublicKey(t.inflationDest).xdrAccountId()}if(r.clearFlags=this._checkUnsignedIntValue("clearFlags",t.clearFlags),r.setFlags=this._checkUnsignedIntValue("setFlags",t.setFlags),r.masterWeight=this._checkUnsignedIntValue("masterWeight",t.masterWeight,c),r.lowThreshold=this._checkUnsignedIntValue("lowThreshold",t.lowThreshold,c),r.medThreshold=this._checkUnsignedIntValue("medThreshold",t.medThreshold,c),r.highThreshold=this._checkUnsignedIntValue("highThreshold",t.highThreshold,c),!(0,n.default)(t.homeDomain)&&!(0,o.default)(t.homeDomain))throw new TypeError("homeDomain argument must be of type String");if(r.homeDomain=t.homeDomain,t.signer){var u=this._checkUnsignedIntValue("signer.weight",t.signer.weight,c),l=void 0,f=0;if(t.signer.ed25519PublicKey){if(!s.StrKey.isValidEd25519PublicKey(t.signer.ed25519PublicKey))throw new Error("signer.ed25519PublicKey is invalid.");var d=s.StrKey.decodeEd25519PublicKey(t.signer.ed25519PublicKey);l=new i.default.SignerKey.signerKeyTypeEd25519(d),f+=1}if(t.signer.preAuthTx){if((0,o.default)(t.signer.preAuthTx)&&(t.signer.preAuthTx=e.from(t.signer.preAuthTx,"hex")),!e.isBuffer(t.signer.preAuthTx)||32!==t.signer.preAuthTx.length)throw new Error("signer.preAuthTx must be 32 bytes Buffer.");l=new i.default.SignerKey.signerKeyTypePreAuthTx(t.signer.preAuthTx),f+=1}if(t.signer.sha256Hash){if((0,o.default)(t.signer.sha256Hash)&&(t.signer.sha256Hash=e.from(t.signer.sha256Hash,"hex")),!e.isBuffer(t.signer.sha256Hash)||32!==t.signer.sha256Hash.length)throw new Error("signer.sha256Hash must be 32 bytes Buffer.");l=new i.default.SignerKey.signerKeyTypeHashX(t.signer.sha256Hash),f+=1}if(t.signer.ed25519SignedPayload){if(!s.StrKey.isValidSignedPayload(t.signer.ed25519SignedPayload))throw new Error("signer.ed25519SignedPayload is invalid.");var h=s.StrKey.decodeSignedPayload(t.signer.ed25519SignedPayload),p=i.default.SignerKeyEd25519SignedPayload.fromXDR(h);l=i.default.SignerKey.signerKeyTypeEd25519SignedPayload(p),f+=1}if(1!==f)throw new Error("Signer object must contain exactly one of signer.ed25519PublicKey, signer.sha256Hash, signer.preAuthTx.");r.signer=new i.default.Signer({key:l,weight:u})}var y=new i.default.SetOptionsOp(r),v={};return v.body=i.default.OperationBody.setOptions(y),this.setSourceAccount(v,t),new i.default.Operation(v)};var n=u(r(7)),o=u(r(9)),i=u(r(0)),a=r(19),s=r(8);function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(e>=0&&e<=255)return!0;throw new Error(t+" value must be between 0 and 255")}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.beginSponsoringFutureReserves=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!a.StrKey.isValidEd25519PublicKey(e.sponsoredId))throw new Error("sponsoredId is invalid");var t=new i.default.BeginSponsoringFutureReservesOp({sponsoredId:s.Keypair.fromPublicKey(e.sponsoredId).xdrAccountId()}),r={};return r.body=i.default.OperationBody.beginSponsoringFutureReserves(t),this.setSourceAccount(r,e),new i.default.Operation(r)};var n,o=r(0),i=(n=o)&&n.__esModule?n:{default:n},a=r(8),s=r(19)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.endSponsoringFutureReserves=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return t.body=i.default.OperationBody.endSponsoringFutureReserves(),this.setSourceAccount(t,e),new i.default.Operation(t)};var n,o=r(0),i=(n=o)&&n.__esModule?n:{default:n}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.revokeAccountSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!i.StrKey.isValidEd25519PublicKey(e.account))throw new Error("account is invalid");var t=o.default.LedgerKey.account(new o.default.LedgerKeyAccount({accountId:a.Keypair.fromPublicKey(e.account).xdrAccountId()})),r=o.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),n={};return n.body=o.default.OperationBody.revokeSponsorship(r),this.setSourceAccount(n,e),new o.default.Operation(n)},t.revokeTrustlineSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!i.StrKey.isValidEd25519PublicKey(e.account))throw new Error("account is invalid");var t=void 0;if(e.asset instanceof s.Asset)t=e.asset.toTrustLineXDRObject();else{if(!(e.asset instanceof u.LiquidityPoolId))throw new TypeError("asset must be an Asset or LiquidityPoolId");t=e.asset.toXDRObject()}var r=o.default.LedgerKey.trustline(new o.default.LedgerKeyTrustLine({accountId:a.Keypair.fromPublicKey(e.account).xdrAccountId(),asset:t})),n=o.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(r),c={};return c.body=o.default.OperationBody.revokeSponsorship(n),this.setSourceAccount(c,e),new o.default.Operation(c)},t.revokeOfferSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!i.StrKey.isValidEd25519PublicKey(e.seller))throw new Error("seller is invalid");if(!(0,n.default)(e.offerId))throw new Error("offerId is invalid");var t=o.default.LedgerKey.offer(new o.default.LedgerKeyOffer({sellerId:a.Keypair.fromPublicKey(e.seller).xdrAccountId(),offerId:o.default.Int64.fromString(e.offerId)})),r=o.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),s={};return s.body=o.default.OperationBody.revokeSponsorship(r),this.setSourceAccount(s,e),new o.default.Operation(s)},t.revokeDataSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!i.StrKey.isValidEd25519PublicKey(e.account))throw new Error("account is invalid");if(!(0,n.default)(e.name)||e.name.length>64)throw new Error("name must be a string, up to 64 characters");var t=o.default.LedgerKey.data(new o.default.LedgerKeyData({accountId:a.Keypair.fromPublicKey(e.account).xdrAccountId(),dataName:e.name})),r=o.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),s={};return s.body=o.default.OperationBody.revokeSponsorship(r),this.setSourceAccount(s,e),new o.default.Operation(s)},t.revokeClaimableBalanceSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!(0,n.default)(e.balanceId))throw new Error("balanceId is invalid");var t=o.default.LedgerKey.claimableBalance(new o.default.LedgerKeyClaimableBalance({balanceId:o.default.ClaimableBalanceId.fromXDR(e.balanceId,"hex")})),r=o.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),i={};return i.body=o.default.OperationBody.revokeSponsorship(r),this.setSourceAccount(i,e),new o.default.Operation(i)},t.revokeLiquidityPoolSponsorship=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!(0,n.default)(e.liquidityPoolId))throw new Error("liquidityPoolId is invalid");var t=o.default.LedgerKey.liquidityPool(new o.default.LedgerKeyLiquidityPool({liquidityPoolId:o.default.PoolId.fromXDR(e.liquidityPoolId,"hex")})),r=o.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),i={body:o.default.OperationBody.revokeSponsorship(r)};return this.setSourceAccount(i,e),new o.default.Operation(i)},t.revokeSignerSponsorship=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!i.StrKey.isValidEd25519PublicKey(t.account))throw new Error("account is invalid");var r=void 0;if(t.signer.ed25519PublicKey){if(!i.StrKey.isValidEd25519PublicKey(t.signer.ed25519PublicKey))throw new Error("signer.ed25519PublicKey is invalid.");var s=i.StrKey.decodeEd25519PublicKey(t.signer.ed25519PublicKey);r=new o.default.SignerKey.signerKeyTypeEd25519(s)}else if(t.signer.preAuthTx){var u=void 0;if(u=(0,n.default)(t.signer.preAuthTx)?e.from(t.signer.preAuthTx,"hex"):t.signer.preAuthTx,!e.isBuffer(u)||32!==u.length)throw new Error("signer.preAuthTx must be 32 bytes Buffer.");r=new o.default.SignerKey.signerKeyTypePreAuthTx(u)}else{if(!t.signer.sha256Hash)throw new Error("signer is invalid");var c=void 0;if(c=(0,n.default)(t.signer.sha256Hash)?e.from(t.signer.sha256Hash,"hex"):t.signer.sha256Hash,!e.isBuffer(c)||32!==c.length)throw new Error("signer.sha256Hash must be 32 bytes Buffer.");r=new o.default.SignerKey.signerKeyTypeHashX(c)}var l=new o.default.RevokeSponsorshipOpSigner({accountId:a.Keypair.fromPublicKey(t.account).xdrAccountId(),signerKey:r}),f=o.default.RevokeSponsorshipOp.revokeSponsorshipSigner(l),d={};return d.body=o.default.OperationBody.revokeSponsorship(f),this.setSourceAccount(d,t),new o.default.Operation(d)};var n=c(r(9)),o=c(r(0)),i=r(8),a=r(19),s=r(27),u=r(89);function c(e){return e&&e.__esModule?e:{default:e}}}).call(this,r(1).Buffer)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.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=(0,a.decodeAddressToMuxedAccount)(e.from)}catch(e){throw new Error("from address is invalid")}var r={body:i.default.OperationBody.clawback(new i.default.ClawbackOp(t))};return this.setSourceAccount(r,e),new i.default.Operation(r)};var n,o=r(0),i=(n=o)&&n.__esModule?n:{default:n},a=r(17)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var 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};t.setTrustLineFlags=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};if("object"!==n(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:a.default.TrustLineFlags.authorizedFlag(),authorizedToMaintainLiabilities:a.default.TrustLineFlags.authorizedToMaintainLiabilitiesFlag(),clawbackEnabled:a.default.TrustLineFlags.trustlineClawbackEnabledFlag()},o=0,i=0;Object.keys(e.flags).forEach((function(t){if(!Object.prototype.hasOwnProperty.call(r,t))throw new Error("unsupported flag name specified: "+t);var n=e.flags[t],a=r[t].value;!0===n?i|=a:!1===n&&(o|=a)})),t.trustor=s.Keypair.fromPublicKey(e.trustor).xdrAccountId(),t.asset=e.asset.toXDRObject(),t.clearFlags=o,t.setFlags=i;var u={body:a.default.OperationBody.setTrustLineFlags(new a.default.SetTrustLineFlagsOp(t))};return this.setSourceAccount(u,e),new a.default.Operation(u)};var o,i=r(0),a=(o=i)&&o.__esModule?o:{default:o},s=r(19)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.liquidityPoolDeposit=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.liquidityPoolId,r=e.maxAmountA,i=e.maxAmountB,a=e.minPrice,s=e.maxPrice,u={};if(!t)throw new TypeError("liquidityPoolId argument is required");if(u.liquidityPoolId=o.default.PoolId.fromXDR(t,"hex"),!this.isValidAmount(r,!0))throw new TypeError("maxAmountA argument is required");if(u.maxAmountA=this._toXDRAmount(r),!this.isValidAmount(i,!0))throw new TypeError("maxAmountB argument is required");if(u.maxAmountB=this._toXDRAmount(i),(0,n.default)(a))throw new TypeError("minPrice argument is required");if(u.minPrice=this._toXDRPrice(a),(0,n.default)(s))throw new TypeError("maxPrice argument is required");u.maxPrice=this._toXDRPrice(s);var c=new o.default.LiquidityPoolDepositOp(u),l={body:o.default.OperationBody.liquidityPoolDeposit(c)};return this.setSourceAccount(l,e),new o.default.Operation(l)};var n=i(r(7)),o=i(r(0));function i(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.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.default.PoolId.fromXDR(e.liquidityPoolId,"hex"),!this.isValidAmount(e.amount))throw new TypeError("amount argument is required");if(t.amount=this._toXDRAmount(e.amount),!this.isValidAmount(e.minAmountA,!0))throw new TypeError("minAmountA argument is required");if(t.minAmountA=this._toXDRAmount(e.minAmountA),!this.isValidAmount(e.minAmountB,!0))throw new TypeError("minAmountB argument is required");t.minAmountB=this._toXDRAmount(e.minAmountB);var r=new i.default.LiquidityPoolWithdrawOp(t),n={body:i.default.OperationBody.liquidityPoolWithdraw(r)};return this.setSourceAccount(n,e),new i.default.Operation(n)};var n,o=r(0),i=(n=o)&&n.__esModule?n:{default:n}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionBuilder=t.TimeoutInfinite=t.BASE_FEE=void 0;var n=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();t.isValidDate=b;var o=r(22),i=v(r(23)),a=v(r(28)),s=v(r(7)),u=v(r(9)),c=v(r(3)),l=v(r(0)),f=r(87),d=r(148),h=r(149),p=r(90),y=r(17);function v(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var g=t.BASE_FEE="100";t.TimeoutInfinite=0,t.TransactionBuilder=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(m(this,e),!t)throw new Error("must specify source account for the transaction");if((0,s.default)(r.fee))throw new Error("must specify fee for the transaction (in stroops)");this.source=t,this.operations=[],this.baseFee=r.fee,this.timebounds=(0,a.default)(r.timebounds)||null,this.ledgerbounds=(0,a.default)(r.ledgerbounds)||null,this.minAccountSequence=r.minAccountSequence||null,this.minAccountSequenceAge=r.minAccountSequenceAge||null,this.minAccountSequenceLedgerGap=r.minAccountSequenceLedgerGap||null,this.extraSigners=(0,a.default)(r.extraSigners)||null,this.memo=r.memo||p.Memo.none(),this.networkPassphrase=r.networkPassphrase||null}return n(e,[{key:"addOperation",value:function(e){return this.operations.push(e),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(!(0,c.default)(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=(0,a.default)(e),this}},{key:"setNetworkPassphrase",value:function(e){return this.networkPassphrase=e,this}},{key:"build",value:function(){var e=new i.default(this.source.sequenceNumber()).add(1),t={fee:new i.default(this.baseFee).mul(this.operations.length).toNumber(),seqNum:l.default.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).");b(this.timebounds.minTime)&&(this.timebounds.minTime=this.timebounds.minTime.getTime()/1e3),b(this.timebounds.maxTime)&&(this.timebounds.maxTime=this.timebounds.maxTime.getTime()/1e3),this.timebounds.minTime=o.UnsignedHyper.fromString(this.timebounds.minTime.toString()),this.timebounds.maxTime=o.UnsignedHyper.fromString(this.timebounds.maxTime.toString());var r=new l.default.TimeBounds(this.timebounds);if(this.hasV2Preconditions()){var n=null;null!==this.ledgerbounds&&(n=new l.default.LedgerBounds(this.ledgerbounds));var a=this.minAccountSequence||"0";a=l.default.SequenceNumber.fromString(a);var s=o.UnsignedHyper.fromString(null!==this.minAccountSequenceAge?this.minAccountSequenceAge.toString():"0"),u=this.minAccountSequenceLedgerGap||0,c=null!==this.extraSigners?this.extraSigners.map(h.SignerKey.decodeAddress):[];t.cond=l.default.Preconditions.precondV2(new l.default.PreconditionsV2({timeBounds:r,ledgerBounds:n,minSeqNum:a,minSeqAge:s,minSeqLedgerGap:u,extraSigners:c}))}else t.cond=l.default.Preconditions.precondTime(r);t.sourceAccount=(0,y.decodeAddressToMuxedAccount)(this.source.accountId()),t.ext=new l.default.TransactionExt(0);var d=new l.default.Transaction(t);d.operations(this.operations);var p=new l.default.TransactionEnvelope.envelopeTypeTx(new l.default.TransactionV1Envelope({tx:d})),v=new f.Transaction(p,this.networkPassphrase);return this.source.incrementSequenceNumber(),v}},{key:"hasV2Preconditions",value:function(){return null!==this.ledgerbounds||null!==this.minAccountSequence||null!==this.minAccountSequenceAge||null!==this.minAccountSequenceLedgerGap||null!==this.extraSigners&&this.extraSigners.length>0}}],[{key:"buildFeeBumpTransaction",value:function(e,t,r,n){var o=r.operations.length,a=new i.default(r.fee).div(o),s=new i.default(t);if(s.lessThan(a))throw new Error("Invalid baseFee, it should be at least "+a+" stroops.");var c=new i.default(g);if(s.lessThan(c))throw new Error("Invalid baseFee, it should be at least "+c+" stroops.");var f=r.toEnvelope();if(f.switch()===l.default.EnvelopeType.envelopeTypeTxV0()){var h=f.v0().tx(),p=new l.default.Transaction({sourceAccount:new l.default.MuxedAccount.keyTypeEd25519(h.sourceAccountEd25519()),fee:h.fee(),seqNum:h.seqNum(),cond:l.default.Preconditions.precondTime(h.timeBounds()),memo:h.memo(),operations:h.operations(),ext:new l.default.TransactionExt(0)});f=new l.default.TransactionEnvelope.envelopeTypeTx(new l.default.TransactionV1Envelope({tx:p,signatures:f.v0().signatures()}))}var v=void 0;v=(0,u.default)(e)?(0,y.decodeAddressToMuxedAccount)(e):e.xdrMuxedAccount();var m=new l.default.FeeBumpTransaction({feeSource:v,fee:l.default.Int64.fromString(s.mul(o+1).toString()),innerTx:l.default.FeeBumpTransactionInnerTx.envelopeTypeTx(f.v1()),ext:new l.default.FeeBumpTransactionExt(0)}),b=new l.default.FeeBumpTransactionEnvelope({tx:m,signatures:[]}),w=new l.default.TransactionEnvelope.envelopeTypeTxFeeBump(b);return new d.FeeBumpTransaction(w,n)}},{key:"fromXDR",value:function(e,t){return"string"==typeof e&&(e=l.default.TransactionEnvelope.fromXDR(e,"base64")),e.switch()===l.default.EnvelopeType.envelopeTypeTxFeeBump()?new d.FeeBumpTransaction(e,t):new f.Transaction(e,t)}}]),e}();function b(e){return e instanceof Date&&!isNaN(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MuxedAccount=void 0;var n=function(){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,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=c(r(9)),i=c(r(0)),a=r(150),s=r(8),u=r(17);function c(e){return e&&e.__esModule?e:{default:e}}t.MuxedAccount=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(!s.StrKey.isValidEd25519PublicKey(n))throw new Error("accountId is invalid");this.account=t,this._muxedXdr=(0,u.encodeMuxedAccount)(n,r),this._mAddress=(0,u.encodeMuxedAccountToAddress)(this._muxedXdr),this._id=r}return n(e,[{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(!(0,o.default)(e))throw new Error("id should be a string representing a number (uint64)");return this._muxedXdr.med25519().id(i.default.Uint64.fromString(e)),this._mAddress=(0,u.encodeMuxedAccountToAddress)(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()}}],[{key:"fromAddress",value:function(t,r){var n=(0,u.decodeAddressToMuxedAccount)(t),o=(0,u.extractBaseAddress)(t),i=n.med25519().id().toString();return new e(new a.Account(o,r),i)}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Networks={PUBLIC:"Public Global Stellar Network ; September 2015",TESTNET:"Test SDF Network ; September 2015"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Server=t.SUBMIT_TRANSACTION_TIMEOUT=void 0;var n=r(2),o=n.__importDefault(r(23)),i=n.__importDefault(r(365)),a=n.__importDefault(r(366)),s=r(29),u=n.__importDefault(r(37)),c=r(6),l=r(60),f=r(36),d=r(415),h=r(95),p=r(416),y=r(417),v=r(418),m=r(419),g=r(420),b=r(421),w=r(422),_=r(423),S=r(424),k=r(425),A=r(426),E=r(427),x=r(428),T=r(429),O=r(430),P=n.__importStar(r(91));t.SUBMIT_TRANSACTION_TIMEOUT=6e4;function R(e){return new o.default(e).div(1e7).toString()}var C=function(){function e(e,t){void 0===t&&(t={}),this.serverURL=u.default(e);var r=void 0===t.allowHttp?l.Config.isAllowHttp():t.allowHttp,n={};if(t.appName&&(n["X-App-Name"]=t.appName),t.appVersion&&(n["X-App-Version"]=t.appVersion),t.authToken&&(n["X-Auth-Token"]=t.authToken),i.default(n)||P.default.interceptors.request.use((function(e){return e.headers=a.default(n,e.headers),e})),"https"!==this.serverURL.protocol()&&!r)throw new Error("Cannot connect to insecure horizon server")}return e.prototype.fetchTimebounds=function(e,t){return void 0===t&&(t=!1),n.__awaiter(this,void 0,void 0,(function(){var r;return n.__generator(this,(function(n){switch(n.label){case 0:return(r=P.getCurrentServerTime(this.serverURL.hostname()))?[2,{minTime:0,maxTime:r+e}]:t?[2,{minTime:0,maxTime:Math.floor((new Date).getTime()/1e3)+e}]:[4,P.default.get(u.default(this.serverURL).toString())];case 1:return n.sent(),[4,this.fetchTimebounds(e,!0)];case 2:return[2,n.sent()]}}))}))},e.prototype.fetchBaseFee=function(){return n.__awaiter(this,void 0,void 0,(function(){var e;return n.__generator(this,(function(t){switch(t.label){case 0:return[4,this.feeStats()];case 1:return e=t.sent(),[2,parseInt(e.last_ledger_base_fee,10)||100]}}))}))},e.prototype.feeStats=function(){return n.__awaiter(this,void 0,void 0,(function(){var e;return n.__generator(this,(function(t){return(e=new c.CallBuilder(u.default(this.serverURL))).filter.push(["fee_stats"]),[2,e.call()]}))}))},e.prototype.submitTransaction=function(e,r){return void 0===r&&(r={skipMemoRequiredCheck:!1}),n.__awaiter(this,void 0,void 0,(function(){var i;return n.__generator(this,(function(n){switch(n.label){case 0:return r.skipMemoRequiredCheck?[3,2]:[4,this.checkMemoRequired(e)];case 1:n.sent(),n.label=2;case 2:return i=encodeURIComponent(e.toEnvelope().toXDR().toString("base64")),[2,P.default.post(u.default(this.serverURL).segment("transactions").toString(),"tx="+i,{timeout:t.SUBMIT_TRANSACTION_TIMEOUT}).then((function(e){if(!e.data.result_xdr)return e.data;var t,r,n=s.xdr.TransactionResult.fromXDR(e.data.result_xdr,"base64").result().value();return n.length&&(t=n.map((function(e,t){if("manageBuyOffer"!==e.value().switch().name&&"manageSellOffer"!==e.value().switch().name)return null;r=!0;var n,i=new o.default(0),a=new o.default(0),u=e.value().value().success(),c=u.offersClaimed().map((function(e){var t=e.value(),r="";switch(e.switch()){case s.xdr.ClaimAtomType.claimAtomTypeV0():r=s.StrKey.encodeEd25519PublicKey(t.sellerEd25519());break;case s.xdr.ClaimAtomType.claimAtomTypeOrderBook():r=s.StrKey.encodeEd25519PublicKey(t.sellerId().ed25519());break;default:throw new Error("Invalid offer result type: "+e.switch())}var n=new o.default(t.amountBought().toString()),u=new o.default(t.amountSold().toString());i=i.add(u),a=a.add(n);var c=s.Asset.fromOperation(t.assetSold()),l=s.Asset.fromOperation(t.assetBought()),f={type:c.getAssetType(),assetCode:c.getCode(),issuer:c.getIssuer()},d={type:l.getAssetType(),assetCode:l.getCode(),issuer:l.getIssuer()};return{sellerId:r,offerId:t.offerId().toString(),assetSold:f,amountSold:R(u),assetBought:d,amountBought:R(n)}})),l=u.offer().switch().name;if("function"==typeof u.offer().value&&u.offer().value()){var f=u.offer().value();n={offerId:f.offerId().toString(),selling:{},buying:{},amount:R(f.amount().toString()),price:{n:f.price().n(),d:f.price().d()}};var d=s.Asset.fromOperation(f.selling());n.selling={type:d.getAssetType(),assetCode:d.getCode(),issuer:d.getIssuer()};var h=s.Asset.fromOperation(f.buying());n.buying={type:h.getAssetType(),assetCode:h.getCode(),issuer:h.getIssuer()}}return{offersClaimed:c,effect:l,operationIndex:t,currentOffer:n,amountBought:R(i),amountSold:R(a),isFullyOpen:!c.length&&"manageOfferDeleted"!==l,wasPartiallyFilled:!!c.length&&"manageOfferDeleted"!==l,wasImmediatelyFilled:!!c.length&&"manageOfferDeleted"===l,wasImmediatelyDeleted:!c.length&&"manageOfferDeleted"===l}})).filter((function(e){return!!e}))),Object.assign({},e.data,{offerResults:r?t:void 0})})).catch((function(e){return e instanceof Error?Promise.reject(e):Promise.reject(new f.BadResponseError("Transaction submission failed. Server responded: "+e.status+" "+e.statusText,e.data))}))]}}))}))},e.prototype.accounts=function(){return new d.AccountCallBuilder(u.default(this.serverURL))},e.prototype.claimableBalances=function(){return new y.ClaimableBalanceCallBuilder(u.default(this.serverURL))},e.prototype.ledgers=function(){return new g.LedgerCallBuilder(u.default(this.serverURL))},e.prototype.transactions=function(){return new O.TransactionCallBuilder(u.default(this.serverURL))},e.prototype.offers=function(){return new w.OfferCallBuilder(u.default(this.serverURL))},e.prototype.orderbook=function(e,t){return new S.OrderbookCallBuilder(u.default(this.serverURL),e,t)},e.prototype.trades=function(){return new T.TradesCallBuilder(u.default(this.serverURL))},e.prototype.operations=function(){return new _.OperationCallBuilder(u.default(this.serverURL))},e.prototype.liquidityPools=function(){return new b.LiquidityPoolCallBuilder(u.default(this.serverURL))},e.prototype.strictReceivePaths=function(e,t,r){return new A.StrictReceivePathCallBuilder(u.default(this.serverURL),e,t,r)},e.prototype.strictSendPaths=function(e,t,r){return new E.StrictSendPathCallBuilder(u.default(this.serverURL),e,t,r)},e.prototype.payments=function(){return new k.PaymentCallBuilder(u.default(this.serverURL))},e.prototype.effects=function(){return new v.EffectCallBuilder(u.default(this.serverURL))},e.prototype.friendbot=function(e){return new m.FriendbotBuilder(u.default(this.serverURL),e)},e.prototype.assets=function(){return new p.AssetsCallBuilder(u.default(this.serverURL))},e.prototype.loadAccount=function(e){return n.__awaiter(this,void 0,void 0,(function(){var t;return n.__generator(this,(function(r){switch(r.label){case 0:return[4,this.accounts().accountId(e).call()];case 1:return t=r.sent(),[2,new h.AccountResponse(t)]}}))}))},e.prototype.tradeAggregation=function(e,t,r,n,o,i){return new x.TradeAggregationCallBuilder(u.default(this.serverURL),e,t,r,n,o,i)},e.prototype.checkMemoRequired=function(e){return n.__awaiter(this,void 0,void 0,(function(){var t,r,o,i,a;return n.__generator(this,(function(n){switch(n.label){case 0:if(e instanceof s.FeeBumpTransaction&&(e=e.innerTransaction),"none"!==e.memo.type)return[2];t=new Set,r=0,n.label=1;case 1:if(!(r<e.operations.length))return[3,6];switch((o=e.operations[r]).type){case"payment":case"pathPaymentStrictReceive":case"pathPaymentStrictSend":case"accountMerge":break;default:return[3,5]}if(i=o.destination,t.has(i))return[3,5];if(t.add(i),i.startsWith("M"))return[3,5];n.label=2;case 2:return n.trys.push([2,4,,5]),[4,this.loadAccount(i)];case 3:if("MQ=="===n.sent().data_attr["config.memo_required"])throw new f.AccountRequiresMemoError("account requires memo",i,r);return[3,5];case 4:if((a=n.sent())instanceof f.AccountRequiresMemoError)throw a;if(!(a instanceof f.NotFoundError))throw a;return[3,5];case 5:return r++,[3,1];case 6:return[2]}}))}))},e}();t.Server=C},function(e,t,r){var n=r(111),o=r(44),i=r(47),a=r(3),s=r(25),u=r(40),c=r(49),l=r(48),f=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||l(e)||i(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!n(e).length;for(var r in e)if(f.call(e,r))return!1;return!0}},function(e,t,r){var n=r(367),o=r(109)((function(e,t,r){n(e,t,r)}));e.exports=o},function(e,t,r){var n=r(52),o=r(151),i=r(66),a=r(368),s=r(18),u=r(24),c=r(152);e.exports=function e(t,r,l,f,d){t!==r&&i(r,(function(i,u){if(d||(d=new n),s(i))a(t,r,u,l,e,f,d);else{var h=f?f(c(t,u),i,u+"",t,r,d):void 0;void 0===h&&(h=i),o(t,u,h)}}),u)}},function(e,t,r){var n=r(151),o=r(135),i=r(138),a=r(136),s=r(139),u=r(47),c=r(3),l=r(369),f=r(40),d=r(50),h=r(18),p=r(370),y=r(48),v=r(152),m=r(371);e.exports=function(e,t,r,g,b,w,_){var S=v(e,r),k=v(t,r),A=_.get(k);if(A)n(e,r,A);else{var E=w?w(S,k,r+"",e,t,_):void 0,x=void 0===E;if(x){var T=c(k),O=!T&&f(k),P=!T&&!O&&y(k);E=k,T||O||P?c(S)?E=S:l(S)?E=a(S):O?(x=!1,E=o(k,!0)):P?(x=!1,E=i(k,!0)):E=[]:p(k)||u(k)?(E=S,u(S)?E=m(S):h(S)&&!d(S)||(E=s(k))):x=!1}x&&(_.set(k,E),b(E,k,g,w,_),_.delete(k)),n(e,r,E)}}},function(e,t,r){var n=r(25),o=r(12);e.exports=function(e){return o(e)&&n(e)}},function(e,t,r){var n=r(20),o=r(83),i=r(12),a=Function.prototype,s=Object.prototype,u=a.toString,c=s.hasOwnProperty,l=u.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=n(e))return!1;var t=o(e);if(null===t)return!0;var r=c.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&u.call(r)==l}},function(e,t,r){var n=r(33),o=r(24);e.exports=function(e){return n(e,o(e))}},function(e,t){e.exports=!1},function(e,t,r){var n,o,i;
/*!
* URI.js - Mutating URLs
* URI Template Support - http://tools.ietf.org/html/rfc6570
*
* Version: 1.19.11
*
* Author: Rodney Rehm
* Web: http://medialize.github.io/URI.js/
*
* Licensed under
* MIT License http://www.opensource.org/licenses/mit-license
*
*/!function(a,s){"use strict";e.exports?e.exports=s(r(37)):(o=[r(37)],void 0===(i="function"==typeof(n=s)?n.apply(t,o):n)||(e.exports=i))}(0,(function(e,t){"use strict";var r=t&&t.URITemplate,n=Object.prototype.hasOwnProperty;function o(e){return o._cache[e]?o._cache[e]:this instanceof o?(this.expression=e,o._cache[e]=this,this):new o(e)}function i(e){this.data=e,this.cache={}}var a=o.prototype,s={"":{prefix:"",separator:",",named:!1,empty_name_separator:!1,encode:"encode"},"+":{prefix:"",separator:",",named:!1,empty_name_separator:!1,encode:"encodeReserved"},"#":{prefix:"#",separator:",",named:!1,empty_name_separator:!1,encode:"encodeReserved"},".":{prefix:".",separator:".",named:!1,empty_name_separator:!1,encode:"encode"},"/":{prefix:"/",separator:"/",named:!1,empty_name_separator:!1,encode:"encode"},";":{prefix:";",separator:";",named:!0,empty_name_separator:!1,encode:"encode"},"?":{prefix:"?",separator:"&",named:!0,empty_name_separator:!0,encode:"encode"},"&":{prefix:"&",separator:"&",named:!0,empty_name_separator:!0,encode:"encode"}};return o._cache={},o.EXPRESSION_PATTERN=/\{([^a-zA-Z0-9%_]?)([^\}]+)(\}|$)/g,o.VARIABLE_PATTERN=/^([^*:.](?:\.?[^*:.])*)((\*)|:(\d+))?$/,o.VARIABLE_NAME_PATTERN=/[^a-zA-Z0-9%_.]/,o.LITERAL_PATTERN=/[<>{}"`^| \\]/,o.expand=function(e,t,r){var n,i,a,u=s[e.operator],c=u.named?"Named":"Unnamed",l=e.variables,f=[];for(a=0;i=l[a];a++){if(0===(n=t.get(i.name)).type&&r&&r.strict)throw new Error('Missing expansion value for variable "'+i.name+'"');if(n.val.length){if(n.type>1&&i.maxlength)throw new Error('Invalid expression: Prefix modifier not applicable to variable "'+i.name+'"');f.push(o["expand"+c](n,u,i.explode,i.explode&&u.separator||",",i.maxlength,i.name))}else n.type&&f.push("")}return f.length?u.prefix+f.join(u.separator):""},o.expandNamed=function(t,r,n,o,i,a){var s,u,c,l="",f=r.encode,d=r.empty_name_separator,h=!t[f].length,p=2===t.type?"":e[f](a);for(u=0,c=t.val.length;u<c;u++)i?(s=e[f](t.val[u][1].substring(0,i)),2===t.type&&(p=e[f](t.val[u][0].substring(0,i)))):h?(s=e[f](t.val[u][1]),2===t.type?(p=e[f](t.val[u][0]),t[f].push([p,s])):t[f].push([void 0,s])):(s=t[f][u][1],2===t.type&&(p=t[f][u][0])),l&&(l+=o),n?l+=p+(d||s?"=":"")+s:(u||(l+=e[f](a)+(d||s?"=":"")),2===t.type&&(l+=p+","),l+=s);return l},o.expandUnnamed=function(t,r,n,o,i){var a,s,u,c="",l=r.encode,f=r.empty_name_separator,d=!t[l].length;for(s=0,u=t.val.length;s<u;s++)i?a=e[l](t.val[s][1].substring(0,i)):d?(a=e[l](t.val[s][1]),t[l].push([2===t.type?e[l](t.val[s][0]):void 0,a])):a=t[l][s][1],c&&(c+=o),2===t.type&&(c+=i?e[l](t.val[s][0].substring(0,i)):t[l][s][0],c+=n?f||a?"=":"":","),c+=a;return c},o.noConflict=function(){return t.URITemplate===o&&(t.URITemplate=r),o},a.expand=function(e,t){var r="";this.parts&&this.parts.length||this.parse(),e instanceof i||(e=new i(e));for(var n=0,a=this.parts.length;n<a;n++)r+="string"==typeof this.parts[n]?this.parts[n]:o.expand(this.parts[n],e,t);return r},a.parse=function(){var e,t,r,n=this.expression,i=o.EXPRESSION_PATTERN,a=o.VARIABLE_PATTERN,u=o.VARIABLE_NAME_PATTERN,c=o.LITERAL_PATTERN,l=[],f=0,d=function(e){if(e.match(c))throw new Error('Invalid Literal "'+e+'"');return e};for(i.lastIndex=0;;){if(null===(t=i.exec(n))){l.push(d(n.substring(f)));break}if(l.push(d(n.substring(f,t.index))),f=t.index+t[0].length,!s[t[1]])throw new Error('Unknown Operator "'+t[1]+'" in "'+t[0]+'"');if(!t[3])throw new Error('Unclosed Expression "'+t[0]+'"');for(var h=0,p=(e=t[2].split(",")).length;h<p;h++){if(null===(r=e[h].match(a)))throw new Error('Invalid Variable "'+e[h]+'" in "'+t[0]+'"');if(r[1].match(u))throw new Error('Invalid Variable Name "'+r[1]+'" in "'+t[0]+'"');e[h]={name:r[1],explode:!!r[3],maxlength:r[4]&&parseInt(r[4],10)}}if(!e.length)throw new Error('Expression Missing Variable(s) "'+t[0]+'"');l.push({expression:t[0],operator:t[1],variables:e})}return l.length||l.push(d(n)),this.parts=l,this},i.prototype.get=function(e){var t,r,o,i=this.data,a={type:0,val:[],encode:[],encodeReserved:[]};if(void 0!==this.cache[e])return this.cache[e];if(this.cache[e]=a,null==(o="[object Function]"===String(Object.prototype.toString.call(i))?i(e):"[object Function]"===String(Object.prototype.toString.call(i[e]))?i[e](e):i[e]))return a;if("[object Array]"===String(Object.prototype.toString.call(o))){for(t=0,r=o.length;t<r;t++)void 0!==o[t]&&null!==o[t]&&a.val.push([void 0,String(o[t])]);a.val.length&&(a.type=3)}else if("[object Object]"===String(Object.prototype.toString.call(o))){for(t in o)n.call(o,t)&&void 0!==o[t]&&null!==o[t]&&a.val.push([t,String(o[t])]);a.val.length&&(a.type=2)}else a.type=1,a.val.push([void 0,String(o)]);return a},e.expand=function(t,r){var n=new o(t).expand(r);return new e(n)},o}))},function(e,t,r){"use strict";var n=r(10),o=r(156),i=r(375),a=r(162);var s=function e(t){var r=new i(t),s=o(i.prototype.request,r);return n.extend(s,i.prototype,r),n.extend(s,r),s.create=function(r){return e(a(t,r))},s}(r(62));s.Axios=i,s.Cancel=r(63),s.CancelToken=r(388),s.isCancel=r(161),s.VERSION=r(163).version,s.all=function(e){return Promise.all(e)},s.spread=r(389),s.isAxiosError=r(390),e.exports=s,e.exports.default=s},function(e,t,r){"use strict";var n=r(10),o=r(157),i=r(376),a=r(377),s=r(162),u=r(387),c=u.validators;function l(e){this.defaults=e,this.interceptors={request:new i,response:new i}}l.prototype.request=function(e,t){if("string"==typeof e?(t=t||{}).url=e:t=e||{},!t.url)throw new Error("Provided config url is not valid");(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&u.assertOptions(r,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var n=[],o=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var i,l=[];if(this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)})),!o){var f=[a,void 0];for(Array.prototype.unshift.apply(f,n),f=f.concat(l),i=Promise.resolve(t);f.length;)i=i.then(f.shift(),f.shift());return i}for(var d=t;n.length;){var h=n.shift(),p=n.shift();try{d=h(d)}catch(e){p(e);break}}try{i=a(d)}catch(e){return Promise.reject(e)}for(;l.length;)i=i.then(l.shift(),l.shift());return i},l.prototype.getUri=function(e){if(!e.url)throw new Error("Provided config url is not valid");return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,r){return this.request(s(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,r,n){return this.request(s(n||{},{method:e,url:t,data:r}))}})),e.exports=l},function(e,t,r){"use strict";var n=r(10);function o(){this.handlers=[]}o.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},function(e,t,r){"use strict";var n=r(10),o=r(378),i=r(161),a=r(62),s=r(63);function u(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s("canceled")}e.exports=function(e){return u(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return u(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(u(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,r){"use strict";var n=r(10),o=r(62);e.exports=function(e,t,r){var i=this||o;return n.forEach(r,(function(r){e=r.call(i,e,t)})),e}},function(e,t,r){"use strict";var n=r(10);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},function(e,t,r){"use strict";var n=r(160);e.exports=function(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},function(e,t,r){"use strict";var n=r(10);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(o)&&s.push("path="+o),n.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,r){"use strict";var n=r(383),o=r(384);e.exports=function(e,t){return e&&!n(t)?o(e,t):t}},function(e,t,r){"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},function(e,t,r){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){"use strict";var n=r(10),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,i,a={};return e?(n.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=n.trim(e.substr(0,i)).toLowerCase(),r=n.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},function(e,t,r){"use strict";var n=r(10);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=o(window.location.href),function(t){var r=n.isString(t)?o(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},function(e,t,r){"use strict";var n=r(163).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var i={};o.transitional=function(e,t,r){function o(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,a){if(!1===e)throw new Error(o(n," has been removed"+(t?" in "+t:"")));return t&&!i[n]&&(i[n]=!0,console.warn(o(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,a)}},e.exports={assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],a=t[i];if(a){var s=e[i],u=void 0===s||a(s,i,e);if(!0!==u)throw new TypeError("option "+i+" must be "+u)}else if(!0!==r)throw Error("Unknown option "+i)}},validators:o}},function(e,t,r){"use strict";var n=r(63);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t<n;t++)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e){r.reason||(r.reason=new n(e),t(r.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},o.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},function(e,t,r){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,r){"use strict";var n=r(10);e.exports=function(e){return n.isObject(e)&&!0===e.isAxiosError}},function(e,t,r){"use strict";var n=r(392);function o(e){return"string"==typeof e&&(e=n(e)),e.protocol&&e.hostname?(e.protocol+"//"+e.host).toLowerCase():"null"}o.same=function(e,t){return o(e)===o(t)},e.exports=o},function(e,t,r){"use strict";(function(t){var n=r(393),o=r(394),i=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a=/[\n\r\t]/g,s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,u=/:\d+$/,c=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,l=/^[a-zA-Z]:/;function f(e){return(e||"").toString().replace(i,"")}var d=[["#","hash"],["?","query"],function(e,t){return y(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],h={hash:1,query:1};function p(e){var r,n=("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{}).location||{},o={},i=typeof(e=e||n);if("blob:"===e.protocol)o=new m(unescape(e.pathname),{});else if("string"===i)for(r in o=new m(e,{}),h)delete o[r];else if("object"===i){for(r in e)r in h||(o[r]=e[r]);void 0===o.slashes&&(o.slashes=s.test(e.href))}return o}function y(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function v(e,t){e=(e=f(e)).replace(a,""),t=t||{};var r,n=c.exec(e),o=n[1]?n[1].toLowerCase():"",i=!!n[2],s=!!n[3],u=0;return i?s?(r=n[2]+n[3]+n[4],u=n[2].length+n[3].length):(r=n[2]+n[4],u=n[2].length):s?(r=n[3]+n[4],u=n[3].length):r=n[4],"file:"===o?u>=2&&(r=r.slice(2)):y(o)?r=n[4]:o?i&&(r=r.slice(2)):u>=2&&y(t.protocol)&&(r=n[4]),{protocol:o,slashes:i||y(o),slashesCount:u,rest:r}}function m(e,t,r){if(e=(e=f(e)).replace(a,""),!(this instanceof m))return new m(e,t,r);var i,s,u,c,h,g,b=d.slice(),w=typeof t,_=this,S=0;for("object"!==w&&"string"!==w&&(r=t,t=null),r&&"function"!=typeof r&&(r=o.parse),i=!(s=v(e||"",t=p(t))).protocol&&!s.slashes,_.slashes=s.slashes||i&&t.slashes,_.protocol=s.protocol||t.protocol||"",e=s.rest,("file:"===s.protocol&&(2!==s.slashesCount||l.test(e))||!s.slashes&&(s.protocol||s.slashesCount<2||!y(_.protocol)))&&(b[3]=[/(.*)/,"pathname"]);S<b.length;S++)"function"!=typeof(c=b[S])?(u=c[0],g=c[1],u!=u?_[g]=e:"string"==typeof u?~(h="@"===u?e.lastIndexOf(u):e.indexOf(u))&&("number"==typeof c[2]?(_[g]=e.slice(0,h),e=e.slice(h+c[2])):(_[g]=e.slice(h),e=e.slice(0,h))):(h=u.exec(e))&&(_[g]=h[1],e=e.slice(0,h.index)),_[g]=_[g]||i&&c[3]&&t[g]||"",c[4]&&(_[g]=_[g].toLowerCase())):e=c(e,_);r&&(_.query=r(_.query)),i&&t.slashes&&"/"!==_.pathname.charAt(0)&&(""!==_.pathname||""!==t.pathname)&&(_.pathname=function(e,t){if(""===e)return t;for(var r=(t||"/").split("/").slice(0,-1).concat(e.split("/")),n=r.length,o=r[n-1],i=!1,a=0;n--;)"."===r[n]?r.splice(n,1):".."===r[n]?(r.splice(n,1),a++):a&&(0===n&&(i=!0),r.splice(n,1),a--);return i&&r.unshift(""),"."!==o&&".."!==o||r.push(""),r.join("/")}(_.pathname,t.pathname)),"/"!==_.pathname.charAt(0)&&y(_.protocol)&&(_.pathname="/"+_.pathname),n(_.port,_.protocol)||(_.host=_.hostname,_.port=""),_.username=_.password="",_.auth&&(~(h=_.auth.indexOf(":"))?(_.username=_.auth.slice(0,h),_.username=encodeURIComponent(decodeURIComponent(_.username)),_.password=_.auth.slice(h+1),_.password=encodeURIComponent(decodeURIComponent(_.password))):_.username=encodeURIComponent(decodeURIComponent(_.auth)),_.auth=_.password?_.username+":"+_.password:_.username),_.origin="file:"!==_.protocol&&y(_.protocol)&&_.host?_.protocol+"//"+_.host:"null",_.href=_.toString()}m.prototype={set:function(e,t,r){var i=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(r||o.parse)(t)),i[e]=t;break;case"port":i[e]=t,n(t,i.protocol)?t&&(i.host=i.hostname+":"+t):(i.host=i.hostname,i[e]="");break;case"hostname":i[e]=t,i.port&&(t+=":"+i.port),i.host=t;break;case"host":i[e]=t,u.test(t)?(t=t.split(":"),i.port=t.pop(),i.hostname=t.join(":")):(i.hostname=t,i.port="");break;case"protocol":i.protocol=t.toLowerCase(),i.slashes=!r;break;case"pathname":case"hash":if(t){var a="pathname"===e?"/":"#";i[e]=t.charAt(0)!==a?a+t:t}else i[e]=t;break;case"username":case"password":i[e]=encodeURIComponent(t);break;case"auth":var s=t.indexOf(":");~s?(i.username=t.slice(0,s),i.username=encodeURIComponent(decodeURIComponent(i.username)),i.password=t.slice(s+1),i.password=encodeURIComponent(decodeURIComponent(i.password))):i.username=encodeURIComponent(decodeURIComponent(t))}for(var c=0;c<d.length;c++){var l=d[c];l[4]&&(i[l[1]]=i[l[1]].toLowerCase())}return i.auth=i.password?i.username+":"+i.password:i.username,i.origin="file:"!==i.protocol&&y(i.protocol)&&i.host?i.protocol+"//"+i.host:"null",i.href=i.toString(),i},toString:function(e){e&&"function"==typeof e||(e=o.stringify);var t,r=this,n=r.host,i=r.protocol;i&&":"!==i.charAt(i.length-1)&&(i+=":");var a=i+(r.protocol&&r.slashes||y(r.protocol)?"//":"");return r.username?(a+=r.username,r.password&&(a+=":"+r.password),a+="@"):r.password?(a+=":"+r.password,a+="@"):"file:"!==r.protocol&&y(r.protocol)&&!n&&"/"!==r.pathname&&(a+="@"),(":"===n[n.length-1]||u.test(r.hostname)&&!r.port)&&(n+=":"),a+=n+r.pathname,(t="object"==typeof r.query?e(r.query):r.query)&&(a+="?"!==t.charAt(0)?"?"+t:t),r.hash&&(a+=r.hash),a}},m.extractProtocol=v,m.location=p,m.trimLeft=f,m.qs=o,e.exports=m}).call(this,r(5))},function(e,t,r){"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty;function o(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function i(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var r,o,a=[];for(o in"string"!=typeof t&&(t="?"),e)if(n.call(e,o)){if((r=e[o])||null!=r&&!isNaN(r)||(r=""),o=i(o),r=i(r),null===o||null===r)continue;a.push(o+"="+r)}return a.length?t+a.join("&"):""},t.parse=function(e){for(var t,r=/([^=?#&]+)=?([^&]*)/g,n={};t=r.exec(e);){var i=o(t[1]),a=o(t[2]);null===i||null===a||i in n||(n[i]=a)}return n}},function(e,t,r){(function(e,n){var o;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(i){t&&t.nodeType,e&&e.nodeType;var a="object"==typeof n&&n;a.global!==a&&a.window!==a&&a.self;var s,u=2147483647,c=/^xn--/,l=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,p=String.fromCharCode;function y(e){throw new RangeError(d[e])}function v(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function m(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+v((e=e.replace(f,".")).split("."),t).join(".")}function g(e){for(var t,r,n=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function b(e){return v(e,(function(e){var t="";return e>65535&&(t+=p((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=p(e)})).join("")}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function _(e,t,r){var n=0;for(e=r?h(e/700):e>>1,e+=h(e/t);e>455;n+=36)e=h(e/35);return h(n+36*e/(e+38))}function S(e){var t,r,n,o,i,a,s,c,l,f,d,p=[],v=e.length,m=0,g=128,w=72;for((r=e.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)e.charCodeAt(n)>=128&&y("not-basic"),p.push(e.charCodeAt(n));for(o=r>0?r+1:0;o<v;){for(i=m,a=1,s=36;o>=v&&y("invalid-input"),((c=(d=e.charCodeAt(o++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:36)>=36||c>h((u-m)/a))&&y("overflow"),m+=c*a,!(c<(l=s<=w?1:s>=w+26?26:s-w));s+=36)a>h(u/(f=36-l))&&y("overflow"),a*=f;w=_(m-i,t=p.length+1,0==i),h(m/t)>u-g&&y("overflow"),g+=h(m/t),m%=t,p.splice(m++,0,g)}return b(p)}function k(e){var t,r,n,o,i,a,s,c,l,f,d,v,m,b,S,k=[];for(v=(e=g(e)).length,t=128,r=0,i=72,a=0;a<v;++a)(d=e[a])<128&&k.push(p(d));for(n=o=k.length,o&&k.push("-");n<v;){for(s=u,a=0;a<v;++a)(d=e[a])>=t&&d<s&&(s=d);for(s-t>h((u-r)/(m=n+1))&&y("overflow"),r+=(s-t)*m,t=s,a=0;a<v;++a)if((d=e[a])<t&&++r>u&&y("overflow"),d==t){for(c=r,l=36;!(c<(f=l<=i?1:l>=i+26?26:l-i));l+=36)S=c-f,b=36-f,k.push(p(w(f+S%b,0))),c=h(S/b);k.push(p(w(c,0))),i=_(r,m,n==o),r=0,++n}++r,++t}return k.join("")}s={version:"1.4.1",ucs2:{decode:g,encode:b},decode:S,encode:k,toASCII:function(e){return m(e,(function(e){return l.test(e)?"xn--"+k(e):e}))},toUnicode:function(e){return m(e,(function(e){return c.test(e)?S(e.slice(4).toLowerCase()):e}))}},void 0===(o=function(){return s}.call(t,r,t,e))||(e.exports=o)}()}).call(this,r(41)(e),r(5))},function(e,t,r){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,r){"use strict";t.decode=t.parse=r(398),t.encode=t.stringify=r(399)},function(e,t,r){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,r,i){t=t||"&",r=r||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var u=1e3;i&&"number"==typeof i.maxKeys&&(u=i.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var l=0;l<c;++l){var f,d,h,p,y=e[l].replace(s,"%20"),v=y.indexOf(r);v>=0?(f=y.substr(0,v),d=y.substr(v+1)):(f=y,d=""),h=decodeURIComponent(f),p=decodeURIComponent(d),n(a,h)?o(a[h])?a[h].push(p):a[h]=[a[h],p]:a[h]=p}return a};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,r){"use strict";var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,s){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?i(a(e),(function(a){var s=encodeURIComponent(n(a))+r;return o(e[a])?i(e[a],(function(e){return s+encodeURIComponent(n(e))})).join(t):s+encodeURIComponent(n(e[a]))})).join(t):s?encodeURIComponent(n(s))+r+encodeURIComponent(n(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n<e.length;n++)r.push(t(e[n],n));return r}var a=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},function(e,t,r){var n=r(165),o=r(92),i=e.exports;for(var a in n)n.hasOwnProperty(a)&&(i[a]=n[a]);function s(e){if("string"==typeof e&&(e=o.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}i.request=function(e,t){return e=s(e),n.request.call(this,e,t)},i.get=function(e,t){return e=s(e),n.get.call(this,e,t)}},function(e,t,r){(function(t,n,o){var i=r(166),a=r(11),s=r(167),u=r(168),c=r(409),l=s.IncomingMessage,f=s.readyStates;var d=e.exports=function(e){var r,n=this;u.Writable.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+new t(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){n.setHeader(t,e.headers[t])}));var o=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!i.abortController)o=!1,r=!0;else if("prefer-streaming"===e.mode)r=!1;else if("allow-wrong-content-type"===e.mode)r=!i.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");r=!0}n._mode=function(e,t){return i.fetch&&t?"fetch":i.mozchunkedarraybuffer?"moz-chunked-arraybuffer":i.msstream?"ms-stream":i.arraybuffer&&e?"arraybuffer":i.vbArray&&e?"text:vbarray":"text"}(r,o),n._fetchTimer=null,n.on("finish",(function(){n._onFinish()}))};a(d,u.Writable),d.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===h.indexOf(r)&&(this._headers[r]={name:e,value:t})},d.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},d.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},d.prototype._onFinish=function(){var e=this;if(!e._destroyed){var r=e._opts,a=e._headers,s=null;"GET"!==r.method&&"HEAD"!==r.method&&(s=i.arraybuffer?c(t.concat(e._body)):i.blobConstructor?new n.Blob(e._body.map((function(e){return c(e)})),{type:(a["content-type"]||{}).value||""}):t.concat(e._body).toString());var u=[];if(Object.keys(a).forEach((function(e){var t=a[e].name,r=a[e].value;Array.isArray(r)?r.forEach((function(e){u.push([t,e])})):u.push([t,r])})),"fetch"===e._mode){var l=null;if(i.abortController){var d=new AbortController;l=d.signal,e._fetchAbortController=d,"requestTimeout"in r&&0!==r.requestTimeout&&(e._fetchTimer=n.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),r.requestTimeout))}n.fetch(e._opts.url,{method:e._opts.method,headers:u,body:s||void 0,mode:"cors",credentials:r.withCredentials?"include":"same-origin",signal:l}).then((function(t){e._fetchResponse=t,e._connect()}),(function(t){n.clearTimeout(e._fetchTimer),e._destroyed||e.emit("error",t)}))}else{var h=e._xhr=new n.XMLHttpRequest;try{h.open(e._opts.method,e._opts.url,!0)}catch(t){return void o.nextTick((function(){e.emit("error",t)}))}"responseType"in h&&(h.responseType=e._mode.split(":")[0]),"withCredentials"in h&&(h.withCredentials=!!r.withCredentials),"text"===e._mode&&"overrideMimeType"in h&&h.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in r&&(h.timeout=r.requestTimeout,h.ontimeout=function(){e.emit("requestTimeout")}),u.forEach((function(e){h.setRequestHeader(e[0],e[1])})),e._response=null,h.onreadystatechange=function(){switch(h.readyState){case f.LOADING:case f.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(h.onprogress=function(){e._onXHRProgress()}),h.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{h.send(s)}catch(t){return void o.nextTick((function(){e.emit("error",t)}))}}}},d.prototype._onXHRProgress=function(){(function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},d.prototype._connect=function(){var e=this;e._destroyed||(e._response=new l(e._xhr,e._fetchResponse,e._mode,e._fetchTimer),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},d.prototype._write=function(e,t,r){this._body.push(e),r()},d.prototype.abort=d.prototype.destroy=function(){this._destroyed=!0,n.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},d.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),u.Writable.prototype.end.call(this,e,t,r)},d.prototype.flushHeaders=function(){},d.prototype.setTimeout=function(){},d.prototype.setNoDelay=function(){},d.prototype.setSocketKeepAlive=function(){};var h=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,r(1).Buffer,r(5),r(13))},function(e,t){},function(e,t,r){"use strict";var n=r(94).Buffer,o=r(404);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,o,i=n.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=i,o=s,t.copy(r,o),s+=a.data.length,a=a.next;return i},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function i(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new i(o.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new i(o.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(406),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(5))},function(e,t,r){(function(e,t){!function(e,r){"use strict";if(!e.setImmediate){var n,o,i,a,s,u=1,c={},l=!1,f=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){p(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,r=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=r,t}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){p(e.data)},n=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,n=function(e){var t=f.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):n=function(e){setTimeout(p,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&p(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),n=function(t){e.postMessage(a+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var o={callback:e,args:t};return c[u]=o,n(u),u++},d.clearImmediate=h}function h(e){delete c[e]}function p(e){if(l)setTimeout(p,0,e);else{var t=c[e];if(t){l=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(void 0,r)}}(t)}finally{h(e),l=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,r(5),r(13))},function(e,t,r){(function(t){function r(e){try{if(!t.localStorage)return!1}catch(e){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,r(5))},function(e,t,r){"use strict";e.exports=i;var n=r(174),o=Object.create(r(45));function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}o.inherits=r(11),o.inherits(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){var n=r(1).Buffer;e.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(n.isBuffer(e)){for(var t=new Uint8Array(e.length),r=e.length,o=0;o<r;o++)t[o]=e[o];return t.buffer}throw new Error("Argument must be a Buffer")}},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var o in n)r.call(n,o)&&(e[o]=n[o])}return e};var r=Object.prototype.hasOwnProperty},function(e,t){e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(e,t,r){(function(e){var n=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},o=/%[sdj%]/g;t.format=function(e){if(!m(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(s(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,i=n.length,a=String(e).replace(o,(function(e){if("%%"===e)return"%";if(r>=i)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}})),u=n[r];r<i;u=n[++r])y(u)||!w(u)?a+=" "+u:a+=" "+s(u);return a},t.deprecate=function(r,n){if(void 0!==e&&!0===e.noDeprecation)return r;if(void 0===e)return function(){return t.deprecate(r,n).apply(this,arguments)};var o=!1;return function(){if(!o){if(e.throwDeprecation)throw new Error(n);e.traceDeprecation?console.trace(n):console.error(n),o=!0}return r.apply(this,arguments)}};var i,a={};function s(e,r){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(r)?n.showHidden=r:r&&t._extend(n,r),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),l(n,e,n.depth)}function u(e,t){var r=s.styles[t];return r?"["+s.colors[r][0]+"m"+e+"["+s.colors[r][1]+"m":e}function c(e,t){return e}function l(e,r,n){if(e.customInspect&&r&&k(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return m(o)||(o=l(e,o,n)),o}var i=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(v(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(y(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)),S(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(r);if(0===a.length){if(k(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(b(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(_(r))return e.stylize(Date.prototype.toString.call(r),"date");if(S(r))return f(r)}var c,w="",A=!1,E=["{","}"];(h(r)&&(A=!0,E=["[","]"]),k(r))&&(w=" [Function"+(r.name?": "+r.name:"")+"]");return b(r)&&(w=" "+RegExp.prototype.toString.call(r)),_(r)&&(w=" "+Date.prototype.toUTCString.call(r)),S(r)&&(w=" "+f(r)),0!==a.length||A&&0!=r.length?n<0?b(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=A?function(e,t,r,n,o){for(var i=[],a=0,s=t.length;a<s;++a)O(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,A)})),e.seen.pop(),function(e,t,r){if(e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(c,w,E)):E[0]+w+E[1]}function f(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")),O(n,o)||(a="["+o+"]"),s||(e.seen.indexOf(u.value)<0?(s=y(r)?l(e,u.value,null):l(e,u.value,r-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),g(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function h(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function y(e){return null===e}function v(e){return"number"==typeof e}function m(e){return"string"==typeof e}function g(e){return void 0===e}function b(e){return w(e)&&"[object RegExp]"===A(e)}function w(e){return"object"==typeof e&&null!==e}function _(e){return w(e)&&"[object Date]"===A(e)}function S(e){return w(e)&&("[object Error]"===A(e)||e instanceof Error)}function k(e){return"function"==typeof e}function A(e){return Object.prototype.toString.call(e)}function E(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(r){if(g(i)&&(i=e.env.NODE_DEBUG||""),r=r.toUpperCase(),!a[r])if(new RegExp("\\b"+r+"\\b","i").test(i)){var n=e.pid;a[r]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",r,n,e)}}else a[r]=function(){};return a[r]},t.inspect=s,s.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]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=p,t.isNull=y,t.isNullOrUndefined=function(e){return null==e},t.isNumber=v,t.isString=m,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=g,t.isRegExp=b,t.isObject=w,t.isDate=_,t.isError=S,t.isFunction=k,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(413);var x=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(){var e=new Date,t=[E(e.getHours()),E(e.getMinutes()),E(e.getSeconds())].join(":");return[e.getDate(),x[e.getMonth()],t].join(" ")}function O(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",T(),t.format.apply(t,arguments))},t.inherits=r(414),t._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var P="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(P&&e[P]){var t;if("function"!=typeof(t=e[P]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,P,{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)),P&&Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,n(e))},t.promisify.custom=P,t.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function r(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var o=r.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)};t.apply(this,r).then((function(t){e.nextTick(a,null,t)}),(function(t){e.nextTick(R,t,a)}))}return Object.setPrototypeOf(r,Object.getPrototypeOf(t)),Object.defineProperties(r,n(t)),r}}).call(this,r(13))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccountCallBuilder=void 0;var n=r(2),o=r(6),i=function(e){function t(t){var r=e.call(this,t)||this;return r.url.segment("accounts"),r}return n.__extends(t,e),t.prototype.accountId=function(e){var t=new o.CallBuilder(this.url.clone());return t.filter.push([e]),t},t.prototype.forSigner=function(e){return this.url.setQuery("signer",e),this},t.prototype.forAsset=function(e){return this.url.setQuery("asset",""+e),this},t.prototype.sponsor=function(e){return this.url.setQuery("sponsor",e),this},t.prototype.forLiquidityPool=function(e){return this.url.setQuery("liquidity_pool",e),this},t}(o.CallBuilder);t.AccountCallBuilder=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AssetsCallBuilder=void 0;var n=r(2),o=function(e){function t(t){var r=e.call(this,t)||this;return r.url.segment("assets"),r}return n.__extends(t,e),t.prototype.forCode=function(e){return this.url.setQuery("asset_code",e),this},t.prototype.forIssuer=function(e){return this.url.setQuery("asset_issuer",e),this},t}(r(6).CallBuilder);t.AssetsCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClaimableBalanceCallBuilder=void 0;var n=r(2),o=r(6),i=function(e){function t(t){var r=e.call(this,t)||this;return r.url.segment("claimable_balances"),r}return n.__extends(t,e),t.prototype.claimableBalance=function(e){var t=new o.CallBuilder(this.url.clone());return t.filter.push([e]),t},t.prototype.sponsor=function(e){return this.url.setQuery("sponsor",e),this},t.prototype.claimant=function(e){return this.url.setQuery("claimant",e),this},t.prototype.asset=function(e){return this.url.setQuery("asset",e.toString()),this},t}(o.CallBuilder);t.ClaimableBalanceCallBuilder=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EffectCallBuilder=void 0;var n=r(2),o=function(e){function t(t){var r=e.call(this,t,"effects")||this;return r.url.segment("effects"),r}return n.__extends(t,e),t.prototype.forAccount=function(e){return this.forEndpoint("accounts",e)},t.prototype.forLedger=function(e){return this.forEndpoint("ledgers",e.toString())},t.prototype.forTransaction=function(e){return this.forEndpoint("transactions",e)},t.prototype.forOperation=function(e){return this.forEndpoint("operations",e)},t.prototype.forLiquidityPool=function(e){return this.forEndpoint("liquidity_pools",e)},t}(r(6).CallBuilder);t.EffectCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FriendbotBuilder=void 0;var n=r(2),o=function(e){function t(t,r){var n=e.call(this,t)||this;return n.url.segment("friendbot"),n.url.setQuery("addr",r),n}return n.__extends(t,e),t}(r(6).CallBuilder);t.FriendbotBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LedgerCallBuilder=void 0;var n=r(2),o=function(e){function t(t){var r=e.call(this,t)||this;return r.url.segment("ledgers"),r}return n.__extends(t,e),t.prototype.ledger=function(e){return this.filter.push(["ledgers",e.toString()]),this},t}(r(6).CallBuilder);t.LedgerCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LiquidityPoolCallBuilder=void 0;var n=r(2),o=r(6),i=function(e){function t(t){var r=e.call(this,t)||this;return r.url.segment("liquidity_pools"),r}return n.__extends(t,e),t.prototype.forAssets=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.map((function(e){return e.toString()})).join(",");return this.url.setQuery("reserves",r),this},t.prototype.forAccount=function(e){return this.url.setQuery("account",e),this},t.prototype.liquidityPoolId=function(e){if(!e.match(/[a-fA-F0-9]{64}/))throw new TypeError(e+" does not look like a liquidity pool ID");var t=new o.CallBuilder(this.url.clone());return t.filter.push([e.toLowerCase()]),t},t}(o.CallBuilder);t.LiquidityPoolCallBuilder=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OfferCallBuilder=void 0;var n=r(2),o=r(6),i=function(e){function t(t){var r=e.call(this,t,"offers")||this;return r.url.segment("offers"),r}return n.__extends(t,e),t.prototype.offer=function(e){var t=new o.CallBuilder(this.url.clone());return t.filter.push([e]),t},t.prototype.forAccount=function(e){return this.forEndpoint("accounts",e)},t.prototype.buying=function(e){return e.isNative()?this.url.setQuery("buying_asset_type","native"):(this.url.setQuery("buying_asset_type",e.getAssetType()),this.url.setQuery("buying_asset_code",e.getCode()),this.url.setQuery("buying_asset_issuer",e.getIssuer())),this},t.prototype.selling=function(e){return e.isNative()?this.url.setQuery("selling_asset_type","native"):(this.url.setQuery("selling_asset_type",e.getAssetType()),this.url.setQuery("selling_asset_code",e.getCode()),this.url.setQuery("selling_asset_issuer",e.getIssuer())),this},t.prototype.sponsor=function(e){return this.url.setQuery("sponsor",e),this},t.prototype.seller=function(e){return this.url.setQuery("seller",e),this},t}(o.CallBuilder);t.OfferCallBuilder=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationCallBuilder=void 0;var n=r(2),o=r(6),i=function(e){function t(t){var r=e.call(this,t,"operations")||this;return r.url.segment("operations"),r}return n.__extends(t,e),t.prototype.operation=function(e){var t=new o.CallBuilder(this.url.clone());return t.filter.push([e]),t},t.prototype.forAccount=function(e){return this.forEndpoint("accounts",e)},t.prototype.forClaimableBalance=function(e){return this.forEndpoint("claimable_balances",e)},t.prototype.forLedger=function(e){return this.forEndpoint("ledgers",e.toString())},t.prototype.forTransaction=function(e){return this.forEndpoint("transactions",e)},t.prototype.forLiquidityPool=function(e){return this.forEndpoint("liquidity_pools",e)},t.prototype.includeFailed=function(e){return this.url.setQuery("include_failed",e.toString()),this},t}(o.CallBuilder);t.OperationCallBuilder=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrderbookCallBuilder=void 0;var n=r(2),o=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.url.segment("order_book"),r.isNative()?o.url.setQuery("selling_asset_type","native"):(o.url.setQuery("selling_asset_type",r.getAssetType()),o.url.setQuery("selling_asset_code",r.getCode()),o.url.setQuery("selling_asset_issuer",r.getIssuer())),n.isNative()?o.url.setQuery("buying_asset_type","native"):(o.url.setQuery("buying_asset_type",n.getAssetType()),o.url.setQuery("buying_asset_code",n.getCode()),o.url.setQuery("buying_asset_issuer",n.getIssuer())),o}return n.__extends(t,e),t}(r(6).CallBuilder);t.OrderbookCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PaymentCallBuilder=void 0;var n=r(2),o=function(e){function t(t){var r=e.call(this,t,"payments")||this;return r.url.segment("payments"),r}return n.__extends(t,e),t.prototype.forAccount=function(e){return this.forEndpoint("accounts",e)},t.prototype.forLedger=function(e){return this.forEndpoint("ledgers",e.toString())},t.prototype.forTransaction=function(e){return this.forEndpoint("transactions",e)},t}(r(6).CallBuilder);t.PaymentCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StrictReceivePathCallBuilder=void 0;var n=r(2),o=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;if(i.url.segment("paths/strict-receive"),"string"==typeof r)i.url.setQuery("source_account",r);else{var a=r.map((function(e){return e.isNative()?"native":e.getCode()+":"+e.getIssuer()})).join(",");i.url.setQuery("source_assets",a)}return i.url.setQuery("destination_amount",o),n.isNative()?i.url.setQuery("destination_asset_type","native"):(i.url.setQuery("destination_asset_type",n.getAssetType()),i.url.setQuery("destination_asset_code",n.getCode()),i.url.setQuery("destination_asset_issuer",n.getIssuer())),i}return n.__extends(t,e),t}(r(6).CallBuilder);t.StrictReceivePathCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StrictSendPathCallBuilder=void 0;var n=r(2),o=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;if(i.url.segment("paths/strict-send"),r.isNative()?i.url.setQuery("source_asset_type","native"):(i.url.setQuery("source_asset_type",r.getAssetType()),i.url.setQuery("source_asset_code",r.getCode()),i.url.setQuery("source_asset_issuer",r.getIssuer())),i.url.setQuery("source_amount",n),"string"==typeof o)i.url.setQuery("destination_account",o);else{var a=o.map((function(e){return e.isNative()?"native":e.getCode()+":"+e.getIssuer()})).join(",");i.url.setQuery("destination_assets",a)}return i}return n.__extends(t,e),t}(r(6).CallBuilder);t.StrictSendPathCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TradeAggregationCallBuilder=void 0;var n=r(2),o=r(6),i=r(36),a=[6e4,3e5,9e5,36e5,864e5,6048e5],s=function(e){function t(t,r,n,o,a,s,u){var c=e.call(this,t)||this;if(c.url.segment("trade_aggregations"),r.isNative()?c.url.setQuery("base_asset_type","native"):(c.url.setQuery("base_asset_type",r.getAssetType()),c.url.setQuery("base_asset_code",r.getCode()),c.url.setQuery("base_asset_issuer",r.getIssuer())),n.isNative()?c.url.setQuery("counter_asset_type","native"):(c.url.setQuery("counter_asset_type",n.getAssetType()),c.url.setQuery("counter_asset_code",n.getCode()),c.url.setQuery("counter_asset_issuer",n.getIssuer())),"number"!=typeof o||"number"!=typeof a)throw new i.BadRequestError("Invalid time bounds",[o,a]);if(c.url.setQuery("start_time",o.toString()),c.url.setQuery("end_time",a.toString()),!c.isValidResolution(s))throw new i.BadRequestError("Invalid resolution",s);if(c.url.setQuery("resolution",s.toString()),!c.isValidOffset(u,s))throw new i.BadRequestError("Invalid offset",u);return c.url.setQuery("offset",u.toString()),c}return n.__extends(t,e),t.prototype.isValidResolution=function(e){for(var t=0,r=a;t<r.length;t++){if(r[t]===e)return!0}return!1},t.prototype.isValidOffset=function(e,t){return!(e>t||e>=864e5||e%36e5!=0)},t}(o.CallBuilder);t.TradeAggregationCallBuilder=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TradesCallBuilder=void 0;var n=r(2),o=function(e){function t(t){var r=e.call(this,t,"trades")||this;return r.url.segment("trades"),r}return n.__extends(t,e),t.prototype.forAssetPair=function(e,t){return e.isNative()?this.url.setQuery("base_asset_type","native"):(this.url.setQuery("base_asset_type",e.getAssetType()),this.url.setQuery("base_asset_code",e.getCode()),this.url.setQuery("base_asset_issuer",e.getIssuer())),t.isNative()?this.url.setQuery("counter_asset_type","native"):(this.url.setQuery("counter_asset_type",t.getAssetType()),this.url.setQuery("counter_asset_code",t.getCode()),this.url.setQuery("counter_asset_issuer",t.getIssuer())),this},t.prototype.forOffer=function(e){return this.url.setQuery("offer_id",e),this},t.prototype.forType=function(e){return this.url.setQuery("trade_type",e),this},t.prototype.forAccount=function(e){return this.forEndpoint("accounts",e)},t.prototype.forLiquidityPool=function(e){return this.forEndpoint("liquidity_pools",e)},t}(r(6).CallBuilder);t.TradesCallBuilder=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionCallBuilder=void 0;var n=r(2),o=r(6),i=function(e){function t(t){var r=e.call(this,t,"transactions")||this;return r.url.segment("transactions"),r}return n.__extends(t,e),t.prototype.transaction=function(e){var t=new o.CallBuilder(this.url.clone());return t.filter.push([e]),t},t.prototype.forAccount=function(e){return this.forEndpoint("accounts",e)},t.prototype.forClaimableBalance=function(e){return this.forEndpoint("claimable_balances",e)},t.prototype.forLedger=function(e){return this.forEndpoint("ledgers",e.toString())},t.prototype.forLiquidityPool=function(e){return this.forEndpoint("liquidity_pools",e)},t.prototype.includeFailed=function(e){return this.url.setQuery("include_failed",e.toString()),this},t}(o.CallBuilder);t.TransactionCallBuilder=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FederationServer=t.FEDERATION_RESPONSE_MAX_SIZE=void 0;var n=r(2),o=n.__importDefault(r(61)),i=r(29),a=n.__importDefault(r(37)),s=r(60),u=r(36),c=r(175);t.FEDERATION_RESPONSE_MAX_SIZE=102400;var l=function(){function e(e,t,r){void 0===r&&(r={}),this.serverURL=a.default(e),this.domain=t;var n=void 0===r.allowHttp?s.Config.isAllowHttp():r.allowHttp;if(this.timeout=void 0===r.timeout?s.Config.getTimeout():r.timeout,"https"!==this.serverURL.protocol()&&!n)throw new Error("Cannot connect to insecure federation server")}return e.resolve=function(t,r){return void 0===r&&(r={}),n.__awaiter(this,void 0,void 0,(function(){var o,a;return n.__generator(this,(function(n){switch(n.label){case 0:return t.indexOf("*")<0?i.StrKey.isValidEd25519PublicKey(t)?[2,Promise.resolve({account_id:t})]:[2,Promise.reject(new Error("Invalid Account ID"))]:(o=t.split("*"),a=o[1],2===o.length&&a?[4,e.createForDomain(a,r)]:[2,Promise.reject(new Error("Invalid Stellar address"))]);case 1:return[2,n.sent().resolveAddress(t)]}}))}))},e.createForDomain=function(t,r){return void 0===r&&(r={}),n.__awaiter(this,void 0,void 0,(function(){var o;return n.__generator(this,(function(n){switch(n.label){case 0:return[4,c.StellarTomlResolver.resolve(t,r)];case 1:return(o=n.sent()).FEDERATION_SERVER?[2,new e(o.FEDERATION_SERVER,t,r)]:[2,Promise.reject(new Error("stellar.toml does not contain FEDERATION_SERVER field"))]}}))}))},e.prototype.resolveAddress=function(e){return n.__awaiter(this,void 0,void 0,(function(){var t,r;return n.__generator(this,(function(n){if(t=e,e.indexOf("*")<0){if(!this.domain)return[2,Promise.reject(new Error("Unknown domain. Make sure `address` contains a domain (ex. `bob*stellar.org`) or pass `domain` parameter when instantiating the server object."))];t=e+"*"+this.domain}return r=this.serverURL.query({type:"name",q:t}),[2,this._sendRequest(r)]}))}))},e.prototype.resolveAccountId=function(e){return n.__awaiter(this,void 0,void 0,(function(){var t;return n.__generator(this,(function(r){return t=this.serverURL.query({type:"id",q:e}),[2,this._sendRequest(t)]}))}))},e.prototype.resolveTransactionId=function(e){return n.__awaiter(this,void 0,void 0,(function(){var t;return n.__generator(this,(function(r){return t=this.serverURL.query({type:"txid",q:e}),[2,this._sendRequest(t)]}))}))},e.prototype._sendRequest=function(e){return n.__awaiter(this,void 0,void 0,(function(){var r;return n.__generator(this,(function(n){return r=this.timeout,[2,o.default.get(e.toString(),{maxContentLength:t.FEDERATION_RESPONSE_MAX_SIZE,timeout:r}).then((function(e){if(void 0!==e.data.memo&&"string"!=typeof e.data.memo)throw new Error("memo value should be of type string");return e.data})).catch((function(e){if(e instanceof Error){if(e.message.match(/^maxContentLength size/))throw new Error("federation response exceeds allowed size of "+t.FEDERATION_RESPONSE_MAX_SIZE);return Promise.reject(e)}return Promise.reject(new u.BadResponseError("Server query failed. Server responded: "+e.status+" "+e.statusText,e.data))}))]}))}))},e}();t.FederationServer=l},function(e,t,r){var n=r(433),o=r(434);e.exports={parse:function(e){var t=n.parse(e.toString());return o.compile(t)}}},function(e,t){e.exports=function(){function e(e,t,r,n,o,i){this.message=e,this.expected=t,this.found=r,this.offset=n,this.line=o,this.column=i,this.name="SyntaxError"}return function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(e,Error),{SyntaxError:e,parse:function(t){var r,n=arguments.length>1?arguments[1]:{},o={},i={start:Mt},a=Mt,s=function(){return Pr},u=o,c="#",l={type:"literal",value:"#",description:'"#"'},f=void 0,d={type:"any",description:"any character"},h="[",p={type:"literal",value:"[",description:'"["'},y="]",v={type:"literal",value:"]",description:'"]"'},m=function(e){Cr(Ir("ObjectPath",e,Pt,Rt))},g=function(e){Cr(Ir("ArrayPath",e,Pt,Rt))},b=function(e,t){return e.concat(t)},w=function(e){return[e]},_=function(e){return e},S=".",k={type:"literal",value:".",description:'"."'},A="=",E={type:"literal",value:"=",description:'"="'},x=function(e,t){Cr(Ir("Assign",t,Pt,Rt,e))},T=function(e){return e.join("")},O=function(e){return e.value},P='"""',R={type:"literal",value:'"""',description:'"\\"\\"\\""'},C=null,I=function(e){return Ir("String",e.join(""),Pt,Rt)},B='"',M={type:"literal",value:'"',description:'"\\""'},j="'''",N={type:"literal",value:"'''",description:"\"'''\""},L="'",q={type:"literal",value:"'",description:'"\'"'},U=function(e){return e},D=function(e){return e},F="\\",K={type:"literal",value:"\\",description:'"\\\\"'},V=function(){return""},z="e",H={type:"literal",value:"e",description:'"e"'},X="E",Q={type:"literal",value:"E",description:'"E"'},W=function(e,t){return Ir("Float",parseFloat(e+"e"+t),Pt,Rt)},G=function(e){return Ir("Float",parseFloat(e),Pt,Rt)},Y="+",$={type:"literal",value:"+",description:'"+"'},Z=function(e){return e.join("")},J="-",ee={type:"literal",value:"-",description:'"-"'},te=function(e){return"-"+e.join("")},re=function(e){return Ir("Integer",parseInt(e,10),Pt,Rt)},ne="true",oe={type:"literal",value:"true",description:'"true"'},ie=function(){return Ir("Boolean",!0,Pt,Rt)},ae="false",se={type:"literal",value:"false",description:'"false"'},ue=function(){return Ir("Boolean",!1,Pt,Rt)},ce=function(){return Ir("Array",[],Pt,Rt)},le=function(e){return Ir("Array",e?[e]:[],Pt,Rt)},fe=function(e){return Ir("Array",e,Pt,Rt)},de=function(e,t){return Ir("Array",e.concat(t),Pt,Rt)},he=function(e){return e},pe=",",ye={type:"literal",value:",",description:'","'},ve="{",me={type:"literal",value:"{",description:'"{"'},ge="}",be={type:"literal",value:"}",description:'"}"'},we=function(e){return Ir("InlineTable",e,Pt,Rt)},_e=function(e,t){return Ir("InlineTableValue",t,Pt,Rt,e)},Se=function(e){return"."+e},ke=function(e){return e.join("")},Ae=":",Ee={type:"literal",value:":",description:'":"'},xe=function(e){return e.join("")},Te="T",Oe={type:"literal",value:"T",description:'"T"'},Pe="Z",Re={type:"literal",value:"Z",description:'"Z"'},Ce=function(e,t){return Ir("Date",new Date(e+"T"+t+"Z"),Pt,Rt)},Ie=function(e,t){return Ir("Date",new Date(e+"T"+t),Pt,Rt)},Be=/^[ \t]/,Me={type:"class",value:"[ \\t]",description:"[ \\t]"},je="\n",Ne={type:"literal",value:"\n",description:'"\\n"'},Le="\r",qe={type:"literal",value:"\r",description:'"\\r"'},Ue=/^[0-9a-f]/i,De={type:"class",value:"[0-9a-f]i",description:"[0-9a-f]i"},Fe=/^[0-9]/,Ke={type:"class",value:"[0-9]",description:"[0-9]"},Ve="_",ze={type:"literal",value:"_",description:'"_"'},He=function(){return""},Xe=/^[A-Za-z0-9_\-]/,Qe={type:"class",value:"[A-Za-z0-9_\\-]",description:"[A-Za-z0-9_\\-]"},We=function(e){return e.join("")},Ge='\\"',Ye={type:"literal",value:'\\"',description:'"\\\\\\""'},$e=function(){return'"'},Ze="\\\\",Je={type:"literal",value:"\\\\",description:'"\\\\\\\\"'},et=function(){return"\\"},tt="\\b",rt={type:"literal",value:"\\b",description:'"\\\\b"'},nt=function(){return"\b"},ot="\\t",it={type:"literal",value:"\\t",description:'"\\\\t"'},at=function(){return"\t"},st="\\n",ut={type:"literal",value:"\\n",description:'"\\\\n"'},ct=function(){return"\n"},lt="\\f",ft={type:"literal",value:"\\f",description:'"\\\\f"'},dt=function(){return"\f"},ht="\\r",pt={type:"literal",value:"\\r",description:'"\\\\r"'},yt=function(){return"\r"},vt="\\U",mt={type:"literal",value:"\\U",description:'"\\\\U"'},gt=function(e){return Br(e.join(""))},bt="\\u",wt={type:"literal",value:"\\u",description:'"\\\\u"'},_t=0,St=0,kt=0,At={line:1,column:1,seenCR:!1},Et=0,xt=[],Tt=0,Ot={};if("startRule"in n){if(!(n.startRule in i))throw new Error("Can't start parsing from rule \""+n.startRule+'".');a=i[n.startRule]}function Pt(){return Ct(St).line}function Rt(){return Ct(St).column}function Ct(e){return kt!==e&&(kt>e&&(kt=0,At={line:1,column:1,seenCR:!1}),function(e,r,n){var o,i;for(o=r;o<n;o++)"\n"===(i=t.charAt(o))?(e.seenCR||e.line++,e.column=1,e.seenCR=!1):"\r"===i||"\u2028"===i||"\u2029"===i?(e.line++,e.column=1,e.seenCR=!0):(e.column++,e.seenCR=!1)}(At,kt,e),kt=e),At}function It(e){_t<Et||(_t>Et&&(Et=_t,xt=[]),xt.push(e))}function Bt(r,n,o){var i=Ct(o),a=o<t.length?t.charAt(o):null;return null!==n&&function(e){var t=1;for(e.sort((function(e,t){return e.description<t.description?-1:e.description>t.description?1:0}));t<e.length;)e[t-1]===e[t]?e.splice(t,1):t++}(n),new e(null!==r?r:function(e,t){var r,n=new Array(e.length);for(r=0;r<e.length;r++)n[r]=e[r].description;return"Expected "+(e.length>1?n.slice(0,-1).join(", ")+" or "+n[e.length-1]:n[0])+" but "+(t?'"'+function(e){function t(e){return e.charCodeAt(0).toString(16).toUpperCase()}return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,(function(e){return"\\x0"+t(e)})).replace(/[\x10-\x1F\x80-\xFF]/g,(function(e){return"\\x"+t(e)})).replace(/[\u0180-\u0FFF]/g,(function(e){return"\\u0"+t(e)})).replace(/[\u1080-\uFFFF]/g,(function(e){return"\\u"+t(e)}))}(t)+'"':"end of input")+" found."}(n,a),n,a,o,i.line,i.column)}function Mt(){var e,t,r,n=49*_t+0,i=Ot[n];if(i)return _t=i.nextPos,i.result;for(e=_t,t=[],r=jt();r!==o;)t.push(r),r=jt();return t!==o&&(St=e,t=s()),e=t,Ot[n]={nextPos:_t,result:e},e}function jt(){var e,t,r,n,i,a,s,c=49*_t+1,l=Ot[c];if(l)return _t=l.nextPos,l.result;for(e=_t,t=[],r=br();r!==o;)t.push(r),r=br();if(t!==o)if((r=Nt())!==o){for(n=[],i=br();i!==o;)n.push(i),i=br();if(n!==o){for(i=[],a=Lt();a!==o;)i.push(a),a=Lt();if(i!==o){if(a=[],(s=wr())!==o)for(;s!==o;)a.push(s),s=wr();else a=u;a===o&&(a=Sr()),a!==o?e=t=[t,r,n,i,a]:(_t=e,e=u)}else _t=e,e=u}else _t=e,e=u}else _t=e,e=u;else _t=e,e=u;if(e===o){if(e=_t,t=[],(r=br())!==o)for(;r!==o;)t.push(r),r=br();else t=u;if(t!==o){if(r=[],(n=wr())!==o)for(;n!==o;)r.push(n),n=wr();else r=u;r===o&&(r=Sr()),r!==o?e=t=[t,r]:(_t=e,e=u)}else _t=e,e=u;e===o&&(e=wr())}return Ot[c]={nextPos:_t,result:e},e}function Nt(){var e,t=49*_t+2,r=Ot[t];return r?(_t=r.nextPos,r.result):((e=Lt())===o&&(e=qt())===o&&(e=Ut())===o&&(e=Vt()),Ot[t]={nextPos:_t,result:e},e)}function Lt(){var e,r,n,i,a,s,h=49*_t+3,p=Ot[h];if(p)return _t=p.nextPos,p.result;if(e=_t,35===t.charCodeAt(_t)?(r=c,_t++):(r=o,0===Tt&&It(l)),r!==o){for(n=[],i=_t,a=_t,Tt++,(s=wr())===o&&(s=Sr()),Tt--,s===o?a=f:(_t=a,a=u),a!==o?(t.length>_t?(s=t.charAt(_t),_t++):(s=o,0===Tt&&It(d)),s!==o?i=a=[a,s]:(_t=i,i=u)):(_t=i,i=u);i!==o;)n.push(i),i=_t,a=_t,Tt++,(s=wr())===o&&(s=Sr()),Tt--,s===o?a=f:(_t=a,a=u),a!==o?(t.length>_t?(s=t.charAt(_t),_t++):(s=o,0===Tt&&It(d)),s!==o?i=a=[a,s]:(_t=i,i=u)):(_t=i,i=u);n!==o?e=r=[r,n]:(_t=e,e=u)}else _t=e,e=u;return Ot[h]={nextPos:_t,result:e},e}function qt(){var e,r,n,i,a,s,c=49*_t+4,l=Ot[c];if(l)return _t=l.nextPos,l.result;if(e=_t,91===t.charCodeAt(_t)?(r=h,_t++):(r=o,0===Tt&&It(p)),r!==o){for(n=[],i=br();i!==o;)n.push(i),i=br();if(n!==o)if((i=Dt())!==o){for(a=[],s=br();s!==o;)a.push(s),s=br();a!==o?(93===t.charCodeAt(_t)?(s=y,_t++):(s=o,0===Tt&&It(v)),s!==o?(St=e,e=r=m(i)):(_t=e,e=u)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u}else _t=e,e=u;return Ot[c]={nextPos:_t,result:e},e}function Ut(){var e,r,n,i,a,s,c,l,f=49*_t+5,d=Ot[f];if(d)return _t=d.nextPos,d.result;if(e=_t,91===t.charCodeAt(_t)?(r=h,_t++):(r=o,0===Tt&&It(p)),r!==o)if(91===t.charCodeAt(_t)?(n=h,_t++):(n=o,0===Tt&&It(p)),n!==o){for(i=[],a=br();a!==o;)i.push(a),a=br();if(i!==o)if((a=Dt())!==o){for(s=[],c=br();c!==o;)s.push(c),c=br();s!==o?(93===t.charCodeAt(_t)?(c=y,_t++):(c=o,0===Tt&&It(v)),c!==o?(93===t.charCodeAt(_t)?(l=y,_t++):(l=o,0===Tt&&It(v)),l!==o?(St=e,e=r=g(a)):(_t=e,e=u)):(_t=e,e=u)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u}else _t=e,e=u;else _t=e,e=u;return Ot[f]={nextPos:_t,result:e},e}function Dt(){var e,t,r,n=49*_t+6,i=Ot[n];if(i)return _t=i.nextPos,i.result;if(e=_t,t=[],(r=Kt())!==o)for(;r!==o;)t.push(r),r=Kt();else t=u;return t!==o&&(r=Ft())!==o?(St=e,e=t=b(t,r)):(_t=e,e=u),e===o&&(e=_t,(t=Ft())!==o&&(St=e,t=w(t)),e=t),Ot[n]={nextPos:_t,result:e},e}function Ft(){var e,t,r,n,i,a=49*_t+7,s=Ot[a];if(s)return _t=s.nextPos,s.result;for(e=_t,t=[],r=br();r!==o;)t.push(r),r=br();if(t!==o)if((r=zt())!==o){for(n=[],i=br();i!==o;)n.push(i),i=br();n!==o?(St=e,e=t=_(r)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u;if(e===o){for(e=_t,t=[],r=br();r!==o;)t.push(r),r=br();if(t!==o)if((r=Ht())!==o){for(n=[],i=br();i!==o;)n.push(i),i=br();n!==o?(St=e,e=t=_(r)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u}return Ot[a]={nextPos:_t,result:e},e}function Kt(){var e,r,n,i,a,s,c,l=49*_t+8,f=Ot[l];if(f)return _t=f.nextPos,f.result;for(e=_t,r=[],n=br();n!==o;)r.push(n),n=br();if(r!==o)if((n=zt())!==o){for(i=[],a=br();a!==o;)i.push(a),a=br();if(i!==o)if(46===t.charCodeAt(_t)?(a=S,_t++):(a=o,0===Tt&&It(k)),a!==o){for(s=[],c=br();c!==o;)s.push(c),c=br();s!==o?(St=e,e=r=_(n)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u}else _t=e,e=u;else _t=e,e=u;if(e===o){for(e=_t,r=[],n=br();n!==o;)r.push(n),n=br();if(r!==o)if((n=Ht())!==o){for(i=[],a=br();a!==o;)i.push(a),a=br();if(i!==o)if(46===t.charCodeAt(_t)?(a=S,_t++):(a=o,0===Tt&&It(k)),a!==o){for(s=[],c=br();c!==o;)s.push(c),c=br();s!==o?(St=e,e=r=_(n)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u}else _t=e,e=u;else _t=e,e=u}return Ot[l]={nextPos:_t,result:e},e}function Vt(){var e,r,n,i,a,s,c=49*_t+9,l=Ot[c];if(l)return _t=l.nextPos,l.result;if(e=_t,(r=zt())!==o){for(n=[],i=br();i!==o;)n.push(i),i=br();if(n!==o)if(61===t.charCodeAt(_t)?(i=A,_t++):(i=o,0===Tt&&It(E)),i!==o){for(a=[],s=br();s!==o;)a.push(s),s=br();a!==o&&(s=Xt())!==o?(St=e,e=r=x(r,s)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u}else _t=e,e=u;if(e===o)if(e=_t,(r=Ht())!==o){for(n=[],i=br();i!==o;)n.push(i),i=br();if(n!==o)if(61===t.charCodeAt(_t)?(i=A,_t++):(i=o,0===Tt&&It(E)),i!==o){for(a=[],s=br();s!==o;)a.push(s),s=br();a!==o&&(s=Xt())!==o?(St=e,e=r=x(r,s)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u}else _t=e,e=u;return Ot[c]={nextPos:_t,result:e},e}function zt(){var e,t,r,n=49*_t+10,i=Ot[n];if(i)return _t=i.nextPos,i.result;if(e=_t,t=[],(r=Er())!==o)for(;r!==o;)t.push(r),r=Er();else t=u;return t!==o&&(St=e,t=T(t)),e=t,Ot[n]={nextPos:_t,result:e},e}function Ht(){var e,t,r=49*_t+11,n=Ot[r];return n?(_t=n.nextPos,n.result):(e=_t,(t=Gt())!==o&&(St=e,t=O(t)),(e=t)===o&&(e=_t,(t=$t())!==o&&(St=e,t=O(t)),e=t),Ot[r]={nextPos:_t,result:e},e)}function Xt(){var e,t=49*_t+12,r=Ot[t];return r?(_t=r.nextPos,r.result):((e=Qt())===o&&(e=gr())===o&&(e=nr())===o&&(e=ir())===o&&(e=sr())===o&&(e=ur())===o&&(e=dr()),Ot[t]={nextPos:_t,result:e},e)}function Qt(){var e,t=49*_t+13,r=Ot[t];return r?(_t=r.nextPos,r.result):((e=Wt())===o&&(e=Gt())===o&&(e=Yt())===o&&(e=$t()),Ot[t]={nextPos:_t,result:e},e)}function Wt(){var e,r,n,i,a,s=49*_t+14,c=Ot[s];if(c)return _t=c.nextPos,c.result;if(e=_t,t.substr(_t,3)===P?(r=P,_t+=3):(r=o,0===Tt&&It(R)),r!==o)if((n=wr())===o&&(n=C),n!==o){for(i=[],a=er();a!==o;)i.push(a),a=er();i!==o?(t.substr(_t,3)===P?(a=P,_t+=3):(a=o,0===Tt&&It(R)),a!==o?(St=e,e=r=I(i)):(_t=e,e=u)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u;return Ot[s]={nextPos:_t,result:e},e}function Gt(){var e,r,n,i,a=49*_t+15,s=Ot[a];if(s)return _t=s.nextPos,s.result;if(e=_t,34===t.charCodeAt(_t)?(r=B,_t++):(r=o,0===Tt&&It(M)),r!==o){for(n=[],i=Zt();i!==o;)n.push(i),i=Zt();n!==o?(34===t.charCodeAt(_t)?(i=B,_t++):(i=o,0===Tt&&It(M)),i!==o?(St=e,e=r=I(n)):(_t=e,e=u)):(_t=e,e=u)}else _t=e,e=u;return Ot[a]={nextPos:_t,result:e},e}function Yt(){var e,r,n,i,a,s=49*_t+16,c=Ot[s];if(c)return _t=c.nextPos,c.result;if(e=_t,t.substr(_t,3)===j?(r=j,_t+=3):(r=o,0===Tt&&It(N)),r!==o)if((n=wr())===o&&(n=C),n!==o){for(i=[],a=rr();a!==o;)i.push(a),a=rr();i!==o?(t.substr(_t,3)===j?(a=j,_t+=3):(a=o,0===Tt&&It(N)),a!==o?(St=e,e=r=I(i)):(_t=e,e=u)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u;return Ot[s]={nextPos:_t,result:e},e}function $t(){var e,r,n,i,a=49*_t+17,s=Ot[a];if(s)return _t=s.nextPos,s.result;if(e=_t,39===t.charCodeAt(_t)?(r=L,_t++):(r=o,0===Tt&&It(q)),r!==o){for(n=[],i=Jt();i!==o;)n.push(i),i=Jt();n!==o?(39===t.charCodeAt(_t)?(i=L,_t++):(i=o,0===Tt&&It(q)),i!==o?(St=e,e=r=I(n)):(_t=e,e=u)):(_t=e,e=u)}else _t=e,e=u;return Ot[a]={nextPos:_t,result:e},e}function Zt(){var e,r,n,i=49*_t+18,a=Ot[i];return a?(_t=a.nextPos,a.result):((e=Tr())===o&&(e=_t,r=_t,Tt++,34===t.charCodeAt(_t)?(n=B,_t++):(n=o,0===Tt&&It(M)),Tt--,n===o?r=f:(_t=r,r=u),r!==o?(t.length>_t?(n=t.charAt(_t),_t++):(n=o,0===Tt&&It(d)),n!==o?(St=e,e=r=U(n)):(_t=e,e=u)):(_t=e,e=u)),Ot[i]={nextPos:_t,result:e},e)}function Jt(){var e,r,n,i=49*_t+19,a=Ot[i];return a?(_t=a.nextPos,a.result):(e=_t,r=_t,Tt++,39===t.charCodeAt(_t)?(n=L,_t++):(n=o,0===Tt&&It(q)),Tt--,n===o?r=f:(_t=r,r=u),r!==o?(t.length>_t?(n=t.charAt(_t),_t++):(n=o,0===Tt&&It(d)),n!==o?(St=e,e=r=U(n)):(_t=e,e=u)):(_t=e,e=u),Ot[i]={nextPos:_t,result:e},e)}function er(){var e,r,n,i=49*_t+20,a=Ot[i];return a?(_t=a.nextPos,a.result):((e=Tr())===o&&(e=tr())===o&&(e=_t,r=_t,Tt++,t.substr(_t,3)===P?(n=P,_t+=3):(n=o,0===Tt&&It(R)),Tt--,n===o?r=f:(_t=r,r=u),r!==o?(t.length>_t?(n=t.charAt(_t),_t++):(n=o,0===Tt&&It(d)),n!==o?(St=e,e=r=D(n)):(_t=e,e=u)):(_t=e,e=u)),Ot[i]={nextPos:_t,result:e},e)}function tr(){var e,r,n,i,a=49*_t+21,s=Ot[a];if(s)return _t=s.nextPos,s.result;if(e=_t,92===t.charCodeAt(_t)?(r=F,_t++):(r=o,0===Tt&&It(K)),r!==o)if(wr()!==o){for(n=[],i=_r();i!==o;)n.push(i),i=_r();n!==o?(St=e,e=r=V()):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u;return Ot[a]={nextPos:_t,result:e},e}function rr(){var e,r,n,i=49*_t+22,a=Ot[i];return a?(_t=a.nextPos,a.result):(e=_t,r=_t,Tt++,t.substr(_t,3)===j?(n=j,_t+=3):(n=o,0===Tt&&It(N)),Tt--,n===o?r=f:(_t=r,r=u),r!==o?(t.length>_t?(n=t.charAt(_t),_t++):(n=o,0===Tt&&It(d)),n!==o?(St=e,e=r=U(n)):(_t=e,e=u)):(_t=e,e=u),Ot[i]={nextPos:_t,result:e},e)}function nr(){var e,r,n,i,a=49*_t+23,s=Ot[a];return s?(_t=s.nextPos,s.result):(e=_t,(r=or())===o&&(r=ar()),r!==o?(101===t.charCodeAt(_t)?(n=z,_t++):(n=o,0===Tt&&It(H)),n===o&&(69===t.charCodeAt(_t)?(n=X,_t++):(n=o,0===Tt&&It(Q))),n!==o&&(i=ar())!==o?(St=e,e=r=W(r,i)):(_t=e,e=u)):(_t=e,e=u),e===o&&(e=_t,(r=or())!==o&&(St=e,r=G(r)),e=r),Ot[a]={nextPos:_t,result:e},e)}function or(){var e,r,n,i,a,s,c=49*_t+24,l=Ot[c];return l?(_t=l.nextPos,l.result):(e=_t,43===t.charCodeAt(_t)?(r=Y,_t++):(r=o,0===Tt&&It($)),r===o&&(r=C),r!==o?(n=_t,(i=xr())!==o?(46===t.charCodeAt(_t)?(a=S,_t++):(a=o,0===Tt&&It(k)),a!==o&&(s=xr())!==o?n=i=[i,a,s]:(_t=n,n=u)):(_t=n,n=u),n!==o?(St=e,e=r=Z(n)):(_t=e,e=u)):(_t=e,e=u),e===o&&(e=_t,45===t.charCodeAt(_t)?(r=J,_t++):(r=o,0===Tt&&It(ee)),r!==o?(n=_t,(i=xr())!==o?(46===t.charCodeAt(_t)?(a=S,_t++):(a=o,0===Tt&&It(k)),a!==o&&(s=xr())!==o?n=i=[i,a,s]:(_t=n,n=u)):(_t=n,n=u),n!==o?(St=e,e=r=te(n)):(_t=e,e=u)):(_t=e,e=u)),Ot[c]={nextPos:_t,result:e},e)}function ir(){var e,t,r=49*_t+25,n=Ot[r];return n?(_t=n.nextPos,n.result):(e=_t,(t=ar())!==o&&(St=e,t=re(t)),e=t,Ot[r]={nextPos:_t,result:e},e)}function ar(){var e,r,n,i,a,s=49*_t+26,c=Ot[s];if(c)return _t=c.nextPos,c.result;if(e=_t,43===t.charCodeAt(_t)?(r=Y,_t++):(r=o,0===Tt&&It($)),r===o&&(r=C),r!==o){if(n=[],(i=Ar())!==o)for(;i!==o;)n.push(i),i=Ar();else n=u;n!==o?(i=_t,Tt++,46===t.charCodeAt(_t)?(a=S,_t++):(a=o,0===Tt&&It(k)),Tt--,a===o?i=f:(_t=i,i=u),i!==o?(St=e,e=r=Z(n)):(_t=e,e=u)):(_t=e,e=u)}else _t=e,e=u;if(e===o)if(e=_t,45===t.charCodeAt(_t)?(r=J,_t++):(r=o,0===Tt&&It(ee)),r!==o){if(n=[],(i=Ar())!==o)for(;i!==o;)n.push(i),i=Ar();else n=u;n!==o?(i=_t,Tt++,46===t.charCodeAt(_t)?(a=S,_t++):(a=o,0===Tt&&It(k)),Tt--,a===o?i=f:(_t=i,i=u),i!==o?(St=e,e=r=te(n)):(_t=e,e=u)):(_t=e,e=u)}else _t=e,e=u;return Ot[s]={nextPos:_t,result:e},e}function sr(){var e,r,n=49*_t+27,i=Ot[n];return i?(_t=i.nextPos,i.result):(e=_t,t.substr(_t,4)===ne?(r=ne,_t+=4):(r=o,0===Tt&&It(oe)),r!==o&&(St=e,r=ie()),(e=r)===o&&(e=_t,t.substr(_t,5)===ae?(r=ae,_t+=5):(r=o,0===Tt&&It(se)),r!==o&&(St=e,r=ue()),e=r),Ot[n]={nextPos:_t,result:e},e)}function ur(){var e,r,n,i,a,s=49*_t+28,c=Ot[s];if(c)return _t=c.nextPos,c.result;if(e=_t,91===t.charCodeAt(_t)?(r=h,_t++):(r=o,0===Tt&&It(p)),r!==o){for(n=[],i=fr();i!==o;)n.push(i),i=fr();n!==o?(93===t.charCodeAt(_t)?(i=y,_t++):(i=o,0===Tt&&It(v)),i!==o?(St=e,e=r=ce()):(_t=e,e=u)):(_t=e,e=u)}else _t=e,e=u;if(e===o&&(e=_t,91===t.charCodeAt(_t)?(r=h,_t++):(r=o,0===Tt&&It(p)),r!==o?((n=cr())===o&&(n=C),n!==o?(93===t.charCodeAt(_t)?(i=y,_t++):(i=o,0===Tt&&It(v)),i!==o?(St=e,e=r=le(n)):(_t=e,e=u)):(_t=e,e=u)):(_t=e,e=u),e===o)){if(e=_t,91===t.charCodeAt(_t)?(r=h,_t++):(r=o,0===Tt&&It(p)),r!==o){if(n=[],(i=lr())!==o)for(;i!==o;)n.push(i),i=lr();else n=u;n!==o?(93===t.charCodeAt(_t)?(i=y,_t++):(i=o,0===Tt&&It(v)),i!==o?(St=e,e=r=fe(n)):(_t=e,e=u)):(_t=e,e=u)}else _t=e,e=u;if(e===o)if(e=_t,91===t.charCodeAt(_t)?(r=h,_t++):(r=o,0===Tt&&It(p)),r!==o){if(n=[],(i=lr())!==o)for(;i!==o;)n.push(i),i=lr();else n=u;n!==o&&(i=cr())!==o?(93===t.charCodeAt(_t)?(a=y,_t++):(a=o,0===Tt&&It(v)),a!==o?(St=e,e=r=de(n,i)):(_t=e,e=u)):(_t=e,e=u)}else _t=e,e=u}return Ot[s]={nextPos:_t,result:e},e}function cr(){var e,t,r,n,i,a=49*_t+29,s=Ot[a];if(s)return _t=s.nextPos,s.result;for(e=_t,t=[],r=fr();r!==o;)t.push(r),r=fr();if(t!==o)if((r=Xt())!==o){for(n=[],i=fr();i!==o;)n.push(i),i=fr();n!==o?(St=e,e=t=he(r)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u;return Ot[a]={nextPos:_t,result:e},e}function lr(){var e,r,n,i,a,s,c,l=49*_t+30,f=Ot[l];if(f)return _t=f.nextPos,f.result;for(e=_t,r=[],n=fr();n!==o;)r.push(n),n=fr();if(r!==o)if((n=Xt())!==o){for(i=[],a=fr();a!==o;)i.push(a),a=fr();if(i!==o)if(44===t.charCodeAt(_t)?(a=pe,_t++):(a=o,0===Tt&&It(ye)),a!==o){for(s=[],c=fr();c!==o;)s.push(c),c=fr();s!==o?(St=e,e=r=he(n)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u}else _t=e,e=u;else _t=e,e=u;return Ot[l]={nextPos:_t,result:e},e}function fr(){var e,t=49*_t+31,r=Ot[t];return r?(_t=r.nextPos,r.result):((e=br())===o&&(e=wr())===o&&(e=Lt()),Ot[t]={nextPos:_t,result:e},e)}function dr(){var e,r,n,i,a,s,c=49*_t+32,l=Ot[c];if(l)return _t=l.nextPos,l.result;if(e=_t,123===t.charCodeAt(_t)?(r=ve,_t++):(r=o,0===Tt&&It(me)),r!==o){for(n=[],i=br();i!==o;)n.push(i),i=br();if(n!==o){for(i=[],a=hr();a!==o;)i.push(a),a=hr();if(i!==o){for(a=[],s=br();s!==o;)a.push(s),s=br();a!==o?(125===t.charCodeAt(_t)?(s=ge,_t++):(s=o,0===Tt&&It(be)),s!==o?(St=e,e=r=we(i)):(_t=e,e=u)):(_t=e,e=u)}else _t=e,e=u}else _t=e,e=u}else _t=e,e=u;return Ot[c]={nextPos:_t,result:e},e}function hr(){var e,r,n,i,a,s,c,l,f,d,h,p=49*_t+33,y=Ot[p];if(y)return _t=y.nextPos,y.result;for(e=_t,r=[],n=br();n!==o;)r.push(n),n=br();if(r!==o)if((n=zt())!==o){for(i=[],a=br();a!==o;)i.push(a),a=br();if(i!==o)if(61===t.charCodeAt(_t)?(a=A,_t++):(a=o,0===Tt&&It(E)),a!==o){for(s=[],c=br();c!==o;)s.push(c),c=br();if(s!==o)if((c=Xt())!==o){for(l=[],f=br();f!==o;)l.push(f),f=br();if(l!==o)if(44===t.charCodeAt(_t)?(f=pe,_t++):(f=o,0===Tt&&It(ye)),f!==o){for(d=[],h=br();h!==o;)d.push(h),h=br();d!==o?(St=e,e=r=_e(n,c)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u}else _t=e,e=u;else _t=e,e=u}else _t=e,e=u;else _t=e,e=u}else _t=e,e=u;else _t=e,e=u;if(e===o){for(e=_t,r=[],n=br();n!==o;)r.push(n),n=br();if(r!==o)if((n=zt())!==o){for(i=[],a=br();a!==o;)i.push(a),a=br();if(i!==o)if(61===t.charCodeAt(_t)?(a=A,_t++):(a=o,0===Tt&&It(E)),a!==o){for(s=[],c=br();c!==o;)s.push(c),c=br();s!==o&&(c=Xt())!==o?(St=e,e=r=_e(n,c)):(_t=e,e=u)}else _t=e,e=u;else _t=e,e=u}else _t=e,e=u;else _t=e,e=u}return Ot[p]={nextPos:_t,result:e},e}function pr(){var e,r,n,i=49*_t+34,a=Ot[i];return a?(_t=a.nextPos,a.result):(e=_t,46===t.charCodeAt(_t)?(r=S,_t++):(r=o,0===Tt&&It(k)),r!==o&&(n=xr())!==o?(St=e,e=r=Se(n)):(_t=e,e=u),Ot[i]={nextPos:_t,result:e},e)}function yr(){var e,r,n,i,a,s,c,l,f,d,h,p,y=49*_t+35,v=Ot[y];return v?(_t=v.nextPos,v.result):(e=_t,r=_t,(n=Ar())!==o&&(i=Ar())!==o&&(a=Ar())!==o&&(s=Ar())!==o?(45===t.charCodeAt(_t)?(c=J,_t++):(c=o,0===Tt&&It(ee)),c!==o&&(l=Ar())!==o&&(f=Ar())!==o?(45===t.charCodeAt(_t)?(d=J,_t++):(d=o,0===Tt&&It(ee)),d!==o&&(h=Ar())!==o&&(p=Ar())!==o?r=n=[n,i,a,s,c,l,f,d,h,p]:(_t=r,r=u)):(_t=r,r=u)):(_t=r,r=u),r!==o&&(St=e,r=ke(r)),e=r,Ot[y]={nextPos:_t,result:e},e)}function vr(){var e,r,n,i,a,s,c,l,f,d,h,p=49*_t+36,y=Ot[p];return y?(_t=y.nextPos,y.result):(e=_t,r=_t,(n=Ar())!==o&&(i=Ar())!==o?(58===t.charCodeAt(_t)?(a=Ae,_t++):(a=o,0===Tt&&It(Ee)),a!==o&&(s=Ar())!==o&&(c=Ar())!==o?(58===t.charCodeAt(_t)?(l=Ae,_t++):(l=o,0===Tt&&It(Ee)),l!==o&&(f=Ar())!==o&&(d=Ar())!==o?((h=pr())===o&&(h=C),h!==o?r=n=[n,i,a,s,c,l,f,d,h]:(_t=r,r=u)):(_t=r,r=u)):(_t=r,r=u)):(_t=r,r=u),r!==o&&(St=e,r=xe(r)),e=r,Ot[p]={nextPos:_t,result:e},e)}function mr(){var e,r,n,i,a,s,c,l,f,d,h,p,y,v,m,g,b,w=49*_t+37,_=Ot[w];return _?(_t=_.nextPos,_.result):(e=_t,r=_t,(n=Ar())!==o&&(i=Ar())!==o?(58===t.charCodeAt(_t)?(a=Ae,_t++):(a=o,0===Tt&&It(Ee)),a!==o&&(s=Ar())!==o&&(c=Ar())!==o?(58===t.charCodeAt(_t)?(l=Ae,_t++):(l=o,0===Tt&&It(Ee)),l!==o&&(f=Ar())!==o&&(d=Ar())!==o?((h=pr())===o&&(h=C),h!==o?(45===t.charCodeAt(_t)?(p=J,_t++):(p=o,0===Tt&&It(ee)),p===o&&(43===t.charCodeAt(_t)?(p=Y,_t++):(p=o,0===Tt&&It($))),p!==o&&(y=Ar())!==o&&(v=Ar())!==o?(58===t.charCodeAt(_t)?(m=Ae,_t++):(m=o,0===Tt&&It(Ee)),m!==o&&(g=Ar())!==o&&(b=Ar())!==o?r=n=[n,i,a,s,c,l,f,d,h,p,y,v,m,g,b]:(_t=r,r=u)):(_t=r,r=u)):(_t=r,r=u)):(_t=r,r=u)):(_t=r,r=u)):(_t=r,r=u),r!==o&&(St=e,r=xe(r)),e=r,Ot[w]={nextPos:_t,result:e},e)}function gr(){var e,r,n,i,a,s=49*_t+38,c=Ot[s];return c?(_t=c.nextPos,c.result):(e=_t,(r=yr())!==o?(84===t.charCodeAt(_t)?(n=Te,_t++):(n=o,0===Tt&&It(Oe)),n!==o&&(i=vr())!==o?(90===t.charCodeAt(_t)?(a=Pe,_t++):(a=o,0===Tt&&It(Re)),a!==o?(St=e,e=r=Ce(r,i)):(_t=e,e=u)):(_t=e,e=u)):(_t=e,e=u),e===o&&(e=_t,(r=yr())!==o?(84===t.charCodeAt(_t)?(n=Te,_t++):(n=o,0===Tt&&It(Oe)),n!==o&&(i=mr())!==o?(St=e,e=r=Ie(r,i)):(_t=e,e=u)):(_t=e,e=u)),Ot[s]={nextPos:_t,result:e},e)}function br(){var e,r=49*_t+39,n=Ot[r];return n?(_t=n.nextPos,n.result):(Be.test(t.charAt(_t))?(e=t.charAt(_t),_t++):(e=o,0===Tt&&It(Me)),Ot[r]={nextPos:_t,result:e},e)}function wr(){var e,r,n,i=49*_t+40,a=Ot[i];return a?(_t=a.nextPos,a.result):(10===t.charCodeAt(_t)?(e=je,_t++):(e=o,0===Tt&&It(Ne)),e===o&&(e=_t,13===t.charCodeAt(_t)?(r=Le,_t++):(r=o,0===Tt&&It(qe)),r!==o?(10===t.charCodeAt(_t)?(n=je,_t++):(n=o,0===Tt&&It(Ne)),n!==o?e=r=[r,n]:(_t=e,e=u)):(_t=e,e=u)),Ot[i]={nextPos:_t,result:e},e)}function _r(){var e,t=49*_t+41,r=Ot[t];return r?(_t=r.nextPos,r.result):((e=wr())===o&&(e=br()),Ot[t]={nextPos:_t,result:e},e)}function Sr(){var e,r,n=49*_t+42,i=Ot[n];return i?(_t=i.nextPos,i.result):(e=_t,Tt++,t.length>_t?(r=t.charAt(_t),_t++):(r=o,0===Tt&&It(d)),Tt--,r===o?e=f:(_t=e,e=u),Ot[n]={nextPos:_t,result:e},e)}function kr(){var e,r=49*_t+43,n=Ot[r];return n?(_t=n.nextPos,n.result):(Ue.test(t.charAt(_t))?(e=t.charAt(_t),_t++):(e=o,0===Tt&&It(De)),Ot[r]={nextPos:_t,result:e},e)}function Ar(){var e,r,n=49*_t+44,i=Ot[n];return i?(_t=i.nextPos,i.result):(Fe.test(t.charAt(_t))?(e=t.charAt(_t),_t++):(e=o,0===Tt&&It(Ke)),e===o&&(e=_t,95===t.charCodeAt(_t)?(r=Ve,_t++):(r=o,0===Tt&&It(ze)),r!==o&&(St=e,r=He()),e=r),Ot[n]={nextPos:_t,result:e},e)}function Er(){var e,r=49*_t+45,n=Ot[r];return n?(_t=n.nextPos,n.result):(Xe.test(t.charAt(_t))?(e=t.charAt(_t),_t++):(e=o,0===Tt&&It(Qe)),Ot[r]={nextPos:_t,result:e},e)}function xr(){var e,t,r,n=49*_t+46,i=Ot[n];if(i)return _t=i.nextPos,i.result;if(e=_t,t=[],(r=Ar())!==o)for(;r!==o;)t.push(r),r=Ar();else t=u;return t!==o&&(St=e,t=We(t)),e=t,Ot[n]={nextPos:_t,result:e},e}function Tr(){var e,r,n=49*_t+47,i=Ot[n];return i?(_t=i.nextPos,i.result):(e=_t,t.substr(_t,2)===Ge?(r=Ge,_t+=2):(r=o,0===Tt&&It(Ye)),r!==o&&(St=e,r=$e()),(e=r)===o&&(e=_t,t.substr(_t,2)===Ze?(r=Ze,_t+=2):(r=o,0===Tt&&It(Je)),r!==o&&(St=e,r=et()),(e=r)===o&&(e=_t,t.substr(_t,2)===tt?(r=tt,_t+=2):(r=o,0===Tt&&It(rt)),r!==o&&(St=e,r=nt()),(e=r)===o&&(e=_t,t.substr(_t,2)===ot?(r=ot,_t+=2):(r=o,0===Tt&&It(it)),r!==o&&(St=e,r=at()),(e=r)===o&&(e=_t,t.substr(_t,2)===st?(r=st,_t+=2):(r=o,0===Tt&&It(ut)),r!==o&&(St=e,r=ct()),(e=r)===o&&(e=_t,t.substr(_t,2)===lt?(r=lt,_t+=2):(r=o,0===Tt&&It(ft)),r!==o&&(St=e,r=dt()),(e=r)===o&&(e=_t,t.substr(_t,2)===ht?(r=ht,_t+=2):(r=o,0===Tt&&It(pt)),r!==o&&(St=e,r=yt()),(e=r)===o&&(e=Or()))))))),Ot[n]={nextPos:_t,result:e},e)}function Or(){var e,r,n,i,a,s,c,l,f,d,h,p=49*_t+48,y=Ot[p];return y?(_t=y.nextPos,y.result):(e=_t,t.substr(_t,2)===vt?(r=vt,_t+=2):(r=o,0===Tt&&It(mt)),r!==o?(n=_t,(i=kr())!==o&&(a=kr())!==o&&(s=kr())!==o&&(c=kr())!==o&&(l=kr())!==o&&(f=kr())!==o&&(d=kr())!==o&&(h=kr())!==o?n=i=[i,a,s,c,l,f,d,h]:(_t=n,n=u),n!==o?(St=e,e=r=gt(n)):(_t=e,e=u)):(_t=e,e=u),e===o&&(e=_t,t.substr(_t,2)===bt?(r=bt,_t+=2):(r=o,0===Tt&&It(wt)),r!==o?(n=_t,(i=kr())!==o&&(a=kr())!==o&&(s=kr())!==o&&(c=kr())!==o?n=i=[i,a,s,c]:(_t=n,n=u),n!==o?(St=e,e=r=gt(n)):(_t=e,e=u)):(_t=e,e=u)),Ot[p]={nextPos:_t,result:e},e)}var Pr=[];function Rr(e,t,r){var n=new Error(e);throw n.line=t,n.column=r,n}function Cr(e){Pr.push(e)}function Ir(e,t,r,n,o){var i={type:e,value:t,line:r(),column:n()};return o&&(i.key=o),i}function Br(e,t,r){var n=parseInt("0x"+e);if(!(!isFinite(n)||Math.floor(n)!=n||n<0||n>1114111||n>55295&&n<57344))return Mr(n);Rr("Invalid Unicode escape code: "+e,t,r)}function Mr(){var e,t,r=16384,n=[],o=-1,i=arguments.length;if(!i)return"";for(var a="";++o<i;){var s=Number(arguments[o]);s<=65535?n.push(s):(e=55296+((s-=65536)>>10),t=s%1024+56320,n.push(e,t)),(o+1==i||n.length>r)&&(a+=String.fromCharCode.apply(null,n),n.length=0)}return a}if((r=a())!==o&&_t===t.length)return r;throw r!==o&&_t<t.length&&It({type:"end",description:"end of input"}),Bt(null,xt,Et)}}}()},function(e,t,r){"use strict";e.exports={compile:function(e){var t=[],r=[],n="",o={},i=o;return function(e){for(var t,r=0;r<e.length;r++)switch((t=e[r]).type){case"Assign":s(t);break;case"ObjectPath":l(t);break;case"ArrayPath":f(t)}return o}(e);function a(e,t,r){var n=new Error(e);throw n.line=t,n.column=r,n}function s(e){var o,s=e.key,l=e.value,f=e.line,d=e.column;o=n?n+"."+s:s,void 0!==i[s]&&a("Cannot redefine existing key '"+o+"'.",f,d),i[s]=c(l),u(o)||(t.push(o),r.push(o))}function u(e){return-1!==t.indexOf(e)}function c(e){return"Array"===e.type?function(e){for(var t=null,r=0;r<e.length;r++){var n=e[r];null===t?t=n.type:n.type!==t&&a("Cannot add value of type "+n.type+" to array of type "+t+".",n.line,n.column)}return e.map(c)}(e.value):"InlineTable"===e.type?function e(t){for(var r={},n=0;n<t.length;n++){var o=t[n];"InlineTable"===o.value.type?r[o.key]=e(o.value.value):"InlineTableValue"===o.type&&(r[o.key]=c(o.value))}return r}(e.value):e.value}function l(e){var r=e.value,s=r.map(h).join("."),c=e.line,l=e.column;u(s)&&a("Cannot redefine existing key '"+r+"'.",c,l),t.push(s),i=d(o,r,{},c,l),n=r}function f(e){var r=e.value,s=r.map(h).join("."),c=e.line,l=e.column;if(u(s)||t.push(s),(t=t.filter((function(e){return 0!==e.indexOf(s)}))).push(s),i=d(o,r,[],c,l),n=s,i instanceof Array){var f={};i.push(f),i=f}else a("Cannot redefine existing key '"+r+"'.",c,l)}function d(e,t,n,o,i){for(var s=[],u="",c=(t.join("."),e),l=0;l<t.length;l++){var f=t[l];s.push(f),u=s.join("."),void 0===c[f]?l===t.length-1?c[f]=n:c[f]={}:l!==t.length-1&&r.indexOf(u)>-1&&a("Cannot redefine existing key '"+u+"'.",o,i),(c=c[f])instanceof Array&&c.length&&l<t.length-1&&(c=c[c.length-1])}return c}function h(e){return e.indexOf(".")>-1?'"'+e+'"':e}}}},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=void 0;var n=r(2),o=n.__importDefault(r(28)),i=n.__importDefault(r(436)),a=r(29),s=r(36);!function(t){function r(t,r,n,o,i){var u,l;if(r.startsWith("M"))throw Error("Invalid serverAccountID: multiplexed accounts are not supported.");try{l=new a.Transaction(t,n)}catch(e){try{l=new a.FeeBumpTransaction(t,n)}catch(e){throw new s.InvalidSep10ChallengeError("Invalid challenge: unable to deserialize challengeTx transaction string")}throw new s.InvalidSep10ChallengeError("Invalid challenge: expected a Transaction but received a FeeBumpTransaction")}if(0!==Number.parseInt(l.sequence,10))throw new s.InvalidSep10ChallengeError("The transaction sequence number should be zero");if(l.source!==r)throw new s.InvalidSep10ChallengeError("The transaction source account is not equal to the server's account");if(l.operations.length<1)throw new s.InvalidSep10ChallengeError("The transaction should contain at least one operation");var f=l.operations,d=f[0],h=f.slice(1);if(!d.source)throw new s.InvalidSep10ChallengeError("The transaction's operation should contain a source account");var p,y=d.source,v=null;if(l.memo.type!==a.MemoNone){if(y.startsWith("M"))throw new s.InvalidSep10ChallengeError("The transaction has a memo but the client account ID is a muxed account");if(l.memo.type!==a.MemoID)throw new s.InvalidSep10ChallengeError("The transaction's memo must be of type `id`");v=l.memo.value}if("manageData"!==d.type)throw new s.InvalidSep10ChallengeError("The transaction's operation type should be 'manageData'");if(l.timeBounds&&Number.parseInt(null===(u=l.timeBounds)||void 0===u?void 0:u.maxTime,10)===a.TimeoutInfinite)throw new s.InvalidSep10ChallengeError("The transaction requires non-infinite timebounds");if(!function(e,t){void 0===t&&(t=0);if(!e.timeBounds)return!1;var r=Math.floor(Date.now()/1e3),n=e.timeBounds,o=n.minTime,i=n.maxTime;return r>=Number.parseInt(o,10)-t&&r<=Number.parseInt(i,10)+t}(l,300))throw new s.InvalidSep10ChallengeError("The transaction has expired");if(void 0===d.value)throw new s.InvalidSep10ChallengeError("The transaction's operation values should not be null");if(!d.value)throw new s.InvalidSep10ChallengeError("The transaction's operation value should not be null");if(48!==e.from(d.value.toString(),"base64").length)throw new s.InvalidSep10ChallengeError("The transaction's operation value should be a 64 bytes base64 random string");if(!o)throw new s.InvalidSep10ChallengeError("Invalid homeDomains: a home domain must be provided for verification");if("string"==typeof o)o+" auth"===d.name&&(p=o);else{if(!Array.isArray(o))throw new s.InvalidSep10ChallengeError("Invalid homeDomains: homeDomains type is "+typeof o+" but should be a string or an array");p=o.find((function(e){return e+" auth"===d.name}))}if(!p)throw new s.InvalidSep10ChallengeError("Invalid homeDomains: the transaction's operation key name does not match the expected home domain");for(var m=0,g=h;m<g.length;m++){var b=g[m];if("manageData"!==b.type)throw new s.InvalidSep10ChallengeError("The transaction has operations that are not of type 'manageData'");if(b.source!==r&&"client_domain"!==b.name)throw new s.InvalidSep10ChallengeError("The transaction has operations that are unrecognized");if("web_auth_domain"===b.name){if(void 0===b.value)throw new s.InvalidSep10ChallengeError("'web_auth_domain' operation value should not be null");if(b.value.compare(e.from(i)))throw new s.InvalidSep10ChallengeError("'web_auth_domain' operation value does not match "+i)}}if(!c(l,r))throw new s.InvalidSep10ChallengeError("Transaction not signed by server: '"+r+"'");return{tx:l,clientAccountID:y,matchedHomeDomain:p,memo:v}}function u(e,t,o,i,u,c){var f,d=r(e,t,o,u,c).tx;try{f=a.Keypair.fromPublicKey(t)}catch(e){throw new Error("Couldn't infer keypair from the provided 'serverAccountID': "+e.message)}for(var h,p=new Set,y=0,v=i;y<v.length;y++){(x=v[y])!==f.publicKey()&&("G"===x.charAt(0)&&p.add(x))}if(0===p.size)throw new s.InvalidSep10ChallengeError("No verifiable client signers provided, at least one G... address must be provided");for(var m=0,g=d.operations;m<g.length;m++){var b=g[m];if("manageData"===b.type&&"client_domain"===b.name){if(h)throw new s.InvalidSep10ChallengeError("Found more than one client_domain operation");h=b.source}}var w=n.__spreadArrays([f.publicKey()],Array.from(p));h&&w.push(h);for(var _=l(d,w),S=!1,k=!1,A=0,E=_;A<E.length;A++){var x;(x=E[A])===f.publicKey()&&(S=!0),x===h&&(k=!0)}if(!S)throw new s.InvalidSep10ChallengeError("Transaction not signed by server: '"+f.publicKey()+"'");if(h&&!k)throw new s.InvalidSep10ChallengeError("Transaction not signed by the source account of the 'client_domain' ManageData operation");if(1===_.length)throw new s.InvalidSep10ChallengeError("None of the given signers match the transaction signatures");if(_.length!==d.signatures.length)throw new s.InvalidSep10ChallengeError("Transaction has unrecognized signatures");return _.splice(_.indexOf(f.publicKey()),1),h&&_.splice(_.indexOf(h),1),_}function c(e,t){return 0!==l(e,[t]).length}function l(e,t){for(var r=e.hash(),n=o.default(e.signatures),i=new Set,u=0,c=t;u<c.length;u++){var l=c[u];if(0===n.length)break;var f=void 0;try{f=a.Keypair.fromPublicKey(l)}catch(e){throw new s.InvalidSep10ChallengeError("Signer is not a valid address: "+e.message)}for(var d=0;d<n.length;d++){var h=n[d];if(h.hint().equals(f.signatureHint())&&f.verify(r,h.signature())){i.add(l),n.splice(d,1);break}}}return Array.from(i)}t.buildChallengeTx=function(e,t,r,n,o,s,u,c,l){if(void 0===n&&(n=300),void 0===u&&(u=null),void 0===c&&(c=null),void 0===l&&(l=null),t.startsWith("M")&&u)throw Error("memo cannot be used if clientAccountID is a muxed account");var f=new a.Account(e.publicKey(),"-1"),d=Math.floor(Date.now()/1e3),h=i.default(48).toString("base64"),p=new a.TransactionBuilder(f,{fee:a.BASE_FEE,networkPassphrase:o,timebounds:{minTime:d,maxTime:d+n}}).addOperation(a.Operation.manageData({name:r+" auth",value:h,source:t})).addOperation(a.Operation.manageData({name:"web_auth_domain",value:s,source:f.accountId()}));if(c){if(!l)throw Error("clientSigningKey is required if clientDomain is provided");p.addOperation(a.Operation.manageData({name:"client_domain",value:c,source:l}))}u&&p.addMemo(a.Memo.id(u));var y=p.build();return y.sign(e),y.toEnvelope().toXDR("base64").toString()},t.readChallengeTx=r,t.verifyChallengeTxThreshold=function(e,t,r,n,o,i,a){for(var c,l=u(e,t,r,o.map((function(e){return e.key})),i,a),f=0,d=function(e){var t=(null===(c=o.find((function(t){return t.key===e})))||void 0===c?void 0:c.weight)||0;f+=t},h=0,p=l;h<p.length;h++){d(p[h])}if(f<n)throw new s.InvalidSep10ChallengeError("signers with weight "+f+" do not meet threshold "+n+'"');return l},t.verifyChallengeTxSigners=u,t.verifyTxSignedBy=c,t.gatherTxSigners=l}(t.Utils||(t.Utils={}))}).call(this,r(1).Buffer)},function(e,t,r){"use strict";(function(t,n){var o=r(21).Buffer,i=t.crypto||t.msCrypto;i&&i.getRandomValues?e.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var r=o.allocUnsafe(e);if(e>0)if(e>65536)for(var a=0;a<e;a+=65536)i.getRandomValues(r.slice(a,a+65536));else i.getRandomValues(r);if("function"==typeof t)return n.nextTick((function(){t(null,r)}));return r}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,r(5),r(13))}]);Выполнить команду
Для локальной разработки. Не используйте в интернете!